centaline-data-driven-v3 0.0.62 → 0.0.63

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.63",
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
  }
@@ -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";
@@ -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',