|
@@ -5,9 +5,9 @@
|
|
|
<el-form-item label="模板名称:">
|
|
|
<el-input size="mini" v-model.trim="filter.modeName" placeholder="模板名称" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="数据模块Id:">
|
|
|
- <el-select size="mini" v-model.trim="filter.hospitalName" @change="getValue" placeholder="数据模块" clearable>
|
|
|
- <el-option v-for="item in hospitalList" :label="item.name" :value="item.val" :key="item.id" ></el-option>
|
|
|
+ <el-form-item label="数据模块:">
|
|
|
+ <el-select size="mini" v-model.trim="filter.modeId" @change="getValue" placeholder="数据模块" clearable>
|
|
|
+ <el-option v-for="item in moduleList" :label="item.name" :value="item.val" :key="item.id" ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属医院:">
|
|
@@ -57,8 +57,8 @@
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="modifyIndeptTag(scope.row, 'modify')" type="text" size="small">修改</el-button>
|
|
|
- <span style="margin:0 3px;">|</span>
|
|
|
- <el-button @click="modifyIndeptTag(scope.row, 'copy')" class="text" type="text" size="small">复制</el-button>
|
|
|
+ <!-- <span style="margin:0 3px;">|</span>
|
|
|
+ <el-button @click="modifyIndeptTag(scope.row, 'copy')" class="text" type="text" size="small">复制</el-button> -->
|
|
|
<span style="margin:0 3px;">|</span>
|
|
|
<el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
|
|
|
</template>
|
|
@@ -86,6 +86,7 @@
|
|
|
return {
|
|
|
list: [],
|
|
|
hospitalList: [],
|
|
|
+ moduleList:[],
|
|
|
searched: false,
|
|
|
filter: {
|
|
|
modeName: '', //模板名称
|
|
@@ -100,7 +101,9 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getDataList()
|
|
|
+ this.getAllTypes().then(()=>{
|
|
|
+ this.getDataList()
|
|
|
+ })
|
|
|
},
|
|
|
watch: {
|
|
|
'filter': {
|
|
@@ -118,6 +121,28 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ getAllTypes(){
|
|
|
+ if(localStorage.getItem("qcModuleTypes")){
|
|
|
+ this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
|
|
|
+ this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
|
|
|
+ return new Promise(function(resolve, reject){
|
|
|
+ resolve()
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //获取枚举信息
|
|
|
+ return api.getQcTypes().then((res)=>{
|
|
|
+ if(res.data.code==="0"){
|
|
|
+ const data = res.data.data;
|
|
|
+ localStorage.setItem("qcFieldTypes",JSON.stringify(data[11]));
|
|
|
+ localStorage.setItem("qcModuleTypes",JSON.stringify(data[12]));
|
|
|
+ localStorage.setItem("qcHospitalTypes",JSON.stringify(data[13]));
|
|
|
+ this.hospitalList = JSON.parse(localStorage.getItem("qcHospitalTypes"));
|
|
|
+ this.moduleList = JSON.parse(localStorage.getItem("qcModuleTypes"));
|
|
|
+ }else{
|
|
|
+ this.warning("获取枚举信息失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
handleSizeChange(val){
|
|
|
this.pageSize = val;
|
|
|
this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
|
|
@@ -135,11 +160,14 @@
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
});
|
|
|
- console.log('param',param)
|
|
|
api.getQCTemplist(param).then((res) => {
|
|
|
loading.close()
|
|
|
- console.log('res.', res)
|
|
|
- this.list = res.data.data.records;
|
|
|
+ let list = res.data.data.records
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
+ list[i].hospitalId = this.hospitalList.find(item => item.val == list[i].hospitalId).name
|
|
|
+ list[i].modeId = this.moduleList.find(item => item.val == list[i].modeId).name
|
|
|
+ }
|
|
|
+ this.list = list;
|
|
|
this.total = res.data.data.total;
|
|
|
if(this.inCurrentPage!==undefined){
|
|
|
this.currentPage=this.inCurrentPage;
|
|
@@ -163,7 +191,8 @@
|
|
|
})
|
|
|
},
|
|
|
modifyIndeptTag(row, type) {
|
|
|
- api.detailsTag({id:row.id}).then((res)=>{
|
|
|
+ api.getQCTempDetail({moduleId:row.id}).then((res)=>{
|
|
|
+ console.log('eeee',res)
|
|
|
const {code,data,msg} = res.data;
|
|
|
if(code=='0'){
|
|
|
const item = Object.assign({},row,data);
|
|
@@ -172,9 +201,9 @@
|
|
|
filter: this.filter
|
|
|
} : {currentPage: this.currentPage};
|
|
|
if(type == 'modify') {
|
|
|
- this.$router.push({name: 'AddIndeptLabel', params: Object.assign(pam, {isEdit: true, data: item})});
|
|
|
+ this.$router.push({name: 'AddQualityControlTemp', params: Object.assign(pam, {isEdit: true, data: item})});
|
|
|
} else if( type == 'copy') {
|
|
|
- this.$router.push({name: 'AddIndeptLabel', params: Object.assign(pam, {isCopy: true, data: item})});
|
|
|
+ this.$router.push({name: 'AddQualityControlTemp', params: Object.assign(pam, {isCopy: true, data: item})});
|
|
|
} else {
|
|
|
return
|
|
|
}
|
|
@@ -198,10 +227,9 @@
|
|
|
},
|
|
|
clearFilter(){
|
|
|
this.filter={
|
|
|
- tagType: [], //标签类型
|
|
|
- controlType: [],
|
|
|
- tagAdscription: '', //标签归属
|
|
|
- tagSysName: '', //标签系统名称
|
|
|
+ name: "",
|
|
|
+ modeId: "",
|
|
|
+ hospitalName: ""
|
|
|
};
|
|
|
},
|
|
|
getFilterItems(isTurnPage) {
|
|
@@ -214,7 +242,8 @@
|
|
|
name: modeName,
|
|
|
current: this.inCurrentPage||this.currentPage,
|
|
|
size: this.pageSize,
|
|
|
- modeId: hospitalName,
|
|
|
+ modeId: modeId,
|
|
|
+ hospitalId: hospitalName
|
|
|
};
|
|
|
return param;
|
|
|
},
|
|
@@ -243,10 +272,9 @@
|
|
|
showDelDialog(row){
|
|
|
const param = {
|
|
|
"ids": row.id,
|
|
|
- "type": row.type
|
|
|
}
|
|
|
this.showConfirmDialog('是否删除该标签?',()=>{
|
|
|
- api.deleteTagGroup(param).then((res)=>{
|
|
|
+ api.delQCTemp(param).then((res)=>{
|
|
|
if(res.data.code=='0'){
|
|
|
if(!this.searched){
|
|
|
//未点确认时清空搜索条件
|