|
@@ -65,31 +65,31 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="showDate">
|
|
|
- <div class="label">
|
|
|
+ <!-- <div class="label">
|
|
|
<div class="title">标注信息:</div>
|
|
|
<el-autocomplete @blur="labelChange(state1)" class="inputs" v-model="state1"
|
|
|
:fetch-suggestions="querySearch" placeholder="请输入内容" @select="handleSelect" style="width: 174px">
|
|
|
</el-autocomplete>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="label1">
|
|
|
<div class="title">挂牌信息:</div>
|
|
|
<!-- <div>挂牌原因</div> -->
|
|
|
- <el-select @change="listedChange(value)" class="inputs" v-model="selectValue" placeholder="请选择">
|
|
|
+ <el-select filterable allow-create default-first-option @change="listedChange(value)" class="inputs"
|
|
|
+ v-model="selectValue" placeholder="请选择">
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="label">
|
|
|
- <div class="button" v-if="types === 2" @click="menuClicked({ type: 'send', controlType:'1' })">启动</div>
|
|
|
- <div class="button" v-if="types === 4" @click="menuClicked({ type: 'send', controlType:'2' })">停机</div>
|
|
|
- <div class="button" v-if="types === 0 ||types === 5 " @click="menuClicked({ type: 'send', controlType:'5' })">
|
|
|
+ <div class="button" v-if="types === 2" @click="sendCommand({controlType:'1' })">启动</div>
|
|
|
+ <div class="button" v-if="types === 4" @click="sendCommand({controlType:'2' })">停机</div>
|
|
|
+ <div class="button" v-if="types === 0 ||types === 5 " @click="sendCommand({controlType:'5' })">
|
|
|
复位</div>
|
|
|
- <div class="button" v-if="types === 2" @click="menuClicked({ type: 'send', controlType:'6' })">维护</div>
|
|
|
- <div class="button" v-if="types === 6" @click="menuClicked({ type: 'send', controlType:'8' })">取消维护</div>
|
|
|
- <div class="button" v-if="selectValue !==''" @click="menuClicked({ type: 'lock', value: 'UnLock' })">取消挂牌
|
|
|
+ <div class="button" v-if="types === 2" @click="sendCommand({controlType:'6' })">维护</div>
|
|
|
+ <div class="button" v-if="types === 6" @click="sendCommand({controlType:'8' })">取消维护</div>
|
|
|
+ <div class="button" v-if="selectValue !==''" @click="sendLock({value: 'UnLock' })">取消挂牌
|
|
|
</div>
|
|
|
- <!-- <div class="button" @click="menuClicked({ type: 'send' })">生成缺陷单</div> -->
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -99,7 +99,7 @@
|
|
|
<div class="dataTitle">
|
|
|
<div style="margin-left: 24px;">部件主要参数</div>
|
|
|
</div>
|
|
|
- <div class="dataContent">
|
|
|
+ <div class="dataContent" @dblclick="dbClicks()">
|
|
|
<div class="dataBlock" v-for="(item,index) in showData" :key="index">
|
|
|
<div class="dataName">{{item.name}}</div>
|
|
|
<div class="numerical">
|
|
@@ -134,12 +134,13 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <BasicDataDetails @closed="closeds()" v-model="display"></BasicDataDetails>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import BackgroundData from 'utils/BackgroundData'
|
|
|
- // import Worning from "./warning.vue"
|
|
|
+ import BasicDataDetails from "./basicDataDetails.vue";
|
|
|
import StandAloneImg from "./StandAloneImg.vue";
|
|
|
import dayjs from 'dayjs'
|
|
|
import api from "api/index";
|
|
@@ -148,6 +149,7 @@
|
|
|
components: {
|
|
|
// Worning,
|
|
|
StandAloneImg,
|
|
|
+ BasicDataDetails,
|
|
|
},
|
|
|
props: {
|
|
|
types: {
|
|
@@ -157,56 +159,35 @@
|
|
|
windturbine: Object,
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getDetial()
|
|
|
+ this.getLocks()
|
|
|
this.getHealthDate()
|
|
|
this.getWarning()
|
|
|
+ this.getDetial()
|
|
|
},
|
|
|
beforeUpdate() {
|
|
|
- this.getDetial()
|
|
|
+ this.getLocks()
|
|
|
this.getHealthDate()
|
|
|
this.getWarning()
|
|
|
+ this.getDetial()
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
// warnList: [],
|
|
|
+ display: false,
|
|
|
BasicInfo: {},
|
|
|
temperatureInfo: new Array() /* 温度信息 */,
|
|
|
pitchInfo: new Array() /* 变桨信息 */,
|
|
|
generalInfo: new Array() /* 基本信息 */,
|
|
|
powerGridInfo: new Array() /* 电网信息 */,
|
|
|
restaurants: [],
|
|
|
+ lockValues: [],
|
|
|
state1: "",
|
|
|
showIndex: 1,
|
|
|
starValue: 3,
|
|
|
max: 4,
|
|
|
current: null,
|
|
|
disableds: true,
|
|
|
- tableData: [{
|
|
|
- date: '2016-05-02',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-04',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-01',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-03',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-08',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-09',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
- }],
|
|
|
options: [{
|
|
|
value: '8',
|
|
|
label: '检修'
|
|
@@ -251,29 +232,40 @@
|
|
|
},
|
|
|
methods: {
|
|
|
getHealthDate() {
|
|
|
- api.getHealthDate(this.windturbine.stationId,this.windturbine.windturbineId).then(msg => {
|
|
|
- if (msg.data.code === 200) {
|
|
|
- this.healthInfo = msg.data.data;
|
|
|
- }
|
|
|
+ api.getHealthDate(this.windturbine.stationId, this.windturbine.windturbineId).then(msg => {
|
|
|
+ if (msg.data.code === 200) {
|
|
|
+ this.healthInfo = msg.data.data;
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
.catch(err => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
getDetial() {
|
|
|
api.getDetial(this.windturbine.windturbineId).then(msg => {
|
|
|
- let restaurants = []
|
|
|
+ let restaurants = []
|
|
|
+ if(msg.data.lockType === 9){
|
|
|
+ this.selectValue = this.lockValues?.filter(item => this.windturbine.windturbineId === item.windturbineID)[0]?.value;
|
|
|
+ }else{
|
|
|
this.selectValue = (msg.data.lockType === 0 ? '' : String(msg.data.lockType))
|
|
|
- this.state1 = msg.data.markValue
|
|
|
- msg.data.markValues.forEach(item => {
|
|
|
- let data = {}
|
|
|
- data.value = item
|
|
|
- restaurants.push(data)
|
|
|
- })
|
|
|
- this.restaurants = restaurants
|
|
|
+ }
|
|
|
+ this.state1 = msg.data.markValue
|
|
|
+ msg.data.markValues.forEach(item => {
|
|
|
+ let data = {}
|
|
|
+ data.value = item
|
|
|
+ restaurants.push(data)
|
|
|
})
|
|
|
+ this.restaurants = restaurants
|
|
|
+ })
|
|
|
},
|
|
|
+ getLocks(){
|
|
|
+ api.getCustomerLock().then(res =>{
|
|
|
+ if(res){
|
|
|
+ this.lockValues = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getWarning() {
|
|
|
let parts = ''
|
|
|
switch (this.showIndex) {
|
|
@@ -293,15 +285,15 @@
|
|
|
parts = 'yy'
|
|
|
break;
|
|
|
}
|
|
|
- api.getWarning(this.windturbine.stationId,this.windturbine.windturbineId,parts).then(msg => {
|
|
|
- if (msg.data.code === 200) {
|
|
|
- msg.data.data && msg.data.data.forEach(item => {
|
|
|
- item.time = dayjs(item.time).format('MM-DD HH:mm:ss')
|
|
|
- })
|
|
|
- this.warning = msg.data.data;
|
|
|
- }
|
|
|
+ api.getWarning(this.windturbine.stationId, this.windturbine.windturbineId, parts).then(msg => {
|
|
|
+ if (msg.data.code === 200) {
|
|
|
+ msg.data.data && msg.data.data.forEach(item => {
|
|
|
+ item.time = dayjs(item.time).format('MM-DD HH:mm:ss')
|
|
|
+ })
|
|
|
+ this.warning = msg.data.data;
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
.catch(err => {
|
|
|
console.log(err);
|
|
|
});
|
|
@@ -310,19 +302,19 @@
|
|
|
this.showIndex = value
|
|
|
switch (this.showIndex) {
|
|
|
case 1:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0]?.param
|
|
|
break;
|
|
|
case 2:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0]?.param
|
|
|
break;
|
|
|
case 3:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0]?.param
|
|
|
break;
|
|
|
case 4:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0]?.param
|
|
|
break;
|
|
|
case 5:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0]?.param
|
|
|
break;
|
|
|
}
|
|
|
this.getWarning()
|
|
@@ -330,121 +322,45 @@
|
|
|
listedChange() {
|
|
|
switch (this.selectValue) {
|
|
|
case '8':
|
|
|
- this.menuClicked({ type: "lock", value: "CheckLock" });
|
|
|
+ this.sendLock({ value: "CheckLock" });
|
|
|
break;
|
|
|
case '7':
|
|
|
- this.menuClicked({ type: "lock", value: "FaultLock" });
|
|
|
+ this.sendLock({ value: "FaultLock" });
|
|
|
break;
|
|
|
case '2':
|
|
|
- this.menuClicked({ type: "lock", value: "StationCheckLock" });
|
|
|
+ this.sendLock({ value: "StationCheckLock" });
|
|
|
break;
|
|
|
case '3':
|
|
|
- this.menuClicked({ type: "lock", value: "StationFaulLock" });
|
|
|
+ this.sendLock({ value: "StationFaulLock" });
|
|
|
break;
|
|
|
case '4':
|
|
|
- this.menuClicked({ type: "lock", value: "StationPowerLineLock" });
|
|
|
+ this.sendLock({ value: "StationPowerLineLock" });
|
|
|
break;
|
|
|
case '5':
|
|
|
- this.menuClicked({ type: "lock", value: "StationWeatherLock" });
|
|
|
+ this.sendLock({ value: "StationWeatherLock" });
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ this.sendLock({ value: "CustomerLock", lockValue: this.selectValue});
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
- labelChange() {
|
|
|
- let values = BackgroundData.getInstance().Marks;
|
|
|
- if (!values.filter(item => item.title = this.windturbine.windturbineId)[0]) {
|
|
|
- this.menuClicked({ type: "marking" })
|
|
|
- }
|
|
|
- BackgroundData.getInstance().updateMarks(this.windturbine, this.state1);
|
|
|
- },
|
|
|
- show() {
|
|
|
- // axiios.get(`http://${config.calcUrl}/alarm/real-time-alarm?objectId=${this.windturbine.windturbineId}&pageIndex=1&pageSize=50`)
|
|
|
- // .then(msg=>{
|
|
|
- // var vs = msg.data;
|
|
|
- // if(vs.length<=0)return;
|
|
|
- // this.alarmTime = BackgroundData.getInstance().formatDate(vs[0].lastUpdateTime);
|
|
|
- // this.alarmContent = vs[0].alertText;
|
|
|
- // this.alarms = msg.data;
|
|
|
- // console.log(this.alarms)
|
|
|
- // })
|
|
|
- },
|
|
|
+ // labelChange() {
|
|
|
+ // let values = BackgroundData.getInstance().Marks;
|
|
|
+ // if (!values.filter(item => item.title = this.windturbine.windturbineId)[0]) {
|
|
|
+ // this.menuClicked({ type: "marking" })
|
|
|
+ // }
|
|
|
+ // BackgroundData.getInstance().updateMarks(this.windturbine, this.state1);
|
|
|
+ // },
|
|
|
+
|
|
|
start(bi) {
|
|
|
this.BasicInfo = bi;
|
|
|
this.bindData();
|
|
|
-
|
|
|
this.refreshData();
|
|
|
this.refreshTimer = setInterval(this.refreshData, 3000);
|
|
|
},
|
|
|
end() {
|
|
|
clearInterval(this.refreshTimer);
|
|
|
},
|
|
|
- // alarmd(bi) {
|
|
|
- // let dataList = []
|
|
|
- // let warnList = []
|
|
|
- // let date1 = {
|
|
|
- // type: 1,
|
|
|
- // alertText: []
|
|
|
- // }
|
|
|
- // let date2 = {
|
|
|
- // type: 2,
|
|
|
- // alertText: []
|
|
|
- // }
|
|
|
- // let date3 = {
|
|
|
- // type: 3,
|
|
|
- // alertText: []
|
|
|
- // }
|
|
|
- // let date4 = {
|
|
|
- // type: 4,
|
|
|
- // alertText: []
|
|
|
- // }
|
|
|
- // let date5 = {
|
|
|
- // type: 5,
|
|
|
- // alertText: []
|
|
|
- // }
|
|
|
- // bi.forEach(item => {
|
|
|
- // let data = {}
|
|
|
- // data.alertText = item.alertText
|
|
|
- // if (item.alertText.indexOf("变桨") >= 0) {
|
|
|
- // data.type = 1
|
|
|
- // } else if (item.alertText.indexOf("偏航") >= 0) {
|
|
|
- // data.type = 5
|
|
|
- // }
|
|
|
- // else if (item.alertText.indexOf("发电机") >= 0) {
|
|
|
- // data.type = 3
|
|
|
- // }
|
|
|
- // else if (item.alertText.indexOf("齿轮箱") >= 0) {
|
|
|
- // data.type = 2
|
|
|
- // }
|
|
|
- // else if (item.alertText.indexOf("液压") >= 0) {
|
|
|
- // data.type = 4
|
|
|
- // }
|
|
|
- // data.type ? warnList.push(data) : ''
|
|
|
- // })
|
|
|
- // warnList.forEach(item => {
|
|
|
- // switch (item.type) {
|
|
|
- // case 1:
|
|
|
- // date1.alertText.push(item.alertText)
|
|
|
- // break;
|
|
|
- // case 2:
|
|
|
- // date2.alertText.push(item.alertText)
|
|
|
- // break;
|
|
|
- // case 3:
|
|
|
- // date3.alertText.push(item.alertText)
|
|
|
- // break;
|
|
|
- // case 4:
|
|
|
- // date4.alertText.push(item.alertText)
|
|
|
- // break;
|
|
|
- // case 5:
|
|
|
- // date5.alertText.push(item.alertText)
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // })
|
|
|
- // date1.alertText.length > 0 ? dataList.push(date1) : ''
|
|
|
- // date2.alertText.length > 0 ? dataList.push(date2) : ''
|
|
|
- // date3.alertText.length > 0 ? dataList.push(date3) : ''
|
|
|
- // date4.alertText.length > 0 ? dataList.push(date4) : ''
|
|
|
- // date5.alertText.length > 0 ? dataList.push(date5) : ''
|
|
|
- // this.warnList = dataList
|
|
|
- // },
|
|
|
/* 刷新数据 */
|
|
|
refreshData() {
|
|
|
var bg = BackgroundData.getInstance();
|
|
@@ -472,19 +388,19 @@
|
|
|
console.log(this.BasicInfo.BasicInfo);
|
|
|
switch (this.showIndex) {
|
|
|
case 1:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0]?.param
|
|
|
break;
|
|
|
case 2:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0]?.param
|
|
|
break;
|
|
|
case 3:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0]?.param
|
|
|
break;
|
|
|
case 4:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0]?.param
|
|
|
break;
|
|
|
case 5:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0]?.param
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
@@ -523,29 +439,28 @@
|
|
|
},
|
|
|
selectSvg(index) {
|
|
|
this.showIndex = index;
|
|
|
+ // this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === `part${this.showIndex+5}`)[0]?.param
|
|
|
switch (this.showIndex) {
|
|
|
case 1:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part6")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === `part6`)[0]?.param
|
|
|
break;
|
|
|
case 2:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part8")[0]?.param
|
|
|
break;
|
|
|
case 3:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part7")[0]?.param
|
|
|
break;
|
|
|
case 4:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part10")[0]?.param
|
|
|
break;
|
|
|
case 5:
|
|
|
- this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0] ? this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0].param : []
|
|
|
+ this.showData = this.BasicInfo.BasicInfo.filter(item => item.index === "part9")[0]?.param
|
|
|
break;
|
|
|
}
|
|
|
this.getWarning()
|
|
|
},
|
|
|
- menuClicked(msg, windturbine) {
|
|
|
- let dataList = []
|
|
|
- dataList[0] = windturbine ? windturbine : this.windturbine
|
|
|
- var bd = BackgroundData.getInstance();
|
|
|
+ sendCommand(msg, windturbine) {
|
|
|
+ let bd = BackgroundData.getInstance();
|
|
|
if (!bd.LoginUser) {
|
|
|
this.$notify({
|
|
|
title: "请登录",
|
|
@@ -555,40 +470,76 @@
|
|
|
offset: 60,
|
|
|
duration: 3000,
|
|
|
});
|
|
|
- this.selectValue = ''
|
|
|
return;
|
|
|
}
|
|
|
- if (msg.type == "lock") {
|
|
|
- // 挂牌
|
|
|
- var los = dataList;
|
|
|
- for (var id in los) {
|
|
|
- los[id].lockType = msg.value;
|
|
|
- }
|
|
|
- bd.windturbineControl(
|
|
|
- los,
|
|
|
- true,
|
|
|
- '',
|
|
|
- '',
|
|
|
- this.controlSuccess,
|
|
|
- this.controlError
|
|
|
- );
|
|
|
- } else if (msg.type == "send") {
|
|
|
-
|
|
|
- // 发送
|
|
|
- dataList[0].controlType = Number(msg.controlType)
|
|
|
- var vs = dataList;
|
|
|
- bd.windturbineControl(
|
|
|
- vs,
|
|
|
- false,
|
|
|
- '',
|
|
|
- '',
|
|
|
- this.controlSuccess,
|
|
|
- this.controlError
|
|
|
- );
|
|
|
- } else if (msg.type == "marking") {
|
|
|
- // 标注
|
|
|
- var vvs = dataList;
|
|
|
- bd.marking(vvs);
|
|
|
+ let sendList = []
|
|
|
+ this.windturbine.controlType = Number(msg.controlType)
|
|
|
+ sendList.push(this.windturbine)
|
|
|
+ if (sendList.length > 0) {
|
|
|
+ bd.checkout(sendList);
|
|
|
+ let pairs = {}
|
|
|
+ sendList.forEach(item => {
|
|
|
+ let ct = {
|
|
|
+ windturbineId: item.windturbineId,
|
|
|
+ stationId: item.stationId,
|
|
|
+ projectId: item.projectId,
|
|
|
+ modelId: item.modelId,
|
|
|
+ controlType: item.controlType,
|
|
|
+ lockType: item.lockType,
|
|
|
+ userName: `system_${bd.LoginUser.name}`,
|
|
|
+ userId: 0,
|
|
|
+ };
|
|
|
+ pairs[ct.windturbineId] = ct;
|
|
|
+ })
|
|
|
+ api.windturbControl(pairs).then(res => {
|
|
|
+ if (res) {
|
|
|
+ this.controlSuccess(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ sendLock(msg) {
|
|
|
+ let bd = BackgroundData.getInstance();
|
|
|
+ if (!bd.LoginUser) {
|
|
|
+ this.$notify({
|
|
|
+ title: "请登录",
|
|
|
+ message: "控制风机需要先登录!",
|
|
|
+ type: "warning",
|
|
|
+ position: "bottom-right",
|
|
|
+ offset: 60,
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let sendList = []
|
|
|
+ this.windturbine.lockType = msg.value;
|
|
|
+ if(msg.lockValue){
|
|
|
+ this.windturbine.lockValue = msg.lockValue
|
|
|
+ }
|
|
|
+ sendList.push(this.windturbine)
|
|
|
+ if (sendList.length > 0) {
|
|
|
+ this.chooseList = []
|
|
|
+ let pairs = {}
|
|
|
+ sendList.forEach(item => {
|
|
|
+ let ct = {
|
|
|
+ windturbineId: item.windturbineId,
|
|
|
+ stationId: item.stationId,
|
|
|
+ projectId: item.projectId,
|
|
|
+ modelId: item.modelId,
|
|
|
+ controlType: item.controlType,
|
|
|
+ lockType: item.lockType,
|
|
|
+ lockValue: item.lockValue,
|
|
|
+ userName: `system_${bd.LoginUser.name}`,
|
|
|
+ userId: 0,
|
|
|
+ };
|
|
|
+ pairs[ct.windturbineId] = ct;
|
|
|
+ })
|
|
|
+ api.windturbControlLock(pairs).then(res => {
|
|
|
+ if (res) {
|
|
|
+ this.controlSuccess(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
/* 控制成功 */
|
|
@@ -630,6 +581,13 @@
|
|
|
duration: 3000,
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ dbClicks() {
|
|
|
+ this.display = true;
|
|
|
+ },
|
|
|
+ closeds() {
|
|
|
+ this.display = false;
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -972,7 +930,8 @@
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+
|
|
|
.el-table::before {
|
|
|
- width: 0;
|
|
|
- }
|
|
|
+ width: 0;
|
|
|
+ }
|
|
|
</style>
|