动火作业工作流测试
This commit is contained in:
parent
8df5338155
commit
243e29568e
|
|
@ -176,8 +176,14 @@ export default {
|
|||
req: async function(id){
|
||||
return await http.get( `${config.API_URL}/wf/ticketflow/${id}/`);
|
||||
}
|
||||
},
|
||||
retryScript: {
|
||||
name: "重试脚本",
|
||||
req: async function(id){
|
||||
return await http.post(`${config.API_URL}/wf/ticket/${id}/retry_script/`);
|
||||
}
|
||||
},
|
||||
},
|
||||
field:{
|
||||
list: {
|
||||
url: `${config.API_URL}/wf/customfield/`,
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
data() {
|
||||
return {
|
||||
list: [],
|
||||
|
||||
actstate_: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
|
|
|
|||
|
|
@ -75,13 +75,24 @@ export default {
|
|||
this.list = res;
|
||||
},
|
||||
handleShow(row) {
|
||||
let cateType = row.workflow_.key;
|
||||
let projectId = '', operation = null;
|
||||
if (cateType === 'visit') {
|
||||
projectId = row.ticket_data.visit;
|
||||
} else if (cateType === 'rparty') {
|
||||
projectId = row.ticket_data.rpj;
|
||||
} else {
|
||||
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
||||
projectId = row.ticket_data.opl;
|
||||
}
|
||||
this.$router.push({
|
||||
name: "visitdetail",
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'show',
|
||||
projectId: row.ticket_data.visit,
|
||||
catetype : row.workflow_.key
|
||||
projectId: projectId,
|
||||
catetype: cateType,
|
||||
operation: operation
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -42,14 +42,6 @@
|
|||
>
|
||||
处理
|
||||
</el-link>
|
||||
<!--多人处理,直接接单-->
|
||||
<!--<el-link
|
||||
v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
||||
type="primary"
|
||||
@click="handleDetail(scope.row)"
|
||||
>
|
||||
接单
|
||||
</el-link>-->
|
||||
<el-button v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
||||
type="text" size="small" @click="handleAccept(scope.row)">
|
||||
接单
|
||||
|
|
@ -68,39 +60,11 @@
|
|||
<el-dialog v-model="limitedFlowLogs" title="工单日志">
|
||||
<ticket-log ref="ticketLogs" :ticket="ticketId"></ticket-log>
|
||||
</el-dialog>
|
||||
|
||||
<!--<el-dialog v-model="limitedFlowLogs" title="工单日志">
|
||||
<el-table
|
||||
:data="floeLogs"
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%;border-top:1px solid #EBEEF5;"
|
||||
>
|
||||
<el-table-column label="工单标题">
|
||||
<template #defalut="scope">
|
||||
<span v-if="scope.row.ticket_data">{{scope.row.ticket_data.title}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进行状态">
|
||||
<template #defalut="scope">
|
||||
<span v-if="scope.row.state_">{{scope.row.state_.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.participant_">{{ scope.row.participant_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作意见" prop="suggestion">
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ticketLog from "./details.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ticketLog,
|
||||
|
|
|
|||
|
|
@ -105,13 +105,24 @@
|
|||
},
|
||||
methods: {
|
||||
handleShow(row) {
|
||||
let cateType = row.workflow_.key;
|
||||
let projectId = '', operation = null;
|
||||
if (cateType === 'visit') {
|
||||
projectId = row.ticket_data.visit;
|
||||
} else if (cateType === 'rparty') {
|
||||
projectId = row.ticket_data.rpj;
|
||||
} else {
|
||||
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
||||
projectId = row.ticket_data.opl;
|
||||
}
|
||||
this.$router.push({
|
||||
name: "visitdetail",
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'show',
|
||||
projectId: row.ticket_data.visit,
|
||||
catetype:row.workflow_.key
|
||||
projectId: projectId,
|
||||
catetype: cateType,
|
||||
operation: operation
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<el-card style="margin-bottom: 10px">
|
||||
<el-card style="margin-bottom: 10px;position: relative">
|
||||
<work-step ref="workStep"></work-step>
|
||||
<el-button
|
||||
class="ticketRetry"
|
||||
v-if="type!=='show'&&ticketDetail.state_&&ticketDetail.state_.name==='任务执行'"
|
||||
@click="reStart"
|
||||
type="primary"
|
||||
>
|
||||
重新执行
|
||||
</el-button>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='visit'">
|
||||
<el-descriptions title="来访信息" :column="3">
|
||||
|
|
@ -111,43 +119,23 @@
|
|||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
|
||||
<scTitle title="处理"></scTitle>
|
||||
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
||||
<el-form-item label="处理意见">
|
||||
<el-input v-model="form.suggestion" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="ticketDetail.in_add_node" style="text-align: right">
|
||||
<el-button v-if="ticketDetail.in_add_node" class="filter-item" type="primary" @click="addNodeHandler('2')">加签处理</el-button>
|
||||
</div>
|
||||
<div v-else style="display: flex;justify-content: space-between;">
|
||||
<div>
|
||||
<el-button type="primary" @click="addNode">加签</el-button>
|
||||
<el-button v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain @click="deliverNode">转交</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" :type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">{{item.name}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
|
||||
<scTitle title="作业票关闭"></scTitle>
|
||||
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
||||
<el-form-item label="关闭原因:">
|
||||
<el-select v-model="form.reason" placeholder="选择关闭原因">
|
||||
<el-form-item label="作业情况:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
|
||||
<el-select v-model="form.close_note" placeholder="选择关闭原因">
|
||||
<el-option
|
||||
v-for="item in reasonOption"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
v-for="item in noteOption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关闭确认:">
|
||||
<el-checkbox-group v-model="form.review">
|
||||
<el-form-item label="关闭处理:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
|
||||
<el-checkbox-group v-model="form.close_dos">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in reviewOption"
|
||||
v-for="(item, index) in dosOption"
|
||||
:key="index"
|
||||
:label="item"
|
||||
>{{ item }}
|
||||
:label="item.id"
|
||||
>{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
|
@ -156,15 +144,22 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="ticketDetail.in_add_node" style="text-align: right">
|
||||
<el-button v-if="ticketDetail.in_add_node" class="filter-item" type="primary" @click="addNodeHandler('2')">加签处理</el-button>
|
||||
<el-button v-if="ticketDetail.in_add_node" class="filter-item" type="primary"
|
||||
@click="addNodeHandler('2')">加签处理
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-else style="display: flex;justify-content: space-between;">
|
||||
<div>
|
||||
<el-button type="primary" @click="addNode">加签</el-button>
|
||||
<el-button v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain @click="deliverNode">转交</el-button>
|
||||
<el-button v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain
|
||||
@click="deliverNode">转交
|
||||
</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" :type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">{{item.name}}</el-button>
|
||||
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item"
|
||||
:type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">
|
||||
{{item.name}}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
|
@ -177,7 +172,8 @@
|
|||
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right">
|
||||
<el-form-item label="处理人">
|
||||
<el-input style="width: 50%;" v-model="userName" disabled placeholder="选择处理人"></el-input>
|
||||
<scUserSelect v-model="addForm.toadd_user" :closable="true" :multiple="false" @handlerSubmit="addNodeHandlerSubmit"></scUserSelect>
|
||||
<scUserSelect v-model="addForm.toadd_user" :closable="true" :multiple="false"
|
||||
@handlerSubmit="addNodeHandlerSubmit"></scUserSelect>
|
||||
</el-form-item>
|
||||
<el-form-item label="加签原因">
|
||||
<el-input type="textarea" :rows="3" v-model="addForm.suggestion" placeholder="加签原因"/>
|
||||
|
|
@ -235,8 +231,8 @@
|
|||
operationBtn: [],
|
||||
form: {
|
||||
suggestion: '',
|
||||
reason:'',
|
||||
review:'',
|
||||
close_note: '',
|
||||
close_dos: [],
|
||||
},
|
||||
addForm: {
|
||||
suggestion: '',
|
||||
|
|
@ -270,9 +266,13 @@
|
|||
40: "进行中",
|
||||
50: "已完成",
|
||||
},
|
||||
reasonOption:['作业正常结束','因计划改变停止作业','因发生异常终止作业','其他'],
|
||||
reviewOption:['现场已清理','人员已清点','火种已熄灭','其他'],
|
||||
// reviewOption:['现场已清理','人员已清点','火种已熄灭','其他'],
|
||||
noteOption: [
|
||||
{id: 10, name: '作业正常结束'},
|
||||
{id: 20, name: '因计划改变停止作业'},
|
||||
{id: 30, name: '因发生异常终止作业'},
|
||||
{id: 40, name: '其他'},
|
||||
],
|
||||
dosOption: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -295,11 +295,23 @@
|
|||
} else {
|
||||
this.getOpl();
|
||||
}
|
||||
this.getCloseDos();
|
||||
}
|
||||
this.getticketItem();
|
||||
this.getBtns();
|
||||
},
|
||||
methods: {
|
||||
//关闭工作
|
||||
getCloseDos() {
|
||||
this.$API.system.dict.list
|
||||
.req({page: 0, type__code: "close_options"})
|
||||
.then((res) => {
|
||||
let dosOption = res.filter(item => {
|
||||
return item.is_used
|
||||
});
|
||||
this.dosOption = dosOption.slice(0, 3)
|
||||
});
|
||||
},
|
||||
showMore() {
|
||||
this.rpjShow = true;
|
||||
this.$nextTick(() => {
|
||||
|
|
@ -369,7 +381,8 @@
|
|||
} else {
|
||||
res = this.$API.wf.ticket.addNodeEnd.req(this.ticketId, this.form);
|
||||
}
|
||||
if(res.err_msg){}else{
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
this.limitedAdd = false;
|
||||
this.$router.push("dutywork");
|
||||
}
|
||||
|
|
@ -388,7 +401,8 @@
|
|||
},
|
||||
deliverNodeHandler() {
|
||||
this.$API.wf.ticket.ticketDeliver.req(this.ticketId, this.deliverForm).then(res => {
|
||||
if(res.err_msg){}else{
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
this.limitedDeliver = false;
|
||||
this.$router.push("dutywork");
|
||||
}
|
||||
|
|
@ -401,15 +415,33 @@
|
|||
params.transition = id;
|
||||
params.ticket_data = {};
|
||||
params.suggestion = this.form.suggestion;
|
||||
if (this.ticketDetail.state_.name === '作业负责人关闭') {
|
||||
params.ticket_data.close_note = this.form.close_note;
|
||||
params.ticket_data.close_dos = this.form.close_dos;
|
||||
}
|
||||
this.$API.wf.ticket.ticketHandle.req(this.ticketId, params).then(res => {
|
||||
if(res.err_msg){}else{
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
this.$router.push("dutywork");
|
||||
}
|
||||
})
|
||||
},
|
||||
reStart() {
|
||||
this.$API.wf.ticket.retryScript.req(this.ticketId).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
this.$router.push("dutywork");
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ticketRetry {
|
||||
right: 20px;
|
||||
top: 30px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
data() {
|
||||
return {
|
||||
list: [],
|
||||
|
||||
actstate_: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
|
|
@ -75,13 +74,24 @@
|
|||
this.list = res;
|
||||
},
|
||||
handleShow(row) {
|
||||
let cateType = row.workflow_.key;
|
||||
let projectId = '', operation = null;
|
||||
if (cateType === 'visit') {
|
||||
projectId = row.ticket_data.visit;
|
||||
} else if (cateType === 'rparty') {
|
||||
projectId = row.ticket_data.rpj;
|
||||
} else {
|
||||
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
||||
projectId = row.ticket_data.opl;
|
||||
}
|
||||
this.$router.push({
|
||||
name: "visitdetail",
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'show',
|
||||
projectId: row.ticket_data.visit,
|
||||
catetype: row.workflow_.key
|
||||
projectId: projectId,
|
||||
catetype: cateType,
|
||||
operation: operation
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
|
||||
<el-table-column label="工作流名称" prop="name" min-width="250"></el-table-column>
|
||||
<el-table-column label="标识" prop="key" min-width="250"></el-table-column>
|
||||
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="150">
|
||||
<el-table-column label="工作流名称" prop="name" min-width="200"></el-table-column>
|
||||
<el-table-column label="标识" prop="key" min-width="100"></el-table-column>
|
||||
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="120">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.view_permission_check">是</span>
|
||||
<span v-else>否</span>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="工作流描述" prop="description" min-width="150"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="220">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" type="primary" @click="workflowShow(scope.row)"
|
||||
v-auth="'workflow.update'">配置
|
||||
|
|
@ -254,6 +254,7 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
filter(this.$refs.table.tableData);
|
||||
return target
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue