askbot-dragon 1.7.18-beta → 1.7.20-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 +2 -1
- package/public/index.html +8 -10
- package/src/assets/js/AliyunlssUtil.js +52 -26
- 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 +10 -8
- package/src/components/ConversationContainer.vue +952 -1794
- package/src/components/MyEditor.vue +6 -5
- package/src/components/actionSatisfaction.vue +3 -3
- package/src/components/answerRadio.vue +3 -3
- package/src/components/askVideo.vue +24 -1
- package/src/components/associationIntention.vue +11 -7
- package/src/components/formTemplate.vue +1592 -1658
- package/src/components/intelligentSummary.vue +8 -4
- package/src/components/message/TextMessage.vue +15 -11
- package/src/components/message/swiper/ticketSwiper.vue +1 -1
- package/src/components/newPdfPosition.vue +878 -0
- package/src/components/pdfPosition.vue +217 -37
- package/src/components/popup.vue +2 -2
- package/src/components/previewDoc.vue +6 -2
- package/src/components/previewPdf.vue +159 -134
- package/src/components/senderMessagePlatform.vue +4 -4
- package/src/components/tree.vue +114 -101
- package/src/components/utils/AliyunIssUtil.js +1 -0
- package/src/components/utils/ckeditor.js +1 -1
- package/src/components/welcomeKnowledgeFile.vue +6 -2
- package/src/components/welcomeLlmCard.vue +5 -1
- package/src/components/welcomeSuggest.vue +1 -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
|
@@ -1,177 +1,143 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="media-body">
|
|
3
|
-
<div class="formClass" :class="isPhone?'remPhoneClassForm':'remCompanyClassForm'" v-if="formShow.form">
|
|
4
|
-
<div class="titleName"
|
|
5
|
-
{{!!formShow.form.formShowName?formShow.form.formShowName:formShow.form.name}}
|
|
3
|
+
<div class="formClass" :class="isPhone ? 'remPhoneClassForm' : 'remCompanyClassForm'" v-if="formShow.form">
|
|
4
|
+
<div class="titleName">
|
|
5
|
+
{{ !!formShow.form.formShowName ? formShow.form.formShowName : formShow.form.name }}
|
|
6
6
|
</div>
|
|
7
7
|
<div class="title-link"></div>
|
|
8
8
|
<div class="pcFormClass" v-if="isCompany">
|
|
9
|
-
<div v-for="(item) in formFieldRelation"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
33
|
-
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
34
|
-
v-if="item.formField.type==='INPUT'&&item.fieldId!=='workorder_name'"
|
|
35
|
-
:type="item.formField.extInfo.inputType==='NUMBER'||
|
|
36
|
-
item.formField.extInfo.inputType==='RATE'? 'number':'text'"
|
|
37
|
-
@blur="typeCheck(item.formField,item)"
|
|
38
|
-
:min="item.formField.extInfo.inputType==='NUMBER'||
|
|
39
|
-
item.formField.extInfo.inputType==='RATE'?Number(item.formField.extInfo.range.start):''"
|
|
40
|
-
:max="item.formField.extInfo.inputType==='NUMBER'||
|
|
41
|
-
item.formField.extInfo.inputType==='RATE'?Number(item.formField.extInfo.range.end):''"
|
|
42
|
-
></el-input>
|
|
43
|
-
<template v-else-if="item.formField.type==='EXPLANATION'">
|
|
44
|
-
<div class="explanation">
|
|
45
|
-
<p class="explanation-p">
|
|
46
|
-
<span class="el-icon-info"></span>
|
|
47
|
-
{{item.formField.extInfo.descriptionText}}
|
|
48
|
-
</p>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
<template v-else-if="item.formField.type==='EXPLAIN'">
|
|
52
|
-
<div class="explanation">
|
|
53
|
-
<p class="explanation-p">
|
|
54
|
-
<span class="el-icon-info"></span>
|
|
55
|
-
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.value}}</a></span>
|
|
56
|
-
<span v-else>{{item.value ? item.value : item.formField.extInfo.placeholder }}</span>
|
|
57
|
-
</p>
|
|
9
|
+
<div v-for="(item) in formFieldRelation" :key="item.fieldId" :class="{ notClick: disableds === true }">
|
|
10
|
+
<div class="field-item">
|
|
11
|
+
<div
|
|
12
|
+
v-if="item.fieldId !== 'workorder_name' && item.formField.type !== 'EXPLANATION' && item.formField.type !== 'EXPLAIN'"
|
|
13
|
+
class="field-item-name">
|
|
14
|
+
<span
|
|
15
|
+
v-if="item.fieldId !== 'workorder_description' && item.fieldId !== 'workorder_clientId'">{{ item.formField.name }}</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
|
+
<span style="color: red;padding-left: 5px;padding-right: 5px"
|
|
19
|
+
v-if="item.fieldId !== '0feca81fce97465da537248c066e4db8' && item.fieldId !== '1d8bd21485834773a6d18eae60013000' && (item.required || isRequiredFn(item.formField))">*</span>
|
|
20
|
+
<el-tooltip class="item" effect="dark" placement="right-start">
|
|
21
|
+
<div slot="content" v-if="item.formField.remark">{{ item.formField.remark.text }}</div>
|
|
22
|
+
<div slot="content" v-else-if="item.formField.extInfo && item.formField.extInfo.remark">
|
|
23
|
+
{{ item.formField.extInfo.remark.text }}</div>
|
|
24
|
+
<span v-if="item.formField.remark && item.formField.remark.enable">
|
|
25
|
+
<i class="el-icon-warning-outline"></i>
|
|
26
|
+
</span>
|
|
27
|
+
<span
|
|
28
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable">
|
|
29
|
+
<i class="el-icon-warning-outline"></i>
|
|
30
|
+
</span>
|
|
31
|
+
</el-tooltip>
|
|
58
32
|
</div>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
33
|
+
<!-- item.value -->
|
|
34
|
+
<el-input v-model="item.value"
|
|
35
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请输入'"
|
|
36
|
+
:maxlength="item.formField.extInfo && item.formField.extInfo.maxNum ? item.formField.extInfo.maxNum * 1 : 1000"
|
|
37
|
+
v-if="item.formField.type === 'INPUT' && item.fieldId !== 'workorder_name'" :type="item.formField.extInfo.inputType === 'NUMBER' ||
|
|
38
|
+
item.formField.extInfo.inputType === 'RATE' ? 'number' : 'text'"
|
|
39
|
+
@blur="typeCheck(item.formField, item)" :min="item.formField.extInfo.inputType === 'NUMBER' ||
|
|
40
|
+
item.formField.extInfo.inputType === 'RATE' ? Number(item.formField.extInfo.range.start) : ''"
|
|
41
|
+
:max="item.formField.extInfo.inputType === 'NUMBER' ||
|
|
42
|
+
item.formField.extInfo.inputType === 'RATE' ? Number(item.formField.extInfo.range.end) : ''"></el-input>
|
|
43
|
+
<template v-else-if="item.formField.type === 'EXPLANATION'">
|
|
44
|
+
<div class="explanation">
|
|
45
|
+
<p class="explanation-p">
|
|
46
|
+
<span class="el-icon-info"></span>
|
|
47
|
+
{{ item.formField.extInfo.descriptionText }}
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
<template v-else-if="item.formField.type === 'EXPLAIN'">
|
|
52
|
+
<div class="explanation">
|
|
53
|
+
<p class="explanation-p">
|
|
54
|
+
<span class="el-icon-info"></span>
|
|
55
|
+
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url"
|
|
56
|
+
target="_blank">{{ item.value }}</a></span>
|
|
57
|
+
<span v-else>{{ item.value ? item.value : item.formField.extInfo.placeholder }}</span>
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
<el-input type="textarea" :rows="2" v-model="item.value"
|
|
62
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.inputPlaceholder')"
|
|
63
|
+
:maxlength="item.formField.extInfo && item.formField.extInfo.maxNum ? item.formField.extInfo.maxNum * 1 : 1000"
|
|
64
|
+
v-if="item.formField.type === 'TEXTAREA' && item.fieldId !== 'workorder_description'"></el-input>
|
|
65
|
+
<div v-else-if="item.fieldId === 'workorder_description'">
|
|
66
|
+
<!-- <ckeditor
|
|
67
67
|
:editor="ckeditor.editor"
|
|
68
68
|
v-model="item.value"
|
|
69
69
|
:config="{...ckeditor.editorConfig,placeholder:item.formField.extInfo && item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'}"
|
|
70
70
|
@ready="(editor)=>currentEditor=editor"
|
|
71
71
|
@focus="(zh,editor)=>currentEditor=editor"
|
|
72
72
|
></ckeditor> -->
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
:label=items.value
|
|
130
|
-
:key="index"
|
|
131
|
-
>{{items.label}}</el-checkbox>
|
|
132
|
-
</el-checkbox-group>
|
|
133
|
-
</div>
|
|
134
|
-
<div v-else-if="item.formField.type==='CHECKBOX' && item.formField.extInfo.options">
|
|
135
|
-
<el-checkbox-group v-model=item.value style="text-align:left">
|
|
136
|
-
<el-checkbox
|
|
137
|
-
v-for="(items,index) in optionsLists(item)"
|
|
138
|
-
:label=items.value
|
|
139
|
-
:key="index"
|
|
140
|
-
>{{items.label}}</el-checkbox>
|
|
141
|
-
</el-checkbox-group>
|
|
142
|
-
</div>
|
|
143
|
-
<div v-else-if="item.formField.type==='SELECT' || item.formField.type==='OPTION'" >
|
|
144
|
-
<el-select
|
|
145
|
-
v-model=item.value
|
|
146
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
147
|
-
style="width: 100%"
|
|
148
|
-
filterable
|
|
149
|
-
v-if="item.fieldId==='workorder_clientId' || item.fieldId === 'workorder_statusId' || item.fieldId === 'workorder_priority'"
|
|
150
|
-
>
|
|
151
|
-
<el-option
|
|
152
|
-
v-for="(items,index) in selectOptions(item.formField)"
|
|
153
|
-
:key="index"
|
|
154
|
-
:label="items.label"
|
|
73
|
+
<MyEditor v-model="item.value"
|
|
74
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请输入'"
|
|
75
|
+
@fileUploadCallback="desUploadImageAndFile"
|
|
76
|
+
:havToolbar="mainId !== '8b9bd566e3e64156ab764b19defc9d48' && mainId !== '0b73521f96e4486aaf6be42932bd7b07'">
|
|
77
|
+
</MyEditor>
|
|
78
|
+
<!-- @input="(value) =>{item.value = value}" -->
|
|
79
|
+
<file-list-view :attachmentList="attachmentList" @attachDeleteAttch="attachDeleteAttch"></file-list-view>
|
|
80
|
+
</div>
|
|
81
|
+
<el-date-picker v-model=item.value type="date"
|
|
82
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectDate')"
|
|
83
|
+
style="width: 100%" v-else-if="item.formField.type === 'DATE_PICKER'">
|
|
84
|
+
</el-date-picker>
|
|
85
|
+
<el-time-picker v-model=item.value format="HH:mm"
|
|
86
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectTime')"
|
|
87
|
+
style="width: 100%"
|
|
88
|
+
v-else-if="item.formField.type === 'TIME_PICKER' && (!item.formField.extInfo.mold || item.formField.extInfo.mold == 'TIME' || getMoldTime(item.formField) == 'TIME')">
|
|
89
|
+
</el-time-picker>
|
|
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 : $t('common.selectDate')"
|
|
92
|
+
v-else-if="item.formField.type === 'TIME_PICKER' && (item.formField.extInfo.mold === 'DATA' || item.formField.extInfo.mold === 'DATE' || getMoldTime(item.formField) == 'DATE')">
|
|
93
|
+
</el-date-picker>
|
|
94
|
+
<el-date-picker v-model=item.value
|
|
95
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectDateTime')"
|
|
96
|
+
clearable style="width: 100%" type="datetime"
|
|
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
|
+
</el-date-picker>
|
|
99
|
+
<div v-else-if="item.formField.type === 'RADIO' && item.formField.extInfo.options">
|
|
100
|
+
<el-radio-group v-model=item.value style="text-align:left" @change="changeSelect(item)">
|
|
101
|
+
<el-radio v-for="(items, index) in optionsLists(item)" :label=items.value
|
|
102
|
+
:key="index">{{ items.label }}</el-radio>
|
|
103
|
+
</el-radio-group>
|
|
104
|
+
</div>
|
|
105
|
+
<div v-else-if="item.formField.type === 'RADIO' && item.formField.extInfo.option">
|
|
106
|
+
<el-radio-group v-model=item.value style="text-align:left" @change="changeSelect(item)">
|
|
107
|
+
<el-radio v-for="(items, index) in item.formField.extInfo.option" :label=items.value
|
|
108
|
+
:key="index">{{ items.label }}</el-radio>
|
|
109
|
+
</el-radio-group>
|
|
110
|
+
</div>
|
|
111
|
+
<div v-else-if="item.formField.type === 'CHECKBOX' && item.formField.extInfo.option">
|
|
112
|
+
<el-checkbox-group v-model=item.value style="text-align:left">
|
|
113
|
+
<el-checkbox v-for="(items, index) in item.formField.extInfo.option" :label=items.value
|
|
114
|
+
:key="index">{{ items.label }}</el-checkbox>
|
|
115
|
+
</el-checkbox-group>
|
|
116
|
+
</div>
|
|
117
|
+
<div v-else-if="item.formField.type === 'CHECKBOX' && item.formField.extInfo.options">
|
|
118
|
+
<el-checkbox-group v-model=item.value style="text-align:left">
|
|
119
|
+
<el-checkbox v-for="(items, index) in optionsLists(item)" :label=items.value
|
|
120
|
+
:key="index">{{ items.label }}</el-checkbox>
|
|
121
|
+
</el-checkbox-group>
|
|
122
|
+
</div>
|
|
123
|
+
<div v-else-if="item.formField.type === 'SELECT' || item.formField.type === 'OPTION'">
|
|
124
|
+
<el-select v-model=item.value
|
|
125
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
126
|
+
style="width: 100%" filterable
|
|
127
|
+
v-if="item.fieldId === 'workorder_clientId' || item.fieldId === 'workorder_statusId' || item.fieldId === 'workorder_priority'">
|
|
128
|
+
<el-option v-for="(items, index) in selectOptions(item.formField)" :key="index" :label="items.label"
|
|
155
129
|
:value="items.value">
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
v-else
|
|
164
|
-
@change="changeSelect(item)"
|
|
165
|
-
:multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'"
|
|
166
|
-
>
|
|
167
|
-
<el-option
|
|
168
|
-
v-for="(items,index) in optionsLists(item)"
|
|
169
|
-
:key="index"
|
|
170
|
-
:label="items.label"
|
|
130
|
+
</el-option>
|
|
131
|
+
</el-select>
|
|
132
|
+
<el-select v-model=item.value
|
|
133
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
134
|
+
style="width: 100%" filterable v-else @change="changeSelect(item)"
|
|
135
|
+
:multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'">
|
|
136
|
+
<el-option v-for="(items, index) in optionsLists(item)" :key="index" :label="items.label"
|
|
171
137
|
:value="items.value">
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<!-- <div class="cascader-input" v-else @click="openDrawer(item,'select')">
|
|
138
|
+
</el-option>
|
|
139
|
+
</el-select>
|
|
140
|
+
<!-- <div class="cascader-input" v-else @click="openDrawer(item,'select')">
|
|
175
141
|
<template v-if="item.value && (!Array.isArray(item.value) || (Array.isArray(item.value) && item.value.length))">
|
|
176
142
|
<template v-if="Array.isArray(item.value)">
|
|
177
143
|
<span v-for="(select,selectIndex) in item.value" :key="selectIndex">
|
|
@@ -182,17 +148,20 @@
|
|
|
182
148
|
</template>
|
|
183
149
|
<span v-else>{{item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'}}</span>
|
|
184
150
|
</div>-->
|
|
185
|
-
</div>
|
|
186
|
-
<template v-else-if="item.formField.type==='CASCADER'">
|
|
187
|
-
<div class="cascader-input" @click="openDrawer(item,'pc_cascader')">
|
|
188
|
-
<template v-if="extInfoFieldValue[item.fieldId] && (Array.isArray(extInfoFieldValue[item.fieldId]) && extInfoFieldValue[item.fieldId].length > 0)">
|
|
189
|
-
<span v-for="(cas,casIndex) in extInfoFieldValue[item.fieldId]" :key="casIndex">
|
|
190
|
-
{{casIndex==0?cas.label:'/'+cas.label}}
|
|
191
|
-
</span>
|
|
192
|
-
</template>
|
|
193
|
-
<span v-else>{{item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'}}</span>
|
|
194
151
|
</div>
|
|
195
|
-
|
|
152
|
+
<template v-else-if="item.formField.type === 'CASCADER'">
|
|
153
|
+
<div class="cascader-input" @click="openDrawer(item, 'pc_cascader')">
|
|
154
|
+
<!-- {{ extInfoFieldValue[item.fieldId] }} -->
|
|
155
|
+
<template
|
|
156
|
+
v-if="extInfoFieldValue[item.fieldId] && (Array.isArray(extInfoFieldValue[item.fieldId]) && extInfoFieldValue[item.fieldId].length > 0)">
|
|
157
|
+
<span v-for="(cas, casIndex) in extInfoFieldValue[item.fieldId]" :key="casIndex">
|
|
158
|
+
{{ casIndex == 0 ? cas.label : '/' + cas.label }}
|
|
159
|
+
</span>
|
|
160
|
+
</template>
|
|
161
|
+
<span
|
|
162
|
+
v-else>{{ item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder' )}}</span>
|
|
163
|
+
</div>
|
|
164
|
+
<!-- <el-cascader
|
|
196
165
|
v-model=item.value
|
|
197
166
|
:options=item.formField.extInfo.cascade
|
|
198
167
|
style="width: 100%;"
|
|
@@ -213,451 +182,379 @@
|
|
|
213
182
|
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
214
183
|
v-else-if="item.formField.extInfo.cascadeDown.length != 0"
|
|
215
184
|
></el-cascader>-->
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
<
|
|
238
|
-
|
|
185
|
+
</template>
|
|
186
|
+
<template
|
|
187
|
+
v-else-if="item.formField.type === 'FILE' || item.formField.type === 'IMAGE' || item.formField.type === 'ATTACHMENT' || item.formField.type === 'VIDEO'">
|
|
188
|
+
<div @click="checkUpload(item.fieldId, item.formField.extInfo)"
|
|
189
|
+
@mouseover="checkUpload(item.fieldId, item.formField.extInfo)" class="form-field-file"
|
|
190
|
+
style="display:flex;flex-direction: column">
|
|
191
|
+
<el-upload ref="upload"
|
|
192
|
+
:list-type="item.formField.type === 'IMAGE' || item.formField.type === 'FILE' ? 'picture-card' : ''"
|
|
193
|
+
:accept="acceptFieldType(item.formField.type)" name="file" action="/open/media/file/upload"
|
|
194
|
+
:multiple="item.formField.extInfo && item.formField.extInfo.limitNum && item.formField.extInfo.limitNum > 1 ? true : false"
|
|
195
|
+
:file-list="extInfoFieldValue[item.fieldId]"
|
|
196
|
+
:limit="item.formField.extInfo.limitNum ? Number(item.formField.extInfo.limitNum) : (item.formField.extInfo.limit ? Number(item.formField.extInfo.limit) : 1)"
|
|
197
|
+
:before-upload="(file => { return beforeAvatarUpload(file, item.formField.type) })" :on-exceed="exceedUpload"
|
|
198
|
+
:on-remove="handleRemove" :http-request="aliyunOssRequest" :on-change="handleEditChange"
|
|
199
|
+
:on-success="successUpload"
|
|
200
|
+
:show-file-list="item.formField.type === 'IMAGE' || item.formField.type === 'FILE' ? true : false">
|
|
201
|
+
<div class="upload-demo">
|
|
202
|
+
<i class="el-icon-plus"></i>
|
|
203
|
+
</div>
|
|
204
|
+
<!-- <el-button size="small" type="primary" v-else class="uploadBtn">点击上传</el-button>-->
|
|
205
|
+
</el-upload>
|
|
206
|
+
<file-list-view :attachmentList="extInfoFieldValue[item.fieldId]"
|
|
207
|
+
v-if="extInfoFieldValue[item.fieldId] && item.formField.type !== 'IMAGE' && item.formField.type !== 'FILE'"
|
|
208
|
+
@attachDeleteAttch="attachDeleteFile($event, item.fieldId)"></file-list-view>
|
|
209
|
+
</div>
|
|
210
|
+
</template>
|
|
211
|
+
<div v-else-if="item.formField.type == 'REF_TEMPLATE' || item.formField.type == 'REF'">
|
|
212
|
+
<el-select v-model=item.value
|
|
213
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
214
|
+
style="width: 100%" filterable
|
|
215
|
+
:multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'"
|
|
216
|
+
@visible-change="(visible) => { return refTemplateVisibleChange(visible, item) }" collapse-tags
|
|
217
|
+
@change="changeRefData($event, item)" @focus="setOptionWidth">
|
|
218
|
+
<template v-for="(items, index) in refTemplateList[item.fieldId]">
|
|
219
|
+
<el-option v-if="refTemplateList[item.fieldId]" :key="index" :label="items.name" :value="items.id"
|
|
220
|
+
:style="{ width: selectOptionWidth }">
|
|
221
|
+
</el-option>
|
|
222
|
+
</template>
|
|
223
|
+
<div @click="lodeMore(item)" v-if="refNextPage[item.fieldId] && refNextPage[item.fieldId].hasNextPage"
|
|
224
|
+
style="width:100%;height:30px;display:flex;align-items: center;justify-content: center;color:#606266">
|
|
225
|
+
加载更多
|
|
239
226
|
</div>
|
|
240
|
-
|
|
241
|
-
</el-upload>
|
|
242
|
-
<file-list-view :attachmentList="extInfoFieldValue[item.fieldId]" v-if="extInfoFieldValue[item.fieldId] && item.formField.type !== 'IMAGE' && item.formField.type !== 'FILE'" @attachDeleteAttch="attachDeleteFile($event,item.fieldId)"></file-list-view>
|
|
227
|
+
</el-select>
|
|
243
228
|
</div>
|
|
244
|
-
</template>
|
|
245
|
-
<div v-else-if="item.formField.type == 'REF_TEMPLATE' || item.formField.type == 'REF'">
|
|
246
|
-
<el-select
|
|
247
|
-
v-model=item.value
|
|
248
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
249
|
-
style="width: 100%"
|
|
250
|
-
filterable
|
|
251
|
-
:multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'"
|
|
252
|
-
@visible-change="(visible) =>{ return refTemplateVisibleChange(visible,item) }"
|
|
253
|
-
collapse-tags
|
|
254
|
-
@change="changeRefData($event,item)"
|
|
255
|
-
@focus="setOptionWidth"
|
|
256
|
-
>
|
|
257
|
-
<template v-for="(items,index) in refTemplateList[item.fieldId]">
|
|
258
|
-
<el-option
|
|
259
|
-
v-if="refTemplateList[item.fieldId]"
|
|
260
|
-
:key="index"
|
|
261
|
-
:label="items.name"
|
|
262
|
-
:value="items.id"
|
|
263
|
-
:style="{width:selectOptionWidth}"
|
|
264
|
-
>
|
|
265
|
-
</el-option>
|
|
266
|
-
</template>
|
|
267
|
-
<div
|
|
268
|
-
@click="lodeMore(item)"
|
|
269
|
-
v-if="refNextPage[item.fieldId] && refNextPage[item.fieldId].hasNextPage"
|
|
270
|
-
style="width:100%;height:30px;display:flex;align-items: center;justify-content: center;color:#606266">
|
|
271
|
-
加载更多
|
|
272
|
-
</div>
|
|
273
|
-
</el-select>
|
|
274
229
|
</div>
|
|
275
230
|
</div>
|
|
276
231
|
</div>
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
</span>
|
|
300
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
301
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
302
|
-
<i class="el-icon-warning-outline"></i>
|
|
303
|
-
</span>
|
|
304
|
-
</template>
|
|
305
|
-
</van-field>
|
|
306
|
-
</div>
|
|
307
|
-
<div v-else-if="item.formField.type==='EXPLANATION'||item.formField.type==='EXPLAIN'" class="explan-ation">
|
|
308
|
-
<div class="explanation">
|
|
309
|
-
<p class="explanation-p" v-if="item.formField.type==='EXPLANATION'">
|
|
310
|
-
<span class="el-icon-info"></span>
|
|
311
|
-
{{item.formField.extInfo.descriptionText}}
|
|
312
|
-
</p>
|
|
313
|
-
<p v-else class="explanation-p">
|
|
314
|
-
<span class="el-icon-info"></span>
|
|
315
|
-
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.formField.description?item.formField.description:item.formField.extInfo.placeholder}}</a></span>
|
|
316
|
-
<span v-else>{{item.formField.description?item.formField.description:item.formField.extInfo.placeholder}}</span>
|
|
317
|
-
</p>
|
|
232
|
+
<div class="mobileFormClass" v-else style="padding: 10px 0;" :class="{ notClick: disableds === true }">
|
|
233
|
+
<div v-for="(item) in formFieldRelation" :key="item.fieldId" class="form-field-item">
|
|
234
|
+
<div v-if="item.formField.type === 'INPUT'" class="form-field-item-value">
|
|
235
|
+
<van-field v-model=item.value :label=item.formField.name
|
|
236
|
+
:required="item.required || isRequiredFn(item.formField)" :disabled="disableds"
|
|
237
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.inputPlaceholder')"
|
|
238
|
+
:maxlength="item.formField.extInfo && item.formField.extInfo.maxNum ? item.formField.extInfo.maxNum * 1 : 1000"
|
|
239
|
+
@blur="typeCheck(item.formField, item)" :type="item.formField.extInfo.inputType === 'NUMBER' ||
|
|
240
|
+
item.formField.extInfo.inputType === 'RATE' ? 'number' : 'text'">
|
|
241
|
+
<template slot="label">
|
|
242
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
243
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
244
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
245
|
+
<i class="el-icon-warning-outline"></i>
|
|
246
|
+
</span>
|
|
247
|
+
<span
|
|
248
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
249
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
250
|
+
<i class="el-icon-warning-outline"></i>
|
|
251
|
+
</span>
|
|
252
|
+
</template>
|
|
253
|
+
</van-field>
|
|
318
254
|
</div>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
333
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
334
|
-
<i class="el-icon-warning-outline"></i>
|
|
335
|
-
</span>
|
|
336
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
337
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
338
|
-
<i class="el-icon-warning-outline"></i>
|
|
339
|
-
</span>
|
|
340
|
-
</template>
|
|
341
|
-
</van-field>
|
|
342
|
-
<div v-if="item.fieldId==='workorder_description'" class="workorder_description">
|
|
343
|
-
<div class="field-name" :class="item.required || isRequiredFn(item.formField)?'required-name':''">
|
|
344
|
-
<span v-if="item.required || isRequiredFn(item.formField)" style="color: red">*</span>
|
|
345
|
-
<span style="padding-right: 5px">{{ isBaiLi ? '反馈描述' : item.formField.name }}</span>
|
|
346
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
347
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
348
|
-
<i class="el-icon-warning-outline"></i>
|
|
349
|
-
</span>
|
|
350
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
351
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
352
|
-
<i class="el-icon-warning-outline"></i>
|
|
353
|
-
</span>
|
|
255
|
+
<div v-else-if="item.formField.type === 'EXPLANATION' || item.formField.type === 'EXPLAIN'" class="explan-ation">
|
|
256
|
+
<div class="explanation">
|
|
257
|
+
<p class="explanation-p" v-if="item.formField.type === 'EXPLANATION'">
|
|
258
|
+
<span class="el-icon-info"></span>
|
|
259
|
+
{{ item.formField.extInfo.descriptionText }}
|
|
260
|
+
</p>
|
|
261
|
+
<p v-else class="explanation-p">
|
|
262
|
+
<span class="el-icon-info"></span>
|
|
263
|
+
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url"
|
|
264
|
+
target="_blank">{{ item.formField.description ? item.formField.description : item.formField.extInfo.placeholder }}</a></span>
|
|
265
|
+
<span
|
|
266
|
+
v-else>{{ item.formField.description ? item.formField.description : item.formField.extInfo.placeholder }}</span>
|
|
267
|
+
</p>
|
|
354
268
|
</div>
|
|
355
|
-
|
|
269
|
+
</div>
|
|
270
|
+
<div v-else-if="item.formField.type === 'TEXTAREA'" class="form-field-item-value">
|
|
271
|
+
<van-field v-model=item.value :label=item.formField.name
|
|
272
|
+
:required="item.required || isRequiredFn(item.formField)" type="textarea" :disabled="disableds"
|
|
273
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.inputPlaceholder')"
|
|
274
|
+
:maxlength="item.formField.extInfo && item.formField.extInfo.maxNum ? item.formField.extInfo.maxNum * 1 : 1000"
|
|
275
|
+
v-if="item.fieldId !== 'workorder_description'">
|
|
276
|
+
<template slot="label">
|
|
277
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
278
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
279
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
280
|
+
<i class="el-icon-warning-outline"></i>
|
|
281
|
+
</span>
|
|
282
|
+
<span
|
|
283
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
284
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
285
|
+
<i class="el-icon-warning-outline"></i>
|
|
286
|
+
</span>
|
|
287
|
+
</template>
|
|
288
|
+
</van-field>
|
|
289
|
+
<div v-if="item.fieldId === 'workorder_description'" class="workorder_description">
|
|
290
|
+
<div class="field-name" :class="item.required || isRequiredFn(item.formField) ? 'required-name' : ''">
|
|
291
|
+
<span v-if="item.required || isRequiredFn(item.formField)" style="color: red">*</span>
|
|
292
|
+
<span style="padding-right: 5px">{{ isBaiLi ? '反馈描述' : item.formField.name }}</span>
|
|
293
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
294
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
295
|
+
<i class="el-icon-warning-outline"></i>
|
|
296
|
+
</span>
|
|
297
|
+
<span
|
|
298
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
299
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
300
|
+
<i class="el-icon-warning-outline"></i>
|
|
301
|
+
</span>
|
|
302
|
+
</div>
|
|
303
|
+
<!-- <ckeditor
|
|
356
304
|
:editor="ckeditor.editor"
|
|
357
305
|
v-model="item.value"
|
|
358
306
|
@ready="(editor)=>currentEditor=editor"
|
|
359
307
|
@focus="(zh,editor)=>currentEditor=editor"
|
|
360
308
|
:config="{...ckeditor.editorConfig,placeholder:item.formField.extInfo && item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'}"
|
|
361
309
|
></ckeditor> -->
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
>
|
|
368
|
-
</
|
|
369
|
-
<file-list-view :attachmentList="attachmentList" @attachDeleteAttch="attachDeleteAttch"></file-list-view>
|
|
310
|
+
<MyEditor v-model="item.value"
|
|
311
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : '请输入'"
|
|
312
|
+
@fileUploadCallback="desUploadImageAndFile"
|
|
313
|
+
:havToolbar="mainId !== '8b9bd566e3e64156ab764b19defc9d48' && mainId !== '0b73521f96e4486aaf6be42932bd7b07'">
|
|
314
|
+
</MyEditor>
|
|
315
|
+
<file-list-view :attachmentList="attachmentList" @attachDeleteAttch="attachDeleteAttch"></file-list-view>
|
|
316
|
+
</div>
|
|
370
317
|
</div>
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
name="calendar"
|
|
377
|
-
:value=dateValue[item.fieldId]
|
|
378
|
-
:label=item.formField.name
|
|
379
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择日期'"
|
|
380
|
-
:required="item.required || isRequiredFn(item.formField)"
|
|
381
|
-
@click="dateClick(item.fieldId)"
|
|
382
|
-
:disabled="disableds"
|
|
383
|
-
right-icon="van-icon van-icon-arrow van-cell__right-icon"
|
|
384
|
-
>
|
|
385
|
-
<template slot="label">
|
|
386
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
387
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
388
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
389
|
-
<i class="el-icon-warning-outline"></i>
|
|
390
|
-
</span>
|
|
391
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
392
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
393
|
-
<i class="el-icon-warning-outline"></i>
|
|
394
|
-
</span>
|
|
395
|
-
</template>
|
|
396
|
-
</van-field>
|
|
397
|
-
<van-calendar
|
|
398
|
-
v-model="showCalendar"
|
|
399
|
-
:min-date="minDate"
|
|
400
|
-
:max-date="maxDate"
|
|
401
|
-
@confirm="onConfirmCalendar($event,item)"
|
|
402
|
-
/>
|
|
403
|
-
</div>
|
|
404
|
-
<div 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')" class="form-field-item-value">
|
|
405
|
-
<van-field
|
|
406
|
-
readonly
|
|
407
|
-
clickable
|
|
408
|
-
name="datetimePicker"
|
|
409
|
-
:required="item.required || isRequiredFn(item.formField)"
|
|
410
|
-
:value=extInfoFieldValue[item.fieldId]
|
|
411
|
-
:label=item.formField.name
|
|
412
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
413
|
-
@click="timeClick(item.fieldId,item,'DATE_TIME')"
|
|
414
|
-
:disabled="disableds"
|
|
415
|
-
right-icon="van-icon van-icon-arrow van-cell__right-icon"
|
|
416
|
-
|
|
417
|
-
>
|
|
418
|
-
<template slot="label">
|
|
419
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
420
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
421
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
422
|
-
<i class="el-icon-warning-outline"></i>
|
|
423
|
-
</span>
|
|
424
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
425
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
426
|
-
<i class="el-icon-warning-outline"></i>
|
|
427
|
-
</span>
|
|
428
|
-
</template>
|
|
429
|
-
</van-field>
|
|
430
|
-
<van-popup v-model="dateTimePicker" position="bottom">
|
|
431
|
-
<van-datetime-picker
|
|
432
|
-
v-model="currentDate"
|
|
433
|
-
type="datetime"
|
|
434
|
-
@confirm="onConfirm($event,item.fieldId,item,'DATE_TIME')"
|
|
435
|
-
@cancel="dateTimePicker = false"
|
|
436
|
-
:min-date="minDate"
|
|
437
|
-
:formatter="formatter"
|
|
438
|
-
:max-date="maxDate"
|
|
439
|
-
/>
|
|
440
|
-
</van-popup>
|
|
441
|
-
</div>
|
|
442
|
-
<div v-else-if="item.formField.type==='TIME_PICKER'&&(!item.formField.extInfo.mold || item.formField.extInfo.mold==='TIME' || getMoldTime(item.formField) == 'TIME')" class="form-field-item-value">
|
|
443
|
-
<van-field
|
|
444
|
-
readonly
|
|
445
|
-
clickable
|
|
446
|
-
name="datetimePicker"
|
|
447
|
-
:required="item.required || isRequiredFn(item.formField)"
|
|
448
|
-
:value=extInfoFieldValue[item.fieldId]
|
|
449
|
-
:label=item.formField.name
|
|
450
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
451
|
-
@click="timeClick(item.fieldId,item,'TIME')"
|
|
452
|
-
:disabled="disableds"
|
|
453
|
-
right-icon="van-icon van-icon-arrow van-cell__right-icon"
|
|
454
|
-
|
|
455
|
-
>
|
|
318
|
+
<div v-else-if="item.formField.type === 'DATE_PICKER'" class="form-field-item-value">
|
|
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 : $t('common.selectDate')"
|
|
321
|
+
:required="item.required || isRequiredFn(item.formField)" @click="dateClick(item.fieldId)"
|
|
322
|
+
:disabled="disableds" right-icon="van-icon van-icon-arrow van-cell__right-icon">
|
|
456
323
|
<template slot="label">
|
|
457
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
324
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
458
325
|
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
459
|
-
|
|
326
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
460
327
|
<i class="el-icon-warning-outline"></i>
|
|
461
328
|
</span>
|
|
462
|
-
<span
|
|
463
|
-
|
|
329
|
+
<span
|
|
330
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
331
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
464
332
|
<i class="el-icon-warning-outline"></i>
|
|
465
333
|
</span>
|
|
466
334
|
</template>
|
|
467
335
|
</van-field>
|
|
468
|
-
<van-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
336
|
+
<van-calendar v-model="showCalendar" :min-date="minDate" :max-date="maxDate"
|
|
337
|
+
@confirm="onConfirmCalendar($event, item)" />
|
|
338
|
+
</div>
|
|
339
|
+
<div
|
|
340
|
+
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')"
|
|
341
|
+
class="form-field-item-value">
|
|
342
|
+
<van-field readonly clickable name="datetimePicker" :required="item.required || isRequiredFn(item.formField)"
|
|
343
|
+
:value=extInfoFieldValue[item.fieldId] :label=item.formField.name
|
|
344
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
345
|
+
@click="timeClick(item.fieldId, item, 'DATE_TIME')" :disabled="disableds"
|
|
346
|
+
right-icon="van-icon van-icon-arrow van-cell__right-icon">
|
|
347
|
+
<template slot="label">
|
|
348
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
349
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
350
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
351
|
+
<i class="el-icon-warning-outline"></i>
|
|
352
|
+
</span>
|
|
353
|
+
<span
|
|
354
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
355
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
356
|
+
<i class="el-icon-warning-outline"></i>
|
|
357
|
+
</span>
|
|
358
|
+
</template>
|
|
359
|
+
</van-field>
|
|
360
|
+
<van-popup v-model="dateTimePicker" position="bottom">
|
|
361
|
+
<van-datetime-picker v-model="currentDate" type="datetime"
|
|
362
|
+
@confirm="onConfirm($event, item.fieldId, item, 'DATE_TIME')" @cancel="dateTimePicker = false"
|
|
363
|
+
:min-date="minDate" :formatter="formatter" :max-date="maxDate" />
|
|
478
364
|
</van-popup>
|
|
479
365
|
</div>
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
name
|
|
485
|
-
:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
489
|
-
@click="timeClick(item.fieldId,item,'DATE')"
|
|
490
|
-
:disabled="disableds"
|
|
491
|
-
right-icon="van-icon van-icon-arrow van-cell__right-icon"
|
|
492
|
-
|
|
493
|
-
>
|
|
494
|
-
<template slot="label">
|
|
495
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
496
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
497
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
498
|
-
<i class="el-icon-warning-outline"></i>
|
|
499
|
-
</span>
|
|
500
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
501
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
502
|
-
<i class="el-icon-warning-outline"></i>
|
|
503
|
-
</span>
|
|
504
|
-
</template>
|
|
505
|
-
</van-field>
|
|
506
|
-
<van-calendar v-model="datePicker" :show-confirm="false" @confirm="onConfirm($event,item.fieldId,item,'DATE')" :min-date="minDate" :max-date="maxDate" @cancel="datePicker = false"/>
|
|
507
|
-
</div>
|
|
508
|
-
<div v-else-if="item.formField.type==='RADIO'" class="form-field-item-other">
|
|
509
|
-
<van-field name="radio" :label="item.formField.name" :required="item.required || isRequiredFn(item.formField)" :disabled="disableds" v-if="item.formField.extInfo.option">
|
|
510
|
-
<template slot="label">
|
|
511
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
512
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
513
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
514
|
-
<i class="el-icon-warning-outline"></i>
|
|
515
|
-
</span>
|
|
516
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
517
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
518
|
-
<i class="el-icon-warning-outline"></i>
|
|
519
|
-
</span>
|
|
520
|
-
</template>
|
|
521
|
-
<template #input style="display: flex;align-items: center">
|
|
522
|
-
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
523
|
-
<van-radio v-for="(items,index) in item.formField.extInfo.option" :name=items.value :key="index" @click="changeSelect(item)">{{items.label}}</van-radio>
|
|
524
|
-
</van-radio-group>
|
|
525
|
-
</template>
|
|
526
|
-
</van-field>
|
|
527
|
-
<van-field name="radio" :label="item.formField.name" :required="item.required || isRequiredFn(item.formField)" :disabled="disableds" v-if="item.formField.extInfo.options">
|
|
528
|
-
<template slot="label">
|
|
529
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
530
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
531
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
532
|
-
<i class="el-icon-warning-outline"></i>
|
|
533
|
-
</span>
|
|
534
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
535
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
536
|
-
<i class="el-icon-warning-outline"></i>
|
|
537
|
-
</span>
|
|
538
|
-
</template>
|
|
539
|
-
<template #input style="display: flex;align-items: center" >
|
|
540
|
-
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
541
|
-
<van-radio v-for="(items,index) in optionsLists(item)" :name=items.value :key="index" @click="changeSelect(item)">{{items.label}}</van-radio>
|
|
542
|
-
</van-radio-group>
|
|
543
|
-
</template>
|
|
544
|
-
</van-field>
|
|
545
|
-
</div>
|
|
546
|
-
<div v-else-if="item.formField.type==='CHECKBOX'" class="form-field-item-other">
|
|
547
|
-
<van-field name="checkbox" :label=item.formField.name :required="item.required || isRequiredFn(item.formField)" :disabled="disableds" v-if="item.formField.extInfo.option">
|
|
548
|
-
<template slot="label">
|
|
549
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
550
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
551
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
552
|
-
<i class="el-icon-warning-outline"></i>
|
|
553
|
-
</span>
|
|
554
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
555
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
556
|
-
<i class="el-icon-warning-outline"></i>
|
|
557
|
-
</span>
|
|
558
|
-
</template>
|
|
559
|
-
<template #input style="display: flex;align-items: center" >
|
|
560
|
-
<van-checkbox-group v-model=item.value ref="checkboxGroup" direction="horizontal" :disabled="disableds">
|
|
561
|
-
<van-checkbox
|
|
562
|
-
v-for="(items,index) in item.formField.extInfo.option"
|
|
563
|
-
shape="square"
|
|
564
|
-
:key="index"
|
|
565
|
-
:name=items.value>
|
|
566
|
-
{{items.label}}
|
|
567
|
-
</van-checkbox>
|
|
568
|
-
</van-checkbox-group>
|
|
569
|
-
</template>
|
|
570
|
-
</van-field>
|
|
571
|
-
<van-field name="checkbox" :label=item.formField.name :required="item.required || isRequiredFn(item.formField)" :disabled="disableds" v-if="item.formField.extInfo.options">
|
|
572
|
-
<template slot="label">
|
|
573
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
574
|
-
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
575
|
-
@click.stop="leftIcon(item.formField.remark)">
|
|
576
|
-
<i class="el-icon-warning-outline"></i>
|
|
577
|
-
</span>
|
|
578
|
-
<span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
579
|
-
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
580
|
-
<i class="el-icon-warning-outline"></i>
|
|
581
|
-
</span>
|
|
582
|
-
</template>
|
|
583
|
-
<template #input style="display: flex;align-items: center" >
|
|
584
|
-
<van-checkbox-group v-model=item.value ref="checkboxGroup" direction="horizontal" :disabled="disableds">
|
|
585
|
-
<van-checkbox
|
|
586
|
-
v-for="(items,index) in optionsLists(item)"
|
|
587
|
-
shape="square"
|
|
588
|
-
:key="index"
|
|
589
|
-
:name=items.value>
|
|
590
|
-
{{items.label}}
|
|
591
|
-
</van-checkbox>
|
|
592
|
-
</van-checkbox-group>
|
|
593
|
-
</template>
|
|
594
|
-
</van-field>
|
|
595
|
-
</div>
|
|
596
|
-
<div v-else-if="item.formField.type==='SELECT' || item.formField.type==='OPTION'" class="form-field-item-value">
|
|
597
|
-
<template v-if="item.fieldId==='workorder_clientId' || item.fieldId === 'workorder_statusId' || item.fieldId === 'workorder_priority'">
|
|
598
|
-
<van-field
|
|
599
|
-
readonly
|
|
600
|
-
clickable
|
|
601
|
-
name="picker"
|
|
602
|
-
:value=selectValues[item.fieldId]
|
|
603
|
-
:label="item.fieldId==='workorder_clientId'?'报单人':item.formField.name"
|
|
604
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
605
|
-
@click="selectClick(item.fieldId,'client',item)"
|
|
606
|
-
:required="item.required || isRequiredFn(item.formField)"
|
|
607
|
-
:disabled="disableds"
|
|
608
|
-
@click-right-icon.stop="SelectClear(item.fieldId)"
|
|
609
|
-
:right-icon="selectValues[item.fieldId]? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'"
|
|
610
|
-
>
|
|
366
|
+
<div
|
|
367
|
+
v-else-if="item.formField.type === 'TIME_PICKER' && (!item.formField.extInfo.mold || item.formField.extInfo.mold === 'TIME' || getMoldTime(item.formField) == 'TIME')"
|
|
368
|
+
class="form-field-item-value">
|
|
369
|
+
<van-field readonly clickable name="datetimePicker" :required="item.required || isRequiredFn(item.formField)"
|
|
370
|
+
:value=extInfoFieldValue[item.fieldId] :label=item.formField.name
|
|
371
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
372
|
+
@click="timeClick(item.fieldId, item, 'TIME')" :disabled="disableds"
|
|
373
|
+
right-icon="van-icon van-icon-arrow van-cell__right-icon">
|
|
611
374
|
<template slot="label">
|
|
612
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
375
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
613
376
|
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
614
|
-
|
|
377
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
615
378
|
<i class="el-icon-warning-outline"></i>
|
|
616
379
|
</span>
|
|
617
|
-
<span
|
|
618
|
-
|
|
380
|
+
<span
|
|
381
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
382
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
619
383
|
<i class="el-icon-warning-outline"></i>
|
|
620
384
|
</span>
|
|
621
385
|
</template>
|
|
622
386
|
</van-field>
|
|
623
|
-
<van-popup v-model="
|
|
624
|
-
<van-picker
|
|
625
|
-
|
|
626
|
-
:columns=selectValue
|
|
627
|
-
@confirm="onConfirmSelect($event,item)"
|
|
628
|
-
@cancel="showPicker = false"
|
|
629
|
-
:key="selectKey"
|
|
630
|
-
|
|
631
|
-
/>
|
|
387
|
+
<van-popup v-model="timePicker" position="bottom">
|
|
388
|
+
<van-datetime-picker v-model="currentTime" type="time" title="选择时间" :min-hour="0" :max-hour="23"
|
|
389
|
+
@confirm="onConfirm($event, item.fieldId, item, 'TIME')" @cancel="timePicker = false" />
|
|
632
390
|
</van-popup>
|
|
633
|
-
</
|
|
634
|
-
<
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
@click="selectClick(item.fieldId,'select',item)"
|
|
643
|
-
:required="item.required || isRequiredFn(item.formField)"
|
|
644
|
-
:disabled="disableds"
|
|
645
|
-
@click-right-icon.stop="SelectClear(item.fieldId)"
|
|
646
|
-
:right-icon="item.value && item.value.length? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'"
|
|
647
|
-
>
|
|
391
|
+
</div>
|
|
392
|
+
<div
|
|
393
|
+
v-else-if="item.formField.type === 'TIME_PICKER' && (item.formField.extInfo.mold === 'DATA' || item.formField.extInfo.mold === 'DATE' || getMoldTime(item.formField) == 'DATE')"
|
|
394
|
+
class="form-field-item-value">
|
|
395
|
+
<van-field readonly clickable name="datetimePicker" :required="item.required || isRequiredFn(item.formField)"
|
|
396
|
+
:value=extInfoFieldValue[item.fieldId] :label=item.formField.name
|
|
397
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
398
|
+
@click="timeClick(item.fieldId, item, 'DATE')" :disabled="disableds"
|
|
399
|
+
right-icon="van-icon van-icon-arrow van-cell__right-icon">
|
|
648
400
|
<template slot="label">
|
|
649
|
-
<span style="padding-right: 5px">{{item.formField.name}}</span>
|
|
401
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
650
402
|
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
651
|
-
|
|
403
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
652
404
|
<i class="el-icon-warning-outline"></i>
|
|
653
405
|
</span>
|
|
654
|
-
<span
|
|
655
|
-
|
|
406
|
+
<span
|
|
407
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
408
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
409
|
+
<i class="el-icon-warning-outline"></i>
|
|
410
|
+
</span>
|
|
411
|
+
</template>
|
|
412
|
+
</van-field>
|
|
413
|
+
<van-calendar v-model="datePicker" :show-confirm="false" @confirm="onConfirm($event, item.fieldId, item, 'DATE')"
|
|
414
|
+
:min-date="minDate" :max-date="maxDate" @cancel="datePicker = false" />
|
|
415
|
+
</div>
|
|
416
|
+
<div v-else-if="item.formField.type === 'RADIO'" class="form-field-item-other">
|
|
417
|
+
<van-field name="radio" :label="item.formField.name" :required="item.required || isRequiredFn(item.formField)"
|
|
418
|
+
:disabled="disableds" v-if="item.formField.extInfo.option">
|
|
419
|
+
<template slot="label">
|
|
420
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
421
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
422
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
423
|
+
<i class="el-icon-warning-outline"></i>
|
|
424
|
+
</span>
|
|
425
|
+
<span
|
|
426
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
427
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
428
|
+
<i class="el-icon-warning-outline"></i>
|
|
429
|
+
</span>
|
|
430
|
+
</template>
|
|
431
|
+
<template #input style="display: flex;align-items: center">
|
|
432
|
+
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
433
|
+
<van-radio v-for="(items, index) in item.formField.extInfo.option" :name=items.value :key="index"
|
|
434
|
+
@click="changeSelect(item)">{{ items.label }}</van-radio>
|
|
435
|
+
</van-radio-group>
|
|
436
|
+
</template>
|
|
437
|
+
</van-field>
|
|
438
|
+
<van-field name="radio" :label="item.formField.name" :required="item.required || isRequiredFn(item.formField)"
|
|
439
|
+
:disabled="disableds" v-if="item.formField.extInfo.options">
|
|
440
|
+
<template slot="label">
|
|
441
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
442
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
443
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
444
|
+
<i class="el-icon-warning-outline"></i>
|
|
445
|
+
</span>
|
|
446
|
+
<span
|
|
447
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
448
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
656
449
|
<i class="el-icon-warning-outline"></i>
|
|
657
450
|
</span>
|
|
658
451
|
</template>
|
|
452
|
+
<template #input style="display: flex;align-items: center">
|
|
453
|
+
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
454
|
+
<van-radio v-for="(items, index) in optionsLists(item)" :name=items.value :key="index"
|
|
455
|
+
@click="changeSelect(item)">{{ items.label }}</van-radio>
|
|
456
|
+
</van-radio-group>
|
|
457
|
+
</template>
|
|
458
|
+
</van-field>
|
|
459
|
+
</div>
|
|
460
|
+
<div v-else-if="item.formField.type === 'CHECKBOX'" class="form-field-item-other">
|
|
461
|
+
<van-field name="checkbox" :label=item.formField.name
|
|
462
|
+
:required="item.required || isRequiredFn(item.formField)" :disabled="disableds"
|
|
463
|
+
v-if="item.formField.extInfo.option">
|
|
464
|
+
<template slot="label">
|
|
465
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
466
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
467
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
468
|
+
<i class="el-icon-warning-outline"></i>
|
|
469
|
+
</span>
|
|
470
|
+
<span
|
|
471
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
472
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
473
|
+
<i class="el-icon-warning-outline"></i>
|
|
474
|
+
</span>
|
|
475
|
+
</template>
|
|
476
|
+
<template #input style="display: flex;align-items: center">
|
|
477
|
+
<van-checkbox-group v-model=item.value ref="checkboxGroup" direction="horizontal" :disabled="disableds">
|
|
478
|
+
<van-checkbox v-for="(items, index) in item.formField.extInfo.option" shape="square" :key="index"
|
|
479
|
+
:name=items.value>
|
|
480
|
+
{{ items.label }}
|
|
481
|
+
</van-checkbox>
|
|
482
|
+
</van-checkbox-group>
|
|
483
|
+
</template>
|
|
484
|
+
</van-field>
|
|
485
|
+
<van-field name="checkbox" :label=item.formField.name
|
|
486
|
+
:required="item.required || isRequiredFn(item.formField)" :disabled="disableds"
|
|
487
|
+
v-if="item.formField.extInfo.options">
|
|
488
|
+
<template slot="label">
|
|
489
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
490
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
491
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
492
|
+
<i class="el-icon-warning-outline"></i>
|
|
493
|
+
</span>
|
|
494
|
+
<span
|
|
495
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
496
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
497
|
+
<i class="el-icon-warning-outline"></i>
|
|
498
|
+
</span>
|
|
499
|
+
</template>
|
|
500
|
+
<template #input style="display: flex;align-items: center">
|
|
501
|
+
<van-checkbox-group v-model=item.value ref="checkboxGroup" direction="horizontal" :disabled="disableds">
|
|
502
|
+
<van-checkbox v-for="(items, index) in optionsLists(item)" shape="square" :key="index" :name=items.value>
|
|
503
|
+
{{ items.label }}
|
|
504
|
+
</van-checkbox>
|
|
505
|
+
</van-checkbox-group>
|
|
506
|
+
</template>
|
|
659
507
|
</van-field>
|
|
660
|
-
|
|
508
|
+
</div>
|
|
509
|
+
<div v-else-if="item.formField.type === 'SELECT' || item.formField.type === 'OPTION'" class="form-field-item-value">
|
|
510
|
+
<template
|
|
511
|
+
v-if="item.fieldId === 'workorder_clientId' || item.fieldId === 'workorder_statusId' || item.fieldId === 'workorder_priority'">
|
|
512
|
+
<van-field readonly clickable name="picker" :value=selectValues[item.fieldId]
|
|
513
|
+
:label="item.fieldId === 'workorder_clientId' ? '报单人' : item.formField.name"
|
|
514
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
515
|
+
@click="selectClick(item.fieldId, 'client', item)" :required="item.required || isRequiredFn(item.formField)"
|
|
516
|
+
:disabled="disableds" @click-right-icon.stop="SelectClear(item.fieldId)"
|
|
517
|
+
:right-icon="selectValues[item.fieldId] ? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'">
|
|
518
|
+
<template slot="label">
|
|
519
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
520
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
521
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
522
|
+
<i class="el-icon-warning-outline"></i>
|
|
523
|
+
</span>
|
|
524
|
+
<span
|
|
525
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
526
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
527
|
+
<i class="el-icon-warning-outline"></i>
|
|
528
|
+
</span>
|
|
529
|
+
</template>
|
|
530
|
+
</van-field>
|
|
531
|
+
<van-popup v-model="showPicker" position="bottom">
|
|
532
|
+
<van-picker show-toolbar :columns=selectValue @confirm="onConfirmSelect($event, item)"
|
|
533
|
+
@cancel="showPicker = false" :key="selectKey" />
|
|
534
|
+
</van-popup>
|
|
535
|
+
</template>
|
|
536
|
+
<template v-else>
|
|
537
|
+
<van-field readonly clickable name="picker"
|
|
538
|
+
:value="showSelectText(item.formField.extInfo ? (item.formField.extInfo.option || item.formField.extInfo.options) : [], item.value)"
|
|
539
|
+
:label=item.formField.name
|
|
540
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
541
|
+
@click="selectClick(item.fieldId, 'select', item)" :required="item.required || isRequiredFn(item.formField)"
|
|
542
|
+
:disabled="disableds" @click-right-icon.stop="SelectClear(item.fieldId)"
|
|
543
|
+
:right-icon="item.value && item.value.length ? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'">
|
|
544
|
+
<template slot="label">
|
|
545
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
546
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
547
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
548
|
+
<i class="el-icon-warning-outline"></i>
|
|
549
|
+
</span>
|
|
550
|
+
<span
|
|
551
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
552
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
553
|
+
<i class="el-icon-warning-outline"></i>
|
|
554
|
+
</span>
|
|
555
|
+
</template>
|
|
556
|
+
</van-field>
|
|
557
|
+
<!-- <van-field
|
|
661
558
|
readonly
|
|
662
559
|
clickable
|
|
663
560
|
name="picker"
|
|
@@ -682,178 +579,141 @@
|
|
|
682
579
|
</span>
|
|
683
580
|
</template>
|
|
684
581
|
</van-field> -->
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
:
|
|
692
|
-
:
|
|
693
|
-
|
|
694
|
-
:
|
|
695
|
-
|
|
696
|
-
@click-right-icon.stop="SelectClear(item.fieldId)"
|
|
697
|
-
:required="item.required || isRequiredFn(item.formField)"
|
|
698
|
-
:disabled="disableds"
|
|
699
|
-
:right-icon="extInfoFieldValue[item.fieldId] && extInfoFieldValue[item.fieldId].length? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'"
|
|
700
|
-
/>
|
|
582
|
+
</template>
|
|
583
|
+
</div>
|
|
584
|
+
<div v-if="item.formField.type === 'REF_TEMPLATE' || item.formField.type === 'REF'"
|
|
585
|
+
class="form-field-item-value">
|
|
586
|
+
<van-field readonly clickable
|
|
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
|
+
:label="item.formField.name" name="picker"
|
|
589
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
590
|
+
@click="selectClick(item.fieldId, 'ref', item)" @click-right-icon.stop="SelectClear(item.fieldId)"
|
|
591
|
+
:required="item.required || isRequiredFn(item.formField)" :disabled="disableds"
|
|
592
|
+
:right-icon="extInfoFieldValue[item.fieldId] && extInfoFieldValue[item.fieldId].length ? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'" />
|
|
701
593
|
<van-popup v-model="refShowPicker" position="bottom" :style="{ height: '300px' }">
|
|
702
|
-
<select-popup
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
:
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
value:'id',
|
|
711
|
-
label:'name'
|
|
712
|
-
}"
|
|
713
|
-
>
|
|
594
|
+
<select-popup :options="refTemplateList[selectDetail.fieldId]"
|
|
595
|
+
:defaultValue="refDefaultValue[selectDetail.fieldId]" @onConfim="confirmRefSelect"
|
|
596
|
+
@onclose="refShowPicker = false"
|
|
597
|
+
:multiple="selectDetail.formField && selectDetail.formField.extInfo && selectDetail.formField.extInfo.selectType === '多选' ? true : false"
|
|
598
|
+
ref="selectPopup" :props="{
|
|
599
|
+
value: 'id',
|
|
600
|
+
label: 'name'
|
|
601
|
+
}">
|
|
714
602
|
<template slot="popup-footer" v-if="refNextPage[item.fieldId] && refNextPage[item.fieldId].hasNextPage">
|
|
715
|
-
<span @click="lodeMore(item)"
|
|
603
|
+
<span @click="lodeMore(item)">{{$t('common.loadMore')}}</span>
|
|
716
604
|
</template>
|
|
717
605
|
</select-popup>
|
|
718
606
|
</van-popup>
|
|
719
607
|
</div>
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
name="area"
|
|
725
|
-
:value="extInfoFieldValue[item.fieldId] && Array.isArray(extInfoFieldValue[item.fieldId])?extInfoFieldValue[item.fieldId].map(e=>e.label).join('/'):''"
|
|
608
|
+
<div v-else-if="item.formField.type === 'CASCADER'" :key="JSON.stringify(item.formField)"
|
|
609
|
+
class="form-field-item-value">
|
|
610
|
+
<van-field readonly clickable name="area"
|
|
611
|
+
:value="extInfoFieldValue[item.fieldId] && Array.isArray(extInfoFieldValue[item.fieldId]) ? extInfoFieldValue[item.fieldId].map(e => e.label).join('/') : ''"
|
|
726
612
|
:label=item.formField.name
|
|
727
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'
|
|
728
|
-
@click="openDrawer(item,'cascader')"
|
|
729
|
-
:required="item.fieldId !== '0feca81fce97465da537248c066e4db8' && item.fieldId !=='1d8bd21485834773a6d18eae60013000' && (item.required || isRequiredFn(item.formField))"
|
|
730
|
-
:disabled="disableds"
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
<
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
</
|
|
743
|
-
</
|
|
744
|
-
</
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
<div class="
|
|
749
|
-
<
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
v-model="extInfoFieldValue[item.fieldId]"
|
|
762
|
-
:before-read="(file=>{return beforeRead(file,item.formField.type)})"
|
|
763
|
-
:max-count='item.formField.extInfo&&item.formField.extInfo.limitNum ? item.formField.extInfo.limitNum : (item.formField.extInfo.limit ? item.formField.extInfo.limit : 1)'
|
|
764
|
-
:after-read="afterRead"
|
|
765
|
-
:accept="acceptFieldType(item.formField.type)"
|
|
766
|
-
:multiple="item.formField.extInfo&&item.formField.extInfo.limitNum&&item.formField.extInfo.limitNum>1?true:false"
|
|
767
|
-
:preview-image="item.formField.type === 'IMAGE' || item.formField.type === 'FILE' ? true : false"
|
|
768
|
-
>
|
|
769
|
-
<div class="vant-upload--picture-card">
|
|
770
|
-
<i class="el-icon-plus"></i>
|
|
613
|
+
:placeholder="item.formField.extInfo && item.formField.extInfo.placeholder ? item.formField.extInfo.placeholder : $t('common.selectPlaceholder')"
|
|
614
|
+
@click="openDrawer(item, 'cascader')"
|
|
615
|
+
:required="item.fieldId !== '0feca81fce97465da537248c066e4db8' && item.fieldId !== '1d8bd21485834773a6d18eae60013000' && (item.required || isRequiredFn(item.formField))"
|
|
616
|
+
:disabled="disableds" right-icon="van-icon van-icon-arrow van-cell__right-icon">
|
|
617
|
+
<template slot="label">
|
|
618
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
619
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
620
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
621
|
+
<i class="el-icon-warning-outline"></i>
|
|
622
|
+
</span>
|
|
623
|
+
<span
|
|
624
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
625
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
626
|
+
<i class="el-icon-warning-outline"></i>
|
|
627
|
+
</span>
|
|
628
|
+
</template>
|
|
629
|
+
</van-field>
|
|
630
|
+
</div>
|
|
631
|
+
<div
|
|
632
|
+
v-else-if="item.formField.type === 'FILE' || item.formField.type === 'IMAGE' || item.formField.type === 'ATTACHMENT' || item.formField.type === 'VIDEO'"
|
|
633
|
+
class="form-field-item-value">
|
|
634
|
+
<div @click="checkUpload(item.fieldId, item.formField.extInfo)" class="form-field-item-file">
|
|
635
|
+
<div class="fileName">
|
|
636
|
+
<span style="color: red" v-if="item.required || isRequiredFn(item.formField)">*</span>
|
|
637
|
+
<span style="padding-right: 5px">{{ item.formField.name }}</span>
|
|
638
|
+
<span v-if="item.formField.remark && item.formField.remark.enable"
|
|
639
|
+
@click.stop="leftIcon(item.formField.remark)">
|
|
640
|
+
<i class="el-icon-warning-outline"></i>
|
|
641
|
+
</span>
|
|
642
|
+
<span
|
|
643
|
+
v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
|
|
644
|
+
@click.stop="leftIcon(item.formField.extInfo.remark)">
|
|
645
|
+
<i class="el-icon-warning-outline"></i>
|
|
646
|
+
</span>
|
|
771
647
|
</div>
|
|
772
|
-
|
|
773
|
-
|
|
648
|
+
<van-uploader v-model="extInfoFieldValue[item.fieldId]"
|
|
649
|
+
:before-read="(file => { return beforeRead(file, item.formField.type) })"
|
|
650
|
+
:max-count='item.formField.extInfo && item.formField.extInfo.limitNum ? item.formField.extInfo.limitNum : (item.formField.extInfo.limit ? item.formField.extInfo.limit : 1)'
|
|
651
|
+
:after-read="afterRead" :accept="acceptFieldType(item.formField.type)"
|
|
652
|
+
:multiple="item.formField.extInfo && item.formField.extInfo.limitNum && item.formField.extInfo.limitNum > 1 ? true : false"
|
|
653
|
+
:preview-image="item.formField.type === 'IMAGE' || item.formField.type === 'FILE' ? true : false">
|
|
654
|
+
<div class="vant-upload--picture-card">
|
|
655
|
+
<i class="el-icon-plus"></i>
|
|
656
|
+
</div>
|
|
657
|
+
</van-uploader>
|
|
658
|
+
<file-list-view :attachmentList="extInfoFieldValue[item.fieldId]"
|
|
659
|
+
v-if="extInfoFieldValue[item.fieldId] && extInfoFieldValue[item.fieldId].length && item.formField.type !== 'IMAGE' && item.formField.type !== 'FILE'"
|
|
660
|
+
@attachDeleteAttch="attachDeleteFile($event, item.fieldId)"></file-list-view>
|
|
661
|
+
</div>
|
|
774
662
|
</div>
|
|
775
663
|
</div>
|
|
776
|
-
</div>
|
|
777
664
|
<van-popup v-model="fileUpload" :close-on-click-overlay="false">
|
|
778
|
-
<div
|
|
779
|
-
|
|
665
|
+
<div
|
|
666
|
+
style="background-color: black;height: 100px;width: 100px;display: flex;justify-content: center;align-items: center">
|
|
667
|
+
<van-loading type="spinner" />
|
|
780
668
|
</div>
|
|
781
669
|
</van-popup>
|
|
782
|
-
|
|
670
|
+
</div>
|
|
783
671
|
<div class="bottom-link"></div>
|
|
784
672
|
<div class="form-submit-btn" v-if="isCompany">
|
|
785
|
-
<el-button style="border-color: #366aff;color: white;background-color: #366aff"
|
|
673
|
+
<el-button style="border-color: #366aff;color: white;background-color: #366aff" round class="submitClass"
|
|
674
|
+
size="small" @click="submitClick" :disabled="disableds">
|
|
786
675
|
<i class="el-icon-check" v-if="!disableds"></i>
|
|
787
|
-
{{submitValue}}
|
|
676
|
+
{{ submitValue }}
|
|
788
677
|
</el-button>
|
|
789
678
|
</div>
|
|
790
679
|
<div class="form-submit-btn" v-else>
|
|
791
|
-
<van-button
|
|
680
|
+
<van-button round type="info" class="submitClass" @click="submitClick" :disabled="disableds">
|
|
792
681
|
<i class="el-icon-check" v-if="!disableds"></i>
|
|
793
|
-
{{submitValue}}
|
|
682
|
+
{{ submitValue }}
|
|
794
683
|
</van-button>
|
|
795
684
|
</div>
|
|
796
685
|
</div>
|
|
797
686
|
<el-dialog :visible.sync="dialogVisible">
|
|
798
687
|
<img width="100%" :src="dialogImageUrl" alt="">
|
|
799
688
|
</el-dialog>
|
|
800
|
-
<el-drawer
|
|
801
|
-
|
|
802
|
-
:visible.sync="drawer"
|
|
803
|
-
size="400px"
|
|
804
|
-
:model="false"
|
|
805
|
-
:append-to-body="true"
|
|
806
|
-
direction="btt">
|
|
689
|
+
<el-drawer :withHeader="false" :visible.sync="drawer" size="400px" :model="false" :append-to-body="true"
|
|
690
|
+
direction="btt">
|
|
807
691
|
<div class="drawer-container">
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
@saveData="saveData"
|
|
811
|
-
@cancelBtn="drawer = false"
|
|
812
|
-
:fieldValue="fieldValue"
|
|
813
|
-
></tree>
|
|
692
|
+
<tree ref="drawerTree" :dataOptions="detailField.formField" @saveData="saveData" @cancelBtn="drawer = false"
|
|
693
|
+
:fieldValue="fieldValue" :webHookCascader="webHookCascader"></tree>
|
|
814
694
|
</div>
|
|
815
695
|
</el-drawer>
|
|
816
|
-
<el-drawer
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
:
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
:options="options"
|
|
825
|
-
:defaultValue="defaultValue"
|
|
826
|
-
@onConfim="confirmSelect"
|
|
827
|
-
@onclose= "selectPopUp = false"
|
|
828
|
-
:multiple="detailField.formField.extInfo && detailField.formField.extInfo.selectType ==='多选'?true:false"
|
|
829
|
-
ref="selectPopup"
|
|
830
|
-
:props="{
|
|
831
|
-
value:'label',
|
|
832
|
-
label:'value'
|
|
833
|
-
}"
|
|
834
|
-
></select-popup>
|
|
696
|
+
<el-drawer :withHeader="false" :visible.sync="selectPopUp" size="40%" :model="false" direction="btt">
|
|
697
|
+
<select-popup :options="options" :defaultValue="defaultValue" @onConfim="confirmSelect"
|
|
698
|
+
@onclose="selectPopUp = false"
|
|
699
|
+
:multiple="detailField.formField.extInfo && detailField.formField.extInfo.selectType === '多选' ? true : false"
|
|
700
|
+
ref="selectPopup" :props="{
|
|
701
|
+
value: 'label',
|
|
702
|
+
label: 'value'
|
|
703
|
+
}"></select-popup>
|
|
835
704
|
</el-drawer>
|
|
836
705
|
<van-popup v-model="showArea" position="bottom" :style="{ height: '400px' }" v-if="!isCompany">
|
|
837
|
-
<tree ref="drawerTree"
|
|
838
|
-
|
|
839
|
-
@saveData="saveData"
|
|
840
|
-
@cancelBtn="showArea = false"
|
|
841
|
-
:fieldValue="fieldValue"
|
|
842
|
-
></tree>
|
|
706
|
+
<tree ref="drawerTree" :dataOptions="detailField.formField" @saveData="saveData" @cancelBtn="showArea = false"
|
|
707
|
+
:fieldValue="fieldValue" :webHookCascader="webHookCascader"></tree>
|
|
843
708
|
</van-popup>
|
|
844
709
|
<van-popup v-model="selectPicker" position="bottom" :style="{ height: '300px' }" v-if="!isCompany">
|
|
845
|
-
<select-popup
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
:
|
|
851
|
-
|
|
852
|
-
:props="{
|
|
853
|
-
value:'value',
|
|
854
|
-
label:'label'
|
|
855
|
-
}"
|
|
856
|
-
></select-popup>
|
|
710
|
+
<select-popup :options="optionsList[selectDetail.fieldId]" :defaultValue="defaultValue" @onConfim="confirmSelect"
|
|
711
|
+
@onclose="selectPicker = false"
|
|
712
|
+
:multiple="selectDetail.formField && selectDetail.formField.extInfo && selectDetail.formField.extInfo.selectType === '多选' ? true : false"
|
|
713
|
+
ref="selectPopup" :props="{
|
|
714
|
+
value: 'value',
|
|
715
|
+
label: 'label'
|
|
716
|
+
}"></select-popup>
|
|
857
717
|
</van-popup>
|
|
858
718
|
</div>
|
|
859
719
|
</template>
|
|
@@ -862,7 +722,7 @@
|
|
|
862
722
|
/* eslint-disable */
|
|
863
723
|
import { forMatTime } from "./utils/format_date";
|
|
864
724
|
let that
|
|
865
|
-
import {multipartUpload,ossFileUrl} from "
|
|
725
|
+
import { multipartUpload, ossFileUrl } from "../assets/js/AliyunlssUtil";
|
|
866
726
|
import MyEditor from './MyEditor'
|
|
867
727
|
import myPopup from "./myPopup.vue";
|
|
868
728
|
import Tree from '../components/tree'
|
|
@@ -871,20 +731,20 @@ import fileListView from './fielListView.vue'
|
|
|
871
731
|
import { uniqueData } from './utils/math_utils'
|
|
872
732
|
export default {
|
|
873
733
|
name: "formTemplate",
|
|
874
|
-
data() {
|
|
734
|
+
data () {
|
|
875
735
|
return {
|
|
876
736
|
isPhone: false,
|
|
877
737
|
isCompany: false,
|
|
878
738
|
checkboxGroup: [],
|
|
879
739
|
currentDate: new Date(),
|
|
880
|
-
currentTime:"",
|
|
881
|
-
timePicker:false,
|
|
740
|
+
currentTime: "",
|
|
741
|
+
timePicker: false,
|
|
882
742
|
timeValue: [],
|
|
883
743
|
dateValue: [],
|
|
884
744
|
showPicker: false,
|
|
885
|
-
selectPicker:false,
|
|
745
|
+
selectPicker: false,
|
|
886
746
|
dateTimePicker: false,
|
|
887
|
-
datePicker:false,
|
|
747
|
+
datePicker: false,
|
|
888
748
|
showCalendar: false,
|
|
889
749
|
radio: [],
|
|
890
750
|
selectValue: [],
|
|
@@ -926,23 +786,23 @@ export default {
|
|
|
926
786
|
clickPicker: '',
|
|
927
787
|
columns: [],
|
|
928
788
|
copyForm: [],
|
|
929
|
-
cascaderId:0,
|
|
930
|
-
formShow:[],
|
|
789
|
+
cascaderId: 0,
|
|
790
|
+
formShow: [],
|
|
931
791
|
uploadAvatarParams: {
|
|
932
792
|
token: "8c98087dfd2d48f856d8c95c09115def",
|
|
933
793
|
},
|
|
934
|
-
fileListList:[],
|
|
935
|
-
keyValue:'',
|
|
936
|
-
selectKey:'',
|
|
937
|
-
filedId:'',
|
|
938
|
-
disabled:false,
|
|
939
|
-
dialogVisible:false,
|
|
940
|
-
dialogImageUrl:'',
|
|
941
|
-
fileUpload:false,
|
|
942
|
-
videoFlag:false,
|
|
943
|
-
videoUploadPercent:false,
|
|
944
|
-
fileType:['PICTURE','VIDEO','AUDIO'],
|
|
945
|
-
loading:'',
|
|
794
|
+
fileListList: [],
|
|
795
|
+
keyValue: '',
|
|
796
|
+
selectKey: '',
|
|
797
|
+
filedId: '',
|
|
798
|
+
disabled: false,
|
|
799
|
+
dialogVisible: false,
|
|
800
|
+
dialogImageUrl: '',
|
|
801
|
+
fileUpload: false,
|
|
802
|
+
videoFlag: false,
|
|
803
|
+
videoUploadPercent: false,
|
|
804
|
+
fileType: ['PICTURE', 'VIDEO', 'AUDIO'],
|
|
805
|
+
loading: '',
|
|
946
806
|
ossConfig: {
|
|
947
807
|
region: "oss-cn-zhangjiakou",
|
|
948
808
|
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
@@ -951,156 +811,161 @@ export default {
|
|
|
951
811
|
// stsToken: '<Your securityToken(STS)>',
|
|
952
812
|
bucket: "guoranopen-zjk",
|
|
953
813
|
},
|
|
954
|
-
hideUploadEdit:false,
|
|
955
|
-
limitNum:1,
|
|
956
|
-
refShowPicker:false,
|
|
957
|
-
refTemplateList:{},
|
|
958
|
-
refList:{},
|
|
959
|
-
dataQuery:{},
|
|
960
|
-
refNextPage:{},
|
|
961
|
-
drawer:false,
|
|
962
|
-
detailField:{
|
|
963
|
-
formField:{}
|
|
814
|
+
hideUploadEdit: false,
|
|
815
|
+
limitNum: 1,
|
|
816
|
+
refShowPicker: false,
|
|
817
|
+
refTemplateList: {},
|
|
818
|
+
refList: {},
|
|
819
|
+
dataQuery: {},
|
|
820
|
+
refNextPage: {},
|
|
821
|
+
drawer: false,
|
|
822
|
+
detailField: {
|
|
823
|
+
formField: {}
|
|
964
824
|
},
|
|
965
|
-
extInfoFieldValue:{},
|
|
966
|
-
selectPopUp:false,
|
|
967
|
-
options:[],
|
|
968
|
-
defaultValue:[],
|
|
969
|
-
timeDetailData:{},
|
|
970
|
-
selectDetail:{},
|
|
971
|
-
refDefaultValue:{},
|
|
972
|
-
selectOptionWidth:null,
|
|
973
|
-
fieldValue:{},
|
|
974
|
-
optionsList:{},
|
|
975
|
-
currentEditor:null,
|
|
976
|
-
workOrderDes:"",
|
|
977
|
-
workOrderDestail:null,
|
|
978
|
-
associatedControlsCopy:[],
|
|
979
|
-
attachments:[],
|
|
980
|
-
attachmentList:[],
|
|
981
|
-
uploadImgQueue:false,
|
|
982
|
-
isBaiLi:false,
|
|
983
|
-
listenTimer:null,
|
|
825
|
+
extInfoFieldValue: {},
|
|
826
|
+
selectPopUp: false,
|
|
827
|
+
options: [],
|
|
828
|
+
defaultValue: [],
|
|
829
|
+
timeDetailData: {},
|
|
830
|
+
selectDetail: {},
|
|
831
|
+
refDefaultValue: {},
|
|
832
|
+
selectOptionWidth: null,
|
|
833
|
+
fieldValue: {},
|
|
834
|
+
optionsList: {},
|
|
835
|
+
currentEditor: null,
|
|
836
|
+
workOrderDes: "",
|
|
837
|
+
workOrderDestail: null,
|
|
838
|
+
associatedControlsCopy: [],
|
|
839
|
+
attachments: [],
|
|
840
|
+
attachmentList: [],
|
|
841
|
+
uploadImgQueue: false,
|
|
842
|
+
isBaiLi: false,
|
|
843
|
+
listenTimer: null,
|
|
844
|
+
webHookCascader:false
|
|
984
845
|
}
|
|
985
846
|
},
|
|
986
847
|
props: {
|
|
987
848
|
formList: {
|
|
988
849
|
type: Object,
|
|
989
|
-
default() {
|
|
850
|
+
default () {
|
|
990
851
|
return {}
|
|
991
852
|
}
|
|
992
853
|
},
|
|
993
|
-
type:String,
|
|
994
|
-
disable:Boolean,
|
|
995
|
-
submit:Boolean,
|
|
996
|
-
usePropStyleType:{
|
|
997
|
-
type:Boolean,
|
|
998
|
-
default() {
|
|
854
|
+
type: String,
|
|
855
|
+
disable: Boolean,
|
|
856
|
+
submit: Boolean,
|
|
857
|
+
usePropStyleType: {
|
|
858
|
+
type: Boolean,
|
|
859
|
+
default () {
|
|
999
860
|
return false;
|
|
1000
861
|
}
|
|
1001
862
|
},
|
|
1002
863
|
propIsPhone: {
|
|
1003
|
-
type:Boolean,
|
|
1004
|
-
default() {
|
|
864
|
+
type: Boolean,
|
|
865
|
+
default () {
|
|
1005
866
|
return false;
|
|
1006
867
|
}
|
|
1007
868
|
},
|
|
1008
869
|
propIsCompany: {
|
|
1009
|
-
type:Boolean,
|
|
1010
|
-
default() {
|
|
870
|
+
type: Boolean,
|
|
871
|
+
default () {
|
|
1011
872
|
return false;
|
|
1012
873
|
}
|
|
1013
874
|
},
|
|
1014
875
|
uploadUrl: {
|
|
1015
|
-
type:String,
|
|
1016
|
-
default(){
|
|
876
|
+
type: String,
|
|
877
|
+
default () {
|
|
1017
878
|
return '/open/media/file/upload'
|
|
1018
879
|
}
|
|
1019
880
|
},
|
|
1020
|
-
mainId:{
|
|
1021
|
-
type:String,
|
|
1022
|
-
default(){
|
|
881
|
+
mainId: {
|
|
882
|
+
type: String,
|
|
883
|
+
default () {
|
|
1023
884
|
return ""
|
|
1024
885
|
}
|
|
886
|
+
},
|
|
887
|
+
language:{
|
|
888
|
+
type:String,
|
|
889
|
+
default:"cn"
|
|
1025
890
|
}
|
|
1026
891
|
},
|
|
1027
|
-
computed:{
|
|
1028
|
-
acceptType:function () {
|
|
892
|
+
computed: {
|
|
893
|
+
acceptType: function () {
|
|
1029
894
|
return '.jpg,.jpeg,.png,.gif,.JPG,.JPEG,.PBG,.GIF'
|
|
1030
895
|
},
|
|
1031
|
-
formFieldRelation:function () {
|
|
896
|
+
formFieldRelation: function () {
|
|
1032
897
|
let arr = [];
|
|
1033
898
|
let formList = []
|
|
1034
899
|
formList = this.formShow.form && this.formShow.form.formFieldRelation
|
|
1035
|
-
formList.forEach(item=> {
|
|
1036
|
-
if (item.fieldId !=='workorder_name' && item.display && item.formField.type!=='CHAT_RECORD' && item.formField.type!=='CHANNEL') {
|
|
900
|
+
formList.forEach(item => {
|
|
901
|
+
if (item.fieldId !== 'workorder_name' && item.display && item.formField.type !== 'CHAT_RECORD' && item.formField.type !== 'CHANNEL') {
|
|
1037
902
|
arr.push(item);
|
|
1038
903
|
}
|
|
1039
904
|
})
|
|
1040
|
-
arr.forEach(item=>{
|
|
1041
|
-
if (item.value && item.value.length){
|
|
1042
|
-
this.$set(this.fieldValue,item.fieldId,item.value)
|
|
905
|
+
arr.forEach(item => {
|
|
906
|
+
if (item.value && item.value.length) {
|
|
907
|
+
this.$set(this.fieldValue, item.fieldId, item.value)
|
|
1043
908
|
}
|
|
1044
|
-
if(item.formField.type === 'CHECKBOX'){
|
|
1045
|
-
if(!item.value){
|
|
909
|
+
if (item.formField.type === 'CHECKBOX') {
|
|
910
|
+
if (!item.value) {
|
|
1046
911
|
item.value = []
|
|
1047
912
|
}
|
|
1048
|
-
if(item.formField.defaultValue && (!item.value || !item.value.length)){
|
|
913
|
+
if (item.formField.defaultValue && (!item.value || !item.value.length)) {
|
|
1049
914
|
item.value = item.formField.defaultValue
|
|
1050
915
|
}
|
|
1051
916
|
}
|
|
1052
|
-
if (item.fieldId==='workorder_description'){
|
|
917
|
+
if (item.fieldId === 'workorder_description') {
|
|
1053
918
|
this.workOrderDes = item.value;
|
|
1054
919
|
this.workOrderDestail = item;
|
|
1055
|
-
console.debug('workorder_description',item)
|
|
920
|
+
console.debug('workorder_description', item)
|
|
1056
921
|
}
|
|
1057
922
|
})
|
|
1058
|
-
let newArr = arr.filter(item=>item.relationDisplay)
|
|
923
|
+
let newArr = arr.filter(item => item.relationDisplay)
|
|
1059
924
|
return newArr;
|
|
1060
925
|
},
|
|
1061
|
-
acceptFieldType(){
|
|
1062
|
-
return (type)=>{
|
|
1063
|
-
if (type == 'FILE'){
|
|
926
|
+
acceptFieldType () {
|
|
927
|
+
return (type) => {
|
|
928
|
+
if (type == 'FILE') {
|
|
1064
929
|
return 'image/*'
|
|
1065
|
-
} else if(
|
|
930
|
+
} else if (type == 'IMAGE') {
|
|
1066
931
|
return 'image/*'
|
|
1067
|
-
} else if(type == 'VIDEO') {
|
|
932
|
+
} else if (type == 'VIDEO') {
|
|
1068
933
|
return 'video/*'
|
|
1069
934
|
} else {
|
|
1070
935
|
return '*'
|
|
1071
936
|
}
|
|
1072
937
|
}
|
|
1073
938
|
},
|
|
1074
|
-
isRequiredFn(){
|
|
1075
|
-
return function(field) {
|
|
1076
|
-
return this.relationSet(field,'requiredDependentFieldId')
|
|
939
|
+
isRequiredFn () {
|
|
940
|
+
return function (field) {
|
|
941
|
+
return this.relationSet(field, 'requiredDependentFieldId')
|
|
1077
942
|
}
|
|
1078
943
|
},
|
|
1079
|
-
optionsLists() {
|
|
944
|
+
optionsLists () {
|
|
1080
945
|
return function (field) {
|
|
1081
946
|
let options = {}
|
|
1082
947
|
let newOptions = {}
|
|
1083
948
|
let flag = false;
|
|
1084
|
-
if (!field.formField.extInfo){
|
|
949
|
+
if (!field.formField.extInfo) {
|
|
1085
950
|
newOptions[field.fieldId] = []
|
|
1086
951
|
}
|
|
1087
952
|
else {
|
|
1088
|
-
if (field.formField.extInfo.dependent&&JSON.stringify(field.formField.extInfo.dependent)!=='{}'){
|
|
1089
|
-
for (let k in field.formField.extInfo.dependent){
|
|
1090
|
-
if (Array.isArray(this.fieldValue[k]) && Array.isArray(this.fieldValue[k][0])){
|
|
1091
|
-
this.fieldValue[k].forEach(item=>{
|
|
1092
|
-
field.formField.extInfo.dependent[k].filterStruct.forEach(filter=>{
|
|
1093
|
-
if (Array.isArray(item)){
|
|
1094
|
-
if (filter.input === item[item.length - 1]){
|
|
1095
|
-
if (!options[field.fieldId]){
|
|
953
|
+
if (field.formField.extInfo.dependent && JSON.stringify(field.formField.extInfo.dependent) !== '{}') {
|
|
954
|
+
for (let k in field.formField.extInfo.dependent) {
|
|
955
|
+
if (Array.isArray(this.fieldValue[k]) && Array.isArray(this.fieldValue[k][0])) {
|
|
956
|
+
this.fieldValue[k].forEach(item => {
|
|
957
|
+
field.formField.extInfo.dependent[k].filterStruct.forEach(filter => {
|
|
958
|
+
if (Array.isArray(item)) {
|
|
959
|
+
if (filter.input === item[item.length - 1]) {
|
|
960
|
+
if (!options[field.fieldId]) {
|
|
1096
961
|
options[field.fieldId] = []
|
|
1097
962
|
}
|
|
1098
963
|
options[field.fieldId] = options[field.fieldId].concat(filter.output)
|
|
1099
964
|
flag = true
|
|
1100
965
|
}
|
|
1101
966
|
} else {
|
|
1102
|
-
if (filter.input === item){
|
|
1103
|
-
if (!options[field.fieldId]){
|
|
967
|
+
if (filter.input === item) {
|
|
968
|
+
if (!options[field.fieldId]) {
|
|
1104
969
|
options[field.fieldId] = []
|
|
1105
970
|
}
|
|
1106
971
|
options[field.fieldId] = options[field.fieldId].concat(filter.output)
|
|
@@ -1111,8 +976,8 @@ export default {
|
|
|
1111
976
|
})
|
|
1112
977
|
}
|
|
1113
978
|
else {
|
|
1114
|
-
field.formField.extInfo.dependent[k].filterStruct.forEach(filter=>{
|
|
1115
|
-
if (this.fieldValue[k] && (filter.input === this.fieldValue[k] || this.fieldValue[k][this.fieldValue[k].length - 1] == filter.input)){
|
|
979
|
+
field.formField.extInfo.dependent[k].filterStruct.forEach(filter => {
|
|
980
|
+
if (this.fieldValue[k] && (filter.input === this.fieldValue[k] || this.fieldValue[k][this.fieldValue[k].length - 1] == filter.input)) {
|
|
1116
981
|
options[field.fieldId] = filter.output;
|
|
1117
982
|
flag = true
|
|
1118
983
|
}
|
|
@@ -1120,22 +985,22 @@ export default {
|
|
|
1120
985
|
}
|
|
1121
986
|
}
|
|
1122
987
|
}
|
|
1123
|
-
if (field.formField.extInfo.selfDependent && JSON.stringify(field.formField.extInfo.selfDependent)!=='{}'){
|
|
1124
|
-
if (flag){
|
|
1125
|
-
for (let k in field.formField.extInfo.selfDependent){
|
|
1126
|
-
if (Array.isArray(this.fieldValue[k]) && Array.isArray(this.fieldValue[k][0])){
|
|
1127
|
-
this.fieldValue[k].forEach(item=>{
|
|
1128
|
-
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter=>{
|
|
1129
|
-
if (Array.isArray(item)){
|
|
1130
|
-
if (filter.input === item[item.length - 1]){
|
|
1131
|
-
if (!options[field.fieldId]){
|
|
988
|
+
if (field.formField.extInfo.selfDependent && JSON.stringify(field.formField.extInfo.selfDependent) !== '{}') {
|
|
989
|
+
if (flag) {
|
|
990
|
+
for (let k in field.formField.extInfo.selfDependent) {
|
|
991
|
+
if (Array.isArray(this.fieldValue[k]) && Array.isArray(this.fieldValue[k][0])) {
|
|
992
|
+
this.fieldValue[k].forEach(item => {
|
|
993
|
+
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter => {
|
|
994
|
+
if (Array.isArray(item)) {
|
|
995
|
+
if (filter.input === item[item.length - 1]) {
|
|
996
|
+
if (!options[field.fieldId]) {
|
|
1132
997
|
options[field.fieldId] = []
|
|
1133
998
|
}
|
|
1134
999
|
options[field.fieldId] = options[field.fieldId].concat(filter.output)
|
|
1135
1000
|
}
|
|
1136
1001
|
} else {
|
|
1137
|
-
if (filter.input === item){
|
|
1138
|
-
if (!options[field.fieldId]){
|
|
1002
|
+
if (filter.input === item) {
|
|
1003
|
+
if (!options[field.fieldId]) {
|
|
1139
1004
|
options[field.fieldId] = []
|
|
1140
1005
|
}
|
|
1141
1006
|
options[field.fieldId] = options[field.fieldId].concat(filter.output)
|
|
@@ -1145,8 +1010,8 @@ export default {
|
|
|
1145
1010
|
})
|
|
1146
1011
|
}
|
|
1147
1012
|
else {
|
|
1148
|
-
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter=>{
|
|
1149
|
-
if (this.fieldValue[k] && (filter.input === this.fieldValue[k] || this.fieldValue[k][this.fieldValue[k].length - 1] == filter.input)){
|
|
1013
|
+
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter => {
|
|
1014
|
+
if (this.fieldValue[k] && (filter.input === this.fieldValue[k] || this.fieldValue[k][this.fieldValue[k].length - 1] == filter.input)) {
|
|
1150
1015
|
options[field.fieldId] = options[field.fieldId].concat(filter.output);
|
|
1151
1016
|
}
|
|
1152
1017
|
})
|
|
@@ -1154,15 +1019,15 @@ export default {
|
|
|
1154
1019
|
}
|
|
1155
1020
|
}
|
|
1156
1021
|
else {
|
|
1157
|
-
for (let k in field.formField.extInfo.selfDependent){
|
|
1158
|
-
if (!this.fieldValue[k]){
|
|
1022
|
+
for (let k in field.formField.extInfo.selfDependent) {
|
|
1023
|
+
if (!this.fieldValue[k]) {
|
|
1159
1024
|
options[field.fieldId] = field.formField.extInfo.options
|
|
1160
1025
|
}
|
|
1161
|
-
else if (Array.isArray(this.fieldValue[k])){
|
|
1162
|
-
this.fieldValue[k].forEach(item=>{
|
|
1163
|
-
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter=>{
|
|
1164
|
-
if (filter.input === item){
|
|
1165
|
-
if (!options[field.fieldId]){
|
|
1026
|
+
else if (Array.isArray(this.fieldValue[k])) {
|
|
1027
|
+
this.fieldValue[k].forEach(item => {
|
|
1028
|
+
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter => {
|
|
1029
|
+
if (filter.input === item) {
|
|
1030
|
+
if (!options[field.fieldId]) {
|
|
1166
1031
|
options[field.fieldId] = []
|
|
1167
1032
|
}
|
|
1168
1033
|
options[field.fieldId] = options[field.fieldId].concat(filter.output)
|
|
@@ -1171,8 +1036,8 @@ export default {
|
|
|
1171
1036
|
})
|
|
1172
1037
|
}
|
|
1173
1038
|
else {
|
|
1174
|
-
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter=>{
|
|
1175
|
-
if (filter.input === this.fieldValue[k]){
|
|
1039
|
+
field.formField.extInfo.selfDependent[k].filterStruct.forEach(filter => {
|
|
1040
|
+
if (filter.input === this.fieldValue[k]) {
|
|
1176
1041
|
options[field.fieldId] = filter.output;
|
|
1177
1042
|
}
|
|
1178
1043
|
})
|
|
@@ -1181,7 +1046,7 @@ export default {
|
|
|
1181
1046
|
}
|
|
1182
1047
|
|
|
1183
1048
|
}
|
|
1184
|
-
if (!field.formField.extInfo.dependent || (field.formField.extInfo.dependent && !Object.keys(field.formField.extInfo.dependent).length) || (field.formField.extInfo.selfDependent && !Object.keys(field.formField.extInfo.selfDependent).length)){
|
|
1049
|
+
if (!field.formField.extInfo.dependent || (field.formField.extInfo.dependent && !Object.keys(field.formField.extInfo.dependent).length) || (field.formField.extInfo.selfDependent && !Object.keys(field.formField.extInfo.selfDependent).length)) {
|
|
1185
1050
|
options[field.fieldId] = field.formField.extInfo.options ? field.formField.extInfo.options : (field.formField.extInfo.option ? field.formField.extInfo.option : [])
|
|
1186
1051
|
}
|
|
1187
1052
|
}
|
|
@@ -1190,15 +1055,15 @@ export default {
|
|
|
1190
1055
|
}
|
|
1191
1056
|
},
|
|
1192
1057
|
},
|
|
1193
|
-
components:{
|
|
1058
|
+
components: {
|
|
1194
1059
|
myPopup,
|
|
1195
1060
|
Tree,
|
|
1196
1061
|
selectPopup,
|
|
1197
1062
|
fileListView,
|
|
1198
1063
|
MyEditor
|
|
1199
1064
|
},
|
|
1200
|
-
mounted() {
|
|
1201
|
-
|
|
1065
|
+
mounted () {
|
|
1066
|
+
|
|
1202
1067
|
// if (this.formList.form.formFieldRelation && this.formList.form.formFieldRelation.length > 0) {
|
|
1203
1068
|
// this.formList.form.formFieldRelation.forEach(item => {
|
|
1204
1069
|
// if (item.formField.type === "TIME_PICKER") {
|
|
@@ -1218,40 +1083,38 @@ export default {
|
|
|
1218
1083
|
// this.ckeditor.editorConfig.toolbar = []
|
|
1219
1084
|
|
|
1220
1085
|
// }
|
|
1221
|
-
if (this.mainId == '90df4764122240de939331d372546c28'){
|
|
1086
|
+
if (this.mainId == '90df4764122240de939331d372546c28') {
|
|
1222
1087
|
this.isBaiLi = true;
|
|
1223
1088
|
}
|
|
1224
1089
|
this.isMobile()
|
|
1225
1090
|
/* 取值extInfo值的时候需要注意,extInfo有可能存在null的情况 */
|
|
1226
1091
|
},
|
|
1227
|
-
beforeCreate() {
|
|
1092
|
+
beforeCreate () {
|
|
1228
1093
|
// 等待dom渲染完毕之后,再去显示 三级联动。
|
|
1229
|
-
that=this
|
|
1094
|
+
that = this
|
|
1230
1095
|
this.$nextTick(function () {
|
|
1231
1096
|
this.pageShow = true;
|
|
1232
1097
|
})
|
|
1233
1098
|
},
|
|
1234
|
-
created() {
|
|
1235
|
-
if(this.disable)
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
{
|
|
1240
|
-
this.disableds=false
|
|
1099
|
+
created () {
|
|
1100
|
+
if (this.disable) {
|
|
1101
|
+
this.disableds = true
|
|
1102
|
+
} else {
|
|
1103
|
+
this.disableds = false
|
|
1241
1104
|
}
|
|
1242
|
-
this.submitValue = this.submit ? '
|
|
1105
|
+
this.submitValue = this.submit ? this.$t('common.submited') : this.$t('common.submit')
|
|
1243
1106
|
},
|
|
1244
|
-
beforeMount() {
|
|
1107
|
+
beforeMount () {
|
|
1245
1108
|
that.defaultClick()
|
|
1246
1109
|
},
|
|
1247
1110
|
methods: {
|
|
1248
|
-
showSelectText(option, itemValue){
|
|
1111
|
+
showSelectText (option, itemValue) {
|
|
1249
1112
|
let text = "";
|
|
1250
|
-
if(Array.isArray(itemValue)){
|
|
1113
|
+
if (Array.isArray(itemValue)) {
|
|
1251
1114
|
itemValue.forEach((cell, cellIndex) => {
|
|
1252
1115
|
option.forEach(item => {
|
|
1253
|
-
if(item.value == cell) {
|
|
1254
|
-
if(cellIndex !== 0){
|
|
1116
|
+
if (item.value == cell) {
|
|
1117
|
+
if (cellIndex !== 0) {
|
|
1255
1118
|
text = text + ',' + item.label;
|
|
1256
1119
|
} else {
|
|
1257
1120
|
text = item.label;
|
|
@@ -1259,91 +1122,91 @@ export default {
|
|
|
1259
1122
|
}
|
|
1260
1123
|
})
|
|
1261
1124
|
})
|
|
1262
|
-
|
|
1125
|
+
|
|
1263
1126
|
} else {
|
|
1264
1127
|
option.forEach(item => {
|
|
1265
|
-
if(item.value == itemValue) {
|
|
1128
|
+
if (item.value == itemValue) {
|
|
1266
1129
|
text = item.label;
|
|
1267
1130
|
}
|
|
1268
1131
|
})
|
|
1269
1132
|
}
|
|
1270
1133
|
return text;
|
|
1271
1134
|
},
|
|
1272
|
-
listenField(){
|
|
1135
|
+
listenField () {
|
|
1273
1136
|
clearTimeout(this.listenTimer);
|
|
1274
1137
|
this.listenTimer = null;
|
|
1275
1138
|
this.listenTimer = setTimeout(() => {
|
|
1276
|
-
this.$emit('listenField',this.formList.formActionId);
|
|
1277
|
-
},500)
|
|
1139
|
+
this.$emit('listenField', this.formList.formActionId);
|
|
1140
|
+
}, 500)
|
|
1278
1141
|
},
|
|
1279
|
-
setFileDefault(option){
|
|
1280
|
-
if (this.formShow.form.formFieldRelation){
|
|
1281
|
-
this.formShow.form.formFieldRelation.forEach(item=>{
|
|
1142
|
+
setFileDefault (option) {
|
|
1143
|
+
if (this.formShow.form.formFieldRelation) {
|
|
1144
|
+
this.formShow.form.formFieldRelation.forEach(item => {
|
|
1282
1145
|
for (const key in option.setDefaultFieldId) {
|
|
1283
|
-
if (item.fieldId === key && item.relationDisplay){
|
|
1284
|
-
if (option.setDefaultFieldId[key].fieldValue){
|
|
1285
|
-
if (item.fieldId === 'workorder_description'){
|
|
1146
|
+
if (item.fieldId === key && item.relationDisplay) {
|
|
1147
|
+
if (option.setDefaultFieldId[key].fieldValue) {
|
|
1148
|
+
if (item.fieldId === 'workorder_description') {
|
|
1286
1149
|
this.workOrderDestail.value = option.setDefaultFieldId[key].fieldValue
|
|
1287
1150
|
} else {
|
|
1288
1151
|
let val = option.setDefaultFieldId[key].fieldValue
|
|
1289
|
-
this.$set(item,'value',val)
|
|
1290
|
-
if(option.setDefaultFieldId[key].extInfoFieldValue) {
|
|
1291
|
-
this.$set(this.extInfoFieldValue,key,option.setDefaultFieldId[key].extInfoFieldValue)
|
|
1152
|
+
this.$set(item, 'value', val)
|
|
1153
|
+
if (option.setDefaultFieldId[key].extInfoFieldValue) {
|
|
1154
|
+
this.$set(this.extInfoFieldValue, key, option.setDefaultFieldId[key].extInfoFieldValue)
|
|
1292
1155
|
}
|
|
1293
|
-
else if (!option.setDefaultFieldId[key].extInfoFieldValue){
|
|
1294
|
-
this.$set(this.extInfoFieldValue,key,val)
|
|
1156
|
+
else if (!option.setDefaultFieldId[key].extInfoFieldValue) {
|
|
1157
|
+
this.$set(this.extInfoFieldValue, key, val)
|
|
1295
1158
|
}
|
|
1296
1159
|
}
|
|
1297
1160
|
|
|
1298
1161
|
}
|
|
1299
1162
|
}
|
|
1300
|
-
if (item.fieldId === key && !item.relationDisplay){
|
|
1301
|
-
let val = item.formField.type === 'CHECKBOX' ? [] :''
|
|
1302
|
-
this.$set(item,'value',val)
|
|
1303
|
-
this.$set(this.extInfoFieldValue,key,val)
|
|
1163
|
+
if (item.fieldId === key && !item.relationDisplay) {
|
|
1164
|
+
let val = item.formField.type === 'CHECKBOX' ? [] : ''
|
|
1165
|
+
this.$set(item, 'value', val)
|
|
1166
|
+
this.$set(this.extInfoFieldValue, key, val)
|
|
1304
1167
|
}
|
|
1305
1168
|
}
|
|
1306
1169
|
})
|
|
1307
1170
|
}
|
|
1308
1171
|
|
|
1309
1172
|
},
|
|
1310
|
-
fieldSetting(){
|
|
1311
|
-
this.formShow.form.formFieldRelation.forEach(item=>{
|
|
1173
|
+
fieldSetting () {
|
|
1174
|
+
this.formShow.form.formFieldRelation.forEach(item => {
|
|
1312
1175
|
let itemType = item.relationDisplay
|
|
1313
|
-
this.$set(item,'relationDisplay',this.relationSet(item.formField,'dependentFieldId'))
|
|
1314
|
-
if (item.relationDisplay && this.fieldValue[item.fieldId] && itemType !== item.relationDisplay){
|
|
1315
|
-
item.value =
|
|
1316
|
-
if (item.formField.type === 'CASCADER'){
|
|
1317
|
-
this.extInfoFieldValue[item.fieldId] = item.formField.extInfo.fieldValue?item.formField.extInfo.fieldValue:null
|
|
1176
|
+
this.$set(item, 'relationDisplay', this.relationSet(item.formField, 'dependentFieldId'))
|
|
1177
|
+
if (item.relationDisplay && this.fieldValue[item.fieldId] && itemType !== item.relationDisplay) {
|
|
1178
|
+
item.value = JSON.parse(JSON.stringify(this.fieldValue[item.fieldId]));
|
|
1179
|
+
if (item.formField.type === 'CASCADER' && !item.formField.extInfo.WebHookParameter) {
|
|
1180
|
+
this.extInfoFieldValue[item.fieldId] = item.formField.extInfo.fieldValue ? item.formField.extInfo.fieldValue : null
|
|
1318
1181
|
}
|
|
1319
1182
|
else {
|
|
1320
1183
|
this.extInfoFieldValue[item.fieldId] = this.extInfoFieldValue[item.fieldId];
|
|
1321
1184
|
}
|
|
1322
1185
|
}
|
|
1323
|
-
if (!item.relationDisplay){
|
|
1324
|
-
if(item.formField.type === 'CHECKBOX'){
|
|
1186
|
+
if (!item.relationDisplay) {
|
|
1187
|
+
if (item.formField.type === 'CHECKBOX') {
|
|
1325
1188
|
item.value = []
|
|
1326
1189
|
}
|
|
1327
1190
|
else {
|
|
1328
1191
|
item.value = ""
|
|
1329
1192
|
}
|
|
1330
|
-
this.$set(this.extInfoFieldValue, item.fieldId
|
|
1331
|
-
this.$set(this.selectValues, item.fieldId
|
|
1193
|
+
this.$set(this.extInfoFieldValue, item.fieldId, [])
|
|
1194
|
+
this.$set(this.selectValues, item.fieldId, [])
|
|
1332
1195
|
// this.$set(this.extInfoFieldValue, item.fieldId , [])
|
|
1333
1196
|
// this.extInfoFieldValue[item.fieldId] = []
|
|
1334
1197
|
// this.selectValues[item.fieldId] = []
|
|
1335
1198
|
// this.extInfoFieldValue[item.fieldId] = []
|
|
1336
|
-
if (item.formField.extInfo.extInfoFieldValue){
|
|
1199
|
+
if (item.formField.extInfo.extInfoFieldValue) {
|
|
1337
1200
|
item.formField.extInfo.extInfoFieldValue = ''
|
|
1338
|
-
this.$set(item.formField.extInfo, 'extInfoFieldValue'
|
|
1201
|
+
this.$set(item.formField.extInfo, 'extInfoFieldValue', '')
|
|
1339
1202
|
}
|
|
1340
1203
|
}
|
|
1341
|
-
if(this.fieldValue[item.fieldId] && !this.associatedControlsCopy.includes(item.fieldId) && (item.formField.extInfo.selectType == '单选' || item.formField.type == 'RADIO')) {
|
|
1204
|
+
if (this.fieldValue[item.fieldId] && !this.associatedControlsCopy.includes(item.fieldId) && (item.formField.extInfo.selectType == '单选' || item.formField.type == 'RADIO')) {
|
|
1342
1205
|
let option = null
|
|
1343
|
-
if(item.formField.extInfo.options) {
|
|
1344
|
-
option = item.formField.extInfo.options.find(ele => { return ele.value == this.fieldValue[item.fieldId]})
|
|
1206
|
+
if (item.formField.extInfo.options) {
|
|
1207
|
+
option = item.formField.extInfo.options.find(ele => { return ele.value == this.fieldValue[item.fieldId] })
|
|
1345
1208
|
} else if (item.formField.extInfo.cascadeDown) {
|
|
1346
|
-
option = this.serchCascaderOption(item.formField.extInfo.cascadeDown.options,item)
|
|
1209
|
+
option = this.serchCascaderOption(item.formField.extInfo.cascadeDown.options, item)
|
|
1347
1210
|
/*item.formField.extInfo.cascadeDown.options.forEach(ele => {
|
|
1348
1211
|
if(this.fieldValue[item.fieldId] && this.fieldValue[item.fieldId].length != 0 && ele.value == this.fieldValue[item.fieldId][this.fieldValue[item.fieldId].length - 1]) {
|
|
1349
1212
|
option = ele
|
|
@@ -1362,47 +1225,47 @@ export default {
|
|
|
1362
1225
|
} else {
|
|
1363
1226
|
option = this.extInfoFieldValue[item.fieldId] && this.extInfoFieldValue[item.fieldId][0]
|
|
1364
1227
|
}
|
|
1365
|
-
console.debug('setFileDefault',option)
|
|
1366
|
-
if(option && option.setDefaultFieldId) {
|
|
1367
|
-
this.setFileDefault(option,item.formField)
|
|
1228
|
+
console.debug('setFileDefault', option)
|
|
1229
|
+
if (option && option.setDefaultFieldId) {
|
|
1230
|
+
this.setFileDefault(option, item.formField)
|
|
1368
1231
|
}
|
|
1369
1232
|
}
|
|
1370
1233
|
})
|
|
1371
1234
|
},
|
|
1372
1235
|
// 查找当前节点下与之值符合的字段
|
|
1373
|
-
serchCascaderOption(options, items) {
|
|
1236
|
+
serchCascaderOption (options, items) {
|
|
1374
1237
|
let opt = null;
|
|
1375
1238
|
for (let index = 0; index < options.length; index++) {
|
|
1376
1239
|
const row = options[index];
|
|
1377
|
-
if(this.fieldValue[items.fieldId] &&
|
|
1378
|
-
|
|
1379
|
-
|
|
1240
|
+
if (this.fieldValue[items.fieldId] &&
|
|
1241
|
+
this.fieldValue[items.fieldId].length != 0 &&
|
|
1242
|
+
row.value == this.fieldValue[items.fieldId][this.fieldValue[items.fieldId].length - 1]
|
|
1380
1243
|
) {
|
|
1381
|
-
console.debug('opt',row,options[index])
|
|
1244
|
+
console.debug('opt', row, options[index])
|
|
1382
1245
|
opt = row
|
|
1383
1246
|
}
|
|
1384
|
-
if(!opt && row.children) {
|
|
1247
|
+
if (!opt && row.children) {
|
|
1385
1248
|
opt = this.serchCascaderOption(row.children, items)
|
|
1386
1249
|
}
|
|
1387
1250
|
}
|
|
1388
1251
|
return opt
|
|
1389
1252
|
},
|
|
1390
1253
|
// 清除当前节点关联的值
|
|
1391
|
-
clearOptionStruct() {
|
|
1254
|
+
clearOptionStruct () {
|
|
1392
1255
|
// this.fieldValue,this.cascadeDetail.field.id
|
|
1393
|
-
console.log(this.detailField,'this.cascadeDetail',this.fieldValue[this.detailField.fieldId]);
|
|
1256
|
+
console.log(this.detailField, 'this.cascadeDetail', this.fieldValue[this.detailField.fieldId]);
|
|
1394
1257
|
let options = [];
|
|
1395
|
-
if (this.detailField.formField.extInfo.cascadeDown && this.detailField.formField.extInfo.cascadeDown.options){
|
|
1258
|
+
if (this.detailField.formField.extInfo.cascadeDown && this.detailField.formField.extInfo.cascadeDown.options) {
|
|
1396
1259
|
options = this.detailField.formField.extInfo.cascadeDown.options
|
|
1397
|
-
} else if (this.detailField.formField.extInfo.cascade){
|
|
1260
|
+
} else if (this.detailField.formField.extInfo.cascade) {
|
|
1398
1261
|
options = this.detailField.formField.extInfo.cascade
|
|
1399
|
-
} else if (this.detailField.formField.extInfo.cascadeDown && this.detailField.formField.extInfo.cascadeDown[0]){
|
|
1262
|
+
} else if (this.detailField.formField.extInfo.cascadeDown && this.detailField.formField.extInfo.cascadeDown[0]) {
|
|
1400
1263
|
options = this.detailField.formField.extInfo.cascadeDown[0].options
|
|
1401
1264
|
}
|
|
1402
1265
|
let clear = (options, parent) => {
|
|
1403
1266
|
for (let index = 0; index < options.length; index++) {
|
|
1404
1267
|
const opt = options[index];
|
|
1405
|
-
if (this.fieldValue[this.detailField.fieldId]){
|
|
1268
|
+
if (this.fieldValue[this.detailField.fieldId]) {
|
|
1406
1269
|
for (let i = 0; i < this.fieldValue[this.detailField.fieldId].length; i++) {
|
|
1407
1270
|
const value = this.fieldValue[this.detailField.fieldId][i];
|
|
1408
1271
|
if (Array.isArray(value)) {
|
|
@@ -1430,31 +1293,31 @@ export default {
|
|
|
1430
1293
|
}
|
|
1431
1294
|
}
|
|
1432
1295
|
}
|
|
1433
|
-
if(opt.children && opt.children.length != 0) {
|
|
1296
|
+
if (opt.children && opt.children.length != 0) {
|
|
1434
1297
|
clear(opt.children)
|
|
1435
1298
|
}
|
|
1436
1299
|
}
|
|
1437
1300
|
}
|
|
1438
1301
|
clear(options)
|
|
1439
1302
|
},
|
|
1440
|
-
changeSelect(field){
|
|
1441
|
-
if (
|
|
1442
|
-
let arr
|
|
1303
|
+
changeSelect (field) {
|
|
1304
|
+
if (field.formField.extInfo.selectType !== '多选') {
|
|
1305
|
+
let arr = field.formField.extInfo.relationControlsId ? JSON.parse(JSON.stringify(field.formField.extInfo.relationControlsId)) : []
|
|
1443
1306
|
this.associatedControlsCopy = [...this.associatedControlsCopy, ...arr];
|
|
1444
1307
|
}
|
|
1445
1308
|
this.$forceUpdate();
|
|
1446
|
-
this.$set(this.fieldValue,field.fieldId,field.value);
|
|
1447
|
-
this.formShow.form.formFieldRelation.forEach(item=>{
|
|
1309
|
+
this.$set(this.fieldValue, field.fieldId, field.value);
|
|
1310
|
+
this.formShow.form.formFieldRelation.forEach(item => {
|
|
1448
1311
|
if (item.formField.type === 'CASCADER' ||
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
if (item.formField.extInfo && item.formField.extInfo.dependent){
|
|
1453
|
-
for (let k in item.formField.extInfo.dependent){
|
|
1454
|
-
if (k === field.fieldId && field.value !== item.formField.extInfo.dependent[k].input){
|
|
1312
|
+
item.formField.type === 'SELECT' ||
|
|
1313
|
+
item.formField.type === 'RADIO' ||
|
|
1314
|
+
item.formField.type === 'CHECKBOX') {
|
|
1315
|
+
if (item.formField.extInfo && item.formField.extInfo.dependent) {
|
|
1316
|
+
for (let k in item.formField.extInfo.dependent) {
|
|
1317
|
+
if (k === field.fieldId && field.value !== item.formField.extInfo.dependent[k].input) {
|
|
1455
1318
|
item.value = item.formField.type === 'CHECKBOX' || item.formField.type === 'CASCADER' ? [] : "";
|
|
1456
|
-
if (this.extInfoFieldValue[item.fieldId]){
|
|
1457
|
-
this.$set(this.extInfoFieldValue,item.fieldId,[])
|
|
1319
|
+
if (this.extInfoFieldValue[item.fieldId]) {
|
|
1320
|
+
this.$set(this.extInfoFieldValue, item.fieldId, [])
|
|
1458
1321
|
}
|
|
1459
1322
|
}
|
|
1460
1323
|
}
|
|
@@ -1462,136 +1325,136 @@ export default {
|
|
|
1462
1325
|
}
|
|
1463
1326
|
})
|
|
1464
1327
|
},
|
|
1465
|
-
selectOptions(field){
|
|
1328
|
+
selectOptions (field) {
|
|
1466
1329
|
let options = []
|
|
1467
|
-
if (!field.extInfo){
|
|
1330
|
+
if (!field.extInfo) {
|
|
1468
1331
|
return []
|
|
1469
1332
|
}
|
|
1470
|
-
if (field.extInfo.option){
|
|
1333
|
+
if (field.extInfo.option) {
|
|
1471
1334
|
options = field.extInfo.option
|
|
1472
1335
|
}
|
|
1473
|
-
else if (field.extInfo.options){
|
|
1336
|
+
else if (field.extInfo.options) {
|
|
1474
1337
|
options = field.extInfo.options
|
|
1475
1338
|
}
|
|
1476
1339
|
return options
|
|
1477
1340
|
},
|
|
1478
|
-
getMoldTime(){
|
|
1341
|
+
getMoldTime () {
|
|
1479
1342
|
let otherTime = {}
|
|
1480
|
-
this.formList.form && this.formList.form.formFieldRelation.forEach(item=>{
|
|
1481
|
-
if ((item.formField.type==='TIME_PICKER' || item.formField.type==='TIME_PICKER_RANGE') && item.formField.extInfo.mold==='OTHER'){
|
|
1343
|
+
this.formList.form && this.formList.form.formFieldRelation.forEach(item => {
|
|
1344
|
+
if ((item.formField.type === 'TIME_PICKER' || item.formField.type === 'TIME_PICKER_RANGE') && item.formField.extInfo.mold === 'OTHER') {
|
|
1482
1345
|
let pattern = item.formField.extInfo.pattern
|
|
1483
|
-
let yearVal = pattern.indexOf('YEAR')
|
|
1484
|
-
let monthVal = pattern.indexOf('MONTH')
|
|
1485
|
-
let dayVal = pattern.indexOf('DAY')
|
|
1486
|
-
let hourVal = pattern.indexOf('HOUR')
|
|
1487
|
-
let minuteVal = pattern.indexOf('MINUTE')
|
|
1488
|
-
let secondVal = pattern.indexOf('SECOND')
|
|
1489
|
-
if ((yearVal||monthVal||dayVal)&&(!hourVal
|
|
1490
|
-
otherTime[item.fieldId]='DATE'
|
|
1346
|
+
let yearVal = pattern.indexOf('YEAR') !== -1
|
|
1347
|
+
let monthVal = pattern.indexOf('MONTH') !== -1
|
|
1348
|
+
let dayVal = pattern.indexOf('DAY') !== -1
|
|
1349
|
+
let hourVal = pattern.indexOf('HOUR') !== -1
|
|
1350
|
+
let minuteVal = pattern.indexOf('MINUTE') !== -1
|
|
1351
|
+
let secondVal = pattern.indexOf('SECOND') !== -1
|
|
1352
|
+
if ((yearVal || monthVal || dayVal) && (!hourVal && !minuteVal && !secondVal)) {
|
|
1353
|
+
otherTime[item.fieldId] = 'DATE'
|
|
1491
1354
|
}
|
|
1492
|
-
else if ((yearVal||monthVal||dayVal)&&(hourVal||minuteVal||secondVal)){
|
|
1493
|
-
otherTime[item.fieldId]='DATE_TIME'
|
|
1355
|
+
else if ((yearVal || monthVal || dayVal) && (hourVal || minuteVal || secondVal)) {
|
|
1356
|
+
otherTime[item.fieldId] = 'DATE_TIME'
|
|
1494
1357
|
}
|
|
1495
|
-
else if ((hourVal||minuteVal||secondVal)&&(!yearVal
|
|
1496
|
-
otherTime[item.fieldId]='TIME'
|
|
1358
|
+
else if ((hourVal || minuteVal || secondVal) && (!yearVal && !monthVal && !dayVal)) {
|
|
1359
|
+
otherTime[item.fieldId] = 'TIME'
|
|
1497
1360
|
}
|
|
1498
1361
|
}
|
|
1499
1362
|
})
|
|
1500
1363
|
return otherTime
|
|
1501
1364
|
},
|
|
1502
|
-
setOptions(extInfo){
|
|
1365
|
+
setOptions (extInfo) {
|
|
1503
1366
|
let options = []
|
|
1504
|
-
console.debug('cascadeDown',extInfo)
|
|
1505
|
-
if (extInfo.cascadeDown && extInfo.cascadeDown.options){
|
|
1367
|
+
console.debug('cascadeDown', extInfo)
|
|
1368
|
+
if (extInfo.cascadeDown && extInfo.cascadeDown.options) {
|
|
1506
1369
|
options = extInfo.cascadeDown.options
|
|
1507
1370
|
return options
|
|
1508
|
-
} else if (extInfo.cascade){
|
|
1371
|
+
} else if (extInfo.cascade) {
|
|
1509
1372
|
options = extInfo.cascade
|
|
1510
|
-
} else if (extInfo.cascadeDown && extInfo.cascadeDown[0]){
|
|
1373
|
+
} else if (extInfo.cascadeDown && extInfo.cascadeDown[0]) {
|
|
1511
1374
|
options = extInfo.cascadeDown[0].options
|
|
1512
1375
|
}
|
|
1513
|
-
return
|
|
1376
|
+
return options
|
|
1514
1377
|
},
|
|
1515
|
-
onReady(){
|
|
1378
|
+
onReady () {
|
|
1516
1379
|
|
|
1517
1380
|
|
|
1518
1381
|
},
|
|
1519
|
-
beforeRead(file,type){
|
|
1520
|
-
console.debug('file',file)
|
|
1521
|
-
console.debug('fileType'
|
|
1522
|
-
if (!Array.isArray(file)){
|
|
1523
|
-
if (type === 'IMAGE' || type === 'FILE'){
|
|
1382
|
+
beforeRead (file, type) {
|
|
1383
|
+
console.debug('file', file)
|
|
1384
|
+
console.debug('fileType', !Array.isArray(file))
|
|
1385
|
+
if (!Array.isArray(file)) {
|
|
1386
|
+
if (type === 'IMAGE' || type === 'FILE') {
|
|
1524
1387
|
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
1525
|
-
const isSupportedFormat = file.type.indexOf('image')
|
|
1526
|
-
if (!isSupportedFormat){
|
|
1527
|
-
this.$message.error(
|
|
1388
|
+
const isSupportedFormat = file.type.indexOf('image') !== -1
|
|
1389
|
+
if (!isSupportedFormat) {
|
|
1390
|
+
this.$message.error(this.$t('formTemplate.uploadType'));
|
|
1528
1391
|
return false
|
|
1529
1392
|
}
|
|
1530
|
-
if (!isLte2M&&isSupportedFormat) {
|
|
1531
|
-
this.$message.error(
|
|
1393
|
+
if (!isLte2M && isSupportedFormat) {
|
|
1394
|
+
this.$message.error(this.$t('formTemplate.uploadImageSize'));
|
|
1532
1395
|
return false
|
|
1533
1396
|
}
|
|
1534
1397
|
return true
|
|
1535
1398
|
}
|
|
1536
|
-
else if (type === 'VIDEO'){
|
|
1399
|
+
else if (type === 'VIDEO') {
|
|
1537
1400
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
1538
|
-
const isSupportedFormat =file.type.indexOf('video')
|
|
1539
|
-
if (!isSupportedFormat){
|
|
1540
|
-
this.$message.error(
|
|
1401
|
+
const isSupportedFormat = file.type.indexOf('video') !== -1
|
|
1402
|
+
if (!isSupportedFormat) {
|
|
1403
|
+
this.$message.error(this.$t('formTemplate.uploadVideoType'));
|
|
1541
1404
|
return false
|
|
1542
1405
|
}
|
|
1543
|
-
if (!isLte2M&&isSupportedFormat) {
|
|
1544
|
-
this.$message.error(
|
|
1406
|
+
if (!isLte2M && isSupportedFormat) {
|
|
1407
|
+
this.$message.error(this.$t('formTemplate.uploadVideoSize'));
|
|
1545
1408
|
return false
|
|
1546
1409
|
}
|
|
1547
1410
|
return true
|
|
1548
1411
|
}
|
|
1549
|
-
else if (type === 'ATTACHMENT'){
|
|
1412
|
+
else if (type === 'ATTACHMENT') {
|
|
1550
1413
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
1551
1414
|
if (!isLte2M) {
|
|
1552
|
-
this.$message.error(
|
|
1415
|
+
this.$message.error(this.$t('formTemplate.uploadFileSize'));
|
|
1553
1416
|
return false
|
|
1554
1417
|
}
|
|
1555
1418
|
return true
|
|
1556
1419
|
}
|
|
1557
1420
|
}
|
|
1558
|
-
else{
|
|
1421
|
+
else {
|
|
1559
1422
|
let length = 0
|
|
1560
|
-
if (this.extInfoFieldValue[this.filedId]){
|
|
1423
|
+
if (this.extInfoFieldValue[this.filedId]) {
|
|
1561
1424
|
length = this.extInfoFieldValue[this.filedId].length
|
|
1562
1425
|
}
|
|
1563
|
-
if (file.length<=this.limitNum-length){
|
|
1564
|
-
for (let i=0;i<file.length;i++){
|
|
1565
|
-
if (type === 'IMAGE' || type === 'FILE'){
|
|
1426
|
+
if (file.length <= this.limitNum - length) {
|
|
1427
|
+
for (let i = 0; i < file.length; i++) {
|
|
1428
|
+
if (type === 'IMAGE' || type === 'FILE') {
|
|
1566
1429
|
const isLte2M = file[i].size / 1024 / 1024 <= 8;
|
|
1567
|
-
const isSupportedFormat =file[i].type.indexOf('image')
|
|
1568
|
-
if (!isSupportedFormat){
|
|
1569
|
-
this.$message.error(
|
|
1430
|
+
const isSupportedFormat = file[i].type.indexOf('image') !== -1
|
|
1431
|
+
if (!isSupportedFormat) {
|
|
1432
|
+
this.$message.error(this.$t('formTemplate.uploadType'));
|
|
1570
1433
|
return false
|
|
1571
1434
|
}
|
|
1572
|
-
if (!isLte2M&&isSupportedFormat) {
|
|
1573
|
-
this.$message.error(
|
|
1435
|
+
if (!isLte2M && isSupportedFormat) {
|
|
1436
|
+
this.$message.error(this.$t('formTemplate.uploadImageSize'));
|
|
1574
1437
|
return false
|
|
1575
1438
|
}
|
|
1576
1439
|
return true
|
|
1577
1440
|
}
|
|
1578
|
-
else if (type === 'VIDEO'){
|
|
1441
|
+
else if (type === 'VIDEO') {
|
|
1579
1442
|
const isLte2M = file[i].size / 1024 / 1024 <= 100;
|
|
1580
|
-
const isSupportedFormat =file[i].type.indexOf('video')
|
|
1581
|
-
if (!isSupportedFormat){
|
|
1582
|
-
this.$message.error(
|
|
1443
|
+
const isSupportedFormat = file[i].type.indexOf('video') !== -1
|
|
1444
|
+
if (!isSupportedFormat) {
|
|
1445
|
+
this.$message.error(this.$t('formTemplate.uploadVideoType'));
|
|
1583
1446
|
return false
|
|
1584
1447
|
}
|
|
1585
|
-
if (!isLte2M&&isSupportedFormat) {
|
|
1586
|
-
this.$message.error(
|
|
1448
|
+
if (!isLte2M && isSupportedFormat) {
|
|
1449
|
+
this.$message.error(this.$t('formTemplate.uploadVideoSize'));
|
|
1587
1450
|
return false
|
|
1588
1451
|
}
|
|
1589
1452
|
return true
|
|
1590
1453
|
}
|
|
1591
|
-
else if (type === 'ATTACHMENT'){
|
|
1454
|
+
else if (type === 'ATTACHMENT') {
|
|
1592
1455
|
const isLte2M = file[i].size / 1024 / 1024 <= 100;
|
|
1593
1456
|
if (!isLte2M) {
|
|
1594
|
-
this.$message.error(
|
|
1457
|
+
this.$message.error(this.$t('formTemplate.uploadFileSize'));
|
|
1595
1458
|
return false
|
|
1596
1459
|
}
|
|
1597
1460
|
return true
|
|
@@ -1600,10 +1463,10 @@ export default {
|
|
|
1600
1463
|
}
|
|
1601
1464
|
else {
|
|
1602
1465
|
let num = 1
|
|
1603
|
-
if (this.limitNum){
|
|
1466
|
+
if (this.limitNum) {
|
|
1604
1467
|
num = this.limitNum
|
|
1605
1468
|
}
|
|
1606
|
-
let messageText = '
|
|
1469
|
+
let messageText = this.$t('formTemplate.onlyUpload' )+num+ this.$t('formTemplate.number')
|
|
1607
1470
|
this.$message.error(messageText);
|
|
1608
1471
|
return false
|
|
1609
1472
|
}
|
|
@@ -1612,63 +1475,63 @@ export default {
|
|
|
1612
1475
|
|
|
1613
1476
|
},
|
|
1614
1477
|
//文件上传至服务器
|
|
1615
|
-
afterRead(file){
|
|
1616
|
-
this.fileUpload=true
|
|
1478
|
+
afterRead (file) {
|
|
1479
|
+
this.fileUpload = true
|
|
1617
1480
|
console.debug(file)
|
|
1618
1481
|
console.debug(!Array.isArray(file))
|
|
1619
|
-
if (!Array.isArray(file)){
|
|
1620
|
-
this.uploadImgFun(file.content,file.file.name,file,file.file);
|
|
1482
|
+
if (!Array.isArray(file)) {
|
|
1483
|
+
this.uploadImgFun(file.content, file.file.name, file, file.file);
|
|
1621
1484
|
}
|
|
1622
1485
|
else {
|
|
1623
1486
|
let num = 1
|
|
1624
|
-
if (this.limitNum){
|
|
1487
|
+
if (this.limitNum) {
|
|
1625
1488
|
num = this.limitNum
|
|
1626
1489
|
}
|
|
1627
|
-
if (file.length >num){
|
|
1628
|
-
this.$message.warning('
|
|
1490
|
+
if (file.length > num) {
|
|
1491
|
+
this.$message.warning(this.$t('formTemplate.onlyUpload' )+ num + this.$t('formTemplate.number'))
|
|
1629
1492
|
return false
|
|
1630
1493
|
}
|
|
1631
1494
|
else {
|
|
1632
|
-
for (let i = 0; i < file.length; i++){
|
|
1633
|
-
this.uploadImgFun(file[i].content,file[i].file.name,file[i],file[i].file);
|
|
1495
|
+
for (let i = 0; i < file.length; i++) {
|
|
1496
|
+
this.uploadImgFun(file[i].content, file[i].file.name, file[i], file[i].file);
|
|
1634
1497
|
}
|
|
1635
1498
|
}
|
|
1636
1499
|
}
|
|
1637
1500
|
},
|
|
1638
|
-
uploadImgFun(content,name,fileCon,file){
|
|
1501
|
+
uploadImgFun (content, name, fileCon, file) {
|
|
1639
1502
|
console.log(fileCon)
|
|
1640
1503
|
let imageData = {
|
|
1641
|
-
urls:[]
|
|
1504
|
+
urls: []
|
|
1642
1505
|
}
|
|
1643
1506
|
let imageInfo = {
|
|
1644
|
-
name:"",
|
|
1645
|
-
status:'',
|
|
1646
|
-
url:''
|
|
1507
|
+
name: "",
|
|
1508
|
+
status: '',
|
|
1509
|
+
url: ''
|
|
1647
1510
|
}
|
|
1648
1511
|
let res = multipartUpload(
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1512
|
+
this.ossConfig,
|
|
1513
|
+
file,
|
|
1514
|
+
null,
|
|
1515
|
+
imageInfo
|
|
1653
1516
|
);
|
|
1654
1517
|
res.then((res) => {
|
|
1655
1518
|
console.log("upload result:", res);
|
|
1656
1519
|
// let filePath = res.name;
|
|
1657
1520
|
imageData.urls.push({
|
|
1658
|
-
name:file.name,
|
|
1659
|
-
url:ossFileUrl(this.ossConfig, res.name),
|
|
1660
|
-
status:'success'
|
|
1521
|
+
name: file.name,
|
|
1522
|
+
url: ossFileUrl(this.ossConfig, res.name),
|
|
1523
|
+
status: 'success'
|
|
1661
1524
|
})
|
|
1662
1525
|
imageInfo.url = ossFileUrl(this.ossConfig, res.name)
|
|
1663
|
-
imageInfo.status='success'
|
|
1664
|
-
imageInfo.name=file.name
|
|
1665
|
-
for (let j=0;j<this.extInfoFieldValue[this.filedId].length;j++){
|
|
1666
|
-
if (this.extInfoFieldValue[this.filedId][j].content && this.extInfoFieldValue[this.filedId][j].content === content){
|
|
1667
|
-
this.$set(this.extInfoFieldValue[this.filedId],j,imageInfo)
|
|
1526
|
+
imageInfo.status = 'success'
|
|
1527
|
+
imageInfo.name = file.name
|
|
1528
|
+
for (let j = 0; j < this.extInfoFieldValue[this.filedId].length; j++) {
|
|
1529
|
+
if (this.extInfoFieldValue[this.filedId][j].content && this.extInfoFieldValue[this.filedId][j].content === content) {
|
|
1530
|
+
this.$set(this.extInfoFieldValue[this.filedId], j, imageInfo)
|
|
1668
1531
|
delete this.extInfoFieldValue[this.filedId][j].content
|
|
1669
1532
|
}
|
|
1670
1533
|
}
|
|
1671
|
-
this.fileUpload=false
|
|
1534
|
+
this.fileUpload = false
|
|
1672
1535
|
}).catch((err) => {
|
|
1673
1536
|
console.debug("upload err", err);
|
|
1674
1537
|
});
|
|
@@ -1687,62 +1550,29 @@ export default {
|
|
|
1687
1550
|
return new File([u8arr], filename, { type: mime });
|
|
1688
1551
|
},
|
|
1689
1552
|
//初始化默认值
|
|
1690
|
-
defaultClick() {
|
|
1553
|
+
defaultClick () {
|
|
1691
1554
|
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
1692
|
-
for (let i = 0; i < this.formList.form.formFieldRelation.length; i++){
|
|
1555
|
+
for (let i = 0; i < this.formList.form.formFieldRelation.length; i++) {
|
|
1693
1556
|
let type = this.formList.form.formFieldRelation[i].formField.type
|
|
1694
1557
|
let extInfo = this.formList.form.formFieldRelation[i].formField.extInfo
|
|
1695
|
-
if(type ==='SELECT' || type === 'CHECKBOX' || type === 'RADIO' || type === 'OPTION') {
|
|
1696
|
-
if(extInfo && !extInfo.option){
|
|
1697
|
-
if(extInfo.exinfo){
|
|
1698
|
-
for (let j=0; j < extInfo.exinfo.length; j++){
|
|
1699
|
-
|
|
1700
|
-
}
|
|
1701
|
-
this.$set(extInfo,'option',extInfo.exinfo)
|
|
1702
|
-
}
|
|
1703
|
-
if (extInfo.option){
|
|
1704
|
-
if (type === 'RADIO') {
|
|
1705
|
-
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1706
|
-
if(!extInfo.option[j].value) {
|
|
1707
|
-
extInfo.option[j].value=extInfo.option[j].label
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
if(!this.formList.form.formFieldRelation[i].value){
|
|
1711
|
-
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1712
|
-
if (extInfo.option[j]._default === 'true') {
|
|
1713
|
-
this.formList.form.formFieldRelation[i].value = extInfo.option[j].value
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
if (type === 'CHECKBOX') {
|
|
1719
|
-
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1720
|
-
if (!extInfo.option[j].value) {
|
|
1721
|
-
extInfo.option[j].value = extInfo.option[j].label
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
if (!this.formList.form.formFieldRelation[i].value || this.formList.form.formFieldRelation[i].value.length === 0){
|
|
1725
|
-
this.formList.form.formFieldRelation[i].value = []
|
|
1726
|
-
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1727
|
-
if (extInfo.option[j]._default === 'true') {
|
|
1728
|
-
this.formList.form.formFieldRelation[i].value[0] = extInfo.option[j].value
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1558
|
+
if (type === 'SELECT' || type === 'CHECKBOX' || type === 'RADIO' || type === 'OPTION') {
|
|
1559
|
+
if (extInfo && !extInfo.option) {
|
|
1560
|
+
if (extInfo.exinfo) {
|
|
1561
|
+
for (let j = 0; j < extInfo.exinfo.length; j++) {
|
|
1562
|
+
this.$set(extInfo.exinfo[j], 'label', extInfo.exinfo[j].value)
|
|
1732
1563
|
}
|
|
1564
|
+
this.$set(extInfo, 'option', extInfo.exinfo)
|
|
1733
1565
|
}
|
|
1734
1566
|
}
|
|
1735
1567
|
else {
|
|
1736
1568
|
if (extInfo && extInfo.options) {
|
|
1737
1569
|
if (type === 'RADIO') {
|
|
1738
1570
|
for (let j = 0; j < extInfo.options.length; j++) {
|
|
1739
|
-
if(!extInfo.options[j].value)
|
|
1740
|
-
|
|
1741
|
-
extInfo.options[j].value=extInfo.options[j].label
|
|
1571
|
+
if (!extInfo.options[j].value) {
|
|
1572
|
+
extInfo.options[j].value = extInfo.options[j].label
|
|
1742
1573
|
}
|
|
1743
1574
|
}
|
|
1744
|
-
if(!this.formList.form.formFieldRelation[i].value)
|
|
1745
|
-
{
|
|
1575
|
+
if (!this.formList.form.formFieldRelation[i].value) {
|
|
1746
1576
|
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1747
1577
|
if (extInfo.options[j]._default === 'true') {
|
|
1748
1578
|
this.formList.form.formFieldRelation[i].value = extInfo.options[j].value
|
|
@@ -1757,9 +1587,8 @@ export default {
|
|
|
1757
1587
|
}
|
|
1758
1588
|
}
|
|
1759
1589
|
|
|
1760
|
-
if (!this.formList.form.formFieldRelation[i].value ||this.formList.form.formFieldRelation[i].value.length === 0)
|
|
1761
|
-
|
|
1762
|
-
this.formList.form.formFieldRelation[i].value=[]
|
|
1590
|
+
if (!this.formList.form.formFieldRelation[i].value || this.formList.form.formFieldRelation[i].value.length === 0) {
|
|
1591
|
+
this.formList.form.formFieldRelation[i].value = []
|
|
1763
1592
|
for (let j = 0; j < extInfo.options.length; j++) {
|
|
1764
1593
|
if (extInfo.options[j]._default === 'true') {
|
|
1765
1594
|
this.formList.form.formFieldRelation[i].value[0] = extInfo.options[j].value
|
|
@@ -1770,55 +1599,55 @@ export default {
|
|
|
1770
1599
|
}
|
|
1771
1600
|
}
|
|
1772
1601
|
let options = [];
|
|
1773
|
-
if (extInfo){
|
|
1774
|
-
options = extInfo.option?extInfo.option:extInfo.options;
|
|
1775
|
-
options.forEach(opt=>{
|
|
1776
|
-
if (!opt.value){
|
|
1602
|
+
if (extInfo) {
|
|
1603
|
+
options = extInfo.option ? extInfo.option : extInfo.options;
|
|
1604
|
+
options.forEach(opt => {
|
|
1605
|
+
if (!opt.value) {
|
|
1777
1606
|
opt.value = opt.label
|
|
1778
1607
|
}
|
|
1779
1608
|
})
|
|
1780
1609
|
}
|
|
1781
1610
|
}
|
|
1782
|
-
if (type ==='FILE' || type == 'ATTACHMENT' || type == 'IMAGE' || type == 'VIDEO'){
|
|
1783
|
-
if (this.formList.form.formFieldRelation[i].value){
|
|
1784
|
-
if (this.formList.form.formFieldRelation[i].value===null||this.formList.form.formFieldRelation[i].value===''){
|
|
1785
|
-
this.formList.form.formFieldRelation[i].value=[]
|
|
1611
|
+
if (type === 'FILE' || type == 'ATTACHMENT' || type == 'IMAGE' || type == 'VIDEO') {
|
|
1612
|
+
if (this.formList.form.formFieldRelation[i].value) {
|
|
1613
|
+
if (this.formList.form.formFieldRelation[i].value === null || this.formList.form.formFieldRelation[i].value === '') {
|
|
1614
|
+
this.formList.form.formFieldRelation[i].value = []
|
|
1786
1615
|
}
|
|
1787
1616
|
else {
|
|
1788
|
-
let valueList=[]
|
|
1789
|
-
let bool=false
|
|
1617
|
+
let valueList = []
|
|
1618
|
+
let bool = false
|
|
1790
1619
|
|
|
1791
|
-
if (!Array.isArray(this.formList.form.formFieldRelation[i].value)){
|
|
1620
|
+
if (!Array.isArray(this.formList.form.formFieldRelation[i].value)) {
|
|
1792
1621
|
let obj = {
|
|
1793
|
-
url:this.formList.form.formFieldRelation[i].value
|
|
1622
|
+
url: this.formList.form.formFieldRelation[i].value
|
|
1794
1623
|
}
|
|
1795
1624
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = [obj]
|
|
1796
1625
|
}
|
|
1797
|
-
else if(this.formList.form.formFieldRelation[i].value.length > 0) {
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
}
|
|
1808
|
-
else {
|
|
1809
|
-
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId]=[]
|
|
1810
|
-
}
|
|
1626
|
+
else if (this.formList.form.formFieldRelation[i].value.length > 0) {
|
|
1627
|
+
for (let file = 0; file < this.formList.form.formFieldRelation[i].value.length; file++) {
|
|
1628
|
+
let type = typeof (this.formList.form.formFieldRelation[i].value[file])
|
|
1629
|
+
if (type === "string") {
|
|
1630
|
+
bool = true
|
|
1631
|
+
valueList[file] = {}
|
|
1632
|
+
valueList[file].url = this.formList.form.formFieldRelation[i].value[file]
|
|
1633
|
+
}
|
|
1634
|
+
if (type === 'object' && JSON.stringify(this.formList.form.formFieldRelation[i].value[file]) !== '{}') {
|
|
1635
|
+
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].value
|
|
1811
1636
|
}
|
|
1812
|
-
|
|
1813
|
-
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId]=
|
|
1637
|
+
else {
|
|
1638
|
+
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = []
|
|
1814
1639
|
}
|
|
1640
|
+
}
|
|
1641
|
+
if (bool) {
|
|
1642
|
+
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = valueList
|
|
1643
|
+
}
|
|
1815
1644
|
}
|
|
1816
1645
|
}
|
|
1817
1646
|
}
|
|
1818
1647
|
}
|
|
1819
|
-
if (type === 'REF' || type === 'REF_TEMPLATE'){
|
|
1820
|
-
if (this.formList.form.formFieldRelation[i].formField.extInfo.extInfoFieldValue){
|
|
1821
|
-
let name = this.formList.form.formFieldRelation[i].formField.extInfo.extInfoFieldValue.map(item=>{
|
|
1648
|
+
if (type === 'REF' || type === 'REF_TEMPLATE') {
|
|
1649
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.extInfoFieldValue) {
|
|
1650
|
+
let name = this.formList.form.formFieldRelation[i].formField.extInfo.extInfoFieldValue.map(item => {
|
|
1822
1651
|
return item.name
|
|
1823
1652
|
})
|
|
1824
1653
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = name
|
|
@@ -1826,8 +1655,8 @@ export default {
|
|
|
1826
1655
|
}
|
|
1827
1656
|
/*如何工单描述中只有一个链接地址,则将链接地址替换成图片*/
|
|
1828
1657
|
if (this.formList.form.formFieldRelation[i].fieldId === 'workorder_description' &&
|
|
1829
|
-
|
|
1830
|
-
|
|
1658
|
+
this.formList.form.formFieldRelation[i].value.search(/<img /i) < 0 &&
|
|
1659
|
+
this.formList.form.formFieldRelation[i].value.indexOf('https://guoranopen-zjk') !== -1) {
|
|
1831
1660
|
let value = this.formList.form.formFieldRelation[i].value
|
|
1832
1661
|
this.formList.form.formFieldRelation[i].value = ""
|
|
1833
1662
|
let blob = null
|
|
@@ -1839,9 +1668,9 @@ export default {
|
|
|
1839
1668
|
xhr.onload = (res) => {
|
|
1840
1669
|
// 获取返回结果
|
|
1841
1670
|
blob = xhr.response
|
|
1842
|
-
file = new File([blob],'图片')
|
|
1671
|
+
file = new File([blob], '图片')
|
|
1843
1672
|
let obj = {
|
|
1844
|
-
file:[file]
|
|
1673
|
+
file: [file]
|
|
1845
1674
|
}
|
|
1846
1675
|
this.currentEditor.commands.get("imageUpload").execute(obj)
|
|
1847
1676
|
}
|
|
@@ -1852,30 +1681,35 @@ export default {
|
|
|
1852
1681
|
let type = this.formList.form.formFieldRelation[i].formField.type
|
|
1853
1682
|
let extInfo = this.formList.form.formFieldRelation[i].formField.extInfo
|
|
1854
1683
|
if (type === 'CASCADER') {
|
|
1855
|
-
let fieldValue = this.formList.form.formFieldRelation[i].formField.extInfo.fieldValue ?
|
|
1856
|
-
|
|
1857
|
-
if (!this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId]){
|
|
1858
|
-
|
|
1859
|
-
|
|
1684
|
+
// let fieldValue = this.formList.form.formFieldRelation[i].formField.extInfo.fieldValue ?
|
|
1685
|
+
// this.formList.form.formFieldRelation[i].formField.extInfo.fieldValue : []
|
|
1686
|
+
// if (!this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId]) {
|
|
1687
|
+
// this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = fieldValue
|
|
1688
|
+
// console.log(this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId], 'this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId]');
|
|
1689
|
+
// }
|
|
1690
|
+
let cascadeOptions = extInfo.WebHookParameter ? extInfo.cascade : extInfo.cascadeDown.options
|
|
1691
|
+
this.$set(this.extInfoFieldValue, this.formList.form.formFieldRelation[i].fieldId, [])
|
|
1692
|
+
this.loopCascaderSetDefalut(cascadeOptions, this.formList.form.formFieldRelation[i], extInfo.selectType)
|
|
1693
|
+
this.loopCascaderSetValue(cascadeOptions, this.formList.form.formFieldRelation[i], extInfo.selectType)
|
|
1694
|
+
|
|
1860
1695
|
}
|
|
1861
1696
|
if (type === 'DATE_PICKER') {
|
|
1862
|
-
if(this.formList.form.formFieldRelation[i].value && this.formList.form.formFieldRelation[i].value!==null && this.formList.form.formFieldRelation[i].value!==''
|
|
1863
|
-
this.dateValue[this.formList.form.formFieldRelation[i].fieldId]=this.formatDate(this.formList.form.formFieldRelation[i].value)
|
|
1697
|
+
if (this.formList.form.formFieldRelation[i].value && this.formList.form.formFieldRelation[i].value !== null && this.formList.form.formFieldRelation[i].value !== '') {
|
|
1698
|
+
this.dateValue[this.formList.form.formFieldRelation[i].fieldId] = this.formatDate(this.formList.form.formFieldRelation[i].value)
|
|
1864
1699
|
}
|
|
1865
1700
|
}
|
|
1866
1701
|
if (type === 'TIME_PICKER') {
|
|
1867
|
-
if(this.formList.form.formFieldRelation[i].value && this.formList.form.formFieldRelation[i].value!==''&& this.formList.form.formFieldRelation[i].value!==null)
|
|
1868
|
-
{
|
|
1702
|
+
if (this.formList.form.formFieldRelation[i].value && this.formList.form.formFieldRelation[i].value !== '' && this.formList.form.formFieldRelation[i].value !== null) {
|
|
1869
1703
|
// 判断是否是时间戳 时间戳为字符串转换为Number
|
|
1870
1704
|
var regex = /^\d{13}$/;
|
|
1871
|
-
if (regex.test(this.formList.form.formFieldRelation[i].value)){
|
|
1705
|
+
if (regex.test(this.formList.form.formFieldRelation[i].value)) {
|
|
1872
1706
|
this.formList.form.formFieldRelation[i].value = Number(this.formList.form.formFieldRelation[i].value)
|
|
1873
1707
|
}
|
|
1874
1708
|
const dateTime = new Date(this.formList.form.formFieldRelation[i].value);
|
|
1875
1709
|
if (!this.formList.form.formFieldRelation[i].formField.extInfo.mold ||
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
if (!flag){
|
|
1710
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'TIME' ||
|
|
1711
|
+
this.getMoldTime(this.formList.form.formFieldRelation[i].formField.formField) == 'TIME') {
|
|
1712
|
+
if (!flag) {
|
|
1879
1713
|
if (this.formList.form.formFieldRelation[i].value.length === 5 && this.formList.form.formFieldRelation[i].value.split(":").length === 2) {
|
|
1880
1714
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].value;
|
|
1881
1715
|
this.formList.form.formFieldRelation[i].value = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate() + " " + this.formList.form.formFieldRelation[i].value + ":00";
|
|
@@ -1884,14 +1718,14 @@ export default {
|
|
|
1884
1718
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].value;
|
|
1885
1719
|
this.formList.form.formFieldRelation[i].value = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate() + " " + this.formList.form.formFieldRelation[i].value;
|
|
1886
1720
|
} else {
|
|
1887
|
-
if (regex.test(this.formList.form.formFieldRelation[i].value)){
|
|
1721
|
+
if (regex.test(this.formList.form.formFieldRelation[i].value)) {
|
|
1888
1722
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = dateTime
|
|
1889
1723
|
} else {
|
|
1890
1724
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].value
|
|
1891
1725
|
}
|
|
1892
1726
|
}
|
|
1893
1727
|
} else {
|
|
1894
|
-
if (regex.test(this.formList.form.formFieldRelation[i].value)){
|
|
1728
|
+
if (regex.test(this.formList.form.formFieldRelation[i].value)) {
|
|
1895
1729
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = dateTime.Format('hh:mm')
|
|
1896
1730
|
} else {
|
|
1897
1731
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].value
|
|
@@ -1899,25 +1733,25 @@ export default {
|
|
|
1899
1733
|
}
|
|
1900
1734
|
}
|
|
1901
1735
|
else if (this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'DATA_TIME' ||
|
|
1902
|
-
|
|
1903
|
-
|
|
1736
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'DATE_TIME' ||
|
|
1737
|
+
this.getMoldTime(this.formList.form.formFieldRelation[i].formField.formField) == 'DATE_TIME') {
|
|
1904
1738
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = dateTime.Format('yyyy-MM-dd hh:mm')
|
|
1905
1739
|
}
|
|
1906
1740
|
else if (this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'DATA' ||
|
|
1907
|
-
|
|
1908
|
-
|
|
1741
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.mold == 'DATE' ||
|
|
1742
|
+
this.getMoldTime(this.formList.form.formFieldRelation[i].formField.formField) == 'DATE') {
|
|
1909
1743
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = dateTime.Format('yyyy-MM-dd')
|
|
1910
1744
|
}
|
|
1911
1745
|
}
|
|
1912
1746
|
}
|
|
1913
1747
|
if (type === 'SELECT' || type === 'OPTION') {
|
|
1914
|
-
if (extInfo && extInfo.option){
|
|
1748
|
+
if (extInfo && extInfo.option) {
|
|
1915
1749
|
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1916
1750
|
if (extInfo.option[j].value === '') {
|
|
1917
1751
|
extInfo.option[j].value = extInfo.option[j].label
|
|
1918
1752
|
}
|
|
1919
1753
|
}
|
|
1920
|
-
if(this.formList.form.formFieldRelation[i].value) {
|
|
1754
|
+
if (this.formList.form.formFieldRelation[i].value) {
|
|
1921
1755
|
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1922
1756
|
if (this.formList.form.formFieldRelation[i].value === extInfo.option[j].value) {
|
|
1923
1757
|
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] = extInfo.option[j].label
|
|
@@ -1925,51 +1759,76 @@ export default {
|
|
|
1925
1759
|
}
|
|
1926
1760
|
} else {
|
|
1927
1761
|
for (let j = 0; j < extInfo.option.length; j++) {
|
|
1928
|
-
if (extInfo.option[j]._default === 'true') {
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
if(this.formList.form.formFieldRelation[i].value && extInfo && extInfo.option) {
|
|
1943
|
-
for (let j=0;j<extInfo.options.length;j++) {
|
|
1944
|
-
if (this.formList.form.formFieldRelation[i].value === extInfo.options[j].value) {
|
|
1945
|
-
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] =extInfo.options[j].label
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
} else {
|
|
1949
|
-
if(extInfo && extInfo.option) {
|
|
1950
|
-
for (let j = 0; j < extInfo.options.length; j++) {
|
|
1951
|
-
if (extInfo.options[j]._default === 'true') {
|
|
1952
|
-
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] = extInfo.options[j].label
|
|
1953
|
-
this.formList.form.formFieldRelation[i].value=extInfo.options[j].value
|
|
1762
|
+
if (extInfo.option[j]._default === 'true' || extInfo.option[j].checked) {
|
|
1763
|
+
// 新老数据兼容,webhook 表单字段部分,旧数据中没有定义单选多选,如果设置了默认值,并且 selectType 不是多选 都记为单选
|
|
1764
|
+
if(extInfo.selectType == '多选') {
|
|
1765
|
+
if(!this.selectValues[this.formList.form.formFieldRelation[i].fieldId]) {
|
|
1766
|
+
this.$set(this.selectValues, this.formList.form.formFieldRelation[i].fieldId, [])
|
|
1767
|
+
}
|
|
1768
|
+
if(!this.formList.form.formFieldRelation[i].value) {
|
|
1769
|
+
this.$set(this.formList.form.formFieldRelation[i], 'value', [])
|
|
1770
|
+
}
|
|
1771
|
+
this.selectValues[this.formList.form.formFieldRelation[i].fieldId].push(extInfo.option[j].label)
|
|
1772
|
+
this.formList.form.formFieldRelation[i].value.push(extInfo.option[j].value)
|
|
1773
|
+
} else {
|
|
1774
|
+
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] = extInfo.option[j].label
|
|
1775
|
+
this.formList.form.formFieldRelation[i].value = extInfo.option[j].value
|
|
1954
1776
|
}
|
|
1955
1777
|
}
|
|
1956
1778
|
}
|
|
1957
1779
|
}
|
|
1780
|
+
} else {
|
|
1781
|
+
|
|
1958
1782
|
}
|
|
1959
1783
|
}
|
|
1960
1784
|
}
|
|
1961
|
-
if (this.formList.extInfo && this.formList.extInfo.extInfoFieldValue){
|
|
1785
|
+
if (this.formList.extInfo && this.formList.extInfo.extInfoFieldValue) {
|
|
1962
1786
|
this.extInfoFieldValue = this.formList.extInfo.extInfoFieldValue
|
|
1963
1787
|
}
|
|
1964
1788
|
this.formShow = this.formList
|
|
1965
1789
|
},
|
|
1966
|
-
|
|
1790
|
+
// 给级联字段设置默认值
|
|
1791
|
+
loopCascaderSetDefalut(list, field, selectType) {
|
|
1792
|
+
// this.extInfoFieldValue[field.fieldId] = []
|
|
1793
|
+
console.log(field.fieldId, this.extInfoFieldValue[field.fieldId], 'this.extInfoFieldValuethis.extInfoFieldValue');
|
|
1794
|
+
list && list.forEach(item =>{
|
|
1795
|
+
if(item.checked) {
|
|
1796
|
+
if(selectType == '多选') {
|
|
1797
|
+
this.extInfoFieldValue[field.fieldId].push({
|
|
1798
|
+
label: item.label,
|
|
1799
|
+
value: item.value
|
|
1800
|
+
})
|
|
1801
|
+
} else {
|
|
1802
|
+
this.$set(this.extInfoFieldValue, field.fieldId, [{
|
|
1803
|
+
label: item.label,
|
|
1804
|
+
value: item.value
|
|
1805
|
+
}])
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
this.loopCascaderSetDefalut(item.children, field, selectType)
|
|
1809
|
+
})
|
|
1810
|
+
},
|
|
1811
|
+
loopCascaderSetValue(list, field, selectType, pv) {
|
|
1812
|
+
list && list.forEach(item =>{
|
|
1813
|
+
let parentValue = pv ? pv: []
|
|
1814
|
+
if(item.checked) {
|
|
1815
|
+
if(selectType == '多选') {
|
|
1816
|
+
field.value.push([...parentValue, item.value])
|
|
1817
|
+
} else {
|
|
1818
|
+
field.value = [...parentValue, item.value]
|
|
1819
|
+
}
|
|
1820
|
+
} else {
|
|
1821
|
+
this.loopCascaderSetValue(item.children, field, selectType, [...parentValue, item.value])
|
|
1822
|
+
}
|
|
1823
|
+
})
|
|
1824
|
+
},
|
|
1825
|
+
addZero (i) {
|
|
1967
1826
|
if (i < 10) {
|
|
1968
1827
|
i = "0" + i;
|
|
1969
1828
|
}
|
|
1970
1829
|
return i;
|
|
1971
1830
|
},
|
|
1972
|
-
formatter(type, value) {
|
|
1831
|
+
formatter (type, value) {
|
|
1973
1832
|
// 格式化选择器日期
|
|
1974
1833
|
if (type === "year") {
|
|
1975
1834
|
return `${value}年`;
|
|
@@ -1985,38 +1844,38 @@ export default {
|
|
|
1985
1844
|
return value;
|
|
1986
1845
|
},
|
|
1987
1846
|
|
|
1988
|
-
isMobile() {
|
|
1989
|
-
if (this.usePropStyleType === false){
|
|
1847
|
+
isMobile () {
|
|
1848
|
+
if (this.usePropStyleType === false) {
|
|
1990
1849
|
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
1991
1850
|
if (flag) {
|
|
1992
|
-
this.isPhone=true
|
|
1851
|
+
this.isPhone = true
|
|
1993
1852
|
}
|
|
1994
1853
|
else {
|
|
1995
|
-
this.isCompany=true
|
|
1854
|
+
this.isCompany = true
|
|
1996
1855
|
}
|
|
1997
|
-
}else {
|
|
1998
|
-
this.isPhone=this.propIsPhone;
|
|
1999
|
-
this.isCompany=this.propIsCompany;
|
|
1856
|
+
} else {
|
|
1857
|
+
this.isPhone = this.propIsPhone;
|
|
1858
|
+
this.isCompany = this.propIsCompany;
|
|
2000
1859
|
}
|
|
2001
1860
|
|
|
2002
1861
|
},
|
|
2003
1862
|
//时间的选择器
|
|
2004
|
-
onConfirm(value, id,item,type) {
|
|
2005
|
-
console.debug('value',value)
|
|
2006
|
-
if (type == 'DATE'){
|
|
1863
|
+
onConfirm (value, id, item, type) {
|
|
1864
|
+
console.debug('value', value)
|
|
1865
|
+
if (type == 'DATE') {
|
|
2007
1866
|
this.datePicker = false
|
|
2008
1867
|
this.timeDetailData.value = value;
|
|
2009
|
-
this.extInfoFieldValue[this.timeDetailData.fieldId] =this.formatDate(value);
|
|
1868
|
+
this.extInfoFieldValue[this.timeDetailData.fieldId] = this.formatDate(value);
|
|
2010
1869
|
}
|
|
2011
|
-
else if (type == 'TIME'){
|
|
1870
|
+
else if (type == 'TIME') {
|
|
2012
1871
|
this.timePicker = false;
|
|
2013
1872
|
this.extInfoFieldValue[this.timeDetailData.fieldId] = value;
|
|
2014
1873
|
this.timeDetailData.value = value;
|
|
2015
1874
|
}
|
|
2016
|
-
else if (type == 'DATE_TIME'){
|
|
1875
|
+
else if (type == 'DATE_TIME') {
|
|
2017
1876
|
this.dateTimePicker = false;
|
|
2018
1877
|
this.timeDetailData.value = value
|
|
2019
|
-
this.extInfoFieldValue[this.timeDetailData.fieldId] =this.formatDate(value) +" "+ this.addZero(value.getHours()) + ':' + this.addZero(value.getMinutes())
|
|
1878
|
+
this.extInfoFieldValue[this.timeDetailData.fieldId] = this.formatDate(value) + " " + this.addZero(value.getHours()) + ':' + this.addZero(value.getMinutes())
|
|
2020
1879
|
}
|
|
2021
1880
|
/*for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2022
1881
|
if (this.formShow.form.formFieldRelation[i].fieldId=== id) {
|
|
@@ -2034,14 +1893,14 @@ export default {
|
|
|
2034
1893
|
}*/
|
|
2035
1894
|
},
|
|
2036
1895
|
//转换日期的函数
|
|
2037
|
-
formatDate(date) {
|
|
1896
|
+
formatDate (date) {
|
|
2038
1897
|
const dateTime = new Date(date)
|
|
2039
1898
|
return `${dateTime.getFullYear()}-${dateTime.getMonth() + 1}-${dateTime.getDate()}`;
|
|
2040
1899
|
},
|
|
2041
1900
|
//日期的选择器
|
|
2042
|
-
onConfirmCalendar(date, item) {
|
|
1901
|
+
onConfirmCalendar (date, item) {
|
|
2043
1902
|
this.dateValue[this.dateId] = this.formatDate(date);
|
|
2044
|
-
|
|
1903
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2045
1904
|
if (this.formShow.form.formFieldRelation[i].fieldId === this.dateId) {
|
|
2046
1905
|
this.formShow.form.formFieldRelation[i].value = date
|
|
2047
1906
|
break
|
|
@@ -2050,17 +1909,17 @@ export default {
|
|
|
2050
1909
|
this.showCalendar = false;
|
|
2051
1910
|
},
|
|
2052
1911
|
//下拉的选择器
|
|
2053
|
-
onConfirmSelect(value, item) {
|
|
2054
|
-
console.log('value',value,this.selectDetail)
|
|
2055
|
-
if (!value){
|
|
1912
|
+
onConfirmSelect (value, item) {
|
|
1913
|
+
console.log('value', value, this.selectDetail)
|
|
1914
|
+
if (!value) {
|
|
2056
1915
|
return
|
|
2057
1916
|
}
|
|
2058
1917
|
this.selectValues[this.selectDetail.fieldId] = value;
|
|
2059
1918
|
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2060
1919
|
if (this.formShow.form.formFieldRelation[i].fieldId === this.selectDetail.fieldId) {
|
|
2061
|
-
let options = this.formShow.form.formFieldRelation[i].formField.extInfo.option?this.formShow.form.formFieldRelation[i].formField.extInfo.option:this.formShow.form.formFieldRelation[i].formField.extInfo.options;
|
|
2062
|
-
for (let j=0;j<options.length;j++){
|
|
2063
|
-
if (value == options[j].label){
|
|
1920
|
+
let options = this.formShow.form.formFieldRelation[i].formField.extInfo.option ? this.formShow.form.formFieldRelation[i].formField.extInfo.option : this.formShow.form.formFieldRelation[i].formField.extInfo.options;
|
|
1921
|
+
for (let j = 0; j < options.length; j++) {
|
|
1922
|
+
if (value == options[j].label) {
|
|
2064
1923
|
this.selectDetail.value = options[j].value
|
|
2065
1924
|
}
|
|
2066
1925
|
}
|
|
@@ -2092,11 +1951,11 @@ export default {
|
|
|
2092
1951
|
let imageOrAttachment = true
|
|
2093
1952
|
let errorText = ''
|
|
2094
1953
|
let checkDescription = {
|
|
2095
|
-
checkImageOrAttachment:this.workOrderDestail.checkImageOrAttachment ? this.workOrderDestail.checkImageOrAttachment : false,
|
|
2096
|
-
checkText:this.workOrderDestail.checkText ? this.workOrderDestail.checkText : false,
|
|
2097
|
-
checkImage:this.workOrderDestail.checkImage ? this.workOrderDestail.checkImage : false,
|
|
2098
|
-
checkAttachment:this.workOrderDestail.checkAttachment ? this.workOrderDestail.checkAttachment : false,
|
|
2099
|
-
required:this.workOrderDestail.required ? this.workOrderDestail.required : false,
|
|
1954
|
+
checkImageOrAttachment: this.workOrderDestail.checkImageOrAttachment ? this.workOrderDestail.checkImageOrAttachment : false,
|
|
1955
|
+
checkText: this.workOrderDestail.checkText ? this.workOrderDestail.checkText : false,
|
|
1956
|
+
checkImage: this.workOrderDestail.checkImage ? this.workOrderDestail.checkImage : false,
|
|
1957
|
+
checkAttachment: this.workOrderDestail.checkAttachment ? this.workOrderDestail.checkAttachment : false,
|
|
1958
|
+
required: this.workOrderDestail.required ? this.workOrderDestail.required : false,
|
|
2100
1959
|
}
|
|
2101
1960
|
if (checkDescription.checkText) {
|
|
2102
1961
|
if (!this.workOrderDestail.value) {
|
|
@@ -2110,8 +1969,8 @@ export default {
|
|
|
2110
1969
|
d = null
|
|
2111
1970
|
}
|
|
2112
1971
|
}
|
|
2113
|
-
if(checkDescription.checkImageOrAttachment) {
|
|
2114
|
-
if(!this.workOrderDestail.value.includes('img') && this.attachmentList.length == 0) {
|
|
1972
|
+
if (checkDescription.checkImageOrAttachment) {
|
|
1973
|
+
if (!this.workOrderDestail.value.includes('img') && this.attachmentList.length == 0) {
|
|
2115
1974
|
imageOrAttachment = false
|
|
2116
1975
|
}
|
|
2117
1976
|
}
|
|
@@ -2121,27 +1980,27 @@ export default {
|
|
|
2121
1980
|
if (checkDescription.checkAttachment && this.attachmentList.length == 0) {
|
|
2122
1981
|
attachmentFlag = false
|
|
2123
1982
|
}
|
|
2124
|
-
let text = this.isBaiLi ? '
|
|
1983
|
+
let text = this.isBaiLi ? this.$t('formTemplate.feedbackDes') : this.$t('formTemplate.orderDes')
|
|
2125
1984
|
if (!textFlag) {
|
|
2126
|
-
errorText = text + '
|
|
1985
|
+
errorText = text + this.$t('formTemplate.textFlag')
|
|
2127
1986
|
}
|
|
2128
|
-
if(!imageOrAttachment) {
|
|
2129
|
-
errorText = text + '
|
|
1987
|
+
if (!imageOrAttachment) {
|
|
1988
|
+
errorText = text + this.$t('formTemplate.imageOrAttachment')
|
|
2130
1989
|
}
|
|
2131
1990
|
if (!imageFlag) {
|
|
2132
|
-
errorText = text + '
|
|
1991
|
+
errorText = text + this.$t('formTemplate.imageFlag')
|
|
2133
1992
|
}
|
|
2134
1993
|
if (!attachmentFlag) {
|
|
2135
|
-
errorText = text + '
|
|
1994
|
+
errorText = text + this.$t('formTemplate.attachmentFlag')
|
|
2136
1995
|
}
|
|
2137
1996
|
if (!textFlag && (!imageFlag || !attachmentFlag)) {
|
|
2138
|
-
errorText = text + '
|
|
1997
|
+
errorText = text + this.$t('formTemplate.textFlag') + this.$t('formTemplate.and') + (!imageFlag ? this.$t('formTemplate.image') : this.$t('formTemplate.file'))
|
|
2139
1998
|
}
|
|
2140
1999
|
if (!imageFlag && !attachmentFlag) {
|
|
2141
|
-
errorText = text + '
|
|
2000
|
+
errorText = text + this.$t('formTemplate.imageFlag') + this.$t('formTemplate.and') + this.$t('formTemplate.file')
|
|
2142
2001
|
}
|
|
2143
2002
|
if (!imageFlag && !attachmentFlag && !textFlag) {
|
|
2144
|
-
errorText = text + '
|
|
2003
|
+
errorText = text + this.$t('formTemplate.textFlag') + ',' + this.$t('formTemplate.image') + this.$t('formTemplate.and') + this.$t('formTemplate.file')
|
|
2145
2004
|
}
|
|
2146
2005
|
if (errorText) {
|
|
2147
2006
|
this.$message.error(errorText);
|
|
@@ -2150,7 +2009,7 @@ export default {
|
|
|
2150
2009
|
let d = document.createElement('div')
|
|
2151
2010
|
d.innerHTML = this.workOrderDestail.value
|
|
2152
2011
|
if (checkDescription.required && !d.innerText && !this.workOrderDestail.value.includes('img') && this.attachmentList.length == 0) {
|
|
2153
|
-
let errorText = this.isBaiLi ? '
|
|
2012
|
+
let errorText = this.isBaiLi ? this.$t('formTemplate.feedbackDesRequired') : this.$t('formTemplate.orderDesRequired')
|
|
2154
2013
|
this.$message.error(errorText);
|
|
2155
2014
|
return false
|
|
2156
2015
|
}
|
|
@@ -2158,36 +2017,34 @@ export default {
|
|
|
2158
2017
|
}
|
|
2159
2018
|
},
|
|
2160
2019
|
//提交按钮事件
|
|
2161
|
-
submitClick() {
|
|
2020
|
+
submitClick () {
|
|
2162
2021
|
if (this.uploadImgQueue || this.attachmentList.some(arrach => { return !arrach.url })) {
|
|
2163
|
-
this.$message.warning('
|
|
2022
|
+
this.$message.warning(this.$t('formTemplate.uploading'))
|
|
2164
2023
|
return
|
|
2165
2024
|
}
|
|
2166
|
-
if(this.workOrderDestail && !this.verificationDescription()) {
|
|
2025
|
+
if (this.workOrderDestail && !this.verificationDescription()) {
|
|
2167
2026
|
return
|
|
2168
2027
|
}
|
|
2169
|
-
for (let i=0;i<this.formShow.form.formFieldRelation.length;i++)
|
|
2170
|
-
|
|
2171
|
-
if(this.formShow.form.formFieldRelation[i].formField.type==='CASCADER')
|
|
2172
|
-
{
|
|
2028
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2029
|
+
if (this.formShow.form.formFieldRelation[i].formField.type === 'CASCADER') {
|
|
2173
2030
|
let cascader = []
|
|
2174
|
-
if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascade){
|
|
2031
|
+
if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascade) {
|
|
2175
2032
|
cascader = this.formShow.form.formFieldRelation[i].formField.extInfo.cascade
|
|
2176
2033
|
}
|
|
2177
|
-
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown.options){
|
|
2034
|
+
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown.options) {
|
|
2178
2035
|
cascader = this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown.options
|
|
2179
2036
|
}
|
|
2180
|
-
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0]){
|
|
2037
|
+
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0]) {
|
|
2181
2038
|
cascader = this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0].options
|
|
2182
2039
|
}
|
|
2183
|
-
cascader.forEach(item=>{
|
|
2184
|
-
if(item.children!==undefined){
|
|
2185
|
-
if(item.children.length===0) {
|
|
2040
|
+
cascader.forEach(item => {
|
|
2041
|
+
if (item.children !== undefined) {
|
|
2042
|
+
if (item.children.length === 0) {
|
|
2186
2043
|
delete item.children
|
|
2187
2044
|
} else {
|
|
2188
|
-
item.children.forEach(items=>{
|
|
2189
|
-
if(items.children){
|
|
2190
|
-
if(items.children.length===0) {
|
|
2045
|
+
item.children.forEach(items => {
|
|
2046
|
+
if (items.children) {
|
|
2047
|
+
if (items.children.length === 0) {
|
|
2191
2048
|
delete items.children
|
|
2192
2049
|
}
|
|
2193
2050
|
}
|
|
@@ -2197,82 +2054,82 @@ export default {
|
|
|
2197
2054
|
})
|
|
2198
2055
|
}
|
|
2199
2056
|
if (this.extInfoFieldValue[this.formShow.form.formFieldRelation[i].fieldId] &&
|
|
2200
|
-
|
|
2057
|
+
(this.formShow.form.formFieldRelation[i].formField.type == 'FILE' ||
|
|
2201
2058
|
this.formShow.form.formFieldRelation[i].formField.type == 'IMAGE' ||
|
|
2202
2059
|
this.formShow.form.formFieldRelation[i].formField.type == 'VIDEO' ||
|
|
2203
2060
|
this.formShow.form.formFieldRelation[i].formField.type == 'ATTACHMENT')) {
|
|
2204
|
-
let value=[]
|
|
2205
|
-
this.extInfoFieldValue[this.formShow.form.formFieldRelation[i].fieldId].forEach(item=>{
|
|
2061
|
+
let value = []
|
|
2062
|
+
this.extInfoFieldValue[this.formShow.form.formFieldRelation[i].fieldId].forEach(item => {
|
|
2206
2063
|
let file = {}
|
|
2207
2064
|
file.name = item.name
|
|
2208
2065
|
file.url = item.url
|
|
2209
2066
|
value.push(file)
|
|
2210
2067
|
})
|
|
2211
|
-
if (this.formShow.form.formFieldRelation[i].formField.type == 'FILE'){
|
|
2068
|
+
if (this.formShow.form.formFieldRelation[i].formField.type == 'FILE') {
|
|
2212
2069
|
this.formShow.form.formFieldRelation[i].value = value
|
|
2213
2070
|
}
|
|
2214
2071
|
else {
|
|
2215
|
-
this.formShow.form.formFieldRelation[i].value = value.map(item=>{
|
|
2072
|
+
this.formShow.form.formFieldRelation[i].value = value.map(item => {
|
|
2216
2073
|
return item.name
|
|
2217
2074
|
})
|
|
2218
2075
|
}
|
|
2219
2076
|
|
|
2220
2077
|
}
|
|
2221
2078
|
let isRequired = true;
|
|
2222
|
-
if (this.mainId == '3e83057a1bd74b79b86859ad619fdbbb' || this.mainId == 'ab0f90737c8b4f2d85ba2157e4473110' || this.mainId == '86dc09da570948d2b4841122d732f373'){
|
|
2079
|
+
if (this.mainId == '3e83057a1bd74b79b86859ad619fdbbb' || this.mainId == 'ab0f90737c8b4f2d85ba2157e4473110' || this.mainId == '86dc09da570948d2b4841122d732f373') {
|
|
2223
2080
|
isRequired = false
|
|
2224
2081
|
}
|
|
2225
2082
|
/*针对蒙牛企业在对话中系统名称字段暂时不做校验*/
|
|
2226
|
-
if(this.formShow.form.formFieldRelation[i].display &&
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2083
|
+
if (this.formShow.form.formFieldRelation[i].display &&
|
|
2084
|
+
(this.formShow.form.formFieldRelation[i].required || this.isRequiredFn(this.formShow.form.formFieldRelation[i].formField)) &&
|
|
2085
|
+
this.formShow.form.formFieldRelation[i].fieldId !== 'workorder_name' &&
|
|
2086
|
+
((!isRequired && this.formShow.form.formFieldRelation[i].fieldId !== '0feca81fce97465da537248c066e4db8' && this.formShow.form.formFieldRelation[i].fieldId !== '1d8bd21485834773a6d18eae60013000') || isRequired) &&
|
|
2087
|
+
this.formShow.form.formFieldRelation[i].formField.type !== 'EXPLANATION') {
|
|
2231
2088
|
let value = "";
|
|
2232
2089
|
let bool = {}
|
|
2233
2090
|
bool[this.formShow.form.formFieldRelation[i].fieldId] = false
|
|
2234
|
-
if (this.formShow.form.formFieldRelation[i].formField.type === 'INPUT' || this.formShow.form.formFieldRelation[i].formField.type === 'TEXTAREA'){
|
|
2235
|
-
value = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n')?this.formShow.form.formFieldRelation[i].value:'';
|
|
2091
|
+
if (this.formShow.form.formFieldRelation[i].formField.type === 'INPUT' || this.formShow.form.formFieldRelation[i].formField.type === 'TEXTAREA') {
|
|
2092
|
+
value = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n') ? this.formShow.form.formFieldRelation[i].value : '';
|
|
2236
2093
|
let strVal = '';
|
|
2237
|
-
if(value){
|
|
2238
|
-
strVal = value.replace(/\n/g,'');
|
|
2094
|
+
if (value) {
|
|
2095
|
+
strVal = value.replace(/\n/g, '');
|
|
2239
2096
|
}
|
|
2240
2097
|
bool[this.formShow.form.formFieldRelation[i].fieldId] = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n') && !strVal
|
|
2241
2098
|
}
|
|
2242
2099
|
if (this.formShow.form.formFieldRelation[i].relationDisplay && this.formShow.form.formFieldRelation[i].display && this.formShow.form.formFieldRelation[i].fieldId !== 'workorder_description') {
|
|
2243
|
-
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)) {
|
|
2244
|
-
this.$message.error('
|
|
2100
|
+
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)) {
|
|
2101
|
+
this.$message.error(this.$t('formTemplate.pleaseImprove' )+ this.formShow.form.formFieldRelation[i].formField.name)
|
|
2245
2102
|
return
|
|
2246
2103
|
}
|
|
2247
2104
|
}
|
|
2248
2105
|
}
|
|
2249
2106
|
}
|
|
2250
2107
|
let extInfo = {
|
|
2251
|
-
extInfoFieldValue:this.extInfoFieldValue,
|
|
2252
|
-
attachmentList:this.attachmentList,
|
|
2253
|
-
attachments: this.attachmentList.map(item =>{ return item.url})
|
|
2108
|
+
extInfoFieldValue: this.extInfoFieldValue,
|
|
2109
|
+
attachmentList: this.attachmentList,
|
|
2110
|
+
attachments: this.attachmentList.map(item => { return item.url })
|
|
2254
2111
|
}
|
|
2255
|
-
this.$set(this.formShow,'extInfo',extInfo)
|
|
2112
|
+
this.$set(this.formShow, 'extInfo', extInfo)
|
|
2256
2113
|
let newForm = JSON.parse(JSON.stringify(this.formShow));
|
|
2257
|
-
for (let i=0;i<newForm.form.formFieldRelation.length;i++){
|
|
2258
|
-
if (newForm.form.formFieldRelation[i].fieldId === 'workorder_description'){
|
|
2259
|
-
newForm.form.formFieldRelation[i].value =
|
|
2114
|
+
for (let i = 0; i < newForm.form.formFieldRelation.length; i++) {
|
|
2115
|
+
if (newForm.form.formFieldRelation[i].fieldId === 'workorder_description') {
|
|
2116
|
+
newForm.form.formFieldRelation[i].value = newForm.form.formFieldRelation[i].value.replace(/<img/g, "<img onclick='previewImage(this)' ")
|
|
2260
2117
|
console.log(newForm.form.formFieldRelation[i]);
|
|
2261
2118
|
}
|
|
2262
2119
|
if (newForm.form.formFieldRelation[i].formField.type === "TIME_PICKER" &&
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
!(newForm.form.formFieldRelation[i].value.length === 8 && newForm.form.formFieldRelation[i].value.split(":").length === 3)){
|
|
2120
|
+
(!newForm.form.formFieldRelation[i].formField.extInfo.mold ||
|
|
2121
|
+
newForm.form.formFieldRelation[i].formField.extInfo.mold == 'TIME' ||
|
|
2122
|
+
this.getMoldTime(newForm.form.formFieldRelation[i].formField) == 'TIME') &&
|
|
2123
|
+
newForm.form.formFieldRelation[i].value &&
|
|
2124
|
+
!(newForm.form.formFieldRelation[i].value.length === 5 && newForm.form.formFieldRelation[i].value.split(":").length === 2) &&
|
|
2125
|
+
!(newForm.form.formFieldRelation[i].value.length === 8 && newForm.form.formFieldRelation[i].value.split(":").length === 3)) {
|
|
2269
2126
|
newForm.form.formFieldRelation[i].value = new Date(newForm.form.formFieldRelation[i].value).Format('hh:mm')
|
|
2270
2127
|
}
|
|
2271
2128
|
}
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2129
|
+
console.error('formShow', newForm)
|
|
2130
|
+
this.$emit('submitClick', newForm)
|
|
2131
|
+
this.disableds = true
|
|
2132
|
+
this.submitValue = this.$t('common.submited')
|
|
2276
2133
|
},
|
|
2277
2134
|
strIsNull (str) {
|
|
2278
2135
|
if (str == "") return true;
|
|
@@ -2281,12 +2138,11 @@ export default {
|
|
|
2281
2138
|
return re.test(str);
|
|
2282
2139
|
},
|
|
2283
2140
|
//日期的点击事件
|
|
2284
|
-
dateClick(id) {
|
|
2285
|
-
if(this.disableds === false)
|
|
2286
|
-
{
|
|
2141
|
+
dateClick (id) {
|
|
2142
|
+
if (this.disableds === false) {
|
|
2287
2143
|
// for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2288
2144
|
// if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
2289
|
-
|
|
2145
|
+
|
|
2290
2146
|
// break
|
|
2291
2147
|
// }
|
|
2292
2148
|
// }
|
|
@@ -2296,40 +2152,39 @@ export default {
|
|
|
2296
2152
|
|
|
2297
2153
|
},
|
|
2298
2154
|
//时间的点击事件
|
|
2299
|
-
timeClick(id,item,type) {
|
|
2300
|
-
if (this.disableds){
|
|
2155
|
+
timeClick (id, item, type) {
|
|
2156
|
+
if (this.disableds) {
|
|
2301
2157
|
return
|
|
2302
2158
|
}
|
|
2303
|
-
if (item.value === undefined || item.value === null){
|
|
2304
|
-
this.$set(item,'value',"")
|
|
2159
|
+
if (item.value === undefined || item.value === null) {
|
|
2160
|
+
this.$set(item, 'value', "")
|
|
2305
2161
|
}
|
|
2306
2162
|
this.timeDetailData = item
|
|
2307
|
-
if (type == 'DATE'){
|
|
2163
|
+
if (type == 'DATE') {
|
|
2308
2164
|
this.datePicker = true
|
|
2309
2165
|
}
|
|
2310
|
-
else if (type == 'TIME'){
|
|
2166
|
+
else if (type == 'TIME') {
|
|
2311
2167
|
this.timePicker = true
|
|
2312
2168
|
}
|
|
2313
|
-
else if (type == 'DATE_TIME'){
|
|
2169
|
+
else if (type == 'DATE_TIME') {
|
|
2314
2170
|
this.dateTimePicker = true
|
|
2315
2171
|
}
|
|
2316
2172
|
},
|
|
2317
2173
|
//下拉的点击事件
|
|
2318
|
-
selectClick(id,type,item) {
|
|
2319
|
-
if (this.disableds){
|
|
2174
|
+
selectClick (id, type, item) {
|
|
2175
|
+
if (this.disableds) {
|
|
2320
2176
|
return
|
|
2321
2177
|
}
|
|
2322
|
-
if (item.value === undefined || item.value === null){
|
|
2323
|
-
this.$set(item,'value',"")
|
|
2178
|
+
if (item.value === undefined || item.value === null) {
|
|
2179
|
+
this.$set(item, 'value', "")
|
|
2324
2180
|
}
|
|
2325
2181
|
this.selectDetail = item;
|
|
2326
2182
|
this.defaultValue = []
|
|
2327
|
-
if(type == 'client') {
|
|
2183
|
+
if (type == 'client') {
|
|
2328
2184
|
let selectOption
|
|
2329
|
-
this.selectValue=[]
|
|
2185
|
+
this.selectValue = []
|
|
2330
2186
|
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2331
|
-
if(this.formShow.form.formFieldRelation[i].formField.type==='SELECT' || this.formShow.form.formFieldRelation[i].formField.type==='OPTION')
|
|
2332
|
-
{
|
|
2187
|
+
if (this.formShow.form.formFieldRelation[i].formField.type === 'SELECT' || this.formShow.form.formFieldRelation[i].formField.type === 'OPTION') {
|
|
2333
2188
|
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
2334
2189
|
console.debug('11')
|
|
2335
2190
|
selectOption = this.selectOptions(this.formShow.form.formFieldRelation[i].formField)
|
|
@@ -2342,31 +2197,31 @@ export default {
|
|
|
2342
2197
|
}
|
|
2343
2198
|
this.selectId = id
|
|
2344
2199
|
this.showPicker = true
|
|
2345
|
-
} else if (type == 'ref'){
|
|
2200
|
+
} else if (type == 'ref') {
|
|
2346
2201
|
this.refShowPicker = true;
|
|
2347
|
-
this.refTemplateVisibleChange(true,item);
|
|
2348
|
-
this.refDefaultValue[item.fieldId] = item.value?[item.value]:[]
|
|
2349
|
-
} else if (type == 'select'){
|
|
2202
|
+
this.refTemplateVisibleChange(true, item);
|
|
2203
|
+
this.refDefaultValue[item.fieldId] = item.value ? [item.value] : []
|
|
2204
|
+
} else if (type == 'select') {
|
|
2350
2205
|
this.selectPicker = true;
|
|
2351
|
-
if (item.formField.extInfo){
|
|
2206
|
+
if (item.formField.extInfo) {
|
|
2352
2207
|
this.optionsList[id] = this.optionsLists(item)
|
|
2353
2208
|
}
|
|
2354
2209
|
else {
|
|
2355
2210
|
this.optionsList[id] = []
|
|
2356
2211
|
}
|
|
2357
|
-
if (Array.isArray(this.selectDetail.value)){
|
|
2212
|
+
if (Array.isArray(this.selectDetail.value)) {
|
|
2358
2213
|
this.defaultValue = this.selectDetail.value
|
|
2359
2214
|
}
|
|
2360
2215
|
else {
|
|
2361
2216
|
this.defaultValue = [this.selectDetail.value]
|
|
2362
2217
|
}
|
|
2363
2218
|
}
|
|
2364
|
-
if (item){
|
|
2219
|
+
if (item) {
|
|
2365
2220
|
this.detailField = item;
|
|
2366
2221
|
}
|
|
2367
2222
|
},
|
|
2368
|
-
SelectClear(fieldId) {
|
|
2369
|
-
if(this.disableds === false){
|
|
2223
|
+
SelectClear (fieldId) {
|
|
2224
|
+
if (this.disableds === false) {
|
|
2370
2225
|
let i = this.formShow.form.formFieldRelation.findIndex(item => { console.log(item.fieldId); return item.fieldId == fieldId })
|
|
2371
2226
|
this.selectValues[this.formShow.form.formFieldRelation[i].fieldId] = '';
|
|
2372
2227
|
this.formShow.form.formFieldRelation[i].value = "";
|
|
@@ -2376,47 +2231,43 @@ export default {
|
|
|
2376
2231
|
}
|
|
2377
2232
|
},
|
|
2378
2233
|
//级联的点击的事件
|
|
2379
|
-
pickerClick(id) {
|
|
2380
|
-
if(this.disableds === false)
|
|
2381
|
-
|
|
2382
|
-
if(this.pickerId!==id)
|
|
2383
|
-
{
|
|
2234
|
+
pickerClick (id) {
|
|
2235
|
+
if (this.disableds === false) {
|
|
2236
|
+
if (this.pickerId !== id) {
|
|
2384
2237
|
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2385
2238
|
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
2386
|
-
this.keyValue=''
|
|
2387
|
-
if(this.formShow.form.formFieldRelation[i].value.length!==undefined)
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
{
|
|
2391
|
-
this.keyValue+=this.formShow.form.formFieldRelation[i].value[m]
|
|
2239
|
+
this.keyValue = ''
|
|
2240
|
+
if (this.formShow.form.formFieldRelation[i].value.length !== undefined) {
|
|
2241
|
+
for (let m = 0; m < this.formShow.form.formFieldRelation[i].value.length; m++) {
|
|
2242
|
+
this.keyValue += this.formShow.form.formFieldRelation[i].value[m]
|
|
2392
2243
|
}
|
|
2393
2244
|
}
|
|
2394
|
-
this.data
|
|
2395
|
-
if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascade){
|
|
2396
|
-
this.data
|
|
2245
|
+
this.data = []
|
|
2246
|
+
if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascade) {
|
|
2247
|
+
this.data = this.formShow.form.formFieldRelation[i].formField.extInfo.cascade
|
|
2397
2248
|
}
|
|
2398
|
-
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown.options){
|
|
2399
|
-
this.data
|
|
2249
|
+
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown.options) {
|
|
2250
|
+
this.data = this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown.options
|
|
2400
2251
|
}
|
|
2401
|
-
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0]){
|
|
2402
|
-
this.data
|
|
2252
|
+
else if (this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown && this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0]) {
|
|
2253
|
+
this.data = this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0].options
|
|
2403
2254
|
}
|
|
2404
2255
|
this.column[0].values = Object.values(this.data).map(function (e) {
|
|
2405
|
-
return {text: e.value, code: e.value}
|
|
2256
|
+
return { text: e.value, code: e.value }
|
|
2406
2257
|
})
|
|
2407
2258
|
if (this.data[0].children !== undefined) {
|
|
2408
2259
|
this.column[1].values = Object.values(this.data[0].children).map(function (e) {
|
|
2409
|
-
return {text: e.value, code: e.value}
|
|
2260
|
+
return { text: e.value, code: e.value }
|
|
2410
2261
|
})
|
|
2411
2262
|
if (this.data[0].children[0].children !== undefined) {
|
|
2412
2263
|
this.column[2].values = Object.values(this.data[0].children[0].children).map(function (e) {
|
|
2413
|
-
return {text: e.value, code: e.value}
|
|
2264
|
+
return { text: e.value, code: e.value }
|
|
2414
2265
|
})
|
|
2415
2266
|
}
|
|
2416
2267
|
else {
|
|
2417
2268
|
this.$set(this.data[0].children[0], 'children', [])
|
|
2418
|
-
this.column[2].values=Object.values(this.data[0].children[0].children).map(function (res) {
|
|
2419
|
-
return {text: res.value, code: res.value};
|
|
2269
|
+
this.column[2].values = Object.values(this.data[0].children[0].children).map(function (res) {
|
|
2270
|
+
return { text: res.value, code: res.value };
|
|
2420
2271
|
})
|
|
2421
2272
|
}
|
|
2422
2273
|
}
|
|
@@ -2430,37 +2281,31 @@ export default {
|
|
|
2430
2281
|
|
|
2431
2282
|
|
|
2432
2283
|
},
|
|
2433
|
-
onChange(picker, values,index) {
|
|
2284
|
+
onChange (picker, values, index) {
|
|
2434
2285
|
// 这里我有可能渲染的有问题,导致回调每次都修改了当前列,其他值没有修改,当前列??(当前列什么鬼呀,什么垃圾啊???) 解释一下 ↓↓
|
|
2435
2286
|
// 因为vant的 van-picker 回调只会返回你修改的那一列,比如现在为 [北京,北京,东城区],你修改了省为[天津市,天津市,和平区],但是vant的change回调会得到[天津市,北京,东城区],后面两个在回调中没有修改,不知道我的渲染方法有问题还是什么问题。
|
|
2436
2287
|
// 所以我在这里判断change事件触发后,如果你修改了省份的话,回调里面省份会改变,但是市和区还是上一个省份的 市和区,这时我们执行回调修改省,市,区的时候,因为回调只有省改变了,市和区DOM改变了,但是回调里面没改变的问题(不晓得什么问题),这时我们去找省下面的 市,我们取回调的市名称,如果在省下面没有找到这个市,默认展示第一个市,区也默认展示第一个市下面的区,如果遍历市能查到,就去展示对应的市。
|
|
2437
2288
|
// 回调时修改第2列数据
|
|
2438
|
-
if (index == 0){
|
|
2289
|
+
if (index == 0) {
|
|
2439
2290
|
picker.setColumnValues(2, []); // 防止突然选中第一个,第二个是更新的,但第三个联级不更新,我暂时强制清空
|
|
2440
2291
|
}
|
|
2441
|
-
let ColumnIndexss=picker.getIndexes()
|
|
2442
|
-
let testValue=''
|
|
2443
|
-
this.$nextTick(()=>{
|
|
2444
|
-
if(index == 0)
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
if(this.data[ColumnIndexss[0]].children[0]!==undefined)
|
|
2449
|
-
{
|
|
2450
|
-
testValue=this.data[ColumnIndexss[0]].children[0].value
|
|
2292
|
+
let ColumnIndexss = picker.getIndexes()
|
|
2293
|
+
let testValue = ''
|
|
2294
|
+
this.$nextTick(() => {
|
|
2295
|
+
if (index == 0) {
|
|
2296
|
+
if (this.data[ColumnIndexss[0]].children.length > 0) {
|
|
2297
|
+
if (this.data[ColumnIndexss[0]].children[0] !== undefined) {
|
|
2298
|
+
testValue = this.data[ColumnIndexss[0]].children[0].value
|
|
2451
2299
|
picker.setColumnValues(2, this.county(this.data, testValue));
|
|
2452
2300
|
}
|
|
2453
2301
|
}
|
|
2454
2302
|
else
|
|
2455
2303
|
picker.setColumnValues(2, []);
|
|
2456
2304
|
}
|
|
2457
|
-
if(index == 1)
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
if(this.data[ColumnIndexss[0]].children[ColumnIndexss[1]]!==undefined)
|
|
2462
|
-
{
|
|
2463
|
-
testValue=this.data[ColumnIndexss[0]].children[ColumnIndexss[1]].value
|
|
2305
|
+
if (index == 1) {
|
|
2306
|
+
if (this.data[ColumnIndexss[0]].children.length > 0) {
|
|
2307
|
+
if (this.data[ColumnIndexss[0]].children[ColumnIndexss[1]] !== undefined) {
|
|
2308
|
+
testValue = this.data[ColumnIndexss[0]].children[ColumnIndexss[1]].value
|
|
2464
2309
|
picker.setColumnValues(2, this.county(this.data, testValue));
|
|
2465
2310
|
}
|
|
2466
2311
|
}
|
|
@@ -2475,27 +2320,27 @@ export default {
|
|
|
2475
2320
|
|
|
2476
2321
|
},
|
|
2477
2322
|
// 修改级联第二级 这里不再多说什么了根据自己的数据格式来
|
|
2478
|
-
cityDate(data, province) {
|
|
2323
|
+
cityDate (data, province) {
|
|
2479
2324
|
var that = this;
|
|
2480
2325
|
data.forEach(function (res) {
|
|
2481
2326
|
if (res.value == province) {
|
|
2482
2327
|
that.cityDates = res;
|
|
2483
2328
|
}
|
|
2484
2329
|
});
|
|
2485
|
-
if (that.cityDates.children !== undefined&&that.cityDates.children.length > 0) {
|
|
2330
|
+
if (that.cityDates.children !== undefined && that.cityDates.children.length > 0) {
|
|
2486
2331
|
return that.cityDates.children.map(function (res) {
|
|
2487
|
-
return {text: res.value, code: res.value};
|
|
2332
|
+
return { text: res.value, code: res.value };
|
|
2488
2333
|
})
|
|
2489
2334
|
} else {
|
|
2490
2335
|
this.$set(that.cityDates, 'children', [])
|
|
2491
2336
|
return that.cityDates.children.map(function (res) {
|
|
2492
|
-
return {text: res.value, code: res.value};
|
|
2337
|
+
return { text: res.value, code: res.value };
|
|
2493
2338
|
})
|
|
2494
2339
|
}
|
|
2495
2340
|
// return 返回数据格式,因为我需要省市区code,所以我return的格式是对象,例:[{text:'北京市',code:'1'},{text:'河南省',code:'2'},...],如果你不需要code直接这样就可以 例['北京市','河南省',.....]
|
|
2496
2341
|
},
|
|
2497
2342
|
// 修改级联第三级 这里不再多说什么了根据自己的数据格式来
|
|
2498
|
-
county(data, county) {
|
|
2343
|
+
county (data, county) {
|
|
2499
2344
|
var that = this;
|
|
2500
2345
|
var countyDate = '';
|
|
2501
2346
|
// 因为vant的 van-picker 回调只会返回你修改的那一列,比如现在为 [北京,北京,东城区],你修改了省为[天津市,天津市,和平区],但是vant的change回调会得到[天津市,北京,东城区],后面两个在回调中没有修改,不知道我的渲染方法有问题还是什么问题。
|
|
@@ -2507,8 +2352,7 @@ export default {
|
|
|
2507
2352
|
});
|
|
2508
2353
|
// 这里如果没有找到对应的县
|
|
2509
2354
|
if (countyDate == '') {
|
|
2510
|
-
if(that.cityDates.children.length > 0)
|
|
2511
|
-
{
|
|
2355
|
+
if (that.cityDates.children.length > 0) {
|
|
2512
2356
|
countyDate = that.cityDates.children[0];
|
|
2513
2357
|
}
|
|
2514
2358
|
|
|
@@ -2517,18 +2361,18 @@ export default {
|
|
|
2517
2361
|
if (countyDate.children === undefined) {
|
|
2518
2362
|
this.$set(countyDate, 'children', [])
|
|
2519
2363
|
return countyDate.children.map(function (res) {
|
|
2520
|
-
return {text: res.value, code: res.value};
|
|
2364
|
+
return { text: res.value, code: res.value };
|
|
2521
2365
|
})
|
|
2522
2366
|
} else {
|
|
2523
2367
|
return countyDate.children.map(function (res) {
|
|
2524
|
-
return {text: res.value, code: res.value};
|
|
2368
|
+
return { text: res.value, code: res.value };
|
|
2525
2369
|
})
|
|
2526
2370
|
}
|
|
2527
2371
|
|
|
2528
2372
|
// return 返回数据格式,因为我需要省市区code,所以我return的格式是对象,例:[{text:'北京市',code:'1'},{text:'河南省',code:'2'},...],如果你不需要code直接这样就可以 例['北京市','河南省',.....]
|
|
2529
2373
|
},
|
|
2530
2374
|
//点击级联弹出框的确认按钮
|
|
2531
|
-
onConfirms(val, id) {
|
|
2375
|
+
onConfirms (val, id) {
|
|
2532
2376
|
let test = ''
|
|
2533
2377
|
for (let i = 0; i < val.length; i++) {
|
|
2534
2378
|
if (val[i] !== undefined) {
|
|
@@ -2537,7 +2381,7 @@ export default {
|
|
|
2537
2381
|
}
|
|
2538
2382
|
test = test.substr(0, test.length - 1)
|
|
2539
2383
|
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2540
|
-
if (this.formShow.form.formFieldRelation[i].fieldId=== id) {
|
|
2384
|
+
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
2541
2385
|
this.cascadeValue[id] = test
|
|
2542
2386
|
for (let j = 0; j < val.length; j++) {
|
|
2543
2387
|
if (val[j] !== undefined) {
|
|
@@ -2548,12 +2392,12 @@ export default {
|
|
|
2548
2392
|
}
|
|
2549
2393
|
}
|
|
2550
2394
|
this.showArea = false;
|
|
2551
|
-
sessionStorage.setItem('cascader',test)
|
|
2395
|
+
sessionStorage.setItem('cascader', test)
|
|
2552
2396
|
},
|
|
2553
|
-
onCancel() {
|
|
2397
|
+
onCancel () {
|
|
2554
2398
|
this.showArea = false;
|
|
2555
2399
|
},
|
|
2556
|
-
aliyunOssRequest(data){
|
|
2400
|
+
aliyunOssRequest (data) {
|
|
2557
2401
|
|
|
2558
2402
|
this.loading = this.$loading({
|
|
2559
2403
|
lock: true,
|
|
@@ -2564,9 +2408,9 @@ export default {
|
|
|
2564
2408
|
let file = data.file;
|
|
2565
2409
|
console.debug("upload file:", file);
|
|
2566
2410
|
let imgInfo = {
|
|
2567
|
-
status:'',
|
|
2568
|
-
url:'',
|
|
2569
|
-
name:''
|
|
2411
|
+
status: '',
|
|
2412
|
+
url: '',
|
|
2413
|
+
name: ''
|
|
2570
2414
|
}
|
|
2571
2415
|
/* let imageData = {
|
|
2572
2416
|
id:cid,
|
|
@@ -2578,10 +2422,10 @@ export default {
|
|
|
2578
2422
|
},
|
|
2579
2423
|
};*/
|
|
2580
2424
|
let res = multipartUpload(
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2425
|
+
this.ossConfig,
|
|
2426
|
+
file,
|
|
2427
|
+
null,
|
|
2428
|
+
imgInfo
|
|
2585
2429
|
);
|
|
2586
2430
|
res.then((res) => {
|
|
2587
2431
|
console.debug("upload result:", res);
|
|
@@ -2592,13 +2436,13 @@ export default {
|
|
|
2592
2436
|
);
|
|
2593
2437
|
console.log('imageData',imageData)*/
|
|
2594
2438
|
imgInfo.url = ossFileUrl(this.ossConfig, res.name)
|
|
2595
|
-
imgInfo.status='success'
|
|
2596
|
-
if (data.file){
|
|
2439
|
+
imgInfo.status = 'success'
|
|
2440
|
+
if (data.file) {
|
|
2597
2441
|
imgInfo.name = data.file.name
|
|
2598
2442
|
imgInfo.uid = data.file.uid
|
|
2599
2443
|
}
|
|
2600
|
-
if (!this.extInfoFieldValue[this.filedId]){
|
|
2601
|
-
this.$set(this.extInfoFieldValue,this.filedId,[])
|
|
2444
|
+
if (!this.extInfoFieldValue[this.filedId]) {
|
|
2445
|
+
this.$set(this.extInfoFieldValue, this.filedId, [])
|
|
2602
2446
|
}
|
|
2603
2447
|
this.extInfoFieldValue[this.filedId].push(imgInfo)
|
|
2604
2448
|
this.loading.close()
|
|
@@ -2606,20 +2450,20 @@ export default {
|
|
|
2606
2450
|
console.debug("upload err", err);
|
|
2607
2451
|
});
|
|
2608
2452
|
},
|
|
2609
|
-
successUpload(response,file,fileList){
|
|
2610
|
-
if (!this.extInfoFieldValue[this.filedId]){
|
|
2453
|
+
successUpload (response, file, fileList) {
|
|
2454
|
+
if (!this.extInfoFieldValue[this.filedId]) {
|
|
2611
2455
|
this.extInfoFieldValue[this.filedId] = []
|
|
2612
2456
|
}
|
|
2613
|
-
for (let i=0;i<fileList.length;i++){
|
|
2614
|
-
if (!this.extInfoFieldValue[this.filedId][i]){
|
|
2615
|
-
this.extInfoFieldValue[this.filedId][i]={}
|
|
2457
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
2458
|
+
if (!this.extInfoFieldValue[this.filedId][i]) {
|
|
2459
|
+
this.extInfoFieldValue[this.filedId][i] = {}
|
|
2616
2460
|
}
|
|
2617
|
-
this.extInfoFieldValue[this.filedId][i].url=fileList[i].url
|
|
2618
|
-
this.extInfoFieldValue[this.filedId][i].name=fileList[i].name
|
|
2619
|
-
this.extInfoFieldValue[this.filedId][i].status=fileList[i].status
|
|
2461
|
+
this.extInfoFieldValue[this.filedId][i].url = fileList[i].url
|
|
2462
|
+
this.extInfoFieldValue[this.filedId][i].name = fileList[i].name
|
|
2463
|
+
this.extInfoFieldValue[this.filedId][i].status = fileList[i].status
|
|
2620
2464
|
}
|
|
2621
2465
|
},
|
|
2622
|
-
uploadProgress(){
|
|
2466
|
+
uploadProgress () {
|
|
2623
2467
|
this.loading = this.$loading({
|
|
2624
2468
|
lock: true,
|
|
2625
2469
|
text: 'Loading',
|
|
@@ -2627,26 +2471,25 @@ export default {
|
|
|
2627
2471
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
2628
2472
|
});
|
|
2629
2473
|
},
|
|
2630
|
-
handleRemove(file) {
|
|
2631
|
-
if (this.extInfoFieldValue[this.filedId]){
|
|
2632
|
-
for (let i=0;i<this.extInfoFieldValue[this.filedId].length;i++)
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
this.extInfoFieldValue[this.filedId].splice(i,1)
|
|
2474
|
+
handleRemove (file) {
|
|
2475
|
+
if (this.extInfoFieldValue[this.filedId]) {
|
|
2476
|
+
for (let i = 0; i < this.extInfoFieldValue[this.filedId].length; i++) {
|
|
2477
|
+
if (this.extInfoFieldValue[this.filedId][i].uid) {
|
|
2478
|
+
if (this.extInfoFieldValue[this.filedId][i].uid === file.uid) {
|
|
2479
|
+
this.extInfoFieldValue[this.filedId].splice(i, 1)
|
|
2637
2480
|
return
|
|
2638
2481
|
}
|
|
2639
2482
|
}
|
|
2640
|
-
else if (this.extInfoFieldValue[this.filedId][i].url===file.url){
|
|
2641
|
-
this.extInfoFieldValue[this.filedId].splice(i,1)
|
|
2483
|
+
else if (this.extInfoFieldValue[this.filedId][i].url === file.url) {
|
|
2484
|
+
this.extInfoFieldValue[this.filedId].splice(i, 1)
|
|
2642
2485
|
return
|
|
2643
2486
|
}
|
|
2644
2487
|
}
|
|
2645
2488
|
|
|
2646
2489
|
}
|
|
2647
2490
|
},
|
|
2648
|
-
handleEditChange(file,fileList){
|
|
2649
|
-
this.hideUploadEdit=fileList.length >= this.limitNum
|
|
2491
|
+
handleEditChange (file, fileList) {
|
|
2492
|
+
this.hideUploadEdit = fileList.length >= this.limitNum
|
|
2650
2493
|
},
|
|
2651
2494
|
onUploadProgress: function (progress, point, file, videoData) {
|
|
2652
2495
|
console.debug("upload video progress", progress, point);
|
|
@@ -2660,16 +2503,16 @@ export default {
|
|
|
2660
2503
|
|
|
2661
2504
|
}
|
|
2662
2505
|
},
|
|
2663
|
-
checkUpload(id,extInfo){
|
|
2664
|
-
this.filedId=id
|
|
2665
|
-
this.limitNum = extInfo.limitNum?extInfo.limitNum:(extInfo.limit?extInfo.limit:1)
|
|
2506
|
+
checkUpload (id, extInfo) {
|
|
2507
|
+
this.filedId = id
|
|
2508
|
+
this.limitNum = extInfo.limitNum ? extInfo.limitNum : (extInfo.limit ? extInfo.limit : 1)
|
|
2666
2509
|
|
|
2667
2510
|
},
|
|
2668
|
-
beforeAvatarUpload(file,type){
|
|
2669
|
-
if (type === 'IMAGE'){
|
|
2511
|
+
beforeAvatarUpload (file, type) {
|
|
2512
|
+
if (type === 'IMAGE') {
|
|
2670
2513
|
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
2671
|
-
const isSupportedFormat =file.type.indexOf('image')
|
|
2672
|
-
if (!isSupportedFormat){
|
|
2514
|
+
const isSupportedFormat = file.type.indexOf('image') !== -1
|
|
2515
|
+
if (!isSupportedFormat) {
|
|
2673
2516
|
this.$message.error("只能上传图片格式");
|
|
2674
2517
|
return false
|
|
2675
2518
|
}
|
|
@@ -2679,20 +2522,20 @@ export default {
|
|
|
2679
2522
|
}
|
|
2680
2523
|
return true
|
|
2681
2524
|
}
|
|
2682
|
-
else if (type === 'VIDEO'){
|
|
2525
|
+
else if (type === 'VIDEO') {
|
|
2683
2526
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
2684
|
-
const isSupportedFormat =file.type.indexOf('video')
|
|
2685
|
-
if (!isSupportedFormat){
|
|
2527
|
+
const isSupportedFormat = file.type.indexOf('video') !== -1
|
|
2528
|
+
if (!isSupportedFormat) {
|
|
2686
2529
|
this.$message.error("只能上传视频格式");
|
|
2687
2530
|
return false
|
|
2688
2531
|
}
|
|
2689
|
-
if (!isLte2M&&isSupportedFormat) {
|
|
2532
|
+
if (!isLte2M && isSupportedFormat) {
|
|
2690
2533
|
this.$message.error("上传视频大小不能超过100MB!");
|
|
2691
2534
|
return false
|
|
2692
2535
|
}
|
|
2693
2536
|
return true
|
|
2694
2537
|
}
|
|
2695
|
-
else if (type === 'FILE' || type === 'ATTACHMENT'){
|
|
2538
|
+
else if (type === 'FILE' || type === 'ATTACHMENT') {
|
|
2696
2539
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
2697
2540
|
if (!isLte2M) {
|
|
2698
2541
|
this.$message.error("上传附件大小不能超过100MB!");
|
|
@@ -2702,27 +2545,27 @@ export default {
|
|
|
2702
2545
|
}
|
|
2703
2546
|
|
|
2704
2547
|
},
|
|
2705
|
-
exceedUpload(){
|
|
2548
|
+
exceedUpload () {
|
|
2706
2549
|
this.$message({
|
|
2707
|
-
message:"上传文件数量达到上限",
|
|
2708
|
-
duration:2000,
|
|
2709
|
-
type:'warning'
|
|
2550
|
+
message: "上传文件数量达到上限",
|
|
2551
|
+
duration: 2000,
|
|
2552
|
+
type: 'warning'
|
|
2710
2553
|
})
|
|
2711
2554
|
},
|
|
2712
2555
|
|
|
2713
|
-
handlePictureCardPreview(file) {
|
|
2556
|
+
handlePictureCardPreview (file) {
|
|
2714
2557
|
this.videoFlag = true;
|
|
2715
2558
|
this.videoUploadPercent = file.percentage.toFixed(0);
|
|
2716
2559
|
},
|
|
2717
|
-
refTemplateVisibleChange(visible,field) {
|
|
2718
|
-
console.debug('field1111',field)
|
|
2560
|
+
refTemplateVisibleChange (visible, field) {
|
|
2561
|
+
console.debug('field1111', field)
|
|
2719
2562
|
let fields = field.formField.type === 'REF' ? field.formField.extInfo.ref.field : field.formField.extInfo.ref.vars
|
|
2720
2563
|
if (visible) {
|
|
2721
2564
|
if (
|
|
2722
2565
|
!this.refNextPage[field.fieldId] || this.refNextPage[field.fieldId].hasNextPage
|
|
2723
2566
|
) {
|
|
2724
2567
|
this.$set(this.refTemplateList, field.fieldId, [])
|
|
2725
|
-
!this.dataQuery[field.fieldId] &&
|
|
2568
|
+
!this.dataQuery[field.fieldId] && this.$set(this.dataQuery, field.fieldId, {
|
|
2726
2569
|
filterId: '',
|
|
2727
2570
|
keywords: '',
|
|
2728
2571
|
pageInfo: {
|
|
@@ -2733,24 +2576,24 @@ export default {
|
|
|
2733
2576
|
templateId: ''
|
|
2734
2577
|
})
|
|
2735
2578
|
let param = {
|
|
2736
|
-
templateId:field.formField.extInfo.ref.source,
|
|
2737
|
-
fieldId:fields,
|
|
2738
|
-
field:field,
|
|
2739
|
-
dataQuery:this.dataQuery,
|
|
2740
|
-
refNextPage:this.refNextPage
|
|
2579
|
+
templateId: field.formField.extInfo.ref.source,
|
|
2580
|
+
fieldId: fields,
|
|
2581
|
+
field: field,
|
|
2582
|
+
dataQuery: this.dataQuery,
|
|
2583
|
+
refNextPage: this.refNextPage
|
|
2741
2584
|
}
|
|
2742
|
-
this.$emit('getTemplateList',param)
|
|
2585
|
+
this.$emit('getTemplateList', param)
|
|
2743
2586
|
}
|
|
2744
2587
|
}
|
|
2745
2588
|
},
|
|
2746
|
-
changeRefData(value, item) {
|
|
2589
|
+
changeRefData (value, item) {
|
|
2747
2590
|
console.log(value);
|
|
2748
2591
|
console.debug('value', value, item, this.refTemplateList[item.fieldId])
|
|
2749
2592
|
let arr = []
|
|
2750
2593
|
if (this.refTemplateList[item.fieldId]) {
|
|
2751
2594
|
this.refTemplateList[item.fieldId].forEach(data => {
|
|
2752
|
-
if(typeof value == 'string' || typeof value == 'number') {
|
|
2753
|
-
if(value == data.id) {
|
|
2595
|
+
if (typeof value == 'string' || typeof value == 'number') {
|
|
2596
|
+
if (value == data.id) {
|
|
2754
2597
|
let obj = {
|
|
2755
2598
|
name: data.name,
|
|
2756
2599
|
id: data.id
|
|
@@ -2770,27 +2613,27 @@ export default {
|
|
|
2770
2613
|
}
|
|
2771
2614
|
this.extInfoFieldValue[item.fieldId] = arr
|
|
2772
2615
|
},
|
|
2773
|
-
setOptionWidth(){
|
|
2616
|
+
setOptionWidth () {
|
|
2774
2617
|
this.selectOptionWidth = event.srcElement.offsetParent.offsetWidth + 40 + "px";
|
|
2775
2618
|
},
|
|
2776
|
-
lodeMore(item) {
|
|
2619
|
+
lodeMore (item) {
|
|
2777
2620
|
this.dataQuery[item.fieldId].pageInfo.pageNo += 1
|
|
2778
|
-
this.refTemplateVisibleChange(true,item)
|
|
2621
|
+
this.refTemplateVisibleChange(true, item)
|
|
2779
2622
|
},
|
|
2780
2623
|
//点击左侧备注图标提示
|
|
2781
|
-
leftIcon(remark){
|
|
2624
|
+
leftIcon (remark) {
|
|
2782
2625
|
this.$toast({
|
|
2783
|
-
message:remark.text,
|
|
2784
|
-
duration:2000,
|
|
2626
|
+
message: remark.text,
|
|
2627
|
+
duration: 2000,
|
|
2785
2628
|
})
|
|
2786
2629
|
},
|
|
2787
2630
|
//校验输入框
|
|
2788
|
-
typeCheck(field,item){
|
|
2789
|
-
if (!item.value){
|
|
2631
|
+
typeCheck (field, item) {
|
|
2632
|
+
if (!item.value) {
|
|
2790
2633
|
return
|
|
2791
2634
|
}
|
|
2792
|
-
console.debug('typeCheck',field)
|
|
2793
|
-
if (field.extInfo.inputType==='MOBILE'){
|
|
2635
|
+
console.debug('typeCheck', field)
|
|
2636
|
+
if (field.extInfo.inputType === 'MOBILE') {
|
|
2794
2637
|
const phone = /^[1][3,4,5,7,8][0-9]{9}$/
|
|
2795
2638
|
if (!phone.test(item.value)) {
|
|
2796
2639
|
this.$message({
|
|
@@ -2802,9 +2645,9 @@ export default {
|
|
|
2802
2645
|
return
|
|
2803
2646
|
}
|
|
2804
2647
|
}
|
|
2805
|
-
else if (field.extInfo.inputType ==='MAIL'){
|
|
2648
|
+
else if (field.extInfo.inputType === 'MAIL') {
|
|
2806
2649
|
const reg =
|
|
2807
|
-
|
|
2650
|
+
/^([a-z0-9A-Z]+[-|_|\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\.)+[a-zA-Z]{2,4}$/;
|
|
2808
2651
|
if (!reg.test(item.value)) {
|
|
2809
2652
|
this.$message({
|
|
2810
2653
|
message: "请输入有效的邮箱",
|
|
@@ -2816,7 +2659,7 @@ export default {
|
|
|
2816
2659
|
}
|
|
2817
2660
|
|
|
2818
2661
|
}
|
|
2819
|
-
else if (field.extInfo.inputType === 'ID_CARD'){
|
|
2662
|
+
else if (field.extInfo.inputType === 'ID_CARD') {
|
|
2820
2663
|
const reg = /^(([1-9][0-9]{5}(19|20)[0-9]{2}((0[1-9])|(1[0-2]))([0-2][1-9]|10|20|30|31)[0-9]{3}([0-9]|X|x))|([1-9][0-9]{5}[0-9]{2}((0[1-9])|(1[0-2]))([0-2][1-9]|10|20|30|31)[0-9]{3}))$/
|
|
2821
2664
|
if (!reg.test(item.value)) {
|
|
2822
2665
|
this.$message({
|
|
@@ -2828,7 +2671,7 @@ export default {
|
|
|
2828
2671
|
return
|
|
2829
2672
|
}
|
|
2830
2673
|
}
|
|
2831
|
-
else if (field.extInfo.inputType ==='LINK'){
|
|
2674
|
+
else if (field.extInfo.inputType === 'LINK') {
|
|
2832
2675
|
const reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])/;
|
|
2833
2676
|
if (!reg.test(item.value)) {
|
|
2834
2677
|
this.$message({
|
|
@@ -2840,27 +2683,30 @@ export default {
|
|
|
2840
2683
|
return
|
|
2841
2684
|
}
|
|
2842
2685
|
}
|
|
2843
|
-
else if (field.extInfo.inputType ==='NUMBER'||field.extInfo.inputType ==='RATE'){
|
|
2844
|
-
if (
|
|
2686
|
+
else if (field.extInfo.inputType === 'NUMBER' || field.extInfo.inputType === 'RATE') {
|
|
2687
|
+
if (item.value < Number(field.extInfo.range.start)) {
|
|
2845
2688
|
item.value = Number(field.extInfo.range.start)
|
|
2846
2689
|
}
|
|
2847
|
-
else if (item.value > Number(field.extInfo.range.end)){
|
|
2690
|
+
else if (item.value > Number(field.extInfo.range.end)) {
|
|
2848
2691
|
item.value = Number(field.extInfo.range.end)
|
|
2849
2692
|
}
|
|
2850
2693
|
}
|
|
2851
2694
|
},
|
|
2852
2695
|
//打开级联/下拉抽屉选择
|
|
2853
|
-
openDrawer(field,type){
|
|
2696
|
+
openDrawer (field, type) {
|
|
2854
2697
|
this.detailField = field;
|
|
2855
|
-
if (type == 'cascader' || type === 'pc_cascader'){
|
|
2856
|
-
|
|
2698
|
+
if (type == 'cascader' || type === 'pc_cascader') {
|
|
2699
|
+
console.log(field.formField.extInfo, 'fieldfield');
|
|
2700
|
+
if (type == 'cascader') {
|
|
2857
2701
|
this.showArea = true;
|
|
2858
2702
|
}
|
|
2859
2703
|
else {
|
|
2860
2704
|
this.drawer = true;
|
|
2861
2705
|
}
|
|
2862
|
-
|
|
2863
|
-
|
|
2706
|
+
// 判断来源是否是 webhook 打开对应弹窗,webhook 的级联字段只能选择到最后一级的选项
|
|
2707
|
+
this.webHookCascader = Boolean(field.formField.extInfo && field.formField.extInfo.WebHookParameter)
|
|
2708
|
+
this.$nextTick(() => {
|
|
2709
|
+
let arr = this.extInfoFieldValue[field.fieldId] ? this.extInfoFieldValue[field.fieldId] : []
|
|
2864
2710
|
let drawerTree = this.$refs.drawerTree
|
|
2865
2711
|
if (drawerTree) {
|
|
2866
2712
|
if (Array.isArray(drawerTree)) {
|
|
@@ -2875,37 +2721,37 @@ export default {
|
|
|
2875
2721
|
}
|
|
2876
2722
|
})
|
|
2877
2723
|
}
|
|
2878
|
-
else if (type === 'select'){
|
|
2879
|
-
this.options = field.formField.extInfo.option?field.formField.extInfo.option:field.formField.extInfo.options;
|
|
2724
|
+
else if (type === 'select') {
|
|
2725
|
+
this.options = field.formField.extInfo.option ? field.formField.extInfo.option : field.formField.extInfo.options;
|
|
2880
2726
|
this.selectPopUp = true;
|
|
2881
|
-
if (!this.detailField.value){
|
|
2727
|
+
if (!this.detailField.value) {
|
|
2882
2728
|
return
|
|
2883
2729
|
}
|
|
2884
|
-
if (Array.isArray(this.detailField.value)){
|
|
2730
|
+
if (Array.isArray(this.detailField.value)) {
|
|
2885
2731
|
this.defaultValue = this.detailField.value
|
|
2886
2732
|
}
|
|
2887
2733
|
else {
|
|
2888
2734
|
this.defaultValue = [this.detailField.value]
|
|
2889
2735
|
}
|
|
2890
|
-
console.debug('selectPopUp',this.selectPopUp,this.options)
|
|
2736
|
+
console.debug('selectPopUp', this.selectPopUp, this.options)
|
|
2891
2737
|
}
|
|
2892
2738
|
},
|
|
2893
2739
|
//保存级联数据
|
|
2894
|
-
saveData(checkList,checkDatas){
|
|
2740
|
+
saveData (checkList, checkDatas) {
|
|
2895
2741
|
this.clearOptionStruct();
|
|
2896
|
-
this.$set(this.detailField,'value',checkList);
|
|
2742
|
+
this.$set(this.detailField, 'value', checkList);
|
|
2897
2743
|
this.extInfoFieldValue[this.detailField.fieldId] = checkDatas;
|
|
2898
|
-
this.$set(this.detailField.formField.extInfo,'extInfoFieldValue',checkDatas);
|
|
2899
|
-
console.debug('checkDatas',this.detailField.formField.extInfo,checkList);
|
|
2744
|
+
this.$set(this.detailField.formField.extInfo, 'extInfoFieldValue', checkDatas);
|
|
2745
|
+
console.debug('checkDatas', this.detailField.formField.extInfo, checkList);
|
|
2900
2746
|
this.changeSelect(this.detailField);
|
|
2901
2747
|
this.$forceUpdate();
|
|
2902
2748
|
this.showArea = false;
|
|
2903
2749
|
this.drawer = false;
|
|
2904
2750
|
},
|
|
2905
2751
|
//保存所选下拉值
|
|
2906
|
-
confirmSelect(option, list){
|
|
2907
|
-
console.debug('option',option,list)
|
|
2908
|
-
if (!option || !list){
|
|
2752
|
+
confirmSelect (option, list) {
|
|
2753
|
+
console.debug('option', option, list)
|
|
2754
|
+
if (!option || !list) {
|
|
2909
2755
|
this.selectPopUp = false
|
|
2910
2756
|
this.selectPicker = false
|
|
2911
2757
|
return
|
|
@@ -2913,22 +2759,22 @@ export default {
|
|
|
2913
2759
|
this.detailField.value = list;
|
|
2914
2760
|
this.selectPopUp = false
|
|
2915
2761
|
this.selectPicker = false;
|
|
2916
|
-
if (this.detailField.formField.type === 'SELECT' && this.detailField.formField.extInfo.selectType !== '多选'){
|
|
2762
|
+
if (this.detailField.formField.type === 'SELECT' && this.detailField.formField.extInfo.selectType !== '多选') {
|
|
2917
2763
|
this.changeSelect(this.detailField);
|
|
2918
2764
|
}
|
|
2919
2765
|
this.$forceUpdate();
|
|
2920
2766
|
},
|
|
2921
2767
|
//保存ref类型值
|
|
2922
|
-
confirmRefSelect(option, list){
|
|
2923
|
-
console.debug('options',option,list,this.selectDetail)
|
|
2924
|
-
if (!option || !list){
|
|
2768
|
+
confirmRefSelect (option, list) {
|
|
2769
|
+
console.debug('options', option, list, this.selectDetail)
|
|
2770
|
+
if (!option || !list) {
|
|
2925
2771
|
this.refShowPicker = false;
|
|
2926
2772
|
return
|
|
2927
2773
|
}
|
|
2928
2774
|
this.selectDetail.value = list;
|
|
2929
2775
|
let val = ''
|
|
2930
|
-
if (Array.isArray(option)){
|
|
2931
|
-
val = option.map(item=>{
|
|
2776
|
+
if (Array.isArray(option)) {
|
|
2777
|
+
val = option.map(item => {
|
|
2932
2778
|
return item.id
|
|
2933
2779
|
})
|
|
2934
2780
|
this.extInfoFieldValue[this.selectDetail.fieldId] = option
|
|
@@ -2940,59 +2786,59 @@ export default {
|
|
|
2940
2786
|
this.refShowPicker = false;
|
|
2941
2787
|
},
|
|
2942
2788
|
// 一个重复的方法 兼容 状态优先级 的关联控件,
|
|
2943
|
-
relationSet(field,list) {
|
|
2789
|
+
relationSet (field, list) {
|
|
2944
2790
|
let flag = false
|
|
2945
2791
|
// 如果在extInfo下有该字段,表示已被关联,否则根据 类型去判断 retrun true 或者false
|
|
2946
|
-
if(field.extInfo && field.extInfo[list] && Object.keys(field.extInfo[list]).length !== 0) {
|
|
2792
|
+
if (field.extInfo && field.extInfo[list] && Object.keys(field.extInfo[list]).length !== 0) {
|
|
2947
2793
|
for (const key in field.extInfo[list]) {
|
|
2948
2794
|
const element = field.extInfo[list][key];
|
|
2949
2795
|
let orderFieldValue = ""
|
|
2950
|
-
for (let i=0;i<this.formShow.form.formFieldRelation.length;i++){
|
|
2951
|
-
if (key === this.formShow.form.formFieldRelation[i].fieldId || key === this.formShow.form.formFieldRelation[i].formField.workOrderFieldId){
|
|
2796
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
2797
|
+
if (key === this.formShow.form.formFieldRelation[i].fieldId || key === this.formShow.form.formFieldRelation[i].formField.workOrderFieldId) {
|
|
2952
2798
|
orderFieldValue = this.formShow.form.formFieldRelation[i].value
|
|
2953
2799
|
break
|
|
2954
2800
|
}
|
|
2955
2801
|
}
|
|
2956
|
-
console.debug('orderFieldValue',orderFieldValue)
|
|
2957
|
-
if(orderFieldValue) {
|
|
2958
|
-
if(Array.isArray(orderFieldValue)) {
|
|
2959
|
-
if(Array.isArray(element)) {
|
|
2802
|
+
console.debug('orderFieldValue', orderFieldValue)
|
|
2803
|
+
if (orderFieldValue) {
|
|
2804
|
+
if (Array.isArray(orderFieldValue)) {
|
|
2805
|
+
if (Array.isArray(element)) {
|
|
2960
2806
|
for (let index = 0; index < element.length; index++) {
|
|
2961
|
-
flag = orderFieldValue.some(item =>{ return item == element[index] })
|
|
2962
|
-
if(flag) {
|
|
2807
|
+
flag = orderFieldValue.some(item => { return item == element[index] })
|
|
2808
|
+
if (flag) {
|
|
2963
2809
|
return flag
|
|
2964
2810
|
}
|
|
2965
2811
|
}
|
|
2966
2812
|
} else {
|
|
2967
|
-
flag = orderFieldValue.some(item =>{ return item == element })
|
|
2968
|
-
if(flag) {
|
|
2813
|
+
flag = orderFieldValue.some(item => { return item == element })
|
|
2814
|
+
if (flag) {
|
|
2969
2815
|
return flag
|
|
2970
2816
|
}
|
|
2971
2817
|
}
|
|
2972
2818
|
} else {
|
|
2973
|
-
if(Array.isArray(element)) {
|
|
2819
|
+
if (Array.isArray(element)) {
|
|
2974
2820
|
for (let index = 0; index < element.length; index++) {
|
|
2975
|
-
flag =
|
|
2976
|
-
if(flag) {
|
|
2821
|
+
flag = element[index] == orderFieldValue
|
|
2822
|
+
if (flag) {
|
|
2977
2823
|
return flag
|
|
2978
2824
|
}
|
|
2979
2825
|
}
|
|
2980
2826
|
} else {
|
|
2981
|
-
flag =
|
|
2982
|
-
if(flag) {
|
|
2827
|
+
flag = element == orderFieldValue
|
|
2828
|
+
if (flag) {
|
|
2983
2829
|
return flag
|
|
2984
2830
|
}
|
|
2985
2831
|
}
|
|
2986
2832
|
|
|
2987
2833
|
}
|
|
2988
2834
|
}
|
|
2989
|
-
else if(list == 'dependentFieldId') {
|
|
2990
|
-
return
|
|
2835
|
+
else if (list == 'dependentFieldId') {
|
|
2836
|
+
return flag = false
|
|
2991
2837
|
}
|
|
2992
2838
|
}
|
|
2993
|
-
} else if(list == 'dependentFieldId') {
|
|
2839
|
+
} else if (list == 'dependentFieldId') {
|
|
2994
2840
|
return flag = true
|
|
2995
|
-
} else if(list == 'requiredDependentFieldId') {
|
|
2841
|
+
} else if (list == 'requiredDependentFieldId') {
|
|
2996
2842
|
return flag = false
|
|
2997
2843
|
}
|
|
2998
2844
|
return flag
|
|
@@ -3001,40 +2847,40 @@ export default {
|
|
|
3001
2847
|
// this.attachments.splice(index, 1)
|
|
3002
2848
|
this.attachmentList.splice(index, 1)
|
|
3003
2849
|
},
|
|
3004
|
-
attachDeleteFile(index,fieldId){
|
|
3005
|
-
this.extInfoFieldValue[fieldId].splice(index,1)
|
|
2850
|
+
attachDeleteFile (index, fieldId) {
|
|
2851
|
+
this.extInfoFieldValue[fieldId].splice(index, 1)
|
|
3006
2852
|
},
|
|
3007
|
-
desUploadImageAndFile({type, param}) {
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
2853
|
+
desUploadImageAndFile ({ type, param }) {
|
|
2854
|
+
if (param.type == 'pending') {
|
|
2855
|
+
this.attachmentList.push({
|
|
2856
|
+
url: '',
|
|
2857
|
+
name: param.name,
|
|
2858
|
+
id: param.uid
|
|
2859
|
+
})
|
|
2860
|
+
} else {
|
|
2861
|
+
this.attachmentList.forEach(item => {
|
|
2862
|
+
if (item.id == param.uid) {
|
|
2863
|
+
item.url = param.url
|
|
2864
|
+
delete item.uid
|
|
2865
|
+
}
|
|
2866
|
+
})
|
|
2867
|
+
}
|
|
3022
2868
|
},
|
|
3023
2869
|
},
|
|
3024
|
-
watch:{
|
|
3025
|
-
formFieldValus:{
|
|
3026
|
-
handler(value){
|
|
2870
|
+
watch: {
|
|
2871
|
+
formFieldValus: {
|
|
2872
|
+
handler (value) {
|
|
3027
2873
|
console.log(value);
|
|
3028
2874
|
},
|
|
3029
|
-
deep:true
|
|
2875
|
+
deep: true
|
|
3030
2876
|
},
|
|
3031
|
-
workOrderDes:{
|
|
3032
|
-
handler(val){
|
|
2877
|
+
workOrderDes: {
|
|
2878
|
+
handler (val) {
|
|
3033
2879
|
let newVal = ''
|
|
3034
2880
|
newVal = val.replace(/ style=".*?"/g, '');
|
|
3035
|
-
if (this.currentEditor){
|
|
3036
|
-
if (this.workOrderDestail){
|
|
3037
|
-
this.$nextTick(() =>{
|
|
2881
|
+
if (this.currentEditor) {
|
|
2882
|
+
if (this.workOrderDestail) {
|
|
2883
|
+
this.$nextTick(() => {
|
|
3038
2884
|
this.workOrderDestail.value = newVal;
|
|
3039
2885
|
})
|
|
3040
2886
|
}
|
|
@@ -3042,21 +2888,21 @@ export default {
|
|
|
3042
2888
|
writer.setSelection( writer.createPositionAt( this.currentEditor.model.document.getRoot(), 'end' ) );
|
|
3043
2889
|
});*/
|
|
3044
2890
|
}
|
|
3045
|
-
console.debug('workOrderDes',this.workOrderDestail)
|
|
2891
|
+
console.debug('workOrderDes', this.workOrderDestail)
|
|
3046
2892
|
},
|
|
3047
|
-
deep:true,
|
|
3048
|
-
immediate:true
|
|
2893
|
+
deep: true,
|
|
2894
|
+
immediate: true
|
|
3049
2895
|
},
|
|
3050
|
-
fieldValue:{
|
|
3051
|
-
handler(val){
|
|
3052
|
-
console.debug('val',val)
|
|
3053
|
-
setTimeout(()=>{
|
|
2896
|
+
fieldValue: {
|
|
2897
|
+
handler (val) {
|
|
2898
|
+
console.debug('val', val)
|
|
2899
|
+
setTimeout(() => {
|
|
3054
2900
|
this.fieldSetting()
|
|
3055
|
-
},0)
|
|
2901
|
+
}, 0)
|
|
3056
2902
|
this.listenField();
|
|
3057
2903
|
},
|
|
3058
|
-
deep:true,
|
|
3059
|
-
immediate:true
|
|
2904
|
+
deep: true,
|
|
2905
|
+
immediate: true
|
|
3060
2906
|
}
|
|
3061
2907
|
}
|
|
3062
2908
|
|
|
@@ -3069,131 +2915,155 @@ export default {
|
|
|
3069
2915
|
.notClick {
|
|
3070
2916
|
pointer-events: none;
|
|
3071
2917
|
}
|
|
3072
|
-
|
|
2918
|
+
|
|
2919
|
+
.formClass {
|
|
3073
2920
|
/* border: 1px solid #ebebeb;*/
|
|
3074
2921
|
font-family: "Avenir", Helvetica, Arial, sans-serif;
|
|
3075
2922
|
border-radius: 15px;
|
|
3076
|
-
|
|
2923
|
+
|
|
2924
|
+
.explanation {
|
|
3077
2925
|
display: flex;
|
|
3078
2926
|
padding: 4px;
|
|
3079
|
-
|
|
2927
|
+
|
|
2928
|
+
.explanation-p {
|
|
3080
2929
|
color: #366aff;
|
|
3081
2930
|
font-size: 14px;
|
|
3082
2931
|
margin: 10px 4px;
|
|
3083
|
-
|
|
2932
|
+
|
|
2933
|
+
.el-icon-info {
|
|
3084
2934
|
margin-right: 8px;
|
|
3085
2935
|
}
|
|
3086
2936
|
}
|
|
3087
2937
|
}
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
2938
|
+
|
|
2939
|
+
.explain-url {
|
|
2940
|
+
a {
|
|
2941
|
+
color: #366aff;
|
|
3091
2942
|
}
|
|
3092
2943
|
}
|
|
3093
|
-
|
|
2944
|
+
|
|
2945
|
+
.titleName {
|
|
3094
2946
|
font-size: 1em;
|
|
3095
2947
|
text-align: center;
|
|
3096
2948
|
padding-bottom: 10px;
|
|
3097
2949
|
display: flex;
|
|
3098
2950
|
align-items: center;
|
|
3099
2951
|
justify-content: center;
|
|
3100
|
-
|
|
2952
|
+
/* border-bottom: 1px solid #EEEEEE;*/
|
|
3101
2953
|
}
|
|
3102
|
-
|
|
2954
|
+
|
|
2955
|
+
.title-link {
|
|
3103
2956
|
height: 1px;
|
|
3104
2957
|
background-color: #EEEEEE;
|
|
3105
2958
|
}
|
|
3106
|
-
|
|
2959
|
+
|
|
2960
|
+
.bottom-link {
|
|
3107
2961
|
margin-top: 14px;
|
|
3108
2962
|
height: 1px;
|
|
3109
2963
|
background-color: #EEEEEE;
|
|
3110
2964
|
}
|
|
3111
|
-
|
|
2965
|
+
|
|
2966
|
+
.form-submit-btn {
|
|
3112
2967
|
padding: 14px 16px 0 16px;
|
|
3113
2968
|
text-align: center;
|
|
3114
2969
|
}
|
|
3115
|
-
|
|
3116
|
-
|
|
2970
|
+
|
|
2971
|
+
/deep/.ck.ck-editor {
|
|
2972
|
+
padding: 0 8px;
|
|
3117
2973
|
}
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
border-
|
|
3121
|
-
border-top-
|
|
2974
|
+
|
|
2975
|
+
/deep/.ck.ck-toolbar {
|
|
2976
|
+
border-color: #E0E6F7;
|
|
2977
|
+
border-top-left-radius: 9px !important;
|
|
2978
|
+
border-top-right-radius: 9px !important;
|
|
2979
|
+
|
|
3122
2980
|
.ck-toolbar__items {
|
|
3123
2981
|
.ck-button {
|
|
3124
2982
|
color: #366AFF;
|
|
2983
|
+
|
|
3125
2984
|
svg {
|
|
3126
2985
|
fill: #366AFF;
|
|
3127
2986
|
width: 12px !important;
|
|
3128
|
-
height: 12px !important;
|
|
2987
|
+
height: 12px !important;
|
|
3129
2988
|
margin-bottom: 2px;
|
|
3130
2989
|
}
|
|
3131
2990
|
}
|
|
3132
2991
|
}
|
|
3133
2992
|
}
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
border-bottom-
|
|
2993
|
+
|
|
2994
|
+
/deep/.ck.ck-editor__editable_inline {
|
|
2995
|
+
border-color: #E0E6F7;
|
|
2996
|
+
min-height: 150px !important;
|
|
2997
|
+
border-bottom-left-radius: 9px !important;
|
|
2998
|
+
border-bottom-right-radius: 9px !important;
|
|
3139
2999
|
}
|
|
3140
|
-
|
|
3141
|
-
|
|
3000
|
+
|
|
3001
|
+
/deep/.ck-editor__editable {
|
|
3002
|
+
img {
|
|
3142
3003
|
height: 140px;
|
|
3143
3004
|
// width: 80%;
|
|
3144
3005
|
object-fit: contain;
|
|
3145
3006
|
}
|
|
3007
|
+
|
|
3146
3008
|
.ck-widget_selected {
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3009
|
+
.ck-widget__type-around {
|
|
3010
|
+
display: none;
|
|
3011
|
+
}
|
|
3150
3012
|
}
|
|
3013
|
+
|
|
3151
3014
|
.ck-widget:hover {
|
|
3152
|
-
outline-color
|
|
3015
|
+
outline-color: #366aff;
|
|
3016
|
+
|
|
3153
3017
|
.ck-widget__type-around {
|
|
3154
3018
|
display: none;
|
|
3155
3019
|
}
|
|
3156
3020
|
}
|
|
3021
|
+
|
|
3157
3022
|
.ask-component-img-box {
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3023
|
+
width: auto;
|
|
3024
|
+
height: auto;
|
|
3025
|
+
display: inline-block;
|
|
3161
3026
|
}
|
|
3027
|
+
|
|
3162
3028
|
.ask-component-placeholder-span[type=upload] {
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3029
|
+
background-color: rgba(0, 89, 255, 0.2);
|
|
3030
|
+
display: inline-block;
|
|
3031
|
+
padding: 2px 5px;
|
|
3032
|
+
border-radius: 3px;
|
|
3033
|
+
padding-left: 20px;
|
|
3034
|
+
position: relative;
|
|
3169
3035
|
}
|
|
3036
|
+
|
|
3170
3037
|
.ask-component-placeholder-span[type=upload]::after {
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3038
|
+
content: '';
|
|
3039
|
+
background-image: url('../assets/image/building.png');
|
|
3040
|
+
background-size: 100%;
|
|
3041
|
+
width: 15px;
|
|
3042
|
+
height: 15px;
|
|
3043
|
+
position: absolute;
|
|
3044
|
+
top: 5px;
|
|
3045
|
+
left: 2px;
|
|
3046
|
+
color: #366AFF;
|
|
3047
|
+
animation: rotate 1.5s linear infinite;
|
|
3181
3048
|
}
|
|
3049
|
+
|
|
3182
3050
|
@keyframes rotate {
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3051
|
+
from {
|
|
3052
|
+
transform: rotate(0deg);
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
to {
|
|
3056
|
+
transform: rotate(360deg);
|
|
3057
|
+
}
|
|
3189
3058
|
}
|
|
3190
3059
|
|
|
3191
3060
|
}
|
|
3192
3061
|
|
|
3193
|
-
.cascader-class{
|
|
3062
|
+
.cascader-class {
|
|
3194
3063
|
padding: 10px 16px;
|
|
3195
3064
|
}
|
|
3196
|
-
|
|
3065
|
+
|
|
3066
|
+
.cascader-input {
|
|
3197
3067
|
-webkit-appearance: none;
|
|
3198
3068
|
background-image: none;
|
|
3199
3069
|
border: 1px solid #E0E6F7;
|
|
@@ -3205,50 +3075,58 @@ export default {
|
|
|
3205
3075
|
line-height: 40px;
|
|
3206
3076
|
outline: 0;
|
|
3207
3077
|
padding: 0 15px;
|
|
3208
|
-
-webkit-transition: border-color .2s cubic-bezier(.645
|
|
3209
|
-
transition: border-color .2s cubic-bezier(.645
|
|
3078
|
+
-webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
|
3079
|
+
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
|
|
3210
3080
|
width: 100%;
|
|
3211
|
-
background-color: transparent!important;
|
|
3212
|
-
border-radius: 9px!important;
|
|
3081
|
+
background-color: transparent !important;
|
|
3082
|
+
border-radius: 9px !important;
|
|
3213
3083
|
cursor: pointer;
|
|
3214
3084
|
font-size: 14px;
|
|
3215
3085
|
}
|
|
3216
|
-
|
|
3086
|
+
|
|
3087
|
+
.cascader-name {
|
|
3217
3088
|
color: #A9B3C6;
|
|
3218
3089
|
font-size: 1em;
|
|
3219
3090
|
padding-bottom: 8px;
|
|
3220
3091
|
}
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3092
|
+
|
|
3093
|
+
.form-field-file {
|
|
3094
|
+
#attachment-upload {
|
|
3095
|
+
/deep/.image-list {
|
|
3224
3096
|
padding: 0;
|
|
3225
3097
|
}
|
|
3226
3098
|
}
|
|
3227
3099
|
}
|
|
3228
3100
|
}
|
|
3229
|
-
|
|
3101
|
+
|
|
3102
|
+
.pcFormClass {
|
|
3230
3103
|
width: 400px;
|
|
3231
3104
|
margin: 0 auto;
|
|
3232
|
-
|
|
3105
|
+
|
|
3106
|
+
.field-item {
|
|
3233
3107
|
padding: 8px 0;
|
|
3234
|
-
|
|
3108
|
+
|
|
3109
|
+
.field-item-name {
|
|
3235
3110
|
padding-bottom: 8px;
|
|
3236
3111
|
color: #A9B3C6;
|
|
3237
|
-
|
|
3112
|
+
/* color: #000000;*/
|
|
3238
3113
|
}
|
|
3239
3114
|
}
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3115
|
+
|
|
3116
|
+
/deep/.el-input__inner {
|
|
3117
|
+
border-color: #E0E6F7 !important;
|
|
3118
|
+
background-color: transparent !important;
|
|
3119
|
+
border-radius: 9px !important;
|
|
3244
3120
|
}
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3121
|
+
|
|
3122
|
+
/deep/.el-textarea__inner {
|
|
3123
|
+
border-color: #E0E6F7 !important;
|
|
3124
|
+
background-color: transparent !important;
|
|
3125
|
+
border-radius: 9px !important;
|
|
3126
|
+
padding: 9px 15px !important;
|
|
3250
3127
|
}
|
|
3251
|
-
|
|
3128
|
+
|
|
3129
|
+
.upload-demo {
|
|
3252
3130
|
background-color: #FFFFFF;
|
|
3253
3131
|
border: 1px solid #E0E6F7;
|
|
3254
3132
|
border-radius: 10px;
|
|
@@ -3257,15 +3135,17 @@ export default {
|
|
|
3257
3135
|
vertical-align: top;
|
|
3258
3136
|
cursor: pointer;
|
|
3259
3137
|
text-align: center;
|
|
3260
|
-
font-size:28px;
|
|
3261
|
-
color
|
|
3138
|
+
font-size: 28px;
|
|
3139
|
+
color: #366AFF;
|
|
3262
3140
|
display: flex;
|
|
3263
3141
|
align-items: center;
|
|
3264
3142
|
justify-content: center;
|
|
3265
|
-
|
|
3143
|
+
|
|
3144
|
+
i {
|
|
3266
3145
|
color: #366AFF;
|
|
3267
3146
|
}
|
|
3268
|
-
|
|
3147
|
+
|
|
3148
|
+
/deep/.el-upload {
|
|
3269
3149
|
height: 100%;
|
|
3270
3150
|
width: 100%;
|
|
3271
3151
|
display: flex;
|
|
@@ -3273,7 +3153,8 @@ export default {
|
|
|
3273
3153
|
justify-content: center;
|
|
3274
3154
|
}
|
|
3275
3155
|
}
|
|
3276
|
-
|
|
3156
|
+
|
|
3157
|
+
/deep/.el-upload--picture-card {
|
|
3277
3158
|
background-color: #FFFFFF;
|
|
3278
3159
|
border: 1px solid #E0E6F7;
|
|
3279
3160
|
border-radius: 10px;
|
|
@@ -3282,41 +3163,49 @@ export default {
|
|
|
3282
3163
|
vertical-align: top;
|
|
3283
3164
|
cursor: pointer;
|
|
3284
3165
|
text-align: center;
|
|
3285
|
-
font-size:28px;
|
|
3286
|
-
color
|
|
3166
|
+
font-size: 28px;
|
|
3167
|
+
color: #366AFF;
|
|
3287
3168
|
display: flex;
|
|
3288
3169
|
align-items: center;
|
|
3289
3170
|
justify-content: center;
|
|
3290
|
-
|
|
3171
|
+
|
|
3172
|
+
i {
|
|
3291
3173
|
color: #366AFF;
|
|
3292
3174
|
}
|
|
3293
3175
|
}
|
|
3294
|
-
|
|
3176
|
+
|
|
3177
|
+
/deep/.el-select-dropdown__item.selected {
|
|
3295
3178
|
color: #366aff;
|
|
3296
3179
|
}
|
|
3297
|
-
|
|
3298
|
-
|
|
3180
|
+
|
|
3181
|
+
/deep/.el-upload-list--picture-card {
|
|
3182
|
+
.el-upload-list__item {
|
|
3299
3183
|
width: 74px;
|
|
3300
3184
|
height: 74px;
|
|
3301
3185
|
border-radius: 10px;
|
|
3302
3186
|
}
|
|
3303
3187
|
}
|
|
3304
|
-
|
|
3188
|
+
|
|
3189
|
+
/deep/.el-upload-list__item-name {
|
|
3305
3190
|
max-width: 180px;
|
|
3306
3191
|
}
|
|
3192
|
+
|
|
3307
3193
|
.hide .el-upload--picture-card {
|
|
3308
|
-
display: none!important;
|
|
3194
|
+
display: none !important;
|
|
3309
3195
|
}
|
|
3310
3196
|
}
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3197
|
+
|
|
3198
|
+
/deep/.van-radio__icon--checked .van-icon {
|
|
3199
|
+
background-color: #366aff !important;
|
|
3200
|
+
border-color: #366aff !important;
|
|
3314
3201
|
}
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3202
|
+
|
|
3203
|
+
/deep/.van-checkbox__icon--checked .van-icon {
|
|
3204
|
+
background-color: #366aff !important;
|
|
3205
|
+
border-color: #366aff !important;
|
|
3318
3206
|
}
|
|
3319
|
-
|
|
3207
|
+
|
|
3208
|
+
/deep/.vant-upload--picture-card {
|
|
3320
3209
|
background-color: #ffffff;
|
|
3321
3210
|
border: 1px solid #E0E6F7;
|
|
3322
3211
|
border-radius: 10px;
|
|
@@ -3325,92 +3214,111 @@ export default {
|
|
|
3325
3214
|
vertical-align: top;
|
|
3326
3215
|
cursor: pointer;
|
|
3327
3216
|
text-align: center;
|
|
3328
|
-
font-size:28px;
|
|
3329
|
-
color
|
|
3217
|
+
font-size: 28px;
|
|
3218
|
+
color: #8c939d;
|
|
3330
3219
|
display: flex;
|
|
3331
3220
|
align-items: center;
|
|
3332
3221
|
justify-content: center;
|
|
3333
|
-
|
|
3222
|
+
|
|
3223
|
+
i {
|
|
3334
3224
|
color: #366aff;
|
|
3335
3225
|
}
|
|
3336
3226
|
}
|
|
3337
|
-
|
|
3227
|
+
|
|
3228
|
+
/deep/.van-popup {
|
|
3338
3229
|
border-radius: 5px;
|
|
3339
3230
|
}
|
|
3340
|
-
|
|
3341
|
-
|
|
3231
|
+
|
|
3232
|
+
.remPhoneClassForm {
|
|
3233
|
+
.mobileFormClass {
|
|
3342
3234
|
width: calc(100vw - 110px);
|
|
3343
3235
|
background-color: white;
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3236
|
+
|
|
3237
|
+
.form-field-item {
|
|
3238
|
+
.form-field-item-value {
|
|
3239
|
+
/deep/.van-cell {
|
|
3347
3240
|
flex-direction: column;
|
|
3348
3241
|
padding: 8px 16px;
|
|
3349
3242
|
}
|
|
3350
|
-
|
|
3243
|
+
|
|
3244
|
+
/deep/.van-cell__value {
|
|
3351
3245
|
border: 1px solid #E0E6F7;
|
|
3352
3246
|
border-radius: 9px;
|
|
3353
3247
|
min-height: 40px;
|
|
3354
3248
|
padding: 0 10px;
|
|
3355
3249
|
}
|
|
3356
|
-
|
|
3357
|
-
|
|
3250
|
+
|
|
3251
|
+
/deep/.van-cell__right-icon {
|
|
3252
|
+
color: #999999 !important;
|
|
3358
3253
|
}
|
|
3359
|
-
|
|
3254
|
+
|
|
3255
|
+
.form-field-item-file {
|
|
3360
3256
|
padding: 10px 16px;
|
|
3361
|
-
|
|
3257
|
+
|
|
3258
|
+
.fileName {
|
|
3362
3259
|
padding-bottom: 8px;
|
|
3363
3260
|
color: #A9B3C6;
|
|
3364
|
-
|
|
3261
|
+
/* color: #000000;*/
|
|
3365
3262
|
}
|
|
3366
|
-
|
|
3367
|
-
|
|
3263
|
+
|
|
3264
|
+
#attachment-upload {
|
|
3265
|
+
/deep/.image-list {
|
|
3368
3266
|
padding: 0;
|
|
3369
3267
|
}
|
|
3370
3268
|
}
|
|
3371
3269
|
}
|
|
3372
|
-
|
|
3373
|
-
|
|
3270
|
+
|
|
3271
|
+
.workorder_description {
|
|
3272
|
+
/* padding: 8px 16px;*/
|
|
3374
3273
|
padding: 8px 0;
|
|
3274
|
+
|
|
3375
3275
|
/*font-size: 14px;*/
|
|
3376
|
-
.field-name{
|
|
3276
|
+
.field-name {
|
|
3377
3277
|
width: 100%;
|
|
3378
3278
|
text-align: left;
|
|
3379
3279
|
color: #A9B3C6;
|
|
3380
|
-
|
|
3280
|
+
/* color: #000000;*/
|
|
3381
3281
|
line-height: 1;
|
|
3382
3282
|
padding-bottom: 8px;
|
|
3383
3283
|
}
|
|
3284
|
+
|
|
3384
3285
|
/*.required-name{
|
|
3385
3286
|
margin-left: -6px;
|
|
3386
3287
|
}*/
|
|
3387
3288
|
|
|
3388
|
-
|
|
3289
|
+
/* /deep/.ck-content .image img{
|
|
3389
3290
|
max-width: 200px!important;
|
|
3390
3291
|
}*/
|
|
3391
3292
|
}
|
|
3392
3293
|
}
|
|
3393
|
-
|
|
3394
|
-
|
|
3294
|
+
|
|
3295
|
+
.form-field-item-other {
|
|
3296
|
+
/deep/.van-cell {
|
|
3395
3297
|
flex-direction: column;
|
|
3396
3298
|
}
|
|
3397
|
-
|
|
3299
|
+
|
|
3300
|
+
/deep/.van-cell__value {
|
|
3398
3301
|
min-height: 40px;
|
|
3399
3302
|
}
|
|
3400
3303
|
}
|
|
3401
|
-
|
|
3402
|
-
|
|
3304
|
+
|
|
3305
|
+
.explan-ation {
|
|
3306
|
+
.explan-ation-div {
|
|
3403
3307
|
display: flex;
|
|
3404
|
-
|
|
3308
|
+
/* padding: 4px 16px;*/
|
|
3405
3309
|
padding: 4px;
|
|
3406
3310
|
}
|
|
3407
|
-
|
|
3408
|
-
|
|
3311
|
+
|
|
3312
|
+
.explan-ation-p {
|
|
3313
|
+
color: #366aff;
|
|
3314
|
+
font-size: 14px;
|
|
3315
|
+
margin: 16px 4px;
|
|
3409
3316
|
}
|
|
3410
3317
|
}
|
|
3411
3318
|
}
|
|
3412
|
-
|
|
3413
|
-
|
|
3319
|
+
|
|
3320
|
+
.upload-phone-demo {
|
|
3321
|
+
/deep/.el-upload--picture-card {
|
|
3414
3322
|
background-color: #fbfdff;
|
|
3415
3323
|
border: 1px dashed #c0ccda;
|
|
3416
3324
|
border-radius: 6px;
|
|
@@ -3419,61 +3327,71 @@ export default {
|
|
|
3419
3327
|
vertical-align: top;
|
|
3420
3328
|
cursor: pointer;
|
|
3421
3329
|
text-align: center;
|
|
3422
|
-
font-size:28px;
|
|
3423
|
-
color
|
|
3330
|
+
font-size: 28px;
|
|
3331
|
+
color: #8c939d;
|
|
3424
3332
|
display: flex;
|
|
3425
3333
|
align-items: center;
|
|
3426
3334
|
justify-content: center;
|
|
3427
3335
|
}
|
|
3428
|
-
|
|
3336
|
+
|
|
3337
|
+
/deep/.el-upload-list--picture-card .el-upload-list__item {
|
|
3429
3338
|
height: 76px;
|
|
3430
3339
|
width: 76px;
|
|
3431
3340
|
}
|
|
3432
3341
|
}
|
|
3433
|
-
|
|
3342
|
+
|
|
3343
|
+
/deep/.van-image__img {
|
|
3434
3344
|
border-radius: 10px;
|
|
3435
3345
|
}
|
|
3436
3346
|
}
|
|
3437
|
-
|
|
3347
|
+
|
|
3348
|
+
.submitClass {
|
|
3438
3349
|
min-width: 100px;
|
|
3439
3350
|
background-color: #366aff;
|
|
3440
|
-
color: white!important;
|
|
3351
|
+
color: white !important;
|
|
3441
3352
|
height: 32px;
|
|
3442
|
-
|
|
3353
|
+
|
|
3354
|
+
i {
|
|
3443
3355
|
padding-right: 8px;
|
|
3444
3356
|
font-weight: 600;
|
|
3445
3357
|
}
|
|
3446
3358
|
}
|
|
3447
|
-
|
|
3448
|
-
|
|
3359
|
+
|
|
3360
|
+
/deep/.van-radio-group--horizontal {
|
|
3361
|
+
.van-radio {
|
|
3449
3362
|
min-width: 100px;
|
|
3450
3363
|
max-width: 260px;
|
|
3451
3364
|
flex: none;
|
|
3452
3365
|
}
|
|
3453
|
-
|
|
3366
|
+
|
|
3367
|
+
.van-radio--horizontal {
|
|
3454
3368
|
padding: 0.3rem 0;
|
|
3455
3369
|
margin-right: 6px;
|
|
3456
3370
|
}
|
|
3457
3371
|
}
|
|
3458
|
-
|
|
3459
|
-
|
|
3372
|
+
|
|
3373
|
+
/deep/.van-checkbox-group--horizontal {
|
|
3374
|
+
.van-checkbox {
|
|
3460
3375
|
min-width: 100px;
|
|
3461
3376
|
max-width: 260px;
|
|
3462
3377
|
flex: none;
|
|
3463
3378
|
}
|
|
3464
|
-
|
|
3379
|
+
|
|
3380
|
+
.van-checkbox--horizontal {
|
|
3465
3381
|
padding: 0.3rem 0;
|
|
3466
3382
|
margin-right: 6px;
|
|
3467
3383
|
}
|
|
3468
3384
|
}
|
|
3469
|
-
|
|
3470
|
-
|
|
3385
|
+
|
|
3386
|
+
/deep/.van-button--info {
|
|
3387
|
+
border: 1px solid #366aff;
|
|
3471
3388
|
}
|
|
3472
|
-
|
|
3389
|
+
|
|
3390
|
+
/deep/.van-field__label {
|
|
3473
3391
|
width: 100%;
|
|
3474
3392
|
text-align: left;
|
|
3475
|
-
color: #A9B3C6!important;
|
|
3476
|
-
|
|
3393
|
+
color: #A9B3C6 !important;
|
|
3394
|
+
/* color: #000000!important;*/
|
|
3477
3395
|
display: flex;
|
|
3478
3396
|
align-items: center;
|
|
3479
3397
|
line-height: 1;
|
|
@@ -3481,49 +3399,57 @@ export default {
|
|
|
3481
3399
|
font-size: 1em;
|
|
3482
3400
|
}
|
|
3483
3401
|
|
|
3484
|
-
/deep/.van-field__control{
|
|
3402
|
+
/deep/.van-field__control {
|
|
3485
3403
|
min-height: 40px;
|
|
3486
3404
|
}
|
|
3487
|
-
|
|
3405
|
+
|
|
3406
|
+
/deep/textarea {
|
|
3488
3407
|
padding: 7px 0;
|
|
3489
3408
|
}
|
|
3490
|
-
|
|
3491
|
-
|
|
3409
|
+
|
|
3410
|
+
/deep/.van-dropdown-menu__bar {
|
|
3411
|
+
box-shadow: none !important;
|
|
3492
3412
|
}
|
|
3493
|
-
|
|
3494
|
-
|
|
3413
|
+
|
|
3414
|
+
/deep/.van-overlay {
|
|
3415
|
+
background-color: rgba(0, 0, 0, .4);
|
|
3495
3416
|
}
|
|
3496
3417
|
}
|
|
3497
3418
|
|
|
3498
|
-
.remCompanyClassForm{
|
|
3419
|
+
.remCompanyClassForm {
|
|
3499
3420
|
width: 100%;
|
|
3500
3421
|
font-size: 1em;
|
|
3501
|
-
|
|
3422
|
+
|
|
3423
|
+
.submitClass {
|
|
3502
3424
|
min-width: 100px;
|
|
3503
|
-
color: white!important;
|
|
3504
|
-
background-color
|
|
3425
|
+
color: white !important;
|
|
3426
|
+
background-color: #366aff;
|
|
3505
3427
|
border-color: #366aff;
|
|
3506
|
-
|
|
3428
|
+
|
|
3429
|
+
i {
|
|
3507
3430
|
padding-right: 8px;
|
|
3508
3431
|
font-weight: 600;
|
|
3509
3432
|
}
|
|
3510
3433
|
}
|
|
3511
|
-
|
|
3434
|
+
|
|
3435
|
+
/deep/.el-checkbox-group {
|
|
3512
3436
|
display: flex;
|
|
3513
3437
|
align-items: center;
|
|
3514
3438
|
flex-wrap: wrap;
|
|
3515
|
-
|
|
3439
|
+
|
|
3440
|
+
.el-checkbox {
|
|
3516
3441
|
padding: 8px 0;
|
|
3517
|
-
min-width:150px;
|
|
3442
|
+
min-width: 150px;
|
|
3518
3443
|
max-width: 280px;
|
|
3519
3444
|
flex: none;
|
|
3520
3445
|
display: flex;
|
|
3521
3446
|
overflow: hidden;
|
|
3522
3447
|
margin-right: 0;
|
|
3523
3448
|
display: flex;
|
|
3524
|
-
align-items:center;
|
|
3449
|
+
align-items: center;
|
|
3525
3450
|
}
|
|
3526
|
-
|
|
3451
|
+
|
|
3452
|
+
.el-checkbox__label {
|
|
3527
3453
|
font-size: 1em;
|
|
3528
3454
|
overflow: hidden;
|
|
3529
3455
|
text-overflow: ellipsis;
|
|
@@ -3531,20 +3457,22 @@ export default {
|
|
|
3531
3457
|
}
|
|
3532
3458
|
}
|
|
3533
3459
|
|
|
3534
|
-
/deep/.el-radio-group{
|
|
3460
|
+
/deep/.el-radio-group {
|
|
3535
3461
|
display: flex;
|
|
3536
3462
|
align-items: center;
|
|
3537
3463
|
flex-wrap: wrap;
|
|
3538
|
-
|
|
3464
|
+
|
|
3465
|
+
.el-radio {
|
|
3539
3466
|
padding: 8px 0;
|
|
3540
|
-
min-width:150px;
|
|
3467
|
+
min-width: 150px;
|
|
3541
3468
|
max-width: 280px;
|
|
3542
3469
|
flex: none;
|
|
3543
3470
|
display: flex;
|
|
3544
3471
|
overflow: hidden;
|
|
3545
3472
|
margin-right: 0;
|
|
3546
3473
|
}
|
|
3547
|
-
|
|
3474
|
+
|
|
3475
|
+
.el-radio__label {
|
|
3548
3476
|
overflow: hidden;
|
|
3549
3477
|
text-overflow: ellipsis;
|
|
3550
3478
|
white-space: nowrap;
|
|
@@ -3552,28 +3480,34 @@ export default {
|
|
|
3552
3480
|
}
|
|
3553
3481
|
}
|
|
3554
3482
|
|
|
3555
|
-
/deep/.el-radio__input.is-checked+.el-radio__label{
|
|
3556
|
-
color: #366aff!important;
|
|
3483
|
+
/deep/.el-radio__input.is-checked+.el-radio__label {
|
|
3484
|
+
color: #366aff !important;
|
|
3557
3485
|
}
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3486
|
+
|
|
3487
|
+
/deep/.el-radio__input.is-checked .el-radio__inner {
|
|
3488
|
+
color: #366aff !important;
|
|
3489
|
+
border-color: #366aff !important;
|
|
3490
|
+
background: #366aff !important;
|
|
3562
3491
|
}
|
|
3563
|
-
|
|
3564
|
-
|
|
3492
|
+
|
|
3493
|
+
/deep/.el-checkbox__input.is-checked+.el-checkbox__label {
|
|
3494
|
+
color: #366aff !important;
|
|
3565
3495
|
}
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3496
|
+
|
|
3497
|
+
/deep/.el-checkbox__input.is-checked .el-checkbox__inner,
|
|
3498
|
+
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
|
3499
|
+
background-color: #366aff !important;
|
|
3500
|
+
border-color: #366aff !important;
|
|
3569
3501
|
}
|
|
3502
|
+
|
|
3570
3503
|
/deep/.ck .ck-icon {
|
|
3571
3504
|
width: 14px !important;
|
|
3572
3505
|
height: 14px !important;
|
|
3573
3506
|
}
|
|
3574
3507
|
}
|
|
3575
|
-
|
|
3508
|
+
|
|
3509
|
+
.drawer-container {
|
|
3576
3510
|
height: 100%;
|
|
3577
3511
|
overflow: hidden;
|
|
3578
3512
|
}
|
|
3579
|
-
</style>
|
|
3513
|
+
</style>
|