Przeglądaj źródła

Merge branch 'master' of http://47.111.81.118:3000/xf15575941817/admin-fiveFollowing

ming 3 lat temu
rodzic
commit
1b5e5055f7

+ 2 - 2
public/static/config.js

@@ -1,7 +1,7 @@
 // api 请求路径
 var PLATFROM_CONFIG = {};
-PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
-// PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/"  //超博本地
+// PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
+PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/"  //超博本地
 
 // PLATFROM_CONFIG.baseUrl = "https://wx.ewoogi.com/api" //线上
 PLATFROM_CONFIG.fileUrl = "https://wx.ewoogi.com/file/" //xlsx文件访问路径

+ 12 - 2
src/api/deviceManage/powerEquip/deviceAttribute.js

@@ -21,7 +21,7 @@ export function deviceNewsAdd(params) {
   return request({
     url: '/deviceAttribute/deviceNewsAdd',
     method: 'POST',
-    data:params,
+    data: params,
   })
 }
 
@@ -29,7 +29,7 @@ export function deviceNewsUpdate(params) {
   return request({
     url: '/deviceAttribute/deviceNewsUpdate',
     method: 'POST',
-    data:params,
+    data: params,
   })
 }
 
@@ -41,3 +41,13 @@ export function deviceNewsDel(params) {
   })
 }
 
+export function variableList(params) {
+  return request({
+    url: '/deviceAnalogVariableList/variableList',
+    method: 'GET',
+    params,
+  })
+}
+
+
+

+ 45 - 329
src/views/deviceManage/powerEquip/deviceDetails.vue

@@ -64,7 +64,7 @@
       label="电能质量分析"
       width=""
     ></el-table-column>
-    <el-table-column fixed="right" label="操作" width="150">
+    <el-table-column label="操作" width="150">
       <template #default="scope">
         <el-button
           type="text"
@@ -91,7 +91,7 @@
         </el-popconfirm>
       </template>
     </el-table-column>
-    <el-table-column fixed="right" label="变量" width="180">
+    <el-table-column label="变量" width="180">
       <template #default="scope">
         <el-button
           type="text"
@@ -102,7 +102,7 @@
           变量列表
         </el-button>
         <el-button
-          @click="clone(scope.$index, scope.row)"
+          @click="clone(scope.row)"
           type="text"
           size="small"
           style="color: #409eff"
@@ -114,7 +114,7 @@
   </el-table>
   <div class="listPagination1">
     <el-pagination
-      v-model:currentPage="currentPage3"
+      v-model:currentPage="currentPage"
       :page-sizes="[15, 20, 25, 30]"
       :page-size="15"
       layout="total, sizes, prev, pager, next, jumper"
@@ -125,207 +125,17 @@
     ></el-pagination>
   </div>
 
-  <!-- 克隆 -->
-  <el-dialog
-    v-model="cloneDialog"
-    title="变量克隆"
-    width="30rem"
-    :before-close="cloneHandleClose"
-  >
-    <div class="dialogOne">
-      <div>
-        克隆设备对象:
-        <span>183</span>
-      </div>
-      <div class="content">
-        <span>*</span>
-        变量克隆至:
-        <el-radio v-model="cloneRadio" label="1">新设备</el-radio>
-        <el-radio v-model="cloneRadio" label="2">已有设备</el-radio>
-      </div>
-      <div class="content">
-        <span>*</span>
-        设备名:
-        <el-input
-          class="inputer"
-          v-model="cloneInputName"
-          placeholder="请输入设备名"
-          clearable
-        />
-        设备编号:
-        <el-input
-          class="inputer"
-          v-model="cloneInputCode"
-          placeholder="请输入设备编号"
-          clearable
-        />
-      </div>
-      <div class="content">
-        <span>*</span>
-        模拟量:
-        <el-input
-          class="inputer"
-          v-model="cloneInputModel"
-          placeholder="请输入模拟量"
-          clearable
-        />
-        状态量:
-        <el-input
-          class="inputer"
-          v-model="cloneInputState"
-          placeholder="请输入状态量"
-          clearable
-        />
-      </div>
-    </div>
-    <template #footer>
-      <span class="dialog-footer">
-        <el-checkbox
-          v-model="cloneChecked"
-          label="连续克隆模式"
-          style="margin-right: 10px"
-        ></el-checkbox>
-        <el-button @click="cloneDialog = false">取消</el-button>
-        <el-button type="primary" @click="cloneDialog = false">确定</el-button>
-      </span>
-    </template>
-  </el-dialog>
-
-  <!-- 变量列表 -->
-  <el-dialog
-    v-model="listDialog"
-    :title="listTitleDialog + '的变量列表'"
-    width="70rem"
-    :before-close="listHandleClose"
-  >
-    <div class="dialogOne" style="overflow: hidden">
-      <el-radio-group
-        v-model="listTabPosition"
-        @change="listTabsChange(listTabPosition)"
-        style="margin-bottom: 15px; display: flex"
-      >
-        <el-radio-button label="model">模拟量</el-radio-button>
-        <el-radio-button label="state">状态量</el-radio-button>
-        <el-radio-button label="parameter">参数量</el-radio-button>
-        <div style="margin-left: 10px">
-          <el-button icon="el-icon-plus" type="success">新增</el-button>
-          <el-button type="danger" icon="el-icon-delete">删除</el-button>
-        </div>
-      </el-radio-group>
+  <clone-Dialog
+    :clone_Dialog="cloneDialogBool"
+    @closeNo="closeNo"
+    :DialogArray="DialogArray"
+  ></clone-Dialog>
 
