af-mobile-client-vue3 1.3.48 → 1.3.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.3.48",
4
+ "version": "1.3.50",
5
5
  "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -56,7 +56,7 @@ function search(val) {
56
56
  }
57
57
  function getData(val) {
58
58
  const res = props.columns.filter((item) => {
59
- return val.includes(item[props.option.value])
59
+ return val?.includes(item[props.option.value])
60
60
  })
61
61
  return res
62
62
  }
@@ -90,6 +90,7 @@ function toggleAll() {
90
90
  }
91
91
  function showPopu(disabled) {
92
92
  columnsData.value = JSON.parse(JSON.stringify(props.columns))
93
+ checkboxValue.value = JSON.parse(JSON.stringify(props.selectValue))
93
94
  if (disabled !== undefined && disabled !== false)
94
95
  return false
95
96
  else
@@ -103,7 +104,7 @@ watch(() => checkboxValue.value.length, (newVal, _oldVal) => {
103
104
  })
104
105
  const resultLabel = computed(() => {
105
106
  const res = props.columns.filter((item) => {
106
- return (resultValue.value as unknown as string[]).includes(item[props.option.value])
107
+ return (resultValue.value as unknown as string[])?.includes(item[props.option.value])
107
108
  }).map(item => item[props.option.text])
108
109
  return res.join(',')
109
110
  })
@@ -872,6 +872,7 @@ function findOptionInTree(options, value) {
872
872
  :readonly="readonly"
873
873
  :placeholder="placeholder"
874
874
  :columns="option"
875
+ :select-value="Array.isArray(modelData) ? modelData : []"
875
876
  :option="attr.option ? attr.option : columnsField"
876
877
  :rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
877
878
  :required="attr.rule.required === 'true'"
@@ -2,6 +2,7 @@
2
2
  import type { FormInstance } from 'vant'
3
3
  import { LoginStateEnum, useFormRules, useLoginState } from '@af-mobile-client-vue3/hooks/useLogin'
4
4
  import GetAppDataService from '@af-mobile-client-vue3/plugins/AppData'
5
+ import { getConfigByNameAsync, runLogic } from '@af-mobile-client-vue3/services/api/common'
5
6
  import { getUserPermissions } from '@af-mobile-client-vue3/services/api/search'
6
7
  import { useSettingStore } from '@af-mobile-client-vue3/stores/modules/setting'
7
8
  import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
@@ -105,10 +106,24 @@ function handleSubmit() {
105
106
  try {
106
107
  loading.value = true
107
108
  showLoadingToast('登录中...')
109
+ let username = formData.username
110
+ let password = formData.password
111
+ const webConfig = await getConfigByNameAsync('webConfig')
112
+ const verification = webConfig.setting?.phoneLoginVerification || false
113
+ if (verification) {
114
+ try {
115
+ const res = await runLogic('openapi/loginVerification', { username, password }) as any
116
+ username = res.username
117
+ password = res.password
118
+ }
119
+ catch (e) {
120
+ console.error('验证登录失败: ', e)
121
+ }
122
+ }
108
123
  console.warn(setting)
109
124
  const data: any = await userState.Login({
110
- username: formData.username,
111
- password: formData.password,
125
+ username,
126
+ password,
112
127
  resourceName: setting.getSetting()?.routerName || '智慧手机',
113
128
  })
114
129
  login.f = data