|
|
@ -9,6 +9,16 @@
|
|
|
|
<!-- @keyup.enter.native="handleQuery"-->
|
|
|
|
<!-- @keyup.enter.native="handleQuery"-->
|
|
|
|
<!-- />-->
|
|
|
|
<!-- />-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<el-form-item label="设备名称" prop="deviceCode">
|
|
|
|
|
|
|
|
<el-select v-model="form.deviceCode" placeholder="请选择设备名称" clearable>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in deviceLedgerList"
|
|
|
|
|
|
|
|
:key="item.deviceCode"
|
|
|
|
|
|
|
|
:label="item.productLinedDevice"
|
|
|
|
|
|
|
|
:value="item.deviceCode"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="参数名称" prop="paramName">
|
|
|
|
<el-form-item label="参数名称" prop="paramName">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.paramName"
|
|
|
|
v-model="queryParams.paramName"
|
|
|
@ -82,6 +92,8 @@
|
|
|
|
<el-table v-loading="loading" :data="deviceParamList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table v-loading="loading" :data="deviceParamList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
|
|
|
|
<el-table-column label="产线" align="center" prop="productLineName" v-if="columns[13].visible"/>
|
|
|
|
|
|
|
|
<el-table-column label="设备名称" align="center" prop="deviceName" v-if="columns[6].visible"/>
|
|
|
|
<el-table-column label="参数编号" align="center" prop="paramCode" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="参数编号" align="center" prop="paramCode" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="参数名称" align="center" prop="paramName" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="参数名称" align="center" prop="paramName" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="网络地址" align="center" prop="paramNetwork" v-if="columns[3].visible"/>
|
|
|
|
<el-table-column label="网络地址" align="center" prop="paramNetwork" v-if="columns[3].visible"/>
|
|
|
@ -91,9 +103,12 @@
|
|
|
|
<dict-tag :options="dict.type.param_type" :value="scope.row.paramType"/>
|
|
|
|
<dict-tag :options="dict.type.param_type" :value="scope.row.paramType"/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="设备编号" align="center" prop="deviceCode" v-if="columns[6].visible"/>
|
|
|
|
|
|
|
|
<el-table-column label="读取频率" align="center" prop="readFrequency" v-if="columns[7].visible"/>
|
|
|
|
<el-table-column label="读取频率" align="center" prop="readFrequency" v-if="columns[7].visible"/>
|
|
|
|
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[8].visible"/>
|
|
|
|
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[8].visible">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[9].visible"/>
|
|
|
|
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[9].visible"/>
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[10].visible">
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[10].visible">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
@ -137,6 +152,16 @@
|
|
|
|
<!-- 添加或修改设备参数对话框 -->
|
|
|
|
<!-- 添加或修改设备参数对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
|
|
|
<el-form-item label="设备名称" prop="deviceCode">
|
|
|
|
|
|
|
|
<el-select v-model="form.deviceCode" placeholder="请选择设备名称">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in deviceLedgerList"
|
|
|
|
|
|
|
|
:key="item.deviceCode"
|
|
|
|
|
|
|
|
:label="item.productLinedDevice"
|
|
|
|
|
|
|
|
:value="item.deviceCode"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="参数编号" prop="paramCode">
|
|
|
|
<el-form-item label="参数编号" prop="paramCode">
|
|
|
|
<el-input v-model="form.paramCode" placeholder="请输入参数编号" />
|
|
|
|
<el-input v-model="form.paramCode" placeholder="请输入参数编号" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -159,9 +184,6 @@
|
|
|
|
></el-option>
|
|
|
|
></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备编号" prop="deviceCode">
|
|
|
|
|
|
|
|
<el-input v-model="form.deviceCode" placeholder="请输入设备编号" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="读取频率" prop="readFrequency">
|
|
|
|
<el-form-item label="读取频率" prop="readFrequency">
|
|
|
|
<el-input v-model="form.readFrequency" placeholder="请输入读取频率" />
|
|
|
|
<el-input v-model="form.readFrequency" placeholder="请输入读取频率" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -185,6 +207,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listDeviceParam, getDeviceParam, delDeviceParam, addDeviceParam, updateDeviceParam } from "@/api/base/deviceParam";
|
|
|
|
import { listDeviceParam, getDeviceParam, delDeviceParam, addDeviceParam, updateDeviceParam } from "@/api/base/deviceParam";
|
|
|
|
|
|
|
|
import { getDeviceLedgerList } from '@//api/base/deviceLedger'
|
|
|
|
|
|
|
|
import { findFactoryList } from '@//api/base/factory'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "DeviceParam",
|
|
|
|
name: "DeviceParam",
|
|
|
@ -220,6 +244,7 @@ export default {
|
|
|
|
paramType: null,
|
|
|
|
paramType: null,
|
|
|
|
deviceCode: null,
|
|
|
|
deviceCode: null,
|
|
|
|
readFrequency: null,
|
|
|
|
readFrequency: null,
|
|
|
|
|
|
|
|
productLinedDevice: null,
|
|
|
|
isFlag: null,
|
|
|
|
isFlag: null,
|
|
|
|
createdBy: null,
|
|
|
|
createdBy: null,
|
|
|
|
createdTime: null,
|
|
|
|
createdTime: null,
|
|
|
@ -245,10 +270,16 @@ export default {
|
|
|
|
{ key: 10, label: `创建时间`, visible: false },
|
|
|
|
{ key: 10, label: `创建时间`, visible: false },
|
|
|
|
{ key: 11, label: `更新人`, visible: false },
|
|
|
|
{ key: 11, label: `更新人`, visible: false },
|
|
|
|
{ key: 12, label: `更新时间`, visible: false },
|
|
|
|
{ key: 12, label: `更新时间`, visible: false },
|
|
|
|
]
|
|
|
|
{ key: 13, label: `产线`, visible: true },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
// 设备下拉框
|
|
|
|
|
|
|
|
deviceLedgerList: [],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
|
|
|
|
getDeviceLedgerList().then(response => {
|
|
|
|
|
|
|
|
this.deviceLedgerList = response.data
|
|
|
|
|
|
|
|
})
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|