|
@@ -5,6 +5,16 @@
|
|
|
<el-form-item label="量表名称:">
|
|
|
<el-input size="mini" v-model="filter.tagSysName" placeholder="量表名称" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="状态:">
|
|
|
+ <el-select v-model="isState" clearable placeholder="请选择" size="mini">
|
|
|
+ <el-option
|
|
|
+ v-for="item in stateSelect"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="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>
|
|
@@ -34,6 +44,14 @@
|
|
|
prop="name"
|
|
|
label="量表名称">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :class="scope.row.isDeleted == 'N'?'':'delete'">
|
|
|
+ {{scope.row.isDeleted == 'N'?'启用中':'已删除'}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
:resizable = "false"
|
|
|
prop="modifier"
|
|
@@ -41,12 +59,11 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
:resizable = "false"
|
|
|
- prop="operate"
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="modifyIndeptTag(scope.row)" type="text" size="small">修改</el-button>
|
|
|
+ <el-button type="text" size="small" :disabled="scope.row.isDeleted != 'N'" @click="modifyIndeptTag(scope.row)">修改</el-button>
|
|
|
<span style="margin:0 3px;">|</span>
|
|
|
- <el-button @click="showDelDialog(scope.row.id)" class="delete" type="text" size="small">删除</el-button>
|
|
|
+ <el-button type="text" size="small" :class="scope.row.isDeleted == 'N'?'delete':'review'" @click="showDelDialog(scope.row)">{{scope.row.isDeleted == 'N'?'删除':'恢复'}}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -74,6 +91,11 @@
|
|
|
data: function() {
|
|
|
return {
|
|
|
list: [],
|
|
|
+ stateSelect:[
|
|
|
+ {id:'N',name:'启用中'},
|
|
|
+ {id:'Y',name:'已删除'},
|
|
|
+ ],
|
|
|
+ isState:'',
|
|
|
tagTypes: [],
|
|
|
AdscriptionsType:[],
|
|
|
AdscriptionsOwnTo:[],
|
|
@@ -96,13 +118,13 @@
|
|
|
getDropList() {
|
|
|
let templateType = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleInfoTypeEnum : []
|
|
|
this.AdscriptionsType = templateType
|
|
|
- return api.getDropList().then((res) =>{
|
|
|
+ return api.getknowledgeList().then((res) =>{
|
|
|
if(res.data.code === '0') {
|
|
|
- localStorage.setItem('DiseaseManage',JSON.stringify(res.data.data[8]))
|
|
|
- this.tagTypes = res.data.data[6];
|
|
|
- for (var i = 0; i < this.tagTypes.length; i++) {
|
|
|
- this.tagTypesList.push(this.tagTypes[i].val)
|
|
|
- }
|
|
|
+ localStorage.setItem('DiseaseManage',JSON.stringify(res.data.data[1]))
|
|
|
+ // this.tagTypes = res.data.data[6];
|
|
|
+ // for (var i = 0; i < this.tagTypes.length; i++) {
|
|
|
+ // this.tagTypesList.push(this.tagTypes[i].val)
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -110,13 +132,13 @@
|
|
|
const param = this.getFilterItems();
|
|
|
api.scaleContentStructure(param).then((res) => {
|
|
|
const list = res.data.data.records
|
|
|
- for (var i = 0; i < list.length; i++) {
|
|
|
- for (var j = 0; j < this.tagTypes.length; j++) {
|
|
|
- if(list[i].tagType === this.tagTypes[j].val) {
|
|
|
- list[i].tagTypeCn = this.tagTypes[j].name;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // for (var i = 0; i < list.length; i++) {
|
|
|
+ // for (var j = 0; j < this.tagTypes.length; j++) {
|
|
|
+ // if(list[i].tagType === this.tagTypes[j].val) {
|
|
|
+ // list[i].tagTypeCn = this.tagTypes[j].name;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
this.list = list;
|
|
|
this.total = res.data.data.total;
|
|
|
})
|
|
@@ -149,7 +171,8 @@
|
|
|
const param = {
|
|
|
current: this.currentPage,
|
|
|
size: this.pageSize,
|
|
|
- tagName: this.filter.tagSysName,
|
|
|
+ name: this.filter.tagSysName,
|
|
|
+ status:this.isState
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -171,14 +194,19 @@
|
|
|
resolve();
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- showDelDialog(id){
|
|
|
+ showDelDialog(item){
|
|
|
let tmpArr = []
|
|
|
- tmpArr.push(id)
|
|
|
- this.showConfirmDialog('是否删除该标签?',()=>{
|
|
|
- api.deleteScale({ids:tmpArr}).then((res)=>{
|
|
|
+ tmpArr.push(item.conceptId)
|
|
|
+ const param = {
|
|
|
+ ids:tmpArr,
|
|
|
+ status:item.isDeleted === 'N'?'Y':'N'
|
|
|
+ }
|
|
|
+ let waringTxt = (item.isDeleted === 'N'?'是否删除该标准术语?':'是否重新启用该条数据?')
|
|
|
+ this.showConfirmDialog(waringTxt,()=>{
|
|
|
+ api.deleteScale(param).then((res)=>{
|
|
|
if(res.data.code=='0'){
|
|
|
+ this.warning(res.data.msg||'操作成功','success');
|
|
|
this.getDataList();
|
|
|
- this.warning(res.data.msg || '操作成功','success');
|
|
|
}else{
|
|
|
this.warning(res.data.msg);
|
|
|
}
|