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