工单界面修改包括工单日志等

This commit is contained in:
曹前明 2022-08-31 14:54:44 +08:00
parent ceb9365bc4
commit f81f1c17d3
10 changed files with 169 additions and 109 deletions

View File

@ -195,7 +195,6 @@ const routes = [
"meta": {
"title": "我创建的",
"icon": "el-icon-folder-add",
"perms": ["ownerwork"]
},
"component": "wf/ownerwork"
}
@ -207,7 +206,6 @@ const routes = [
"meta": {
"title": "待办工单",
"icon": "el-icon-folder-opened",
"perms": ["duty"]
},
"component": "wf/dutywork"
},
@ -217,7 +215,6 @@ const routes = [
"meta": {
"title": "我处理的",
"icon": "el-icon-expand",
"perms": ["worked"]
},
"component": "wf/worked"
},
@ -227,7 +224,6 @@ const routes = [
"meta": {
"title": "抄送我的",
"icon": "el-icon-edit-pen",
"perms": ["ccwork"]
},
"component": "wf/ccwork"
},
@ -238,7 +234,6 @@ const routes = [
"title": "工单详情",
"icon": "el-icon-menu",
"hidden": true,
"perms": ["allwork"]
},
"component": "wf/ticketdetail"
},

View File

@ -40,7 +40,7 @@
<el-table-column
label="标识"
prop="code"
width="80"
width="100"
></el-table-column>
<el-table-column label="触发" prop="trigger" width="80">
<template #default="scope">

View File

@ -175,7 +175,7 @@ export default {
wechat_enable: false,
sms_enable: true,
filter_recipient: null,
filter_area_level: null,
filter_area_level: 10,
},
//
rules: {

View File

@ -486,6 +486,7 @@
<div style="margin-top:20px;text-align:center">
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
<el-button
:loading="tLoading"
v-for=" item in initForm.transitions"
:key="item.id"
type="primary"
@ -589,6 +590,7 @@
true: "正常",
false: "不正常",
},
tLoading: false
};
},
mounted() {
@ -761,7 +763,7 @@
.req(this.formworker)
.then((res) => {
this.$message.success("创建作业人员成功");
this.$refs.workerTable.refresh();
this.getworkerList(this.oplId);
this.workerdialog = false;
})
.catch((err) => {
@ -793,7 +795,7 @@
.req(this.formgas)
.then((res) => {
this.$message.success("创建气体检测记录成功");
this.$refs.gasTable.refresh();
this.getgasList(this.oplId);
this.gasdialog = false;
})
@ -831,14 +833,13 @@
ticket.workflow = this.initForm.workflow;
ticket.ticket_data = {opl: this.oplId};
ticket.transition = id;
ticket.title = this.form.name + this.pagtitle + '申请';
ticket.title = this.form.name + '-申请';
this.tLoading = true
this.$API.wf.ticket.create.req(ticket).then((res) => {
this.tLoading = false
this.$message.success("提交成功");
this.$router.push({
name: "opl",
query: {},
});
});
this.submitOut()
}).catch(e=>{this.tLoading=false});
},
//退
@ -846,7 +847,7 @@
this.$router.push({
name: "opl",
query: {
operationid: this.$route.query.id,//ID
operationid: this.operationId,//ID
},
});

View File

