@@ -179,7 +179,7 @@
<el-select v-model="form.department" filterable placeholder="请选择" size="small">
<el-option
v-for="(item) in departmentList"
- :key="item.id"
+ :key="item.name"
:label="item.name"
:value="item.name">
</el-option>
@@ -368,6 +368,7 @@
}
this.getPrimarySite()
+ this.getAllDepts()
},
methods: {
back() { this.$router.go(-1) },
@@ -460,10 +461,10 @@
})
- getDeptInfo() {
- api.getDeptInfo({}).then((res) => {
+ getAllDepts() {
+ api.getAllDepts({name: ''}).then((res) => {
if(res.data.code == '0') {
- this.departmentList = res.data.data.records
+ this.departmentList = res.data.data
@@ -485,7 +486,7 @@
// return;
// }
const { primarySite,termClass,termCode,concept,conceptType,department,order,sex,termMiniClassName, maxAge, minAge, name, remark, stdName, twoLevelPosition } = this.form
- if ( !primarySite || !termClass || !concept || !conceptType|| !department || !sex || !termMiniClassName || !maxAge || !minAge || !name || !stdName || !twoLevelPosition ) {
+ if ( !primarySite || !termClass || !concept || !conceptType|| !department || !sex || !termMiniClassName || (!maxAge&&maxAge != 0) || (!minAge &&minAge != 0) || !name || !stdName || !twoLevelPosition ) {
this.warning('请填写必填项');
return
@@ -118,8 +118,10 @@
this.departList.push({ id, name, val:id })
this.form.department = id
+ } else {
+ this.getDepartmentList()
- this.getDepartmentList()
+
this.getTagList()
watch: {