askbot-dragon 0.7.99 → 0.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<ckeditor
|
|
56
56
|
:editor="ckeditor.editor"
|
|
57
57
|
v-model="item.value"
|
|
58
|
-
:config="ckeditor.editorConfig"
|
|
58
|
+
:config="{...ckeditor.editorConfig,placeholder:item.formField.extInfo && item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'}"
|
|
59
59
|
v-else-if="item.fieldId==='workorder_description'"
|
|
60
60
|
></ckeditor>
|
|
61
61
|
<el-date-picker
|
|
@@ -133,7 +133,22 @@
|
|
|
133
133
|
:value="items.value">
|
|
134
134
|
</el-option>
|
|
135
135
|
</el-select>
|
|
136
|
-
<
|
|
136
|
+
<el-select
|
|
137
|
+
v-model=item.value
|
|
138
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
139
|
+
style="width: 100%"
|
|
140
|
+
filterable
|
|
141
|
+
v-else
|
|
142
|
+
:multiple="item.formField.extInfo && item.formField.extInfo.selectType == '多选'"
|
|
143
|
+
>
|
|
144
|
+
<el-option
|
|
145
|
+
v-for="(items,index) in item.formField.extInfo.option?item.formField.extInfo.option:item.formField.extInfo.options"
|
|
146
|
+
:key="index"
|
|
147
|
+
:label="items.label"
|
|
148
|
+
:value="items.value">
|
|
149
|
+
</el-option>
|
|
150
|
+
</el-select>
|
|
151
|
+
<!-- <div class="cascader-input" v-else @click="openDrawer(item,'select')">
|
|
137
152
|
<template v-if="item.value && (!Array.isArray(item.value) || (Array.isArray(item.value) && item.value.length))">
|
|
138
153
|
<template v-if="Array.isArray(item.value)">
|
|
139
154
|
<span v-for="(select,selectIndex) in item.value" :key="selectIndex">
|
|
@@ -143,7 +158,7 @@
|
|
|
143
158
|
<template v-else>{{item.value}}</template>
|
|
144
159
|
</template>
|
|
145
160
|
<span v-else>{{item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'}}</span>
|
|
146
|
-
</div
|
|
161
|
+
</div>-->
|
|
147
162
|
</div>
|
|
148
163
|
<template v-else-if="item.formField.type==='CASCADER'">
|
|
149
164
|
<div class="cascader-input" @click="openDrawer(item,'pc_cascader')">
|
|
@@ -179,9 +194,9 @@
|
|
|
179
194
|
<div v-else-if="item.formField.type==='FILE' || item.formField.type === 'IMAGE' || item.formField.type === 'ATTACHMENT' || item.formField.type === 'VIDEO'">
|
|
180
195
|
<div @click="checkUpload(item.fieldId,item.formField.extInfo)" @mouseover="checkUpload(item.fieldId,item.formField.extInfo)" style="flex: 0.75;display:flex;align-items: center;">
|
|
181
196
|
<el-upload
|
|
182
|
-
|
|
197
|
+
|
|
183
198
|
ref="upload"
|
|
184
|
-
:list-type="item.formField.type === 'IMAGE'?'picture-card':''"
|
|
199
|
+
:list-type="item.formField.type === 'IMAGE' || item.formField.type==='FILE'?'picture-card':''"
|
|
185
200
|
:accept="acceptFieldType(item.formField.type)"
|
|
186
201
|
name="file"
|
|
187
202
|
action="/open/media/file/upload"
|
|
@@ -195,7 +210,9 @@
|
|
|
195
210
|
:on-change="handleEditChange"
|
|
196
211
|
:on-success="successUpload"
|
|
197
212
|
>
|
|
198
|
-
<
|
|
213
|
+
<div class="upload-demo">
|
|
214
|
+
<i class="el-icon-plus"></i>
|
|
215
|
+
</div>
|
|
199
216
|
<!-- <el-button size="small" type="primary" v-else class="uploadBtn">点击上传</el-button>-->
|
|
200
217
|
</el-upload>
|
|
201
218
|
</div>
|
|
@@ -210,13 +227,16 @@
|
|
|
210
227
|
@visible-change="(visible) =>{ return refTemplateVisibleChange(visible,item) }"
|
|
211
228
|
collapse-tags
|
|
212
229
|
@change="changeRefData($event,item)"
|
|
230
|
+
@focus="setOptionWidth"
|
|
213
231
|
>
|
|
214
232
|
<template v-for="(items,index) in refTemplateList[item.fieldId]">
|
|
215
233
|
<el-option
|
|
216
234
|
v-if="refTemplateList[item.fieldId]"
|
|
217
235
|
:key="index"
|
|
218
236
|
:label="items.name"
|
|
219
|
-
:value="items.id"
|
|
237
|
+
:value="items.id"
|
|
238
|
+
:style="{width:selectOptionWidth}"
|
|
239
|
+
>
|
|
220
240
|
</el-option>
|
|
221
241
|
</template>
|
|
222
242
|
<div
|
|
@@ -279,7 +299,7 @@
|
|
|
279
299
|
:editor="ckeditor.editor"
|
|
280
300
|
v-model="item.value"
|
|
281
301
|
@onReady="onReady"
|
|
282
|
-
:config="ckeditor.editorConfig"
|
|
302
|
+
:config="{...ckeditor.editorConfig,placeholder:item.formField.extInfo && item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'}"
|
|
283
303
|
></ckeditor>
|
|
284
304
|
</div>
|
|
285
305
|
</div>
|
|
@@ -569,6 +589,7 @@
|
|
|
569
589
|
:withHeader="false"
|
|
570
590
|
:visible.sync="drawer"
|
|
571
591
|
size="400px"
|
|
592
|
+
:append-to-body="true"
|
|
572
593
|
direction="btt">
|
|
573
594
|
<div class="drawer-container">
|
|
574
595
|
<tree ref="drawerTree"
|
|
@@ -721,7 +742,8 @@ export default {
|
|
|
721
742
|
defaultValue:[],
|
|
722
743
|
timeDetailData:{},
|
|
723
744
|
selectDetail:{},
|
|
724
|
-
refDefaultValue:{}
|
|
745
|
+
refDefaultValue:{},
|
|
746
|
+
selectOptionWidth:null,
|
|
725
747
|
}
|
|
726
748
|
},
|
|
727
749
|
props: {
|
|
@@ -805,7 +827,7 @@ export default {
|
|
|
805
827
|
return (type)=>{
|
|
806
828
|
console.debug('type',type)
|
|
807
829
|
if (type == 'FILE'){
|
|
808
|
-
return '
|
|
830
|
+
return 'image/*'
|
|
809
831
|
} else if( type == 'IMAGE') {
|
|
810
832
|
return 'image/*'
|
|
811
833
|
} else if(type == 'VIDEO') {
|
|
@@ -896,7 +918,7 @@ export default {
|
|
|
896
918
|
console.debug('file',file)
|
|
897
919
|
console.debug('fileType',!Array.isArray(file))
|
|
898
920
|
if (!Array.isArray(file)){
|
|
899
|
-
if (type === 'IMAGE'){
|
|
921
|
+
if (type === 'IMAGE' || type === 'FILE'){
|
|
900
922
|
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
901
923
|
const isSupportedFormat =file.type.indexOf('image')!==-1
|
|
902
924
|
if (!isSupportedFormat){
|
|
@@ -922,7 +944,7 @@ export default {
|
|
|
922
944
|
}
|
|
923
945
|
return true
|
|
924
946
|
}
|
|
925
|
-
else if (type === '
|
|
947
|
+
else if (type === 'ATTACHMENT'){
|
|
926
948
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
927
949
|
if (!isLte2M) {
|
|
928
950
|
this.$message.error("上传附件大小不能超过100MB!");
|
|
@@ -938,7 +960,7 @@ export default {
|
|
|
938
960
|
}
|
|
939
961
|
if (file.length<=this.limitNum-length){
|
|
940
962
|
for (let i=0;i<file.length;i++){
|
|
941
|
-
if (type === 'IMAGE'){
|
|
963
|
+
if (type === 'IMAGE' || type === 'FILE'){
|
|
942
964
|
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
943
965
|
const isSupportedFormat =file.type.indexOf('image')!==-1
|
|
944
966
|
if (!isSupportedFormat){
|
|
@@ -964,7 +986,7 @@ export default {
|
|
|
964
986
|
}
|
|
965
987
|
return true
|
|
966
988
|
}
|
|
967
|
-
else if (type === '
|
|
989
|
+
else if (type === 'ATTACHMENT'){
|
|
968
990
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
969
991
|
if (!isLte2M) {
|
|
970
992
|
this.$message.error("上传附件大小不能超过100MB!");
|
|
@@ -1453,9 +1475,15 @@ export default {
|
|
|
1453
1475
|
file.url = item.url
|
|
1454
1476
|
value.push(file)
|
|
1455
1477
|
})
|
|
1456
|
-
this.formShow.form.formFieldRelation[i].
|
|
1457
|
-
|
|
1458
|
-
}
|
|
1478
|
+
if (this.formShow.form.formFieldRelation[i].formField.type == 'FILE'){
|
|
1479
|
+
this.formShow.form.formFieldRelation[i].value = value
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
this.formShow.form.formFieldRelation[i].value = value.map(item=>{
|
|
1483
|
+
return item.name
|
|
1484
|
+
})
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1459
1487
|
}
|
|
1460
1488
|
if(this.formShow.form.formFieldRelation[i].display &&
|
|
1461
1489
|
(this.formShow.form.formFieldRelation[i].required || this.isRequiredFn(this.formShow.form.formFieldRelation[i].formField)) &&
|
|
@@ -1903,7 +1931,7 @@ export default {
|
|
|
1903
1931
|
let fields = field.formField.type === 'REF' ? field.formField.extInfo.ref.field : field.formField.extInfo.ref.vars
|
|
1904
1932
|
if (visible) {
|
|
1905
1933
|
if (
|
|
1906
|
-
!this.
|
|
1934
|
+
!this.refNextPage[field.fieldId] || this.refNextPage[field.fieldId].hasNextPage
|
|
1907
1935
|
) {
|
|
1908
1936
|
this.$set(this.refTemplateList, field.fieldId, [])
|
|
1909
1937
|
!this.dataQuery[field.fieldId] && this.$set(this.dataQuery,field.fieldId, {
|
|
@@ -1954,6 +1982,9 @@ export default {
|
|
|
1954
1982
|
}
|
|
1955
1983
|
this.extInfoFieldValue[item.fieldId] = arr
|
|
1956
1984
|
},
|
|
1985
|
+
setOptionWidth(){
|
|
1986
|
+
this.selectOptionWidth = event.srcElement.offsetParent.offsetWidth + 40 + "px";
|
|
1987
|
+
},
|
|
1957
1988
|
lodeMore(item) {
|
|
1958
1989
|
this.dataQuery[item.fieldId].pageInfo.pageNo += 1
|
|
1959
1990
|
this.refTemplateVisibleChange(true,item)
|
|
@@ -2088,22 +2119,22 @@ export default {
|
|
|
2088
2119
|
},
|
|
2089
2120
|
//保存ref类型值
|
|
2090
2121
|
confirmRefSelect(option, list){
|
|
2091
|
-
console.debug('options',option,list)
|
|
2122
|
+
console.debug('options',option,list,this.selectDetail)
|
|
2092
2123
|
if (!option || !list){
|
|
2093
2124
|
this.refShowPicker = false;
|
|
2094
2125
|
return
|
|
2095
2126
|
}
|
|
2096
|
-
this.
|
|
2127
|
+
this.selectDetail.value = list;
|
|
2097
2128
|
let val = ''
|
|
2098
2129
|
if (Array.isArray(option)){
|
|
2099
2130
|
val = option.map(item=>{
|
|
2100
2131
|
return item.id
|
|
2101
2132
|
})
|
|
2102
|
-
this.extInfoFieldValue[this.
|
|
2133
|
+
this.extInfoFieldValue[this.selectDetail.fieldId] = option
|
|
2103
2134
|
}
|
|
2104
2135
|
else {
|
|
2105
2136
|
val = option.id
|
|
2106
|
-
this.extInfoFieldValue[this.
|
|
2137
|
+
this.extInfoFieldValue[this.selectDetail.fieldId] = [option]
|
|
2107
2138
|
}
|
|
2108
2139
|
this.refShowPicker = false;
|
|
2109
2140
|
},
|