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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven-v3",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -226,6 +226,7 @@ function action() {
226
226
 
227
227
  function load(data) {
228
228
  model.value = data;
229
+ model.value.$vue = {emit,viewerfile};
229
230
  model.value.validExcute = () => {
230
231
  return selfValidExcute("valid");
231
232
  }
@@ -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) {
@@ -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
- common.viewerfile((model.controlLabel || "预览媒体"), MediaAlbum, 0, index, model.mediaViewPageType);
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) {
@@ -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
- Object.assign(rtnFormObj, f.getFormObj());
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
- item = File.loadFromModel(item, files, router, source.parameterAction, source.videoPlayIconUrl);
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: //单张图片上传
@@ -1,6 +1,6 @@
1
1
  import base from '../../loader/index';
2
2
  const Steps = function (source) {
3
- var rtn = {
3
+ let rtn = {
4
4
  modelSteps: {
5
5
  space: '',
6
6
  direction: 'horizontal',