-      <el-input
-        placeholder="搜索变量或编码"
-        v-model="listInputText"
-        style="width: 15rem; margin-bottom: 15px"
-      >
-        <template #suffix>
-          <i class="el-icon-search el-input__icon"></i>
-        </template>
-      </el-input>
-
-      <el-table
-        :data="
-          listNumberData.filter(
-            (data) =>
-              !listInputText ||
-              data.varName
-                .toLowerCase()
-                .includes(listInputText.toLowerCase()) ||
-              data.varCoding.toLowerCase().includes(listInputText.toLowerCase())
-          )
-        "
-        border
-        stripe
-        :header-cell-style="headClass"
-        @selection-change="listSelectionChange"
-      >
-        <el-table-column type="selection" width="55" />
-        <el-table-column
-          type="index"
-          label="序号"
-          sortable
-          width=""
-        ></el-table-column>
-        <el-table-column
-          prop="varName"
-          label="变量名"
-          sortable
-          width=""
-        ></el-table-column>
-        <el-table-column
-          prop="varCoding"
-          label="变量编码"
-          sortable
-          width=""
-        ></el-table-column>
-        <el-table-column
-          prop="signalDevice"
-          label="通信设备"
-          sortable
-          width=""
-        ></el-table-column>
-        <el-table-column
-          prop="dataAdd"
-          label="数据地址"
-          sortable
-          width=""
-        ></el-table-column>
-        <el-table-column
-          prop="dataType"
-          label="数据类型"
-          width=""
-        ></el-table-column>
-        <el-table-column
-          prop="coefficient"
-          label="系数"
-          width=""
-        ></el-table-column>
-        <el-table-column
-          prop="saveCycle"
-          label="存盘周期"
-          width=""
-        ></el-table-column>
-        <el-table-column fixed="right" label="操作" width="">
-          <template #default="scope">
-            <el-button
-              type="text"
-              size="small"
-              style="color: #409eff"
-              @click.prevent="listUpdate(scope.row)"
-            >
-              修改
-            </el-button>
-            <el-button
-              @click="listDelete(scope.$index, scope.row)"
-              type="text"
-              size="small"
-              style="color: red"
-            >
-              删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <div class="listPagination">
-        <el-pagination
-          v-model:currentPage="currentPage4"
-          :page-sizes="[15, 20, 25, 30]"
-          :page-size="15"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listNumberData.length"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          background
-        ></el-pagination>
-      </div>
-    </div>
-    <template #footer>
-      <span class="dialog-footer">
-        <el-button @click="listDialog = false">关闭</el-button>
-      </span>
-    </template>
-  </el-dialog>
+  <list-Dialog
+    :list_Dialog="listDialogBool"
+    @closeNo="closeNo"
+    :DialogArray="DialogArray"
+  ></list-Dialog>
 </template>
 
 <script>
@@ -333,49 +143,16 @@ import { useStore } from 'vuex'
 import { defineComponent, onMounted, ref, watchEffect } from 'vue'
 import * as api from '@/api/deviceManage/powerEquip/deviceAttribute'
 import { ElMessage } from 'element-plus'
