|
@@ -8,7 +8,11 @@
|
|
|
<el-button hc-btn type="warning" @click="tableSortClick">排序</el-button>
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
- <el-alert :closable="false" title="同一合同段内,只需要设置重复岗位的流程即可,其他任务岗位,系统将自动推送,无需创建更多任务流" type="error" />
|
|
|
+ <el-alert
|
|
|
+ :closable="false"
|
|
|
+ title="同一合同段内,只需要设置重复岗位的流程即可,其他任务岗位,系统将自动推送,无需创建更多任务流"
|
|
|
+ type="error"
|
|
|
+ />
|
|
|
</template>
|
|
|
<hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }" is-new>
|
|
|
<template #action="{ row }">
|
|
@@ -21,12 +25,19 @@
|
|
|
</template>
|
|
|
<!-- 新增/编辑流程 弹框 -->
|
|
|
<hc-new-dialog v-model="showEditModal" :title="`${flowFormData.id ? '编辑' : '新增'}流程`" widths="40rem">
|
|
|
- <el-form ref="formFlowRef" class="p-4" :model="flowFormData" :rules="formFlowRules" label-width="auto" size="large">
|
|
|
+ <el-form
|
|
|
+ ref="formFlowRef" class="p-4" :model="flowFormData" :rules="formFlowRules" label-width="auto"
|
|
|
+ size="large"
|
|
|
+ >
|
|
|
<el-form-item label="流程名称" prop="fixedName">
|
|
|
<el-input v-model="flowFormData.fixedName" placeholder="请输入流程名称" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="选择任务人" prop="fixedBranchList">
|
|
|
- <hc-tasks-user :id="changeId" :contract-id="contractId" :project-id="projectId" :users="linkUserJoinString" ui="w-full" :is-show-task-name="true" :fixed-branch-list="flowFormData.fixedBranchList" @change="tasksUserChange" />
|
|
|
+ <hc-tasks-user
|
|
|
+ :id="changeId" :contract-id="contractId" :project-id="projectId"
|
|
|
+ :users="linkUserJoinString" ui="w-full" :is-show-task-name="true"
|
|
|
+ :fixed-branch-list="flowFormData.fixedBranchList" @change="tasksUserChange"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
@@ -38,12 +49,16 @@
|
|
|
</hc-new-dialog>
|
|
|
|
|
|
<!-- 排序 -->
|
|
|
- <hc-new-dialog v-model="sortModal" title="调整排序" widths="80vw" is-table is-footer-center @close="sortModalClose">
|
|
|
+ <hc-new-dialog
|
|
|
+ v-model="sortModal" title="调整排序" widths="80vw" is-table is-footer-center
|
|
|
+ @close="sortModalClose"
|
|
|
+ >
|
|
|
<el-alert title="可拖动排序,也可在后面点击图标,切换排序" type="error" :closable="false" />
|
|
|
<div class="hc-table-h">
|
|
|
<hc-table
|
|
|
ui="hc-table-row-drop" :column="sortTableColumn" :datas="sortTableData" :loading="sortTableLoading"
|
|
|
- is-row-drop quick-sort is-new :index-style="{ width: 80 }" @row-drop="sortTableRowDrop" @row-sort="sortTableRowDrop"
|
|
|
+ is-row-drop quick-sort is-new :index-style="{ width: 80 }" @row-drop="sortTableRowDrop"
|
|
|
+ @row-sort="sortTableRowDrop"
|
|
|
>
|
|
|
<template #key2="{ row }">
|
|
|
<span class="text-link">{{ row?.key2 }}</span>
|
|
@@ -150,25 +165,25 @@ const handleTableEdit = async (row) => {
|
|
|
getFlowDetail()
|
|
|
|
|
|
}
|
|
|
-const getFlowDetail = async ()=>{
|
|
|
+const getFlowDetail = async () => {
|
|
|
const { error, code, data } = await tasksFlowApi.queryFixedFlowDetail({ id: changeId.value })
|
|
|
if (!error && code === 200) {
|
|
|
let users = '', res = getObjValue(data)
|
|
|
const list = getArrValue(res['fixedBranchVOList'])
|
|
|
-
|
|
|
- const item = getObjValue(list[0])['userList']
|
|
|
- for (let index = 0; index < item.length; index++) {
|
|
|
- const element = item[index]
|
|
|
- if (users) {
|
|
|
+ const item = getObjValue(list[0])['userList']
|
|
|
+ for (let index = 0; index < item.length; index++) {
|
|
|
+ const element = item[index]
|
|
|
+ if (users) {
|
|
|
users += `,${element['userName']}-${element['userId']}`
|
|
|
- } else {
|
|
|
- users = `${element['userName']}-${element['userId']}`
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- console.log(users, 'users')
|
|
|
+ } else {
|
|
|
+ users = `${element['userName']}-${element['userId']}`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ flowFormData.value = {
|
|
|
+ id: changeId.value,
|
|
|
+ fixedName: res.fixedFlowName,
|
|
|
+ fixedBranchList: res.fixedBranchVOList,
|
|
|
}
|
|
|
- flowFormData.value = { id: changeId.value, fixedName: res.fixedFlowName, fixedBranchList:res.fixedBranchVOList }
|
|
|
linkUserJoinString.value = users
|
|
|
} else {
|
|
|
flowFormData.value = { id: '', fixedName: '', fixedBranchList: [] }
|
|
@@ -193,7 +208,7 @@ const formFlowRules = {
|
|
|
}
|
|
|
|
|
|
//任务人选择改变
|
|
|
-const tasksUserChange = ( a, b, fixedBranchList) => {
|
|
|
+const tasksUserChange = (a, b, fixedBranchList) => {
|
|
|
flowFormData.value.fixedBranchList = fixedBranchList
|
|
|
}
|
|
|
|
|
@@ -205,7 +220,7 @@ const saveFormClick = async () => {
|
|
|
const form = deepClone(flowFormData.value)
|
|
|
console.log(form, 'form')
|
|
|
const fixedBranchList = form.fixedBranchList
|
|
|
- fixedBranchList.forEach((ele)=>{
|
|
|
+ fixedBranchList.forEach((ele) => {
|
|
|
delete ele.users
|
|
|
})
|
|
|
form.fixedBranchList = fixedBranchList
|
|
@@ -251,7 +266,7 @@ const saveFormClick = async () => {
|
|
|
const handleTableDel = (row) => {
|
|
|
delMessage(async () => {
|
|
|
const { error, code } = await tasksFlowApi.removeFixedFlowData({
|
|
|
- id:row?.id || '',
|
|
|
+ id: row?.id || '',
|
|
|
name: row?.fixedFlowName,
|
|
|
|
|
|
})
|
|
@@ -276,7 +291,7 @@ const tableSortClick = () => {
|
|
|
const sortTableColumn = ref([
|
|
|
{ key: 'fixedFlowName', name: '流程名称' },
|
|
|
{ key: 'linkUserJoinString', name: '流程详情' },
|
|
|
- { key:'action', name: '排序', width: 90, align: 'center' },
|
|
|
+ { key: 'action', name: '排序', width: 90, align: 'center' },
|
|
|
])
|
|
|
const sortTableData = ref([])
|
|
|
|