cnhis-design-vue 2.0.10 → 2.0.13

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +33 -5
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +23 -23
  4. package/es/button/index.js +2 -2
  5. package/es/captcha/index.js +3 -3
  6. package/es/checkbox/index.js +1 -1
  7. package/es/color-picker/index.js +1 -1
  8. package/es/drag-layout/index.js +3 -3
  9. package/es/editor/index.js +1 -1
  10. package/es/fabric-chart/index.js +66 -35
  11. package/es/form-table/index.js +17 -17
  12. package/es/index/index.js +876 -660
  13. package/es/index/style.css +1 -1
  14. package/es/input/index.js +1 -1
  15. package/es/map/index.js +1 -1
  16. package/es/multi-chat/index.js +91 -76
  17. package/es/multi-chat/style.css +1 -1
  18. package/es/multi-chat-client/index.js +57 -43
  19. package/es/multi-chat-client/style.css +1 -1
  20. package/es/multi-chat-history/index.js +4 -4
  21. package/es/multi-chat-record/index.js +4 -4
  22. package/es/multi-chat-setting/index.js +166 -95
  23. package/es/multi-chat-setting/style.css +1 -1
  24. package/es/multi-chat-sip/index.js +1 -1
  25. package/es/radio/index.js +1 -1
  26. package/es/scale-view/index.js +406 -337
  27. package/es/scale-view/style.css +1 -1
  28. package/es/select/index.js +3 -3
  29. package/es/select-label/index.js +3 -3
  30. package/es/select-person/index.js +76 -39
  31. package/es/select-person/style.css +1 -1
  32. package/es/table-filter/index.js +21 -21
  33. package/es/tag/index.js +1 -1
  34. package/es/utils/index.js +24 -2
  35. package/es/verification-code/index.js +2 -2
  36. package/package.json +1 -1
  37. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +2 -2
  38. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +8 -7
  39. package/packages/fabric-chart/src/mixins/draw.js +18 -0
  40. package/packages/multi-chat/chat/chatFooter.vue +11 -2
  41. package/packages/multi-chat/chat/index.vue +3 -2
  42. package/packages/multi-chat/chat/scrollList.vue +3 -1
  43. package/packages/multi-chat/setting/baseInfo/index.vue +55 -1
  44. package/packages/multi-chat/store/getters.js +3 -0
  45. package/packages/multi-chat/store/mutation.js +3 -0
  46. package/packages/multi-chat/store/state.js +1 -0
  47. package/packages/scale-view/formitem/r-choice.vue +110 -95
  48. package/packages/scale-view/scaleView.vue +334 -369
  49. package/packages/select-person/select-person.vue +26 -12
  50. package/src/utils/index.js +15 -0
@@ -224,7 +224,8 @@ export default {
224
224
  'setCurScrollItem',
225
225
  'setDisableOperate',
226
226
  'setClassify',
227
- 'setOfflineSessionStatistic'
227
+ 'setOfflineSessionStatistic',
228
+ 'setClosedSession'
228
229
  ]),
