最长停留/工单执行状态查询

This commit is contained in:
曹前明 2022-09-23 17:10:43 +08:00
parent 72b5304b97
commit 7a36f1954f
5 changed files with 51 additions and 12 deletions

View File

@ -7,8 +7,8 @@ VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
# 接口地址
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
#VUE_APP_WS_API = 'ws://localhost:8000'
VUE_APP_API_BASEURL = http://222.222.144.147:6013/api
#VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
#VUE_APP_API_BASEURL = http://222.222.144.147:6013/api
VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
#VUE_APP_BASEURL = http://127.0.0.1:8000

View File

@ -94,12 +94,30 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="最短停留时间">
<el-input
v-model="form.stay_minute_min"
placeholder="最短停留时间"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="最长停留时间">
<el-input
v-model="form.stay_minute_max"
placeholder="最长停留时间"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="当前人数">
<el-input
v-model="form.count_people"
placeholder="当前人数"
clearable
disabled
></el-input>
</el-form-item>
</el-col>
@ -148,6 +166,8 @@
count_people_min: 0,
count_people_max: 1000,
count_people: 0,
stay_minute_min: 0,
stay_minute_max: 0,
cate: 10,
};
export default {

View File

@ -6,7 +6,6 @@
type="primary"
icon="el-icon-plus"
@click="add"
v-auth="'visit.create'"
></el-button>
<el-select
v-model="query.purpose"
@ -161,7 +160,6 @@
type="primary"
size="small"
@click="addpepple(scope.row, scope.$index)"
v-auth="'visit.update'"
>继续编辑
</el-button>
<el-button
@ -176,7 +174,6 @@
type="primary"
size="small"
@click="table_del(scope.row)"
v-auth="'visit.delete'"
>删除
</el-button>
</template>

View File

@ -14,6 +14,20 @@
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.script_run_last_result"
placeholder="执行状态"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in rsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-date-picker
v-model="timeRange"
@ -90,10 +104,10 @@
></el-table-column>
<el-table-column label="操作" fixed="right" align="center">
<template #default="scope">
<el-button type="text" size="small" @click="handleShow(scope.row)"
<el-button type="primary" link size="small" @click="handleShow(scope.row)"
>查看</el-button
>
<!--多人且主动接单-->
<el-button type="danger" link size="small" @click="reStart(scope.row)" v-if="scope.row.script_run_last_result==false">重试</el-button>
</template>
</el-table-column>
</scTable>
@ -124,6 +138,10 @@ export default {
1: "单人",
2: "多人",
},
rsOptions:[
{value:true, label:'成功'},
{value:false, label:'失败'},
],
wfOptions: [],
};
},
@ -136,6 +154,11 @@ export default {
this.wfOptions = res;
});
},
reStart(row) {
this.$API.wf.ticket.retryScript.req(row.id).then(res => {
this.$message.success("任务执行下发成功");
});
},
handleQuery() {
if (this.timeRange) {
this.query.start_create = this.timeRange[0];

View File

@ -432,10 +432,9 @@
},
reStart() {
this.$API.wf.ticket.retryScript.req(this.ticketId).then(res => {
if (res.err_msg) {
} else {
this.$router.push("dutywork");
}
// this.$router.push("dutywork");
this.$router.back(-1)
this.$message.success("任务执行下发成功");
});
},
},