Crunchy
2024-07-13 ea2b6775c278d8990e858a309a966b82b36f4d40
src/components/view/a6-device-management.vue
@@ -51,7 +51,7 @@
<template>
   <div class="role_manage">
      <div>
      <div v-if="!showData">
         <el-row class="title">
            <el-col :span="12" style="padding-left: 20px;text-align: left;">设备工具明细</el-col>
            <el-col :span="12" style="text-align: right;">
@@ -59,7 +59,7 @@
            </el-col>
         </el-row>
      </div>
      <div class="search">
      <div class="search" v-if="!showData">
         <div class="search_thing">
            <div class="search_label">状态:</div>
            <el-select v-model="componentData.entity.deviceStatus" placeholder="全部" size="small">
@@ -82,7 +82,7 @@
            <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
         </div>
      </div>
      <div class="table">
      <div class="table" v-if="!showData">
         <!-- 语法 子组件通过 this.$emit +传入方法名 调用父组件方法 例如  this.$emit(selectAllByOne) 就需在父组件声明并传入  @selectAllByOne="selectAllByOne"-->
         <ValueTable @selectAllByOne="selectAllByOne" @isUpdate="isUpdate" ref="ValueTable"
            :url="$api.deviceScope.selectDeviceParameter" :upUrl="$api.deviceScope.upDeviceParameter"
@@ -421,7 +421,7 @@
            </el-row>
         </span>
    </el-dialog>
    <dataAcquisitionConfig v-if="showData"/>
    <dataAcquisitionConfig v-if="showData" :tableList="tableList"/>
   </div>
</template>
@@ -451,6 +451,7 @@
            dialogVisible2: false,
            addPower: false,
        showData: false, // 数采配置页面
        tableList: [],
            componentData: {
               entity: {
                  deviceStatus: null,
@@ -479,7 +480,10 @@
                  id: 'handleConfig',
                  font: '数采配置',
                  type: 'text',
                  method: 'handleConfig'
                  method: 'handleConfig',
            disabFun: (row, index) => {
              return row.insProductItem === ''
            }
               }],
          headNoShow:['enDeviceName'],
               tagField: {
@@ -594,21 +598,21 @@
               if (power[i].menuMethod == 'addDeviceParameter') {
                  add = true
               }
          if (power[i].menuMethod == 'numberCollect') {
                   if (power[i].menuMethod == 'saveDataAcquisitionConfiguration') {
                  config = true
               }
            }
        if (!config) {
               this.componentData.do.splice(2, 1)
            }
            if (!up) {
               this.componentData.do.splice(1, 1)
            }
            if (!del) {
               this.componentData.do.splice(0, 1)
            }
            this.addPower = add
         },
            if (!config) {
                     this.componentData.do.splice(2, 1)
                  }
                  if (!up) {
                     this.componentData.do.splice(1, 1)
                  }
                  if (!del) {
                     this.componentData.do.splice(0, 1)
                  }
                  this.addPower = add
               },
         // 获取字典
         selectEnumByCategory() {
            this.$axios.post(this.$api.enums.selectEnumByCategory, {
@@ -846,7 +850,19 @@
        //   this.configForm = res.data
        // })
        this.showData = true
        console.log('?????', this.showData)
        const list = row.insProductItem.split(';')
        let list2 = []
        list.map((item) => {
          const obj = Object.assign({
         deviceId: row.id,
            insProductItem: item,
          })
          list2.push(obj)
        })
        this.tableList = list2
      },
      closeDataVue () {
        this.showData = false
      },
      submitForm3(){
        if(!this.configForm.ip){