|
|
|
@ -31,7 +31,7 @@
|
|
|
|
|
<el-table-column prop="remark" label="备注"></el-table-column>
|
|
|
|
|
<el-table-column label="操作" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" @click="handleSubForm( scope.row, 'add')">新增</el-button>
|
|
|
|
|
<el-button type="text" @click="handleSubForm( scope.row, 'add')" :disabled="scope.row.code==10000">新增</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="addHospProduct( scope.row)">绑定</el-button>
|
|
|
|
@ -134,7 +134,15 @@
|
|
|
|
|
<script>
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import {getBasicHospType, getListMenu, saveBasicHospType,uodateBasicHospType,deleteBasicHospType,getOneName} from "@/api/basic/basicHospType";
|
|
|
|
|
import {
|
|
|
|
|
getBasicHospType,
|
|
|
|
|
getListMenu,
|
|
|
|
|
saveBasicHospType,
|
|
|
|
|
uodateBasicHospType,
|
|
|
|
|
deleteBasicHospType,
|
|
|
|
|
getOneName,
|
|
|
|
|
menuAllList
|
|
|
|
|
} from "@/api/basic/basicHospType";
|
|
|
|
|
|
|
|
|
|
import selectHospProduct from "@/views/basic/product/bindHospProduct";
|
|
|
|
|
import selectUnBindHospProduct from "@/views/basic/product/unbindHospProduct";
|
|
|
|
@ -224,7 +232,7 @@ export default {
|
|
|
|
|
this.subData = JSON.parse(JSON.stringify(data));
|
|
|
|
|
} else if (formName === "add") {
|
|
|
|
|
this.subData= {
|
|
|
|
|
parentCode:JSON.parse(JSON.stringify(data)).code
|
|
|
|
|
parentCode:JSON.parse(JSON.stringify(data)).parentCode
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
this.getTreeselect(data);
|
|
|
|
@ -292,12 +300,22 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
});
|
|
|
|
|
if(this.formName == 'edit'){
|
|
|
|
|
//排除自己和自己下级
|
|
|
|
|
getListMenu(data).then(response => {
|
|
|
|
|
this.fromDeptOptions = [];
|
|
|
|
|
menu.children = this.handleTree(response.data,"code", "parentCode");
|
|
|
|
|
this.fromDeptOptions.push(menu);
|
|
|
|
|
});
|
|
|
|
|
}else {
|
|
|
|
|
//查询全部
|
|
|
|
|
debugger
|
|
|
|
|
menuAllList(data).then(response => {
|
|
|
|
|
this.fromDeptOptions = [];
|
|
|
|
|
menu.children = this.handleTree(response.data,"code", "parentCode");
|
|
|
|
|
this.fromDeptOptions.push(menu);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/** 转换菜单数据结构 */
|
|
|
|
|