|
|
@ -16,50 +16,45 @@
|
|
|
|
@selection-change="handleSelection"
|
|
|
|
@selection-change="handleSelection"
|
|
|
|
@row-dblclick="rowDoubleClick"
|
|
|
|
@row-dblclick="rowDoubleClick"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column type="index" width="35" />
|
|
|
|
type="index"
|
|
|
|
<el-table-column type="selection" width="45" />
|
|
|
|
width="35"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
type="selection"
|
|
|
|
|
|
|
|
width="45"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column prop="sensorCode" label="传感器编号" sortable>
|
|
|
|
prop="sensorCode"
|
|
|
|
|
|
|
|
label="传感器编号"
|
|
|
|
|
|
|
|
sortable
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-input v-model="scope.row.sensorCode" placeholder="请输入传感器编号" @keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit" ></el-input>
|
|
|
|
<el-input
|
|
|
|
<span v-else>{{scope.row.sensorCode}}</span>
|
|
|
|
v-model="scope.row.sensorCode"
|
|
|
|
|
|
|
|
placeholder="请输入传感器编号"
|
|
|
|
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
<span v-else>{{ scope.row.sensorCode }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column prop="sensorName" label="传感器名称" sortable>
|
|
|
|
prop="sensorName"
|
|
|
|
|
|
|
|
label="传感器名称"
|
|
|
|
|
|
|
|
sortable
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="scope.row.sensorName"
|
|
|
|
v-model="scope.row.sensorName"
|
|
|
|
placeholder="请输入传感器名称"
|
|
|
|
placeholder="请输入传感器名称"
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
v-if="scope.row.isEdit" maxlength="100">
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
maxlength="100"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
<span v-else>{{scope.row.sensorName}}</span>
|
|
|
|
<span v-else>{{ scope.row.sensorName }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column prop="sensorBrand" label="标牌" sortable>
|
|
|
|
prop="sensorBrand"
|
|
|
|
|
|
|
|
label="标牌"
|
|
|
|
|
|
|
|
sortable
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-input v-model="scope.row.sensorBrand" placeholder="请输入标牌" @keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit" maxlength="50"></el-input>
|
|
|
|
<el-input
|
|
|
|
<span v-else>{{scope.row.sensorBrand}}</span>
|
|
|
|
v-model="scope.row.sensorBrand"
|
|
|
|
|
|
|
|
placeholder="请输入标牌"
|
|
|
|
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
maxlength="50"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
<span v-else>{{ scope.row.sensorBrand }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
@ -70,15 +65,21 @@
|
|
|
|
show-overflow-tooltip
|
|
|
|
show-overflow-tooltip
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-select v-model="scope.row.position" placeholder="请选择位安装位置" v-if="scope.row.isEdit" @keyup.enter.native="saveFun($event, scope.row)" >
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="scope.row.position"
|
|
|
|
|
|
|
|
placeholder="请选择位安装位置"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in positionList"
|
|
|
|
v-for="item in positionList"
|
|
|
|
:key="item.value"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value">
|
|
|
|
:value="item.value"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
<span v-else>{{positionName(scope.row.position)}}</span>
|
|
|
|
<span v-else>{{ positionName(scope.row.position) }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
@ -89,8 +90,14 @@
|
|
|
|
show-overflow-tooltip
|
|
|
|
show-overflow-tooltip
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-input v-model="scope.row.positionDes" placeholder="请输位置描述" @keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit" maxlength="100"></el-input>
|
|
|
|
<el-input
|
|
|
|
<span v-else>{{scope.row.positionDes}}</span>
|
|
|
|
v-model="scope.row.positionDes"
|
|
|
|
|
|
|
|
placeholder="请输位置描述"
|
|
|
|
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
maxlength="100"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
<span v-else>{{ scope.row.positionDes }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
@ -98,11 +105,17 @@
|
|
|
|
prop="growRate"
|
|
|
|
prop="growRate"
|
|
|
|
label="增长率(%)阈值"
|
|
|
|
label="增长率(%)阈值"
|
|
|
|
sortable
|
|
|
|
sortable
|
|
|
|
width=150
|
|
|
|
width="150"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-input v-model="scope.row.growRate" placeholder="请输入增长率阈值" @keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit" maxlength="20"></el-input>
|
|
|
|
<el-input
|
|
|
|
<span v-else>{{scope.row.growRate}}</span>
|
|
|
|
v-model="scope.row.growRate"
|
|
|
|
|
|
|
|
placeholder="请输入增长率阈值"
|
|
|
|
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
maxlength="20"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
<span v-else>{{ scope.row.growRate }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
@ -110,22 +123,29 @@
|
|
|
|
prop="warningValue"
|
|
|
|
prop="warningValue"
|
|
|
|
label="预警值(℃)"
|
|
|
|
label="预警值(℃)"
|
|
|
|
sortable
|
|
|
|
sortable
|
|
|
|
width=130
|
|
|
|
width="130"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-input v-model="scope.row.warningValue" placeholder="请输入预警值" @keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit" maxlength="10"></el-input>
|
|
|
|
<el-input
|
|
|
|
<span v-else>{{scope.row.warningValue}}</span>
|
|
|
|
v-model="scope.row.warningValue"
|
|
|
|
|
|
|
|
placeholder="请输入预警值"
|
|
|
|
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
maxlength="10"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
<span v-else>{{ scope.row.warningValue }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column prop="manufactor" label="生产厂家" sortable>
|
|
|
|
prop="manufactor"
|
|
|
|
|
|
|
|
label="生产厂家"
|
|
|
|
|
|
|
|
sortable
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-input v-model="scope.row.manufactor" placeholder="请输入生产厂家" @keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit"></el-input>
|
|
|
|
<el-input
|
|
|
|
<span v-else>{{scope.row.manufactor}}</span>
|
|
|
|
v-model="scope.row.manufactor"
|
|
|
|
|
|
|
|
placeholder="请输入生产厂家"
|
|
|
|
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
<span v-else>{{ scope.row.manufactor }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
@ -133,36 +153,35 @@
|
|
|
|
prop="productionDate"
|
|
|
|
prop="productionDate"
|
|
|
|
label="设备生产时间"
|
|
|
|
label="设备生产时间"
|
|
|
|
sortable
|
|
|
|
sortable
|
|
|
|
width=150
|
|
|
|
width="150"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit"
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
v-model="scope.row.productionDate"
|
|
|
|
v-model="scope.row.productionDate"
|
|
|
|
type="date"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="设备生产时间"
|
|
|
|
placeholder="设备生产时间"
|
|
|
|
width=150
|
|
|
|
width="150"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
<span v-else>{{scope.row.productionDate}}</span>
|
|
|
|
<span v-else>{{ scope.row.productionDate }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column prop="useDate" label="设备投运时间" sortable>
|
|
|
|
prop="useDate"
|
|
|
|
|
|
|
|
label="设备投运时间"
|
|
|
|
|
|
|
|
sortable
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)" v-if="scope.row.isEdit"
|
|
|
|
@keyup.enter.native="saveFun($event, scope.row)"
|
|
|
|
|
|
|
|
v-if="scope.row.isEdit"
|
|
|
|
v-model="scope.row.useDate"
|
|
|
|
v-model="scope.row.useDate"
|
|
|
|
type="date"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="设备投运时间">
|
|
|
|
placeholder="设备投运时间"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
<span v-else>{{scope.row.useDate}}</span>
|
|
|
|
<span v-else>{{ scope.row.useDate }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
@ -179,137 +198,185 @@
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="关联变压器" name="1">
|
|
|
|
<el-tab-pane label="关联变压器" name="1">
|
|
|
|
<div class="btnStyle moduleTable">
|
|
|
|
<div class="btnStyle moduleTable">
|
|
|
|
<bindingIsUnbound :getTransformeData="getTransformeData" :getCurrentTransformerData="getCurrentTransformerData" @bindingClick="bindingClick" @unbundleClick="unbundleClick"></bindingIsUnbound>
|
|
|
|
<bindingIsUnbound
|
|
|
|
|
|
|
|
:getTransformeData="getTransformeData"
|
|
|
|
|
|
|
|
:getCurrentTransformerData="getCurrentTransformerData"
|
|
|
|
|
|
|
|
@bindingClick="bindingClick"
|
|
|
|
|
|
|
|
@unbundleClick="unbundleClick"
|
|
|
|
|
|
|
|
></bindingIsUnbound>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { PAGE_CONFIG } from '@/commons/constant'
|
|
|
|
import { PAGE_CONFIG } from "@/commons/constant";
|
|
|
|
import bindingIsUnbound from '../components/bindingIsUnbound'
|
|
|
|
import bindingIsUnbound from "../components/bindingIsUnbound";
|
|
|
|
import { busiTemperPointQueryList, addBusiTemperPoint, deleteBusiTemperPoint, updateBusiTemperPoint,saveRelationship,
|
|
|
|
import {
|
|
|
|
getTransformerList,getCurrentTransformerInfo,cancelRelationship} from '@/api/user'
|
|
|
|
busiTemperPointQueryList,
|
|
|
|
|
|
|
|
addBusiTemperPoint,
|
|
|
|
|
|
|
|
deleteBusiTemperPoint,
|
|
|
|
|
|
|
|
updateBusiTemperPoint,
|
|
|
|
|
|
|
|
saveRelationship,
|
|
|
|
|
|
|
|
getTransformerList,
|
|
|
|
|
|
|
|
getCurrentTransformerInfo,
|
|
|
|
|
|
|
|
cancelRelationship,
|
|
|
|
|
|
|
|
} from "@/api/user";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'MeasuringTemperatureList',
|
|
|
|
name: "MeasuringTemperatureList",
|
|
|
|
components:{
|
|
|
|
components: {
|
|
|
|
bindingIsUnbound
|
|
|
|
bindingIsUnbound,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
getTransformeData:[],
|
|
|
|
getTransformeData: [],
|
|
|
|
getCurrentTransformerData:{},
|
|
|
|
getCurrentTransformerData: {},
|
|
|
|
activeName:'0',
|
|
|
|
activeName: "0",
|
|
|
|
searchParam: {
|
|
|
|
searchParam: {
|
|
|
|
...PAGE_CONFIG
|
|
|
|
...PAGE_CONFIG,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tableParam: {
|
|
|
|
tableParam: {
|
|
|
|
multipleSelection: [],
|
|
|
|
multipleSelection: [],
|
|
|
|
count: 0,
|
|
|
|
count: 0,
|
|
|
|
data: [],
|
|
|
|
data: [],
|
|
|
|
isLoading: false
|
|
|
|
isLoading: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
selectionStart: [],
|
|
|
|
selectionStart: [],
|
|
|
|
// dialogVisible: false,
|
|
|
|
// dialogVisible: false,
|
|
|
|
//安装位置 1: A相进线 2: B相进线 3: C相进线 4: A相出线 5: B相出线 6: C相出线 7:柜内 8:柜外监测点
|
|
|
|
//安装位置 1: A相进线 2: B相进线 3: C相进线 4: A相出线 5: B相出线 6: C相出线 7:柜内 8:柜外监测点
|
|
|
|
positionList: [{
|
|
|
|
positionList: [
|
|
|
|
value: '1',
|
|
|
|
{
|
|
|
|
label: 'A相进线'
|
|
|
|
value: "1",
|
|
|
|
}, {
|
|
|
|
label: "A相进线",
|
|
|
|
value: '2',
|
|
|
|
|
|
|
|
label: 'B相进线'
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: '3',
|
|
|
|
|
|
|
|
label: 'C相进线'
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: '4',
|
|
|
|
|
|
|
|
label: 'A相出线'
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: '5',
|
|
|
|
|
|
|
|
label: 'B相出线'
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: '6',
|
|
|
|
|
|
|
|
label: 'C相出线'
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: '7',
|
|
|
|
|
|
|
|
label: '柜内'
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
value: '8',
|
|
|
|
|
|
|
|
label: '柜外监测点'
|
|
|
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "2",
|
|
|
|
|
|
|
|
label: "B相进线",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "3",
|
|
|
|
|
|
|
|
label: "C相进线",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "4",
|
|
|
|
|
|
|
|
label: "A相出线",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "5",
|
|
|
|
|
|
|
|
label: "B相出线",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "6",
|
|
|
|
|
|
|
|
label: "C相出线",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created(){
|
|
|
|
{
|
|
|
|
this.queryPage()
|
|
|
|
value: "7",
|
|
|
|
|
|
|
|
label: "位置1",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "8",
|
|
|
|
|
|
|
|
label: "位置2",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "9",
|
|
|
|
|
|
|
|
label: "位置3",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "10",
|
|
|
|
|
|
|
|
label: "位置4",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "11",
|
|
|
|
|
|
|
|
label: "位置5",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "12",
|
|
|
|
|
|
|
|
label: "位置6",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "13",
|
|
|
|
|
|
|
|
label: "柜内",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: "14",
|
|
|
|
|
|
|
|
label: "柜外监测点",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
this.queryPage();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
handleClick(tab){
|
|
|
|
handleClick(tab) {
|
|
|
|
if(tab.label === '测温开关柜'){
|
|
|
|
if (tab.label === "测温开关柜") {
|
|
|
|
this.queryPage()
|
|
|
|
this.queryPage();
|
|
|
|
}else if(tab.label === '关联变压器'){
|
|
|
|
} else if (tab.label === "关联变压器") {
|
|
|
|
this.refreshTable()
|
|
|
|
this.refreshTable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 绑定
|
|
|
|
// 绑定
|
|
|
|
bindingClick(row){
|
|
|
|
bindingClick(row) {
|
|
|
|
this.$confirm('是否要绑定当前变压器, 是否继续?', '绑定', {
|
|
|
|
this.$confirm("是否要绑定当前变压器, 是否继续?", "绑定", {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: 'warning'
|
|
|
|
type: "warning",
|
|
|
|
}).then(() => {
|
|
|
|
})
|
|
|
|
const params={
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
equipmentId: this.$route.params.id,
|
|
|
|
equipmentId: this.$route.params.id,
|
|
|
|
transformerId: row.transformerId
|
|
|
|
transformerId: row.transformerId,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
saveRelationship(params).then(res=>{
|
|
|
|
saveRelationship(params).then((res) => {
|
|
|
|
if(res.code === 0){
|
|
|
|
if (res.code === 0) {
|
|
|
|
this.$message.success('绑定成功')
|
|
|
|
this.$message.success("绑定成功");
|
|
|
|
this.refreshTable()
|
|
|
|
this.refreshTable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
type: 'info',
|
|
|
|
type: "info",
|
|
|
|
message: '已取消绑定'
|
|
|
|
message: "已取消绑定",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
unbundleClick(row){
|
|
|
|
unbundleClick(row) {
|
|
|
|
this.$confirm('是否要取消绑定当前变压器, 是否继续?', '取消绑定', {
|
|
|
|
this.$confirm("是否要取消绑定当前变压器, 是否继续?", "取消绑定", {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: 'warning'
|
|
|
|
type: "warning",
|
|
|
|
}).then(() => {
|
|
|
|
})
|
|
|
|
const params={
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
equipmentId: this.$route.params.id,
|
|
|
|
equipmentId: this.$route.params.id,
|
|
|
|
transformerId: row.transformerId
|
|
|
|
transformerId: row.transformerId,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
cancelRelationship(params).then(res=>{
|
|
|
|
cancelRelationship(params).then((res) => {
|
|
|
|
if(res.code === 0){
|
|
|
|
if (res.code === 0) {
|
|
|
|
this.$message.success('取消绑定成功')
|
|
|
|
this.$message.success("取消绑定成功");
|
|
|
|
this.refreshTable()
|
|
|
|
this.refreshTable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
type: 'info',
|
|
|
|
type: "info",
|
|
|
|
message: '已取消绑定'
|
|
|
|
message: "已取消绑定",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
refreshTable(){
|
|
|
|
refreshTable() {
|
|
|
|
getTransformerList(this.$route.params.siteId,this.$route.params.id).then(res=>{
|
|
|
|
getTransformerList(this.$route.params.siteId, this.$route.params.id).then(
|
|
|
|
|
|
|
|
(res) => {
|
|
|
|
if (res.code === 0 && res.data) {
|
|
|
|
if (res.code === 0 && res.data) {
|
|
|
|
this.getTransformeData = res.data
|
|
|
|
this.getTransformeData = res.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
// getCurrentTransformerInfo(this.$route.params.id).then(res=>{
|
|
|
|
// getCurrentTransformerInfo(this.$route.params.id).then(res=>{
|
|
|
|
// if (res.code === 0 && res.data) {
|
|
|
|
// if (res.code === 0 && res.data) {
|
|
|
|
// this.getCurrentTransformerData = res.data
|
|
|
|
// this.getCurrentTransformerData = res.data
|
|
|
@ -317,103 +384,105 @@ export default {
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 分页查询
|
|
|
|
// 分页查询
|
|
|
|
async queryPage (page){
|
|
|
|
async queryPage(page) {
|
|
|
|
page && (this.searchParam.page = page)
|
|
|
|
page && (this.searchParam.page = page);
|
|
|
|
this.searchParam.siteId = this.$route.params.siteId
|
|
|
|
this.searchParam.siteId = this.$route.params.siteId;
|
|
|
|
this.searchParam.equipmentId = this.$route.params.id
|
|
|
|
this.searchParam.equipmentId = this.$route.params.id;
|
|
|
|
this.tableParam.isLoading = true
|
|
|
|
this.tableParam.isLoading = true;
|
|
|
|
let res = {}
|
|
|
|
let res = {};
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
res = await busiTemperPointQueryList(this.searchParam)
|
|
|
|
res = await busiTemperPointQueryList(this.searchParam);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
this.tableParam.isLoading = false
|
|
|
|
this.tableParam.isLoading = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.tableParam = { ...this.tableParam, ...res }
|
|
|
|
this.tableParam = { ...this.tableParam, ...res };
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 添加
|
|
|
|
// 添加
|
|
|
|
async addFun() {
|
|
|
|
async addFun() {
|
|
|
|
this.tableParam.isLoading = true
|
|
|
|
this.tableParam.isLoading = true;
|
|
|
|
let res = {}
|
|
|
|
let res = {};
|
|
|
|
try{
|
|
|
|
try {
|
|
|
|
res = await addBusiTemperPoint({
|
|
|
|
res = await addBusiTemperPoint({
|
|
|
|
siteId: this.$route.params.siteId,
|
|
|
|
siteId: this.$route.params.siteId,
|
|
|
|
equipmentId: this.$route.params.id
|
|
|
|
equipmentId: this.$route.params.id,
|
|
|
|
})
|
|
|
|
});
|
|
|
|
this.queryPage(1)
|
|
|
|
this.queryPage(1);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
this.tableParam.isLoading = false
|
|
|
|
this.tableParam.isLoading = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 获取checkbox选中状态
|
|
|
|
// 获取checkbox选中状态
|
|
|
|
handleSelection(selection) {
|
|
|
|
handleSelection(selection) {
|
|
|
|
this.selectionStart = selection
|
|
|
|
this.selectionStart = selection;
|
|
|
|
this.$emit('selectionEmit', selection)
|
|
|
|
this.$emit("selectionEmit", selection);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//保存
|
|
|
|
//保存
|
|
|
|
async saveFun(event, item){
|
|
|
|
async saveFun(event, item) {
|
|
|
|
this.tableParam.isLoading = true
|
|
|
|
this.tableParam.isLoading = true;
|
|
|
|
try{
|
|
|
|
try {
|
|
|
|
await updateBusiTemperPoint(item).then(() => {
|
|
|
|
await updateBusiTemperPoint(item)
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
this.$message.success("保存成功");
|
|
|
|
this.queryPage();
|
|
|
|
this.queryPage();
|
|
|
|
item.isEdit = false;
|
|
|
|
item.isEdit = false;
|
|
|
|
}).catch((e) => {})
|
|
|
|
})
|
|
|
|
}finally {
|
|
|
|
.catch((e) => {});
|
|
|
|
this.tableParam.isLoading = false
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
this.tableParam.isLoading = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 删除
|
|
|
|
// 删除
|
|
|
|
deleteFun() {
|
|
|
|
deleteFun() {
|
|
|
|
if (this.selectionStart.length) {
|
|
|
|
if (this.selectionStart.length) {
|
|
|
|
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
|
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: 'warning'
|
|
|
|
type: "warning",
|
|
|
|
}).then(() => {
|
|
|
|
})
|
|
|
|
let ids = []
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
let ids = [];
|
|
|
|
this.selectionStart.forEach((e, index) => {
|
|
|
|
this.selectionStart.forEach((e, index) => {
|
|
|
|
ids[index] = e.id
|
|
|
|
ids[index] = e.id;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
deleteBusiTemperPoint(ids).then(() => this.queryPage());
|
|
|
|
})
|
|
|
|
})
|
|
|
|
deleteBusiTemperPoint(ids).then(() => this.queryPage())
|
|
|
|
.catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
type: 'info',
|
|
|
|
type: "info",
|
|
|
|
message: '已取消删除'
|
|
|
|
message: "已取消删除",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error('请选择一条记录')
|
|
|
|
this.$message.error("请选择一条记录");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 分页
|
|
|
|
// 分页
|
|
|
|
handleSizeChange(val) {
|
|
|
|
handleSizeChange(val) {
|
|
|
|
console.log(`每页 ${val} 条`)
|
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
this.searchParam.page = val
|
|
|
|
this.searchParam.page = val;
|
|
|
|
this.queryPage()
|
|
|
|
this.queryPage();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 弹框
|
|
|
|
// 弹框
|
|
|
|
handleClose(done) {
|
|
|
|
handleClose(done) {
|
|
|
|
done()
|
|
|
|
done();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dialogVisibleFun() {
|
|
|
|
dialogVisibleFun() {
|
|
|
|
console.log(this.selectionStart, 852)
|
|
|
|
console.log(this.selectionStart, 852);
|
|
|
|
for (let i = 0; i < this.selectionStart.length; i++) {
|
|
|
|
for (let i = 0; i < this.selectionStart.length; i++) {
|
|
|
|
this.selectionStart.forEach((item, index) => {
|
|
|
|
this.selectionStart.forEach((item, index) => {
|
|
|
|
this.tableData.forEach((v, i) => {
|
|
|
|
this.tableData.forEach((v, i) => {
|
|
|
|
if (item.id === v.id) {
|
|
|
|
if (item.id === v.id) {
|
|
|
|
this.tableData.splice(i, 1)
|
|
|
|
this.tableData.splice(i, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.dialogVisible = false
|
|
|
|
this.dialogVisible = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// //行双击
|
|
|
|
// //行双击
|
|
|
|
// rowDoubleClick(row, column, event){
|
|
|
|
// rowDoubleClick(row, column, event){
|
|
|
@ -428,55 +497,55 @@ export default {
|
|
|
|
// 行双击
|
|
|
|
// 行双击
|
|
|
|
rowDoubleClick(row, column, event) {
|
|
|
|
rowDoubleClick(row, column, event) {
|
|
|
|
// 判断是否有未保存的数据
|
|
|
|
// 判断是否有未保存的数据
|
|
|
|
let unSaveData = this.getUnSaveData()
|
|
|
|
let unSaveData = this.getUnSaveData();
|
|
|
|
if(!unSaveData) {
|
|
|
|
if (!unSaveData) {
|
|
|
|
row.isEdit = true;
|
|
|
|
row.isEdit = true;
|
|
|
|
(this.tableParam.data || []).forEach((e, index) => {
|
|
|
|
(this.tableParam.data || []).forEach((e, index) => {
|
|
|
|
if (row.id != e.id) {
|
|
|
|
if (row.id != e.id) {
|
|
|
|
e.isEdit = false
|
|
|
|
e.isEdit = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
return
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.saveDataTip(event, unSaveData)
|
|
|
|
this.saveDataTip(event, unSaveData);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
saveDataTip(event, unSaveData) {
|
|
|
|
saveDataTip(event, unSaveData) {
|
|
|
|
this.$confirm('表格中存在未保存的数据,是否现在保存?', '提示', {
|
|
|
|
this.$confirm("表格中存在未保存的数据,是否现在保存?", "提示", {
|
|
|
|
confirmButtonText: '是',
|
|
|
|
confirmButtonText: "是",
|
|
|
|
cancelButtonText: '否',
|
|
|
|
cancelButtonText: "否",
|
|
|
|
type: 'warning'
|
|
|
|
type: "warning",
|
|
|
|
}).then(() => {
|
|
|
|
})
|
|
|
|
this.saveFun(event, unSaveData)
|
|
|
|
.then(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
this.saveFun(event, unSaveData);
|
|
|
|
|
|
|
|
})
|
|
|
|
});
|
|
|
|
.catch(() => {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getUnSaveData() {
|
|
|
|
getUnSaveData() {
|
|
|
|
for(let index in this.tableParam.data) {
|
|
|
|
for (let index in this.tableParam.data) {
|
|
|
|
let itemData = this.tableParam.data[index]
|
|
|
|
let itemData = this.tableParam.data[index];
|
|
|
|
if(itemData.isEdit) {
|
|
|
|
if (itemData.isEdit) {
|
|
|
|
return itemData
|
|
|
|
return itemData;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
positionName(position){
|
|
|
|
positionName(position) {
|
|
|
|
let label;
|
|
|
|
let label;
|
|
|
|
this.positionList.forEach(e => {
|
|
|
|
this.positionList.forEach((e) => {
|
|
|
|
if(e.value == position){
|
|
|
|
if (e.value == position) {
|
|
|
|
label = e.label;
|
|
|
|
label = e.label;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return label;
|
|
|
|
return label;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.measuringTemperatureList{
|
|
|
|
.measuringTemperatureList {
|
|
|
|
width: 98%;
|
|
|
|
width: 98%;
|
|
|
|
padding: 20px 0;
|
|
|
|
padding: 20px 0;
|
|
|
|
.pagination{
|
|
|
|
.pagination {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|