centaline-data-driven 1.3.99 → 1.4.1

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.
Files changed (28) hide show
  1. package/package.json +1 -1
  2. package/src/Detail.vue +2 -2
  3. package/src/Form.vue +1 -1
  4. package/src/SearchList.vue +4 -4
  5. package/src/centaline/api/index.js +27 -12
  6. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +6 -4
  7. package/src/centaline/dynamicDragSort/src/dynamicDragSort.vue +0 -2
  8. package/src/centaline/dynamicFile/src/dynamicFile.vue +199 -63
  9. package/src/centaline/dynamicForm/src/dynamicForm.vue +14 -5
  10. package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +7 -6
  11. package/src/centaline/dynamicIti/src/dynamicIti.vue +11 -10
  12. package/src/centaline/dynamicPhotoSelect/src/dynamicPhotoSelect.vue +1 -1
  13. package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchListTable.vue +0 -1
  14. package/src/centaline/dynamicSearchList/src/dynamicTableTip.vue +45 -36
  15. package/src/centaline/dynamicT/src/dynamicT.vue +20 -2
  16. package/src/centaline/loader/src/ctl/Detail.js +0 -1
  17. package/src/centaline/loader/src/ctl/File.js +60 -0
  18. package/src/centaline/loader/src/ctl/PhotoSelectList.js +0 -1
  19. package/src/centaline/loader/src/ctl/Repeat.js +0 -1
  20. package/src/centaline/loader/src/ctl/SearchStats.js +0 -1
  21. package/src/centaline/loader/src/ctl/SearchTable.js +28 -15
  22. package/src/centaline/loader/src/ctl/SliceUpload.js +73 -0
  23. package/src/centaline/loader/src/ctl/Tree.js +0 -1
  24. package/src/centaline/loader/src/ctl/lib/Enum.js +4 -0
  25. package/src/centaline/mixins/dynamicElement.js +7 -0
  26. package/src/main.js +4 -4
  27. package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
  28. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.3.99",
3
+ "version": "1.4.1",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Detail.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id="appDetail" style="height:100%;">
3
- <ct-Detail :api="'PropertyRET/readDetailForBrowse'" :apiParam="apiParam" :pageType="'PropertyDetailRET'"></ct-Detail>
3
+ <ct-Detail :api="'PropertyOFI/readDetailForBrowse'" :apiParam="apiParam" :pageType="'PropertyDetailOFI'"></ct-Detail>
4
4
  <ct-dialog-list></ct-dialog-list>
5
5
  </div>
6
6
  </template>
@@ -10,7 +10,7 @@
10
10
  name: 'DataDrivendetail',
11
11
  data() {
12
12
  return {
13
- apiParam: {actionType: 1,chanceID: "1"} ,
13
+ apiParam: {actionType: 1,chanceID: "1583031531402825728"} ,
14
14
  }
15
15
  },
