|
@@ -240,6 +240,7 @@ export const useProps = (state, data, isPc = true, isRoot = false, specialHandli
|
|
|
if (isPc) {
|
|
|
result.labelWidth = options.isShowLabel ? options.labelWidth + 'px' : 'auto'
|
|
|
}
|
|
|
+ const { renderType } = options
|
|
|
switch (node.type) {
|
|
|
case 'input':
|
|
|
if (options.isShowWordLimit) {
|
|
@@ -293,7 +294,6 @@ export const useProps = (state, data, isPc = true, isRoot = false, specialHandli
|
|
|
result.options = _.get(state, `data[${options.dataKey}].list`, [])
|
|
|
break
|
|
|
case 'select':
|
|
|
- const { renderType } = options
|
|
|
// 当前选中的值,如果是人员就获取人员的api,部门就获取部门的api
|
|
|
if ([2, 3, 4].indexOf(renderType) > -1) {
|
|
|
result.options = options?.options
|
|
@@ -386,10 +386,144 @@ export const useProps = (state, data, isPc = true, isRoot = false, specialHandli
|
|
|
}
|
|
|
break
|
|
|
case 'cascader':
|
|
|
- result.options = _.get(state, `data[${options.dataKey}].list`, [])
|
|
|
+ if (renderType === 2) {
|
|
|
+ result.options = [
|
|
|
+ {
|
|
|
+ id: '3',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2022-02-20 22:21',
|
|
|
+ updateBy: 'admin',
|
|
|
+ updateTime: '2024-05-02 13:18',
|
|
|
+ pid: '0',
|
|
|
+ name: '飞龙驱动科技',
|
|
|
+ code: '1000',
|
|
|
+ sort: 2,
|
|
|
+ remark: '太阳科技',
|
|
|
+ status: 1,
|
|
|
+ headId: '0',
|
|
|
+ headName: 'CEO',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '1778237792399392769',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2024-04-11 09:45',
|
|
|
+ pid: '3',
|
|
|
+ name: '财务部',
|
|
|
+ code: '0023',
|
|
|
+ sort: 4,
|
|
|
+ remark: '财务部',
|
|
|
+ status: 0,
|
|
|
+ headId: '1778236187025342466',
|
|
|
+ parentName: '飞龙驱动科技'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '1778247413147107329',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2024-04-11 10:23',
|
|
|
+ pid: '3',
|
|
|
+ name: '应用部',
|
|
|
+ code: 'yingyongbu',
|
|
|
+ sort: 2,
|
|
|
+ remark: '应用部',
|
|
|
+ status: 1,
|
|
|
+ headId: '1778236187025342466',
|
|
|
+ headName: '夏小华',
|
|
|
+ parentName: '飞龙驱动科技'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '1778246587070545922',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2024-04-11 10:19',
|
|
|
+ pid: '3',
|
|
|
+ name: '综合管理部',
|
|
|
+ code: 'zongheguanli',
|
|
|
+ sort: 1,
|
|
|
+ remark: '综合管理',
|
|
|
+ status: 1,
|
|
|
+ headId: '1778236187025342466',
|
|
|
+ headName: '部门领导',
|
|
|
+ parentName: '飞龙驱动科技',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '1778247724637093889',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2024-04-11 10:24',
|
|
|
+ pid: '1778246587070545922',
|
|
|
+ name: '人事部',
|
|
|
+ code: 'renshibu',
|
|
|
+ sort: 1,
|
|
|
+ remark: '人事部',
|
|
|
+ status: 1,
|
|
|
+ headId: '1778235419958444034',
|
|
|
+ headName: '出纳',
|
|
|
+ parentName: '综合管理部'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '2',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2021-11-07 10:13',
|
|
|
+ updateBy: 'admin',
|
|
|
+ updateTime: '2024-04-11 10:22',
|
|
|
+ pid: '3',
|
|
|
+ name: '产品部',
|
|
|
+ code: '2000',
|
|
|
+ sort: 0,
|
|
|
+ remark: '产品部',
|
|
|
+ status: 1,
|
|
|
+ headId: '1778236021094481921',
|
|
|
+ headName: '杨小凤',
|
|
|
+ parentName: '飞龙驱动科技',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '1',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2022-02-20 22:19',
|
|
|
+ updateBy: 'admin',
|
|
|
+ updateTime: '2023-12-30 14:23',
|
|
|
+ pid: '2',
|
|
|
+ name: '开发 A 组',
|
|
|
+ code: '2020',
|
|
|
+ sort: 1,
|
|
|
+ remark: '开发 A 组',
|
|
|
+ status: 1,
|
|
|
+ parentName: '产品部'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '1696346580223049729',
|
|
|
+ createId: '0',
|
|
|
+ createBy: 'admin',
|
|
|
+ createTime: '2023-08-29 10:18',
|
|
|
+ updateBy: 'admin',
|
|
|
+ updateTime: '2023-12-30 14:23',
|
|
|
+ pid: '2',
|
|
|
+ name: '开发 B 组',
|
|
|
+ code: '2010',
|
|
|
+ sort: 1,
|
|
|
+ remark: '开发 B 组',
|
|
|
+ status: 1,
|
|
|
+ parentName: '产品部'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ } else if (renderType === 1) {
|
|
|
+ result.options = _.get(state, `data[${options.dataKey}].list`, [])
|
|
|
+ }
|
|
|
result.props = {
|
|
|
multiple: options.multiple,
|
|
|
- checkStrictly: options.checkStrictly
|
|
|
+ checkStrictly: options.checkStrictly,
|
|
|
+ ...options.props
|
|
|
}
|
|
|
// result.options = options.options
|
|
|
break
|