|
@@ -7,13 +7,13 @@
|
|
></i> 常见症状维护系统--添加科室常见症状</div>
|
|
></i> 常见症状维护系统--添加科室常见症状</div>
|
|
<el-form :model="form" ref="ruleForm" :rules="rules" class="addDepartForm">
|
|
<el-form :model="form" ref="ruleForm" :rules="rules" class="addDepartForm">
|
|
<el-form-item label="选择科室" prop="department">
|
|
<el-form-item label="选择科室" prop="department">
|
|
- <el-select v-model="form.department" placeholder="请添加科室" class="selectDepart">
|
|
|
|
|
|
+ <el-select v-model="form.department" placeholder="请添加科室" @change="changeDept" class="selectDepart">
|
|
<el-option v-for="item in departList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
<el-option v-for="item in departList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="选择类型" prop="type">
|
|
<el-form-item label="选择类型" prop="type">
|
|
- <el-select v-model="form.type" placeholder="请选择类型" class="selectDepart">
|
|
|
|
- <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
|
+ <el-select v-model="form.type" placeholder="请选择类型" @change="changeType" class="selectDepart">
|
|
|
|
+ <el-option v-for="item in typeList" :key="item.type" :label="item.typeName" :value="item.type"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -106,8 +106,13 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
- this.getDepartmentList()
|
|
|
|
- this.getSymptomList()
|
|
|
|
|
|
+ const { isEdit, isDetail, data } = this.$route.params;
|
|
|
|
+ if(isEdit || isDetail) {
|
|
|
|
+ this.isEdit = isEdit
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ this.getDepartmentList()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
searchVal(newVal, preVal) {
|
|
searchVal(newVal, preVal) {
|
|
@@ -126,7 +131,6 @@
|
|
api.getDepartmentList().then((res)=>{
|
|
api.getDepartmentList().then((res)=>{
|
|
if(res.data.code === '0') {
|
|
if(res.data.code === '0') {
|
|
this.departList = res.data.data
|
|
this.departList = res.data.data
|
|
-
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -138,7 +142,8 @@
|
|
const param = {
|
|
const param = {
|
|
"deptId": this.form.department,
|
|
"deptId": this.form.department,
|
|
"tagName": this.searchVal,
|
|
"tagName": this.searchVal,
|
|
- "noIds": noIds
|
|
|
|
|
|
+ "noIds": noIds,
|
|
|
|
+ "type": this.form.type
|
|
}
|
|
}
|
|
api.getSymptomList(param).then((res)=>{
|
|
api.getSymptomList(param).then((res)=>{
|
|
if(res.data.code === '0') {
|
|
if(res.data.code === '0') {
|
|
@@ -146,6 +151,22 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ changeDept() {
|
|
|
|
+ console.log('asdasfdgag',this.departList)
|
|
|
|
+ this.form.type = ''
|
|
|
|
+ this.typeList = this.departList.filter(item => this.form.department == item.id)[0].typeDTOList
|
|
|
|
+ this.clearData()
|
|
|
|
+ },
|
|
|
|
+ changeType() {
|
|
|
|
+ this.clearData()
|
|
|
|
+ this.getSymptomList()
|
|
|
|
+ },
|
|
|
|
+ clearData() {
|
|
|
|
+ this.leftTagsList = [];
|
|
|
|
+ this.rightTagsList = [];
|
|
|
|
+ this.selectLeftTagsList = [];
|
|
|
|
+ this.selectRightTagIndex = -1;
|
|
|
|
+ },
|
|
selectLeftTag(tag, index, e) {
|
|
selectLeftTag(tag, index, e) {
|
|
const hasTag = this.isHasTag(tag, this.selectLeftTagsList)
|
|
const hasTag = this.isHasTag(tag, this.selectLeftTagsList)
|
|
if (hasTag) {
|
|
if (hasTag) {
|