|
@@ -1,13 +1,12 @@
|
|
|
<script setup name="BasicInfo">
|
|
|
import useFlowStore from '@/store/modules/flow'
|
|
|
-import { ref, nextTick, onMounted, computed } from 'vue'
|
|
|
+import { ref, nextTick, onMounted } from 'vue'
|
|
|
import UseSelect from '@/components/scWorkflow/select'
|
|
|
import group from '@/api/flow/group'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
-import { flowIconPrefix } from '@/utils/index'
|
|
|
+import { flowIconPrefix, ImageArr } from '@/utils/index'
|
|
|
const route = useRoute()
|
|
|
const flowInfo = useFlowStore()
|
|
|
-
|
|
|
const visiblePopover = ref(false)
|
|
|
const selectVisible = ref(false)
|
|
|
const useSelectRef = ref(null)
|
|
@@ -15,14 +14,10 @@ const nodeRoleList = ref([])
|
|
|
const currentNode = ref('nodeRoleList')
|
|
|
const formRef = ref()
|
|
|
const options = ref([])
|
|
|
+const imgArr = ref(ImageArr)
|
|
|
|
|
|
+// 表单规则
|
|
|
const rules = {
|
|
|
- processIcon: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请选择图标'
|
|
|
- }
|
|
|
- ],
|
|
|
processKey: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -42,37 +37,8 @@ const rules = {
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
-const imgArr = ref([
|
|
|
- 'approval',
|
|
|
- 'bank-card',
|
|
|
- 'bell',
|
|
|
- 'box',
|
|
|
- 'calendar',
|
|
|
- 'car',
|
|
|
- 'cash',
|
|
|
- 'checklist',
|
|
|
- 'clock',
|
|
|
- 'coin',
|
|
|
- 'contract',
|
|
|
- 'dimission',
|
|
|
- 'exchange',
|
|
|
- 'lightning',
|
|
|
- 'location',
|
|
|
- 'male',
|
|
|
- 'manager',
|
|
|
- 'offboarding',
|
|
|
- 'onboarding',
|
|
|
- 'plane',
|
|
|
- 'presentation',
|
|
|
- 'propotion',
|
|
|
- 'regular',
|
|
|
- 'relation',
|
|
|
- 'ticket',
|
|
|
- 'toolbox',
|
|
|
- 'transfer',
|
|
|
- 'wallet'
|
|
|
-])
|
|
|
|
|
|
+// 基础信息表单提交校验
|
|
|
const validate = () => {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
formRef.value.validate((valid, errObj) => {
|
|
@@ -88,10 +54,12 @@ const validate = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+// 弹窗显示隐藏
|
|
|
const openApprovePerson = () => {
|
|
|
selectVisible.value = !selectVisible.value
|
|
|
}
|
|
|
|
|
|
+// 点击选择管理员
|
|
|
const selectHandle = (type, data, name) => {
|
|
|
currentNode.value = name
|
|
|
openApprovePerson()
|
|
@@ -100,6 +68,7 @@ const selectHandle = (type, data, name) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+// 选中后进行回显
|
|
|
const selectContentEv = item => {
|
|
|
if (currentNode.value === 'nodeRoleList') {
|
|
|
nodeRoleList.value = item
|
|
@@ -122,7 +91,9 @@ const selectContentEv = item => {
|
|
|
userName: item[i].name,
|
|
|
operateApproval: 0,
|
|
|
operateOwner: 0,
|
|
|
- operateData: 0
|
|
|
+ operateData: 0,
|
|
|
+ id: item[i].id,
|
|
|
+ name: item[i].name
|
|
|
})
|
|
|
}
|
|
|
flowInfo.processPermissionList = processPermissionList
|
|
@@ -211,7 +182,7 @@ defineExpose({
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="管理员" prop="管理员">
|
|
|
- <div class="add-btn" @click="selectHandle(1, nodeRoleManageList, 'nodeRoleManageList')">
|
|
|
+ <div class="add-btn" @click="selectHandle(1, flowInfo.processPermissionList, 'nodeRoleManageList')">
|
|
|
<el-icon :size="18"><Plus /></el-icon>
|
|
|
</div>
|
|
|
<div class="tags-list" style="margin-top: 15px; width: 100%">
|