瀏覽代碼

筛选条件修改

snafm0 6 年之前
父節點
當前提交
191b9cb56a
共有 1 個文件被更改,包括 21 次插入11 次删除
  1. 21 11
      src/components/diagBase/QuestionWords.vue

+ 21 - 11
src/components/diagBase/QuestionWords.vue

@@ -8,9 +8,9 @@
                 <el-form-item label="问题词:">
                     <el-input size="mini" v-model="filter.questionName" placeholder="问题词" clearable></el-input>
                 </el-form-item>
-                <el-form-item label="问题词归属:">
-                    <el-select size="mini" v-model="filter.questionType" @change="getValue"  placeholder="问题词归属" clearable>
-                        <el-option v-for="item in Adscriptions" :label="item.name" :value="item.val" :key="item.id" ></el-option>
+                <el-form-item label="类型:">
+                    <el-select size="mini" v-model="filter.type" @change="getValue"  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>
                 <el-form-item>
@@ -47,10 +47,15 @@
                     prop="questionName"
                     label="问题词">
                 </el-table-column>
+                <el-table-column
+                        :resizable = "false"
+                        prop="typeNm"
+                        label="类型">
+                </el-table-column>
                 <el-table-column
                     :resizable = "false"
                     prop="typeCn"
-                    label="问题词归属">
+                    label="类型">
                 </el-table-column>
                 <el-table-column
                     :resizable = "false"
@@ -91,7 +96,8 @@ export default {
                 disName: '', //诊断名称
                 questionCode: "",//问题词
                 questionName: "",//问题词
-                questionType: ""//问题词归属
+                questionType: "",//问题词归属
+                type:""
             },
             currentPage: 1,
             pageSize: 10,
@@ -129,7 +135,7 @@ export default {
                     let tmpLis = res.data.data[4]
                     // this.Adscriptions = tmpLis.filter(item => item.val);
                     this.Adscriptions = tmpLis;
-                    // this.tagTypes =  res.data.data[4];
+                    this.tagTypes =  res.data.data[2];
                     // for (var i = 0; i < this.tagTypes.length; i++) {
                     //     this.tagTypesList.push(this.tagTypes[i].val)
                     // }
@@ -148,7 +154,11 @@ export default {
                             list[i].typeCn = this.Adscriptions[z].name
                         }
                     }
-                   
+                    for (var m =  0; m < this.tagTypes.length; m++) {
+                        if(list[i].type == this.tagTypes[m].val) {
+                            list[i].typeNm = this.tagTypes[m].name
+                        }
+                    }
                 }
                 this.list = list;
                 this.total = res.data.data.total;
@@ -160,9 +170,9 @@ export default {
         },
         addTagGroup() {
           const data = {
-            disName: this.filter.disName||'',
-            question: this.filter.questionName||'',
-            type: this.filter.questionType||''
+            disName: this.filter.disName,
+            question: this.filter.questionName,
+            type: this.filter.questionType
           };
           api.exportDiagnosticBasis(data).then((res) => {
               utils.downloadExportedData(res.data,'问题词.xls')
@@ -178,7 +188,7 @@ export default {
                 size: this.pageSize,
                 disName: this.filter.disName,
                 questionCode: this.filter.questionName,
-                questionType: this.filter.questionType
+                type: this.filter.type
             };
             return param;
         },