|
@@ -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值存储
|
|
|
}
|
|
|
},
|
|
|
})
|