askbot-dragon 1.7.78-beta → 1.7.81-beta

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.
@@ -13,8 +13,8 @@
13
13
  class="field-item-name">
14
14
  <span
15
15
  v-if="item.fieldId !== 'workorder_description' && item.fieldId !== 'workorder_clientId'">{{ item.formField.name }}</span>
16
- <span v-if="item.fieldId === 'workorder_description'">{{ isBaiLi ? '反馈描述' : '问题描述' }}</span>
17
- <span v-if="item.fieldId === 'workorder_clientId'">报单人</span>
16
+ <span v-if="item.fieldId === 'workorder_description'">{{ isBaiLi ? $t('formTemplate.feedbackDes') : $t('formTemplate.orderDes') }}</span>
17
+ <span v-if="item.fieldId === 'workorder_clientId'">{{$t('formTemplate.report')}}</span>
18
18
  <span style="color: red;padding-left: 5px;padding-right: 5px"
19
19
  v-if="item.fieldId !== '0feca81fce97465da537248c066e4db8' && item.fieldId !== '1d8bd21485834773a6d18eae60013000' && (item.required || isRequiredFn(item.formField))">*</span>
20
20
  <el-tooltip class="item" effect="dark" placement="right-start">
@@ -59,7 +59,7 @@
59
59
  </div>
60
60
  </template>
61
61
  <el-input type="textarea" :rows="2" v-model="item.value"
62
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请输入'"
62
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.inputPlaceholder')"
63
63
  :maxlength="item.formField.extInfo && item.formField.extInfo.maxNum ? item.formField.extInfo.maxNum * 1 : 1000"
64
64
  v-if="item.formField.type === 'TEXTAREA' && item.fieldId !== 'workorder_description'"></el-input>
65
65
  <div v-else-if="item.fieldId === 'workorder_description'">
@@ -79,20 +79,20 @@
79
79
  <file-list-view :attachmentList="attachmentList" @attachDeleteAttch="attachDeleteAttch"></file-list-view>
80
80
  </div>
81
81
  <el-date-picker v-model=item.value type="date"
82
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择日期'"
82
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectDate')"
83
83
  style="width: 100%" v-else-if="item.formField.type === 'DATE_PICKER'">
84
84
  </el-date-picker>
85
85
  <el-time-picker v-model=item.value format="HH:mm"
86
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择时间'"
86
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectTime')"
87
87
  style="width: 100%"
88
88
  v-else-if="item.formField.type === 'TIME_PICKER' && (!item.formField.extInfo.mold || item.formField.extInfo.mold == 'TIME' || getMoldTime(item.formField) == 'TIME')">
89
89
  </el-time-picker>
90
90
  <el-date-picker v-model=item.value type="date" style="width: 100%"
91
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择日期'"
91
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectDate')"
92
92
  v-else-if="item.formField.type === 'TIME_PICKER' && (item.formField.extInfo.mold === 'DATA' || item.formField.extInfo.mold === 'DATE' || getMoldTime(item.formField) == 'DATE')">
93
93
  </el-date-picker>
94
94
  <el-date-picker v-model=item.value
95
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择日期时间'"
95
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectDateTime')"
96
96
  clearable style="width: 100%" type="datetime"
97
97
  v-else-if="item.formField.type === 'TIME_PICKER' && (item.formField.extInfo.mold === 'DATA_TIME' || item.formField.extInfo.mold === 'DATE_TIME' || getMoldTime(item.formField) == 'DATE_TIME')">
98
98
  </el-date-picker>
@@ -122,7 +122,7 @@
122
122
  </div>
123
123
  <div v-else-if="item.formField.type === 'SELECT' || item.formField.type === 'OPTION'">
124
124
  <el-select v-model=item.value
125
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
125
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
126
126
  style="width: 100%" filterable
127
127
  v-if="item.fieldId === 'workorder_clientId' || item.fieldId === 'workorder_statusId' || item.fieldId === 'workorder_priority'">
128
128
  <el-option v-for="(items, index) in selectOptions(item.formField)" :key="index" :label="items.label"
@@ -130,7 +130,7 @@
130
130
  </el-option>
131
131
  </el-select>
