|
@@ -7,17 +7,63 @@
|
|
|
content-style="44"
|
|
|
@contextmenu="contextmenu"
|
|
|
>
|
|
|
- <ControlMatrixCard title="待启动" :datas="ls.start" :operateStyle="1" ref="start"></ControlMatrixCard>
|
|
|
- <ControlMatrixCard title="待停机" :datas="ls.stop" :operateStyle="2" ref="stop"></ControlMatrixCard>
|
|
|
- <ControlMatrixCard title="待维护" :datas="ls.maintain" :operateStyle="6" ref="maintain"></ControlMatrixCard>
|
|
|
- <ControlMatrixCard title="待取消维护" :datas="ls.unmaintain" :operateStyle="8" ref="unmaintain"></ControlMatrixCard>
|
|
|
- <ControlMatrixCard title="待复位" :datas="ls.reset" :operateStyle="5" ref="reset"></ControlMatrixCard>
|
|
|
- <el-button style="z-index:2;position:absolute;bottom:10px;right:10px;background: #292929;font-size:15px;width:90px;border:none;color:rgb(220,220,220);" size="small" @click="menuClicked({type:'lock',value:'CheckLock'})">发送</el-button>
|
|
|
+ <ControlMatrixCard
|
|
|
+ title="待启动"
|
|
|
+ :datas="ls.start"
|
|
|
+ :operateStyle="1"
|
|
|
+ ref="start"
|
|
|
+ ></ControlMatrixCard>
|
|
|
+ <ControlMatrixCard
|
|
|
+ title="待停机"
|
|
|
+ :datas="ls.stop"
|
|
|
+ :operateStyle="2"
|
|
|
+ ref="stop"
|
|
|
+ ></ControlMatrixCard>
|
|
|
+ <ControlMatrixCard
|
|
|
+ title="待维护"
|
|
|
+ :datas="ls.maintain"
|
|
|
+ :operateStyle="6"
|
|
|
+ ref="maintain"
|
|
|
+ ></ControlMatrixCard>
|
|
|
+ <ControlMatrixCard
|
|
|
+ title="待取消维护"
|
|
|
+ :datas="ls.unmaintain"
|
|
|
+ :operateStyle="8"
|
|
|
+ ref="unmaintain"
|
|
|
+ ></ControlMatrixCard>
|
|
|
+ <ControlMatrixCard
|
|
|
+ title="待复位"
|
|
|
+ :datas="ls.reset"
|
|
|
+ :operateStyle="5"
|
|
|
+ ref="reset"
|
|
|
+ ></ControlMatrixCard>
|
|
|
+ <el-button
|
|
|
+ style="
|
|
|
+ z-index: 2;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 10px;
|
|
|
+ right: 10px;
|
|
|
+ background: #292929;
|
|
|
+ font-size: 15px;
|
|
|
+ width: 90px;
|
|
|
+ border: none;
|
|
|
+ color: rgb(220, 220, 220);
|
|
|
+ "
|
|
|
+ size="small"
|
|
|
+ @click="menuClicked({ type: 'send' })"
|
|
|
+ >发送</el-button
|
|
|
+ >
|
|
|
</gy-card>
|
|
|
- <el-button-group style="z-index:3;position:absolute;top:16px;left:120px;">
|
|
|
- <el-button style="background: black;font-size:14px;width:80px;border:none;color:rgb(220,220,220);" size="mini" round>自动</el-button>
|
|
|
- <el-button style="background: #202020;font-size:14px;width:80px;border:none;color:rgb(220,220,220);" size="mini" round>手动</el-button>
|
|
|
- </el-button-group>
|
|
|
+ <el-button-group
|
|
|
+ style="z-index: 3; position: absolute; top: 16px; left: 120px"
|
|
|
+ >
|
|
|
+ <el-button :class="buttonLeftStyle" size="mini" @click="controlClick(false)"
|
|
|
+ >手动</el-button
|
|
|
+ >
|
|
|
+ <el-button :class="buttonRightStyle" size="mini" @click="controlClick(true)"
|
|
|
+ >自动</el-button
|
|
|
+ >
|
|
|
+ </el-button-group>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -30,6 +76,17 @@ export default {
|
|
|
components: {
|
|
|
ControlMatrixCard,
|
|
|
},
|
|
|
+ props: {
|
|
|
+
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ buttonLeftStyle: function () {
|
|
|
+ return this.IsAutoControl ? "button-unselected" : "button-selected";
|
|
|
+ },
|
|
|
+ buttonRightStyle: function () {
|
|
|
+ return this.IsAutoControl ? "button-selected" : "button-unselected";
|
|
|
+ },
|
|
|
+ },
|
|
|
created: function () {
|
|
|
this.initData();
|
|
|
},
|
|
@@ -42,14 +99,13 @@ export default {
|
|
|
unmaintain: { key: "待取消维护", value: [] },
|
|
|
reset: { key: "待复位", value: [] },
|
|
|
},
|
|
|
+ IsAutoControl:false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
initData: function () {
|
|
|
var mb = MessageBridge.getInstance();
|
|
|
- var vs = [
|
|
|
- { key: "/topic/suggestion", action: this.suggestion },
|
|
|
- ];
|
|
|
+ var vs = [{ key: "/topic/suggestion", action: this.suggestion }];
|
|
|
mb.register(vs);
|
|
|
},
|
|
|
suggestion(msg) {
|
|
@@ -125,7 +181,10 @@ export default {
|
|
|
{
|
|
|
label: "场外受累电网",
|
|
|
click() {
|
|
|
- that.menuClicked({ type: "lock", value: "StationPowerLineLock" });
|
|
|
+ that.menuClicked({
|
|
|
+ type: "lock",
|
|
|
+ value: "StationPowerLineLock",
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -157,14 +216,14 @@ export default {
|
|
|
if (msg.type == "lock") {
|
|
|
// 挂牌
|
|
|
var los = this.getSelectedItems();
|
|
|
- for(var id in los){
|
|
|
- los[id].lockType=msg.value;
|
|
|
+ for (var id in los) {
|
|
|
+ los[id].lockType = msg.value;
|
|
|
}
|
|
|
- bd.windturbineControl(los,true);
|
|
|
+ bd.windturbineControl(los, true);
|
|
|
} else if (msg.type == "send") {
|
|
|
// 发送
|
|
|
var vs = this.getSelectedItems(true);
|
|
|
- bd.windturbineControl(vs,false);
|
|
|
+ bd.windturbineControl(vs, false);
|
|
|
} else if (msg.type == "marking") {
|
|
|
// 标注
|
|
|
var vvs = this.getSelectedItems();
|
|
@@ -174,11 +233,11 @@ export default {
|
|
|
},
|
|
|
|
|
|
/* 获取选中的项目,isControl:是否是控制 */
|
|
|
- getSelectedItems(isControl){
|
|
|
+ getSelectedItems(isControl) {
|
|
|
var ls = new Array();
|
|
|
this.$refs.start.outputSelectedItems(ls);
|
|
|
this.$refs.stop.outputSelectedItems(ls);
|
|
|
- if(isControl) return ls;
|
|
|
+ if (isControl) return ls;
|
|
|
this.$refs.maintain.outputSelectedItems(ls);
|
|
|
this.$refs.unmaintain.outputSelectedItems(ls);
|
|
|
this.$refs.reset.outputSelectedItems(ls);
|
|
@@ -186,15 +245,49 @@ export default {
|
|
|
},
|
|
|
|
|
|
/* 清除所有选择 */
|
|
|
- clearSelected(){
|
|
|
+ clearSelected() {
|
|
|
this.$refs.start.clearSelected();
|
|
|
this.$refs.stop.clearSelected();
|
|
|
this.$refs.maintain.clearSelected();
|
|
|
this.$refs.unmaintain.clearSelected();
|
|
|
this.$refs.reset.clearSelected();
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ controlClick(isAuto) {
|
|
|
+ this.IsAutoControl = isAuto;
|
|
|
+ if (isAuto) {
|
|
|
+ this.AutoSendTimer = setInterval(this.AutoSend, 60000);
|
|
|
+ } else {
|
|
|
+ clearInterval(this.AutoSendTimer);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 自动发送命令 */
|
|
|
+ AutoSend() {
|
|
|
+ var ls = new Array();
|
|
|
+ this.$refs.start.outputAllItems(ls);
|
|
|
+ this.$refs.stop.outputAllItems(ls);
|
|
|
+ console.log("自动发送命令 " + ls.length);
|
|
|
+ if (ls.length <= 0) return;
|
|
|
+ var bd = BackgroundData.getInstance();
|
|
|
+ bd.windturbineControl(ls, false);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+.button-selected {
|
|
|
+ background: black;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 80px;
|
|
|
+ border: none;
|
|
|
+ color: rgb(220, 220, 220);
|
|
|
+}
|
|
|
+.button-unselected {
|
|
|
+ background: #202020;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 80px;
|
|
|
+ border: none;
|
|
|
+ color: rgb(220, 220, 220);
|
|
|
+}
|
|
|
</style>
|