centaline-data-driven 1.6.16 → 1.6.18
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/build/centaline/centaline.path.js +1 -0
- package/package.json +1 -1
- package/release-log.md +21 -0
- package/src/Form.vue +2 -2
- package/src/SearchList.vue +3 -1
- package/src/centaline/css/common.css +14 -0
- package/src/centaline/dynamicAppContainer/src/dynamicAppContainer.vue +1 -2
- package/src/centaline/dynamicFile/src/dynamicFile.vue +14 -7
- package/src/centaline/dynamicForm/src/dynamicForm.vue +47 -2
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +33 -28
- package/src/centaline/dynamicLocation/index.js +11 -0
- package/src/centaline/dynamicLocation/src/dynamicLocation.vue +72 -0
- package/src/centaline/dynamicMapBaidu/src/dynamicMapBaidu.vue +64 -8
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +12 -9
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +0 -1
- package/src/centaline/loader/src/ctl/Base.js +6 -2
- package/src/centaline/loader/src/ctl/File.js +10 -11
- package/src/centaline/loader/src/ctl/Location.js +31 -0
- package/src/centaline/loader/src/ctl/SearchScreen.js +3 -2
- package/src/centaline/loader/src/ctl/lib/Enum.js +5 -0
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +9 -2
- package/src/centaline/loader/src/ctl.js +1 -0
- package/src/centaline/mixins/dynamicElement.js +2 -2
- package/src/centaline/templateControls/src/dynamicTableCurrency.vue +3 -1
- package/src/centaline/validate/index.js +4 -2
- package/src/main.js +12 -7
- package/wwwroot/static/centaline/centaline-data-driven.js +2458 -2113
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -5,11 +5,12 @@ import Vue from 'vue';
|
|
|
5
5
|
import common from '../../../common';
|
|
6
6
|
import valid from '../../../validate/index';
|
|
7
7
|
//元数据、附件列表元数据、对应router、下拉框数据api
|
|
8
|
-
const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl) {
|
|
8
|
+
const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl,moreActionRouter) {
|
|
9
9
|
var self = this;
|
|
10
10
|
var init = function (data) {
|
|
11
11
|
var rtn = {
|
|
12
12
|
QRCodeStatusAction:'',
|
|
13
|
+
moreActionRouter: moreActionRouter,
|
|
13
14
|
get min2() {
|
|
14
15
|
return source.minValue2;
|
|
15
16
|
},
|
|
@@ -397,11 +398,10 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
397
398
|
}
|
|
398
399
|
rtn.fileList.push(awaitfile);
|
|
399
400
|
},
|
|
400
|
-
jsSetFile(data)
|
|
401
|
-
{
|
|
401
|
+
jsSetFile(data){
|
|
402
402
|
var photos = JSON.parse(data);
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
photos.forEach((v) => {
|
|
404
|
+
if(rtn.fileList.length<parseInt(rtn.max || 999)){
|
|
405
405
|
v.videoCoverFileName=v.videoCoverFileName||null;
|
|
406
406
|
v.thumbnailUrl=v.thumbnailUrl||'';
|
|
407
407
|
v.mediaSourceTypeID=v.mediaSourceTypeID||null;
|
|
@@ -420,12 +420,11 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
420
420
|
FileData.width=v.width;
|
|
421
421
|
FileData.height=v.height;
|
|
422
422
|
rtn.fileList.push(FileData);
|
|
423
|
-
rtn.self.handleChange();
|
|
424
|
-
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
setByPieces(res, Progress, file) {
|
|
423
|
+
rtn.self.handleChange();
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
},
|
|
427
|
+
setByPieces(res, Progress, file) {
|
|
429
428
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
|
430
429
|
//下面的方式绑定,会有一些问题 todo 不强与页面关联
|
|
431
430
|
var data = {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import Base from './Base';
|
|
3
|
+
import valid from '../../../validate/index';
|
|
4
|
+
const Location = function (source,moreActionRouter) {
|
|
5
|
+
var rtn = {
|
|
6
|
+
moreActionRouter: moreActionRouter,
|
|
7
|
+
getFormObj() {
|
|
8
|
+
var rtnFormObj = {};
|
|
9
|
+
Object.defineProperty(rtnFormObj, source.fieldName1, {
|
|
10
|
+
get: function () {
|
|
11
|
+
return source.code1;
|
|
12
|
+
},
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(rtnFormObj, source.fieldName2, {
|
|
17
|
+
get: function () {
|
|
18
|
+
return source.code2;
|
|
19
|
+
},
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true
|
|
22
|
+
});
|
|
23
|
+
return rtnFormObj;
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
rtn = base.copy(Base(source), rtn);
|
|
27
|
+
rtn = base.copy(rtn, valid.Init(rtn));
|
|
28
|
+
return rtn;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default Location;
|
|
@@ -129,8 +129,8 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
|
|
|
129
129
|
return rtn._scripts;
|
|
130
130
|
}
|
|
131
131
|
else {
|
|
132
|
-
if (typeof source.scripts !== 'undefined') {
|
|
133
|
-
rtn._scripts = base.common.eval(source.scripts);
|
|
132
|
+
if (typeof source.content.scripts !== 'undefined') {
|
|
133
|
+
rtn._scripts = base.common.eval(source.content.scripts);
|
|
134
134
|
return rtn._scripts;
|
|
135
135
|
}
|
|
136
136
|
else {
|
|
@@ -155,6 +155,7 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
|
|
|
155
155
|
continue;
|
|
156
156
|
}
|
|
157
157
|
if((source.content.fields[key].controlType===Enum.ControlType.DateRange
|
|
158
|
+
|| source.content.fields[key].controlType===Enum.ControlType.Location
|
|
158
159
|
|| source.content.fields[key].controlType===Enum.ControlType.DateTimeRange)
|
|
159
160
|
&& source.content.fields[key].code2==undefined){
|
|
160
161
|
source.content.fields[key].code2='';
|
|
@@ -40,6 +40,7 @@ import Contact from '../Contact';
|
|
|
40
40
|
import LH from '../LH';
|
|
41
41
|
import Image from '../Image';
|
|
42
42
|
import Steps from '../Steps';
|
|
43
|
+
import Location from '../Location';
|
|
43
44
|
|
|
44
45
|
const LibFunction = {
|
|
45
46
|
install(Vue) {},
|
|
@@ -315,7 +316,8 @@ const LibFunction = {
|
|
|
315
316
|
}
|
|
316
317
|
})
|
|
317
318
|
}
|
|
318
|
-
|
|
319
|
+
moreActionRouter = LibFunction.getRouter(source.actionRouters, field.moreActionRouterKey);
|
|
320
|
+
item = File(field, files, router, source.parameterAction,source.videoPlayIconUrl,moreActionRouter);
|
|
319
321
|
item.is = 'ct-file';
|
|
320
322
|
break;
|
|
321
323
|
case Enum.ControlType.PhotoSelect: //图片选择
|
|
@@ -394,6 +396,11 @@ const LibFunction = {
|
|
|
394
396
|
item = Steps(field);
|
|
395
397
|
item.is = 'ct-Steps';
|
|
396
398
|
break;
|
|
399
|
+
case Enum.ControlType.Location: //位置获取控件
|
|
400
|
+
moreActionRouter = LibFunction.getRouter(source.actionRouters, field.moreActionRouterKey);
|
|
401
|
+
item = Location(field,moreActionRouter);
|
|
402
|
+
item.is = 'ct-Location';
|
|
403
|
+
break;
|
|
397
404
|
default:
|
|
398
405
|
item = L(field);
|
|
399
406
|
item.is = 'ct-labelText';
|
|
@@ -434,7 +441,7 @@ const LibFunction = {
|
|
|
434
441
|
return field.singleLine === true || field.controlType === Enum.ControlType.GroupSplitLine || field.controlType === Enum.ControlType.Repeat
|
|
435
442
|
|| field.controlType === Enum.ControlType.List || field.controlType === Enum.ControlType.File
|
|
436
443
|
|| field.controlType === Enum.ControlType.SliceUpload || field.controlType === Enum.ControlType.PhoneDial
|
|
437
|
-
|| field.controlType === Enum.ControlType.Steps
|
|
444
|
+
|| field.controlType === Enum.ControlType.Steps || field.controlType === Enum.ControlType.Location
|
|
438
445
|
|| field.controlType === Enum.ControlType.SearchPage;
|
|
439
446
|
},
|
|
440
447
|
showLabel: showLabel
|
|
@@ -148,9 +148,9 @@ export default {
|
|
|
148
148
|
validExcute() {
|
|
149
149
|
var self = this;
|
|
150
150
|
self.validMessage="";
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
//通用校验
|
|
153
|
-
if (typeof this.model.validating === "function") {
|
|
153
|
+
if (typeof this.model.validating === "function") {
|
|
154
154
|
let validtemp = this.model.validating();
|
|
155
155
|
self.valid = validtemp.valid;
|
|
156
156
|
if (!self.valid) {
|
|
@@ -278,6 +278,7 @@ const valid = {
|
|
|
278
278
|
case Enum.ControlType.DateRange:
|
|
279
279
|
case Enum.ControlType.DateTimeRange:
|
|
280
280
|
case Enum.ControlType.ComboBoxWithTextBox:
|
|
281
|
+
case Enum.ControlType.Location:
|
|
281
282
|
rtnValidate.push(valid.requiredArea);
|
|
282
283
|
break;
|
|
283
284
|
case Enum.ControlType.Address:
|
|
@@ -333,6 +334,7 @@ const valid = {
|
|
|
333
334
|
case Enum.ControlType.DateRange:
|
|
334
335
|
case Enum.ControlType.DateTimeRange:
|
|
335
336
|
case Enum.ControlType.ComboBoxWithTextBox:
|
|
337
|
+
case Enum.ControlType.Location:
|
|
336
338
|
rtnValidate.push(valid.requiredArea);
|
|
337
339
|
break;
|
|
338
340
|
case Enum.ControlType.Address:
|
|
@@ -340,11 +342,11 @@ const valid = {
|
|
|
340
342
|
break;
|
|
341
343
|
case Enum.ControlType.File:
|
|
342
344
|
case Enum.ControlType.SliceUpload:
|
|
343
|
-
|
|
345
|
+
rtnValidate.push(valid.requiredFile);
|
|
344
346
|
break;
|
|
345
347
|
case Enum.ControlType.PhotoSelect:
|
|
346
348
|
rtnValidate.push(valid.requiredPhoto);
|
|
347
|
-
|
|
349
|
+
break;
|
|
348
350
|
default:
|
|
349
351
|
rtnValidate.push(valid.required);
|
|
350
352
|
break;
|
package/src/main.js
CHANGED
|
@@ -16,16 +16,18 @@ Vue.config.productionTip = false;
|
|
|
16
16
|
Vue.use(centaline, {
|
|
17
17
|
// baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
|
|
18
18
|
// baseUrl: "http://10.88.22.46:6060/onecard-api/",
|
|
19
|
+
baseUrl: "http://10.88.22.46:9999/service-api/",
|
|
20
|
+
// baseUrl: "http://10.88.22.46:22324/service-api/v1/form/router",
|
|
19
21
|
// baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
|
|
20
22
|
// baseUrl: "http://10.88.22.13:6060/onecard-api/",
|
|
21
23
|
// baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
|
|
22
|
-
baseUrl: "http://10.25.10.63:9999/service-api/",
|
|
23
|
-
baseUrl: "http://10.25.10.67:9999/service-api/",
|
|
24
|
+
// baseUrl: "http://10.25.10.63:9999/service-api/",
|
|
25
|
+
// baseUrl: "http://10.25.10.67:9999/service-api/",
|
|
24
26
|
// baseUrl: "http://10.25.10.69:8080/",
|
|
25
27
|
// baseUrl: "https://ccesutest.centaline.com.cn/service-api/v1/form/router",
|
|
26
28
|
// baseUrl: "http://10.88.22.69:8080/api/",
|
|
27
|
-
baseUrl: "http://10.88.22.46:9999/service-api/",
|
|
28
29
|
// baseUrl: "http://10.88.22.42:9999/service-api/",
|
|
30
|
+
baseUrl: "http://10.1.245.111:38908/service-api/",
|
|
29
31
|
// baseUrl: "http://10.1.245.111:31574/service-api/",
|
|
30
32
|
// baseUrl: "https://tjcptest.centaline.com.cn/",
|
|
31
33
|
// baseUrl: "https://shccai.centaline.com.cn/api/",
|
|
@@ -54,6 +56,9 @@ Vue.use(centaline, {
|
|
|
54
56
|
openTabUrl: function (action) {
|
|
55
57
|
alert("打开tab页URL:" + action)
|
|
56
58
|
},
|
|
59
|
+
openAnnexVerify:function(submitData, pageTitle, parentModel){
|
|
60
|
+
alert("openAnnexVerify")
|
|
61
|
+
},
|
|
57
62
|
// 获取请求头
|
|
58
63
|
getRequestHeaders: function () {
|
|
59
64
|
return {
|
|
@@ -62,17 +67,17 @@ Vue.use(centaline, {
|
|
|
62
67
|
// authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjksKAjEMQO_StYEkTZp2dq3TbjzE0JERxpX4AUW8u4qHcPd4m_ee7nKb3eDYxio1EJRKHoTFf8gzIKqOJbdajKfUssYRBZhTAWnWICbzoJR8xhhLLTLFLRIjE-g2G4hlhawtga9BLKKNWNht3HI_uYGMlFkl8cat_foT5BN-xe2ynHfL4x9zx-v6yRKbCR4QYp87SEeFzr1D2Hfbk4ZwQHOvNwAAAP__.WXDbBaPltpYZXolspry93UzYBfcZrKEmjpvrgrVTWFM"}',
|
|
63
68
|
|
|
64
69
|
// originalRequestURL: 'http://10.88.22.67:8080',
|
|
65
|
-
EstateInfo: '{"estateId":"
|
|
70
|
+
EstateInfo: '{"estateId":"1c581b7c-d629-4670-8a7c-6d622860bc58","estateName":"0%E9%87%91%E9%9A%85%E4%BA%91%E7%AD%91%E5%A4%A9%E6%B4%A5","estDeptPath":"009.014.001.001"}',
|
|
66
71
|
estateId: '',
|
|
67
72
|
|
|
68
|
-
authObject: '{"currentEstate":{"estateId":"
|
|
69
|
-
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.
|
|
73
|
+
authObject: '{"currentEstate":{"estateId":"2021012114303422B4EEE3B843911CD0","estateName":"0%E6%81%92%E8%A3%95%E6%B7%B1%E5%9C%B3%E6%B9%BE0","estDeptPath":"001.007.001"},"platform":1,"osVersion":"","clientVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"vHBZlA","time":1723713874993,"sign":"d38f285069b890a31043567989ec15c0","systemSource":"CCESU","empNo":"ceshics0","empId":"201804231035296D8646770E1ECD32CD"}',
|
|
74
|
+
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImQ3MTJkNWMyLTdiYmUtNGZiMC05Y2ViLTE3ZjM3N2UwODMwOSJ9.4O6r0mtfsBbBLwiW6FQ0QSMbce7oEQRDnKrRP5SypazRGLODIZF5V7qJMMi60I-mdD-OcX-lS9PnykEn6-Gs_w',
|
|
70
75
|
};
|
|
71
76
|
},
|
|
72
77
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
|
73
78
|
requestComplete: function (response) {
|
|
74
79
|
|
|
75
|
-
}
|
|
80
|
+
},
|
|
76
81
|
}});
|
|
77
82
|
|
|
78
83
|
/* eslint-disable no-new */
|