Srvdsp.vue 4.47 KB
Newer Older
liushikai committed
1
<template>
liuxin committed
2 3 4 5 6 7 8 9
    <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"
10
                >开始</c-button
liuxin committed
11 12 13 14 15 16 17
            >
            <c-button
                size="small"
                type="primary"
                style="margin-left: 0"
                :disabled="!buttonFlag"
                @click="Stop"
18
                >停止</c-button
liuxin committed
19 20 21 22 23 24 25 26 27 28 29 30 31
            >
        </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
32
                    label="执行"
liuxin committed
33 34 35 36 37
                    width="auto"
                    type="selection"
                    prop="exeflg"
                ></el-table-column>
                <el-table-column
38
                    label="处理程序"
liuxin committed
39 40 41 42 43
                    width="auto"
                    prop="srvhdl"
                    sortable
                ></el-table-column>
                <el-table-column
44
                    label="服务"
liuxin committed
45 46 47 48
                    width="auto"
                    prop="srv"
                ></el-table-column>
                <el-table-column
49
                    label="停止"
liuxin committed
50 51 52 53
                    width="auto"
                    prop="stpflg"
                ></el-table-column>
                <el-table-column
54
                    label="成功"
liuxin committed
55 56 57 58
                    width="auto"
                    prop="cntsuc"
                ></el-table-column>
                <el-table-column
59
                    label="重试"
liuxin committed
60 61 62 63
                    width="auto"
                    prop="cntret"
                ></el-table-column>
                <el-table-column
64
                    label="错误"
liuxin committed
65 66 67 68
                    width="auto"
                    prop="cnterr"
                ></el-table-column>
                <el-table-column
69
                    label="连续错误阈值"
liuxin committed
70 71 72 73
                    width="auto"
                    prop="trsconerr"
                ></el-table-column>
                <el-table-column
74
                    label="连续错误"
liuxin committed
75 76 77 78
                    width="auto"
                    prop="cntconerr"
                ></el-table-column>
                <el-table-column
79
                    label="交易的锁定标识"
liuxin committed
80 81 82 83
                    width="auto"
                    prop="trnlckflg"
                ></el-table-column>
                <el-table-column
84
                    label="计数周期(小时)"
liuxin committed
85 86 87 88
                    width="auto"
                    prop="cnttim"
                ></el-table-column>
                <el-table-column
89
                    label="配置"
liuxin committed
90 91 92 93 94 95
                    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>