Kaynağa Gözat

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

chenrui  3 yıl önce
ebeveyn
işleme
48c6ab5ac2

+ 2 - 2
src/views/systemSettings/views/machineManagement/machineHome.vue

@@ -237,11 +237,11 @@ export default {
     },
     // 确认删除
     async removeSubmit() {
-      this.ruleForm["operate"] = "3";
+      this.rmObj["operate"] = "3";
       try {
         const res = await GeneralDataReception({
           serviceId: "2",
-          dataContent:  JSON.stringify(this.ruleForm),
+          dataContent:  JSON.stringify(this.rmObj),
         });
         if (res.code === "0") {
           this.removeDialogVisible = false;

+ 20 - 10
src/views/systemSettings/views/targetDataManagement/targetDataHome.vue

@@ -20,17 +20,17 @@
       </div>
       <div class="targetData-content">
         <el-row :gutter="24">
-          <el-col v-for="item in dataList" :key="item.protocolId" :span="4">
+          <el-col v-for="item in dataList" :key="item.targetdataID" :span="4">
             <div class="grid-content">
               <div class="grid-content-hand flex">
                 <div class="title flex-wrap">
-                  <div class="name">{{ item.protocolName }}</div>
+                  <div class="name">{{ item.tdataName }}</div>
                   <i class="loger" @click="showEditDialog(item)" />
                 </div>
                 <i class="el-icon-close icon" @click="showRemoveDialog(item)" />
               </div>
               <div class="dataType">
-                <span>字符串</span>
+                <span>{{item.datatype}}</span>
               </div>
             </div>
           </el-col>
@@ -41,7 +41,7 @@
         <div class="airportInfoDialog">
           <div class="Deltitle">删除协议</div>
           <div class="content er">
-            <div class="log">是否确认删除{{ rmObj.protocolName }}?</div>
+            <div class="log">是否确认删除{{ rmObj.tdataName }}?</div>
           </div>
           <div class="DelFoot right t30">
             <el-button
@@ -78,14 +78,24 @@ export default {
     };
   },
   created() {
-    for (let index = 0; index < 20; index++) {
-      this.dataList.push({
-        protocolId: index,
-        protocolName: "BSM报文-" + (Math.floor(Math.random() * 20) + 1),
-      });
-    }
+    this.getList()
   },
   methods: {
+    async getList() {
+      try {
+        const res = await Query({
+          id: 7,
+          dataContent: []
+        });
+        if (res.code === "0") {
+            this.dataList = res.returnData
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
+      }
+    },
     showAdd(){
       this.$router.push('/systemSettings/targetDataEdit')
     },