|
@@ -3,6 +3,7 @@ import { FormSchema } from '/@/components/Table';
|
|
import { rules } from '/@/utils/helper/validator';
|
|
import { rules } from '/@/utils/helper/validator';
|
|
import { render } from '/@/utils/common/renderUtils';
|
|
import { render } from '/@/utils/common/renderUtils';
|
|
import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types';
|
|
import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types';
|
|
|
|
+import { defHttp } from '/@/utils/http/axios';
|
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
|
import { uploadUrl } from '/@/api/common/api';
|
|
import { uploadUrl } from '/@/api/common/api';
|
|
//列表数据
|
|
//列表数据
|
|
@@ -519,38 +520,64 @@ export const formSchema: FormSchema[] = [
|
|
labelWidth: 200,
|
|
labelWidth: 200,
|
|
component: 'JUpload',
|
|
component: 'JUpload',
|
|
},
|
|
},
|
|
|
|
+
|
|
{
|
|
{
|
|
label: '隶属部门(subordinate)',
|
|
label: '隶属部门(subordinate)',
|
|
field: 'subordinateDepart',
|
|
field: 'subordinateDepart',
|
|
- component: 'JSelectDept',colProps: { span: 12 },
|
|
|
|
|
|
+ colProps: { span: 12 },
|
|
labelWidth: 200,
|
|
labelWidth: 200,
|
|
- componentProps: ({ formActionType, formModel }) => {
|
|
|
|
- return {
|
|
|
|
- // sync: false,
|
|
|
|
- // checkStrictly: true,
|
|
|
|
- defaultExpandLevel: 2,
|
|
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
+ componentProps: {
|
|
|
|
+ mode: 'multiple',//multiple: 多选;不填写为单选
|
|
|
|
+ //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
|
|
|
|
+ api: () => defHttp.get({ url: '/sys/sysDepart/listAll',params:{pageSize: -1}}),
|
|
|
|
+ //数值转成String
|
|
|
|
+ numberToString: false,
|
|
|
|
+ //标题字段
|
|
|
|
+ labelField: 'departName',
|
|
|
|
+ //值字段
|
|
|
|
+ valueField: 'id',
|
|
|
|
+ //请求参数
|
|
|
|
+ params: { pageSize: -1, status: 1 },
|
|
|
|
+ //返回结果字段
|
|
|
|
+ resultField: 'records',
|
|
|
|
+ filterOption: 'true',
|
|
|
|
+ optionFilterProp: 'label',
|
|
|
|
+ showSearch: 'true',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ // {
|
|
|
|
+ // label: '隶属部门(subordinate)',
|
|
|
|
+ // field: 'subordinateDepart',
|
|
|
|
+ // component: 'JSelectDept',colProps: { span: 12 },
|
|
|
|
+ // labelWidth: 200,
|
|
|
|
+ // componentProps: ({ formActionType, formModel }) => {
|
|
|
|
+ // return {
|
|
|
|
+ // // sync: false,
|
|
|
|
+ // // checkStrictly: true,
|
|
|
|
+ // defaultExpandLevel: 2,
|
|
|
|
|
|
- // onSelect: (options, values) => {
|
|
|
|
- // const { updateSchema } = formActionType;
|
|
|
|
- // //所属部门修改后更新负责部门下拉框数据
|
|
|
|
- // updateSchema([
|
|
|
|
- // {
|
|
|
|
- // field: 'departIds',
|
|
|
|
- // componentProps: { options },
|
|
|
|
- // },
|
|
|
|
- // ]);
|
|
|
|
- // //update-begin---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
|
|
|
|
- // if(!values){
|
|
|
|
- // formModel.departIds = [];
|
|
|
|
- // return;
|
|
|
|
- // }
|
|
|
|
- // //update-end---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
|
|
|
|
- // //所属部门修改后更新负责部门数据
|
|
|
|
- // formModel.departIds && (formModel.departIds = formModel.departIds.filter((item) => values.value.indexOf(item) > -1));
|
|
|
|
- // },
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ // // onSelect: (options, values) => {
|
|
|
|
+ // // const { updateSchema } = formActionType;
|
|
|
|
+ // // //所属部门修改后更新负责部门下拉框数据
|
|
|
|
+ // // updateSchema([
|
|
|
|
+ // // {
|
|
|
|
+ // // field: 'departIds',
|
|
|
|
+ // // componentProps: { options },
|
|
|
|
+ // // },
|
|
|
|
+ // // ]);
|
|
|
|
+ // // //update-begin---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
|
|
|
|
+ // // if(!values){
|
|
|
|
+ // // formModel.departIds = [];
|
|
|
|
+ // // return;
|
|
|
|
+ // // }
|
|
|
|
+ // // //update-end---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
|
|
|
|
+ // // //所属部门修改后更新负责部门数据
|
|
|
|
+ // // formModel.departIds && (formModel.departIds = formModel.departIds.filter((item) => values.value.indexOf(item) > -1));
|
|
|
|
+ // // },
|
|
|
|
+ // };
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
label: '备注(notes)',
|
|
label: '备注(notes)',
|
|
field: 'notes',
|
|
field: 'notes',
|