@ -21,11 +21,6 @@
<el-input v-model="form.name" type="text" clearable></el-input>
</el-form-item>
</el-col>
<el-col :md="24" :sm="12" :xs="24">
<el-form-item label="具体地点" prop="place">
<el-input v-model="form.place" type="text" clearable></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="开始时间" prop="start_time">
<el-date-picker
@ -60,7 +55,7 @@
</el-col>
<el-col :md="12" :sm="24" :xs="24">
<el-form-item label="作业区域" prop="area">
<el-select v-model="form.area" placeholder="选择作业区域">
<el-select v-model="form.area" placeholder="选择作业区域" @change="areaChange">
<el-option
v-for="item in areaoptions"
:key="item.id"
@ -70,18 +65,24 @@
</el-select>
</el-form-item>
</el-col>
<el-col :md="24" :sm="12" :xs="24">
<el-form-item label="具体地点" prop="place">
<el-input v-model="form.place" type="text" clearable></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" :xs="24">
<el-form-item label="业务部门" prop="dept_bus">
<el-cascader
placeholder="选择业务部门"
@change="dept1Change"
getCheckedNodes="true"
:props="{
expandTrigger: 'hover', //
label: 'label', //
value: 'value', //
emitPath: false, // false
checkStrictly: true
}"
v-model="form.dept_bus"
:options="deptoptions"
@ -117,11 +118,27 @@
label: 'label', //
value: 'value', //
emitPath: false, // false
checkStrictly: true
}"
clearable
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" :xs="24">
<el-form-item label="监控摄像头" prop="vchannels">
<el-select
v-model="form.vchannels"
:multiple = "true"
>
<el-option
v-for="item in vchannelOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-main>
@ -171,12 +188,13 @@ export default {
deptoptions: [],
areaoptions: [],
coordinatoroptions:[],
vchannelOptions: []
};
},
mounted() {
this.getDept();
this.getArea();
this.getUser();
// this.getUser();
},
methods: {
//,
@ -194,13 +212,25 @@ export default {
this.areaoptions = res;
});
},
//
getUser() {
this.$API.system.user.list.req({ page: 0 }).then((res) => {
dept1Change(val) {
//
this.$API.system.user.list.req({ page: 0, belong_dept: val }).then((res) => {
this.coordinatoroptions = res;
});
},
areaChange(val) {
this.$API.third.tdevice.list.req({ type: 60, page: 0, area: val }).then((res) => {
this.vchannelOptions = res;
});
},
//
// getUser() {
// this.$API.system.user.list.req({ page: 0 }).then((res) => {
// this.coordinatoroptions = res;
// });
// },
//
open(mode = "add") {

View File

@ -42,7 +42,7 @@
>{{ diskData.used }}GB</el-descriptions-item
>
<el-descriptions-item label="当前使用率"
>{{ diskData.percent }}GB</el-descriptions-item
>{{ diskData.percent }}%</el-descriptions-item
>
</el-descriptions>
</el-card>

View File

@ -5,13 +5,15 @@
:data="logs"
fit
stripe
style="width: 100%;"
style="width: 100%"
height="400"
highlight-current-row
>
<el-table-column label="工单标题" min-width="100">
<template #default="scope">
<span v-if="scope.row.ticket_data.title">{{ scope.row.ticket_data.title }}</span>
<span v-if="scope.row.ticket_data.title">{{
scope.row.ticket_data.title
}}</span>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="100">
@ -19,23 +21,36 @@
<span>{{ scope.row.state_.name }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" min-width="100">
<el-table-column label="操作属性" min-width="100">
<template #default="scope">
<el-span v-if="scope.row.participant_">{{scope.row.participant_.name }}</el-span>
<el-span v-if="scope.row.participant_str">{{scope.row.participant_str }}</el-span>
<el-tag type="success" v-if="scope.row.transition_attribute == 1"
>同意</el-tag
>
<el-tag
type="success"
v-else-if="scope.row.transition_attribute == 2"
>拒绝</el-tag
>
</template>
</el-table-column>
<el-table-column
label="操作意见"
min-width="100"
prop="suggestion"
>
<el-table-column label="操作类型" min-width="100">
<template #default="scope">
<span>{{ interveneTypeOptions[scope.row.intervene_type] }}</span>
</template>
</el-table-column>
<el-table-column
label="更新时间"
min-width="100"
prop="update_time"
>
<el-table-column label="操作人" min-width="100">
<template #default="scope">
<el-span v-if="scope.row.participant_">{{
scope.row.participant_.name
}}</el-span>
<el-span v-if="scope.row.participant_str">{{
scope.row.participant_str
}}</el-span>
</template>
</el-table-column>
<el-table-column label="操作意见" min-width="100" prop="suggestion">
</el-table-column>
<el-table-column label="更新时间" min-width="100" prop="update_time">
</el-table-column>
</el-table>
</el-main>
@ -43,18 +58,32 @@
</template>
<!--工单处理详情组件-->
<script>
export default {
export default {
name: "detail",
props: {
ticket: {
type: String,
default: null
}
default: null,
},
},
data() {
return {
logs: [],
ticketId: null,
interveneTypeOptions: {
0: "正常处理",
1: "转交",
2: "加签",
3: "加签完成",
4: "接单",
5: "评论",
6: "删除",
7: "强制关闭",
8: "强制修改状态",
9: "hook",
10: "撤回",
11: "抄送",
},
};
},
mounted() {
@ -65,7 +94,7 @@
methods: {
getFlowlogss() {
let that = this;
this.$API.wf.ticket.ticketFlowlogs.req(that.ticketId).then(res => {
this.$API.wf.ticket.ticketFlowlogs.req(that.ticketId).then((res) => {
if (res.err_msg) {
} else {
that.logs = res;
@ -73,6 +102,6 @@
});
},
},
};
};
</script>

View File

@ -23,7 +23,7 @@
<el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="是否隐藏">
<template #default="scope">
<span v-if="scope.row.is_hidde"></span>
<span v-if="scope.row.is_hidden"></span>
<span v-else></span>
</template>
</el-table-column>

View File

@ -5,7 +5,7 @@
<work-step v-if="ticketDetail.state" ref="workStep" :ticket="ticketDetail"></work-step>
<el-button
class="ticketRetry"
v-if="ticketDetail.state_&&ticketDetail.state_.name==='任务执行'"
v-if="!ticketDetail.script_run_last_result"
@click="reStart"
type="primary"
>
@ -159,7 +159,7 @@
</el-button>
</div>
<div>
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item"
<el-button :loading="submitLoading" v-for="item in operationBtn" :key="item.id" class="filter-item"
:type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">
{{item.name}}
</el-button>
@ -275,6 +275,7 @@
{id: 40, name: '其他'},
],
dosOption: [],
submitLoading: false,
};
},
created() {
@ -408,16 +409,18 @@
params.transition = id;
params.ticket_data = {};
params.suggestion = this.form.suggestion;
if (this.ticketDetail.state_.name === '作业负责人关闭') {
this.submitLoading = true
if (this.ticketDetail.state_.key === 'opl_close') {
params.ticket_data.close_note = this.form.close_note;
params.ticket_data.close_dos = this.form.close_dos;
}
this.$API.wf.ticket.ticketHandle.req(this.ticketId, params).then(res => {
this.submitLoading = false;
if (res.err_msg) {
} else {
this.$router.push("dutywork");
}
})
}).catch(e=>{this.submitLoading=false;})
},
reStart() {
this.$API.wf.ticket.retryScript.req(this.ticketId).then(res => {

View File

@ -34,15 +34,17 @@
width="220px"
>
<template #default="scope">
<el-link @click="handleEdit(scope.row)">
<el-button @click="handleEdit(scope.row)" link size="small">
编辑
</el-link>
<el-link
</el-button>
<el-button
type="danger"
link
size="small"
@click="handleDelete(scope.row)"
>
删除
</el-link>
</el-button>
</template>
</el-table-column>
</scTable>