perf: task assign rule

This commit is contained in:
xingyu 2023-01-19 18:19:01 +08:00
parent fabdccd981
commit c9d1100eac
3 changed files with 10 additions and 26 deletions

View File

@ -52,7 +52,6 @@
"vue-i18n": "9.2.2",
"vue-router": "^4.1.6",
"vue-types": "^5.0.2",
"vue3-treeselect": "^0.1.10",
"vxe-table": "^4.3.9",
"web-storage-cache": "^1.1.1",
"xe-utils": "^3.5.7"

View File

@ -62,14 +62,14 @@
span="24"
v-if="formData.type === 20 || formData.type === 21"
>
<treeselect
<el-tree-select
ref="treeRef"
v-model="formData.deptIds"
:options="deptTreeOptions"
multiple
flat
:defaultExpandLevel="3"
placeholder="请选择指定部门"
:normalizer="normalizer"
node-key="id"
show-checkbox
:props="defaultProps"
:data="deptTreeOptions"
empty-text="加载中,请稍后"
/>
</el-form-item>
<el-form-item label="指定岗位" prop="postIds" span="24" v-if="formData.type === 22">
@ -127,18 +127,13 @@
</template>
<script setup lang="ts" name="TaskAssignRule">
// import
import { onMounted, reactive, ref } from 'vue'
import { ElInput, ElTag, ElOption, ElSelect, ElForm, ElFormItem } from 'element-plus'
import type { FormInstance } from 'element-plus'
// 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 * as TaskAssignRuleApi from '@/api/bpm/taskAssignRule'
import { listSimpleRolesApi } from '@/api/system/role'
import { handleTree } from '@/utils/tree'
import { handleTree, defaultProps } from '@/utils/tree'
import { listSimplePostsApi } from '@/api/system/post'
import { getListSimpleUsersApi } from '@/api/system/user'
import { listSimpleUserGroupsApi } from '@/api/bpm/userGroup'
@ -168,7 +163,7 @@ const [registerTable] = useXTable({
allSchemas: allSchemas,
params: queryParams,
getListApi: TaskAssignRuleApi.getTaskAssignRuleList,
isList: false // TODO isList true
isList: true
})
//
const xForm = ref<FormInstance>()
@ -267,14 +262,6 @@ const getAssignRuleOptionName = (type, option) => {
}
return '未知(' + option + ')'
}
//
const normalizer = (node) => {
return {
id: node.id,
label: node.name,
children: node.children
}
}
// ========== ==========
onMounted(() => {

View File

@ -1,6 +1,4 @@
import { reactive } from 'vue'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// CrudSchema
const crudSchemas = reactive<VxeCrudSchema>({