229
230
  ...mapMutations({
230
231
  clearMsgList: 'setMsgList'
@@ -449,6 +450,7 @@ export default {
449
450
  this.setLastClassify(this.classify);
450
451
  this.setLastCurrentTab(this.currentTab);
451
452
  this.setCurScrollItem(item);
453
+ this.setClosedSession(this.type === 'end');
452
454
  switch (this.type) {
453
455
  case 'queue':
454
456
  this.accessChat(item);
@@ -148,7 +148,7 @@
148
148
  </template>
149
149
  </a-table>
150
150
  </a-form-item>
151
- <a-form-item :label="i18nText('1.9.423')" v-if="toolbarList.length > 0">
151
+ <a-form-item :label="i18nText('1.9.698')" v-if="toolbarList.length > 0">
152
152
  <!-- <a-checkbox-group
153
153
  :options="toolbarList"
154
154
  v-decorator="[`toolbar`]"
@@ -170,6 +170,24 @@
170
170
  </a-row>
171
171
  </a-checkbox-group>
172
172
  </a-form-item>
173
+ <a-form-item :label="i18nText('1.9.699')" v-if="closedToolbarList.length > 0">
174
+ <a-checkbox-group v-decorator="[`closedToolbar`]">
175
+ <a-row>
176
+ <a-col>
177
+ <span style="display: inline-block;width: 70px;">PC:</span>
178
+ <a-checkbox :value="item.value" v-for="(item, index) in closedToolbarList.filter(item => item.source === 'PC')" :key="index">
179
+ {{ item.label }}
180
+ </a-checkbox>
181
+ </a-col>
182
+ <a-col>
183
+ <span style="display: inline-block;width: 70px;">MOBILE:</span>
184
+ <a-checkbox :value="item.value" v-for="(item, index) in closedToolbarList.filter(item => item.source === 'MOBILE')" :key="index">
185
+ {{ item.label }}
186
+ </a-checkbox>
187
+ </a-col>
188
+ </a-row>
189
+ </a-checkbox-group>
190
+ </a-form-item>
173
191
  </div>
174
192
  <div class="functional-module" v-if="isListClassify !== 'Y' && !isStaff">
175
193
  <span class="title">{{ i18nText('1.9.424') }}</span>
@@ -383,7 +401,9 @@ export default {
383
401
  functionList: [], // 服务端功能下拉列表
384
402
  clientFunctionList: [], // 客户端功能下拉列表
385
403
  toolbar: [],
404
+ closedToolbar: [],
386
405
  toolbarList: [],
406
+ closedToolbarList: [],
387
407
  queryTimeSetting: [],
388
408
  queryTimeSettingList: [],
389
409
  serviceState: [],
@@ -527,6 +547,7 @@ export default {
527
547
  robotObj,
528
548
  robotSetting,
529
549
  toolbar = [],
550
+ closedToolbar = [],
530
551
  isListClassify,
531
552
  listClassify = [],
532
553
  rightClickSetting = [],
@@ -556,6 +577,7 @@ export default {
556
577
  });
557
578
  this.fillClientSetting(clientSetting);
558
579
  this.fillToolbar(toolbar);
580
+ this.fillClosedToolbar(closedToolbar);
559
581
  this.fillQueryTimeSetting(queryTimeSetting);
560
582
  this.fillBroadcast(broadcast);
561
583
  this.fillTabBar(setting.tabBarSetting);
@@ -633,6 +655,23 @@ export default {
633
655
  this.form.setFieldsValue({ toolbar: toolbarChecked });
634
656
  });
635
657
  },
658
+ fillClosedToolbar(closedToolbar) {
659
+ this.closedToolbarList = closedToolbar.map(item => ({
660
+ label: item.name,
661
+ value: item.name + '-' + item.source,
662
+ source: item.source
663
+ }));
664
+ this.closedToolbar = closedToolbar;
665
+ let closedToolbarChecked = closedToolbar.reduce((result, item) => {
666
+ if (item.isChecked === 'Y') {
667
+ result.push(item.name + '-' + item.source);
668
+ }
669
+ return result;
670
+ }, []);
671
+ this.$nextTick(() => {
672
+ this.form.setFieldsValue({ closedToolbar: closedToolbarChecked });
673
+ });
674
+ },
636
675
  fillTabBar(data) {
637
676
  const mobileSetting = {
638
677
  isChecked: 'N',
@@ -811,6 +850,7 @@ export default {
811
850
  let setting = {};
812
851
  this.handleTimeSetting(setting, values);
813
852
  this.handleToolbar(setting, values);
853
+ this.handleClosedToolbar(setting, values);
814
854
  this.handleQueryTimeSetting(setting, values);
815
855
  this.handleClassify(setting);
816
856
  let validate = this.handleServiceSetting(setting, values);
@@ -913,6 +953,20 @@ export default {
913
953
  return result;
914
954
  }, []);
915
955
  },
956
+ handleClosedToolbar(setting, values) {
957
+ if (this.closedToolbarList.length === 0) return;
958
+ let { closedToolbar } = values;
959
+ let clone = JSON.parse(JSON.stringify(this.closedToolbar));
960
+ setting.closedToolbar = clone.reduce((result, item) => {
961
+ if (closedToolbar.includes(item.name + '-' + item.source)) {
962
+ item.isChecked = 'Y';
963
+ } else {
964
+ item.isChecked = 'N';
965
+ }
966
+ result.push(item);
967
+ return result;
968
+ }, []);
969
+ },
916
970
  /* 客户端设置 */
917
971
  handleClientSetting(setting, values) {
918
972
  if (this.isListClassify === 'Y') return;
@@ -230,6 +230,9 @@ export default {
230
230
  isServer(state) {
231
231
  return state.isServer;
232
232
  },
233
+ closedSession(state) {
234
+ return state.closedSession;
235
+ },
233
236
  clientParams(state, getters) {
234
237
  return Object.assign({}, getters.accessParams, state.clientParams);
235
238
  },
@@ -170,6 +170,9 @@ export default {
170
170
  setIsServer(state, isServer) {
171
171
  state.isServer = isServer;
172
172
  },
173
+ setClosedSession(state, closedSession) {
174
+ state.closedSession = closedSession;
175
+ },
173
176
  setClientParams(state, clientParams) {
174
177
  state.clientParams = clientParams;
175
178
  },
@@ -76,6 +76,7 @@ export default () => {
76
76
  statusTitle: '',
77
77
  sessionEnd: false,
78
78
  isServer: false,
79
+ closedSession: false,
79
80
 
80
81
  // 客户端参数
81
82
  clientParams: {},
@@ -11,7 +11,7 @@
11
11
  v-for="(o, i) in curOptions"
12
12
  class="choice-radio"
13
13
  :value="o[choiceUseKey]"
14
- :key="o.key + i"
14
+ :key="o.key + i + o.label"
15
15
  :class="{ 'block-radio': !item.setting.isHorizontal }"
16
16
  :disabled="isLock"
17
17
  :style="{ color: choiceColor(o) }"
@@ -24,18 +24,26 @@
24
24
  </div>
25
25
  </span>
26
26
  </template>
27
- <template>
28
- <template v-if="isRadioItem && showPreSuffix(o)">
29
- <span v-if="o.prefix" class="prefix-span" :style="{ color: choiceColor(o) }">{{ o.prefix }}</span>
30
- <a-input
31
- v-model="optionsPreSuffixObj[o.key]"
32
- :disabled="isLock || inputLock"
33
- @change="inputPreSuffixChange(o, i)"
34
- :style="{ color: choiceColor(o) }"
35
- placeholder="请输入"
36
- />
37
- <span v-if="o.suffix" class="suffix-span" :style="{ color: choiceColor(o) }">{{ o.suffix }}</span>
38
- </template>
27
+ <template>
28
+ <template v-if="isRadioItem && showPreSuffix(o)">
29
+ <span
30
+ v-if="o.prefix"
31
+ class="prefix-span"
32
+ :style="{ color: choiceColor(o) }"
33
+ >{{ o.prefix }}</span>
34
+ <a-input
35
+ v-model="optionsPreSuffixObj[o.key]"
36
+ :disabled="isLock || inputLock"
37
+ @change="inputPreSuffixChange(o, i)"
38
+ :style="{ color: choiceColor(o) }"
39
+ placeholder="请输入"
40
+ />
41
+ <span
42
+ v-if="o.suffix"
43
+ class="suffix-span"
44
+ :style="{ color: choiceColor(o) }"
45
+ >{{ o.suffix }}</span>
46
+ </template>
39
47
  <span v-else :style="{ color: choiceColor(o) }">{{ o.label }}</span>
40
48
  <a-input
41
49
  v-if="o.importability"
@@ -58,7 +66,7 @@
58
66
  <a-checkbox
59
67
  class="choice-checkbox"
60
68
  v-for="(o, i) in curOptions"
61
- :key="o.key + i"
69
+ :key="o.key + i + o.label"
62
70
  :value="o[choiceUseKey]"
63
71
  :class="{ 'block-checkbox': !item.setting.isHorizontal }"
64
72
  :disabled="isLock"
@@ -74,7 +82,11 @@
74
82
  </template>
75
83
  <template>
76
84
  <template v-if="isCheckboxItem && showPreSuffix(o)">
77
- <span v-if="o.prefix" class="prefix-span" :style="{ color: choiceColor(o) }">{{ o.prefix }}</span>
85
+ <span
86
+ v-if="o.prefix"
87
+ class="prefix-span"
88
+ :style="{ color: choiceColor(o) }"
89
+ >{{ o.prefix }}</span>
78
90
  <a-input
79
91
  v-model="optionsPreSuffixObj[o.key]"
80
92
  :disabled="isLock || inputLock"
@@ -82,11 +94,17 @@
82
94
  :style="{ color: choiceColor(o) }"
83
95
  placeholder="请输入"
84
96
  />
85
- <span v-if="o.suffix" class="suffix-span" :style="{ color: choiceColor(o) }">{{ o.suffix }}</span>
97
+ <span
98
+ v-if="o.suffix"
99
+ class="suffix-span"
100
+ :style="{ color: choiceColor(o) }"
101
+ >{{ o.suffix }}</span>
86
102
  </template>
87
- <span v-else style="white-space: initial;" :style="{ color: choiceColor(o) }">
88
- {{ o.label }}
89
- </span>
103
+ <span
104
+ v-else
105
+ style="white-space: initial;"
106
+ :style="{ color: choiceColor(o) }"
107
+ >{{ o.label }}</span>
90
108
  <a-input
91
109
  v-if="o.importability"
92
110
  v-model="othersText"
@@ -95,7 +113,7 @@
95
113
  @change="inputCheckboxChange"
96
114
  placeholder="请输入"
97
115
  />
98
- </template>
116
+ </template>
99
117
  </a-checkbox>
100
118
  </a-checkbox-group>
101
119
  <a-select
@@ -111,10 +129,8 @@
111
129
  :filterOption="filterOption"
112
130
  :notFoundContent="fetching ? undefined : '暂无数据'"
113
131
  >
114
- <a-spin v-if="fetching" slot="notFoundContent" size="small" />
115
- <a-select-option v-for="(v, i) in curOptions" :key="i" :value="v.value">
116
- {{ v[showField] }}
117
- </a-select-option>
132
+ <a-spin v-if="fetching" slot="notFoundContent" size="small" />
133
+ <a-select-option v-for="(v, i) in curOptions" :key="i" :value="v.value">{{ v[showField] }}</a-select-option>
118
134
  </a-select>
119
135
  <a-cascader
120
136
  v-else-if="cloneItem.type == 'SEARCH_CASCADE'"
@@ -147,14 +163,14 @@
147
163
  * getSearchOptions 关键字检索的 function
148
164
  * getCascadeOptions 获取级联数据的 furnction
149
165
  */
150
- import { Select, Input, Radio, Checkbox, Cascader } from "ant-design-vue";
151
- import { judgeTypes } from "../mixin/judgeTypes";
166
+ import { Select, Input, Radio, Checkbox, Cascader } from 'ant-design-vue';
167
+ import { judgeTypes } from '../mixin/judgeTypes';
152
168
  // import format from "@/components/table/mixins/format";
153
169
  // import TextOverTooltip from "./text-over-tooltip/TextOverTooltip.vue";
154
- import utils from "@/utils/utils-map";
170
+ import utils from '@/utils/utils-map';
155
171
  import axios from 'axios';
156
172
  import 'viewerjs/dist/viewer.css';
157
- import { component as Viewer } from "v-viewer";
173
+ import { component as Viewer } from 'v-viewer';
158
174
  export default {
159
175
  mixins: [judgeTypes],
160
176
  props: {
@@ -175,7 +191,7 @@ export default {
175
191
  type: Function,
176
192
  default: () => Promise.resolve([])
177
193
  },
178
- openType: { type: String, default: "" }
194
+ openType: { type: String, default: '' }
179
195
  },
180
196
  components: {
181
197
  Viewer,
@@ -186,7 +202,7 @@ export default {
186
202
  [Radio.name]: Radio,
187
203
  [Radio.Group.name]: Radio.Group,
188
204
  [Select.name]: Select,
189
- [Select.Option.name]: Select.Option,
205
+ [Select.Option.name]: Select.Option
190
206
  },
191
207
  computed: {
192
208
  choiceValue: {
@@ -194,32 +210,32 @@ export default {
194
210
  return this.value ? this.value : undefined;
195
211
  },
196
212
  set(val) {
197
- this.$emit("input", val);
213
+ this.$emit('input', val);
198
214
  }
199
215
  },
200
216
  choiceUseKey() {
201
- if (this.item.type === "RADIO_BLOCK" || this.item.type === "CHECKBOX_BLOCK") return "key";
202
- return "value";
217
+ if (this.item.type === 'RADIO_BLOCK' || this.item.type === 'CHECKBOX_BLOCK') return 'key';
218
+ return 'value';
203
219
  },
204
220
  choiceColor() {
205
- return function(p) {
206
- let color = p.color || "rgba(0, 0, 0, 0.65)";
221
+ return function (p) {
222
+ let color = p.color || 'rgba(0, 0, 0, 0.65)';
207
223
  return `${color} !important`;
208
224
  };
209
225
  },
210
226
  showImgWrap() {
211
- return function(o) {
227
+ return function (o) {
212
228
  return !o.prefix && !o.suffix && o.imageUrl;
213
229
  };
214
230
  },
215
231
  isRadioItem() {
216
- return this.item.type === "RADIO_BLOCK";
232
+ return this.item.type === 'RADIO_BLOCK';
217
233
  },
218
234
  isCheckboxItem() {
219
- return this.item.type === "CHECKBOX_BLOCK";
235
+ return this.item.type === 'CHECKBOX_BLOCK';
220
236
  },
221
237
  showPreSuffix() {
222
- return function(o) {
238
+ return function (o) {
223
239
  return o.prefix || o.suffix;
224
240
  };
225
241
  }
@@ -234,12 +250,12 @@ export default {
234
250
  if (this.isEvaluation(value.type)) {
235
251
  options = value.scoreConfigs?.scoreRules || [];
236
252
  }
237
- if (value.type === "RADIO_BLOCK" || value.type === "EVALUATE_RADIO_BLOCK") {
253
+ if (value.type === 'RADIO_BLOCK' || value.type === 'EVALUATE_RADIO_BLOCK') {
238
254
  const defVal = value.dbValue || value.setting.defaultValue || this.value;
239
255
  this.handleRadioDef(value, defVal, options);
240
256
  return;
241
257
  }
242
- if (value.type === "CHECKBOX_BLOCK" || value.type === "EVALUATE_CHECKBOX_BLOCK") {
258
+ if (value.type === 'CHECKBOX_BLOCK' || value.type === 'EVALUATE_CHECKBOX_BLOCK') {
243
259
  let defVal = [];
244
260
  if (utils.isJSON(value.setting.defaultValue)) {
245
261
  defVal = JSON.parse(value.setting.defaultValue);
@@ -249,11 +265,7 @@ export default {
249
265
  this.handleCheckboxDef(value, value.dbValue || defVal, options);
250
266
  return;
251
267
  }
252
- if (
253
- value.type == "SELECT" ||
254
- value.type == "SEARCH_CASCADE" ||
255
- value.type === "EVALUATE_SELECT"
256
- ) {
268
+ if (value.type == 'SELECT' || value.type == 'SEARCH_CASCADE' || value.type === 'EVALUATE_SELECT') {
257
269
  this.cloneItem = JSON.parse(JSON.stringify(value));
258
270
  let options = this.cloneItem.options || [];
259
271
  if (this.isEvaluation(value.type)) {
@@ -267,18 +279,18 @@ export default {
267
279
  },
268
280
  data() {
269
281
  return {
270
- selectParams: { tableType: "TABLE_LIST", pageSize: 20, page: 1 },
271
- cascaderParams: { tableType: "TABLE_LIST" },
282
+ selectParams: { tableType: 'TABLE_LIST', pageSize: 20, page: 1 },
283
+ cascaderParams: { tableType: 'TABLE_LIST' },
272
284
  cloneItem: {},
273
- columnName: "", // 取值字段
274
- showField: "", // 显示字段
275
- curvalue: "",
285
+ columnName: '', // 取值字段
286
+ showField: '', // 显示字段
287
+ curvalue: '',
276
288
  curCheckboxValue: [],
277
- othersText: "",
289
+ othersText: '',
278
290
  curOptions: [],
279
291
  fieldList: [],
280
292
  buttonList: [],
281
- source: "guageChoice",
293
+ source: 'guageChoice',
282
294
  fetching: false,
283
295
  previewImages: [],
284
296
  optionsPreSuffixObj: {}
@@ -289,7 +301,7 @@ export default {
289
301
  this.curOptions = this.handleOptions(options, item.type);
290
302
  if (!options.length || !curValue) return;
291
303
  // 测评单选回显
292
- if (item.type === "EVALUATE_RADIO_BLOCK") {
304
+ if (item.type === 'EVALUATE_RADIO_BLOCK') {
293
305
  this.curvalue = curValue;
294
306
  this.radioChange();
295
307
  return;
@@ -310,7 +322,7 @@ export default {
310
322
  });
311
323
  if (!preSuffixItem) {
312
324
  this.othersText = curValue;
313
- this.curvalue = "other";
325
+ this.curvalue = 'other';
314
326
  }
315
327
  this.radioChange();
316
328
  },
@@ -340,14 +352,14 @@ export default {
340
352
  if (curValue === v.value) return v.key;
341
353
  if (isCheckbox && hasOther) {
342
354
  this.othersText = curValue;
343
- return "other";
355
+ return 'other';
344
356
  }
345
357
  },
346
358
  async handleCheckboxDef(item, curValue, options) {
347
359
  this.curOptions = this.handleOptions(options, item.type);
348
360
  if (!options.length || !curValue || !curValue.length) return;
349
361
  // 测评多选回显
350
- if (item.type === "EVALUATE_CHECKBOX_BLOCK") {
362
+ if (item.type === 'EVALUATE_CHECKBOX_BLOCK') {
351
363
  this.curCheckboxValue = curValue;
352
364
  this.handleCheckboxOther();
353
365
  return;
@@ -357,13 +369,13 @@ export default {
357
369
  i = 0,
358
370
  x,
359
371
  len = curValue.length;
360
- let hasOther = options.some(v => v.importability || v.key === "other");
372
+ let hasOther = options.some(v => v.importability || v.key === 'other');
361
373
  for (; i < len; i++) {
362
374
  x = curValue[i];
363
- if (x === "其他") {
375
+ if (x === '其他') {
364
376
  this.othersText = x;
365
- this.curvalue = "other";
366
- !resArr.includes("other") && resArr.push("other");
377
+ this.curvalue = 'other';
378
+ !resArr.includes('other') && resArr.push('other');
367
379
  continue;
368
380
  }
369
381
  let matchIndex = options.findIndex(v => v.value === x);
@@ -399,7 +411,7 @@ export default {
399
411
  othersText: this.othersText,
400
412
  optionsPreSuffixObj: this.optionsPreSuffixObj
401
413
  };
402
- this.$emit("radioChange", this.curvalue, this.item, choiceObj);
414
+ this.$emit('radioChange', this.curvalue, this.item, choiceObj);
403
415
  },
404
416
  checkboxChange() {
405
417
  this.handleCheckboxOther();
@@ -409,8 +421,8 @@ export default {
409
421
  othersText: this.othersText,
410
422
  optionsPreSuffixObj: this.optionsPreSuffixObj
411
423
  };
412
- this.curvalue = "other";
413
- this.$emit("radioChange", "other", this.item, choiceObj);
424
+ this.curvalue = 'other';
425
+ this.$emit('radioChange', 'other', this.item, choiceObj);
414
426
  },
415
427
  inputPreSuffixChange(o, i) {
416
428
  this.curvalue = o.key;
@@ -418,7 +430,7 @@ export default {
418
430
  othersText: this.othersText,
419
431
  optionsPreSuffixObj: this.optionsPreSuffixObj
420
432
  };
421
- this.$emit("radioChange", this.curvalue, this.item, choiceObj);
433
+ this.$emit('radioChange', this.curvalue, this.item, choiceObj);
422
434
  },
423
435
  inputPreSuffixCheckboxChange(o, i) {
424
436
  let choiceObj = {
@@ -429,7 +441,7 @@ export default {
429
441
  this.curCheckboxValue.push(o.key);
430
442
  }
431
443
  let curCheckboxValue = JSON.parse(JSON.stringify(this.curCheckboxValue));
432
- this.$emit("checkboxChange", curCheckboxValue, this.item, choiceObj);
444
+ this.$emit('checkboxChange', curCheckboxValue, this.item, choiceObj);
433
445
  },
434
446
  inputCheckboxChange() {
435
447
  this.handleCheckboxOther(true);
@@ -439,23 +451,23 @@ export default {
439
451
  othersText: this.othersText,
440
452
  optionsPreSuffixObj: this.optionsPreSuffixObj
441
453
  };
442
- if (isOtherInput && !this.curCheckboxValue.includes("other")) {
443
- this.curCheckboxValue.push("other");
454
+ if (isOtherInput && !this.curCheckboxValue.includes('other')) {
455
+ this.curCheckboxValue.push('other');
444
456
  }
445
457
  let curCheckboxValue = JSON.parse(JSON.stringify(this.curCheckboxValue));
446
- this.$emit("checkboxChange", curCheckboxValue, this.item, choiceObj);
458
+ this.$emit('checkboxChange', curCheckboxValue, this.item, choiceObj);
447
459
  },
448
460
  async initSelectOptions() {
449
461
  // 分享链接的量表用 optionType 1:静态,2:动态,3:动态转静态
450
462
  const { targetSource, type, options = [], optionType = 1 } = this.cloneItem;
451
- this.showField = "label";
463
+ this.showField = 'label';
452
464
  if (!targetSource?.target_id) return;
453
465
  // 动态数据源转静态数据
454
- if (type == "SELECT" && (options.length || optionType == 3)) {
466
+ if (type == 'SELECT' && (options.length || optionType == 3)) {
455
467
  this.curOptions = options;
456
468
  return;
457
469
  }
458
- if(type === "SELECT") {
470
+ if (type === 'SELECT') {
459
471
  this.fetching = true;
460
472
  this.curOptions = await this.getSelectOptions(this.cloneItem);
461
473
  this.fetching = false;
@@ -474,10 +486,10 @@ export default {
474
486
  },
475
487
  // 下拉组件查询列表数据配置
476
488
  findDetails({ target_id, values, primaryField, relationField, showField }) {
477
- const url = "/tableList/getDetail";
489
+ const url = '/tableList/getDetail';
478
490
  const params = {
479
491
  tableId: target_id,
480
- tableType: "TABLE_LIST"
492
+ tableType: 'TABLE_LIST'
481
493
  };
482
494
  this.columnName = values;
483
495
  this.showField = showField || values;
@@ -485,16 +497,16 @@ export default {
485
497
  const { detailAutograph, tableId, fieldList = [], buttonList = [] } = data.map;
486
498
  const { type } = this.cloneItem;
487
499
  fieldList.forEach(item => {
488
- item.attrType = (item.settingObj && item.settingObj.attr) || "";
500
+ item.attrType = (item.settingObj && item.settingObj.attr) || '';
489
501
  });
490
502
  this.fieldList = fieldList;
491
503
  this.buttonList = buttonList;
492
- if (type == "SELECT") {
504
+ if (type == 'SELECT') {
493
505
  Object.assign(this.selectParams, {
494
506
  autograph: detailAutograph,
495
507
  tableId
496
508
  });
497
- } else if (type == "SEARCH_CASCADE") {
509
+ } else if (type == 'SEARCH_CASCADE') {
498
510
  Object.assign(this.cascaderParams, {
499
511
  autograph: detailAutograph,
500
512
  tableId,
@@ -507,7 +519,7 @@ export default {
507
519
  },
508
520
  // 下拉组件查询列表字段值
509
521
  findTableData({ values, keyword }) {
510
- const url = "/tableReader/getTableData";
522
+ const url = '/tableReader/getTableData';
511
523
  delete this.selectParams.keyword;
512
524
  if (keyword) {
513
525
  Object.assign(this.selectParams, { keyword });
@@ -520,7 +532,7 @@ export default {
520
532
  value: row[values]
521
533
  });
522
534
  });
523
- let optionsList = this.uniqArrObj(options, "value");
535
+ let optionsList = this.uniqArrObj(options, 'value');
524
536
  optionsList = this.formatData({
525
537
  tableList: optionsList,
526
538
  fieldList: this.fieldList,
@@ -533,7 +545,7 @@ export default {
533
545
  },
534
546
  // 级联组件查询列表数据
535
547
  findCascader({ values }) {
536
- const url = "/tableReader/getTableData";
548
+ const url = '/tableReader/getTableData';
537
549
  return axios.post(url, this.$qs.stringify(this.cascaderParams)).then(({ data }) => {
538
550
  const { rows } = data.map;
539
551
  this.curOptions = this.initTreeData(rows, values);
@@ -558,27 +570,30 @@ export default {
558
570
  uniqArrObj(arr, name) {
559
571
  let obj = {};
560
572
  return arr.reduce((cur, next) => {
561
- obj[next[name]] ? "" : (obj[next[name]] = true && cur.push(next));
573
+ obj[next[name]] ? '' : (obj[next[name]] = true && cur.push(next));
562
574
  return cur;
563
575
  }, []);
564
576
  },
565
577
  // 下拉组件搜索
566
- async handleSearch(value) {
567
- try {
568
- this.curOptions = await this.getSearchOptions({
569
- values: this.columnName,
570
- showField: this.showField,
571
- keyword: value
572
- }, this.cloneItem);
573
- console.log(this.curOptions,'curOptions')
574
- } catch (error) {
575
- console.log(error)
576
- }
578
+ async handleSearch(value) {
579
+ try {
580
+ this.curOptions = await this.getSearchOptions(
581
+ {
582
+ values: this.columnName,
583
+ showField: this.showField,
584
+ keyword: value
585
+ },
586
+ this.cloneItem
587
+ );
588
+ console.log(this.curOptions, 'curOptions');
589
+ } catch (error) {
590
+ console.log(error);
591
+ }
577
592
  },
578
593
  // 下拉组件选值
579
594
  handleSelectChange(value) {
580
595
  let res = {
581
- value: "",
596
+ value: '',
582
597
  list: []
583
598
  };
584
599
  let matchItem;
@@ -601,13 +616,13 @@ export default {
601
616
  res.list.push(matchItem);
602
617
  }
603
618
  }
604
- this.$emit("change", res);
619
+ this.$emit('change', res);
605
620
  },
606
621
  filterOption(input, option) {
607
622
  return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
608
623
  },
609
624
  getPopupContainer(triggerNode) {
610
- if(this.openType == 'formIframe') {
625
+ if (this.openType == 'formIframe') {
611
626
  return document.body;
612
627
  }
613
628
  return triggerNode.parentNode;