导入修改

This commit is contained in:
shidongli 2024-12-06 15:46:13 +08:00
parent 2a2da2558f
commit 80b7091a92

View File

@ -52,10 +52,7 @@
<el-dialog title="导入" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<div v-for="(item, index) in form.deptAliasVOS" :key="index">
<el-form-item
required
>
<el-form-item required>
<template slot="label">
{{ item.deptAlias }}
</template>
@ -415,17 +412,11 @@ import { listCompare } from "@/api/system/compare";
import { listSubdivision } from "@/api/system/subdivision";
import { agencyList, getAgencytype } from "@/api/system/agency";
import { getToken } from "@/utils/auth";
import {
addDepartment,
updateDepartment,
patientUpload,
getDepartmentList,
secondaryUpload,
} from "@/api/system/department";
export default {
name: 'SearchFilter',
components: { Form, FormItem, Button },
@ -572,18 +563,15 @@ export default {
this.departmentsshow = true
}
this.open = true;
}
else if (response.code == 200 && !response.data) {
this.$modal.msgSuccess("导入成功");
this.$modal.msgSuccess(response.msg);
this.$emit('handleRules')
} else if (response.code == 200 && response.data) {
this.form = response.data
this.open = true;
}
this.uploadcancel();
this.fileList = [];
},
handleRemove(file, fileList) {
@ -874,17 +862,14 @@ export default {
var emptyItems = []
emptyItems = this.form.deptAliasVOS.filter(f => f.departmentName == "" || f.departmentName == null)
console.log(emptyItems, 'this.emptyItems')
if (emptyItems.length > 0) {
this.$modal.msgError("必填项请填写完整,再进行提交");
} else {
secondaryUpload(this.form).then(response => {
this.$modal.msgSuccess("保存成功");
this.$modal.msgSuccess(response.msg);
this.open = false;
this.$emit('handleRules')
});
}
// this.$refs["form"].validate(valid => {