vue2-client 1.14.70 → 1.14.73

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.14.70",
3
+ "version": "1.14.73",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -88,6 +88,7 @@ export default {
88
88
  methods: {
89
89
  selectMethod (value) {
90
90
  this.selectedMethod = value
91
+ this.data.selectedMethod = value
91
92
  this.$emit('method', value)
92
93
  },
93
94
  getConfig (configName, param) {
@@ -157,6 +157,7 @@ export default {
157
157
  toggleResId: undefined,
158
158
  // 待提交的修改信息
159
159
  modifyResModel: {},
160
+ codeData: {},
160
161
  resRules: {
161
162
  f_file_name: [{ required: true, message: '请输入文档名', trigger: 'blur' }],
162
163
  }
@@ -168,6 +169,7 @@ export default {
168
169
  runLogic,
169
170
  /* eslint-disable */
170
171
  async initDiagnosisAutocomplete (dropDownBoxParams) {
172
+ console.log('dropDownBoxParams',dropDownBoxParams)
171
173
  if (!this.editorRef || !this.editorRef.document) {
172
174
  return
173
175
  }
@@ -188,6 +190,7 @@ export default {
188
190
  this.editorRef.document.addEventListener('diagnosis-selected', function(e) {
189
191
  if (e && e.detail) {
190
192
  that.$emit('selected', { item: e.detail, editor: that.editorRef });
193
+ that.codeData = { ...that.codeData, ...{[e.detail.codeKey]: e.detail.code} }
191
194
  }
192
195
  });
193
196
 
@@ -270,6 +273,7 @@ export default {
270
273
  this.loadFile(fileUrl, bindObject, currResData).then(async () => {
271
274
  // 文件加载完成后再初始化自动完成
272
275
  await this.initDiagnosisAutocomplete(dropDownBoxParams)
276
+ console.log("bindObject",bindObject)
273
277
  })
274
278
  this.loadResList()
275
279
  },
@@ -286,6 +290,12 @@ export default {
286
290
  }
287
291
  }
288
292
  }
293
+ // 拿取多于模板中的数据
294
+ const diff = Object.fromEntries(
295
+ Object.entries(this.bindObject)
296
+ .filter(([key]) => !(key in this.editorRef.getBindObject()))
297
+ )
298
+ this.codeData = {...this.codeData,...diff}
289
299
  this.changeMode()
290
300
  this.fileUrl = fileUrl
291
301
  if (!currResData.f_file_name) {
@@ -363,6 +373,7 @@ export default {
363
373
  logicExtraParams: this.logicExtraParams,
364
374
  dropDownBoxParams: this.dropDownBoxParams
365
375
  })
376
+ console.log('bindObject33',res.bindObject)
366
377
  })
367
378
  },
368
379
  // 切换文档
@@ -392,9 +403,13 @@ export default {
392
403
  // 验证必须输入项
393
404
  if (this.editorRef.validate()) {
394
405
  // 获取HTML文档和结构化数据(JSON)
406
+ console.log('save',this.editorRef.getBindObject())
395
407
  const data = {
396
408
  doc: this.editorRef.getHtml(),
397
- dataObject: this.editorRef.getBindObject(),
409
+ dataObject: {
410
+ ...this.editorRef.getBindObject(),
411
+ ...this.codeData // 合并 codeData 数据
412
+ },
398
413
  dataMode: this.dataMode,
399
414
  resId: this.resId,
400
415
  modifyResModel: this.modifyResModel,
@@ -225,7 +225,7 @@ export function initDiagnosisDropdown (editor, data, identificationCode, emitFun
225
225
  // 使用传入的emit函数触发事件
226
226
  if (typeof emitFunc === 'function') {
227
227
  // 只传递数据参数,不再传递事件名
228
- emitFunc(selectedItem)
228
+ emitFunc(Object.assign(selectedItem,{codeKey :identificationCode.replace(/^#/, '') + '_code'}))
229
229
  }
230
230
  } else {
231
231
  // 如果找不到完整数据,至少打印出已知信息
@@ -302,14 +302,12 @@ export default {
302
302
  return false
303
303
  }
304
304
  const step = this.stepsForChild[this.currentStepId - 1]
305
+ // 检查handler是否包含当前用户
306
+ if (step && step.handler) {
307
+ return step.handler.includes(this.currUser.name)
308
+ }
305
309
  // 检查角色和部门权限
306
310
  if (step && step.properties && step.properties.chargePerson) {
307
- // chargePerson 改造 旧数据类型是 {chrgePerson: {role: '1', department: '1'}}
308
- // 如果是旧的格式 转换成新的格式后再作处理
309
- if (step.properties.chargePerson.role || step.properties.chargePerson.department) {
310
- step.properties.chargePerson.needSelectPerson = true
311
- step.properties.chargePerson.personList = [{ type: step.properties.chargePerson.role ? 'role' : 'department', name: step.properties.chargePerson.role || step.properties.chargePerson.department }]
312
- }
313
311
  if (step.properties.chargePerson.personList && step.properties.chargePerson.personList.length > 0) {
314
312
  // 使用some方法判断当前人员是否满足任一条件
315
313
  return step.properties.chargePerson.personList.some(item => {
@@ -325,12 +323,6 @@ export default {
325
323
  })
326
324
  }
327
325
  }
328
-
329
- // 检查handler是否包含当前用户
330
- if (step && step.handler) {
331
- return step.handler.includes(this.currUser.name)
332
- }
333
-
334
326
  return false
335
327
  },
336
328
  formPreviewNoFileData () {