132
132
  <el-select v-model=item.value
133
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
133
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
134
134
  style="width: 100%" filterable v-else @change="changeSelect(item)"
135
135
  :multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'">
136
136
  <el-option v-for="(items, index) in optionsLists(item)" :key="index" :label="items.label"
@@ -159,7 +159,7 @@
159
159
  </span>
160
160
  </template>
161
161
  <span
162
- v-else>{{ item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择' }}</span>
162
+ v-else>{{ item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder' )}}</span>
163
163
  </div>
164
164
  <!-- <el-cascader
165
165
  v-model=item.value
@@ -210,7 +210,7 @@
210
210
  </template>
211
211
  <div v-else-if="item.formField.type == 'REF_TEMPLATE' || item.formField.type == 'REF'">
212
212
  <el-select v-model=item.value
213
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
213
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
214
214
  style="width: 100%" filterable
215
215
  :multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'"
216
216
  @visible-change="(visible) => { return refTemplateVisibleChange(visible, item) }" collapse-tags
@@ -234,7 +234,7 @@
234
234
  <div v-if="item.formField.type === 'INPUT'" class="form-field-item-value">
235
235
  <van-field v-model=item.value :label=item.formField.name
236
236
  :required="item.required || isRequiredFn(item.formField)" :disabled="disableds"
237
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请输入'"
237
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.inputPlaceholder')"
238
238
  :maxlength="item.formField.extInfo && item.formField.extInfo.maxNum ? item.formField.extInfo.maxNum * 1 : 1000"
239
239
  @blur="typeCheck(item.formField, item)" :type="item.formField.extInfo.inputType === 'NUMBER' ||
240
240
  item.formField.extInfo.inputType === 'RATE' ? 'number' : 'text'">
@@ -270,7 +270,7 @@
270
270
  <div v-else-if="item.formField.type === 'TEXTAREA'" class="form-field-item-value">
271
271
  <van-field v-model=item.value :label=item.formField.name
272
272
  :required="item.required || isRequiredFn(item.formField)" type="textarea" :disabled="disableds"
273
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请输入'"
273
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.inputPlaceholder')"
274
274
  :maxlength="item.formField.extInfo && item.formField.extInfo.maxNum ? item.formField.extInfo.maxNum * 1 : 1000"
275
275
  v-if="item.fieldId !== 'workorder_description'">
276
276
  <template slot="label">
@@ -317,7 +317,7 @@
317
317
  </div>
318
318
  <div v-else-if="item.formField.type === 'DATE_PICKER'" class="form-field-item-value">
319
319
  <van-field readonly clickable name="calendar" :value=dateValue[item.fieldId] :label=item.formField.name
320
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择日期'"
320
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectDate')"
321
321
  :required="item.required || isRequiredFn(item.formField)" @click="dateClick(item.fieldId)"
322
322
  :disabled="disableds" right-icon="van-icon van-icon-arrow van-cell__right-icon">
323
323
  <template slot="label">
@@ -341,7 +341,7 @@
341
341
  class="form-field-item-value">
342
342
  <van-field readonly clickable name="datetimePicker" :required="item.required || isRequiredFn(item.formField)"
343
343
  :value=extInfoFieldValue[item.fieldId] :label=item.formField.name
344
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
344
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
345
345
  @click="timeClick(item.fieldId, item, 'DATE_TIME')" :disabled="disableds"
346
346
  right-icon="van-icon van-icon-arrow van-cell__right-icon">
347
347
  <template slot="label">
@@ -368,7 +368,7 @@
368
368
  class="form-field-item-value">
369
369
  <van-field readonly clickable name="datetimePicker" :required="item.required || isRequiredFn(item.formField)"
370
370
  :value=extInfoFieldValue[item.fieldId] :label=item.formField.name
371
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
371
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
372
372
  @click="timeClick(item.fieldId, item, 'TIME')" :disabled="disableds"
373
373
  right-icon="van-icon van-icon-arrow van-cell__right-icon">
374
374
  <template slot="label">
@@ -394,7 +394,7 @@
394
394
  class="form-field-item-value">
395
395
  <van-field readonly clickable name="datetimePicker" :required="item.required || isRequiredFn(item.formField)"
396
396
  :value=extInfoFieldValue[item.fieldId] :label=item.formField.name
397
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
397
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
398
398
  @click="timeClick(item.fieldId, item, 'DATE')" :disabled="disableds"
399
399
  right-icon="van-icon van-icon-arrow van-cell__right-icon">
400
400
  <template slot="label">
@@ -511,7 +511,7 @@
511
511
  v-if="item.fieldId === 'workorder_clientId' || item.fieldId === 'workorder_statusId' || item.fieldId === 'workorder_priority'">
512
512
  <van-field readonly clickable name="picker" :value=selectValues[item.fieldId]
513
513
  :label="item.fieldId === 'workorder_clientId' ? '报单人' : item.formField.name"
514
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
514
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
515
515
  @click="selectClick(item.fieldId, 'client', item)" :required="item.required || isRequiredFn(item.formField)"
516
516
  :disabled="disableds" @click-right-icon.stop="SelectClear(item.fieldId)"
517
517
  :right-icon="selectValues[item.fieldId] ? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'">
@@ -537,7 +537,7 @@
537
537
  <van-field readonly clickable name="picker"
538
538
  :value="showSelectText(item.formField.extInfo ? (item.formField.extInfo.option || item.formField.extInfo.options) : [], item.value)"
539
539
  :label=item.formField.name
540
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
540
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
541
541
  @click="selectClick(item.fieldId, 'select', item)" :required="item.required || isRequiredFn(item.formField)"
542
542
  :disabled="disableds" @click-right-icon.stop="SelectClear(item.fieldId)"
543
543
  :right-icon="item.value && item.value.length ? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'">
@@ -586,7 +586,7 @@
586
586
  <van-field readonly clickable
587
587
  :value="Array.isArray(extInfoFieldValue[item.fieldId]) ? extInfoFieldValue[item.fieldId].map(v => v.name).join(',') : (extInfoFieldValue[item.fieldId] && extInfoFieldValue[item.fieldId].name ? extInfoFieldValue[item.fieldId].name : '')"
588
588
  :label="item.formField.name" name="picker"
589
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
589
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
590
590
  @click="selectClick(item.fieldId, 'ref', item)" @click-right-icon.stop="SelectClear(item.fieldId)"
591
591
  :required="item.required || isRequiredFn(item.formField)" :disabled="disableds"
592
592
  :right-icon="extInfoFieldValue[item.fieldId] && extInfoFieldValue[item.fieldId].length ? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'" />
@@ -600,7 +600,7 @@
600
600
  label: 'name'
601
601
  }">
602
602
  <template slot="popup-footer" v-if="refNextPage[item.fieldId] && refNextPage[item.fieldId].hasNextPage">
603
- <span @click="lodeMore(item)">加载更多</span>
603
+ <span @click="lodeMore(item)">{{$t('common.loadMore')}}</span>
604
604
  </template>
605
605
  </select-popup>
606
606
  </van-popup>
@@ -610,7 +610,7 @@
610
610
  <van-field readonly clickable name="area"
611
611
  :value="extInfoFieldValue[item.fieldId] && Array.isArray(extInfoFieldValue[item.fieldId]) ? extInfoFieldValue[item.fieldId].map(e => e.label).join('/') : ''"
612
612
  :label=item.formField.name
613
- :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请选择'"
613
+ :placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
614
614
  @click="openDrawer(item, 'cascader')"
615
615
  :required="item.fieldId !== '0feca81fce97465da537248c066e4db8' && item.fieldId !== '1d8bd21485834773a6d18eae60013000' && (item.required || isRequiredFn(item.formField))"
616
616
  :disabled="disableds" right-icon="van-icon van-icon-arrow van-cell__right-icon">
@@ -722,7 +722,7 @@
722
722
  /* eslint-disable */
723
723
  import { forMatTime } from "./utils/format_date";
724
724
  let that
725
- import { multipartUpload, ossFileUrl } from "./utils/AliyunIssUtil";
725
+ import { multipartUpload, ossFileUrl } from "../assets/js/AliyunlssUtil";
726
726
  import MyEditor from './MyEditor'
727
727
  import myPopup from "./myPopup.vue";
728
728
  import Tree from '../components/tree'
@@ -876,6 +876,10 @@ export default {
876
876
  return ""
877
877
  }
878
878
  },
879
+ language:{
880
+ type:String,
881
+ default:"cn"
882
+ },
879
883
  isCustomerService: {
880
884
  type: Boolean,
881
885
  default () {
@@ -1097,7 +1101,7 @@ export default {
1097
1101
  } else {
1098
1102
  this.disableds = false
1099
1103
  }
1100
- this.submitValue = this.submit ? '已提交' : "提交"
1104
+ this.submitValue = this.submit ? this.$t('common.submited') : this.$t('common.submit')
1101
1105
  },
1102
1106
  beforeMount () {
1103
1107
  that.defaultClick()
@@ -1382,11 +1386,11 @@ export default {
1382
1386
  const isLte2M = file.size / 1024 / 1024 <= 8;
1383
1387
  const isSupportedFormat = file.type.indexOf('image') !== -1
1384
1388
  if (!isSupportedFormat) {
1385
- this.$message.error("只能上传图片格式");
1389
+ this.$message.error(this.$t('formTemplate.uploadType'));
1386
1390
  return false
1387
1391
  }
1388
1392
  if (!isLte2M && isSupportedFormat) {
1389
- this.$message.error("上传图片大小不能超过 8MB!");
1393
+ this.$message.error(this.$t('formTemplate.uploadImageSize'));
1390
1394
  return false
1391
1395
  }
1392
1396
  return true
@@ -1395,11 +1399,11 @@ export default {
1395
1399
  const isLte2M = file.size / 1024 / 1024 <= 100;
1396
1400
  const isSupportedFormat = file.type.indexOf('video') !== -1
1397
1401
  if (!isSupportedFormat) {
1398
- this.$message.error("只能上传视频格式");
1402
+ this.$message.error(this.$t('formTemplate.uploadVideoType'));
1399
1403
  return false
1400
1404
  }
1401
1405
  if (!isLte2M && isSupportedFormat) {
1402
- this.$message.error("上传视频大小不能超过100MB!");
1406
+ this.$message.error(this.$t('formTemplate.uploadVideoSize'));
1403
1407
  return false
1404
1408
  }
1405
1409
  return true
@@ -1407,7 +1411,7 @@ export default {
1407
1411
  else if (type === 'ATTACHMENT') {
1408
1412
  const isLte2M = file.size / 1024 / 1024 <= 100;
1409
1413
  if (!isLte2M) {
1410
- this.$message.error("上传附件大小不能超过100MB!");
1414
+ this.$message.error(this.$t('formTemplate.uploadFileSize'));
1411
1415
  return false
1412
1416
  }
1413
1417
  return true
@@ -1424,11 +1428,11 @@ export default {
1424
1428
  const isLte2M = file[i].size / 1024 / 1024 <= 8;
1425
1429
  const isSupportedFormat = file[i].type.indexOf('image') !== -1
1426
1430
  if (!isSupportedFormat) {
1427
- this.$message.error("只能上传图片格式");
1431
+ this.$message.error(this.$t('formTemplate.uploadType'));
1428
1432
  return false
1429
1433
  }
1430
1434
  if (!isLte2M && isSupportedFormat) {
1431
- this.$message.error("上传图片大小不能超过 8MB!");
1435
+ this.$message.error(this.$t('formTemplate.uploadImageSize'));
1432
1436
  return false
1433
1437
  }
1434
1438
  return true
@@ -1437,11 +1441,11 @@ export default {
1437
1441
  const isLte2M = file[i].size / 1024 / 1024 <= 100;
1438
1442
  const isSupportedFormat = file[i].type.indexOf('video') !== -1
1439
1443
  if (!isSupportedFormat) {
1440
- this.$message.error("只能上传视频格式");
1444
+ this.$message.error(this.$t('formTemplate.uploadVideoType'));
1441
1445
  return false
1442
1446
  }
1443
1447
  if (!isLte2M && isSupportedFormat) {
1444
- this.$message.error("上传视频大小不能超过100MB!");
1448
+ this.$message.error(this.$t('formTemplate.uploadVideoSize'));
1445
1449
  return false
1446
1450
  }
1447
1451
  return true
@@ -1449,7 +1453,7 @@ export default {
1449
1453
  else if (type === 'ATTACHMENT') {
1450
1454
  const isLte2M = file[i].size / 1024 / 1024 <= 100;
1451
1455
  if (!isLte2M) {
1452
- this.$message.error("上传附件大小不能超过100MB!");
1456
+ this.$message.error(this.$t('formTemplate.uploadFileSize'));
1453
1457
  return false
1454
1458
  }
1455
1459
  return true
@@ -1461,7 +1465,7 @@ export default {
1461
1465
  if (this.limitNum) {
1462
1466
  num = this.limitNum
1463
1467
  }
1464
- let messageText = '仅支持上传' + num + ''
1468
+ let messageText = this.$t('formTemplate.onlyUpload' )+num+ this.$t('formTemplate.number')
1465
1469
  this.$message.error(messageText);
1466
1470
  return false
1467
1471
  }
@@ -1483,7 +1487,7 @@ export default {
1483
1487
  num = this.limitNum
1484
1488
  }
1485
1489
  if (file.length > num) {
1486
- this.$message.warning('仅支持上传' + num + '张图片')
1490
+ this.$message.warning(this.$t('formTemplate.onlyUpload' )+ num + this.$t('formTemplate.number'))
1487
1491
  return false
1488
1492
  }
1489
1493
  else {
@@ -1685,7 +1689,7 @@ export default {
1685
1689
  this.$set(this.extInfoFieldValue, this.formList.form.formFieldRelation[i].fieldId, [])
1686
1690
  this.loopCascaderSetDefalut(cascadeOptions, this.formList.form.formFieldRelation[i], extInfo.selectType)
1687
1691
  this.loopCascaderSetValue(cascadeOptions, this.formList.form.formFieldRelation[i], extInfo.selectType)
1688
-
1692
+
1689
1693
  }
1690
1694
  if (type === 'DATE_PICKER') {
1691
1695
  if (this.formList.form.formFieldRelation[i].value && this.formList.form.formFieldRelation[i].value !== null && this.formList.form.formFieldRelation[i].value !== '') {
@@ -1974,27 +1978,27 @@ export default {
1974
1978
  if (checkDescription.checkAttachment && this.attachmentList.length == 0) {
1975
1979
  attachmentFlag = false
1976
1980
  }
1977
- let text = this.isBaiLi ? '反馈描述' : '问题描述'
1981
+ let text = this.isBaiLi ? this.$t('formTemplate.feedbackDes') : this.$t('formTemplate.orderDes')
1978
1982
  if (!textFlag) {
1979
- errorText = text + '必须要有文字'
1983
+ errorText = text + this.$t('formTemplate.textFlag')
1980
1984
  }
1981
1985
  if (!imageOrAttachment) {
1982
- errorText = text + '必须要有图片或附件'
1986
+ errorText = text + this.$t('formTemplate.imageOrAttachment')
1983
1987
  }
1984
1988
  if (!imageFlag) {
1985
- errorText = text + '必须要有图片'
1989
+ errorText = text + this.$t('formTemplate.imageFlag')
1986
1990
  }
1987
1991
  if (!attachmentFlag) {
1988
- errorText = text + '必须要有附件'
1992
+ errorText = text + this.$t('formTemplate.attachmentFlag')
1989
1993
  }
1990
1994
  if (!textFlag && (!imageFlag || !attachmentFlag)) {
1991
- errorText = text + '必须要有文字和' + (!imageFlag ? '图片' : '附件')
1995
+ errorText = text + this.$t('formTemplate.textFlag') + this.$t('formTemplate.and') + (!imageFlag ? this.$t('formTemplate.image') : this.$t('formTemplate.file'))
1992
1996
  }
1993
1997
  if (!imageFlag && !attachmentFlag) {
1994
- errorText = text + '必须要有图片和附件'
1998
+ errorText = text + this.$t('formTemplate.imageFlag') + this.$t('formTemplate.and') + this.$t('formTemplate.file')
1995
1999
  }
1996
2000
  if (!imageFlag && !attachmentFlag && !textFlag) {
1997
- errorText = text + '必须要有文字、图片和附件'
2001
+ errorText = text + this.$t('formTemplate.textFlag') + ',' + this.$t('formTemplate.image') + this.$t('formTemplate.and') + this.$t('formTemplate.file')
1998
2002
  }
1999
2003
  if (errorText) {
2000
2004
  this.$message.error(errorText);
@@ -2003,7 +2007,7 @@ export default {
2003
2007
  let d = document.createElement('div')
2004
2008
  d.innerHTML = this.workOrderDestail.value
2005
2009
  if (checkDescription.required && !d.innerText && !this.workOrderDestail.value.includes('img') && this.attachmentList.length == 0) {
2006
- let errorText = this.isBaiLi ? '反馈描述是必填的' : '问题描述是必填的'
2010
+ let errorText = this.isBaiLi ? this.$t('formTemplate.feedbackDesRequired') : this.$t('formTemplate.orderDesRequired')
2007
2011
  this.$message.error(errorText);
2008
2012
  return false
2009
2013
  }
@@ -2017,7 +2021,7 @@ export default {
2017
2021
  return
2018
2022
  }
2019
2023
  if (this.uploadImgQueue || this.attachmentList.some(arrach => { return !arrach.url })) {
2020
- this.$message.warning('文件正在上传,请稍后')
2024
+ this.$message.warning(this.$t('formTemplate.uploading'))
2021
2025
  return
2022
2026
  }
2023
2027
  if (this.workOrderDestail && !this.verificationDescription()) {
@@ -2106,7 +2110,7 @@ export default {
2106
2110
  }
2107
2111
  if (this.formShow.form.formFieldRelation[i].relationDisplay && this.formShow.form.formFieldRelation[i].display && this.formShow.form.formFieldRelation[i].fieldId !== 'workorder_description') {
2108
2112
  if (!this.formShow.form.formFieldRelation[i].value || this.strIsNull(this.formShow.form.formFieldRelation[i].value) || bool[this.formShow.form.formFieldRelation[i].fieldId] || (Array.isArray(this.formShow.form.formFieldRelation[i].value) && !this.formShow.form.formFieldRelation[i].value.length)) {
2109
- this.$message.error('请完善' + this.formShow.form.formFieldRelation[i].formField.name)
2113
+ this.$message.error(this.$t('formTemplate.pleaseImprove' )+ this.formShow.form.formFieldRelation[i].formField.name)
2110
2114
  return
2111
2115
  }
2112
2116
  }
@@ -2137,7 +2141,7 @@ export default {
2137
2141
  console.error('formShow', newForm)
2138
2142
  this.$emit('submitClick', newForm)
2139
2143
  this.disableds = true
2140
- this.submitValue = '已提交'
2144
+ this.submitValue = this.$t('common.submited')
2141
2145
  },
2142
2146
  strIsNull (str) {
2143
2147
  if (str == "") return true;
@@ -3515,4 +3519,4 @@ export default {
3515
3519
  height: 100%;
3516
3520
  overflow: hidden;
3517
3521
  }
3518
- </style>
3522
+ </style>
@@ -28,7 +28,7 @@
28
28
  <div class="summaryContent">
29
29
  <span>{{ typedContent }}</span>
30
30
  </div>
31
- <div class="intelligentBottom" v-if="recommendQuestions.length > 0">
31
+ <div class="intelligentBottom" v-if="recommendQuestions.length > 0 && !formKnowledgeManagement">
32
32
  <div class="intelligentQues"
33
33
  v-for="(item, index) in recommendQuestions"
34
34
  :key="index"
@@ -61,6 +61,10 @@ export default {
61
61
  default() {
62
62
  return []
63
63
  }
64
+ },
65
+ formKnowledgeManagement:{
66
+ type: Boolean,
67
+ default: false
64
68
  }
65
69
  },
66
70
  methods:{
@@ -40,7 +40,7 @@
40
40
  <script>
41
41
  /* eslint-disable */
42
42
  import VueMarkdown from 'vue-markdown';
43
- import ImgView from "./imgView";
43
+ import ImgView from "@/components/imgView";
44
44
  // import Typed from "typed.js";
45
45
  import hljs from 'highlight.js';
46
46
  import 'highlight.js/styles/default.css';
@@ -182,7 +182,9 @@ export default {
182
182
  clearInterval(this.thinkTimer)
183
183
  this.thinkTimer = null
184
184
  this.thinkEnd = true
185
- this.removeLoadingNode()
185
+ setTimeout(() => {
186
+ this.removeLoadingNode()
187
+ }, 200)
186
188
  this.$emit("streamCallback", this.typedContent)
187
189
  this.$emit("sseOtherInfo", this.msgId, "start", "");
188
190
  }, 200);
@@ -282,7 +284,7 @@ export default {
282
284
  this.$emit("answerDocKnowledgeFn");
283
285
  this.eventSource = new EventSource(url);
284
286
  this.$emit("streamStatus", true, this.msgId);
285
- this.$set(this, 'showThink', true);
287
+ // this.$set(this, 'showThink', true);
286
288
  this.signSetFlag = false;
287
289
  this.thinkEnd = false
288
290
  let tempString = "";
@@ -343,7 +345,9 @@ export default {
343
345
  this.$emit("streamCallback", this.typedContent)
344
346
  this.$emit("streamStatus", false, this.msgId);
345
347
  this.appendCopyBtn()
346
- this.removeLoadingNode()
348
+ setTimeout(() => {
349
+ this.removeLoadingNode()
350
+ }, 200);
347
351
  this.$emit("sseOtherInfo", this.msgId, "start", "");
348
352
  }
349
353
 
@@ -366,6 +370,22 @@ export default {
366
370
  recommendItems = data;
367
371
  } else if (event.lastEventId === 'retry') {
368
372
  this.retryUrl = data.content;
373
+ } else if (event.lastEventId === 'generated_image') {
374
+ let imgs = JSON.parse(data.content);
375
+ let imgsStr = "";
376
+ for (let i = 0; i < imgs.length; i++) {
377
+ imgsStr += `![](${imgs[i].oss_url})`;
378
+ }
379
+ this.$set(this, "typedContent", this.typedContent + imgsStr);
380
+
381
+ // 模拟图片推送
382
+ // let imgs = JSON.parse('[{"oss_url":"https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/generated-img/generated_img_865652a94b374337b2ac703466cdea94.png"}]');
383
+ // let imgsStr = "";
384
+ // for (let i = 0; i < imgs.length; i++) {
385
+ // imgsStr += `![](${imgs[i].oss_url})`;
386
+ // }
387
+ // this.$set(this, "typedContent", this.typedContent + imgsStr);
388
+
369
389
  } else if (event.lastEventId === 'source') {
370
390
  this.$emit("changedHeadStatusValue", this.msgId, data);
371
391
  } else {
@@ -591,7 +611,7 @@ export default {
591
611
  let codeList = doc.querySelectorAll('pre code')
592
612
  codeList.forEach(ele =>{
593
613
  let list = ele.getElementsByClassName("code_copy_btn")
594
- if(list.length == 0 && ele.classList.contains("hljs")) {
614
+ if(list.length == 0 && ele.classList.contains("hljs") && !ele.classList.contains("hljs-undefined")) {
595
615
  let text = ele.innerText
596
616
  let btnId = uuidv4();
597
617
  let copy = document.createElement('div')
@@ -301,7 +301,11 @@ export default {
301
301
  },
302
302
  type:String,
303
303
  disable:Boolean,
304
- submit:Boolean
304
+ submit:Boolean,
305
+ language:{
306
+ type:String,
307
+ default:"cn"
308
+ }
305
309
  },
306
310
  mounted() {
307
311
  this.isMobile()
@@ -9,7 +9,7 @@
9
9
  >
10
10
  <slot></slot>
11
11
  </div>
12
- <div v-if="device==='PC'&&content.multiple===true" class="clickBtn">
12
+ <div v-if="device==='PC'&&content.multiple===true && content.cards && content.cards.length > 1" class="clickBtn">
13
13
  <div class="preBtn" @click="preClick" style="display: flex">
14
14
  <i class="el-icon-arrow-left" style="font-size: 18px;font-weight:800;align-self: center;margin: auto"></i>
15
15
  </div>