Merge branch 'ehs' of https://e.coding.net/ctcdevteam/ehs/ehs_web into ehs
This commit is contained in:
commit
4a76430e26
|
@ -321,7 +321,7 @@ export default {
|
||||||
// },
|
// },
|
||||||
rowClick(row, column, event){
|
rowClick(row, column, event){
|
||||||
if(!this.multiple){
|
if(!this.multiple){
|
||||||
this.choseData = {'id': row.id, 'name': row.name}
|
this.choseData = row;
|
||||||
this.$emit("submit", this.choseData);
|
this.$emit("submit", this.choseData);
|
||||||
this.dialoguser=false
|
this.dialoguser=false
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-cascader v-model="query.employee__belong_dept" :options="deptData" clearable placeholder="部门/单位" @change="handleQuery" :show-all-levels="false" :props="{emitPath:false}"/>
|
<el-cascader v-model="query.employee__belong_dept" :options="deptData" clearable placeholder="部门/单位" @change="handleQuery" :show-all-levels="false" :props="{emitPath:false,checkStrictly: true}"/>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="monthV"
|
v-model="monthV"
|
||||||
type="month"
|
type="month"
|
||||||
|
@ -58,22 +58,21 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="打卡类型" prop="number">
|
<el-table-column label="打卡类型" prop="number">
|
||||||
<template #default="scope">{{type_[scope.row.type]}}
|
<template #default="scope">
|
||||||
|
<el-tag :type="type_[scope.row.type].color">{{type_[scope.row.type].label}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="触发形式" prop="type">
|
<el-table-column label="触发形式" prop="type">
|
||||||
<template #default="scope">{{trigger_[scope.row.trigger]}}
|
<template #default="scope">
|
||||||
|
{{trigger_[scope.row.trigger]}}--
|
||||||
|
<span v-if="scope.row.detail">{{scope.row.detail.deviceName}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="其他信息">
|
<el-table-column label="体温(℃)">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.detail">
|
<span v-if="scope.row.detail">
|
||||||
{{scope.row.detail.deviceName}}
|
|
||||||
--
|
|
||||||
<span>
|
|
||||||
<span v-if="scope.row.detail.isOverTemp" style="color:red;font-weight:bold">{{scope.row.detail.curTemp}}</span>
|
<span v-if="scope.row.detail.isOverTemp" style="color:red;font-weight:bold">{{scope.row.detail.curTemp}}</span>
|
||||||
<span v-else style="color:green;font-weight:bold">{{scope.row.detail.curTemp}}</span>
|
<span v-else style="color:green;font-weight:bold">{{scope.row.detail.curTemp}}</span>
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -95,8 +94,8 @@ export default {
|
||||||
query: {},
|
query: {},
|
||||||
selection: [],
|
selection: [],
|
||||||
type_:{
|
type_:{
|
||||||
10: "上班打卡",
|
10: {"label": "上班打卡", "color": ""},
|
||||||
20: "下班打卡"
|
20: {"label": "下班打卡", "color": "success"}
|
||||||
},
|
},
|
||||||
epOptions:{
|
epOptions:{
|
||||||
"employee": "正式员工",
|
"employee": "正式员工",
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="form.type=='employee'">
|
<el-col :md="12" :sm="24" v-if="form.type=='employee'||form.type=='remployee'">
|
||||||
<el-form-item label="在职状态">
|
<el-form-item label="在职状态">
|
||||||
<el-select v-model="form.job_state" style="width: 100%">
|
<el-select v-model="form.job_state" style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
|
|
|
@ -274,6 +274,7 @@ export default {
|
||||||
this.$API.rpm.rcertificate.create
|
this.$API.rpm.rcertificate.create
|
||||||
.req(this.form)
|
.req(this.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
this.$refs.table.refresh();
|
||||||
this.$message.success("创建成功");
|
this.$message.success("创建成功");
|
||||||
this.dialogcart = false;
|
this.dialogcart = false;
|
||||||
return res;
|
return res;
|
||||||
|
@ -285,6 +286,7 @@ export default {
|
||||||
this.$API.rpm.rcertificate.update
|
this.$API.rpm.rcertificate.update
|
||||||
.req(this.form.id, this.form)
|
.req(this.form.id, this.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
this.$refs.table.refresh();
|
||||||
this.$message.success("修改成功");
|
this.$message.success("修改成功");
|
||||||
this.dialogcart = false;
|
this.dialogcart = false;
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="名称" prop="name" width="220"></el-table-column>
|
<el-table-column label="名称" prop="name" width="240" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column label="信用代码" prop="number" width="180">
|
<el-table-column label="信用代码" prop="number" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -43,11 +43,15 @@
|
||||||
label="联系电话"
|
label="联系电话"
|
||||||
prop="phone"
|
prop="phone"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<!-- <el-table-column
|
<el-table-column
|
||||||
label="企业地址"
|
label="所属部门"
|
||||||
prop="address"
|
prop="belong_dept"
|
||||||
width="180"
|
width="180"
|
||||||
></el-table-column> -->
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.belong_dept_name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="管理员"
|
label="管理员"
|
||||||
>
|
>
|
||||||
|
@ -59,7 +63,6 @@
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="200">
|
<el-table-column label="操作" fixed="right" align="left" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.admin==null"
|
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -94,8 +97,14 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-dialog v-model="adminvisible" title="分配账号" @closed="$emit('closed')">
|
<el-dialog v-model="adminvisible" title="分配账号(新建或选择)" @closed="$emit('closed')">
|
||||||
<el-form ref="ruleForm" :model="adminform" :rules="rules" label-width="100px">
|
<el-form ref="ruleForm" :model="adminform" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="管理员">
|
||||||
|
<span style="display:flex">
|
||||||
|
<el-input readonly v-model="adminform.admin_name"></el-input>
|
||||||
|
<ehsUserSelect :multiple="false" @submit="getAdmin"/>
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
<el-input v-model="adminform.name"></el-input>
|
<el-input v-model="adminform.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -132,6 +141,7 @@ export default {
|
||||||
permission: false,
|
permission: false,
|
||||||
},
|
},
|
||||||
adminform:{
|
adminform:{
|
||||||
|
admin: null,
|
||||||
username:"",
|
username:"",
|
||||||
},
|
},
|
||||||
apiObj: this.$API.rpm.rparty.list,
|
apiObj: this.$API.rpm.rparty.list,
|
||||||
|
@ -165,6 +175,13 @@ export default {
|
||||||
this.$refs.saveDialog.open("add");
|
this.$refs.saveDialog.open("add");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getAdmin(data){
|
||||||
|
this.adminform.admin=data.id;
|
||||||
|
this.adminform.admin_name=data.name;
|
||||||
|
this.adminform.name = data.name;
|
||||||
|
this.adminform.phone = data.phone;
|
||||||
|
this.adminform.username = data.username;
|
||||||
|
},
|
||||||
//编辑
|
//编辑
|
||||||
table_edit(row) {
|
table_edit(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<el-input v-model="form.email" type="text" clearable></el-input>
|
<el-input v-model="form.email" type="text" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="24" :sm="24" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
<el-form-item label="归属部门">
|
<el-form-item label="归属部门">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="form.belong_dept"
|
v-model="form.belong_dept"
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="24" :sm="24" :xs="24">
|
<el-col :md="24" :sm="24" :xs="24">
|
||||||
<el-form-item label="概述">
|
<el-form-item label="其他说明">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.description"
|
v-model="form.description"
|
||||||
clearable
|
clearable
|
||||||
|
@ -131,7 +131,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDeptOptions() {
|
getDeptOptions() {
|
||||||
this.$API.system.dept.list.req({page:0}).then(res=>{
|
this.$API.system.dept.list.req({page:0, type__in:'dept'}).then(res=>{
|
||||||
this.belong_dept_options = genTree(res);
|
this.belong_dept_options = genTree(res);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -175,6 +175,7 @@
|
||||||
>编辑
|
>编辑
|
||||||
</el-button>-->
|
</el-button>-->
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
|
v-if="scope.row.state == 10"
|
||||||
title="确定删除吗?"
|
title="确定删除吗?"
|
||||||
@confirm="table_del(scope.row, scope.$index)"
|
@confirm="table_del(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
},
|
},
|
||||||
//所属部门
|
//所属部门
|
||||||
getDept() {
|
getDept() {
|
||||||
this.$API.system.dept.list.req({page: 0}).then((res) => {
|
this.$API.system.dept.list.req({page: 0, type__in: 'dept'}).then((res) => {
|
||||||
this.deptoptions = genTree(res);
|
this.deptoptions = genTree(res);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
|
@ -155,6 +163,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
reStart(row) {
|
reStart(row) {
|
||||||
|
|
||||||
this.$API.wf.ticket.retryScript.req(row.id).then(res => {
|
this.$API.wf.ticket.retryScript.req(row.id).then(res => {
|
||||||
this.$message.success("任务执行下发成功");
|
this.$message.success("任务执行下发成功");
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,100 +1,135 @@
|
||||||
<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
|
||||||
hidePagination
|
>
|
||||||
>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
label="工单标题"
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></el-table-column>
|
prop="title"
|
||||||
|
width="180"
|
||||||
<el-table-column label="工作流" prop="title">
|
:show-overflow-tooltip="true"
|
||||||
<template #default="scope">
|
></el-table-column>
|
||||||
{{ scope.row.workflow_.name }}
|
|
||||||
</template>
|
<el-table-column label="工作流" prop="title">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="所在节点">
|
{{ scope.row.workflow_.name }}
|
||||||
<template #default="scope">
|
</template>
|
||||||
{{ scope.row.state_.name }}
|
</el-table-column>
|
||||||
</template>
|
<el-table-column label="所在节点">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="进行状态" prop="sort">
|
{{ scope.row.state_.name }}
|
||||||
<template #default="scope">
|
</template>
|
||||||
<el-tag
|
</el-table-column>
|
||||||
: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':''"
|
<el-table-column label="进行状态" prop="sort">
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
<template #default="scope">
|
||||||
</template>
|
<el-tag
|
||||||
</el-table-column>
|
:type="
|
||||||
<el-table-column label="处理人类型">
|
scope.row.act_state === 0
|
||||||
<template #default="scope">
|
? ''
|
||||||
{{ participant_[scope.row.participant_type] }}
|
: scope.row.act_state === 1
|
||||||
</template>
|
? ''
|
||||||
</el-table-column>
|
: scope.row.act_state === 2
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
? 'danger'
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
: scope.row.act_state === 3
|
||||||
<template #default="scope">
|
? 'danger'
|
||||||
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看详情</el-button>
|
: scope.row.act_state === 5
|
||||||
</template>
|
? 'danger'
|
||||||
</el-table-column>
|
: scope.row.act_state === 4
|
||||||
</scTable>
|
? 'success'
|
||||||
</el-main>
|
: ''
|
||||||
</el-container>
|
"
|
||||||
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<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>
|
||||||
|
</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">
|
||||||
|
<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": "cc"},
|
params: { category: "cc" },
|
||||||
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'
|
}
|
||||||
}
|
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>
|
||||||
|
|
|
@ -1,153 +1,192 @@
|
||||||
<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
|
||||||
hidePagination
|
>
|
||||||
>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
label="工单标题"
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></el-table-column>
|
prop="title"
|
||||||
|
width="180"
|
||||||
<el-table-column label="工作流" prop="title">
|
:show-overflow-tooltip="true"
|
||||||
<template #default="scope">
|
></el-table-column>
|
||||||
{{ scope.row.workflow_.name }}
|
|
||||||
</template>
|
<el-table-column label="工作流" prop="title">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="所在节点">
|
{{ scope.row.workflow_.name }}
|
||||||
<template #default="scope">
|
</template>
|
||||||
{{ scope.row.state_.name }}
|
</el-table-column>
|
||||||
</template>
|
<el-table-column label="所在节点">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="进行状态" prop="sort">
|
{{ scope.row.state_.name }}
|
||||||
<template #default="scope">
|
</template>
|
||||||
<el-tag
|
</el-table-column>
|
||||||
: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':''"
|
<el-table-column label="进行状态" prop="sort">
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
<template #default="scope">
|
||||||
</template>
|
<el-tag
|
||||||
</el-table-column>
|
:type="
|
||||||
<el-table-column label="处理人类型">
|
scope.row.act_state === 0
|
||||||
<template #default="scope">
|
? ''
|
||||||
{{ participant_[scope.row.participant_type] }}
|
: scope.row.act_state === 1
|
||||||
</template>
|
? ''
|
||||||
</el-table-column>
|
: scope.row.act_state === 2
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
? 'danger'
|
||||||
<el-table-column label="操作" align="center">
|
: scope.row.act_state === 3
|
||||||
<template #default="scope">
|
? 'danger'
|
||||||
<el-button
|
: scope.row.act_state === 5
|
||||||
link
|
? 'danger'
|
||||||
size="small"
|
: scope.row.act_state === 4
|
||||||
v-if="(scope.row.act_state===1||scope.row.act_state===3)&&scope.row.state_.type===0"
|
? 'success'
|
||||||
type="primary"
|
: ''
|
||||||
@click="handleDetail(scope.row)"
|
"
|
||||||
>
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
处理
|
>
|
||||||
</el-button>
|
</template>
|
||||||
<el-button v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
</el-table-column>
|
||||||
link type="success" size="small" @click="handleAccept(scope.row)">
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
接单
|
<template #default="scope">
|
||||||
</el-button>
|
<span v-if="scope.row.participant_type==1">
|
||||||
<el-button
|
{{ scope.row.participant_ .name}}
|
||||||
type="success"
|
</span>
|
||||||
link
|
<span v-else-if="scope.row.participant_type==2">
|
||||||
size="small"
|
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
||||||
@click="handleLogs(scope.row)"
|
</span>
|
||||||
>
|
<span v-else>
|
||||||
工单日志
|
无
|
||||||
</el-button>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
<el-table-column
|
||||||
</el-main>
|
label="创建时间"
|
||||||
</el-container>
|
prop="create_time"
|
||||||
<el-dialog v-model="limitedFlowLogs" title="工单日志">
|
width="150"
|
||||||
<ticket-log ref="ticketLogs" :ticket="ticketId"></ticket-log>
|
></el-table-column>
|
||||||
</el-dialog>
|
<el-table-column label="操作" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
v-if="
|
||||||
|
(scope.row.act_state === 1 || scope.row.act_state === 3) &&
|
||||||
|
scope.row.state_.type === 0
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
>
|
||||||
|
处理
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
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
|
||||||
|
type="success"
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
@click="handleLogs(scope.row)"
|
||||||
|
>
|
||||||
|
工单日志
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<el-dialog v-model="limitedFlowLogs" title="工单日志">
|
||||||
|
<ticket-log ref="ticketLogs" :ticket="ticketId"></ticket-log>
|
||||||
|
</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'
|
}
|
||||||
}
|
this.$router.push({
|
||||||
this.$router.push({
|
path: "ticketdetail",
|
||||||
path: "ticketdetail",
|
query: {
|
||||||
query: {
|
id: row.id,
|
||||||
id: row.id,
|
projectId: projectId,
|
||||||
projectId: projectId,
|
catetype: cateType,
|
||||||
catetype: cateType,
|
},
|
||||||
},
|
});
|
||||||
});
|
},
|
||||||
},
|
//获取日志
|
||||||
//获取日志
|
handleLogs(row) {
|
||||||
handleLogs(row) {
|
let that = this;
|
||||||
let that = this;
|
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 {
|
||||||
|
that.floeLogs = res.results;
|
||||||
} else {
|
}
|
||||||
that.floeLogs = res.results;
|
});
|
||||||
}
|
},
|
||||||
})
|
handleAccept(row) {
|
||||||
},
|
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then((res) => {
|
||||||
handleAccept(row) {
|
if (res.err_msg) {
|
||||||
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then(res => {
|
} else {
|
||||||
if (res.err_msg) {
|
this.$refs.table.refresh();
|
||||||
} else {
|
}
|
||||||
this.$refs.table.refresh()
|
});
|
||||||
}
|
},
|
||||||
})
|
},
|
||||||
},
|
};
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -1,178 +1,241 @@
|
||||||
<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
|
||||||
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
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></el-table-column>
|
label="工单标题"
|
||||||
|
prop="title"
|
||||||
<el-table-column label="工作流" prop="title">
|
width="180"
|
||||||
<template #default="scope">
|
:show-overflow-tooltip="true"
|
||||||
{{ scope.row.workflow_.name }}
|
></el-table-column>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
<el-table-column label="工作流" prop="title">
|
||||||
<el-table-column label="所在节点">
|
<template #default="scope">
|
||||||
<template #default="scope">
|
{{ scope.row.workflow_.name }}
|
||||||
{{ scope.row.state_.name }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="所在节点">
|
||||||
<el-table-column label="进行状态" prop="sort">
|
<template #default="scope">
|
||||||
<template #default="scope">
|
{{ scope.row.state_.name }}
|
||||||
<el-tag
|
</template>
|
||||||
: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':''"
|
</el-table-column>
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
<el-table-column label="进行状态" prop="sort">
|
||||||
</template>
|
<template #default="scope">
|
||||||
</el-table-column>
|
<el-tag
|
||||||
<el-table-column label="处理人类型">
|
:type="
|
||||||
<template #default="scope">
|
scope.row.act_state === 0
|
||||||
{{ participant_[scope.row.participant_type] }}
|
? ''
|
||||||
</template>
|
: scope.row.act_state === 1
|
||||||
</el-table-column>
|
? ''
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
: scope.row.act_state === 2
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
? 'danger'
|
||||||
<template #default="scope">
|
: scope.row.act_state === 3
|
||||||
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看</el-button>
|
? 'danger'
|
||||||
<!--创建人在初始状态-->
|
: scope.row.act_state === 5
|
||||||
<el-button
|
? 'danger'
|
||||||
v-if="scope.row.state_.type===1&&userId===scope.row.create_by"
|
: scope.row.act_state === 4
|
||||||
type="danger"
|
? 'success'
|
||||||
size="small"
|
: ''
|
||||||
link
|
"
|
||||||
@click="handleClose(scope,'2')"
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
>
|
>
|
||||||
关闭
|
</template>
|
||||||
</el-button>
|
</el-table-column>
|
||||||
<!--如果state_.retreat/state_.type==1处于草稿状态 -->
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
<el-button
|
<template #default="scope">
|
||||||
v-if="scope.row.state_.enable_retreat&&userId===scope.row.create_by&&scope.row.state_.type!==1"
|
<span v-if="scope.row.participant_type==1">
|
||||||
type="danger"
|
{{ scope.row.participant_ .name}}
|
||||||
@click="handleClose(scope,'1')"
|
</span>
|
||||||
size="small"
|
<span v-else-if="scope.row.participant_type==2">
|
||||||
link
|
<span v-for="item in scope.row.participant_" :key="item.id">{{ item.name}}/</span>
|
||||||
>
|
</span>
|
||||||
撤回
|
<span v-else>
|
||||||
</el-button>
|
无
|
||||||
</template>
|
</span>
|
||||||
</el-table-column>
|
</template>
|
||||||
</scTable>
|
</el-table-column>
|
||||||
</el-main>
|
<el-table-column
|
||||||
<el-dialog v-model="limitedRetreat" :title="handleTitle">
|
label="创建时间"
|
||||||
<el-form ref="Form" :model="handleForm" label-width="100px" label-position="right">
|
prop="create_time"
|
||||||
<el-form-item :label="handleLabel">
|
width="150"
|
||||||
<el-input type="textarea" :rows="3" v-model="handleForm.suggestion" placeholder="原因"/>
|
></el-table-column>
|
||||||
</el-form-item>
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
</el-form>
|
<template #default="scope">
|
||||||
<div style="text-align: center">
|
<el-button
|
||||||
<el-button class="filter-item" type="" @click="handleCancel">取消</el-button>
|
text
|
||||||
<el-button class="filter-item" type="primary" @click="handleSubmit">确定</el-button>
|
size="small"
|
||||||
</div>
|
type="primary"
|
||||||
</el-dialog>
|
@click="handleShow(scope.row)"
|
||||||
</el-container>
|
>查看</el-button
|
||||||
|
>
|
||||||
|
<!--创建人在初始状态-->
|
||||||
|
<el-button
|
||||||
|
v-if="
|
||||||
|
scope.row.state_.type === 1 && userId === scope.row.create_by
|
||||||
|
"
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
link
|
||||||
|
@click="handleClose(scope, '2')"
|
||||||
|
>
|
||||||
|
关闭
|
||||||
|
</el-button>
|
||||||
|
<!--如果state_.retreat/state_.type==1处于草稿状态 -->
|
||||||
|
<el-button
|
||||||
|
v-if="
|
||||||
|
scope.row.state_.enable_retreat &&
|
||||||
|
userId === scope.row.create_by &&
|
||||||
|
scope.row.state_.type !== 1
|
||||||
|
"
|
||||||
|
type="danger"
|
||||||
|
@click="handleClose(scope, '1')"
|
||||||
|
size="small"
|
||||||
|
link
|
||||||
|
>
|
||||||
|
撤回
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<el-dialog v-model="limitedRetreat" :title="handleTitle">
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="handleForm"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
>
|
||||||
|
<el-form-item :label="handleLabel">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="3"
|
||||||
|
v-model="handleForm.suggestion"
|
||||||
|
placeholder="原因"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-button class="filter-item" type="" @click="handleCancel"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button class="filter-item" type="primary" @click="handleSubmit"
|
||||||
|
>确定</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</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: "草稿中",
|
||||||
1: "进行中",
|
1: "进行中",
|
||||||
2: "被退回",
|
2: "被退回",
|
||||||
3: "被撤回",
|
3: "被撤回",
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
},
|
||||||
participant_: {
|
participant_: {
|
||||||
0: "无处理人",
|
0: "无处理人",
|
||||||
1: "个人",
|
1: "个人",
|
||||||
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",
|
query: {
|
||||||
query: {
|
id: row.id,
|
||||||
id: row.id,
|
type: "show",
|
||||||
type: "show",
|
projectId: projectId,
|
||||||
projectId: projectId,
|
catetype: cateType,
|
||||||
catetype: cateType,
|
},
|
||||||
},
|
});
|
||||||
});
|
},
|
||||||
},
|
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;
|
},
|
||||||
},
|
handleCancel() {
|
||||||
handleCancel() {
|
this.limitedRetreat = false;
|
||||||
this.limitedRetreat = false;
|
},
|
||||||
},
|
handleSubmit() {
|
||||||
handleSubmit() {
|
let res = "";
|
||||||
let res = '';
|
let that = this;
|
||||||
let that = this;
|
that
|
||||||
that.$confirm('确认' + that.handleTitle + '吗?', "温馨提示", {
|
.$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(
|
||||||
} else {
|
that.ticketId,
|
||||||
res = that.$API.wf.ticket.ticketClose.req(that.ticketId, that.handleForm);
|
that.handleForm
|
||||||
}
|
);
|
||||||
if (res.err_msg) {
|
} else {
|
||||||
that.$refs.table.refresh()
|
res = that.$API.wf.ticket.ticketClose.req(
|
||||||
} else {
|
that.ticketId,
|
||||||
that.limitedRetreat = false;
|
that.handleForm
|
||||||
that.$refs.table.refresh()
|
);
|
||||||
}
|
}
|
||||||
})
|
if (res.err_msg) {
|
||||||
.catch((err) => {
|
that.$refs.table.refresh();
|
||||||
console.error(err);
|
} else {
|
||||||
});
|
that.limitedRetreat = false;
|
||||||
},
|
that.$refs.table.refresh();
|
||||||
},
|
}
|
||||||
};
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -1,100 +1,135 @@
|
||||||
<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
|
||||||
hidePagination
|
>
|
||||||
>
|
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
||||||
<el-table-column label="ID" prop="id" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
|
label="工单标题"
|
||||||
<el-table-column label="工单标题" prop="title" width="180"></el-table-column>
|
prop="title"
|
||||||
|
width="180"
|
||||||
<el-table-column label="工作流" prop="title">
|
:show-overflow-tooltip="true"
|
||||||
<template #default="scope">
|
></el-table-column>
|
||||||
{{ scope.row.workflow_.name }}
|
|
||||||
</template>
|
<el-table-column label="工作流" prop="title">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="所在节点">
|
{{ scope.row.workflow_.name }}
|
||||||
<template #default="scope">
|
</template>
|
||||||
{{ scope.row.state_.name }}
|
</el-table-column>
|
||||||
</template>
|
<el-table-column label="所在节点">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="进行状态" prop="sort">
|
{{ scope.row.state_.name }}
|
||||||
<template #default="scope">
|
</template>
|
||||||
<el-tag
|
</el-table-column>
|
||||||
: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':''"
|
<el-table-column label="进行状态" prop="sort">
|
||||||
>{{act_states[scope.row.act_state]}}</el-tag>
|
<template #default="scope">
|
||||||
</template>
|
<el-tag
|
||||||
</el-table-column>
|
:type="
|
||||||
<el-table-column label="处理人类型">
|
scope.row.act_state === 0
|
||||||
<template #default="scope">
|
? ''
|
||||||
{{ participant_[scope.row.participant_type] }}
|
: scope.row.act_state === 1
|
||||||
</template>
|
? ''
|
||||||
</el-table-column>
|
: scope.row.act_state === 2
|
||||||
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
? 'danger'
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
: scope.row.act_state === 3
|
||||||
<template #default="scope">
|
? 'danger'
|
||||||
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看详情</el-button>
|
: scope.row.act_state === 5
|
||||||
</template>
|
? 'danger'
|
||||||
</el-table-column>
|
: scope.row.act_state === 4
|
||||||
</scTable>
|
? 'success'
|
||||||
</el-main>
|
: ''
|
||||||
</el-container>
|
"
|
||||||
|
>{{ act_states[scope.row.act_state] }}</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="可处理人" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<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>
|
||||||
|
</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">
|
||||||
|
<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'
|
}
|
||||||
}
|
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>
|
||||||
|
|
Loading…
Reference in New Issue