12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /* 控制区 */
- <template>
- <gy-card
- title="控制区"
- area-style="control"
- circle-style="green"
- content-style="44"
- >
- <MatrixCard title="待启动" :datas="ls.start"></MatrixCard>
- <MatrixCard title="待停机" :datas="ls.stop"></MatrixCard>
- <MatrixCard title="待维护" :datas="ls.maintain"></MatrixCard>
- <MatrixCard title="待取消维护" :datas="ls.unmaintain"></MatrixCard>
- <MatrixCard title="待复位" :datas="ls.reset"></MatrixCard>
- </gy-card>
- </template>
- <script>
- import MatrixCard from "./windturbine/MatrixCard.vue";
- import MessageBridge from "../../assets/script/MessageBridge";
- export default {
- name: "ControlArea",
- components: {
- MatrixCard,
- },
- created: function () {
- this.initData();
- },
- data() {
- return {
- ls: {
- start: { key: "待启动", value: [] },
- stop: { key: "待停机", value: [] },
- maintain: { key: "待维护", value: [] },
- unmaintain: { key: "待取消维护", value: [] },
- reset: { key: "待复位", value: [] },
- },
- };
- },
- methods: {
- initData: function () {
- var mb = MessageBridge.getInstance();
- var vs = [
- { key: "/topic/windturbine", action: this.windturbineMessage },
- { key: "/topic/suggestion", action: this.suggestion },
- ];
- mb.register(vs);
- },
- windturbineMessage: function (msg) {
- console.log(msg);
- },
- suggestion: function (msg) {
- console.log(msg);
- },
- },
- };
- </script>
|