|
@@ -4,12 +4,7 @@
|
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
|
<el-form-item label="模板类型:">
|
|
|
<el-select size="mini" v-model="filter.templateType" placeholder="模板类型" clearable>
|
|
|
- <el-option v-for="item in Adscriptions" :label="item.name" :value="item.key" :key="item.key" ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="属于:">
|
|
|
- <el-select size="mini" v-model="filter.ownTo" placeholder="属于" clearable>
|
|
|
- <el-option v-for="item in Adscriptions" :label="item.name" :value="item.key" :key="item.key" ></el-option>
|
|
|
+ <el-option v-for="item in AdscriptionsType" :label="item.name" :value="item.key" :key="item.key" ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="归属:">
|
|
@@ -17,6 +12,11 @@
|
|
|
<el-option v-for="item in Adscriptions" :label="item.name" :value="item.key" :key="item.key" ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="属于:">
|
|
|
+ <el-select size="mini" v-model="filter.ownTo" placeholder="属于" clearable>
|
|
|
+ <el-option v-if="!!item.name" v-for="item in AdscriptionsOwnTo" :label="item.name" :value="item.id" :key="item.id" ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button size="mini" @click="filterDatas">确认</el-button>
|
|
|
<el-button size="mini" type="warning" @click="addIndeptTag">添加模板</el-button>
|
|
@@ -46,6 +46,16 @@
|
|
|
prop="name"
|
|
|
label="模板名称">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ :resizable = "false"
|
|
|
+ prop="moduleTypeName"
|
|
|
+ label="模板类型">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ :resizable = "false"
|
|
|
+ prop="relationName"
|
|
|
+ label="属于">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
:resizable = "false"
|
|
|
prop="ascriptionName"
|
|
@@ -62,7 +72,7 @@
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="modifyIndeptTag(scope.row)" type="text" size="small">修改</el-button>
|
|
|
- <!-- <el-button @click="showDelDialog(scope.row.id)" class="delete" type="text" size="small">删除</el-button> -->
|
|
|
+ <el-button @click="showDelDialog(scope.row.id,scope.row.type)" class="delete" type="text" size="small">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -92,17 +102,20 @@
|
|
|
list: [],
|
|
|
tagTypes: [],
|
|
|
Adscriptions: [],
|
|
|
+ AdscriptionsType:[],
|
|
|
+ AdscriptionsOwnTo:[],
|
|
|
tagTypesList: [],
|
|
|
filter: {
|
|
|
tagType: [], //标签类型
|
|
|
templateType: '', //模板类型
|
|
|
- ownTo: '', //属于科室
|
|
|
+ ownTo: '', //属于科室、慢病
|
|
|
tagAdscription: '', //标签归属
|
|
|
tagSysName: '', //标签系统名称
|
|
|
},
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
|
+ deptAndDisInfo:[],
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -111,45 +124,43 @@
|
|
|
})
|
|
|
this.getSubTemplate()
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ tmpType(){
|
|
|
+ return this.filter.templateType
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ tmpType(newVal, preVal){
|
|
|
+ console.log(newVal,preVal)
|
|
|
+ if(newVal != preVal){
|
|
|
+ if(newVal == 1){
|
|
|
+ this.AdscriptionsOwnTo = this.deptAndDisInfo.deptDTOS
|
|
|
+ this.filter.ownTo = ''
|
|
|
+ }else if(newVal == 2){
|
|
|
+ this.AdscriptionsOwnTo = this.deptAndDisInfo.disDTOS
|
|
|
+ this.filter.ownTo = ''
|
|
|
+ }else{
|
|
|
+ this.AdscriptionsOwnTo = []
|
|
|
+ this.filter.ownTo = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
getSubTemplate() {
|
|
|
- let param = {
|
|
|
- noIds:this.subTmpList,
|
|
|
- }
|
|
|
- api.getModuleInfoSub(param).then((res) => {
|
|
|
- if (res.data.code === '0') {
|
|
|
+ api.getAllDeptAndDisInfo().then((res) => {
|
|
|
+ if (res.data.code === '0') {//获取科室和疾病所有信息
|
|
|
let result = res.data.data
|
|
|
- let arr = [],main = '',now = '',nowEmpt = '',other = '';
|
|
|
- for(let i = 0;i < result.length;i++){
|
|
|
- if(result[i].name == '主诉模板'){
|
|
|
- if(!main){
|
|
|
- main = 1
|
|
|
- arr.push(main)
|
|
|
- }
|
|
|
- }else if(result[i].name == '现病史模板'){
|
|
|
- if(!now){
|
|
|
- now = 2
|
|
|
- arr.push(now)
|
|
|
- }
|
|
|
- }else if(result[i].name == '现病史空模板'){
|
|
|
- if(!nowEmpt){
|
|
|
- nowEmpt = 3
|
|
|
- arr.push(nowEmpt)
|
|
|
- }
|
|
|
- }else if(result[i].name == '其他史模板'){
|
|
|
- if(!other){
|
|
|
- other = 4
|
|
|
- arr.push(other)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- localStorage.setItem('guisu',JSON.stringify(arr))
|
|
|
+
|
|
|
+ this.deptAndDisInfo = result
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getDropList() {
|
|
|
let templateOwn = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleTypeEnum : []
|
|
|
+ let templateType = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleInfoTypeEnum : []
|
|
|
this.Adscriptions = templateOwn;
|
|
|
+ this.AdscriptionsType = templateType
|
|
|
return api.getDropList().then((res) =>{
|
|
|
if(res.data.code === '0') {
|
|
|
this.tagTypes = res.data.data[6];
|
|
@@ -187,6 +198,7 @@
|
|
|
this.$router.push({path:'LT-YXSJWH-TJMBWH'})
|
|
|
},
|
|
|
modifyIndeptTag(row) {
|
|
|
+ console.log(row)
|
|
|
Promise.all([
|
|
|
api.getModuleInfoOne({moduleId:row.id}),
|
|
|
api.getModuleDetailInfo({moduleId:row.id})
|
|
@@ -213,6 +225,8 @@
|
|
|
current: this.currentPage,
|
|
|
size: this.pageSize,
|
|
|
type: this.filter.tagAdscription,
|
|
|
+ moduleType:this.filter.templateType,
|
|
|
+ relationId:this.filter.ownTo
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -234,9 +248,9 @@
|
|
|
resolve();
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- showDelDialog(id){
|
|
|
+ showDelDialog(id,type){
|
|
|
this.showConfirmDialog('是否删除该标签?',()=>{
|
|
|
- api.delTemplate({ids:id}).then((res)=>{
|
|
|
+ api.delTemplate({ids:id,type:type}).then((res)=>{
|
|
|
if(res.data.code=='0'){
|
|
|
this.getDataList();
|
|
|
this.warning(res.data.msg || '操作成功','success');
|