askbot-dragon 1.7.41-beta → 1.7.43-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.
- package/package.json +14 -13
- package/public/index.html +8 -10
- package/src/assets/js/AliyunlssUtil.js +49 -25
- package/src/assets/js/hammer.js +13 -2
- package/src/assets/less/converSationContainer/common.less +7 -0
- package/src/components/ActionAlertIframe.vue +24 -1
- package/src/components/AiGuide.vue +121 -154
- package/src/components/AnswerDocknowledge.vue +11 -7
- package/src/components/ConversationContainer.vue +99 -208
- package/src/components/MyEditor.vue +2 -1
- package/src/components/actionSatisfaction.vue +1 -1
- package/src/components/answerRadio.vue +1 -1
- package/src/components/askVideo.vue +23 -0
- package/src/components/associationIntention.vue +11 -7
- package/src/components/formTemplate.vue +54 -50
- package/src/components/intelligentSummary.vue +5 -1
- package/src/components/message/TextMessage.vue +5 -1
- package/src/components/message/swiper/ticketSwiper.vue +1 -1
- package/src/components/newPdfPosition.vue +878 -0
- package/src/components/pagination.vue +129 -0
- package/src/components/pdfPosition.vue +213 -33
- package/src/components/preview/docView.vue +107 -0
- package/src/components/preview/excelView.vue +177 -0
- package/src/components/preview/newPositionPreview.vue +338 -0
- package/src/components/preview/pdfView.vue +754 -0
- package/src/components/previewDoc.vue +4 -0
- package/src/components/previewPdf.vue +220 -127
- package/src/components/senderMessagePlatform.vue +4 -4
- package/src/components/utils/ckeditor.js +1 -1
- package/src/components/welcomeKnowledgeFile.vue +5 -1
- package/src/components/welcomeLlmCard.vue +5 -1
- package/src/locales/cn.json +72 -0
- package/src/locales/en.json +73 -0
- package/src/locales/jp.json +73 -0
- package/src/main.js +18 -0
|
@@ -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 ? '
|
|
17
|
-
<span v-if="item.fieldId === 'workorder_clientId'"
|
|
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 : '
|
|
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)"
|
|
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 "
|
|
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'
|
|
@@ -875,6 +875,10 @@ export default {
|
|
|
875
875
|
default () {
|
|
876
876
|
return ""
|
|
877
877
|
}
|
|
878
|
+
},
|
|
879
|
+
language:{
|
|
880
|
+
type:String,
|
|
881
|
+
default:"cn"
|
|
878
882
|
}
|
|
879
883
|
},
|
|
880
884
|
computed: {
|
|
@@ -1090,7 +1094,7 @@ export default {
|
|
|
1090
1094
|
} else {
|
|
1091
1095
|
this.disableds = false
|
|
1092
1096
|
}
|
|
1093
|
-
this.submitValue = this.submit ? '
|
|
1097
|
+
this.submitValue = this.submit ? this.$t('common.submited') : this.$t('common.submit')
|
|
1094
1098
|
},
|
|
1095
1099
|
beforeMount () {
|
|
1096
1100
|
that.defaultClick()
|
|
@@ -1375,11 +1379,11 @@ export default {
|
|
|
1375
1379
|
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
1376
1380
|
const isSupportedFormat = file.type.indexOf('image') !== -1
|
|
1377
1381
|
if (!isSupportedFormat) {
|
|
1378
|
-
this.$message.error(
|
|
1382
|
+
this.$message.error(this.$t('formTemplate.uploadType'));
|
|
1379
1383
|
return false
|
|
1380
1384
|
}
|
|
1381
1385
|
if (!isLte2M && isSupportedFormat) {
|
|
1382
|
-
this.$message.error(
|
|
1386
|
+
this.$message.error(this.$t('formTemplate.uploadImageSize'));
|
|
1383
1387
|
return false
|
|
1384
1388
|
}
|
|
1385
1389
|
return true
|
|
@@ -1388,11 +1392,11 @@ export default {
|
|
|
1388
1392
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
1389
1393
|
const isSupportedFormat = file.type.indexOf('video') !== -1
|
|
1390
1394
|
if (!isSupportedFormat) {
|
|
1391
|
-
this.$message.error(
|
|
1395
|
+
this.$message.error(this.$t('formTemplate.uploadVideoType'));
|
|
1392
1396
|
return false
|
|
1393
1397
|
}
|
|
1394
1398
|
if (!isLte2M && isSupportedFormat) {
|
|
1395
|
-
this.$message.error(
|
|
1399
|
+
this.$message.error(this.$t('formTemplate.uploadVideoSize'));
|
|
1396
1400
|
return false
|
|
1397
1401
|
}
|
|
1398
1402
|
return true
|
|
@@ -1400,7 +1404,7 @@ export default {
|
|
|
1400
1404
|
else if (type === 'ATTACHMENT') {
|
|
1401
1405
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
1402
1406
|
if (!isLte2M) {
|
|
1403
|
-
this.$message.error(
|
|
1407
|
+
this.$message.error(this.$t('formTemplate.uploadFileSize'));
|
|
1404
1408
|
return false
|
|
1405
1409
|
}
|
|
1406
1410
|
return true
|
|
@@ -1417,11 +1421,11 @@ export default {
|
|
|
1417
1421
|
const isLte2M = file[i].size / 1024 / 1024 <= 8;
|
|
1418
1422
|
const isSupportedFormat = file[i].type.indexOf('image') !== -1
|
|
1419
1423
|
if (!isSupportedFormat) {
|
|
1420
|
-
this.$message.error(
|
|
1424
|
+
this.$message.error(this.$t('formTemplate.uploadType'));
|
|
1421
1425
|
return false
|
|
1422
1426
|
}
|
|
1423
1427
|
if (!isLte2M && isSupportedFormat) {
|
|
1424
|
-
this.$message.error(
|
|
1428
|
+
this.$message.error(this.$t('formTemplate.uploadImageSize'));
|
|
1425
1429
|
return false
|
|
1426
1430
|
}
|
|
1427
1431
|
return true
|
|
@@ -1430,11 +1434,11 @@ export default {
|
|
|
1430
1434
|
const isLte2M = file[i].size / 1024 / 1024 <= 100;
|
|
1431
1435
|
const isSupportedFormat = file[i].type.indexOf('video') !== -1
|
|
1432
1436
|
if (!isSupportedFormat) {
|
|
1433
|
-
this.$message.error(
|
|
1437
|
+
this.$message.error(this.$t('formTemplate.uploadVideoType'));
|
|
1434
1438
|
return false
|
|
1435
1439
|
}
|
|
1436
1440
|
if (!isLte2M && isSupportedFormat) {
|
|
1437
|
-
this.$message.error(
|
|
1441
|
+
this.$message.error(this.$t('formTemplate.uploadVideoSize'));
|
|
1438
1442
|
return false
|
|
1439
1443
|
}
|
|
1440
1444
|
return true
|
|
@@ -1442,7 +1446,7 @@ export default {
|
|
|
1442
1446
|
else if (type === 'ATTACHMENT') {
|
|
1443
1447
|
const isLte2M = file[i].size / 1024 / 1024 <= 100;
|
|
1444
1448
|
if (!isLte2M) {
|
|
1445
|
-
this.$message.error(
|
|
1449
|
+
this.$message.error(this.$t('formTemplate.uploadFileSize'));
|
|
1446
1450
|
return false
|
|
1447
1451
|
}
|
|
1448
1452
|
return true
|
|
@@ -1454,7 +1458,7 @@ export default {
|
|
|
1454
1458
|
if (this.limitNum) {
|
|
1455
1459
|
num = this.limitNum
|
|
1456
1460
|
}
|
|
1457
|
-
let messageText = '
|
|
1461
|
+
let messageText = this.$t('formTemplate.onlyUpload' )+num+ this.$t('formTemplate.number')
|
|
1458
1462
|
this.$message.error(messageText);
|
|
1459
1463
|
return false
|
|
1460
1464
|
}
|
|
@@ -1476,7 +1480,7 @@ export default {
|
|
|
1476
1480
|
num = this.limitNum
|
|
1477
1481
|
}
|
|
1478
1482
|
if (file.length > num) {
|
|
1479
|
-
this.$message.warning('
|
|
1483
|
+
this.$message.warning(this.$t('formTemplate.onlyUpload' )+ num + this.$t('formTemplate.number'))
|
|
1480
1484
|
return false
|
|
1481
1485
|
}
|
|
1482
1486
|
else {
|
|
@@ -1678,7 +1682,7 @@ export default {
|
|
|
1678
1682
|
this.$set(this.extInfoFieldValue, this.formList.form.formFieldRelation[i].fieldId, [])
|
|
1679
1683
|
this.loopCascaderSetDefalut(cascadeOptions, this.formList.form.formFieldRelation[i], extInfo.selectType)
|
|
1680
1684
|
this.loopCascaderSetValue(cascadeOptions, this.formList.form.formFieldRelation[i], extInfo.selectType)
|
|
1681
|
-
|
|
1685
|
+
|
|
1682
1686
|
}
|
|
1683
1687
|
if (type === 'DATE_PICKER') {
|
|
1684
1688
|
if (this.formList.form.formFieldRelation[i].value && this.formList.form.formFieldRelation[i].value !== null && this.formList.form.formFieldRelation[i].value !== '') {
|
|
@@ -1967,27 +1971,27 @@ export default {
|
|
|
1967
1971
|
if (checkDescription.checkAttachment && this.attachmentList.length == 0) {
|
|
1968
1972
|
attachmentFlag = false
|
|
1969
1973
|
}
|
|
1970
|
-
let text = this.isBaiLi ? '
|
|
1974
|
+
let text = this.isBaiLi ? this.$t('formTemplate.feedbackDes') : this.$t('formTemplate.orderDes')
|
|
1971
1975
|
if (!textFlag) {
|
|
1972
|
-
errorText = text + '
|
|
1976
|
+
errorText = text + this.$t('formTemplate.textFlag')
|
|
1973
1977
|
}
|
|
1974
1978
|
if (!imageOrAttachment) {
|
|
1975
|
-
errorText = text + '
|
|
1979
|
+
errorText = text + this.$t('formTemplate.imageOrAttachment')
|
|
1976
1980
|
}
|
|
1977
1981
|
if (!imageFlag) {
|
|
1978
|
-
errorText = text + '
|
|
1982
|
+
errorText = text + this.$t('formTemplate.imageFlag')
|
|
1979
1983
|
}
|
|
1980
1984
|
if (!attachmentFlag) {
|
|
1981
|
-
errorText = text + '
|
|
1985
|
+
errorText = text + this.$t('formTemplate.attachmentFlag')
|
|
1982
1986
|
}
|
|
1983
1987
|
if (!textFlag && (!imageFlag || !attachmentFlag)) {
|
|
1984
|
-
errorText = text + '
|
|
1988
|
+
errorText = text + this.$t('formTemplate.textFlag') + this.$t('formTemplate.and') + (!imageFlag ? this.$t('formTemplate.image') : this.$t('formTemplate.file'))
|
|
1985
1989
|
}
|
|
1986
1990
|
if (!imageFlag && !attachmentFlag) {
|
|
1987
|
-
errorText = text + '
|
|
1991
|
+
errorText = text + this.$t('formTemplate.imageFlag') + this.$t('formTemplate.and') + this.$t('formTemplate.file')
|
|
1988
1992
|
}
|
|
1989
1993
|
if (!imageFlag && !attachmentFlag && !textFlag) {
|
|
1990
|
-
errorText = text + '
|
|
1994
|
+
errorText = text + this.$t('formTemplate.textFlag') + ',' + this.$t('formTemplate.image') + this.$t('formTemplate.and') + this.$t('formTemplate.file')
|
|
1991
1995
|
}
|
|
1992
1996
|
if (errorText) {
|
|
1993
1997
|
this.$message.error(errorText);
|
|
@@ -1996,7 +2000,7 @@ export default {
|
|
|
1996
2000
|
let d = document.createElement('div')
|
|
1997
2001
|
d.innerHTML = this.workOrderDestail.value
|
|
1998
2002
|
if (checkDescription.required && !d.innerText && !this.workOrderDestail.value.includes('img') && this.attachmentList.length == 0) {
|
|
1999
|
-
let errorText = this.isBaiLi ? '
|
|
2003
|
+
let errorText = this.isBaiLi ? this.$t('formTemplate.feedbackDesRequired') : this.$t('formTemplate.orderDesRequired')
|
|
2000
2004
|
this.$message.error(errorText);
|
|
2001
2005
|
return false
|
|
2002
2006
|
}
|
|
@@ -2006,7 +2010,7 @@ export default {
|
|
|
2006
2010
|
//提交按钮事件
|
|
2007
2011
|
submitClick () {
|
|
2008
2012
|
if (this.uploadImgQueue || this.attachmentList.some(arrach => { return !arrach.url })) {
|
|
2009
|
-
this.$message.warning('
|
|
2013
|
+
this.$message.warning(this.$t('formTemplate.uploading'))
|
|
2010
2014
|
return
|
|
2011
2015
|
}
|
|
2012
2016
|
if (this.workOrderDestail && !this.verificationDescription()) {
|
|
@@ -2085,7 +2089,7 @@ export default {
|
|
|
2085
2089
|
}
|
|
2086
2090
|
if (this.formShow.form.formFieldRelation[i].relationDisplay && this.formShow.form.formFieldRelation[i].display && this.formShow.form.formFieldRelation[i].fieldId !== 'workorder_description') {
|
|
2087
2091
|
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)) {
|
|
2088
|
-
this.$message.error('
|
|
2092
|
+
this.$message.error(this.$t('formTemplate.pleaseImprove' )+ this.formShow.form.formFieldRelation[i].formField.name)
|
|
2089
2093
|
return
|
|
2090
2094
|
}
|
|
2091
2095
|
}
|
|
@@ -2116,7 +2120,7 @@ export default {
|
|
|
2116
2120
|
console.error('formShow', newForm)
|
|
2117
2121
|
this.$emit('submitClick', newForm)
|
|
2118
2122
|
this.disableds = true
|
|
2119
|
-
this.submitValue = '
|
|
2123
|
+
this.submitValue = this.$t('common.submited')
|
|
2120
2124
|
},
|
|
2121
2125
|
strIsNull (str) {
|
|
2122
2126
|
if (str == "") return true;
|
|
@@ -3494,4 +3498,4 @@ export default {
|
|
|
3494
3498
|
height: 100%;
|
|
3495
3499
|
overflow: hidden;
|
|
3496
3500
|
}
|
|
3497
|
-
</style>
|
|
3501
|
+
</style>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<div class="summaryContent">
|
|
27
27
|
<span>{{ typedContent }}</span>
|
|
28
28
|
</div>
|
|
29
|
-
<div class="intelligentBottom" v-if="recommendQuestions.length > 0">
|
|
29
|
+
<div class="intelligentBottom" v-if="recommendQuestions.length > 0 && !formKnowledgeManagement">
|
|
30
30
|
<div class="intelligentQues"
|
|
31
31
|
v-for="(item,index) in recommendQuestions"
|
|
32
32
|
:key="index"
|
|
@@ -59,6 +59,10 @@ export default {
|
|
|
59
59
|
default() {
|
|
60
60
|
return []
|
|
61
61
|
}
|
|
62
|
+
},
|
|
63
|
+
formKnowledgeManagement:{
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
62
66
|
}
|
|
63
67
|
},
|
|
64
68
|
methods:{
|
|
@@ -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>
|