imeik-bizui 1.7.1 → 1.7.3

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.
@@ -106,7 +106,7 @@ export default {
106
106
  prop: 'projectCode',
107
107
  label: '项目编号',
108
108
  hidden: true,
109
- rules: [{ required: !this.isView, message: '请选择项目编号', trigger: 'blur' }],
109
+ rules: [{ required: !this.isView, message: '请选择项目编号' }],
110
110
  attrs: {
111
111
  options: [],
112
112
  clearable: true,
@@ -284,10 +284,12 @@ export default {
284
284
  if (!this.isView) {
285
285
  if (this.formConfig.props.applyType && !this.formConfig.props.projectCode && this.belongCompany === defaultBelongCompany && this.attrs.needProject && this.formProps.formBaseNo === 'B01') {
286
286
  if (this.formConfig.props.applyType === '1900825073934028803') {
287
- this.formConfig.props.projectCode = 'Q202003-01_LC'
287
+ // this.formConfig.props.projectCode = 'Q202003-01_LC'
288
+ this.$set(this.formConfig.props, 'projectCode', 'Q202003-01_LC')
288
289
  this.$set(this.formConfig.formItems[index].attrs, 'disabled', true)
289
290
  } else {
290
- this.formConfig.props.projectCode = 'Q202003-01_LC'
291
+ // this.formConfig.props.projectCode = 'Q202003-01_LC'
292
+ this.$set(this.formConfig.props, 'projectCode', 'Q202003-01_LC')
291
293
  this.$set(this.formConfig.formItems[index].attrs, 'disabled', false)
292
294
  }
293
295
  } else {
@@ -211,7 +211,7 @@ export default {
211
211
  ...this.extra
212
212
  }
213
213
  if (!this.selectName && this.value) {
214
- params.objectCodeList = Array.isArray(this.value) ? this.value : [this.value]
214
+ params.employeeNos = Array.isArray(this.value) ? this.value : [this.value]
215
215
  params.selectStatus = !this.value || !this.value.length ? '0' : '1'
216
216
  }
217
217
  this.loading = true
@@ -5,8 +5,15 @@
5
5
  <template slot="doctorName" slot-scope="{ row }">
6
6
  <ImSelect v-if="!isView" v-model="row.doctorNumber" :class="{ 'is-error': row.valid === false && !row.doctorNumber }" :attrs="doctorAttrs" @input="changedoctorName(row)"></ImSelect>
7
7
  <div v-else>
8
- <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="row.doctorName" :no-absolute="true" :new-value="row._newData?.doctorName" />
9
- <div v-else>{{ row.doctorName }}</div>
8
+ <div v-if="showDiff">
9
+ <p class="text-button" @click="viewdoctorDetailItem(row)">{{ row.doctorName }}</p>
10
+ <p class="red-text-button" @click="viewdoctorDetailItem(row._newData)">{{ row._newData?.doctorName }}</p>
11
+ </div>
12
+ <!-- <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="row.doctorName" :no-absolute="true" :new-value="row._newData?.doctorName" /> -->
13
+ <div v-else>
14
+ <p v-if="row.doctorNumber" class="text-button" @click="viewdoctorDetailItem(row)">{{ row.doctorName }}</p>
15
+ <p v-else>{{ row.doctorName }}</p>
16
+ </div>
10
17
  </div>
11
18
  </template>
12
19
  <!-- 职业机构 -->
@@ -50,7 +57,7 @@
50
57
  <ImSelect
51
58
  v-model="row.doctorServiceSceneCode"
52
59
  :class="{ 'is-error': row.valid === false && !row.doctorLevel }"
53
- :attrs="{ options: row.scenarioList }"
60
+ :attrs="{ options: row.scenarioList, loading: scenarioLoading }"
54
61
  @input="(val) => changeScenario(val, row)"
55
62
  ></ImSelect>
56
63
  <p v-if="row.describe" class="tips-text">{{ row.describe }}</p>
@@ -153,7 +160,8 @@ export default {
153
160
  filterable: true,
154
161
  remote: true,
155
162
  'remote-method': this.getExpertsList
156
- }
163
+ },
164
+ scenarioLoading: false
157
165
  }
158
166
  },
159
167
  computed: {
@@ -390,7 +398,9 @@ export default {
390
398
  // 获取场景列表
391
399
  getSceneList(data) {
392
400
  if (data.doctorLevel) {
401
+ this.scenarioLoading = true
393
402
  getExpertServiceFee({ expertRoleCode: data.doctorLevel }).then((res) => {
403
+ this.scenarioLoading = false
394
404
  if (res.code === 200) {
395
405
  const list = JSON.parse(res.data)
396
406
  this.$set(data, 'scenarioList', list)
@@ -446,6 +456,7 @@ export default {
446
456
  if (roleInfo) {
447
457
  this.$set(row, 'doctorLevelName', roleInfo.label)
448
458
  this.$set(row, 'doctorServiceSceneCode', '')
459
+ this.$set(row, 'describe', '')
449
460
  }
450
461
  this.getSceneList(row)
451
462
  },
@@ -533,6 +544,19 @@ export default {
533
544
  })
534
545
 
535
546
  return sums
547
+ },
548
+ viewdoctorDetailItem(row) {
549
+ let host = ''
550
+ if (this.$bizui.env === 'testenv') {
551
+ host = '//usercenter-test.imeik.com'
552
+ } else if (this.$bizui.env === 'pre') {
553
+ host = '//usercenter-pre.imeik.com'
554
+ } else {
555
+ host = '//usercenter.imeik.com'
556
+ }
557
+ const token = this.$bizui.userTokenFunc()
558
+ const url = `${host}/user/expertDatabase/expertDetails?objectCode=${row.doctorNumber}&type=list&token=${token}&hideBar=1`
559
+ window.open(url)
536
560
  }
537
561
  }
538
562
  }
@@ -586,4 +610,14 @@ export default {
586
610
  /deep/ .el-input-number .el-input__inner {
587
611
  text-align: left;
588
612
  }
613
+ .text-button {
614
+ color: #3285f6;
615
+ font-weight: 500;
616
+ cursor: pointer;
617
+ }
618
+ .red-text-button {
619
+ color: red;
620
+ font-weight: 500;
621
+ cursor: pointer;
622
+ }
589
623
  </style>
@@ -50,13 +50,20 @@ export default {
50
50
  return !!this.attrs.multiple
51
51
  },
52
52
 
53
+ /**
54
+ * 是否返回对象格式数据
55
+ */
56
+ isObjectValue() {
57
+ return this.attrs.isObjectValue || false
58
+ },
59
+
53
60
  /**
54
61
  * 标签值
55
62
  */
56
63
  tagValue() {
57
64
  if (this.attrs && this.attrs.tagValue) {
58
65
  const tagValueArr = this.attrs.tagValue.split(',')
59
- const result = tagValueArr.map(item => {
66
+ const result = tagValueArr.map((item) => {
60
67
  return {
61
68
  label: item,
62
69
  value: item
@@ -104,7 +111,7 @@ export default {
104
111
  /**
105
112
  * 标签过滤值
106
113
  */
107
- optionFilterValues() {
114
+ optionFilterValues() {
108
115
  return this.attrs.optionFilterValues
109
116
  },
110
117
 
@@ -151,7 +158,12 @@ export default {
151
158
  */
152
159
  setMyValue() {
153
160
  try {
154
- this.myValue = JSON.parse(JSON.stringify(this.value))
161
+ const newValue = JSON.parse(JSON.stringify(this.value))
162
+ if (this.isObjectValue) {
163
+ this.myValue = this.getObjectValue(newValue)
164
+ } else {
165
+ this.myValue = newValue
166
+ }
155
167
  } catch (error) {}
156
168
  },
157
169
 
@@ -159,8 +171,23 @@ export default {
159
171
  * 输入事件
160
172
  */
161
173
  onUpdate(val, data) {
162
- this.$emit('input', this.myValue, data)
163
- this.$emit('change', this.myValue, data)
174
+ if (this.isObjectValue) {
175
+ this.$emit('input', data, data)
176
+ this.$emit('change', data, data)
177
+ } else {
178
+ this.$emit('input', this.myValue, data)
179
+ this.$emit('change', this.myValue, data)
180
+ }
181
+ },
182
+ /**
183
+ * 获取对象值
184
+ */
185
+ getObjectValue(val) {
186
+ if (this.isMultiple) {
187
+ return val?.map((item) => item.dicValue) || []
188
+ } else {
189
+ return val?.dicValue || ''
190
+ }
164
191
  }
165
192
  }
166
193
  }