Browse Source

fix: 由于 多路径字段获取值处理 造成的 set value值为0||''时不成功的情况

main
xingyu 2 years ago
parent
commit
ce1236d141
  1. 2
      src/components/Form/src/hooks/useFormEvents.ts
  2. 1
      src/views/bpm/group/group.data.ts
  3. 1
      src/views/bpm/model/model.data.ts
  4. 2
      src/views/infra/codegen/codegen.data.ts
  5. 1
      src/views/infra/config/config.data.ts
  6. 1
      src/views/mp/user/mpuser.data.ts
  7. 3
      src/views/pay/app/app.data.ts
  8. 1
      src/views/pay/demo/demo.data.ts
  9. 1
      src/views/pay/merchant/merchant.data.ts
  10. 2
      src/views/system/dept/dept.data.ts
  11. 1
      src/views/system/dict/dict.data.ts
  12. 1
      src/views/system/dict/dict.type.ts
  13. 2
      src/views/system/menu/menu.data.ts
  14. 2
      src/views/system/notice/notice.data.ts
  15. 2
      src/views/system/notify/my/my.data.ts
  16. 2
      src/views/system/notify/template/template.data.ts
  17. 1
      src/views/system/oauth2/client/client.data.ts
  18. 1
      src/views/system/post/post.data.ts
  19. 1
      src/views/system/role/role.data.ts
  20. 1
      src/views/system/sensitiveWord/sensitiveWord.data.ts
  21. 2
      src/views/system/sms/template/smsTemplate.data.ts
  22. 1
      src/views/system/tenant/tenant.data.ts
  23. 1
      src/views/system/tenantPackage/tenantPackage.data.ts
  24. 1
      src/views/system/user/user.data.ts

2
src/components/Form/src/hooks/useFormEvents.ts

@ -105,7 +105,7 @@ export function useFormEvents({
fields.forEach((key) => {
const schema = unref(getSchema).find((item) => item.field === key)
let value = get(values, key)
const hasKey = !!get(values, key)
const hasKey = Reflect.has(values, key)
value = handleInputNumberValue(schema?.component, value)
const { componentProps } = schema || {}

1
src/views/bpm/group/group.data.ts

@ -127,7 +127,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/bpm/model/model.data.ts

@ -167,7 +167,6 @@ export const formSchema: FormSchema[] = [
label: '流程分类',
field: 'category',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY)
}

2
src/views/infra/codegen/codegen.data.ts

@ -102,7 +102,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}
@ -132,7 +131,6 @@ export const importTableSearchFormSchema: FormSchema[] = [
label: '数据源',
field: 'dataSourceConfigId',
component: 'ApiSelect',
defaultValue: 0,
componentProps: {
api: () => getDataSourceConfigList(),
labelField: 'name',

1
src/views/infra/config/config.data.ts

@ -123,7 +123,6 @@ export const formSchema: FormSchema[] = [
label: '是否可见',
field: 'visible',
component: 'RadioGroup',
defaultValue: 0,
componentProps: {
options: [
{ key: true, label: '是', value: true },

1
src/views/mp/user/mpuser.data.ts

@ -54,7 +54,6 @@ export const searchFormSchema: FormSchema[] = [
label: '公众号',
field: 'accountId',
component: 'ApiSelect',
defaultValue: 0,
componentProps: {
api: () => getSimpleAccounts(),
labelField: 'name',

3
src/views/pay/app/app.data.ts

@ -182,7 +182,6 @@ export const formSchema: FormSchema[] = [
label: '开启状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}
@ -230,7 +229,6 @@ export const aliPayFormSchema: FormSchema[] = [
label: '渠道状态',
field: 'status',
required: true,
defaultValue: 0,
component: 'RadioGroup',
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
@ -335,7 +333,6 @@ export const weChatFormSchema: FormSchema[] = [
label: '渠道状态',
field: 'status',
required: true,
defaultValue: 0,
component: 'RadioGroup',
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)

1
src/views/pay/demo/demo.data.ts

@ -95,7 +95,6 @@ export const formSchema: FormSchema[] = [
label: '商品',
field: 'spuId',
component: 'Select',
defaultValue: 0,
required: true,
componentProps: {
options: [

1
src/views/pay/merchant/merchant.data.ts

@ -138,7 +138,6 @@ export const formSchema: FormSchema[] = [
label: '开启状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

2
src/views/system/dept/dept.data.ts

@ -86,7 +86,6 @@ export const formSchema: FormSchema[] = [
label: '上级部门',
field: 'parentId',
required: true,
defaultValue: 0,
component: 'ApiTreeSelect',
componentProps: {
api: () => listSimpleDept(),
@ -145,7 +144,6 @@ export const formSchema: FormSchema[] = [
label: '部门状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/dict/dict.data.ts

@ -110,7 +110,6 @@ export const dataFormSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/dict/dict.type.ts

@ -76,7 +76,6 @@ export const typeFormSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

2
src/views/system/menu/menu.data.ts

@ -80,7 +80,6 @@ export const formSchema: FormSchema[] = [
label: '上级菜单',
field: 'parentId',
required: true,
defaultValue: 0,
component: 'ApiTreeSelect',
componentProps: {
api: () => listSimpleMenus(),
@ -157,7 +156,6 @@ export const formSchema: FormSchema[] = [
field: 'status',
required: true,
component: 'RadioButtonGroup',
defaultValue: 0,
helpMessage: '选择停用时,路由将不会出现在侧边栏,也不能被访问',
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)

2
src/views/system/notice/notice.data.ts

@ -73,7 +73,6 @@ export const formSchema: FormSchema[] = [
label: '公告类型',
field: 'type',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE)
}
@ -82,7 +81,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

2
src/views/system/notify/my/my.data.ts

@ -91,7 +91,6 @@ export const formSchema: FormSchema[] = [
label: '类型',
field: 'type',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE)
}
@ -100,7 +99,6 @@ export const formSchema: FormSchema[] = [
label: '开启状态',
field: 'status',
component: 'RadioGroup',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

2
src/views/system/notify/template/template.data.ts

@ -118,7 +118,6 @@ export const formSchema: FormSchema[] = [
label: '类型',
field: 'type',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE)
}
@ -127,7 +126,6 @@ export const formSchema: FormSchema[] = [
label: '开启状态',
field: 'status',
component: 'RadioGroup',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/oauth2/client/client.data.ts

@ -129,7 +129,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/post/post.data.ts

@ -99,7 +99,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/role/role.data.ts

@ -109,7 +109,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/sensitiveWord/sensitiveWord.data.ts

@ -90,7 +90,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

2
src/views/system/sms/template/smsTemplate.data.ts

@ -126,7 +126,6 @@ export const formSchema: FormSchema[] = [
label: '短信类型',
field: 'type',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE)
}
@ -153,7 +152,6 @@ export const formSchema: FormSchema[] = [
label: '开启状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/tenant/tenant.data.ts

@ -183,7 +183,6 @@ export const formSchema: FormSchema[] = [
label: '租户状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/tenantPackage/tenantPackage.data.ts

@ -82,7 +82,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}

1
src/views/system/user/user.data.ts

@ -192,7 +192,6 @@ export const formSchema: FormSchema[] = [
label: '状态',
field: 'status',
component: 'Select',
defaultValue: 0,
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS)
}