-
-//克隆弹窗基础数据定义
-const cloneData = () => {
-  const cloneDialog = ref(false) //克隆弹窗控制
-  const cloneChecked = ref(false) //克隆复选框控制
-  const cloneRadio = ref('1') //克隆单选框控制
-  const cloneInputName = ref('') //克隆input名
-  const cloneInputCode = ref('') //克隆input编号
-  const cloneInputModel = ref('') //克隆input模拟量
-  const cloneInputState = ref('') //克隆input状态量
-
-  //克隆弹窗控制方法回调
-  const cloneHandleClose = (done) => {
-    done()
-    //   ElMessageBox.confirm("确定要关闭弹出?").then(() => { done();}).catch(() => {// catch error});
-  }
-  return {
-    cloneDialog,
-    cloneChecked,
-    cloneRadio,
-    cloneInputName,
-    cloneInputCode,
-    cloneHandleClose,
-    cloneInputModel,
-    cloneInputState,
-  }
-}
-//变量列表弹窗基础数据定义
-const listData = () => {
-  const listDialog = ref(false)
-  const listTitleDialog = ref()
-  const listHandleClose = (done) => {
-    done()
-  }
-  const listTabPosition = ref('model')
-
-  return { listDialog, listHandleClose, listTitleDialog, listTabPosition }
-}
+import cloneDialog from './powerDialog/cloneDialog.vue'
+import listDialog from './powerDialog/listDialog.vue'
 
 export default defineComponent({
   name: 'powerEquip',
-  components: {},
-  emits: ['updateRow'],
+  components: {
+    cloneDialog,
+    listDialog,
+  },
+  emits: ['updateRow', 'closeNo'],
   props: {
     filter_Text: String,
     Height: String,
@@ -383,42 +160,26 @@ export default defineComponent({
   },
   setup(props, { emit }) {
     const store = useStore()
-    const deviceNumData = ref([]);//列表查询值存储
-    const multipleSelection=ref([]);//变量列表弹窗复选框值存储
-
-    const {
-      cloneDialog,
-      cloneChecked,
-      cloneRadio,
-      cloneInputName,
-      cloneInputCode,
-      cloneHandleClose,
-      cloneInputModel,
-      cloneInputState,
-    } = cloneData()
+    const deviceNumData = ref([]) //列表查询值存储
 
-    const { listDialog, listHandleClose, listTitleDialog, listTabPosition } =
-      listData()
-
-    //变量列表弹窗table 复选框change事件
-    const listSelectionChange = (val) => {
-      multipleSelection.value = val
-    }
-    //变量列表弹窗tabs切换change事件
-    const listTabsChange = (value) => {
-      console.log(value)
-    }
+    const cloneDialogBool = ref(false)
+    const listDialogBool = ref(false)
+    const DialogArray = ref([])
 
     //变量列表
     const variableList = (row) => {
-      listTitleDialog.value = 183
-      listDialog.value = true
-      console.log(row)
+      DialogArray.value = row
+      listDialogBool.value = true
     }
     //克隆
-    const clone = (index, row) => {
-      this.cloneDialog = true
-      console.log(index, row)
+    const clone = (row) => {
+      DialogArray.value = row
+      cloneDialogBool.value = true
+    }
+    //克隆弹窗关闭
+    const closeNo = (value) => {
+      listDialogBool.value = value
+      cloneDialogBool.value = value
     }
 
     //是否删除  ---- 是
@@ -433,7 +194,7 @@ export default defineComponent({
     function listSelect() {
       api.deviceNewsList({ siteId: store.state.siteId }).then((requset) => {
         if (requset.status === 'SUCCESS') {
-          deviceNumData.value = requset.data
+          deviceNumData.value = requset.data.records
         } else {
           ElMessage.error(requset.msg)
         }
@@ -465,82 +226,37 @@ export default defineComponent({
         listSelect()
       }
     })
-
     onMounted(() => {
       listSelect()
     })
-    // 表头样式设置
-    const headClass = () => {
-      return 'background:#FAFAFA !important;color: black;'
-    }
-
-    const handleSizeChange = (val) => {
-      console.log(`${val} items per page`)
-    }
-    const handleCurrentChange = (val) => {
-      console.log(`current page: ${val}`)
-    }
-
     const handleSizeChange1 = (val) => {
       console.log(`${val} items per page`)
     }
     const handleCurrentChange1 = (val) => {
       console.log(`current page: ${val}`)
     }
+    // 表头样式设置
+    const headClass = () => {
+      return 'background:#FAFAFA !important;color: black;'
+    }
     return {
       headClass,
       clone, //克隆按钮事件
+      closeNo, //克隆弹窗关闭事件
       variableList, //变量列表按钮事件
       editRow, //编辑按钮事件
       handleDelete, //删除按钮事件
-      listSelectionChange, //变量列表
-      listTabsChange, //变量列表tabs切换
       deviceNumData, //列表查询值存储
       confirmEvent, //确定是否删除事件
       cancelEvent,
+      currentPage: ref(1),
 
-      cloneDialog,
-      cloneChecked,
-      cloneHandleClose,
-      cloneRadio,
-      cloneInputName,
-      cloneInputCode,
-      cloneInputModel,
-      cloneInputState,
+      cloneDialogBool,
+      DialogArray,
+      listDialogBool,
 
-      listDialog,
-      listHandleClose,
-      listTitleDialog,
-      listTabPosition,
-      currentPage4: ref(15),
-      currentPage3: ref(15),
-      handleSizeChange,
-      handleCurrentChange,
       handleSizeChange1,
       handleCurrentChange1,
-
-      listInputText: ref(''), //变量列表input搜索框
-      multipleSelection, //变量列表弹窗复选框值存储
-      listNumberData: ref([
-        {
-          varName: 'A相电压',
-          varCoding: 'bgbsk_183_Us',
-          signalDevice: '嘉定区竞园新区六里村委(综合用房)',
-          dataAdd: 'YC[o]',
-          dataType: '4字节浮点4321',
-          coefficient: 0.001,
-          saveCycle: '5分钟',
-        },
-        {
-          varName: 'A相电压',
-          varCoding: 'bgbsk_183_Us',
-          signalDevice: '嘉定区竞园新区六里村委(综合用房)',
-          dataAdd: 'YC[o]',
-          dataType: '4字节浮点4321',
-          coefficient: 0.001,
-          saveCycle: '5分钟',
-        },
-      ]), //变量列表弹窗table值存储
     }
   },
 })

+ 1 - 6
src/views/deviceManage/powerEquip/index.vue

@@ -150,12 +150,6 @@ export default defineComponent({
     channelList,
   },
   props: {},
-  data() {
-    return {
-      insertDialog_: false, //新增弹窗控制
-      dialogTitle: '',
-    }
-  },
   setup() {
     const store = useStore()
     const tableData = ref([])
@@ -193,6 +187,7 @@ export default defineComponent({
     const update = (row) => {
       datalist.value = [
         {
+          id: row.id,
           monitorDeviceCode: row.monitorDeviceCode,
           monitorDeviceName: row.monitorDeviceName,
           loopMeterAddress: row.loopMeterAddress,

+ 156 - 0
src/views/deviceManage/powerEquip/powerDialog/cloneDialog.vue

@@ -0,0 +1,156 @@
+<template>
+  <!-- 克隆 -->
+  <el-dialog
+    v-model="cloneDialog"
+    title="变量克隆"
+    width="30rem"
+    @close="close"
+    @open="open"
+  >
+    <div class="dialogOne">
+      <div>
+        克隆设备对象:
+        <span>{{ DialogArray.monitorDeviceName }}</span>
+      </div>
+      <div class="content">
+        <span>*</span>
+        变量克隆至:
+        <el-radio v-model="cloneRadio" label="1">新设备</el-radio>
+        <el-radio v-model="cloneRadio" label="2">已有设备</el-radio>
+      </div>
+      <div class="content">
+        <span>*</span>
+        设备名:
+        <el-input
+          class="inputer"
+          v-model="cloneInputName"
+          placeholder="请输入设备名"
+          clearable
+        />
+        设备编号:
+        <el-input
+          class="inputer"
+          v-model="cloneInputCode"
+          placeholder="请输入设备编号"
+          clearable
+        />
+      </div>
+      <div class="content">
+        <span>*</span>
+        模拟量:
+        <el-input
+          class="inputer"
+          v-model="cloneInputModel"
+          placeholder="请输入模拟量"
+          clearable
+        />
+        状态量:
+        <el-input
+          class="inputer"
+          v-model="cloneInputState"
+          placeholder="请输入状态量"
+          clearable
+        />
+      </div>
+    </div>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-checkbox
+          v-model="cloneChecked"
+          label="连续克隆模式"
+          style="margin-right: 10px"
+        ></el-checkbox>
+        <el-button @click="cloneDialog = false">取消</el-button>
+        <el-button type="primary" @click="cloneDialog = false">确定</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { useStore } from 'vuex'
+import { defineComponent, onMounted, ref, watchEffect } from 'vue'
+import * as api from '@/api/deviceManage/powerEquip/deviceAttribute'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'powerEquip',
+  components: {},
+  emits: ['closeNo'],
+  props: {
+    clone_Dialog: Boolean,
+    DialogArray: Object,
+  },
+  setup(props, context) {
+    const store = useStore()
+    store, api, ElMessage
+
+    const cloneDialog = ref(false) //克隆弹窗控制
+    const cloneChecked = ref(false) //克隆复选框控制
+    const cloneRadio = ref('1') //克隆单选框控制
+    const cloneInputName = ref('') //克隆input名
+    const cloneInputCode = ref('') //克隆input编号
+    const cloneInputModel = ref('') //克隆input模拟量
+    const cloneInputState = ref('') //克隆input状态量
+
+    // open(): Dialog弹窗打开之前做的事
+    const open = () => {
+      console.log('')
+    }
+
+    // close(): Dialog弹窗关闭之后做的事
+    const close = () => {
+      context.emit('closeNo', false)
+      cloneDialog.value = false
+    }
+
+    watchEffect((fn, options) => {
+      fn, options
+      cloneDialog.value = props.clone_Dialog
+    })
+
+    onMounted(() => {
+      console.log('')
+    })
+
+    return {
+      open,
+      close,
+      cloneDialog,
+      cloneChecked,
+      cloneRadio,
+      cloneInputName,
+      cloneInputCode,
+      cloneInputModel,
+      cloneInputState,
+    }
+  },
+})
+</script>
+
+<style lang="scss" scoped>
+//弹出框内容样式
+.dialogOne {
+  div:nth-child(1) {
+    margin-bottom: 30px;
+  }
+  .content {
+    margin-bottom: 20px;
+    span:nth-child(1) {
+      color: red;
+    }
+    .inputer {
+      width: 150px;
+    }
+  }
+}
+.listPagination {
+  margin-top: 15px;
+  margin-bottom: -30px;
+  float: right;
+}
+.listPagination1 {
+  margin-top: 15px;
+  float: right;
+}
+</style>

+ 293 - 0
src/views/deviceManage/powerEquip/powerDialog/listDialog.vue

@@ -0,0 +1,293 @@
+<template>
+  <!-- 变量列表 -->
+  <el-dialog
+    v-model="listDialog"
+    :title="DialogArray.monitorDeviceName + '的变量列表'"
+    width="70rem"
+    @close="close"
+    @open="open"
+  >
+    <div class="dialogOne" style="overflow: hidden">
+      <el-radio-group
+        v-model="listTabPosition"
+        @change="listTabsChange(listTabPosition)"
+        style="margin-bottom: 15px; display: flex"
+      >
+        <el-radio-button label="model">模拟量</el-radio-button>
+        <el-radio-button label="state">状态量</el-radio-button>
+        <el-radio-button label="parameter">参数量</el-radio-button>
+        <div style="margin-left: 10px">
+          <el-button icon="el-icon-plus" type="success">新增</el-button>
+        </div>
+      </el-radio-group>
+
+      <el-input
+        placeholder="搜索变量或编码"
+        v-model="listInputText"
+        style="width: 15rem; margin-bottom: 15px"
+      >
+        <template #suffix>
+          <i class="el-icon-search el-input__icon"></i>
+        </template>
+      </el-input>
+
+      <el-table
+        :data="
+          listNumberData.filter(
+            (data) =>
+              !listInputText ||
+              data.varName
+                .toLowerCase()
+                .includes(listInputText.toLowerCase()) ||
+              data.varCoding.toLowerCase().includes(listInputText.toLowerCase())
+          )
+        "
+        border
+        stripe
+        :header-cell-style="headClass"
+        @selection-change="listSelectionChange"
+      >
+        <el-table-column
+          type="index"
+          label="序号"
+          sortable
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="deviceCode"
+          label="设备编号"
+          sortable
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="variableName"
+          label="变量名"
+          sortable
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="variableCoding"
+          label="变量编码"
+          sortable
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="monitoringEquipment"
+          label="监控设备"
+          sortable
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="communicationEquipment"
+          label="通信设备"
+          sortable
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="dataAddress"
+          label="数据地址"
+          sortable
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="dataType"
+          label="数据类型"
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="coefficient"
+          label="系数"
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="saveCycle"
+          label="存盘周期"
+          width=""
+        ></el-table-column>
+        <el-table-column label="操作" width="150">
+          <template #default="scope">
+            <el-button
+              type="text"
+              size="small"
+              style="color: #409eff"
+              @click.prevent="listUpdate(scope.row)"
+            >
+              修改
+            </el-button>
+            <el-button
+              @click="listDelete(scope.$index, scope.row)"
+              type="text"
+              size="small"
+              style="color: red"
+            >
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="listPagination">
+        <el-pagination
+          v-model:currentPage="currentPage"
+          :page-sizes="[15, 20, 25, 30]"
+          :page-size="pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listNumberData.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          background
+        ></el-pagination>
+      </div>
+    </div>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button @click="close">关闭</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { useStore } from 'vuex'
+import { defineComponent, ref, watchEffect } from 'vue'
+import * as api from '@/api/deviceManage/powerEquip/deviceAttribute'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'powerEquip',
+  emits: ['closeNo'],
+  components: {},
+  props: {
+    list_Dialog: Boolean,
+    DialogArray: Object,
+  },
+  setup(props, context) {
+    const store = useStore()
+    store
+
+    const pageSize = ref(15)
+    const currentPage = ref(1)
+
+    const multipleSelection = ref([]) //变量列表弹窗复选框值存储
+    const listDialog = ref(false)
+    const listTitleDialog = ref()
+    const listTabPosition = ref('model')
+    const listNumberData = ref([]) //变量列表弹窗table值存储
+
+    //变量列表弹窗table 复选框change事件
+    const listSelectionChange = (val) => {
+      multipleSelection.value = val
+    }
+
+    // open(): Dialog弹窗打开之前做的事
+    const open = () => {
+      listSelect()
+    }
+
+    // close(): Dialog弹窗关闭之后做的事
+    const close = () => {
+      context.emit('closeNo', false)
+      listDialog.value = false
+    }
+
+    function listSelect() {
+      const array = props.DialogArray
+      api
+        .variableList({
+          deviceCode: array.monitorDeviceCode,
+          screen: '',
+          size: pageSize.value,
+          current: currentPage.value,
+          //   dataArea:
+          //     listTabPosition.value == 'model'
+          //       ? 1
+          //       : listTabPosition.value == 'state'
+          //       ? 2
+          //       : listTabPosition.value == 'parameter'
+          //       ? 3
+          //       : 0,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            listNumberData.value = requset.data.records
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
+    //变量列表弹窗tabs切换change事件
+    const listTabsChange = (value) => {
+      listTabPosition.value = value
+      listSelect()
+    }
+    //变量列表弹窗 条数切换change事件
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+      listSelect()
+    }
+    //变量列表弹窗 页数切换change事件
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+      listSelect()
+    }
+
+    watchEffect((fn, options) => {
+      fn, options
+      listDialog.value = props.list_Dialog
+    })
+
+    // 表头样式设置
+    const headClass = () => {
+      return 'background:#FAFAFA !important;color: black;'
+    }
+    return {
+      open,
+      close,
+      headClass,
+
+      pageSize,
+      currentPage,
+
+      listSelectionChange, //变量列表
+      listTabsChange, //变量列表tabs切换
+      listDialog,
+      listTitleDialog,
+      listTabPosition,
+      handleSizeChange,
+      handleCurrentChange,
+
+      listInputText: ref(''), //变量列表input搜索框
+      multipleSelection, //变量列表弹窗复选框值存储
+      listNumberData,
+    }
+  },
+})
+</script>
+
+<style lang="scss" scoped>
+//弹出框内容样式
+.dialogOne {
+  div:nth-child(1) {
+    margin-bottom: 30px;
+  }
+  .content {
+    margin-bottom: 20px;
+    span:nth-child(1) {
+      color: red;
+    }
+    .inputer {
+      width: 150px;
+    }
+  }
+}
+.listPagination {
+  margin-top: 15px;
+  margin-bottom: -30px;
+  float: right;
+}
+.listPagination1 {
+  margin-top: 15px;
+  float: right;
+}
+</style>