centaline-data-driven-v3 0.0.62 → 0.0.64
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/dist/centaline-data-driven-v3.umd.js +51 -51
- package/package.json +1 -1
- package/src/components/web/File.vue +1 -0
- package/src/components/web/Form.vue +3 -1
- package/src/loader/src/File.js +14 -3
- package/src/loader/src/Form.js +6 -2
- package/src/loader/src/LibFunction.js +2 -1
- package/src/loader/src/Steps.js +1 -1
package/package.json
CHANGED
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
</component>
|
|
133
133
|
</div>
|
|
134
134
|
<div style="min-height:200px" v-if="loading"></div>
|
|
135
|
+
<iframe :src="downloadUrl" style="height:0px;width:0px;border-width: 0px;display: none;"> </iframe>
|
|
135
136
|
</div>
|
|
136
137
|
</template>
|
|
137
138
|
<script lang="ts" setup>
|
|
@@ -201,6 +202,7 @@ const isWebScroll = ref(false)
|
|
|
201
202
|
const Fields = ref()
|
|
202
203
|
const refForm = ref()
|
|
203
204
|
const qrtimer = ref(null)
|
|
205
|
+
const downloadUrl = ref('')
|
|
204
206
|
onUpdated(() => {
|
|
205
207
|
nextTick(() => {
|
|
206
208
|
qrtimer.value = setTimeout(getisScroll, 100);
|
|
@@ -231,7 +233,7 @@ function init() {
|
|
|
231
233
|
function load(data) {
|
|
232
234
|
model.value = data
|
|
233
235
|
model.value.parentModelForm = props.parentModelForm
|
|
234
|
-
model.value.$vue = { fieldClickHandler, clickHandler, validExcute, emit, getFormObj, changeCallBackHandler, getFileData, Form, load, init, updateFields, itemKey };
|
|
236
|
+
model.value.$vue = { fieldClickHandler, clickHandler, validExcute, emit, getFormObj, changeCallBackHandler, getFileData, Form, load, init, updateFields, itemKey,downloadUrl };
|
|
235
237
|
model.value.$vue.openType = props.openType
|
|
236
238
|
model.value.isIframe = props.isIframe
|
|
237
239
|
if (model.value.scripts) {
|
package/src/loader/src/File.js
CHANGED
|
@@ -4,7 +4,7 @@ import common from '../../utils/common';
|
|
|
4
4
|
import valid from '../../utils//validate';
|
|
5
5
|
import request from '../../utils/request';
|
|
6
6
|
|
|
7
|
-
function loadFromModel(source, SourceList, router, optionApi, videoPlayIconUrl) {
|
|
7
|
+
function loadFromModel(source, SourceList, router, optionApi, videoPlayIconUrl, moreActionRouter) {
|
|
8
8
|
|
|
9
9
|
var init = function (data) {
|
|
10
10
|
var rtn = {
|
|
@@ -27,6 +27,7 @@ function loadFromModel(source, SourceList, router, optionApi, videoPlayIconUrl)
|
|
|
27
27
|
mediaLabelID: "",
|
|
28
28
|
mediaLabelName: ""
|
|
29
29
|
},
|
|
30
|
+
moreActionRouter: moreActionRouter,
|
|
30
31
|
|
|
31
32
|
get action() {
|
|
32
33
|
//return "http://localhost:5001/api/file/upload";
|
|
@@ -499,8 +500,8 @@ function deleteFile(file, forceDelete, model) {
|
|
|
499
500
|
}
|
|
500
501
|
|
|
501
502
|
}
|
|
502
|
-
}
|
|
503
503
|
break;
|
|
504
|
+
}
|
|
504
505
|
}
|
|
505
506
|
}
|
|
506
507
|
|
|
@@ -575,7 +576,17 @@ function viewerfile(file, model) {
|
|
|
575
576
|
var index = MediaAlbum[0].medias.findIndex(
|
|
576
577
|
(v) => (v === file)
|
|
577
578
|
);
|
|
578
|
-
|
|
579
|
+
|
|
580
|
+
if(model.moreActionRouter){
|
|
581
|
+
let submitData = {};
|
|
582
|
+
submitData = model.form.$vue.getFileData(model.moreActionRouter);
|
|
583
|
+
submitData.index=index;
|
|
584
|
+
submitData = model.moreActionRouter.getActionPara(submitData).para;
|
|
585
|
+
model.$vue.emit('tableButtonClick',model.moreActionRouter,submitData);
|
|
586
|
+
}
|
|
587
|
+
else{
|
|
588
|
+
common.viewerfile((model.controlLabel || "预览媒体"), MediaAlbum, 0, index, model.mediaViewPageType);
|
|
589
|
+
}
|
|
579
590
|
}
|
|
580
591
|
function selfValidExcute(eventName, model) {
|
|
581
592
|
if (model.maxValue1 && model.maxValue1 > 0) {
|
package/src/loader/src/Form.js
CHANGED
|
@@ -285,6 +285,9 @@ function loadFromModel(source, isFormList) {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
else if (data.field) {
|
|
288
|
+
if (data.field) {
|
|
289
|
+
data.field[attrName] = value;
|
|
290
|
+
}
|
|
288
291
|
if (data.field.source) {
|
|
289
292
|
data.field.source[attrName] = value;
|
|
290
293
|
}
|
|
@@ -720,9 +723,10 @@ function loadFromModel(source, isFormList) {
|
|
|
720
723
|
Object.assign(rtnFormObj, customizeColumnsObj);
|
|
721
724
|
}
|
|
722
725
|
else {
|
|
723
|
-
|
|
726
|
+
if(f.hasOwnProperty('getFormObj') && typeof f.getFormObj === "function"){
|
|
727
|
+
Object.assign(rtnFormObj, f.getFormObj());
|
|
728
|
+
}
|
|
724
729
|
}
|
|
725
|
-
|
|
726
730
|
}
|
|
727
731
|
});
|
|
728
732
|
return rtnFormObj;
|
|
@@ -182,7 +182,8 @@ const LibFunction = {
|
|
|
182
182
|
return v1.key === field.fieldName1;
|
|
183
183
|
});
|
|
184
184
|
var files = getMmdias(source, field);
|
|
185
|
-
|
|
185
|
+
moreActionRouter = LibFunction.getRouter(source.actionRouters, field.moreActionRouterKey);
|
|
186
|
+
item = File.loadFromModel(item, files, router, source.parameterAction, source.videoPlayIconUrl, moreActionRouter);
|
|
186
187
|
item.is = 'ct-file';
|
|
187
188
|
break;
|
|
188
189
|
case Enum.ControlType.Photo: //单张图片上传
|