Эх сурвалжийг харах

Merge branch 'master' of http://120.26.64.82:3000/BFFE/CABaggageData2.0

chenjun 2 жил өмнө
parent
commit
1fc54aceb5

+ 10 - 2
src/components/Table/index.vue

@@ -83,7 +83,7 @@
                       <el-input size="small" :rows="1" type="textarea" v-model="tableForm[item.columnName]"></el-input>
                     </template> -->
                     <template v-else>
-                      <el-input size="small" v-model="tableForm[item.columnName]"></el-input>
+                      <el-input size="small" v-model="tableForm[item.columnName]" @change="inputChangeHandler(item.columnName)"></el-input>
                     </template>
                   </el-form-item>
                 </el-col>
@@ -294,9 +294,17 @@ export default {
       console.log('分页')
     },
     changeSelect(data){
-        this.tableForm[this.tableOptions[data][0].setvalue] = this.tableForm[data];
+      if (this.tableForm[data] === '') {
+        this.tableForm[data] = null
+      }
+      this.tableForm[this.tableOptions[data][0].setvalue] = this.tableForm[data];
       // console.log(this.tableForm)
     },
+    inputChangeHandler(data) {
+      if (this.tableForm[data] === '') {
+        this.tableForm[data] = null
+      }
+    },
     //获取表格数据
     async getQuery () {
       try {