This commit is contained in:
liang.chao 2025-11-26 10:31:22 +08:00
parent 7f2a579754
commit 4f25e5600d
2 changed files with 40 additions and 22 deletions

View File

@ -158,23 +158,34 @@ export default {
}, },
methods: { methods: {
rowSave(row, done, loading) { rowSave(row, done, loading) {
addKyFilesMultiClassifyAPI(row).then( const submitData = {
classifyName: row.classifyName,
classifyDesc: row.classifyDesc,
dimension: row.dimension,
fileRelatedId: row.fileRelatedId,
};
addKyFilesMultiClassifyAPI(submitData).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({ type: 'success', message: '新增成功!' });
type: 'success',
message: '操作成功!',
});
done(); done();
}, },
error => { error => {
window.console.log(error); window.console.log(error);
loading();
} }
); );
}, },
rowUpdate(row, index, done, loading) { rowUpdate(row, index, done, loading) {
updateKyFilesMultiClassifyAPI(row).then( //
const submitData = {
id: row.id,
classifyName: row.classifyName,
classifyDesc: row.classifyDesc,
dimension: row.dimension,
fileRelatedId: row.fileRelatedId,
};
updateKyFilesMultiClassifyAPI(submitData).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
@ -184,8 +195,8 @@ export default {
done(); done();
}, },
error => { error => {
window.console.log(error); console.error('更新失败:', error);
loading(); loading(); // loading
} }
); );
}, },

View File

@ -114,7 +114,12 @@ export default {
}, },
methods: { methods: {
rowSave(row, done, loading) { rowSave(row, done, loading) {
addKyFilesCustomizeClassifyAPI(row).then( //
const submitData = {
customizeClassifyName: row.customizeClassifyName,
classifyDesc: row.classifyDesc
};
addKyFilesCustomizeClassifyAPI(submitData).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
@ -124,13 +129,20 @@ export default {
done(); done();
}, },
error => { error => {
window.console.log(error); console.error('新增失败:', error);
loading(); loading(); // loading
} }
); );
}, },
rowUpdate(row, index, done, loading) { rowUpdate(row, index, done, loading) {
updateKyFilesCustomizeClassifyAPI(row).then( //
const submitData = {
id: row.id,
customizeClassifyName: row.customizeClassifyName,
classifyDesc: row.classifyDesc,
};
updateKyFilesCustomizeClassifyAPI(submitData).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
@ -140,8 +152,8 @@ export default {
done(); done();
}, },
error => { error => {
window.console.log(error); console.log(error);
loading(); loading(); //
} }
); );
}, },
@ -184,13 +196,8 @@ export default {
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
}, },
beforeOpen(done, type) { beforeOpen(done, type, row) {
if (['edit', 'view'].includes(type)) { done(); // done()
detail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
}, },
searchReset() { searchReset() {
this.query = {}; this.query = {};