askbot-dragon 0.8.12 → 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
|
@@ -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>
|
|
@@ -572,6 +589,7 @@
|
|
|
572
589
|
:withHeader="false"
|
|
573
590
|
:visible.sync="drawer"
|
|
574
591
|
size="400px"
|
|
592
|
+
:append-to-body="true"
|
|
575
593
|
direction="btt">
|
|
576
594
|
<div class="drawer-container">
|
|
577
595
|
<tree ref="drawerTree"
|
|
@@ -809,7 +827,7 @@ export default {
|
|
|
809
827
|
return (type)=>{
|
|
810
828
|
console.debug('type',type)
|
|
811
829
|
if (type == 'FILE'){
|
|
812
|
-
return '
|
|
830
|
+
return 'image/*'
|
|
813
831
|
} else if( type == 'IMAGE') {
|
|
814
832
|
return 'image/*'
|
|
815
833
|
} else if(type == 'VIDEO') {
|
|
@@ -900,7 +918,7 @@ export default {
|
|
|
900
918
|
console.debug('file',file)
|
|
901
919
|
console.debug('fileType',!Array.isArray(file))
|
|
902
920
|
if (!Array.isArray(file)){
|
|
903
|
-
if (type === 'IMAGE'){
|
|
921
|
+
if (type === 'IMAGE' || type === 'FILE'){
|
|
904
922
|
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
905
923
|
const isSupportedFormat =file.type.indexOf('image')!==-1
|
|
906
924
|
if (!isSupportedFormat){
|
|
@@ -926,7 +944,7 @@ export default {
|
|
|
926
944
|
}
|
|
927
945
|
return true
|
|
928
946
|
}
|
|
929
|
-
else if (type === '
|
|
947
|
+
else if (type === 'ATTACHMENT'){
|
|
930
948
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
931
949
|
if (!isLte2M) {
|
|
932
950
|
this.$message.error("上传附件大小不能超过100MB!");
|
|
@@ -942,7 +960,7 @@ export default {
|
|
|
942
960
|
}
|
|
943
961
|
if (file.length<=this.limitNum-length){
|
|
944
962
|
for (let i=0;i<file.length;i++){
|
|
945
|
-
if (type === 'IMAGE'){
|
|
963
|
+
if (type === 'IMAGE' || type === 'FILE'){
|
|
946
964
|
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
947
965
|
const isSupportedFormat =file.type.indexOf('image')!==-1
|
|
948
966
|
if (!isSupportedFormat){
|
|
@@ -968,7 +986,7 @@ export default {
|
|
|
968
986
|
}
|
|
969
987
|
return true
|
|
970
988
|
}
|
|
971
|
-
else if (type === '
|
|
989
|
+
else if (type === 'ATTACHMENT'){
|
|
972
990
|
const isLte2M = file.size / 1024 / 1024 <= 100;
|
|
973
991
|
if (!isLte2M) {
|
|
974
992
|
this.$message.error("上传附件大小不能超过100MB!");
|
|
@@ -1457,9 +1475,15 @@ export default {
|
|
|
1457
1475
|
file.url = item.url
|
|
1458
1476
|
value.push(file)
|
|
1459
1477
|
})
|
|
1460
|
-
this.formShow.form.formFieldRelation[i].
|
|
1461
|
-
|
|
1462
|
-
}
|
|
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
|
+
|
|
1463
1487
|
}
|
|
1464
1488
|
if(this.formShow.form.formFieldRelation[i].display &&
|
|
1465
1489
|
(this.formShow.form.formFieldRelation[i].required || this.isRequiredFn(this.formShow.form.formFieldRelation[i].formField)) &&
|