Преглед на файлове

10-17 过滤掉时间measureid

allen преди 2 години
родител
ревизия
57dee3b729
променени са 2 файла, в които са добавени 20 реда и са изтрити 6 реда
  1. 10 3
      src/views/modules/visi/create1.vue
  2. 10 3
      src/views/modules/visi/create2.vue

+ 10 - 3
src/views/modules/visi/create1.vue

@@ -270,7 +270,8 @@
       <el-button>取消</el-button>
       <el-button type="primary" @click="stdySubmit(dataInfo) ">确定</el-button>
     </div>
-    <PythonKafkaTmp v-if="pythonKafkaVisible" ref="pythonKafkaTmp" @refreshDataList="getDataList"></PythonKafkaTmp>
+<!--    <PythonKafkaTmp v-if="pythonKafkaVisible" ref="pythonKafkaTmp" @refreshDataList="getDataList"></PythonKafkaTmp>-->
+        <PythonKafkaTmp v-if="pythonKafkaVisible" ref="pythonKafkaTmp" ></PythonKafkaTmp>
   </div>
 </template>
 
@@ -774,7 +775,7 @@ export default {
             key: 0,
             prop: 'time',
             label: '时间',
-            measurepointId: Math.floor(Math.random() * 10000 + 1)
+            measurepointId: 'time' + Math.floor(Math.random() * 10000 + 1)
           }], // 数据库的字段名
           icon: 'icon iconfont icon-xitong1', // 图标
           sql: {
@@ -1122,8 +1123,14 @@ export default {
     // 获取代码模板
     getPythonKafkaTmp () {
       this.pythonKafkaVisible = true
+      var info = []
+      for (const meas of this.measurepoint) {
+        if (meas.indexOf('time') === -1) {
+          info.push(meas)
+        }
+      }
       this.$nextTick(() => {
-        this.$refs.pythonKafkaTmp.init(this.measurepoint.join())
+        this.$refs.pythonKafkaTmp.init(info.join())
       })
     },
     getCoal (resolve) {

+ 10 - 3
src/views/modules/visi/create2.vue

@@ -241,7 +241,8 @@
       <el-button >取消</el-button>
       <el-button type="primary" @click="dySubmit(dataInfo) " >确定</el-button>
     </div>
-    <PythonKafkaTmp v-if="pythonKafkaVisible" ref="pythonKafkaTmp" @refreshDataList="getDataList"></PythonKafkaTmp>
+<!--    <PythonKafkaTmp v-if="pythonKafkaVisible" ref="pythonKafkaTmp" @refreshDataList="getDataList"></PythonKafkaTmp>-->
+    <PythonKafkaTmp v-if="pythonKafkaVisible" ref="pythonKafkaTmp" ></PythonKafkaTmp>
   </div>
 </template>
 
@@ -565,7 +566,7 @@ export default {
             key: 0,
             prop: 'time',
             label: '时间',
-            measurepointId: Math.floor(Math.random() * 10000 + 1)
+            measurepointId: 'time' + Math.floor(Math.random() * 10000 + 1)
           }], // 数据库的字段名
           icon: 'icon iconfont icon-xitong1', // 图标
           sql: {
@@ -829,8 +830,14 @@ export default {
     // 获取代码模板
     getPythonKafkaTmp () {
       this.pythonKafkaVisible = true
+      var info = []
+      for (const meas of this.measurepoint) {
+        if (meas.indexOf('time') === -1) {
+          info.push(meas)
+        }
+      }
       this.$nextTick(() => {
-        this.$refs.pythonKafkaTmp.init(this.measurepoint.join())
+        this.$refs.pythonKafkaTmp.init(info.join())
       })
     },