Srvdsp.vue 4.45 KB
Newer Older
liushikai committed
1
<template>
liuxin committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
    <div class="eibs-tab">
        <c-col :span="24" style="text-align: right">
            <c-button
                size="small"
                type="primary"
                style="margin-left: 0"
                :disabled="buttonFlag"
                @click="Start"
                >Start</c-button
            >
            <c-button
                size="small"
                type="primary"
                style="margin-left: 0"
                :disabled="!buttonFlag"
                @click="Stop"
                >Stop</c-button
            >
        </c-col>

        <c-col :span="24" style="margin-top: 10px">
            <c-table
                :border="true"
                :list="data"
                ref="table"
                style="width:80%,text-align:center"
                height="500"
                :paginationShow="false"
            >
                <el-table-column
                    label="Execute"
                    width="auto"
                    type="selection"
                    prop="exeflg"
                ></el-table-column>
                <el-table-column
                    label="Handler"
                    width="auto"
                    prop="srvhdl"
                    sortable
                ></el-table-column>
                <el-table-column
                    label="Service"
                    width="auto"
                    prop="srv"
                ></el-table-column>
                <el-table-column
                    label="Stop"
                    width="auto"
                    prop="stpflg"
                ></el-table-column>
                <el-table-column
                    label="Succ."
                    width="auto"
                    prop="cntsuc"
                ></el-table-column>
                <el-table-column
                    label="Retry"
                    width="auto"
                    prop="cntret"
                ></el-table-column>
                <el-table-column
                    label="Errors"
                    width="auto"
                    prop="cnterr"
                ></el-table-column>
                <el-table-column
                    label="Threshold"
                    width="auto"
                    prop="trsconerr"
                ></el-table-column>
                <el-table-column
                    label="Consecutive Errors"
                    width="auto"
                    prop="cntconerr"
                ></el-table-column>
                <el-table-column
                    label="Lck"
                    width="auto"
                    prop="trnlckflg"
                ></el-table-column>
                <el-table-column
                    label="Period for count (in hours)"
                    width="auto"
                    prop="cnttim"
                ></el-table-column>
                <el-table-column
                    label="Configure"
                    width="auto"
                    prop=""
                ></el-table-column>
            </c-table>
        </c-col>
    </div>
liushikai committed
96 97
</template>
<script>
98
import Api from "~/service/Api";
wangren committed
99
import commonProcess from "~/mixin/commonProcess";
100 101
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Mgrtsk/Event";
liushikai committed
102 103

export default {
liuxin committed
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
    inject: ["root"],
    props: ["model", "codes"],
    mixins: [commonProcess],
    data() {
        return {
            data: [],
            buttonFlag:false,
        };
    },
    methods: { ...Event,
        Start() {
            this.buttonFlag = false;
            let rtnmsg = this.executeRule("wfetsk.tsklist.butstr");
            if (rtnmsg.respCode == SUCCESS) {
                //TODO 处理数据逻辑
            }
        },
        Stop() {
            this.buttonFlag = true;
            let rtnmsg = this.executeRule("wfetsk.tsklist.butstp");
            if (rtnmsg.respCode == SUCCESS) {
                //TODO 处理数据逻辑
            }
        },
    },
    created: function () {},
    watch: {
        "model.wfetsk.srsmod.srslst": function () {
liuxin committed
132 133
            this.data = this.model.wfetsk.srsmod.srslst;
            this.$nextTick(() => {
liuxin committed
134 135 136 137 138 139
                for (let i = 0; i < this.data.length; i++) {
                    if (this.data[i].exeflg == "Y") {
                        this.$refs.table.$refs.table.toggleRowSelection(
                            this.data[i],
                            true
                        );
liuxin committed
140 141
                    }
                }
liuxin committed
142 143 144
            });
        },
    },
145
};
liushikai committed
146 147 148
</script>
<style>
</style>