瀏覽代碼

Merge remote-tracking branch 'origin/bugfix' into bugfix

zhouna 5 年之前
父節點
當前提交
cedd91205a

+ 2 - 2
src/api/config.js

@@ -1,5 +1,5 @@
-// const testUrl = 'http://223.93.170.82:23650'
-const testUrl = ''
+const testUrl = 'http://223.93.170.82:23650'
+// const testUrl = ''
 
 
 export default {
 export default {
   host:'http://192.168.2.241:5050',
   host:'http://192.168.2.241:5050',

+ 1 - 0
src/components/preTreat/AddSimpleQuestion.vue

@@ -24,6 +24,7 @@
                     :sexType="dataPub.region7"
                     :sexType="dataPub.region7"
                     :type="dataPub.region2"
                     :type="dataPub.region2"
                     @pushValues="pushValues"
                     @pushValues="pushValues"
+                    :hasId="editData.id||''"
                     :options="editData.questionDetailList"></PubSelect>
                     :options="editData.questionDetailList"></PubSelect>
             <div class="btn">
             <div class="btn">
                 <el-button
                 <el-button

+ 14 - 1
src/components/preTreat/PubSelect.vue

@@ -255,7 +255,7 @@ import Vue from "vue";
 const initRow = { orderNo: 0, name: "", description: "", exclusion: 0 };
 const initRow = { orderNo: 0, name: "", description: "", exclusion: 0 };
 const initRows = utils.getInitRow(initRow, 4);
 const initRows = utils.getInitRow(initRow, 4);
 export default {
 export default {
-  props: ["type", "options", "ascription", "sexType"],
+  props: ["type", "options", "ascription", "sexType","hasId"],
   data() {
   data() {
     return {
     return {
       rows: [...initRows],
       rows: [...initRows],
@@ -380,6 +380,9 @@ export default {
           ids=ids.concat(it.subQuestion.split(','))
           ids=ids.concat(it.subQuestion.split(','))
         }
         }
       });
       });
+      if(this.hasId!=''){
+        ids.push(this.hasId)
+      }
       let param = {
       let param = {
         tagName: this.searchVal.trim(),
         tagName: this.searchVal.trim(),
         type: this.ascription,
         type: this.ascription,
@@ -401,6 +404,16 @@ export default {
       this.rows = [...utils.getInitRow(initRow, 4)];
       this.rows = [...utils.getInitRow(initRow, 4)];
     },
     },
     addRow() {
     addRow() {
+      if(this.type == 3){
+        if(this.rows.length>5){
+          this.$message({
+            message: "多列填写类型最多添加6个选项",
+            type: "warning",
+            showClose: true
+          });
+          return
+        }
+      }
       this.rows.push(Object.assign({}, initRow, { orderNo: this.rows.length }));
       this.rows.push(Object.assign({}, initRow, { orderNo: this.rows.length }));
     },
     },
     selectRow(index, name) {
     selectRow(index, name) {

+ 0 - 1
src/components/preTreat/QuestionTagGroup.vue

@@ -276,7 +276,6 @@ export default {
               return ;
               return ;
             }
             }
             this.rightTagsList.push(...this.selectLeftTagsList);
             this.rightTagsList.push(...this.selectLeftTagsList);
-
             for (let i = 0; i < this.rightTagsList.length; i++) {
             for (let i = 0; i < this.rightTagsList.length; i++) {
                 this.leftTagsList = this.leftTagsList.filter(item => item.id !== this.rightTagsList[i].id)
                 this.leftTagsList = this.leftTagsList.filter(item => item.id !== this.rightTagsList[i].id)
             }
             }