fix:审批添加routepack的相关流程
This commit is contained in:
parent
f2d4b447f3
commit
baf2102944
|
@ -1,207 +1,229 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.workflow"
|
v-model="query.workflow"
|
||||||
placeholder="审批流"
|
placeholder="审批流"
|
||||||
@change="handleQuery"
|
@change="handleQuery"
|
||||||
clearable
|
clearable
|
||||||
style="margin-left: 2px"
|
style="margin-left: 2px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in wfOptions"
|
v-for="item in wfOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.script_run_last_result"
|
v-model="query.script_run_last_result"
|
||||||
placeholder="任务执行状态"
|
placeholder="任务执行状态"
|
||||||
@change="handleQuery"
|
@change="handleQuery"
|
||||||
clearable
|
clearable
|
||||||
style="margin-left: 2px"
|
style="margin-left: 2px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in rsOptions"
|
v-for="item in rsOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="timeRange"
|
v-model="timeRange"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="创建时间始"
|
start-placeholder="创建时间始"
|
||||||
end-placeholder="创建时间止"
|
end-placeholder="创建时间止"
|
||||||
style="margin-left: 2px"
|
style="margin-left: 2px"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
@change="handleQuery"
|
@change="handleQuery"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
:params="params"
|
:params="params"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
>
|
>
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column
|
label="流水号"
|
||||||
label="工单标题"
|
prop="sn"
|
||||||
prop="title"
|
width="180"
|
||||||
width="180"
|
></el-table-column>
|
||||||
:show-overflow-tooltip="true"
|
<el-table-column
|
||||||
></el-table-column>
|
label="工单标题"
|
||||||
|
prop="title"
|
||||||
|
width="180"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></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">
|
||||||
{{ 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">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="
|
:type="
|
||||||
scope.row.act_state === 0
|
scope.row.act_state === 0
|
||||||
? ''
|
? ''
|
||||||
: scope.row.act_state === 1
|
: scope.row.act_state === 1
|
||||||
? ''
|
? ''
|
||||||
: scope.row.act_state === 2
|
: scope.row.act_state === 2
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 3
|
: scope.row.act_state === 3
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 5
|
: scope.row.act_state === 5
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 4
|
: scope.row.act_state === 4
|
||||||
? 'success'
|
? 'success'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>{{ act_states[scope.row.act_state] }}</el-tag
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.participant_type==2 || scope.row.participant_type == 1">
|
<span
|
||||||
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
v-if="
|
||||||
</span>
|
scope.row.participant_type == 2 ||
|
||||||
<span v-else>
|
scope.row.participant_type == 1
|
||||||
无
|
"
|
||||||
</span>
|
>
|
||||||
</template>
|
<span
|
||||||
</el-table-column>
|
v-for="item in scope.row.participant_"
|
||||||
<el-table-column
|
:key="item.id"
|
||||||
label="创建时间"
|
>{{ item.name }}/</span
|
||||||
prop="create_time"
|
>
|
||||||
width="150"
|
</span>
|
||||||
></el-table-column>
|
<span v-else> 无 </span>
|
||||||
<el-table-column label="操作" fixed="right" align="center">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<el-button type="primary" link size="small" @click="handleShow(scope.row)"
|
<el-table-column
|
||||||
>查看</el-button
|
label="创建时间"
|
||||||
>
|
prop="create_time"
|
||||||
<el-button type="danger" link size="small" @click="reStart(scope.row)" v-if="scope.row.script_run_last_result==false">重试</el-button>
|
width="150"
|
||||||
</template>
|
></el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="操作" fixed="right" align="center">
|
||||||
</scTable>
|
<template #default="scope">
|
||||||
</el-main>
|
<el-button
|
||||||
</el-container>
|
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>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "state",
|
name: "state",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
query: {},
|
query: {},
|
||||||
timeRange: [],
|
timeRange: [],
|
||||||
list: [],
|
list: [],
|
||||||
apiObj: this.$API.wf.ticket.list,
|
apiObj: this.$API.wf.ticket.list,
|
||||||
params: { category: "all" },
|
params: { category: "all" },
|
||||||
act_states: {
|
act_states: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
2: "被退回",
|
2: "被退回",
|
||||||
3: "被撤回",
|
3: "被撤回",
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
|
||||||
participant_: {
|
|
||||||
0: "无处理人",
|
|
||||||
1: "单人",
|
|
||||||
2: "多人",
|
|
||||||
},
|
|
||||||
rsOptions:[
|
|
||||||
{value:true, label:'成功'},
|
|
||||||
{value:false, label:'失败'},
|
|
||||||
],
|
|
||||||
wfOptions: [],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getWfOptions();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getWfOptions() {
|
|
||||||
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
|
|
||||||
this.wfOptions = res;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
reStart(row) {
|
|
||||||
|
|
||||||
this.$API.wf.ticket.retryScript.req(row.id).then(res => {
|
|
||||||
this.$message.success("任务执行下发成功");
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handleQuery() {
|
participant_: {
|
||||||
if (this.timeRange) {
|
0: "无处理人",
|
||||||
this.query.start_create = this.timeRange[0];
|
1: "单人",
|
||||||
this.query.end_create = this.timeRange[1];
|
2: "多人",
|
||||||
} else {
|
},
|
||||||
this.query.end_create = null;
|
rsOptions: [
|
||||||
this.query.start_create = null;
|
{ value: true, label: "成功" },
|
||||||
}
|
{ value: false, label: "失败" },
|
||||||
this.$refs.table.queryData(this.query);
|
],
|
||||||
},
|
wfOptions: [],
|
||||||
handleShow(row) {
|
};
|
||||||
let cateType = row.workflow_.key;
|
},
|
||||||
let projectId = null;
|
mounted() {
|
||||||
if (cateType === "visit") {
|
this.getWfOptions();
|
||||||
projectId = row.ticket_data.visit;
|
},
|
||||||
} else if (cateType === "rpj") {
|
methods: {
|
||||||
projectId = row.ticket_data.rpj;
|
getWfOptions() {
|
||||||
} else if (cateType.indexOf("opl_") != -1) {
|
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
|
||||||
// operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
this.wfOptions = res;
|
||||||
projectId = row.ticket_data.opl;
|
});
|
||||||
cateType = "opl";
|
},
|
||||||
}
|
reStart(row) {
|
||||||
this.$router.push({
|
this.$API.wf.ticket.retryScript.req(row.id).then((res) => {
|
||||||
path: "ticketdetail",
|
this.$message.success("任务执行下发成功");
|
||||||
query: {
|
this.$refs.table.refresh();
|
||||||
id: row.id,
|
});
|
||||||
type: "show",
|
},
|
||||||
projectId: projectId,
|
handleQuery() {
|
||||||
catetype: cateType,
|
if (this.timeRange) {
|
||||||
// operation: operation
|
this.query.start_create = this.timeRange[0];
|
||||||
},
|
this.query.end_create = this.timeRange[1];
|
||||||
});
|
} else {
|
||||||
},
|
this.query.end_create = null;
|
||||||
},
|
this.query.start_create = null;
|
||||||
|
}
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
handleShow(row) {
|
||||||
|
let cateType = row.workflow_.key;
|
||||||
|
let projectId = null;
|
||||||
|
if (cateType === "visit") {
|
||||||
|
projectId = row.ticket_data.visit;
|
||||||
|
} else if (cateType === "rpj") {
|
||||||
|
projectId = row.ticket_data.rpj;
|
||||||
|
} else if (cateType.indexOf("opl_") != -1) {
|
||||||
|
// operation = row.ticket_data.operation ? row.ticket_data.operation : null;
|
||||||
|
projectId = row.ticket_data.opl;
|
||||||
|
cateType = "opl";
|
||||||
|
} else if (cateType == "routepack") {
|
||||||
|
projectId = row.ticket_data.t_id;
|
||||||
|
}
|
||||||
|
this.$router.push({
|
||||||
|
path: "ticketdetail",
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
type: "show",
|
||||||
|
projectId: projectId,
|
||||||
|
catetype: cateType,
|
||||||
|
// operation: operation
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
</style>
|
|
||||||
|
|
|
@ -1,92 +1,103 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
:params="params"
|
:params="params"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
>
|
>
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column
|
label="流水号"
|
||||||
label="工单标题"
|
prop="sn"
|
||||||
prop="title"
|
width="180"
|
||||||
width="180"
|
></el-table-column>
|
||||||
:show-overflow-tooltip="true"
|
<el-table-column
|
||||||
></el-table-column>
|
label="工单标题"
|
||||||
|
prop="title"
|
||||||
|
width="180"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></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">
|
||||||
{{ 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">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="
|
:type="
|
||||||
scope.row.act_state === 0
|
scope.row.act_state === 0
|
||||||
? ''
|
? ''
|
||||||
: scope.row.act_state === 1
|
: scope.row.act_state === 1
|
||||||
? ''
|
? ''
|
||||||
: scope.row.act_state === 2
|
: scope.row.act_state === 2
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 3
|
: scope.row.act_state === 3
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 5
|
: scope.row.act_state === 5
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 4
|
: scope.row.act_state === 4
|
||||||
? 'success'
|
? 'success'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>{{ act_states[scope.row.act_state] }}</el-tag
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.participant_type==2 || scope.row.participant_type == 1">
|
<span
|
||||||
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
v-if="
|
||||||
</span>
|
scope.row.participant_type == 2 ||
|
||||||
<span v-else>
|
scope.row.participant_type == 1
|
||||||
无
|
"
|
||||||
</span>
|
>
|
||||||
</template>
|
<span
|
||||||
</el-table-column>
|
v-for="item in scope.row.participant_"
|
||||||
<el-table-column
|
:key="item.id"
|
||||||
label="创建时间"
|
>{{ item.name }}/</span
|
||||||
prop="create_time"
|
>
|
||||||
width="150"
|
</span>
|
||||||
></el-table-column>
|
<span v-else> 无 </span>
|
||||||
<el-table-column label="操作" align="center">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<el-button
|
<el-table-column
|
||||||
link
|
label="创建时间"
|
||||||
size="small"
|
prop="create_time"
|
||||||
type="primary"
|
width="150"
|
||||||
@click="handleDetail(scope.row)"
|
></el-table-column>
|
||||||
>
|
<el-table-column label="操作" align="center">
|
||||||
处理
|
<template #default="scope">
|
||||||
</el-button>
|
<el-button
|
||||||
<el-button
|
link
|
||||||
v-if="
|
size="small"
|
||||||
scope.row.state_.distribute_type === 1 &&
|
type="primary"
|
||||||
scope.row.participant_type === 2
|
@click="handleDetail(scope.row)"
|
||||||
"
|
>
|
||||||
link
|
处理
|
||||||
type="success"
|
</el-button>
|
||||||
size="small"
|
<el-button
|
||||||
@click="handleAccept(scope.row)"
|
v-if="
|
||||||
>
|
scope.row.state_.distribute_type === 1 &&
|
||||||
接单
|
scope.row.participant_type === 2
|
||||||
</el-button>
|
"
|
||||||
<!-- <el-button
|
link
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
@click="handleAccept(scope.row)"
|
||||||
|
>
|
||||||
|
接单
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -94,93 +105,94 @@
|
||||||
>
|
>
|
||||||
工单日志
|
工单日志
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<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>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ticketLog from "./details.vue";
|
import ticketLog from "./details.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ticketLog,
|
ticketLog,
|
||||||
},
|
},
|
||||||
name: "state",
|
name: "state",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: this.$API.wf.ticket.list,
|
apiObj: this.$API.wf.ticket.list,
|
||||||
params: { category: "duty" },
|
params: { category: "duty" },
|
||||||
act_states: {
|
act_states: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
2: "被退回",
|
2: "被退回",
|
||||||
3: "被撤回",
|
3: "被撤回",
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
},
|
||||||
participant_: {
|
participant_: {
|
||||||
0: "无处理人",
|
0: "无处理人",
|
||||||
1: "个人",
|
1: "个人",
|
||||||
2: "多人",
|
2: "多人",
|
||||||
},
|
},
|
||||||
floeLogs: [],
|
floeLogs: [],
|
||||||
ticketId: "",
|
ticketId: "",
|
||||||
limitedFlowLogs: false,
|
limitedFlowLogs: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
//处理
|
//处理
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
let cateType = row.workflow_.key;
|
let cateType = row.workflow_.key;
|
||||||
let projectId = null;
|
let projectId = null;
|
||||||
if (cateType === "visit") {
|
if (cateType === "visit") {
|
||||||
projectId = row.ticket_data.visit;
|
projectId = row.ticket_data.visit;
|
||||||
} else if (cateType === "rpj") {
|
} else if (cateType === "rpj") {
|
||||||
projectId = row.ticket_data.rpj;
|
projectId = row.ticket_data.rpj;
|
||||||
} else if (cateType.indexOf("opl_") != -1) {
|
} else if (cateType.indexOf("opl_") != -1) {
|
||||||
projectId = row.ticket_data.opl;
|
projectId = row.ticket_data.opl;
|
||||||
cateType = "opl";
|
cateType = "opl";
|
||||||
}
|
} else if (cateType == "routepack") {
|
||||||
this.$router.push({
|
projectId = row.ticket_data.t_id;
|
||||||
path: "ticketdetail",
|
}
|
||||||
query: {
|
this.$router.push({
|
||||||
id: row.id,
|
path: "ticketdetail",
|
||||||
projectId: projectId,
|
query: {
|
||||||
catetype: cateType,
|
id: row.id,
|
||||||
},
|
projectId: projectId,
|
||||||
});
|
catetype: cateType,
|
||||||
},
|
},
|
||||||
//获取日志
|
});
|
||||||
handleLogs(row) {
|
},
|
||||||
let that = this;
|
//获取日志
|
||||||
let id = row.id;
|
handleLogs(row) {
|
||||||
this.ticketId = row.id;
|
let that = this;
|
||||||
that.limitedFlowLogs = true;
|
let id = row.id;
|
||||||
that.$API.wf.ticket.ticketFlow.req({ ticket: id }).then((res) => {
|
this.ticketId = row.id;
|
||||||
if (res.err_msg) {
|
that.limitedFlowLogs = true;
|
||||||
} else {
|
that.$API.wf.ticket.ticketFlow.req({ ticket: id }).then((res) => {
|
||||||
that.floeLogs = res.results;
|
if (res.err_msg) {
|
||||||
}
|
} else {
|
||||||
});
|
that.floeLogs = res.results;
|
||||||
},
|
}
|
||||||
handleAccept(row) {
|
});
|
||||||
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then((res) => {
|
},
|
||||||
if (res.err_msg) {
|
handleAccept(row) {
|
||||||
} else {
|
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then((res) => {
|
||||||
this.$refs.table.refresh();
|
if (res.err_msg) {
|
||||||
}
|
} else {
|
||||||
});
|
this.$refs.table.refresh();
|
||||||
},
|
}
|
||||||
},
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
</style>
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,133 +1,150 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
:params="params"
|
:params="params"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
>
|
>
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column
|
label="流水号"
|
||||||
label="工单标题"
|
prop="sn"
|
||||||
prop="title"
|
width="180"
|
||||||
width="180"
|
></el-table-column>
|
||||||
:show-overflow-tooltip="true"
|
<el-table-column
|
||||||
></el-table-column>
|
label="工单标题"
|
||||||
|
prop="title"
|
||||||
|
width="180"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></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">
|
||||||
{{ 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">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="
|
:type="
|
||||||
scope.row.act_state === 0
|
scope.row.act_state === 0
|
||||||
? ''
|
? ''
|
||||||
: scope.row.act_state === 1
|
: scope.row.act_state === 1
|
||||||
? ''
|
? ''
|
||||||
: scope.row.act_state === 2
|
: scope.row.act_state === 2
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 3
|
: scope.row.act_state === 3
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 5
|
: scope.row.act_state === 5
|
||||||
? 'danger'
|
? 'danger'
|
||||||
: scope.row.act_state === 4
|
: scope.row.act_state === 4
|
||||||
? 'success'
|
? 'success'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>{{ act_states[scope.row.act_state] }}</el-tag
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.participant_type==2 || scope.row.participant_type == 1">
|
<span
|
||||||
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
v-if="
|
||||||
</span>
|
scope.row.participant_type == 2 ||
|
||||||
<span v-else>
|
scope.row.participant_type == 1
|
||||||
无
|
"
|
||||||
</span>
|
>
|
||||||
</template>
|
<span
|
||||||
</el-table-column>
|
v-for="item in scope.row.participant_"
|
||||||
<el-table-column
|
:key="item.id"
|
||||||
label="创建时间"
|
>{{ item.name }}/</span
|
||||||
prop="create_time"
|
>
|
||||||
width="150"
|
</span>
|
||||||
></el-table-column>
|
<span v-else> 无 </span>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<el-button
|
<el-table-column
|
||||||
text
|
label="创建时间"
|
||||||
size="small"
|
prop="create_time"
|
||||||
type="primary"
|
width="150"
|
||||||
@click="handleShow(scope.row)"
|
></el-table-column>
|
||||||
>查看</el-button
|
<el-table-column
|
||||||
>
|
label="操作"
|
||||||
</template>
|
fixed="right"
|
||||||
</el-table-column>
|
align="center"
|
||||||
</scTable>
|
width="100"
|
||||||
</el-main>
|
>
|
||||||
</el-container>
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleShow(scope.row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "state",
|
name: "state",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: this.$API.wf.ticket.list,
|
apiObj: this.$API.wf.ticket.list,
|
||||||
params: { category: "worked" },
|
params: { category: "worked" },
|
||||||
act_states: {
|
act_states: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
2: "被退回",
|
2: "被退回",
|
||||||
3: "被撤回",
|
3: "被撤回",
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
},
|
||||||
participant_: {
|
participant_: {
|
||||||
0: "无处理人",
|
0: "无处理人",
|
||||||
1: "个人",
|
1: "个人",
|
||||||
2: "多人",
|
2: "多人",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
handleShow(row) {
|
handleShow(row) {
|
||||||
let cateType = row.workflow_.key;
|
let cateType = row.workflow_.key;
|
||||||
let projectId = null;
|
let projectId = null;
|
||||||
if (cateType === "visit") {
|
if (cateType === "visit") {
|
||||||
projectId = row.ticket_data.visit;
|
projectId = row.ticket_data.visit;
|
||||||
} else if (cateType === "rpj") {
|
} else if (cateType === "rpj") {
|
||||||
projectId = row.ticket_data.rpj;
|
projectId = row.ticket_data.rpj;
|
||||||
} else if (cateType.indexOf("opl_") != -1) {
|
} else if (cateType.indexOf("opl_") != -1) {
|
||||||
projectId = row.ticket_data.opl;
|
projectId = row.ticket_data.opl;
|
||||||
cateType = "opl";
|
cateType = "opl";
|
||||||
}
|
} else if (cateType == "routepack") {
|
||||||
this.$router.push({
|
projectId = row.ticket_data.t_id;
|
||||||
path: "ticketdetail",
|
}
|
||||||
query: {
|
this.$router.push({
|
||||||
id: row.id,
|
path: "ticketdetail",
|
||||||
type: "show",
|
query: {
|
||||||
projectId: projectId,
|
id: row.id,
|
||||||
catetype: cateType,
|
type: "show",
|
||||||
},
|
projectId: projectId,
|
||||||
});
|
catetype: cateType,
|
||||||
},
|
},
|
||||||
},
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
</style>
|
|
||||||
|
|
Loading…
Reference in New Issue