工作流列表展示优化
This commit is contained in:
parent
a4221224b8
commit
61367639ff
|
@ -223,7 +223,7 @@
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="settingClose"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -316,6 +316,10 @@ export default {
|
||||||
this.getGroup();
|
this.getGroup();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
settingClose(){
|
||||||
|
this.dialog.save = false;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
//加载树数据
|
//加载树数据
|
||||||
async getGroup() {
|
async getGroup() {
|
||||||
let res = await this.$API.system.dept.list.req({ page: 0 });
|
let res = await this.$API.system.dept.list.req({ page: 0 });
|
||||||
|
|
|
@ -170,6 +170,7 @@
|
||||||
>查看
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="scope.row.state == 10"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
</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"
|
||||||
|
@ -42,7 +43,6 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-container>
|
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
|
@ -52,12 +52,12 @@
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
>
|
>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="工单标题"
|
label="工单标题"
|
||||||
prop="title"
|
prop="title"
|
||||||
width="180"
|
width="180"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="工作流" prop="title">
|
<el-table-column label="工作流" prop="title">
|
||||||
|
@ -92,9 +92,17 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理人类型">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ participant_[scope.row.participant_type] }}
|
<span v-if="scope.row.participant_type==1">
|
||||||
|
{{ scope.row.participant_ .name}}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="scope.row.participant_type==2">
|
||||||
|
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
无
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
@ -3,16 +3,19 @@
|
||||||
<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
|
||||||
hidePagination
|
|
||||||
>
|
>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></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">
|
||||||
|
@ -27,19 +30,52 @@
|
||||||
<el-table-column label="进行状态" prop="sort">
|
<el-table-column label="进行状态" prop="sort">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="scope.row.act_state===0?'':scope.row.act_state===1?'':scope.row.act_state===2?'danger':scope.row.act_state===3?'danger':scope.row.act_state===5?'danger':scope.row.act_state===4?'success':''"
|
:type="
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
scope.row.act_state === 0
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 1
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 2
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理人类型">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ participant_[scope.row.participant_type] }}
|
<span v-if="scope.row.participant_type==1">
|
||||||
|
{{ scope.row.participant_ .name}}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="scope.row.participant_type==2">
|
||||||
|
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
无
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看详情</el-button>
|
<el-button
|
||||||
|
text
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleShow(scope.row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
@ -48,12 +84,12 @@
|
||||||
</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": "cc"},
|
params: { category: "cc" },
|
||||||
act_states: {
|
act_states: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
|
@ -69,32 +105,31 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
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";
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "ticketdetail",
|
path: "ticketdetail",
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'show',
|
type: "show",
|
||||||
projectId: projectId,
|
projectId: projectId,
|
||||||
catetype: cateType,
|
catetype: cateType,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -8,11 +8,14 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
hidePagination
|
|
||||||
>
|
>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></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">
|
||||||
|
@ -27,29 +30,67 @@
|
||||||
<el-table-column label="进行状态" prop="sort">
|
<el-table-column label="进行状态" prop="sort">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="scope.row.act_state===0?'':scope.row.act_state===1?'':scope.row.act_state===2?'danger':scope.row.act_state===3?'danger':scope.row.act_state===5?'danger':scope.row.act_state===4?'success':''"
|
:type="
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
scope.row.act_state === 0
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 1
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 2
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理人类型">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ participant_[scope.row.participant_type] }}
|
<span v-if="scope.row.participant_type==1">
|
||||||
|
{{ scope.row.participant_ .name}}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="scope.row.participant_type==2">
|
||||||
|
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
无
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
v-if="(scope.row.act_state===1||scope.row.act_state===3)&&scope.row.state_.type===0"
|
v-if="
|
||||||
|
(scope.row.act_state === 1 || scope.row.act_state === 3) &&
|
||||||
|
scope.row.state_.type === 0
|
||||||
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleDetail(scope.row)"
|
@click="handleDetail(scope.row)"
|
||||||
>
|
>
|
||||||
处理
|
处理
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
<el-button
|
||||||
link type="success" size="small" @click="handleAccept(scope.row)">
|
v-if="
|
||||||
|
scope.row.state_.distribute_type === 1 &&
|
||||||
|
scope.row.participant_type === 2
|
||||||
|
"
|
||||||
|
link
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
@click="handleAccept(scope.row)"
|
||||||
|
>
|
||||||
接单
|
接单
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -71,9 +112,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ticketLog from "./details.vue";
|
import ticketLog from "./details.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ticketLog,
|
ticketLog,
|
||||||
},
|
},
|
||||||
|
@ -81,7 +122,7 @@
|
||||||
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: "进行中",
|
||||||
|
@ -96,24 +137,23 @@
|
||||||
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";
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "ticketdetail",
|
path: "ticketdetail",
|
||||||
|
@ -130,24 +170,23 @@
|
||||||
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;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleAccept(row) {
|
handleAccept(row) {
|
||||||
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then(res => {
|
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then((res) => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
this.$refs.table.refresh()
|
this.$refs.table.refresh();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -10,9 +10,13 @@
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
hidePagination
|
hidePagination
|
||||||
>
|
>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></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">
|
||||||
|
@ -27,34 +31,73 @@
|
||||||
<el-table-column label="进行状态" prop="sort">
|
<el-table-column label="进行状态" prop="sort">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="scope.row.act_state===0?'':scope.row.act_state===1?'':scope.row.act_state===2?'danger':scope.row.act_state===3?'danger':scope.row.act_state===5?'danger':scope.row.act_state===4?'success':''"
|
:type="
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
scope.row.act_state === 0
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 1
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 2
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理人类型">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ participant_[scope.row.participant_type] }}
|
<span v-if="scope.row.participant_type==1">
|
||||||
|
{{ scope.row.participant_ .name}}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="scope.row.participant_type==2">
|
||||||
|
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
无
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看</el-button>
|
<el-button
|
||||||
|
text
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleShow(scope.row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
<!--创建人在初始状态-->
|
<!--创建人在初始状态-->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.state_.type===1&&userId===scope.row.create_by"
|
v-if="
|
||||||
|
scope.row.state_.type === 1 && userId === scope.row.create_by
|
||||||
|
"
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
@click="handleClose(scope,'2')"
|
@click="handleClose(scope, '2')"
|
||||||
>
|
>
|
||||||
关闭
|
关闭
|
||||||
</el-button>
|
</el-button>
|
||||||
<!--如果state_.retreat/state_.type==1处于草稿状态 -->
|
<!--如果state_.retreat/state_.type==1处于草稿状态 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.state_.enable_retreat&&userId===scope.row.create_by&&scope.row.state_.type!==1"
|
v-if="
|
||||||
|
scope.row.state_.enable_retreat &&
|
||||||
|
userId === scope.row.create_by &&
|
||||||
|
scope.row.state_.type !== 1
|
||||||
|
"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleClose(scope,'1')"
|
@click="handleClose(scope, '1')"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
>
|
>
|
||||||
|
@ -65,26 +108,40 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-dialog v-model="limitedRetreat" :title="handleTitle">
|
<el-dialog v-model="limitedRetreat" :title="handleTitle">
|
||||||
<el-form ref="Form" :model="handleForm" label-width="100px" label-position="right">
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="handleForm"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
>
|
||||||
<el-form-item :label="handleLabel">
|
<el-form-item :label="handleLabel">
|
||||||
<el-input type="textarea" :rows="3" v-model="handleForm.suggestion" placeholder="原因"/>
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="3"
|
||||||
|
v-model="handleForm.suggestion"
|
||||||
|
placeholder="原因"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<el-button class="filter-item" type="" @click="handleCancel">取消</el-button>
|
<el-button class="filter-item" type="" @click="handleCancel"
|
||||||
<el-button class="filter-item" type="primary" @click="handleSubmit">确定</el-button>
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button class="filter-item" type="primary" @click="handleSubmit"
|
||||||
|
>确定</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-container>
|
</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": "owner"},
|
params: { category: "owner" },
|
||||||
userId: this.$TOOL.data.get("USER_INFO").id,
|
userId: this.$TOOL.data.get("USER_INFO").id,
|
||||||
act_states: {
|
act_states: {
|
||||||
0: "草稿中",
|
0: "草稿中",
|
||||||
|
@ -100,27 +157,26 @@
|
||||||
2: "多人",
|
2: "多人",
|
||||||
},
|
},
|
||||||
handleForm: {
|
handleForm: {
|
||||||
suggestion: '',
|
suggestion: "",
|
||||||
},
|
},
|
||||||
handleLabel: '撤回原因',
|
handleLabel: "撤回原因",
|
||||||
handleTitle: '撤回工单',
|
handleTitle: "撤回工单",
|
||||||
ticketId: null,
|
ticketId: null,
|
||||||
limitedRetreat: false,
|
limitedRetreat: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
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";
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "ticketdetail",
|
path: "ticketdetail",
|
||||||
|
@ -133,12 +189,12 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose(scope, index) {
|
handleClose(scope, index) {
|
||||||
if (index === '1') {
|
if (index === "1") {
|
||||||
this.handleTitle = '撤回工单';
|
this.handleTitle = "撤回工单";
|
||||||
this.handleLabel = '撤回原因';
|
this.handleLabel = "撤回原因";
|
||||||
} else {
|
} else {
|
||||||
this.handleTitle = '关闭工单';
|
this.handleTitle = "关闭工单";
|
||||||
this.handleLabel = '关闭原因';
|
this.handleLabel = "关闭原因";
|
||||||
}
|
}
|
||||||
this.limitedRetreat = true;
|
this.limitedRetreat = true;
|
||||||
this.ticketId = scope.row.id;
|
this.ticketId = scope.row.id;
|
||||||
|
@ -147,24 +203,31 @@
|
||||||
this.limitedRetreat = false;
|
this.limitedRetreat = false;
|
||||||
},
|
},
|
||||||
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",
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
if (that.handleTitle === '撤回工单') {
|
if (that.handleTitle === "撤回工单") {
|
||||||
res = that.$API.wf.ticket.ticketRetreat.req(that.ticketId, that.handleForm);
|
res = that.$API.wf.ticket.ticketRetreat.req(
|
||||||
|
that.ticketId,
|
||||||
|
that.handleForm
|
||||||
|
);
|
||||||
} 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.$refs.table.refresh()
|
that.$refs.table.refresh();
|
||||||
} else {
|
} else {
|
||||||
that.limitedRetreat = false;
|
that.limitedRetreat = false;
|
||||||
that.$refs.table.refresh()
|
that.$refs.table.refresh();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
@ -172,7 +235,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -8,11 +8,14 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
hidePagination
|
|
||||||
>
|
>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></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">
|
||||||
|
@ -27,19 +30,52 @@
|
||||||
<el-table-column label="进行状态" prop="sort">
|
<el-table-column label="进行状态" prop="sort">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="scope.row.act_state===0?'':scope.row.act_state===1?'':scope.row.act_state===2?'danger':scope.row.act_state===3?'danger':scope.row.act_state===5?'danger':scope.row.act_state===4?'success':''"
|
:type="
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
scope.row.act_state === 0
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 1
|
||||||
|
? ''
|
||||||
|
: scope.row.act_state === 2
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理人类型">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ participant_[scope.row.participant_type] }}
|
<span v-if="scope.row.participant_type==1">
|
||||||
|
{{ scope.row.participant_ .name}}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="scope.row.participant_type==2">
|
||||||
|
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
无
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看详情</el-button>
|
<el-button
|
||||||
|
text
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleShow(scope.row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
@ -48,12 +84,12 @@
|
||||||
</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: "进行中",
|
||||||
|
@ -69,19 +105,18 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
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";
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "ticketdetail",
|
path: "ticketdetail",
|
||||||
|
@ -94,7 +129,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
Loading…
Reference in New Issue