vue2-client 1.8.248 → 1.8.249

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,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.248",
3
+ "version": "1.8.249",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -2,7 +2,7 @@
2
2
  <a-modal
3
3
  :confirm-loading="loading"
4
4
  :destroyOnClose="true"
5
- :title="customTitle || businessTitle"
5
+ :title="customTitle? customTitle : businessTitle"
6
6
  :visible="visible"
7
7
  :width="1000"
8
8
  :zIndex="1001"
@@ -69,6 +69,7 @@
69
69
  <script>
70
70
  import XFormItem from '@vue2-client/base-client/components/common/XForm/XFormItem'
71
71
  import dayjs from 'dayjs'
72
+ import { mapState } from 'vuex'
72
73
 
73
74
  export default {
74
75
  name: 'XForm',
@@ -104,6 +105,7 @@ export default {
104
105
  }
105
106
  },
106
107
  computed: {
108
+ ...mapState('account', { currUser: 'user' }),
107
109
  // 过滤掉仅用于新增/修改场景的表单项
108
110
  realJsonData: function () {
109
111
  return this.formItems.filter(item => (!item.isOnlyAddOrEdit && item.type !== 'group') || (item.type === 'group' && item.groupItems.some(groupItem => !groupItem.isOnlyAddOrEdit)))
@@ -178,6 +180,16 @@ export default {
178
180
  if (item.queryFormDefault) {
179
181
  if (['datePicker', 'rangePicker', 'yearPicker', 'monthPicker'].includes(item.type)) {
180
182
  formData[item.model] = this.getDateRange(item.type, item.queryFormDefault)
183
+ } else if (['treeSelect'].includes(item.type) && ['curOrgId', 'curDepId', 'curUserId'].includes(item.queryFormDefault)) {
184
+ if (item.queryFormDefault === 'curOrgId') {
185
+ formData[item.model] = [this.currUser.orgid]
186
+ }
187
+ if (item.queryFormDefault === 'curDepId') {
188
+ formData[item.model] = [this.currUser.depids]
189
+ }
190
+ if (item.queryFormDefault === 'curUserId') {
191
+ formData[item.model] = [this.currUser.id]
192
+ }
181
193
  } else {
182
194
  formData[item.model] = item.queryFormDefault
183
195
  }
@@ -145,7 +145,6 @@ export default {
145
145
  formItems: res.formJson,
146
146
  showSubmitBtn: false,
147
147
  serviceName: this.serviceName,
148
- modifyModelData: modifyModelData,
149
148
  fixedAddForm: modifyModelData.data,
150
149
  businessType: this.businessType,
151
150
  ...res