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

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_API_BASEURL = http://1.203.161.103:2800/api
#VUE_APP_WS_API = 'ws://localhost:8000' #VUE_APP_WS_API = 'ws://localhost:8000'
VUE_APP_API_BASEURL = http://222.222.144.147:6013/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_API_BASEURL = http://127.0.0.1:8000/api
#VUE_APP_BASEURL = http://127.0.0.1:8000 #VUE_APP_BASEURL = http://127.0.0.1:8000

View File

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

View File

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

View File

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

View File

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