style: lint格式化文件
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<div ref="formWrap">
|
||||
<Form ref="formRef" :label-col="getProps?.labelCol" :labelAlign="getProps?.labelAlign"
|
||||
:layout="getProps?.layout" :model="formModel" :wrapper-col="getProps?.wrapperCol"
|
||||
@keypress.enter="handleEnterPress">
|
||||
<Form ref="formRef" :label-col="getProps?.labelCol" :labelAlign="getProps?.labelAlign" :layout="getProps?.layout" :model="formModel" :wrapper-col="getProps?.wrapperCol" @keypress.enter="handleEnterPress">
|
||||
<!-- id -->
|
||||
|
||||
<!-- <Col v-if="getIfShow2('e21c39e056964ba1af0207c8dfa7b54b')"
|
||||
@ -138,8 +136,8 @@
|
||||
|
||||
<!--流程id-->
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>流程实列id</label>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control">
|
||||
@ -154,8 +152,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>子流程实例id</label>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control">
|
||||
@ -170,8 +168,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>子流程实例名</label>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control">
|
||||
@ -187,8 +185,8 @@
|
||||
</div>
|
||||
<!--任务名称-->
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>节点key</label>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control">
|
||||
@ -204,8 +202,8 @@
|
||||
</div>
|
||||
<!--任务id-->
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>节点id</label>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control">
|
||||
@ -220,8 +218,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>节点名称</label>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control">
|
||||
@ -234,20 +232,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control ant-col-12">
|
||||
<a-button v-if="canClick" v-allAuth="'adminOperation:toDesignatedNode'" @click="flowChange">{{
|
||||
t('将任务流转到')
|
||||
}}</a-button>
|
||||
<a-button v-if="canClick" v-allAuth="'adminOperation:toDesignatedNode'" @click="flowChange">{{ t('将任务流转到') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--审批人-->
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>
|
||||
审批人
|
||||
<a-tooltip title="当前节点为会签节点时是加减签,为普通节点时是加减审批人抢令牌">
|
||||
<QuestionCircleOutlined style="margin-left: 4px; cursor: pointer; color: #1890ff;" />
|
||||
<QuestionCircleOutlined style="margin-left: 4px; cursor: pointer; color: #1890ff" />
|
||||
</a-tooltip>
|
||||
</label>
|
||||
</div>
|
||||
@ -261,17 +257,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control ant-col-12">
|
||||
<AddOrSubtractV2 :schemaId="schemaId" :taskId="assignee.value.taskId" v-if="canClick" v-allAuth="'adminOperation:setAssignee'"
|
||||
:lastAddStepUser="assignee.value.assigneeVoList" @change="changedUser">
|
||||
</AddOrSubtractV2>
|
||||
<AddOrSubtractV2 :schemaId="schemaId" :taskId="assignee.value.taskId" v-if="canClick" v-allAuth="'adminOperation:setAssignee'" :lastAddStepUser="assignee.value.assigneeVoList" @change="changedUser"> </AddOrSubtractV2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 创建时间 -->
|
||||
<div class="ant-col ant-col-24">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px;">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px;">
|
||||
<div class="ant-row ant-form-item" style="row-gap: 0px">
|
||||
<div class="ant-col ant-form-item-label" style="width: 120px">
|
||||
<label>创建时间</label>
|
||||
</div>
|
||||
<div class="ant-col ant-form-item-control">
|
||||
@ -299,194 +293,201 @@
|
||||
</Form>
|
||||
</div>
|
||||
<template>
|
||||
<ApproveProcessMonitor v-if="showApproveUser" :taskId="assignee.value.taskId" :userList="assignee.value"
|
||||
title="修改审批人" @close="
|
||||
<ApproveProcessMonitor
|
||||
v-if="showApproveUser"
|
||||
:taskId="assignee.value.taskId"
|
||||
:userList="assignee.value"
|
||||
title="修改审批人"
|
||||
@close="
|
||||
(val) => {
|
||||
showApproveUser = false;
|
||||
if (val.length > 0) {
|
||||
assignee.value.assigneeNameStr = val.map((ele) => {
|
||||
return ele.name;
|
||||
}).join(',');
|
||||
assignee.value.assigneeNameStr = val
|
||||
.map((ele) => {
|
||||
return ele.name;
|
||||
})
|
||||
.join(',');
|
||||
}
|
||||
}
|
||||
" />
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
<!-- 指派审核人 -->
|
||||
<!-- 流程流转 -->
|
||||
<opinionDialog ref="opinionDlg" />
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 注意,这里继承的是SimpleFormSetup,使用script setup写法的组件无法继承,必须使用特别的版本
|
||||
import SimpleFormSetup from '/@/components/SimpleForm/src/SimpleFormSetup.vue';
|
||||
import { Col, Form, message, Row } from 'ant-design-vue';
|
||||
import SimpleFormItem from '/@/components/SimpleForm/src/components/SimpleFormItem.vue';
|
||||
import { ref, reactive, inject } from 'vue';
|
||||
import { CheckCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue';
|
||||
import ApproveProcessMonitor from '../../../views/workflow/task/components/flow/ApproveProcessMonitorUser.vue';
|
||||
import { data } from '../../demo/excel/data';
|
||||
import opinionDialog from '/@/components/SecondDev/OpinionDialogSelected.vue';
|
||||
import { getProcessUserNodes, SetChangeProcessNode } from '/@/api/workflow/adminOperation'
|
||||
import AddOrSubtract from '../../workflow/task/components/flow/AddOrSubtractWork.vue';
|
||||
import AddOrSubtractV2 from '../../workflow/task/components/flow/AddOrSubtractV2.vue';
|
||||
// 注意,这里继承的是SimpleFormSetup,使用script setup写法的组件无法继承,必须使用特别的版本
|
||||
import SimpleFormSetup from '/@/components/SimpleForm/src/SimpleFormSetup.vue';
|
||||
import { Col, Form, message, Row } from 'ant-design-vue';
|
||||
import SimpleFormItem from '/@/components/SimpleForm/src/components/SimpleFormItem.vue';
|
||||
import { ref, reactive, inject } from 'vue';
|
||||
import { CheckCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue';
|
||||
import ApproveProcessMonitor from '../../../views/workflow/task/components/flow/ApproveProcessMonitorUser.vue';
|
||||
import { data } from '../../demo/excel/data';
|
||||
import opinionDialog from '/@/components/SecondDev/OpinionDialogSelected.vue';
|
||||
import { getProcessUserNodes, SetChangeProcessNode } from '/@/api/workflow/adminOperation';
|
||||
import AddOrSubtract from '../../workflow/task/components/flow/AddOrSubtractWork.vue';
|
||||
import AddOrSubtractV2 from '../../workflow/task/components/flow/AddOrSubtractV2.vue';
|
||||
|
||||
const FormItem = Form.Item;
|
||||
|
||||
const FormItem = Form.Item;
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CheckCircleOutlined,
|
||||
QuestionCircleOutlined,
|
||||
Form,
|
||||
Col,
|
||||
SimpleFormItem,
|
||||
Row,
|
||||
FormItem,
|
||||
ApproveProcessMonitor,
|
||||
opinionDialog,
|
||||
AddOrSubtract,
|
||||
AddOrSubtractV2
|
||||
},
|
||||
mixins: [SimpleFormSetup],
|
||||
setup(props, ctx) {
|
||||
const ret = SimpleFormSetup.setup(props, ctx);
|
||||
const expose = ctx.expose;
|
||||
const assignee = ctx.attrs.clickedTaskAssignees
|
||||
const currentTaskAssigneeNames = ctx.attrs.currentTaskAssigneeNames
|
||||
const isCustom = ref(Boolean)
|
||||
const schemaId = ctx.attrs.schemaId;
|
||||
const processId = ctx.attrs.processId;
|
||||
const canClick = ctx.attrs.canClick
|
||||
isCustom.value = ctx.attrs.isCustom;
|
||||
|
||||
const showApproveUser = ref(Boolean);
|
||||
showApproveUser.value = false;
|
||||
|
||||
const opinionDlg = ref();
|
||||
const selectedInfo = ref();
|
||||
const allTaskNodes = inject('taskNode');
|
||||
const refreshInfo = inject('refreshApproveInfo', () => {})
|
||||
|
||||
const users = ref('');
|
||||
users.value = assignee.value.assigneeVoList.map((ele) => {
|
||||
return ele.name + '(' + ele.code + ')';
|
||||
}).join(',')
|
||||
|
||||
function approveUser() {
|
||||
showApproveUser.value = true;
|
||||
}
|
||||
|
||||
function flowChange() {
|
||||
opinionDlg.value.toggleDialog({
|
||||
action: 'select',
|
||||
schemaId: schemaId,
|
||||
choseTime: false,
|
||||
title: '流程流转',
|
||||
taskNode: allTaskNodes,
|
||||
callback(args) {
|
||||
selectedInfo.value = args.info
|
||||
submit(args.info)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changedUser() {
|
||||
refreshInfo()
|
||||
}
|
||||
|
||||
function submit(info) {
|
||||
const key = info.taskId;
|
||||
const userIds = info.selectedList.map((ele) => {
|
||||
return ele.id
|
||||
}).join(',');
|
||||
SetChangeProcessNode({
|
||||
'taskId': assignee.value.taskId,
|
||||
'targetTaskNodeId': info.taskId,
|
||||
'nextTaskUserMap': {
|
||||
[key]: userIds
|
||||
},
|
||||
"remark": info.opinion
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
message.info("流程流转成功!");
|
||||
flowFail();
|
||||
} else {
|
||||
message.info("操作失败,请稍后再试!");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function flowFail() {
|
||||
opinionDlg.value.stopLoading();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return {
|
||||
approveUser,
|
||||
flowChange,
|
||||
processId,
|
||||
schemaId,
|
||||
showApproveUser,
|
||||
isCustom,
|
||||
assignee,
|
||||
currentTaskAssigneeNames,
|
||||
opinionDlg,
|
||||
users,
|
||||
canClick,
|
||||
changedUser,
|
||||
...ret
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 这里需要增加一个计算属性 否则流程关联时字段读写状态会失效
|
||||
schemaMap() {
|
||||
const schemaMap = {};
|
||||
this.getSchemas.forEach((schema) => {
|
||||
schemaMap[schema.key] = schema;
|
||||
if (schema.children) {
|
||||
schema.children.forEach(sChild => {
|
||||
if (sChild.list) {
|
||||
sChild.list.forEach(lChild => {
|
||||
schemaMap[lChild.key] = lChild;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return schemaMap;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getIfShow2: function (key) {
|
||||
return this.getIfShow(this.schemaMap[key], this.formModel[this.schemaMap[key].field]);
|
||||
export default {
|
||||
components: {
|
||||
CheckCircleOutlined,
|
||||
QuestionCircleOutlined,
|
||||
Form,
|
||||
Col,
|
||||
SimpleFormItem,
|
||||
Row,
|
||||
FormItem,
|
||||
ApproveProcessMonitor,
|
||||
opinionDialog,
|
||||
AddOrSubtract,
|
||||
AddOrSubtractV2
|
||||
},
|
||||
mixins: [SimpleFormSetup],
|
||||
setup(props, ctx) {
|
||||
const ret = SimpleFormSetup.setup(props, ctx);
|
||||
const expose = ctx.expose;
|
||||
const assignee = ctx.attrs.clickedTaskAssignees;
|
||||
const currentTaskAssigneeNames = ctx.attrs.currentTaskAssigneeNames;
|
||||
const isCustom = ref(Boolean);
|
||||
const schemaId = ctx.attrs.schemaId;
|
||||
const processId = ctx.attrs.processId;
|
||||
const canClick = ctx.attrs.canClick;
|
||||
isCustom.value = ctx.attrs.isCustom;
|
||||
|
||||
getIsShow2: function (key) {
|
||||
return this.getIsShow(this.schemaMap[key], this.formModel[this.schemaMap[key].field]);
|
||||
},
|
||||
const showApproveUser = ref(Boolean);
|
||||
showApproveUser.value = false;
|
||||
|
||||
const opinionDlg = ref();
|
||||
const selectedInfo = ref();
|
||||
const allTaskNodes = inject('taskNode');
|
||||
const refreshInfo = inject('refreshApproveInfo', () => {});
|
||||
|
||||
const users = ref('');
|
||||
users.value = assignee.value.assigneeVoList
|
||||
.map((ele) => {
|
||||
return ele.name + '(' + ele.code + ')';
|
||||
})
|
||||
.join(',');
|
||||
|
||||
function approveUser() {
|
||||
showApproveUser.value = true;
|
||||
}
|
||||
|
||||
function flowChange() {
|
||||
opinionDlg.value.toggleDialog({
|
||||
action: 'select',
|
||||
schemaId: schemaId,
|
||||
choseTime: false,
|
||||
title: '流程流转',
|
||||
taskNode: allTaskNodes,
|
||||
callback(args) {
|
||||
selectedInfo.value = args.info;
|
||||
submit(args.info);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changedUser() {
|
||||
refreshInfo();
|
||||
}
|
||||
|
||||
function submit(info) {
|
||||
const key = info.taskId;
|
||||
const userIds = info.selectedList
|
||||
.map((ele) => {
|
||||
return ele.id;
|
||||
})
|
||||
.join(',');
|
||||
SetChangeProcessNode({
|
||||
taskId: assignee.value.taskId,
|
||||
targetTaskNodeId: info.taskId,
|
||||
nextTaskUserMap: {
|
||||
[key]: userIds
|
||||
},
|
||||
remark: info.opinion
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
message.info('流程流转成功!');
|
||||
flowFail();
|
||||
} else {
|
||||
message.info('操作失败,请稍后再试!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function flowFail() {
|
||||
opinionDlg.value.stopLoading();
|
||||
}
|
||||
|
||||
getTabProps(key) {
|
||||
const schema = this.schemaMap[key];
|
||||
return {
|
||||
size: schema.componentProps.tabSize,
|
||||
tabPosition: schema.componentProps.tabPosition,
|
||||
type: schema.componentProps.type
|
||||
approveUser,
|
||||
flowChange,
|
||||
processId,
|
||||
schemaId,
|
||||
showApproveUser,
|
||||
isCustom,
|
||||
assignee,
|
||||
currentTaskAssigneeNames,
|
||||
opinionDlg,
|
||||
users,
|
||||
canClick,
|
||||
changedUser,
|
||||
...ret
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 这里需要增加一个计算属性 否则流程关联时字段读写状态会失效
|
||||
schemaMap() {
|
||||
const schemaMap = {};
|
||||
this.getSchemas.forEach((schema) => {
|
||||
schemaMap[schema.key] = schema;
|
||||
if (schema.children) {
|
||||
schema.children.forEach((sChild) => {
|
||||
if (sChild.list) {
|
||||
sChild.list.forEach((lChild) => {
|
||||
schemaMap[lChild.key] = lChild;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return schemaMap;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getIfShow2: function (key) {
|
||||
return this.getIfShow(this.schemaMap[key], this.formModel[this.schemaMap[key].field]);
|
||||
},
|
||||
|
||||
getTdStyle(tdElement) {
|
||||
return {
|
||||
height: tdElement.height ? tdElement.height + 'px' : '',
|
||||
minHeight: (tdElement.height || '42') + 'px',
|
||||
overflow: 'hidden',
|
||||
padding: '10px'
|
||||
getIsShow2: function (key) {
|
||||
return this.getIsShow(this.schemaMap[key], this.formModel[this.schemaMap[key].field]);
|
||||
},
|
||||
|
||||
getTabProps(key) {
|
||||
const schema = this.schemaMap[key];
|
||||
return {
|
||||
size: schema.componentProps.tabSize,
|
||||
tabPosition: schema.componentProps.tabPosition,
|
||||
type: schema.componentProps.type
|
||||
};
|
||||
},
|
||||
|
||||
getTdStyle(tdElement) {
|
||||
return {
|
||||
height: tdElement.height ? tdElement.height + 'px' : '',
|
||||
minHeight: (tdElement.height || '42') + 'px',
|
||||
overflow: 'hidden',
|
||||
padding: '10px'
|
||||
};
|
||||
}
|
||||
},
|
||||
// approveUser: function () {
|
||||
// return data.value.approvedUserVisible = true;
|
||||
// }
|
||||
}
|
||||
};
|
||||
// approveUser: function () {
|
||||
// return data.value.approvedUserVisible = true;
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user