This commit is contained in:
shijing 2022-08-31 14:55:00 +07:00
commit 4c49964283
10 changed files with 169 additions and 108 deletions

View File

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

View File

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

View File

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

View File

@ -486,6 +486,7 @@
<div style="margin-top:20px;text-align:center"> <div style="margin-top:20px;text-align:center">
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button> <el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
<el-button <el-button
:loading="tLoading"
v-for=" item in initForm.transitions" v-for=" item in initForm.transitions"
:key="item.id" :key="item.id"
type="primary" type="primary"
@ -589,6 +590,7 @@
true: "正常", true: "正常",
false: "不正常", false: "不正常",
}, },
tLoading: false
}; };
}, },
mounted() { mounted() {
@ -761,7 +763,7 @@
.req(this.formworker) .req(this.formworker)
.then((res) => { .then((res) => {
this.$message.success("创建作业人员成功"); this.$message.success("创建作业人员成功");
this.$refs.workerTable.refresh(); this.getworkerList(this.oplId);
this.workerdialog = false; this.workerdialog = false;
}) })
.catch((err) => { .catch((err) => {
@ -793,7 +795,7 @@
.req(this.formgas) .req(this.formgas)
.then((res) => { .then((res) => {
this.$message.success("创建气体检测记录成功"); this.$message.success("创建气体检测记录成功");
this.$refs.gasTable.refresh(); this.getgasList(this.oplId);
this.gasdialog = false; this.gasdialog = false;
}) })
@ -831,14 +833,13 @@
ticket.workflow = this.initForm.workflow; ticket.workflow = this.initForm.workflow;
ticket.ticket_data = {opl: this.oplId}; ticket.ticket_data = {opl: this.oplId};
ticket.transition = id; 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.$API.wf.ticket.create.req(ticket).then((res) => {
this.tLoading = false
this.$message.success("提交成功"); this.$message.success("提交成功");
this.$router.push({ this.submitOut()
name: "opl", }).catch(e=>{this.tLoading=false});
query: {},
});
});
}, },
//退 //退
@ -846,7 +847,7 @@
this.$router.push({ this.$router.push({
name: "opl", name: "opl",
query: { 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-input v-model="form.name" type="text" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </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-col :md="12" :sm="12" :xs="24">
<el-form-item label="开始时间" prop="start_time"> <el-form-item label="开始时间" prop="start_time">
<el-date-picker <el-date-picker
@ -60,7 +55,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="24" :xs="24"> <el-col :md="12" :sm="24" :xs="24">
<el-form-item label="作业区域" prop="area"> <el-form-item label="作业区域" prop="area">
<el-select v-model="form.area" placeholder="选择作业区域"> <el-select v-model="form.area" placeholder="选择作业区域" @change="areaChange">
<el-option <el-option
v-for="item in areaoptions" v-for="item in areaoptions"
:key="item.id" :key="item.id"
@ -70,18 +65,24 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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-col :md="12" :sm="24" :xs="24">
<el-form-item label="业务部门" prop="dept_bus"> <el-form-item label="业务部门" prop="dept_bus">
<el-cascader <el-cascader
placeholder="选择业务部门" placeholder="选择业务部门"
@change="dept1Change"
getCheckedNodes="true" getCheckedNodes="true"
:props="{ :props="{
expandTrigger: 'hover', // expandTrigger: 'hover', //
label: 'label', // label: 'label', //
value: 'value', // value: 'value', //
emitPath: false, // false emitPath: false, // false
checkStrictly: true
}" }"
v-model="form.dept_bus" v-model="form.dept_bus"
:options="deptoptions" :options="deptoptions"
@ -117,11 +118,27 @@
label: 'label', // label: 'label', //
value: 'value', // value: 'value', //
emitPath: false, // false emitPath: false, // false
checkStrictly: true
}" }"
clearable clearable
/> />
</el-form-item> </el-form-item>
</el-col> </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-row>
</el-form> </el-form>
</el-main> </el-main>
@ -171,12 +188,13 @@ export default {
deptoptions: [], deptoptions: [],
areaoptions: [], areaoptions: [],
coordinatoroptions:[], coordinatoroptions:[],
vchannelOptions: []
}; };
}, },
mounted() { mounted() {
this.getDept(); this.getDept();
this.getArea(); this.getArea();
this.getUser(); // this.getUser();
}, },
methods: { methods: {
//, //,
@ -194,13 +212,25 @@ export default {
this.areaoptions = res; this.areaoptions = res;
}); });
}, },
// dept1Change(val) {
getUser() { //
this.$API.system.user.list.req({ page: 0 }).then((res) => { this.$API.system.user.list.req({ page: 0, belong_dept: val }).then((res) => {
this.coordinatoroptions = 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") { open(mode = "add") {

View File

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

View File

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

View File

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

View File

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

View File

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