|  |  | @ -32,7 +32,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |         <el-table-column label="操作" class-name="small-padding fixed-width"> |  |  |  |         <el-table-column label="操作" class-name="small-padding fixed-width"> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <template slot-scope="scope"> |  |  |  |           <template slot-scope="scope"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-button type="text"  @click="handleSubForm( scope.row, 'add')">新增</el-button> |  |  |  |             <el-button type="text"  @click="handleSubForm( scope.row, 'add')">新增</el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-button type="text" v-if="scope.row.code!=10000" @click.native.stop="handleSubForm( scope.row, 'edit')">编辑</el-button> |  |  |  |             <el-button type="text"  @click.native.stop="handleSubForm( scope.row, 'edit')">编辑</el-button> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <el-button type="text" v-if="scope.row.code!=10000" @click.native.stop="handleDelInv(scope.row)">删除</el-button> |  |  |  |             <el-button type="text" v-if="scope.row.code!=10000" @click.native.stop="handleDelInv(scope.row)">删除</el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-button type="text" v-if="scope.row.code!=10000"  @click.native.stop="addHospProduct( scope.row)">绑定</el-button> |  |  |  |             <el-button type="text" v-if="scope.row.code!=10000"  @click.native.stop="addHospProduct( scope.row)">绑定</el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-button type="text" v-if="scope.row.code!=10000"   @click.native.stop="removeHospProduct(scope.row)">解绑</el-button> |  |  |  |             <el-button type="text" v-if="scope.row.code!=10000"   @click.native.stop="removeHospProduct(scope.row)">解绑</el-button> | 
			
		
	
	
		
		
			
				
					|  |  | @ -54,10 +54,11 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             <el-col :span="12" class="el-col"> |  |  |  |             <el-col :span="12" class="el-col"> | 
			
		
	
		
		
			
				
					
					|  |  |  |               <el-form-item label="上级菜单" prop="parentCode"> |  |  |  |               <el-form-item label="上级菜单" prop="parentCode"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 <treeselect |  |  |  |                 <treeselect | 
			
		
	
		
		
			
				
					
					|  |  |  |                   :disabled="formName=='add'" |  |  |  |                   :disabled="formName=='add' || subData.code==10000" | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                   v-model="subData.parentCode" |  |  |  |                   v-model="subData.parentCode" | 
			
		
	
		
		
			
				
					
					|  |  |  |                   :options="fromDeptOptions" |  |  |  |                   :options="fromDeptOptions" | 
			
		
	
		
		
			
				
					
					|  |  |  |                   :normalizer="normalizer" |  |  |  |                   :normalizer="normalizer" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   :clearable = "false" | 
			
		
	
		
		
			
				
					
					|  |  |  |                   :show-count="true" |  |  |  |                   :show-count="true" | 
			
		
	
		
		
			
				
					
					|  |  |  |                   placeholder="选择上级菜单" |  |  |  |                   placeholder="选择上级菜单" | 
			
		
	
		
		
			
				
					
					|  |  |  |                 /> |  |  |  |                 /> | 
			
		
	
	
		
		
			
				
					|  |  | @ -133,7 +134,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <script> |  |  |  | <script> | 
			
		
	
		
		
			
				
					
					|  |  |  | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |  |  |  | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import Treeselect from "@riophae/vue-treeselect"; |  |  |  | import Treeselect from "@riophae/vue-treeselect"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import {getBasicHospType, getListMenu, saveBasicHospType,uodateBasicHospType,deleteBasicHospType} from "@/api/basic/basicHospType"; |  |  |  | import {getBasicHospType, getListMenu, saveBasicHospType,uodateBasicHospType,deleteBasicHospType,getOneName} from "@/api/basic/basicHospType"; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import selectHospProduct from "@/views/basic/product/bindHospProduct"; |  |  |  | import selectHospProduct from "@/views/basic/product/bindHospProduct"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import selectUnBindHospProduct from "@/views/basic/product/unbindHospProduct"; |  |  |  | import selectUnBindHospProduct from "@/views/basic/product/unbindHospProduct"; | 
			
		
	
	
		
		
			
				
					|  |  | @ -226,7 +227,7 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |           parentCode:JSON.parse(JSON.stringify(data)).code |  |  |  |           parentCode:JSON.parse(JSON.stringify(data)).code | 
			
		
	
		
		
			
				
					
					|  |  |  |         }; |  |  |  |         }; | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.getTreeselect(); |  |  |  |       this.getTreeselect(data); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       this.subFormVisible = true; |  |  |  |       this.subFormVisible = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -248,7 +249,7 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     forInvSubmit() {    // 新增,编辑---提交 |  |  |  |     forInvSubmit() {    // 新增,编辑---提交 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       if(this.subData.parentCode==null){ |  |  |  |       if(this.subData.code!=10000 && this.subData.parentCode==null){ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         this.$message.error("上级菜单不能为空"); |  |  |  |         this.$message.error("上级菜单不能为空"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return |  |  |  |         return | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
	
		
		
			
				
					|  |  | @ -282,13 +283,23 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     /** 查询菜单下拉树结构 */ |  |  |  |     /** 查询菜单下拉树结构 */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     getTreeselect() { |  |  |  |     getTreeselect(row) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       getListMenu().then(response => { |  |  |  |       debugger | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         this.fromDeptOptions = []; |  |  |  |       if(row!=null){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         const menu = {id: 0, name: '主类目', children: []}; |  |  |  |         var data={ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         menu.children = this.handleTree(response.data,"code", "parentCode"); |  |  |  |           code:row.code, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         this.fromDeptOptions.push(menu); |  |  |  |           type:1 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       }); |  |  |  |         } | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       getOneName().then(res =>{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         const menu = {id: res.data.id,code:res.data.code, name: res.data.name, children: []}; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         getListMenu(data).then(response => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.fromDeptOptions = []; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           menu.children = this.handleTree(response.data,"code", "parentCode"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           console.log(menu) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.fromDeptOptions.push(menu); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     /** 转换菜单数据结构 */ |  |  |  |     /** 转换菜单数据结构 */ | 
			
		
	
		
		
			
				
					
					|  |  |  |     normalizer(node) { |  |  |  |     normalizer(node) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |