|
@@ -3,7 +3,7 @@
|
|
<div class="card-div-1 h-full w-235px">
|
|
<div class="card-div-1 h-full w-235px">
|
|
<hc-body scrollbar padding="0">
|
|
<hc-body scrollbar padding="0">
|
|
<div class="hc-process-item">
|
|
<div class="hc-process-item">
|
|
- <div class="process setup">
|
|
|
|
|
|
+ <div class="process setup" @click="processSetupClick">
|
|
<div class="icon hc-flex-center">
|
|
<div class="icon hc-flex-center">
|
|
<i class="i-hugeicons-flowchart-01" />
|
|
<i class="i-hugeicons-flowchart-01" />
|
|
</div>
|
|
</div>
|
|
@@ -101,7 +101,7 @@
|
|
<span>已选择{{ fixedItem?.userList?.length || 0 }}人</span>
|
|
<span>已选择{{ fixedItem?.userList?.length || 0 }}人</span>
|
|
</template>
|
|
</template>
|
|
<template #extra>
|
|
<template #extra>
|
|
- <el-button type="warning" size="small">调整排序</el-button>
|
|
|
|
|
|
+ <el-button type="warning" size="small" @click="fixedUserSortClick">调整排序</el-button>
|
|
</template>
|
|
</template>
|
|
<div class="hc-tasks-user-cur-box flex gap-2">
|
|
<div class="hc-tasks-user-cur-box flex gap-2">
|
|
<template v-for="(item, index) in fixedItem?.userList" :key="index">
|
|
<template v-for="(item, index) in fixedItem?.userList" :key="index">
|
|
@@ -125,15 +125,21 @@
|
|
<el-button type="primary" :loading="confirmLoading" @click="confirmClick">确定</el-button>
|
|
<el-button type="primary" :loading="confirmLoading" @click="confirmClick">确定</el-button>
|
|
</template>
|
|
</template>
|
|
</hc-dialog>
|
|
</hc-dialog>
|
|
|
|
+ <!-- 流程设置 -->
|
|
|
|
+ <HcProcessModal v-model="isProcessSetup" :data="fixedData" @finish="processSetupFinish" />
|
|
|
|
+ <!-- 任务人排序 -->
|
|
|
|
+ <HcSortModal v-model="isUserSort" :data="userSortData" @finish="userSortFinish" />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { nextTick, ref, watch } from 'vue'
|
|
import { nextTick, ref, watch } from 'vue'
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
import { pinyin } from 'pinyin-pro'
|
|
import { pinyin } from 'pinyin-pro'
|
|
|
|
+import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
import HcLoadSvg from '~src/assets/view/load.svg'
|
|
import HcLoadSvg from '~src/assets/view/load.svg'
|
|
|
|
+import HcProcessModal from './process-modal.vue'
|
|
|
|
+import HcSortModal from './sort-modal.vue'
|
|
import mainApi from '~api/tasks/flow'
|
|
import mainApi from '~api/tasks/flow'
|
|
-import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
data: {
|
|
data: {
|
|
@@ -175,6 +181,7 @@ const setInitData = async () => {
|
|
await nextTick()
|
|
await nextTick()
|
|
fixedData.value.forEach(item => {
|
|
fixedData.value.forEach(item => {
|
|
item.isDataSave = true
|
|
item.isDataSave = true
|
|
|
|
+ item.flowTaskType = isNullES(item.flowTaskType) ? 1 : item.flowTaskType
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -202,6 +209,7 @@ const fixedTypeClick = (item) => {
|
|
const fixedAddClick = () => {
|
|
const fixedAddClick = () => {
|
|
fixedData.value.push({
|
|
fixedData.value.push({
|
|
type: 1,
|
|
type: 1,
|
|
|
|
+ flowTaskType: 1,
|
|
name: '流程审批名称',
|
|
name: '流程审批名称',
|
|
isDataAdd: true,
|
|
isDataAdd: true,
|
|
isDataSave: false,
|
|
isDataSave: false,
|
|
@@ -338,6 +346,45 @@ const singleSaveClick = () => {
|
|
window.$message.success('保存成功,全部完成后,请点击确定')
|
|
window.$message.success('保存成功,全部完成后,请点击确定')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//流程设置
|
|
|
|
+const isProcessSetup = ref(false)
|
|
|
|
+const processSetupClick = () => {
|
|
|
|
+ const arr = getArrValue(fixedData.value)
|
|
|
|
+ if (arr.length <= 0) {
|
|
|
|
+ window.$message.warning('请先创建任务流程')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ isProcessSetup.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//流程设置完成
|
|
|
|
+const processSetupFinish = (data) => {
|
|
|
|
+ isProcessSetup.value = false
|
|
|
|
+ fixedData.value = getArrValue(data)
|
|
|
|
+ fixedIndex.value = -1
|
|
|
|
+ fixedItem.value = {}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//任务人排序
|
|
|
|
+const isUserSort = ref(false)
|
|
|
|
+const userSortData = ref([])
|
|
|
|
+const fixedUserSortClick = () => {
|
|
|
|
+ const arr = fixedData.value, index = fixedIndex.value
|
|
|
|
+ const list = getArrValue(arr[index]?.userList)
|
|
|
|
+ if (list.length <= 0) {
|
|
|
|
+ window.$message.warning('请先添加任务人')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ userSortData.value = list
|
|
|
|
+ isUserSort.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//任务人排序完成
|
|
|
|
+const userSortFinish = (data) => {
|
|
|
|
+ console.log(data)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
//确定选择
|
|
//确定选择
|
|
const confirmLoading = ref(false)
|
|
const confirmLoading = ref(false)
|
|
const confirmClick = async () => {
|
|
const confirmClick = async () => {
|