mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 09:41:58 +08:00
perf: task assign rule
This commit is contained in:
parent
fabdccd981
commit
c9d1100eac
@ -52,7 +52,6 @@
|
|||||||
"vue-i18n": "9.2.2",
|
"vue-i18n": "9.2.2",
|
||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
"vue-types": "^5.0.2",
|
"vue-types": "^5.0.2",
|
||||||
"vue3-treeselect": "^0.1.10",
|
|
||||||
"vxe-table": "^4.3.9",
|
"vxe-table": "^4.3.9",
|
||||||
"web-storage-cache": "^1.1.1",
|
"web-storage-cache": "^1.1.1",
|
||||||
"xe-utils": "^3.5.7"
|
"xe-utils": "^3.5.7"
|
||||||
|
@ -62,14 +62,14 @@
|
|||||||
span="24"
|
span="24"
|
||||||
v-if="formData.type === 20 || formData.type === 21"
|
v-if="formData.type === 20 || formData.type === 21"
|
||||||
>
|
>
|
||||||
<treeselect
|
<el-tree-select
|
||||||
|
ref="treeRef"
|
||||||
v-model="formData.deptIds"
|
v-model="formData.deptIds"
|
||||||
:options="deptTreeOptions"
|
node-key="id"
|
||||||
multiple
|
show-checkbox
|
||||||
flat
|
:props="defaultProps"
|
||||||
:defaultExpandLevel="3"
|
:data="deptTreeOptions"
|
||||||
placeholder="请选择指定部门"
|
empty-text="加载中,请稍后"
|
||||||
:normalizer="normalizer"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="指定岗位" prop="postIds" span="24" v-if="formData.type === 22">
|
<el-form-item label="指定岗位" prop="postIds" span="24" v-if="formData.type === 22">
|
||||||
@ -127,18 +127,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="TaskAssignRule">
|
<script setup lang="ts" name="TaskAssignRule">
|
||||||
// 全局相关的 import
|
// 全局相关的 import
|
||||||
import { onMounted, reactive, ref } from 'vue'
|
|
||||||
import { ElInput, ElTag, ElOption, ElSelect, ElForm, ElFormItem } from 'element-plus'
|
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
|
|
||||||
// 业务相关的 import
|
// 业务相关的 import
|
||||||
import Treeselect from 'vue3-treeselect'
|
|
||||||
import 'vue3-treeselect/dist/vue3-treeselect.css'
|
|
||||||
import { useXTable } from '@/hooks/web/useXTable'
|
|
||||||
import { allSchemas } from './taskAssignRule.data'
|
import { allSchemas } from './taskAssignRule.data'
|
||||||
import * as TaskAssignRuleApi from '@/api/bpm/taskAssignRule'
|
import * as TaskAssignRuleApi from '@/api/bpm/taskAssignRule'
|
||||||
import { listSimpleRolesApi } from '@/api/system/role'
|
import { listSimpleRolesApi } from '@/api/system/role'
|
||||||
import { handleTree } from '@/utils/tree'
|
import { handleTree, defaultProps } from '@/utils/tree'
|
||||||
import { listSimplePostsApi } from '@/api/system/post'
|
import { listSimplePostsApi } from '@/api/system/post'
|
||||||
import { getListSimpleUsersApi } from '@/api/system/user'
|
import { getListSimpleUsersApi } from '@/api/system/user'
|
||||||
import { listSimpleUserGroupsApi } from '@/api/bpm/userGroup'
|
import { listSimpleUserGroupsApi } from '@/api/bpm/userGroup'
|
||||||
@ -168,7 +163,7 @@ const [registerTable] = useXTable({
|
|||||||
allSchemas: allSchemas,
|
allSchemas: allSchemas,
|
||||||
params: queryParams,
|
params: queryParams,
|
||||||
getListApi: TaskAssignRuleApi.getTaskAssignRuleList,
|
getListApi: TaskAssignRuleApi.getTaskAssignRuleList,
|
||||||
isList: false // TODO 如果 isList 改成 true 时,进入页面不会加载数据
|
isList: true
|
||||||
})
|
})
|
||||||
// 修改任务责任表单
|
// 修改任务责任表单
|
||||||
const xForm = ref<FormInstance>()
|
const xForm = ref<FormInstance>()
|
||||||
@ -267,14 +262,6 @@ const getAssignRuleOptionName = (type, option) => {
|
|||||||
}
|
}
|
||||||
return '未知(' + option + ')'
|
return '未知(' + option + ')'
|
||||||
}
|
}
|
||||||
// 格式化部门的下拉框
|
|
||||||
const normalizer = (node) => {
|
|
||||||
return {
|
|
||||||
id: node.id,
|
|
||||||
label: node.name,
|
|
||||||
children: node.children
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ========== 初始化 ==========
|
// ========== 初始化 ==========
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { reactive } from 'vue'
|
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
|
||||||
import { DICT_TYPE } from '@/utils/dict'
|
|
||||||
|
|
||||||
// CrudSchema
|
// CrudSchema
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
|
Loading…
Reference in New Issue
Block a user