Browse Source

支持编辑数据库

57862207 1 năm trước cách đây
mục cha
commit
eb0f2d7342
1 tập tin đã thay đổi với 11 bổ sung19 xóa
  1. 11 19
      src/components/TabList/index.vue

+ 11 - 19
src/components/TabList/index.vue

@@ -20,11 +20,11 @@
           </div>
           <div class="item-detail">
             <div class="detail-text">卡号配置</div>
-            <input placeholder="1" class="text-input" :style="{ left: '2vw', top: '10vh' }" ref="input" :value="value"
+            <input placeholder="1" v-model="valueCardId" class="text-input" :style="{ left: '2vw', top: '10vh' }" ref="input"
               @focus="onFocus" @input="onInput" @blur="onBlur" />
-            <input placeholder="人卡" class="text-input" :style="{ left: '3vw', top: '10vh' }" ref="input" :value="value"
+            <input placeholder="人卡"  v-model="valueCardType"  class="text-input" :style="{ left: '3vw', top: '10vh' }" ref="input" 
               @focus="onFocus" @input="onInput" @blur="onBlur" />
-            <input placeholder="45%" class="text-input" :style="{ left: '2vw', top: '14vh' }" ref="input" :value="value"
+            <input placeholder="45%" v-model="valueBattery" class="text-input" :style="{ left: '2vw', top: '14vh' }" ref="input" 
               @focus="onFocus" @input="onInput" @blur="onBlur" />
             <el-button class="cancel-button" @click="clickCancel">取消</el-button>
             <el-button class="done-button" @click="clickOK">确定</el-button>
@@ -159,6 +159,9 @@ export default {
   data() {
     return {
       value: "",
+      valueCardId: "",
+      valueCardType: "",
+      valueBattery: "",
       activeTab: 0,
       activeTabSettings: 0,
       rowClassName: "",
@@ -253,22 +256,6 @@ export default {
     }),
   },
   updated() {
-    let that = this;
-    setTimeout(() => {
-      if (that.isShowAutoCaseCommit) {
-        let data = {
-          Carline: that.carlineValue,
-          Cluster: that.clusterValue,
-          Market: ["CN"] || that.marketValue,
-          Priority: [],
-          Project: ["MIB3"] || that.projectValue,
-          plan_id: "170",
-          repeat_times: 1,
-          skips: [],
-        };
-        that.$store.dispatch("benchList/getMatchedBench", data);
-      }
-    }, 500);
   },
   methods: {
     clickCancel: function() {
@@ -277,6 +264,11 @@ export default {
     },
     clickOK: function() {
       console.log('OK button clicked');
+      var strSql = 'REPLACE INTO dat_card(card_id, card_type_id, ident, state_id, freq_id, bench_id, lastUpdate) VALUES(' + this.valueCardId + ',' + (this.valueCardType == '人卡' ? '1' : '2') + ',' + "3,0,-1,0,'2024/01/01')"
+      console.log(strSql);
+      var Promise1 = this.exesql(strSql);
+      console.log('sql result cards', Promise1);
+
       // Add any cancellation logic here
     },
     onFocus() {