16
16
  mounted() {
package/src/Form.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
4
- <ct-form :api="'/api/third-dept-tran/transaction/edit'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
4
+ <ct-form :api="'/externalincomemanage/externalincomeimport/readDetail'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
5
5
  <ct-dialog-list></ct-dialog-list>
6
6
  </div>
7
7
  </template>
@@ -4,23 +4,23 @@
4
4
 
5
5
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
6
6
 
7
- <ct-searchlist :apiParam="para"
7
+ <!-- <ct-searchlist :apiParam="para"
8
8
  :searchConditionApi="'/ProfileWorklistList/getLayoutOfSearch'"
9
9
  :searchCategoryApi="'/ProfileWorklistList/getLayoutOfSearchCategory'"
10
10
  :searchDataApi="'/ProfileWorklistList/getListOfSearchModel'"
11
11
  :searchStatsApi="'/ProfileWorklistList/getListStats'">
12
- </ct-searchlist>
12
+ </ct-searchlist> -->
13
13
 
14
14
  <!-- <ct-searchlist
15
15
  :searchConditionApi="'/report/monthly/region/layout'"
16
16
  :searchDataApi="'/report/monthly/region/list'">
17
17
  </ct-searchlist> -->
18
18
 
19
- <!-- <ct-searchlist
19
+ <ct-searchlist
20
20
  :searchCategoryApi="'/PropertyPublishList/getLayoutOfSearchCategory'"
21
21
  :searchConditionApi="'/PropertyPublishList/getLayoutOfSearchForRET'"
22
22
  :searchDataApi="'/PropertyPublishList/getListOfSearchModelForRET'">
23
- </ct-searchlist> -->
23
+ </ct-searchlist>
24
24
 
25
25
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
26
26
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
@@ -127,9 +127,9 @@ Axios.defaults.withCredentials = true;//允许带上跨域cookies
127
127
 
128
128
  const api = {
129
129
  get(url, params, callback) {
130
- if(common.flagRouterSelf()){
131
- url=url+params.action;
132
- params=params.para;
130
+ if (common.flagRouterSelf()) {
131
+ url = url + params.action;
132
+ params = params.para;
133
133
  }
134
134
  return Axios.get(url, params, {
135
135
  headers: {
@@ -142,9 +142,9 @@ const api = {
142
142
  );
143
143
  },
144
144
  post(url, params, callback) {
145
- if(common.flagRouterSelf()){
146
- url=url+params.action;
147
- params=params.para;
145
+ if (common.flagRouterSelf()) {
146
+ url = url + params.action;
147
+ params = params.para;
148
148
  }
149
149
  return Axios.post(url, params, {
150
150
  headers: {
@@ -156,7 +156,7 @@ const api = {
156
156
  }
157
157
  );
158
158
  },
159
- postThenHandler: function (response,scripts) {
159
+ postThenHandler: function (response, scripts) {
160
160
  var data = response.data;
161
161
 
162
162
  if (typeof common.getDataDrivenOpts().handler.requestComplete === 'function') {
@@ -200,7 +200,7 @@ const api = {
200
200
  attrs: {
201
201
  progressAction: data.content.action,
202
202
  progressKey: data.content.key,
203
- progressType:'export',
203
+ progressType: 'export',
204
204
  width: '350px',
205
205
  height: '165px'
206
206
  },
@@ -236,14 +236,29 @@ const api = {
236
236
  return Promise.resolve(response.data);
237
237
  },
238
238
  postHandler(url, params, scripts) {
239
- if(common.flagRouterSelf()){
240
- url=url+params.action;
241
- params=params.para;
239
+ if (common.flagRouterSelf()) {
240
+ url = url + params.action;
241
+ params = params.para;
242
242
  }
243
243
  return Axios.post(url, params, {
244
244
  headers: common.getDataDrivenOpts().handler.getRequestHeaders()
245
245
  }).then((response) => {
246
- return this.postThenHandler(response,scripts);
246
+ return this.postThenHandler(response, scripts);
247
+ }).catch((ex) => {
248
+ if (ex.message) {
249
+ Vue.prototype.$message.error(ex.message);
250
+ }
251
+ else if (typeof ex.data === "string") {
252
+ Vue.prototype.$message.error(ex.data);
253
+ }
254
+ return Promise.resolve(ex.data ? ex.data : ex);//错误处理了,直接返回成功,要判断response.rtnCode=200再处理
255
+ });
256
+ },
257
+ SliceUpload(url, params, scripts) {
258
+ return Axios.post(url, params, {
259
+ headers: { ...common.getDataDrivenOpts().handler.getRequestHeaders(), ...{ 'Content-Type': 'multipart/form-data' } }
260
+ }).then((response) => {
261
+ return this.postThenHandler(response, scripts);
247
262
  }).catch((ex) => {
248
263
  if (ex.message) {
249
264
  Vue.prototype.$message.error(ex.message);
@@ -345,8 +345,9 @@
345
345
  </el-tab-pane>
346
346
  </el-tabs>
347
347
  </div>
348
- <div class="customer">
349
- <div class="customer-title">匹配客户</div>
348
+ <div ref="MatchCustomer" v-if="model.matchCustomerApiRouter !== null" class="customer">
349
+ <ct-MatchCustomer :apiRouter="model.matchCustomerApiRouter"></ct-MatchCustomer>
350
+ <!-- <div class="customer-title">匹配客户</div>
350
351
  <div class="mt10 clearfix">
351
352
  <div class="customre-line"></div>
352
353
  <div class="match-customre rel">
@@ -397,7 +398,6 @@
397
398
  </div>
398
399
  </div>
399
400
  </div>
400
-
401
401
  <div class="clearfix">
402
402
  <div class="customre-line"></div>
403
403
  <div class="match-customre rel">
@@ -447,7 +447,7 @@
447
447
  </div>
448
448
  </div>
449
449
  </div>
450
- </div>
450
+ </div> -->
451
451
  </div>
452
452
  </div>
453
453
  </div>
@@ -460,6 +460,7 @@ import dynamicElement from "../../mixins/dynamicElement";
460
460
  import dynamicSearchList from "../../dynamicSearchList/src/dynamicSearchList.vue";
461
461
  import dynamicContactList from "./dynamicContactList.vue";
462
462
  import dynamicAlbums from "./dynamicAlbums.vue";
463
+ import dynamicMatchCustomer from "./dynamicMatchCustomer.vue";
463
464
  export default {
464
465
  name: "ct-PropertyDetailOFI",
465
466
  mixins: [dynamicElement],
@@ -467,6 +468,7 @@ export default {
467
468
  "ct-searchlist": dynamicSearchList,
468
469
  "ct-contactList": dynamicContactList,
469
470
  "ct-albums": dynamicAlbums,
471
+ "ct-MatchCustomer": dynamicMatchCustomer,
470
472
  },
471
473
  props: {
472
474
  vmodel: Object,
@@ -90,7 +90,6 @@ export default {
90
90
  else {
91
91
  this.model = this.vmodel;
92
92
  this.testList = this.vmodel.dragList;
93
- // console.log('this.testList', this.testList);
94
93
  }
95
94
  });
96
95
 
@@ -130,7 +129,6 @@ export default {
130
129
 
131
130
  // 更新位置
132
131
  handleListChange(event) {
133
- console.log(event);
134
132
  this.testList = event;
135
133
 
136
134
  this.testList.forEach((item, i) => {
@@ -1,71 +1,143 @@
1
1
  <template>
2
2
  <div style="width: 100%" v-if="model !== null" class="block ct-file" :class="[model.attrs.size ? 'ct-checkbox-' + model.attrs.size : '']">
3
- <el-upload :class="disableUpload ? 'ct-upload-display-none' : ''"
4
- :disabled="model.lock"
5
- :accept="model.fileAccept"
6
- :on-change="handleChange"
7
- list-type="picture-card"
8
- :file-list="model.fileList"
9
- :multiple="true"
10
- :auto-upload="true"
11
- :action="model.action"
12
- :data="model.uploadData"
13
- :headers="headers"
14
- :before-upload="beforeUploadProcess"
15
- :on-success="handleAvatarSuccess"
16
- :on-error="handleAvatarError"
17
- :on-progress="uploadProcess"
18
- :limit="parseInt(model.max || 999)"
19
- :on-exceed="handleExceed">
20
- <i slot="default" class="el-icon-plus"></i>
21
- <div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">
22
- {{ validMessage }}
23
- </div>
24
- <div slot="tip" v-show="model.description" v-html="model.description">
25
- </div>
26
- <div slot="file" slot-scope="{ file }" :title="file.fileName">
27
- <div class="cover-list-item">
28
- <el-image fit="fill" :src="file.fileName?file.url:require('../../../assets/blank.png')" style="width: 100px; height: 100px" :z-index="previewZIndex" @click="viewerfile(file)">
29
- </el-image>
30
- <span class="cover-list-item-span-Default" v-if="model.rightDefault&&model.rightDefault==1&&file.mediaTypeID==2">
31
- <i>
32
- <el-radio v-model="file.flagDefault" :label="true" @change="handleDefault($event,file)" :disabled="model.lock" title="设为封面">&nbsp;</el-radio>
33
- </i>
34
- </span>
35
- <span class="cover-list-item-span-delete" v-if="!model.lock && file.rightDel">
36
- <i class="el-icon-delete" @click="handleRemove(file)"></i>
37
- </span>
38
- <span class="cover-list-item-span" v-if="model.lock || model.paramName">
39
- <!--锁定-->
40
- <span v-if="model.lock || !file.rightEdit" class="el-dropdown-link">
41
- <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
3
+ <!--分片上传-->
4
+ <template v-if="model.type==51">
5
+ <el-upload :class="disableUpload ? 'ct-upload-display-none' : ''"
6
+ :disabled="model.lock"
7
+ :accept="model.fileAccept"
8
+ :on-change="handleChange"
9
+ list-type="picture-card"
10
+ :file-list="model.fileList"
11
+ :multiple="true"
12
+ :auto-upload="true"
13
+ :action="model.action"
14
+ :data="model.uploadData"
15
+ :headers="headers"
16
+ :before-upload="beforeUploadProcess"
17
+ :on-success="handleAvatarSuccess"
18
+ :on-error="handleAvatarError"
19
+ :on-progress="uploadProcess"
20
+ :limit="parseInt(model.max || 999)"
21
+ :on-exceed="handleExceed">
22
+ <i slot="default" class="el-icon-plus"></i>
23
+ <div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">
24
+ {{ validMessage }}
25
+ </div>
26
+ <div slot="tip" v-show="model.description" v-html="model.description">
27
+ </div>
28
+ <div slot="file" slot-scope="{ file }" :title="file.fileName">
29
+ <div class="cover-list-item">
30
+ <el-image fit="fill" :src="file.fileName?file.url:require('../../../assets/blank.png')" style="width: 100px; height: 100px" :z-index="previewZIndex" @click="viewerfile(file)">
31
+ </el-image>
32
+ <span class="cover-list-item-span-Default" v-if="model.rightDefault&&model.rightDefault==1&&file.mediaTypeID==2">
33
+ <i>
34
+ <el-radio v-model="file.flagDefault" :label="true" @change="handleDefault($event,file)" :disabled="model.lock" title="设为封面">&nbsp;</el-radio>
35
+ </i>
36
+ </span>
37
+ <span class="cover-list-item-span-delete" v-if="!model.lock && file.rightDel">
38
+ <i class="el-icon-delete" @click="handleRemove(file)"></i>
39
+ </span>
40
+ <span class="cover-list-item-span" v-if="model.lock || model.paramName">
41
+ <!--锁定-->
42
+ <span v-if="model.lock || !file.rightEdit" class="el-dropdown-link">
43
+ <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
44
+ </span>
45
+ <!--复杂分类-->
46
+ <span v-else-if="model.isComplexClassify" class="el-dropdown-link" @click="classifyFormClickHandle(file)">
47
+ <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
48
+ <i class="el-icon-arrow-down el-icon--right"></i>
49
+ </span>
50
+ <!--简单分类-->
51
+ <el-dropdown v-else class="el-upload-list__item-preview" trigger="click" placement="top" @command="classifySelectedClickHandle">
52
+ <span class="el-dropdown-link" @click="classifyClickHandle">
53
+ <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
54
+ <i class="el-icon-arrow-down el-icon--right"></i>
55
+ </span>
56
+ <el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
57
+ <el-dropdown-item v-for="(option, index) in model.optionModel.options" :key="index" :command="{ option: option, file: file }">
58
+ {{ option[model.optionModel.optionAttrs.label] }}
59
+ </el-dropdown-item>
60
+ </el-dropdown-menu>
61
+ </el-dropdown>
62
+ </span>
63
+ </div>
64
+ <el-progress type="circle" v-if="file.progressFlag" :percentage="file.loadProgress" :width="96" :height="96" class="file-cirle"></el-progress>
65
+ </div>
66
+ </el-upload>
67
+ </template>
68
+
69
+ <!-- 官方上传 -->
70
+ <template v-else>
71
+ <el-upload :class="disableUpload ? 'ct-upload-display-none' : ''"
72
+ :http-request="SliceUpload"
73
+ :disabled="model.lock"
74
+ :accept="model.fileAccept"
75
+ :on-change="handleChange"
76
+ list-type="picture-card"
77
+ :file-list="model.fileList"
78
+ :multiple="true"
79
+ :auto-upload="true"
80
+ :action="model.action"
81
+ :data="model.uploadData"
82
+ :headers="headers"
83
+ :before-upload="beforeUploadProcess"
84
+ :on-success="handleAvatarSuccess"
85
+ :on-error="handleAvatarError"
86
+ :on-progress="uploadProcess"
87
+ :limit="parseInt(model.max || 999)"
88
+ :on-exceed="handleExceed">
89
+ <i slot="default" class="el-icon-plus"></i>
90
+ <div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">
91
+ {{ validMessage }}
92
+ </div>
93
+ <div slot="tip" v-show="model.description" v-html="model.description">
94
+ </div>
95
+ <div slot="file" slot-scope="{ file }" :title="file.fileName">
96
+ <div class="cover-list-item">
97
+ <el-image fit="fill" :src="file.fileName?file.url:require('../../../assets/blank.png')" style="width: 100px; height: 100px" :z-index="previewZIndex" @click="viewerfile(file)">
98
+ </el-image>
99
+ <span class="cover-list-item-span-Default" v-if="model.rightDefault&&model.rightDefault==1&&file.mediaTypeID==2">
100
+ <i>
101
+ <el-radio v-model="file.flagDefault" :label="true" @change="handleDefault($event,file)" :disabled="model.lock" title="设为封面">&nbsp;</el-radio>
102
+ </i>
42
103
  </span>
43
- <!--复杂分类-->
44
- <span v-else-if="model.isComplexClassify" class="el-dropdown-link" @click="classifyFormClickHandle(file)">
45
- <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
46
- <i class="el-icon-arrow-down el-icon--right"></i>
104
+ <span class="cover-list-item-span-delete" v-if="!model.lock && file.rightDel">
105
+ <i class="el-icon-delete" @click="handleRemove(file)"></i>
47
106
  </span>
48
- <!--简单分类-->
49
- <el-dropdown v-else class="el-upload-list__item-preview" trigger="click" placement="top" @command="classifySelectedClickHandle">
50
- <span class="el-dropdown-link" @click="classifyClickHandle">
107
+ <span class="cover-list-item-span" v-if="model.lock || model.paramName">
108
+ <!--锁定-->
109
+ <span v-if="model.lock || !file.rightEdit" class="el-dropdown-link">
110
+ <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
111
+ </span>
112
+ <!--复杂分类-->
113
+ <span v-else-if="model.isComplexClassify" class="el-dropdown-link" @click="classifyFormClickHandle(file)">
51
114
  <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
52
115
  <i class="el-icon-arrow-down el-icon--right"></i>
53
116
  </span>
54
- <el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
55
- <el-dropdown-item v-for="(option, index) in model.optionModel.options" :key="index" :command="{ option: option, file: file }">
56
- {{ option[model.optionModel.optionAttrs.label] }}
57
- </el-dropdown-item>
58
- </el-dropdown-menu>
59
- </el-dropdown>
60
- </span>
117
+ <!--简单分类-->
118
+ <el-dropdown v-else class="el-upload-list__item-preview" trigger="click" placement="top" @command="classifySelectedClickHandle">
119
+ <span class="el-dropdown-link" @click="classifyClickHandle">
120
+ <span style="width: 80px; height: 26px; display: inline-flex">&nbsp;{{ file.mediaLabelName }}</span>
121
+ <i class="el-icon-arrow-down el-icon--right"></i>
122
+ </span>
123
+ <el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
124
+ <el-dropdown-item v-for="(option, index) in model.optionModel.options" :key="index" :command="{ option: option, file: file }">
125
+ {{ option[model.optionModel.optionAttrs.label] }}
126
+ </el-dropdown-item>
127
+ </el-dropdown-menu>
128
+ </el-dropdown>
129
+ </span>
130
+ </div>
131
+ <el-progress type="circle" v-if="file.progressFlag" :percentage="file.loadProgress" :width="96" :height="96" class="file-cirle"></el-progress>
61
132
  </div>
62
- <el-progress type="circle" v-if="file.progressFlag" :percentage="file.loadProgress" :width="96" :height="96" class="file-cirle"></el-progress>
63
- </div>
64
- </el-upload>
133
+ </el-upload>
134
+ </template>
135
+
65
136
  </div>
66
137
  </template>
67
138
  <script>
68
139
  import dynamicElement from "../../mixins/dynamicElement";
140
+ import { upload, uploadByPieces } from "../../loader/src/ctl/SliceUpload";
69
141
  export default {
70
142
  name: "ct-file",
71
143
  mixins: [dynamicElement],
@@ -103,9 +175,10 @@
103
175
  },
104
176
  methods: {
105
177
  load(data) {
178
+ debugger
106
179
  this.model = data;
107
180
  this.classifyClickHandle();
108
- if(this.model.action==='' && !this.model.lock){
181
+ if (this.model.action === '' && !this.model.lock) {
109
182
  this.validMessage = "必须配置上传的URL";
110
183
  this.valid = false;
111
184
  this.$message.error(this.validMessage);
@@ -257,7 +330,7 @@
257
330
  return false;
258
331
  }
259
332
  }
260
- if (this.model.min) {
333
+ if (this.model.min && this.modelPhotoselect.required) {
261
334
  if (this.model.getfileListLength() < this.model.min) {
262
335
  //change时需要判断有没有上传图片如果没有图片则不提示
263
336
  if (eventName == "change" && this.model.getfileListLength() > 0) {
@@ -270,15 +343,15 @@
270
343
  }
271
344
  else if (eventName == "remove") {
272
345
  this.valid = true;
273
- }
346
+ }
274
347
  return false;
275
348
  }
276
349
  }
277
- if (this.model.rightDefault && this.model.rightDefault==1&& eventName == "valid") {
278
- if (this.model.getfileDefault()<=0) {
350
+ if (this.model.rightDefault && this.model.rightDefault == 1 && eventName == "valid") {
351
+ if (this.model.getfileDefault() <= 0) {
279
352
  this.validMessage = "请设置默认封面";
280
353
  this.valid = false;
281
- return false;
354
+ return false;
282
355
  }
283
356
  }
284
357
  if (eventName == "valid" && !this.validFileClass()) {
@@ -341,7 +414,70 @@
341
414
  handleDefault: function (event, file) {
342
415
  this.model.setDefault(file);
343
416
  // this.selfValidExcute("remove");
344
- }
417
+ },
418
+ async SliceUpload(options) {
419
+ const { file, onProgress, onSuccess, onError } = options;
420
+ if (this.model.action === '' && !this.model.lock) {
421
+ this.validMessage = "必须配置上传的URL";
422
+ this.valid = false;
423
+ this.$message.error(this.validMessage);
424
+ }
425
+ // data是上传时附带的额外参数,file是文件
426
+ let url = this.model.action; //上传文件接口
427
+ let uid = this.uploadguid();
428
+ try {
429
+ let awaitfile = {
430
+ "url": "",
431
+ "source": "",
432
+ "mediaUrl": "",
433
+ "fileName": "",
434
+ "flagDefault": "",
435
+ "mediaTypeID": "",
436
+ "flagDeleted": "",
437
+ "actionType": "",
438
+ "rightDel": "",
439
+ "rightEdit": "",
440
+ "rightDownload": "",
441
+ "mediaLabelID": "",
442
+ "mediaLabelName": "",
443
+ "fileExtension": "",
444
+ "progressFlag": true,
445
+ "loadProgress": 1,
446
+ "uid": uid,
447
+ }
448
+ this.model.fileList.push(awaitfile);
449
+
450
+ file.uid = uid;
451
+ const res = await uploadByPieces(this.model.action, { file }, this.uploadpro, options);
452
+ return res;
453
+
454
+ } catch (e) {
455
+ return e;
456
+ }
457
+ },
458
+ S4() {
459
+ return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
460
+ },
461
+ uploadguid() {
462
+ return (this.S4() + this.S4() + '-' + this.S4() + '-' + this.S4() + '-' + this.S4() + '-' + this.S4() + this.S4() + this.S4());
463
+ },
464
+ uploadpro(uploadOptions, res) {
465
+
466
+ if (res.rtnCode != 200 && res.rtnMsg != "") {
467
+ this.$message.error(res.rtnMsg);
468
+ return;
469
+ }
470
+ const { file, onProgress, onSuccess, onError } = uploadOptions;
471
+ const Progress = Math.min(100, Math.floor(1E4 * parseInt(res.content.nextOffSet) / parseInt(file.size)) / 100);
472
+ this.model.setByPieces(res, Progress, file);
473
+
474
+ if (res.content.finished == 1) {
475
+ this.handleChange();
476
+ }
477
+ },
478
+
479
+
480
+
345
481
  },
346
482
  };
347
483
  </script>
@@ -486,11 +486,20 @@
486
486
  });
487
487
  }
488
488
  else{
489
- field.doAction(submitData, (data) => {
490
- if(data.content){
491
- window.open(data.content, "_blank");
492
- }
493
- });
489
+ if (field.action.indexOf("http://") === 0 || field.action.indexOf("https://") === 0) {
490
+ window.open(field.action, "_blank");
491
+ }
492
+ else {
493
+ field.doAction(submitData, (data) => {
494
+ if(data.content){
495
+ if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
496
+ window.open(data.content, "_blank");
497
+ }
498
+ else {
499
+ }
500
+ }
501
+ });
502
+ }
494
503
  }
495
504
  }
496
505
  else {
@@ -95,13 +95,14 @@
95
95
  },
96
96
  //不能共用的数据校验
97
97
  selfValidExcute: function (eventName) {
98
- if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
99
- this.validMessage = this.model.label +" 不能大于 " + this.model.max;
100
- this.valid = false;
101
- return false;
98
+ if (eventName === "change") {
99
+ if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
100
+ this.validMessage = this.model.label +" 不能大于 " + this.model.max;
101
+ this.valid = false;
102
+ return false;
103
+ }
102
104
  }
103
- if (eventName === "valid") {
104
-
105
+ if (eventName === "valid") {
105
106
  if (this.model.min !== "" && parseFloat(this.model.value) < parseFloat(this.model.min)) {
106
107
  this.validMessage = this.model.label+" 不能小于 " + this.model.min;
107
108
  this.valid = false;
@@ -91,19 +91,20 @@
91
91
 
92
92
  this.inputHandler(this.model.value);
93
93
  this.changeHandler(this.model.value);//todo input事件里要不要加这个事件
94
- console.log('onInputHandler');
95
94
  },
96
95
  //不能共用的数据校验
97
96
  selfValidExcute: function (eventName) {
98
- if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
99
- this.validMessage = this.model.label +" 不能大于 " + this.model.max;
100
- this.valid = false;
101
- return false;
102
- }
103
- if (this.model.max1 !== "" && parseFloat(this.model.value1) > parseFloat(this.model.max1)) {
104
- this.validMessage = this.model.label +" 不能大于 " + this.model.max1;
105
- this.valid = false;
106
- return false;
97
+ if (eventName === "change") {
98
+ if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
99
+ this.validMessage = this.model.label +" 不能大于 " + this.model.max;
100
+ this.valid = false;
101
+ return false;
102
+ }
103
+ if (this.model.max1 !== "" && parseFloat(this.model.value1) > parseFloat(this.model.max1)) {
104
+ this.validMessage = this.model.label +" 不能大于 " + this.model.max1;
105
+ this.valid = false;
106
+ return false;
107
+ }
107
108
  }
108
109
  if (eventName === "valid") {
109
110
  if (this.model.min !== "" && parseFloat(this.model.value) < parseFloat(this.model.min)) {
@@ -227,7 +227,7 @@ export default {
227
227
  return false;
228
228
  }
229
229
  }
230
- if (this.modelPhotoselect.min) {
230
+ if (this.modelPhotoselect.min && this.modelPhotoselect.required) {
231
231
  if (
232
232
  this.modelPhotoselect.getfileListLength() < this.modelPhotoselect.min
233
233
  ) {
@@ -136,7 +136,6 @@
136
136
  var row = self.tableData[i];
137
137
 
138
138
  jumpFieldArr.forEach((v) => {
139
- console.log(eval("row." + v));
140
139
  if (typeof eval("row." + v) !== 'undefined' && eval("row." + v).indexOf(self.jumpStr) >= 0) {
141
140
  jumpRow = row;
142
141
  return false;