动火作业工作流测试
This commit is contained in:
parent
8df5338155
commit
243e29568e
|
|
@ -176,7 +176,13 @@ export default {
|
||||||
req: async function(id){
|
req: async function(id){
|
||||||
return await http.get( `${config.API_URL}/wf/ticketflow/${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:{
|
field:{
|
||||||
list: {
|
list: {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
|
|
||||||
actstate_: {
|
actstate_: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
|
|
@ -81,14 +80,14 @@
|
||||||
},
|
},
|
||||||
handleShow(row) {
|
handleShow(row) {
|
||||||
let cateType = row.workflow_.key;
|
let cateType = row.workflow_.key;
|
||||||
let projectId='',operation=null;
|
let projectId = '', operation = null;
|
||||||
if(cateType==='visit'){
|
if (cateType === 'visit') {
|
||||||
projectId = row.ticket_data.visit;
|
projectId = row.ticket_data.visit;
|
||||||
}else if(cateType==='rparty'){
|
} else if (cateType === 'rparty') {
|
||||||
projectId = row.ticket_data.rpj;
|
projectId = row.ticket_data.rpj;
|
||||||
}else{
|
} else {
|
||||||
operation = row.ticket_data.operation?row.ticket_data.operation:null;
|
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
||||||
projectId = row.ticket_data.opl;
|
projectId = row.ticket_data.opl;
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "visitdetail",
|
name: "visitdetail",
|
||||||
|
|
@ -96,8 +95,8 @@
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'show',
|
type: 'show',
|
||||||
projectId: projectId,
|
projectId: projectId,
|
||||||
catetype:cateType,
|
catetype: cateType,
|
||||||
operation:operation
|
operation: operation
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,92 +1,103 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="list"
|
:data="list"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
hidePagination
|
hidePagination
|
||||||
>
|
>
|
||||||
<el-table-column label="ID" prop="id"></el-table-column>
|
<el-table-column label="ID" prop="id"></el-table-column>
|
||||||
<el-table-column label="工单标题" prop="title"></el-table-column>
|
<el-table-column label="工单标题" prop="title"></el-table-column>
|
||||||
<el-table-column label="流水号" prop="sn"></el-table-column>
|
<el-table-column label="流水号" prop="sn"></el-table-column>
|
||||||
<el-table-column label="当前状态">
|
<el-table-column label="当前状态">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.state_.name }}
|
{{ scope.row.state_.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="进行状态" prop="sort">
|
<el-table-column label="进行状态" prop="sort">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ actstate_[scope.row.act_state] }}
|
{{ actstate_[scope.row.act_state] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="关联工作流" prop="title">
|
<el-table-column label="关联工作流" prop="title">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.workflow_.name }}
|
{{ scope.row.workflow_.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理人类型">
|
<el-table-column label="处理人类型">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ participant_[scope.row.participant_type] }}
|
{{ participant_[scope.row.participant_type] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="right" width="120">
|
<el-table-column label="操作" fixed="right" align="right" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
|
<el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "state",
|
name: "state",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list:[],
|
list: [],
|
||||||
|
|
||||||
actstate_: {
|
actstate_: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
2: "被退回",
|
2: "被退回",
|
||||||
3: "被撤回",
|
3: "被撤回",
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
},
|
||||||
participant_: {
|
participant_: {
|
||||||
0: "无处理人",
|
0: "无处理人",
|
||||||
1: "个人",
|
1: "个人",
|
||||||
2: "多人",
|
2: "多人",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getList() {
|
async getList() {
|
||||||
let res = await this.$API.wf.ticket.list.req({ category: "cc",page:0 });
|
let res = await this.$API.wf.ticket.list.req({category: "cc", page: 0});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.list = res;
|
this.list = res;
|
||||||
},
|
},
|
||||||
handleShow(row) {
|
handleShow(row) {
|
||||||
this.$router.push({
|
let cateType = row.workflow_.key;
|
||||||
name: "visitdetail",
|
let projectId = '', operation = null;
|
||||||
query: {
|
if (cateType === 'visit') {
|
||||||
id: row.id,
|
projectId = row.ticket_data.visit;
|
||||||
type: 'show',
|
} else if (cateType === 'rparty') {
|
||||||
projectId: row.ticket_data.visit,
|
projectId = row.ticket_data.rpj;
|
||||||
catetype : row.workflow_.key
|
} 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: projectId,
|
||||||
|
catetype: cateType,
|
||||||
|
operation: operation
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,6 @@
|
||||||
>
|
>
|
||||||
处理
|
处理
|
||||||
</el-link>
|
</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"
|
<el-button v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
||||||
type="text" size="small" @click="handleAccept(scope.row)">
|
type="text" size="small" @click="handleAccept(scope.row)">
|
||||||
接单
|
接单
|
||||||
|
|
@ -68,39 +60,11 @@
|
||||||
<el-dialog v-model="limitedFlowLogs" title="工单日志">
|
<el-dialog v-model="limitedFlowLogs" title="工单日志">
|
||||||
<ticket-log ref="ticketLogs" :ticket="ticketId"></ticket-log>
|
<ticket-log ref="ticketLogs" :ticket="ticketId"></ticket-log>
|
||||||
</el-dialog>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ticketLog from "./details.vue";
|
import ticketLog from "./details.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ticketLog,
|
ticketLog,
|
||||||
|
|
@ -122,9 +86,9 @@
|
||||||
1: "个人",
|
1: "个人",
|
||||||
2: "多人",
|
2: "多人",
|
||||||
},
|
},
|
||||||
floeLogs:[],
|
floeLogs: [],
|
||||||
ticketId:'',
|
ticketId: '',
|
||||||
limitedFlowLogs:false,
|
limitedFlowLogs: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -137,22 +101,22 @@
|
||||||
this.list = res;
|
this.list = res;
|
||||||
},
|
},
|
||||||
//处理
|
//处理
|
||||||
handleDetail(row){
|
handleDetail(row) {
|
||||||
let projectId='',operation=null;
|
let projectId = '', operation = null;
|
||||||
let catetype = row.workflow_.key;
|
let catetype = row.workflow_.key;
|
||||||
if(catetype==='visit'){
|
if (catetype === 'visit') {
|
||||||
projectId=row.ticket_data.visit;
|
projectId = row.ticket_data.visit;
|
||||||
}else if(catetype==='Fire'){
|
} else if (catetype === 'Fire') {
|
||||||
projectId=row.ticket_data.opl;
|
projectId = row.ticket_data.opl;
|
||||||
operation = row.ticket_data.operation?row.ticket_data.operation:null;
|
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "visitdetail",
|
name: "visitdetail",
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
projectId:projectId,
|
projectId: projectId,
|
||||||
catetype:row.workflow_.key,
|
catetype: row.workflow_.key,
|
||||||
operation:operation
|
operation: operation
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -162,10 +126,10 @@
|
||||||
let id = row.id;
|
let id = row.id;
|
||||||
this.ticketId = row.id;
|
this.ticketId = row.id;
|
||||||
that.limitedFlowLogs = true;
|
that.limitedFlowLogs = true;
|
||||||
that.$API.wf.ticket.ticketFlow.req({ticket:id}).then(res => {
|
that.$API.wf.ticket.ticketFlow.req({ticket: id}).then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
that.floeLogs = res.results;
|
that.floeLogs = res.results;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
userId:this.$TOOL.data.get("USER_INFO").id,
|
userId: this.$TOOL.data.get("USER_INFO").id,
|
||||||
actstate_: {
|
actstate_: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
|
|
@ -95,8 +95,8 @@
|
||||||
},
|
},
|
||||||
handleLabel: '撤回原因',
|
handleLabel: '撤回原因',
|
||||||
handleTitle: '撤回工单',
|
handleTitle: '撤回工单',
|
||||||
ticketId:null,
|
ticketId: null,
|
||||||
limitedRetreat:false,
|
limitedRetreat: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -105,13 +105,24 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleShow(row) {
|
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({
|
this.$router.push({
|
||||||
name: "visitdetail",
|
name: "visitdetail",
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'show',
|
type: 'show',
|
||||||
projectId: row.ticket_data.visit,
|
projectId: projectId,
|
||||||
catetype:row.workflow_.key
|
catetype: cateType,
|
||||||
|
operation: operation
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -137,7 +148,7 @@
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
let res = '';
|
let res = '';
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$confirm('确认'+that.handleTitle+'吗?', "温馨提示", {
|
that.$confirm('确认' + that.handleTitle + '吗?', "温馨提示", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
|
|
@ -148,9 +159,9 @@
|
||||||
} else {
|
} else {
|
||||||
res = that.$API.wf.ticket.ticketClose.req(that.ticketId, that.handleForm);
|
res = that.$API.wf.ticket.ticketClose.req(that.ticketId, that.handleForm);
|
||||||
}
|
}
|
||||||
if(res.err_msg){
|
if (res.err_msg) {
|
||||||
that.getList();
|
that.getList();
|
||||||
}else{
|
} else {
|
||||||
that.limitedRetreat = false;
|
that.limitedRetreat = false;
|
||||||
that.getList();
|
that.getList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<el-card style="margin-bottom: 10px">
|
<el-card style="margin-bottom: 10px;position: relative">
|
||||||
<work-step ref="workStep"></work-step>
|
<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>
|
||||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='visit'">
|
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='visit'">
|
||||||
<el-descriptions title="来访信息" :column="3">
|
<el-descriptions title="来访信息" :column="3">
|
||||||
|
|
@ -74,7 +82,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<el-link type="primary" @click="showMore"> 更多信息 </el-link>
|
<el-link type="primary" @click="showMore"> 更多信息</el-link>
|
||||||
</div>
|
</div>
|
||||||
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -103,7 +111,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<el-link type="primary" @click="showMoreInfo"> 作业许可证详情 </el-link>
|
<el-link type="primary" @click="showMoreInfo"> 作业许可证详情</el-link>
|
||||||
</div>
|
</div>
|
||||||
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -111,43 +119,23 @@
|
||||||
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
|
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
|
||||||
<scTitle title="处理"></scTitle>
|
<scTitle title="处理"></scTitle>
|
||||||
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
||||||
<el-form-item label="处理意见">
|
<el-form-item label="作业情况:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
|
||||||
<el-input v-model="form.suggestion" clearable></el-input>
|
<el-select v-model="form.close_note" placeholder="选择关闭原因">
|
||||||
</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-option
|
<el-option
|
||||||
v-for="item in reasonOption"
|
v-for="item in noteOption"
|
||||||
:key="item"
|
:key="item.id"
|
||||||
:label="item"
|
:label="item.name"
|
||||||
:value="item"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关闭确认:">
|
<el-form-item label="关闭处理:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
|
||||||
<el-checkbox-group v-model="form.review">
|
<el-checkbox-group v-model="form.close_dos">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-for="(item, index) in reviewOption"
|
v-for="(item, index) in dosOption"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item"
|
:label="item.id"
|
||||||
>{{ item }}
|
>{{ item.name }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -156,15 +144,22 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div v-if="ticketDetail.in_add_node" style="text-align: right">
|
<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>
|
||||||
<div v-else style="display: flex;justify-content: space-between;">
|
<div v-else style="display: flex;justify-content: space-between;">
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="addNode">加签</el-button>
|
<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>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -177,7 +172,8 @@
|
||||||
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right">
|
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right">
|
||||||
<el-form-item label="处理人">
|
<el-form-item label="处理人">
|
||||||
<el-input style="width: 50%;" v-model="userName" disabled placeholder="选择处理人"></el-input>
|
<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>
|
||||||
<el-form-item label="加签原因">
|
<el-form-item label="加签原因">
|
||||||
<el-input type="textarea" :rows="3" v-model="addForm.suggestion" placeholder="加签原因"/>
|
<el-input type="textarea" :rows="3" v-model="addForm.suggestion" placeholder="加签原因"/>
|
||||||
|
|
@ -233,24 +229,24 @@
|
||||||
visitDetail: [],
|
visitDetail: [],
|
||||||
employeeLists: [],
|
employeeLists: [],
|
||||||
operationBtn: [],
|
operationBtn: [],
|
||||||
form:{
|
form: {
|
||||||
suggestion:'',
|
suggestion: '',
|
||||||
reason:'',
|
close_note: '',
|
||||||
review:'',
|
close_dos: [],
|
||||||
},
|
},
|
||||||
addForm:{
|
addForm: {
|
||||||
suggestion:'',
|
suggestion: '',
|
||||||
toadd_user:'',
|
toadd_user: '',
|
||||||
},
|
},
|
||||||
deliverForm:{
|
deliverForm: {
|
||||||
suggestion:'',
|
suggestion: '',
|
||||||
target_user:'',
|
target_user: '',
|
||||||
},
|
},
|
||||||
rpjShow:false,
|
rpjShow: false,
|
||||||
limitedAdd:false,
|
limitedAdd: false,
|
||||||
showLimited:false,
|
showLimited: false,
|
||||||
limitedDeliver:false,
|
limitedDeliver: false,
|
||||||
limitedUserSelect:false,
|
limitedUserSelect: false,
|
||||||
purpose_: {
|
purpose_: {
|
||||||
10: "参观",
|
10: "参观",
|
||||||
20: "拜访",
|
20: "拜访",
|
||||||
|
|
@ -270,12 +266,16 @@
|
||||||
40: "进行中",
|
40: "进行中",
|
||||||
50: "已完成",
|
50: "已完成",
|
||||||
},
|
},
|
||||||
reasonOption:['作业正常结束','因计划改变停止作业','因发生异常终止作业','其他'],
|
noteOption: [
|
||||||
reviewOption:['现场已清理','人员已清点','火种已熄灭','其他'],
|
{id: 10, name: '作业正常结束'},
|
||||||
// reviewOption:['现场已清理','人员已清点','火种已熄灭','其他'],
|
{id: 20, name: '因计划改变停止作业'},
|
||||||
|
{id: 30, name: '因发生异常终止作业'},
|
||||||
|
{id: 40, name: '其他'},
|
||||||
|
],
|
||||||
|
dosOption: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created(){
|
created() {
|
||||||
this.ticketId = this.$route.query.id;
|
this.ticketId = this.$route.query.id;
|
||||||
this.type = this.$route.query.type;
|
this.type = this.$route.query.type;
|
||||||
this.projectId = this.$route.query.projectId;
|
this.projectId = this.$route.query.projectId;
|
||||||
|
|
@ -285,25 +285,37 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
debugger;
|
debugger;
|
||||||
if(this.cateType==='visit'){
|
if (this.cateType === 'visit') {
|
||||||
this.getVisit();
|
this.getVisit();
|
||||||
}else if(this.cateType==='rparty'){
|
} else if (this.cateType === 'rparty') {
|
||||||
this.getRpj();
|
this.getRpj();
|
||||||
}else{
|
} else {
|
||||||
if(this.operation!==null){
|
if (this.operation !== null) {
|
||||||
this.getOperation();
|
this.getOperation();
|
||||||
}else{
|
} else {
|
||||||
this.getOpl();
|
this.getOpl();
|
||||||
}
|
}
|
||||||
|
this.getCloseDos();
|
||||||
}
|
}
|
||||||
this.getticketItem();
|
this.getticketItem();
|
||||||
this.getBtns();
|
this.getBtns();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showMore(){
|
//关闭工作
|
||||||
|
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.rpjShow = true;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.$refs.showDialog.open().setData({id:this.projectId});
|
this.$refs.showDialog.open().setData({id: this.projectId});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//工单详情
|
//工单详情
|
||||||
|
|
@ -313,8 +325,8 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取应有的流转
|
//获取应有的流转
|
||||||
getBtns(){
|
getBtns() {
|
||||||
this.$API.wf.ticket.ticketTransitions.req(this.ticketId).then(res=>{
|
this.$API.wf.ticket.ticketTransitions.req(this.ticketId).then(res => {
|
||||||
this.operationBtn = res;
|
this.operationBtn = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -327,68 +339,70 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
//入厂项目详情
|
//入厂项目详情
|
||||||
getRpj(){
|
getRpj() {
|
||||||
this.$API.rpm.rpj.item.req(this.projectId).then((res) => {
|
this.$API.rpm.rpj.item.req(this.projectId).then((res) => {
|
||||||
debugger;
|
debugger;
|
||||||
this.rpjDetail = res;
|
this.rpjDetail = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//许可证详情
|
//许可证详情
|
||||||
getOpl(){
|
getOpl() {
|
||||||
this.$API.opm.opl.read.req(this.projectId).then((res) => {
|
this.$API.opm.opl.read.req(this.projectId).then((res) => {
|
||||||
debugger;
|
debugger;
|
||||||
this.oplDetail = res;
|
this.oplDetail = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//作业详情
|
//作业详情
|
||||||
getOperation(){
|
getOperation() {
|
||||||
debugger;
|
debugger;
|
||||||
this.$API.opm.operation.read.req(this.operation).then((res) => {
|
this.$API.opm.operation.read.req(this.operation).then((res) => {
|
||||||
debugger;
|
debugger;
|
||||||
this.oplDetail = res;
|
this.oplDetail = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
showMoreInfo(){
|
showMoreInfo() {
|
||||||
this.showLimited = true;
|
this.showLimited = true;
|
||||||
},
|
},
|
||||||
//加签处理-start
|
//加签处理-start
|
||||||
addNode(){
|
addNode() {
|
||||||
this.limitedAdd = true;
|
this.limitedAdd = true;
|
||||||
},
|
},
|
||||||
addCancel(){
|
addCancel() {
|
||||||
this.limitedAdd = false;
|
this.limitedAdd = false;
|
||||||
},
|
},
|
||||||
addNodeHandlerSubmit(data) {
|
addNodeHandlerSubmit(data) {
|
||||||
this.addForm.toadd_user=data.id;
|
this.addForm.toadd_user = data.id;
|
||||||
this.userName=data.name;
|
this.userName = data.name;
|
||||||
},
|
},
|
||||||
addNodeHandler(index){
|
addNodeHandler(index) {
|
||||||
let res = null;
|
let res = null;
|
||||||
if(index==='1'){
|
if (index === '1') {
|
||||||
res = this.$API.wf.ticket.addNode.req(this.ticketId,this.addForm);
|
res = this.$API.wf.ticket.addNode.req(this.ticketId, this.addForm);
|
||||||
}else{
|
} else {
|
||||||
res = this.$API.wf.ticket.addNodeEnd.req(this.ticketId,this.form);
|
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.limitedAdd = false;
|
||||||
this.$router.push("dutywork");
|
this.$router.push("dutywork");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//加签处理-end
|
//加签处理-end
|
||||||
//转交处理-start
|
//转交处理-start
|
||||||
deliverNode(){
|
deliverNode() {
|
||||||
this.limitedDeliver = true;
|
this.limitedDeliver = true;
|
||||||
},
|
},
|
||||||
deliverCancel(){
|
deliverCancel() {
|
||||||
this.limitedDeliver = false;
|
this.limitedDeliver = false;
|
||||||
},
|
},
|
||||||
deliverHandlerSubmit(data) {
|
deliverHandlerSubmit(data) {
|
||||||
this.deliverForm.target_user=data.id;
|
this.deliverForm.target_user = data.id;
|
||||||
this.userName=data.name;
|
this.userName = data.name;
|
||||||
},
|
},
|
||||||
deliverNodeHandler(){
|
deliverNodeHandler() {
|
||||||
this.$API.wf.ticket.ticketDeliver.req(this.ticketId,this.deliverForm).then(res=>{
|
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.limitedDeliver = false;
|
||||||
this.$router.push("dutywork");
|
this.$router.push("dutywork");
|
||||||
}
|
}
|
||||||
|
|
@ -396,20 +410,38 @@
|
||||||
},
|
},
|
||||||
//转交处理-end
|
//转交处理-end
|
||||||
//流转按钮触发
|
//流转按钮触发
|
||||||
operationSubmit(id){
|
operationSubmit(id) {
|
||||||
let params = new Object();
|
let params = new Object();
|
||||||
params.transition = id;
|
params.transition = id;
|
||||||
params.ticket_data = {};
|
params.ticket_data = {};
|
||||||
params.suggestion = this.form.suggestion;
|
params.suggestion = this.form.suggestion;
|
||||||
this.$API.wf.ticket.ticketHandle.req(this.ticketId,params).then(res=>{
|
if (this.ticketDetail.state_.name === '作业负责人关闭') {
|
||||||
if(res.err_msg){}else{
|
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 {
|
||||||
this.$router.push("dutywork");
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.ticketRetry {
|
||||||
|
right: 20px;
|
||||||
|
top: 30px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
|
|
||||||
actstate_: {
|
actstate_: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
|
|
@ -75,13 +74,24 @@
|
||||||
this.list = res;
|
this.list = res;
|
||||||
},
|
},
|
||||||
handleShow(row) {
|
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({
|
this.$router.push({
|
||||||
name: "visitdetail",
|
name: "visitdetail",
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'show',
|
type: 'show',
|
||||||
projectId: row.ticket_data.visit,
|
projectId: projectId,
|
||||||
catetype: row.workflow_.key
|
catetype: cateType,
|
||||||
|
operation: operation
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
<el-table-column label="#" type="index"></el-table-column>
|
<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="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="name" min-width="200"></el-table-column>
|
||||||
<el-table-column label="标识" prop="key" min-width="250"></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="150">
|
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.view_permission_check">是</span>
|
<span v-if="scope.row.view_permission_check">是</span>
|
||||||
<span v-else>否</span>
|
<span v-else>否</span>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工作流描述" prop="description" min-width="150"></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="创建时间" 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">
|
<template #default="scope">
|
||||||
<el-button link size="small" type="primary" @click="workflowShow(scope.row)"
|
<el-button link size="small" type="primary" @click="workflowShow(scope.row)"
|
||||||
v-auth="'workflow.update'">配置
|
v-auth="'workflow.update'">配置
|
||||||
|
|
@ -254,6 +254,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
filter(this.$refs.table.tableData);
|
filter(this.$refs.table.tableData);
|
||||||
return target
|
return target
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue