|
@@ -2,19 +2,18 @@
|
|
|
<div>
|
|
|
<crumbs title="模板维护">
|
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
|
- <el-form-item label="标签类型:">
|
|
|
- <el-select size="mini" v-model="filter.controlType[0]" placeholder="标签类型" clearable>
|
|
|
- <el-option v-for="item in tagTypes" :label="item.name" :value="item.val" :key="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="模板名称:">
|
|
|
+ <el-input size="mini" v-model.trim="filter.modeName" placeholder="模板名称" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="标签归属:">
|
|
|
- <el-select size="mini" v-model="filter.tagAdscription" @change="getValue" placeholder="标签归属" clearable>
|
|
|
- <el-option v-if="item.val!=6&&item.val!=7&&item.val!=8&&item.val!=9&&item.val!=10&&item.val!=21&&item.val!=22" v-for="item in Adscriptions" :label="item.name" :value="item.val" :key="item.id" ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="模板Id:">
|
|
|
+ <el-input size="mini" v-model.trim="filter.modeId" placeholder="模板Id" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="标签系统名称:">
|
|
|
- <el-input size="mini" v-model="filter.tagSysName" placeholder="标签系统名称" clearable></el-input>
|
|
|
+ <el-form-item label="所属医院:">
|
|
|
+ <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-select>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item>
|
|
|
<el-button size="mini" @click="filterDatas">确认</el-button>
|
|
|
<el-button size="mini" type="warning" @click="addTemp">添加模板</el-button>
|
|
@@ -98,22 +97,19 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import api from '@api/icss.js';
|
|
|
+ import api from '@api/qualityControl.js';
|
|
|
import config from '@api/config.js';
|
|
|
export default {
|
|
|
name: 'QualityControlTemp',
|
|
|
data: function() {
|
|
|
return {
|
|
|
list: [],
|
|
|
- tagTypes: [],
|
|
|
- Adscriptions: [],
|
|
|
- tagTypesList:[],
|
|
|
+ hospitalList: [],
|
|
|
searched: false,
|
|
|
filter: {
|
|
|
- tagType: [], //标签类型
|
|
|
- controlType: [],
|
|
|
- tagAdscription: '', //标签归属
|
|
|
- tagSysName: '', //标签系统名称
|
|
|
+ modeName: '', //模板名称
|
|
|
+ modeId: [],//模板Id
|
|
|
+ hospitalName: '', //所属医院
|
|
|
},
|
|
|
currentPage: 1,
|
|
|
pageSize: config.pageSize,
|
|
@@ -123,10 +119,7 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getDropList().then(() => {
|
|
|
- this.getDataList()
|
|
|
- })
|
|
|
-
|
|
|
+ this.getDataList()
|
|
|
},
|
|
|
watch: {
|
|
|
'filter': {
|
|
@@ -152,17 +145,6 @@
|
|
|
getValue(val) {
|
|
|
console.log('changeVal', val, this.filter.tagAdscription)
|
|
|
},
|
|
|
- getDropList() {
|
|
|
- return api.getDropList().then((res) =>{
|
|
|
- if(res.data.code === '0') {
|
|
|
- this.Adscriptions = res.data.data[1];
|
|
|
- this.tagTypes = res.data.data[6];
|
|
|
- this.tagTypes = this.tagTypes.filter(item => item.val != 0) //去掉名称为默认值的填写单类型
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
getDataList(isTurnPage) {
|
|
|
const param = this.getFilterItems(isTurnPage);
|
|
|
this.searched = true;
|
|
@@ -172,23 +154,11 @@
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
});
|
|
|
- api.getTagList(param).then((res) => {
|
|
|
+ console.log('param',param)
|
|
|
+ api.getQCTemplist(param).then((res) => {
|
|
|
loading.close()
|
|
|
- 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].controlType == this.tagTypes[j].val) {
|
|
|
- list[i].tagTypeCn = this.tagTypes[j].name;
|
|
|
- }
|
|
|
- }
|
|
|
- //后台数据typeCn转换为筛选中对应的字段名称
|
|
|
- for (var z = 0; z < this.Adscriptions.length; z++) {
|
|
|
- if(list[i].type == this.Adscriptions[z].val) {
|
|
|
- list[i].typeCn = this.Adscriptions[z].name;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.list = list;
|
|
|
+ console.log('res.', res)
|
|
|
+ // this.list = list;
|
|
|
this.total = res.data.data.total;
|
|
|
if(this.inCurrentPage!==undefined){
|
|
|
this.currentPage=this.inCurrentPage;
|
|
@@ -258,13 +228,12 @@
|
|
|
if(isTurnPage&&!this.searched){
|
|
|
this.clearFilter();
|
|
|
};
|
|
|
+ const {modeName, modeId, hospitalName} = this.filter
|
|
|
const param = {
|
|
|
- tagTypeList: [1],
|
|
|
+ name: modeName,
|
|
|
current: this.inCurrentPage||this.currentPage,
|
|
|
size: this.pageSize,
|
|
|
- type: this.filter.tagAdscription,
|
|
|
- tagName: this.filter.tagSysName.trim(),
|
|
|
- controlTypeList: this.filter.controlType[0] ? this.filter.controlType: []
|
|
|
+ modeId: hospitalName,
|
|
|
};
|
|
|
return param;
|
|
|
},
|