imeik-bizui 1.9.5 → 1.9.7

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.
@@ -1,13 +1,25 @@
1
1
  <template>
2
2
  <div class="page-view">
3
3
  <ImTable :table="tableConfig" style="margin-bottom: 20px">
4
+ <template slot="doctorNameHead">
5
+ <p><span v-if="!isView" class="start">*</span>专家名称</p>
6
+ </template>
7
+ <template slot="doctorLevelHead">
8
+ <p><span v-if="!isView" class="start">*</span>角色/等级</p>
9
+ </template>
10
+ <template slot="scenarioHead">
11
+ <p><span v-if="!isView" class="start">*</span>服务场景</p>
12
+ </template>
13
+ <template slot="costAmountHead">
14
+ <p><span v-if="!isView" class="start">*</span>费用金额(元)</p>
15
+ </template>
4
16
  <!-- 专家 -->
5
17
  <template slot="doctorName" slot-scope="{ row }">
6
18
  <ImSelect
7
19
  v-if="!isView"
8
20
  v-model="row.doctorNumber"
9
21
  :class="{ 'is-error': row.valid === false && !row.doctorNumber }"
10
- :attrs="{ ...doctorAttrs, disabled: row.acceptanceDoctorTimes }"
22
+ :attrs="{ ...doctorAttrs, disabled: !!row.acceptanceDoctorTimes }"
11
23
  :listeners="{ focus: onDoctorFocus }"
12
24
  @input="changedoctorName(row)"
13
25
  ></ImSelect>
@@ -51,7 +63,7 @@
51
63
  v-if="!isView"
52
64
  v-model="row.doctorLevel"
53
65
  :class="{ 'is-error': row.valid === false && !row.doctorLevel }"
54
- :attrs="{ options: row.roleList, disabled: row.acceptanceDoctorTimes }"
66
+ :attrs="{ options: row.roleList, disabled: !!row.acceptanceDoctorTimes }"
55
67
  @input="changeDoctorLevel(row)"
56
68
  ></ImSelect>
57
69
  <div v-else>
@@ -64,8 +76,8 @@
64
76
  <div v-if="!isView">
65
77
  <ImSelect
66
78
  v-model="row.doctorServiceSceneCode"
67
- :class="{ 'is-error': row.valid === false && !row.doctorLevel }"
68
- :attrs="{ options: row.scenarioList, loading: scenarioLoading, disabled: row.acceptanceDoctorTimes }"
79
+ :class="{ 'is-error': row.valid === false && !row.doctorServiceSceneCode }"
80
+ :attrs="{ options: row.scenarioList, loading: scenarioLoading, disabled: !!row.acceptanceDoctorTimes }"
69
81
  @input="(val) => changeScenario(val, row)"
70
82
  ></ImSelect>
71
83
  <p v-if="row.describe" class="tips-text">{{ row.describe }}</p>
@@ -84,7 +96,7 @@
84
96
  v-else
85
97
  v-model="row.identity"
86
98
  :class="{ 'is-error': row.valid === false && !row.identity }"
87
- :attrs="{ options: row.shenfenList_new, disabled: row.acceptanceDoctorTimes }"
99
+ :attrs="{ options: row.shenfenList_new, disabled: !!row.acceptanceDoctorTimes }"
88
100
  @input="(val) => handleChangeIdentity(val, row)"
89
101
  ></ImSelect>
90
102
  </div>
@@ -96,13 +108,7 @@
96
108
  <!-- 授课名称 -->
97
109
  <template slot="className" slot-scope="{ row }">
98
110
  <div v-if="!isView && checkHasCourse(row)">
99
- <ImInput
100
- v-model="row.courseName"
101
- :attrs="{ disabled: row.acceptanceDoctorTimes }"
102
- :class="{ 'is-error': row.valid === false && checkHasCourse(row) }"
103
- placeholder="请输入"
104
- maxlength="100"
105
- ></ImInput>
111
+ <ImInput v-model="row.courseName" :attrs="{ disabled: !!row.acceptanceDoctorTimes }" placeholder="请输入" maxlength="100"></ImInput>
106
112
  </div>
107
113
  <div v-else>
108
114
  <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="row.courseName" :no-absolute="true" :new-value="row._newData?.courseName" />
@@ -147,7 +153,7 @@
147
153
  </template>
148
154
  <template slot="operation" slot-scope="{ row, $index }">
149
155
  <el-button type="text" @click="addExpert($index)">新增</el-button>
150
- <el-button :disabled="row.acceptanceDoctorTimes" class="delete-button" type="text" @click="deleteExpert($index)">移除</el-button>
156
+ <el-button :disabled="!!row.acceptanceDoctorTimes" class="delete-button" type="text" @click="deleteExpert($index)">移除</el-button>
151
157
  </template>
152
158
  <template slot="changeType" slot-scope="{ row }">
153
159
  <p>{{ formatChangeType(row._changeType) }}</p>
@@ -219,6 +225,7 @@ export default {
219
225
  prop: 'doctorName',
220
226
  type: 'slot',
221
227
  slot: 'doctorName',
228
+ headSlot: 'doctorNameHead',
222
229
  attrs: {
223
230
  'min-width': '120'
224
231
  }
@@ -246,6 +253,7 @@ export default {
246
253
  prop: 'doctorLevel',
247
254
  type: 'slot',
248
255
  slot: 'doctorLevel',
256
+ headSlot: 'doctorLevelHead',
249
257
  attrs: {
250
258
  'min-width': '150'
251
259
  }
@@ -255,6 +263,7 @@ export default {
255
263
  prop: 'scenario',
256
264
  type: 'slot',
257
265
  slot: 'scenario',
266
+ headSlot: 'scenarioHead',
258
267
  attrs: {
259
268
  'min-width': '150'
260
269
  }
@@ -282,6 +291,7 @@ export default {
282
291
  prop: 'costAmount',
283
292
  type: 'slot',
284
293
  slot: 'costAmount',
294
+ headSlot: 'costAmountHead',
285
295
  attrs: {
286
296
  'min-width': '160'
287
297
  }
@@ -375,9 +385,6 @@ export default {
375
385
  } else if (!item.doctorServiceSceneCode) {
376
386
  res && showMessage && this.$message.warning('请检查服务场景')
377
387
  res = false
378
- } else if (this.checkHasCourse(item) && !item.courseName) {
379
- res && showMessage && this.$message.warning('请填写授课名称')
380
- res = false
381
388
  } else if (!item.costAmount) {
382
389
  res && showMessage && this.$message.warning('请检查费用金额')
383
390
  res = false
@@ -563,14 +570,6 @@ export default {
563
570
  },
564
571
  onUpdate() {
565
572
  const data = JSON.parse(JSON.stringify(this.tableConfig.data))
566
- data.forEach((item) => {
567
- if (item.roleList) {
568
- delete item.roleList
569
- }
570
- if (item.scenarioList) {
571
- delete item.scenarioList
572
- }
573
- })
574
573
  this.$emit('input', data)
575
574
  this.$emit('change', data)
576
575
  },
@@ -719,4 +718,8 @@ export default {
719
718
  font-weight: 500;
720
719
  cursor: pointer;
721
720
  }
721
+ .start {
722
+ color: #f56c6c;
723
+ margin-right: 4px;
724
+ }
722
725
  </style>