imeik-bizui 1.8.1 → 1.8.2

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.
@@ -3,7 +3,14 @@
3
3
  <ImTable :table="tableConfig" style="margin-bottom: 20px">
4
4
  <!-- 专家 -->
5
5
  <template slot="doctorName" slot-scope="{ row }">
6
- <ImSelect v-if="!isView" v-model="row.doctorNumber" :class="{ 'is-error': row.valid === false && !row.doctorNumber }" :attrs="doctorAttrs" :listeners="{ focus: onDoctorFocus}" @input="changedoctorName(row)"></ImSelect>
6
+ <ImSelect
7
+ v-if="!isView"
8
+ v-model="row.doctorNumber"
9
+ :class="{ 'is-error': row.valid === false && !row.doctorNumber }"
10
+ :attrs="doctorAttrs"
11
+ :listeners="{ focus: onDoctorFocus }"
12
+ @input="changedoctorName(row)"
13
+ ></ImSelect>
7
14
  <div v-else>
8
15
  <!-- <div v-if="showDiff">
9
16
  <p class="text-button" @click="viewdoctorDetailItem(row)">{{ row.doctorName }}</p>
@@ -80,14 +87,13 @@
80
87
  ></ImSelect>
81
88
  </div>
82
89
  <div v-else>
83
- <ImDiffText v-if="showDiff" :show-diff="showDiff" />
90
+ <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="row.identity" :no-absolute="true" :new-value="row._newData?.identity" />
84
91
  </div>
85
92
  </template>
86
93
  <!-- 授课名称 -->
87
94
  <template slot="className" slot-scope="{ row }">
88
95
  <div v-if="!isView">
89
- <ImInput :class="{ 'is-error': row.valid === false && checkHasCourse(row) }" v-model="row.className" placeholder="请输入" maxlength="100"></ImInput>
90
-
96
+ <ImInput v-model="row.className" :class="{ 'is-error': row.valid === false && checkHasCourse(row) }" placeholder="请输入" maxlength="100"></ImInput>
91
97
  </div>
92
98
  <div v-else>
93
99
  <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="row.courseName" :no-absolute="true" :new-value="row._newData?.courseName" />
@@ -363,7 +369,7 @@ export default {
363
369
  } else if (this.checkHasCourse(item) && !item.className) {
364
370
  res && showMessage && this.$message.warning('请填写授课名称')
365
371
  res = false
366
- }else if (!item.costAmount) {
372
+ } else if (!item.costAmount) {
367
373
  res && showMessage && this.$message.warning('请检查费用金额')
368
374
  res = false
369
375
  } else if (this.checkStandardAmountsIsBeyond(item) && !item.remark) {
@@ -425,18 +431,18 @@ export default {
425
431
  },
426
432
  // 获取场景列表
427
433
  getSceneList(data) {
428
- console.log('getSceneList',data.doctorExpertType)
434
+ console.log('getSceneList', data.doctorExpertType)
429
435
  if (data.doctorLevel) {
430
436
  this.scenarioLoading = true
431
- getExpertServiceFee({ expertRoleCode: data.doctorLevel,doctorExpertType: data.doctorExpertType }).then((res) => {
437
+ getExpertServiceFee({ expertRoleCode: data.doctorLevel, doctorExpertType: data.doctorExpertType }).then((res) => {
432
438
  this.scenarioLoading = false
433
439
  if (res.code === 200) {
434
440
  const list = JSON.parse(res.data).sceneList
435
441
 
436
- const shenfenList = JSON.parse(res.data).standardAmountList.map(item => ({
442
+ const shenfenList = JSON.parse(res.data).standardAmountList.map((item) => ({
437
443
  label: item.sceneAndIdentity,
438
444
  value: item.sceneAndIdentity,
439
- standardAmount:item.standardAmount
445
+ standardAmount: item.standardAmount
440
446
  }))
441
447
 
442
448
  this.$set(data, 'scenarioList', list)
@@ -445,9 +451,9 @@ export default {
445
451
  })
446
452
  }
447
453
  },
448
- handleChangeIdentity(val,row){
454
+ handleChangeIdentity(val, row) {
449
455
  const sceneInfo = row.shenfenList_new.find((item) => item.value === val)
450
- this.$set(row, 'standardAmount', sceneInfo.standardAmount)
456
+ this.$set(row, 'standardAmount', sceneInfo.standardAmount)
451
457
  },
452
458
  // 修改专家回调
453
459
  changedoctorName(row, type) {
@@ -489,14 +495,15 @@ export default {
489
495
  this.$set(row, 'describe', sceneInfo.describe)
490
496
  this.$set(row, 'courseName', '')
491
497
  // 修改:在过滤后,对每个项处理label,取_之后的部分
492
- const shenfenList_new = row.shenfenList?.filter(item =>
493
- item.label?.split('_')[0].includes(sceneInfo.label) ?? false
494
- )?.map(item => ({
495
- ...item,
496
- // 修改:截取_后的文字,没有下划线时返回原label
497
- label: item.label?.split('_')[1] ?? item.label ?? '',
498
- value: item.value?.split('_')[1] ?? item.value ?? ''
499
- })) ?? [];
498
+ const shenfenList_new =
499
+ row.shenfenList
500
+ ?.filter((item) => item.label?.split('_')[0].includes(sceneInfo.label) ?? false)
501
+ ?.map((item) => ({
502
+ ...item,
503
+ // 修改:截取_后的文字,没有下划线时返回原label
504
+ label: item.label?.split('_')[1] ?? item.label ?? '',
505
+ value: item.value?.split('_')[1] ?? item.value ?? ''
506
+ })) ?? []
500
507
  this.$set(row, 'shenfenList_new', shenfenList_new)
501
508
  }
502
509
  this.checkStandardAmountsIsBeyond(row)
@@ -508,7 +515,6 @@ export default {
508
515
  this.$set(row, 'doctorLevelName', roleInfo.label)
509
516
  this.$set(row, 'doctorServiceSceneCode', '')
510
517
  this.$set(row, 'describe', '')
511
-
512
518
  }
513
519
  this.getSceneList(row)
514
520
  },
@@ -556,13 +562,12 @@ export default {
556
562
  // 优化后方法:检查场景是否有活动身份
557
563
  checkHasCourse(data) {
558
564
  if (!data.identity || !Array.isArray(data.shenfenList_new)) {
559
- return false;
565
+ return false
560
566
  }
561
567
  // 使用some替代find,直接返回布尔值
562
- return data.shenfenList_new.some(item =>
563
- item.value === data.identity &&
564
- item.label?.includes('授课') // 安全访问label属性
565
- );
568
+ return data.shenfenList_new.some(
569
+ (item) => item.value === data.identity && item.label?.includes('授课') // 安全访问label属性
570
+ )
566
571
  },
567
572
  formatChangeType(val) {
568
573
  switch (val) {