vue2-client 1.8.40 → 1.8.41

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/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.8.37 - 1.8.40 -2024-1-30 @江超**
4
+ **1.8.37 - 1.8.41 -2024-1-30 @江超**
5
5
  - 开发环境增加水印
6
6
 
7
7
  **1.8.36 -2024-1-25 @江超**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.40",
3
+ "version": "1.8.41",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -104,14 +104,13 @@ export default {
104
104
  getDataParams: {},
105
105
  // 是否为临时表
106
106
  isTableTemp: false,
107
+ // 是否处理表单key
108
+ isKeyHandle: true,
107
109
  // 动态简易表单集合
108
110
  simpleFormJsonData: {}
109
111
  }
110
112
  },
111
113
  computed: {
112
- businessTitle () {
113
- return this.businessType + this.title
114
- },
115
114
  // 过滤出用于新增/修改场景的表单项
116
115
  realJsonData: function () {
117
116
  return this.formItems.filter((item) => {
@@ -151,7 +150,7 @@ export default {
151
150
  methods: {
152
151
  init (params) {
153
152
  const {
154
- configName, configContent, formItems, viewMode, isHandleFormKey = true, showSubmitBtn = true, serviceName, isTableTemp = false, modifyModelData = {}, businessType, title, fixedAddForm = {}, getDataParams = {}, simpleFormJsonData = {}
153
+ configName, configContent, formItems, viewMode, isHandleFormKey = true, showSubmitBtn = true, serviceName, isTableTemp = false, isKeyHandle = true, modifyModelData = {}, businessType, title, fixedAddForm = {}, getDataParams = {}, simpleFormJsonData = {}
155
154
  } = params
156
155
  this.loaded = false
157
156
  this.configName = configName
@@ -170,6 +169,7 @@ export default {
170
169
  this.getDataParams = getDataParams
171
170
  this.simpleFormJsonData = simpleFormJsonData
172
171
  this.isTableTemp = isTableTemp
172
+ this.isKeyHandle = isKeyHandle
173
173
  // 设置普通表单项的相关参数
174
174
  const formData = Object.assign({}, fixedAddForm)
175
175
  for (let i = 0; i < this.realJsonData.length; i++) {
@@ -340,7 +340,7 @@ export default {
340
340
  }
341
341
  realForm[extraFormKey][realKey] = value
342
342
  } else {
343
- const realKey = this.getRealKey(key)
343
+ const realKey = this.isKeyHandle ? this.getRealKey(key) : key
344
344
  realForm[realKey] = value
345
345
  }
346
346
  }
@@ -402,7 +402,7 @@ export default {
402
402
  }
403
403
  // 对动态简易表单项特殊处理
404
404
  for (const key in modifyModelData.data) {
405
- const realKey = this.getRealKey(key)
405
+ const realKey = this.isKeyHandle ? this.getRealKey(key) : key
406
406
  if (this.simpleFormJsonData[realKey]) {
407
407
  const extraForm = JSON.parse(modifyModelData.data[key])
408
408
  for (const key in extraForm) {