diff --git a/src/views/components/SearchForm.vue b/src/views/components/SearchForm.vue index f17a42b..0adb8fc 100644 --- a/src/views/components/SearchForm.vue +++ b/src/views/components/SearchForm.vue @@ -193,7 +193,7 @@ ({}) @@ -468,7 +468,7 @@ export default { }, data() { return { - querlist:{},//导出 + querlist: {},//导出 departmentsshow: false,//添加按钮 loading: false, patientInfoList: [], @@ -550,6 +550,9 @@ export default { }, } }, + created(){ + this.gettreelist(); + }, mounted() { // 通过最大显示个数控制展开/折叠 this.minShowCtrol() @@ -559,14 +562,14 @@ export default { }, watch: { - query:{ + query: { handler(val) { console.log(val, 'val') - this.querlist=val + this.querlist = val - }, - deep: true, - immediate: true, + }, + deep: true, + immediate: true, }, '$store.state.app.sidebar.opened'(newVal, Val) { if (newVal) { @@ -617,7 +620,6 @@ export default { submitUpload() { if (this.isDistinct == true) { this.action.data.isDistinct = 1 - } else { this.action.data.isDistinct = 0 } @@ -697,7 +699,6 @@ export default { additem(item, index) { this.indexadd = index this.reset(); - this.gettreelist(); this.infocompare(); this.getinfolist(); this.getinfo(); @@ -707,8 +708,6 @@ export default { this.openadd = true if (localStorage.getItem('roleKey') != 'admin') { this.getLeafIds(this.treeOptions) - this.formadd.hospitalAgencyIdtwo = JSON.parse(localStorage.getItem('user')).hospitalAgencyId; - this.formadd.hospitalAgencyName=JSON.parse(localStorage.getItem('user')).nickName; } console.log(item, index, 'item') // this.$emit('additem',item,index) @@ -728,6 +727,7 @@ export default { }, getLeafIds(nodes) { console.log(nodes, ';node') + this.formadd.hospitalAgencyIdtwo = JSON.parse(localStorage.getItem('user')).hospitalAgencyId; let leafIds = []; nodes.forEach(node => {