fix conflict

This commit is contained in:
曹前明 2022-07-22 14:24:25 +08:00
commit 50f025455a
11 changed files with 407 additions and 283 deletions

View File

@ -176,7 +176,13 @@ export default {
req: async function(id){
return await http.get( `${config.API_URL}/wf/ticketflow/${id}/`);
}
}
},
retryScript: {
name: "重试脚本",
req: async function(id){
return await http.post(`${config.API_URL}/wf/ticket/${id}/retry_script/`);
}
},
},
field:{
list: {

View File

@ -172,7 +172,8 @@ const routes = [
"meta": {
"title": "工作流配置",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["workflow"]
},
"component": "wf/configuration"
}
@ -194,6 +195,7 @@ const routes = [
"meta": {
"title": "我创建的",
"icon": "el-icon-folder-add",
"perms": ["ownerwork"]
},
"component": "wf/ownerwork"
}
@ -205,6 +207,7 @@ const routes = [
"meta": {
"title": "待办工单",
"icon": "el-icon-folder-opened",
"perms": ["duty"]
},
"component": "wf/dutywork"
},
@ -214,6 +217,7 @@ const routes = [
"meta": {
"title": "我处理的",
"icon": "el-icon-expand",
"perms": ["worked"]
},
"component": "wf/worked"
},
@ -223,6 +227,7 @@ const routes = [
"meta": {
"title": "抄送我的",
"icon": "el-icon-edit-pen",
"perms": ["ccwork"]
},
"component": "wf/ccwork"
},
@ -232,7 +237,8 @@ const routes = [
"meta": {
"title": "工单详情",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["allwork"]
},
"component": "wf/visitdetail"
},
@ -277,7 +283,8 @@ const routes = [
"meta": {
"title": "作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/opl"
},
@ -287,7 +294,8 @@ const routes = [
"meta": {
"title": "动火作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/fire"
},
@ -297,7 +305,8 @@ const routes = [
"meta": {
"title": "有限空间作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/space"
},
@ -307,7 +316,8 @@ const routes = [
"meta": {
"title": "清库作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/clear"
} ,
@ -317,7 +327,8 @@ const routes = [
"meta": {
"title": "高处作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/high"
},
@ -327,7 +338,8 @@ const routes = [
"meta": {
"title": "吊装作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/hoisting"
},
@ -337,7 +349,8 @@ const routes = [
"meta": {
"title": "预热器清堵作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/preheat"
},
@ -347,7 +360,8 @@ const routes = [
"meta": {
"title": "篦冷机清大块作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/cooler"
},
@ -357,7 +371,8 @@ const routes = [
"meta": {
"title": "动土作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/soil"
},
@ -367,7 +382,8 @@ const routes = [
"meta": {
"title": "临时用电作业许可证",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["operation"]
},
"component": "opm/usecl"
}
@ -440,7 +456,7 @@ const routes = [
"title": "入厂项目相关信息",
"icon": "el-icon-menu",
"hidden": true,
"perms": ["rpjadd"]
"perms": ["rpj"]
},
"component": "rpm/rpjadd"
},
@ -482,7 +498,8 @@ const routes = [
"meta": {
"title": "访客人员",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["visit"]
},
"component": "vm/people"
}
@ -492,7 +509,8 @@ const routes = [
"meta": {
"title": "来访项目相关信息",
"icon": "el-icon-menu",
"hidden": true
"hidden": true,
"perms": ["visit"]
},
"component": "vm/vistoradd"
},
@ -601,6 +619,7 @@ const routes = [
"title": "相关证书",
"icon": "el-icon-menu",
"hidden": true,
"perms": ["employee"]
},
"component": "hrm/certificate"

View File

@ -97,7 +97,7 @@
prop="create_time"
width="180"
></el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="170">
<el-table-column label="操作" fixed="right" align="center" width="170">
<template #default="scope">
<el-button-group>
<el-button

View File

@ -53,6 +53,7 @@
show-checkbox
:data="menu.list"
:props="menu.props"
check-strictly="true"
:default-checked-keys="menu.checked"
@check="handleChange"
></el-tree>

View File

@ -33,7 +33,7 @@
</template>
</el-table-column>
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="120">
<el-table-column label="操作" fixed="right" align="center" width="120">
<template #default="scope">
<el-button type="text" size="small" @click="handleShow(scope.row)">查看详情</el-button>
<!--多人且主动接单-->
@ -51,7 +51,6 @@
data() {
return {
list: [],
actstate_: {
0: "草稿中",
1: "进行中",
@ -81,13 +80,14 @@
},
handleShow(row) {
let cateType = row.workflow_.key;
let projectId='';
if(cateType==='visit'){
projectId = row.ticket_data.visit;
}else if(cateType==='rparty'){
projectId = row.ticket_data.rpj;
}else{
projectId = row.ticket_data.opl;
let projectId = '', operation = null;
if (cateType === 'visit') {
projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') {
projectId = row.ticket_data.rpj;
} else {
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl;
}
this.$router.push({
name: "visitdetail",
@ -95,7 +95,8 @@
id: row.id,
type: 'show',
projectId: projectId,
catetype:cateType
catetype: cateType,
operation: operation
},
});
},

View File

@ -1,92 +1,103 @@
<template>
<el-container>
<el-main class="nopadding">
<scTable
ref="table"
:data="list"
row-key="id"
stripe
highlightCurrentRow
hidePagination
>
<el-table-column label="ID" prop="id"></el-table-column>
<el-table-column label="工单标题" prop="title"></el-table-column>
<el-table-column label="流水号" prop="sn"></el-table-column>
<el-table-column label="当前状态">
<template #default="scope">
{{ scope.row.state_.name }}
</template>
</el-table-column>
<el-table-column label="进行状态" prop="sort">
<template #default="scope">
{{ actstate_[scope.row.act_state] }}
</template>
</el-table-column>
<el-table-column label="关联工作流" prop="title">
<template #default="scope">
{{ scope.row.workflow_.name }}
</template>
</el-table-column>
<el-table-column label="处理人类型">
<template #default="scope">
{{ participant_[scope.row.participant_type] }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="120">
<template #default="scope">
<el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-container>
<el-main class="nopadding">
<scTable
ref="table"
:data="list"
row-key="id"
stripe
highlightCurrentRow
hidePagination
>
<el-table-column label="ID" prop="id"></el-table-column>
<el-table-column label="工单标题" prop="title"></el-table-column>
<el-table-column label="流水号" prop="sn"></el-table-column>
<el-table-column label="当前状态">
<template #default="scope">
{{ scope.row.state_.name }}
</template>
</el-table-column>
<el-table-column label="进行状态" prop="sort">
<template #default="scope">
{{ actstate_[scope.row.act_state] }}
</template>
</el-table-column>
<el-table-column label="关联工作流" prop="title">
<template #default="scope">
{{ scope.row.workflow_.name }}
</template>
</el-table-column>
<el-table-column label="处理人类型">
<template #default="scope">
{{ participant_[scope.row.participant_type] }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="create_time"></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>
<script>
export default {
name: "state",
data() {
return {
list:[],
export default {
name: "state",
data() {
return {
list: [],
actstate_: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
participant_: {
0: "无处理人",
1: "个人",
2: "多人",
},
};
},
mounted() {
this.getList();
},
methods: {
async getList() {
let res = await this.$API.wf.ticket.list.req({ category: "cc",page:0 });
console.log(res);
this.list = res;
},
handleShow(row) {
this.$router.push({
name: "visitdetail",
query: {
id: row.id,
type: 'show',
projectId: row.ticket_data.visit,
catetype : row.workflow_.key
},
});
},
},
};
actstate_: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
participant_: {
0: "无处理人",
1: "个人",
2: "多人",
},
};
},
mounted() {
this.getList();
},
methods: {
async getList() {
let res = await this.$API.wf.ticket.list.req({category: "cc", page: 0});
console.log(res);
this.list = res;
},
handleShow(row) {
let cateType = row.workflow_.key;
let projectId = '', operation = null;
if (cateType === 'visit') {
projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') {
projectId = row.ticket_data.rpj;
} else {
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl;
}
this.$router.push({
name: "visitdetail",
query: {
id: row.id,
type: 'show',
projectId: projectId,
catetype: cateType,
operation: operation
},
});
},
},
};
</script>
<style scoped>

View File

@ -35,21 +35,14 @@
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-link
<el-button
text
v-if="(scope.row.act_state===1||scope.row.act_state===3)&&scope.row.state_.type===0"
type="primary"
@click="handleDetail(scope.row)"
>
处理
</el-link>
<!--多人处理直接接单-->
<!--<el-link
v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
type="primary"
@click="handleDetail(scope.row)"
>
接单
</el-link>-->
</el-button>
<el-button v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
type="text" size="small" @click="handleAccept(scope.row)">
接单
@ -68,39 +61,11 @@
<el-dialog v-model="limitedFlowLogs" title="工单日志">
<ticket-log ref="ticketLogs" :ticket="ticketId"></ticket-log>
</el-dialog>
<!--<el-dialog v-model="limitedFlowLogs" title="工单日志">
<el-table
:data="floeLogs"
fit
stripe
style="width: 100%;border-top:1px solid #EBEEF5;"
>
<el-table-column label="工单标题">
<template #defalut="scope">
<span v-if="scope.row.ticket_data">{{scope.row.ticket_data.title}}</span>
</template>
</el-table-column>
<el-table-column label="进行状态">
<template #defalut="scope">
<span v-if="scope.row.state_">{{scope.row.state_.name}}</span>
</template>
</el-table-column>
<el-table-column label="操作人">
<template #default="scope">
<span v-if="scope.row.participant_">{{ scope.row.participant_.name }}</span>
</template>
</el-table-column>
<el-table-column label="操作意见" prop="suggestion">
</el-table-column>
<el-table-column label="更新时间" prop="update_time">
</el-table-column>
</el-table>
</el-dialog>-->
</template>
<script>
import ticketLog from "./details.vue";
export default {
components: {
ticketLog,
@ -122,9 +87,9 @@
1: "个人",
2: "多人",
},
floeLogs:[],
ticketId:'',
limitedFlowLogs:false,
floeLogs: [],
ticketId: '',
limitedFlowLogs: false,
};
},
mounted() {
@ -137,22 +102,22 @@
this.list = res;
},
//
handleDetail(row){
debugger;
console.log(row)
let projectId = '';
handleDetail(row) {
let projectId = '', operation = null;
let catetype = row.workflow_.key;
if(catetype==='visit'){
projectId=row.ticket_data.visit;
}else if(catetype==='Fire'){
projectId=row.ticket_data.opl;
if (catetype === 'visit') {
projectId = row.ticket_data.visit;
} else if (catetype === 'Fire') {
projectId = row.ticket_data.opl;
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
}
this.$router.push({
name: "visitdetail",
query: {
id: row.id,
projectId:projectId,
catetype:row.workflow_.key
projectId: projectId,
catetype: row.workflow_.key,
operation: operation
},
});
},
@ -162,10 +127,10 @@
let id = row.id;
this.ticketId = row.id;
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) {
}else{
} else {
that.floeLogs = res.results;
}
})

View File

@ -35,7 +35,7 @@
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="160">
<template #default="scope">
<el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看详情</el-button>
<!--创建人在初始状态-->
<el-link
v-if="scope.row.state_.type===1&&userId===scope.row.create_by"
@ -76,7 +76,7 @@
data() {
return {
list: [],
userId:this.$TOOL.data.get("USER_INFO").id,
userId: this.$TOOL.data.get("USER_INFO").id,
actstate_: {
0: "草稿中",
1: "进行中",
@ -95,8 +95,8 @@
},
handleLabel: '撤回原因',
handleTitle: '撤回工单',
ticketId:null,
limitedRetreat:false,
ticketId: null,
limitedRetreat: false,
};
},
mounted() {
@ -105,13 +105,24 @@
},
methods: {
handleShow(row) {
let cateType = row.workflow_.key;
let projectId = '', operation = null;
if (cateType === 'visit') {
projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') {
projectId = row.ticket_data.rpj;
} else {
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl;
}
this.$router.push({
name: "visitdetail",
query: {
id: row.id,
type: 'show',
projectId: row.ticket_data.visit,
catetype:row.workflow_.key
projectId: projectId,
catetype: cateType,
operation: operation
},
});
},
@ -137,7 +148,7 @@
handleSubmit() {
let res = '';
let that = this;
that.$confirm('确认'+that.handleTitle+'吗?', "温馨提示", {
that.$confirm('确认' + that.handleTitle + '吗?', "温馨提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
@ -148,9 +159,9 @@
} else {
res = that.$API.wf.ticket.ticketClose.req(that.ticketId, that.handleForm);
}
if(res.err_msg){
if (res.err_msg) {
that.getList();
}else{
} else {
that.limitedRetreat = false;
that.getList();
}

View File

@ -1,8 +1,16 @@
<template>
<el-container>
<el-main class="nopadding">
<el-card style="margin-bottom: 10px">
<el-card style="margin-bottom: 10px;position: relative">
<work-step ref="workStep"></work-step>
<el-button
class="ticketRetry"
v-if="type!=='show'&&ticketDetail.state_&&ticketDetail.state_.name==='任务执行'"
@click="reStart"
type="primary"
>
重新执行
</el-button>
</el-card>
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='visit'">
<el-descriptions title="来访信息" :column="3">
@ -74,7 +82,7 @@
</el-descriptions-item>
</el-descriptions>
<div style="text-align: center">
<el-link type="primary" @click="showMore"> 更多信息 </el-link>
<el-link type="primary" @click="showMore"> 更多信息</el-link>
</div>
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
</el-card>
@ -83,15 +91,17 @@
<el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }}
</el-descriptions-item>
<el-descriptions-item label="许可证编号:">
{{oplDetail.number }}
<el-descriptions-item label="作业名称:">
{{oplDetail.name }}
</el-descriptions-item>
<el-descriptions-item label="许可证类别:">
{{oplDetail.cate_name}}
<el-descriptions-item label="作业地点:">
{{oplDetail.place}}
</el-descriptions-item>
<el-descriptions-item label="级别:">
{{oplDetail.level }}
<el-descriptions-item label="作业状态:">
{{state_[oplDetail.state]}}
</el-descriptions-item>
<el-descriptions-item label="生产状态:">
{{oplDetail.state_work }}
</el-descriptions-item>
<el-descriptions-item label="开始时间:">
{{oplDetail.start_time }}
@ -101,7 +111,7 @@
</el-descriptions-item>
</el-descriptions>
<div style="text-align: center">
<el-link type="primary" @click="showMoreInfo"> 更多信息 </el-link>
<el-link type="primary" @click="showMoreInfo"> 作业许可证详情</el-link>
</div>
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
</el-card>
@ -109,20 +119,47 @@
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
<scTitle title="处理"></scTitle>
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
<el-form-item label="作业情况:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
<el-select v-model="form.close_note" placeholder="选择关闭原因">
<el-option
v-for="item in noteOption"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="关闭处理:" v-if="ticketDetail.state_&&ticketDetail.state_.name==='作业负责人关闭'">
<el-checkbox-group v-model="form.close_dos">
<el-checkbox
v-for="(item, index) in dosOption"
:key="index"
:label="item.id"
>{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="处理意见">
<el-input v-model="form.suggestion" clearable></el-input>
</el-form-item>
</el-form>
<div v-if="ticketDetail.in_add_node" style="text-align: right">
<el-button v-if="ticketDetail.in_add_node" class="filter-item" type="primary" @click="addNodeHandler('2')">加签处理</el-button>
<el-button v-if="ticketDetail.in_add_node" class="filter-item" type="primary"
@click="addNodeHandler('2')">加签处理
</el-button>
</div>
<div v-else style="display: flex;justify-content: space-between;">
<div>
<el-button type="primary" @click="addNode">加签</el-button>
<el-button v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain @click="deliverNode">转交</el-button>
<el-button v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain
@click="deliverNode">转交
</el-button>
</div>
<div>
<el-button 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>
<el-button 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>
</div>
</div>
</el-card>
@ -135,7 +172,8 @@
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right">
<el-form-item label="处理人">
<el-input style="width: 50%;" v-model="userName" disabled placeholder="选择处理人"></el-input>
<scUserSelect v-model="addForm.toadd_user" :closable="true" :multiple="false" @handlerSubmit="addNodeHandlerSubmit"></scUserSelect>
<scUserSelect v-model="addForm.toadd_user" :closable="true" :multiple="false"
@handlerSubmit="addNodeHandlerSubmit"></scUserSelect>
</el-form-item>
<el-form-item label="加签原因">
<el-input type="textarea" :rows="3" v-model="addForm.suggestion" placeholder="加签原因"/>
@ -161,7 +199,9 @@
<el-button class="filter-item" type="primary" @click="deliverNodeHandler('1')">确定</el-button>
</div>
</el-dialog>
<el-drawer :size="'50%'" v-model="showLimited" title="作业许可证详情">
<sc-fire :id="projectId"></sc-fire>
</el-drawer>
</template>
<script>
@ -189,21 +229,24 @@
visitDetail: [],
employeeLists: [],
operationBtn: [],
form:{
suggestion:''
form: {
suggestion: '',
close_note: '',
close_dos: [],
},
addForm:{
suggestion:'',
toadd_user:'',
addForm: {
suggestion: '',
toadd_user: '',
},
deliverForm:{
suggestion:'',
target_user:'',
deliverForm: {
suggestion: '',
target_user: '',
},
rpjShow:false,
limitedAdd:false,
limitedDeliver:false,
limitedUserSelect:false,
rpjShow: false,
limitedAdd: false,
showLimited: false,
limitedDeliver: false,
limitedUserSelect: false,
purpose_: {
10: "参观",
20: "拜访",
@ -223,33 +266,56 @@
40: "进行中",
50: "已完成",
},
noteOption: [
{id: 10, name: '作业正常结束'},
{id: 20, name: '因计划改变停止作业'},
{id: 30, name: '因发生异常终止作业'},
{id: 40, name: '其他'},
],
dosOption: [],
};
},
created(){
created() {
this.ticketId = this.$route.query.id;
this.type = this.$route.query.type;
this.projectId = this.$route.query.projectId;
this.cateType = this.$route.query.catetype;
this.operation = this.$route.query.operation;
},
mounted() {
debugger;
if(this.cateType==='visit'){
if (this.cateType === 'visit') {
this.getVisit();
}else if(this.cateType==='rparty'){
} else if (this.cateType === 'rparty') {
this.getRpj();
}else{
debugger;
this.getOpl();
} else {
if (this.operation !== null) {
this.getOperation();
} else {
this.getOpl();
}
this.getCloseDos();
}
this.getticketItem();
this.getBtns();
},
methods: {
showMore(){
//
getCloseDos() {
this.$API.system.dict.list
.req({page: 0, type__code: "close_options"})
.then((res) => {
let dosOption = res.filter(item => {
return item.is_used
});
this.dosOption = dosOption.slice(0, 3)
});
},
showMore() {
this.rpjShow = true;
this.$nextTick(()=>{
this.$refs.showDialog.open().setData({id:this.projectId});
this.$nextTick(() => {
this.$refs.showDialog.open().setData({id: this.projectId});
})
},
//
@ -259,8 +325,8 @@
});
},
//
getBtns(){
this.$API.wf.ticket.ticketTransitions.req(this.ticketId).then(res=>{
getBtns() {
this.$API.wf.ticket.ticketTransitions.req(this.ticketId).then(res => {
this.operationBtn = res;
})
},
@ -273,57 +339,70 @@
},
//
getRpj(){
getRpj() {
this.$API.rpm.rpj.item.req(this.projectId).then((res) => {
debugger;
this.rpjDetail = res;
});
},
//
getOpl(){
//
getOpl() {
this.$API.opm.opl.read.req(this.projectId).then((res) => {
debugger;
this.oplDetail = res;
});
},
//
getOperation() {
debugger;
this.$API.opm.operation.read.req(this.operation).then((res) => {
debugger;
this.oplDetail = res;
});
},
showMoreInfo() {
this.showLimited = true;
},
//-start
addNode(){
addNode() {
this.limitedAdd = true;
},
addCancel(){
addCancel() {
this.limitedAdd = false;
},
addNodeHandlerSubmit(data) {
this.addForm.toadd_user=data.id;
this.userName=data.name;
this.addForm.toadd_user = data.id;
this.userName = data.name;
},
addNodeHandler(index){
addNodeHandler(index) {
let res = null;
if(index==='1'){
res = this.$API.wf.ticket.addNode.req(this.ticketId,this.addForm);
}else{
res = this.$API.wf.ticket.addNodeEnd.req(this.ticketId,this.form);
if (index === '1') {
res = this.$API.wf.ticket.addNode.req(this.ticketId, this.addForm);
} else {
res = this.$API.wf.ticket.addNodeEnd.req(this.ticketId, this.form);
}
if(res.err_msg){}else{
if (res.err_msg) {
} else {
this.limitedAdd = false;
this.$router.push("dutywork");
}
},
//-end
//-start
deliverNode(){
deliverNode() {
this.limitedDeliver = true;
},
deliverCancel(){
deliverCancel() {
this.limitedDeliver = false;
},
deliverHandlerSubmit(data) {
this.deliverForm.target_user=data.id;
this.userName=data.name;
this.deliverForm.target_user = data.id;
this.userName = data.name;
},
deliverNodeHandler(){
this.$API.wf.ticket.ticketDeliver.req(this.ticketId,this.deliverForm).then(res=>{
if(res.err_msg){}else{
deliverNodeHandler() {
this.$API.wf.ticket.ticketDeliver.req(this.ticketId, this.deliverForm).then(res => {
if (res.err_msg) {
} else {
this.limitedDeliver = false;
this.$router.push("dutywork");
}
@ -331,20 +410,38 @@
},
//-end
//
operationSubmit(id){
operationSubmit(id) {
let params = new Object();
params.transition = id;
params.ticket_data = {};
params.suggestion = this.form.suggestion;
this.$API.wf.ticket.ticketHandle.req(this.ticketId,params).then(res=>{
if(res.err_msg){}else{
if (this.ticketDetail.state_.name === '作业负责人关闭') {
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 => {
if (res.err_msg) {
} else {
this.$router.push("dutywork");
}
})
},
reStart() {
this.$API.wf.ticket.retryScript.req(this.ticketId).then(res => {
if (res.err_msg) {
} else {
this.$router.push("dutywork");
}
});
},
},
};
</script>
<style scoped>
.ticketRetry {
right: 20px;
top: 30px;
position: absolute;
}
</style>

View File

@ -33,9 +33,9 @@
</template>
</el-table-column>
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="120">
<el-table-column label="操作" fixed="right" align="center" width="100">
<template #default="scope">
<el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
<el-button text size="small" type="primary" @click="handleShow(scope.row)">查看详情</el-button>
</template>
</el-table-column>
</scTable>
@ -49,7 +49,6 @@
data() {
return {
list: [],
actstate_: {
0: "草稿中",
1: "进行中",
@ -75,13 +74,24 @@
this.list = res;
},
handleShow(row) {
let cateType = row.workflow_.key;
let projectId = '', operation = null;
if (cateType === 'visit') {
projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') {
projectId = row.ticket_data.rpj;
} else {
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl;
}
this.$router.push({
name: "visitdetail",
query: {
id: row.id,
type: 'show',
projectId: row.ticket_data.visit,
catetype: row.workflow_.key
projectId: projectId,
catetype: cateType,
operation: operation
},
});
},

View File

@ -17,9 +17,9 @@
<scTable ref="table" :apiObj="apiObj" row-key="id">
<el-table-column label="#" type="index"></el-table-column>
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
<el-table-column label="工作流名称" prop="name" min-width="250"></el-table-column>
<el-table-column label="标识" prop="key" min-width="250"></el-table-column>
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="150">
<el-table-column label="工作流名称" prop="name" min-width="200"></el-table-column>
<el-table-column label="标识" prop="key" min-width="100"></el-table-column>
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="120">
<template #default="scope">
<span v-if="scope.row.view_permission_check"></span>
<span v-else></span>
@ -27,11 +27,15 @@
</el-table-column>
<el-table-column label="工作流描述" prop="description" min-width="150"></el-table-column>
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="220">
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
<el-button link size="small" type="primary" @click="workflowShow(scope.row)" v-auth="'workflow.update'">配置</el-button>
<el-button link size="small" type="primary" @click="workflowShow(scope.row)"
v-auth="'workflow.update'">配置
</el-button>
<el-divider direction="vertical"></el-divider>
<el-button link size="small" type="primary" @click="workflowEdit(scope.row)" v-auth="'workflow.update'">编辑</el-button>
<el-button link size="small" type="primary" @click="workflowEdit(scope.row)"
v-auth="'workflow.update'">编辑
</el-button>
<el-divider direction="vertical"></el-divider>
<el-link
type="primary"
@ -54,7 +58,7 @@
<div class="svgWrapper">
<div class="svgItem">工作流流程图<i class="el-dialog__close el-icon el-icon-close" @click="closeMark"></i></div>
<div style="width: 90%;margin: auto;">
<svg height=1800 id="mySvg" style="width:100%!important;">
<svg :height='mySvgHeight' id="mySvg" style="width:100%!important;">
</svg>
</div>
</div>
@ -80,7 +84,7 @@
></el-input>
</el-form-item>
<el-form-item label="查看权限校验">
<el-switch v-model="addForm.view_permission_check" ></el-switch>
<el-switch v-model="addForm.view_permission_check"></el-switch>
</el-form-item>
<el-form-item label="展现表单字段">
<el-transfer
@ -107,6 +111,7 @@
<script>
import dagreD3 from 'dagre-d3'
import * as d3 from 'd3'
export default {
name: 'index',
data() {
@ -118,6 +123,7 @@
search: {
keyword: null
},
mySvgHeight: null,
editId: null,
isSaving: false,
limitedVisible: false,
@ -134,7 +140,7 @@
sn_prefix: "",
description: "",
view_permission_check: true,
display_form_str:[],
display_form_str: [],
title_template: "",
content_template: "",
},
@ -163,34 +169,34 @@
this.type = 'add';
this.limitedVisible = true;
},
submitHandle() {
submitHandle() {
let that = this;
this.$refs.addForm.validate((valid) => {
if (valid) {
that.isSaveing = true;
that.submit();
}
})
},
async submit(){
async submit() {
let that = this;
let res = null;
try{
try {
if (that.type === 'add') {
res = await that.$API.wf.workflow.create.req(that.addForm)
res = await that.$API.wf.workflow.create.req(that.addForm)
} else {
res = await that.$API.wf.workflow.update.req(that.editId, that.addForm);
res = await that.$API.wf.workflow.update.req(that.editId, that.addForm);
}
that.isSaveing = false;
that.limitedVisible = false;
that.$refs.table.refresh();
}catch (e) {
} catch (e) {
that.isSaveing = false;
}
},
//
workflowEdit(row) {
this.type = 'edit';
@ -202,13 +208,13 @@
//
workflowShow(row) {
let workflow = sessionStorage.getItem('jinYuWorkflowId');
if(workflow){
if (workflow) {
sessionStorage.removeItem('jinYuWorkflowId');
sessionStorage.setItem('jinYuWorkflowId',row.id);
}else{
sessionStorage.setItem('jinYuWorkflowId',row.id);
sessionStorage.setItem('jinYuWorkflowId', row.id);
} else {
sessionStorage.setItem('jinYuWorkflowId', row.id);
}
this.$router.push({path:'/wf/configuration'});
this.$router.push({path: '/wf/configuration'});
},
//
@ -223,17 +229,21 @@
// this.$alert(res.message, "", {type: 'error'})
}
},
//
selectionChange(selection) {
this.selection = selection;
},
//
upsearch() {
},
//ID
filterTree(id) {
var target = null;
function filter(tree) {
tree.forEach(item => {
if (item.id == id) {
@ -245,9 +255,10 @@
})
}
filter(this.$refs.table.tableData)
filter(this.$refs.table.tableData);
return target
},
//
handleSaveSuccess(data, type) {
if (type == 'add') {
@ -256,6 +267,7 @@
this.$refs.table.refresh()
}
},
handleWatch(scope) {
debugger;
let that = this;
@ -271,12 +283,11 @@
marginy: 20,
});
//state
this.$API.wf.workflow.states.req(workFlow).then((response) => {
that.$API.wf.workflow.states.req(workFlow).then((response) => {
if (!response.err_msg) {
let nodes = response;
//
nodes.forEach((item) => {
debugger;
g.setNode(item.id, {
//
label: item.name,
@ -290,20 +301,12 @@
ry: 5
});
});
debugger;
console.log(g.nodes());
g.nodes().forEach(function (v) {
debugger;
console.log("Node " + v + ": " + JSON.stringify(g.node(v)));
});
//线
this.$API.wf.workflow.transitions.req(workFlow).then((res) => {
that.$API.wf.workflow.transitions.req(workFlow).then((res) => {
if (!res.err_msg) {
let transitionList = res;
debugger;
transitionList.forEach((transition0) => {
if (transition0.condition_expression.length > 0) {
debugger;
g.setNode(transition0.source_state_.id + 100000, {
label: "条件表达式",
style: "stroke: #000;fill: #afa",
@ -329,11 +332,8 @@
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px" // 线
});
}
})
g.nodes().length - 1
g.nodes().forEach(function (v) {
console.log("Node " + v + ": " + JSON.stringify(g.node(v)));
});
g.nodes().length - 1;
//
let render = new dagreD3.render();
// svg g.
@ -341,6 +341,7 @@
let svgGroup = svg.append('g');
// .
render(d3.select("svg g"), g);
that.mySvgHeight = document.getElementsByClassName('nodes')[0].getBoundingClientRect().height + 50;
} else {
}
});
@ -363,21 +364,23 @@
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 15px;
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .2);
background-color: #fefefe;
border-radius: 7px;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 7px;
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5);
background-color: #f5f5f5;
}
.svgMark {
width: 100%;
height: 100%;
@ -395,8 +398,8 @@
.svgWrapper {
background: #fff;
width: 800px;
margin:0 auto;
height: 100vh;
margin: 5vh auto;
height: 90vh;
text-align: center;
border-radius: 2px;
overflow-y: scroll;