centaline-data-driven 1.1.37 → 1.1.41
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/src/Form.vue +4 -2
- package/src/centaline/common/index.js +1 -0
- package/src/centaline/dynamicCb/index.js +11 -0
- package/src/centaline/dynamicCb/src/dynamicCb.vue +72 -0
- package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +1 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +5 -2
- package/src/centaline/dynamicTree/src/dynamicTree.vue +5 -1
- package/src/centaline/dynamicTree/src/dynamicTreeList.vue +9 -11
- package/src/centaline/loader/src/ctl/Cb.js +27 -0
- package/src/centaline/loader/src/ctl/InputNumber.js +9 -7
- package/src/centaline/loader/src/ctl/Iti.js +7 -1
- package/src/centaline/loader/src/ctl/Tree.js +1 -4
- package/src/centaline/loader/src/ctl/lib/Enum.js +5 -1
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +5 -0
- package/src/centaline/validate/index.js +2 -0
- package/src/main.js +3 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -35,6 +35,7 @@ const paths = {
|
|
|
35
35
|
"dynamicDetail": "./src/centaline/dynamicDetail/index.js",//详情页控件
|
|
36
36
|
"dynamicTree": "./src/centaline/dynamicTree/index.js",//树组件
|
|
37
37
|
"dynamicSensitiveEye": "./src/centaline/dynamicSensitiveEye/index.js",////敏感数据小眼睛控
|
|
38
|
+
"dynamicCb": "./src/centaline/dynamicCb/index.js",////复选框
|
|
38
39
|
"progress": "./src/centaline/progress/index.js",//进度条
|
|
39
40
|
},
|
|
40
41
|
"plugs": {
|
package/package.json
CHANGED
package/src/Form.vue
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
|
-
<ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form>
|
|
3
|
+
<!-- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form> -->
|
|
4
4
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
5
5
|
<!--:api="'FormSample/formdata'"-->
|
|
6
6
|
<!--<ct-form :source="formdata.content"></ct-form>-->
|
|
7
7
|
<!--<ct-form :api="'/api/form/formdata/contractDetail'" :apiParam="apiParam"></ct-form>-->
|
|
8
8
|
<!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
|
|
9
|
+
<ct-form :api="'/forminfo/readDetail'" :apiParam="apiParam"></ct-form>
|
|
9
10
|
<ct-dialog-list></ct-dialog-list>
|
|
10
11
|
</div>
|
|
11
12
|
</template>
|
|
@@ -15,9 +16,10 @@
|
|
|
15
16
|
name: 'App',
|
|
16
17
|
data() {
|
|
17
18
|
return {
|
|
18
|
-
apiParam: {originalTraId: "1481454808274235394", actionType: 3, pageTitle: "成交报告", pageOnly: true} ,
|
|
19
|
+
// apiParam: {originalTraId: "1481454808274235394", actionType: 3, pageTitle: "成交报告", pageOnly: true} ,
|
|
19
20
|
// apiParam: {headerParam: {}, urlParam: {contractID: "06cad32e-4d0d-4b6f-bd24-16a28629a550", actionType: "0"}}
|
|
20
21
|
// apiParam: {SN: "13557_132", UserID: "wuhan3"},
|
|
22
|
+
apiParam: {actionType: 3,formId: "2c12649f-09c5-4aa9-8011-b6d1c7b56a41"} ,
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
25
|
methods: {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="field-top">
|
|
3
|
+
<div v-if="model !== null" class="ct-checkbox">
|
|
4
|
+
<div :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
|
|
5
|
+
<div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
|
|
6
|
+
{{model.label}}
|
|
7
|
+
</div>
|
|
8
|
+
<div class="ct-radios">
|
|
9
|
+
<el-checkbox v-model="model.value" :disabled="model.lock" @change="changeCheckBoxHandler"></el-checkbox>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<transition name="el-fade-in">
|
|
13
|
+
<span v-show="!valid" class="errorMessage">
|
|
14
|
+
{{validMessage}}
|
|
15
|
+
</span>
|
|
16
|
+
</transition>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
<script>
|
|
21
|
+
import dynamicElement from '../../mixins/dynamicElement';
|
|
22
|
+
export default {
|
|
23
|
+
name: 'ct-cb',
|
|
24
|
+
mixins: [dynamicElement],
|
|
25
|
+
props: {
|
|
26
|
+
vmodel: Object,
|
|
27
|
+
api: String
|
|
28
|
+
},
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
mounted() {
|
|
35
|
+
var self = this;
|
|
36
|
+
this.$nextTick(function () {
|
|
37
|
+
|
|
38
|
+
if (self.vmodel) {
|
|
39
|
+
self.load(self.vmodel);
|
|
40
|
+
self.$emit('loaded');
|
|
41
|
+
}
|
|
42
|
+
else if (typeof self.source !== 'undefined') {
|
|
43
|
+
self.loaderObj.Seg(self.source, (data) => {
|
|
44
|
+
self.load(data);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
load(data) {
|
|
51
|
+
this.model = data;
|
|
52
|
+
},
|
|
53
|
+
changeCheckBoxHandler: function (event) {
|
|
54
|
+
this.changeHandler();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
<style>
|
|
60
|
+
.ct-checkbox {
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
|
64
|
+
.ct-checkbox .ct-radios {
|
|
65
|
+
color: #606266;
|
|
66
|
+
/* border-radius: 4px; */
|
|
67
|
+
/* border: 1px solid #dcdfe6; */
|
|
68
|
+
padding-left: 15px;
|
|
69
|
+
padding-bottom: 3px;
|
|
70
|
+
padding-top: 3px;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -761,8 +761,11 @@
|
|
|
761
761
|
}
|
|
762
762
|
//执行客户端脚本
|
|
763
763
|
else {
|
|
764
|
-
let parm={submitData:submitData,field:field}
|
|
765
|
-
self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
764
|
+
// let parm={submitData:submitData,field:field}
|
|
765
|
+
// self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
766
|
+
let title=field.pageTitle==undefined ?field.label:field.pageTitle;
|
|
767
|
+
var fun =self.$common.getDataDrivenOpts().handler[action];
|
|
768
|
+
fun(submitData,title,self.model);
|
|
766
769
|
// var fun = self.model.scripts.formData[action];
|
|
767
770
|
// fun(submitData,field);
|
|
768
771
|
}
|
|
@@ -89,7 +89,11 @@
|
|
|
89
89
|
if (self.LastClickNode != data) {
|
|
90
90
|
self.LastClickNode = data;
|
|
91
91
|
var rowRouter = self.model.rowSelectRouter;
|
|
92
|
-
|
|
92
|
+
var SearchData = {};
|
|
93
|
+
rowRouter.submitFormField.forEach(v => {
|
|
94
|
+
SearchData[v] = data[v];
|
|
95
|
+
})
|
|
96
|
+
this.model.getCurrentRowApiData(rowRouter.action, SearchData, function (rowdata) {
|
|
93
97
|
var newdata = self.$common.deepClone(data);
|
|
94
98
|
newdata.rowRouter = rowdata
|
|
95
99
|
self.$emit('loaded', newdata);
|
|
@@ -27,17 +27,14 @@
|
|
|
27
27
|
props: {
|
|
28
28
|
vmodel: Object,
|
|
29
29
|
searchConditionApi: String,
|
|
30
|
-
searchDataApi: String
|
|
31
|
-
apiParam: {
|
|
32
|
-
type: Object,
|
|
33
|
-
default: () => { }
|
|
34
|
-
}
|
|
30
|
+
searchDataApi: String
|
|
35
31
|
},
|
|
36
32
|
data() {
|
|
37
33
|
return {
|
|
38
34
|
searchTableConditionApi: "",
|
|
39
35
|
searchTableDataApi: "",
|
|
40
|
-
isShowSearchlist: false
|
|
36
|
+
isShowSearchlist: false,
|
|
37
|
+
apiParam: {}
|
|
41
38
|
};
|
|
42
39
|
},
|
|
43
40
|
methods: {
|
|
@@ -51,7 +48,8 @@
|
|
|
51
48
|
delete defaultPara.rowRouter;
|
|
52
49
|
delete defaultPara.getLayoutOfSearch;
|
|
53
50
|
delete defaultPara.getList;
|
|
54
|
-
|
|
51
|
+
|
|
52
|
+
self.apiParam = defaultPara;
|
|
55
53
|
self.$nextTick(() => {
|
|
56
54
|
self.isShowSearchlist = true;
|
|
57
55
|
});
|
|
@@ -69,8 +67,8 @@
|
|
|
69
67
|
#app-Tree .el-main {
|
|
70
68
|
padding: 0 0px 0px 10px;
|
|
71
69
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
|
|
71
|
+
#app-Tree .el-main .ct-table-content {
|
|
72
|
+
padding: 0 0 0 15px;
|
|
73
|
+
}
|
|
76
74
|
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import Base from './Base';
|
|
3
|
+
import valid from '../../../validate/index';
|
|
4
|
+
import Axios from 'axios';
|
|
5
|
+
const Cb = function (source, callBack) {
|
|
6
|
+
var self = this;
|
|
7
|
+
var init = function (data) {
|
|
8
|
+
var rtn = {
|
|
9
|
+
get value() {
|
|
10
|
+
return data.code1 === "1";
|
|
11
|
+
},
|
|
12
|
+
set value(v) {
|
|
13
|
+
if (v) {
|
|
14
|
+
data.code1 = "1";
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
data.code1 = "0";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
rtn = base.copy(Base(data), rtn);
|
|
22
|
+
return rtn;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return init(source);
|
|
26
|
+
}
|
|
27
|
+
export default Cb;
|
|
@@ -2,14 +2,11 @@ import base from '../../index';
|
|
|
2
2
|
import Base from './Base';
|
|
3
3
|
import valid from '../../../validate/index';
|
|
4
4
|
import Axios from 'axios';
|
|
5
|
-
import Vue from 'vue';
|
|
6
5
|
const box = function (source, callBack) {
|
|
7
6
|
var self = this;
|
|
8
7
|
var init = function (data) {
|
|
9
8
|
var rtn = {
|
|
10
|
-
|
|
11
|
-
get clearable() {
|
|
12
|
-
|
|
9
|
+
get clearable() {
|
|
13
10
|
if (typeof source.clear === 'undefined'&&!source.locked) {
|
|
14
11
|
return true;
|
|
15
12
|
}
|
|
@@ -22,11 +19,16 @@ const box = function (source, callBack) {
|
|
|
22
19
|
},
|
|
23
20
|
set clearable(v) {
|
|
24
21
|
source.clear = v;
|
|
25
|
-
},
|
|
26
|
-
|
|
22
|
+
},
|
|
27
23
|
get decimals() {
|
|
28
24
|
return data.decimals1;
|
|
29
|
-
}
|
|
25
|
+
},
|
|
26
|
+
get value() {
|
|
27
|
+
return source.code1;
|
|
28
|
+
},
|
|
29
|
+
set value(v) {
|
|
30
|
+
source.code1 = v;
|
|
31
|
+
},
|
|
30
32
|
};
|
|
31
33
|
rtn = base.copy(Base(data), rtn);
|
|
32
34
|
rtn = base.copy(rtn, valid.Init(rtn));
|
|
@@ -101,12 +101,9 @@ const tree = function (source, callBack, searchModel, defaultSearchData, resolve
|
|
|
101
101
|
getCurrentRowApiData(api, searchModel, callback) {
|
|
102
102
|
var self = this;
|
|
103
103
|
var para = searchModel ? searchModel : {};
|
|
104
|
-
|
|
105
104
|
Vue.prototype.$api.postHandler(common.globalUri(), {
|
|
106
105
|
action: api,
|
|
107
|
-
para:
|
|
108
|
-
paramDataQuery: para
|
|
109
|
-
}
|
|
106
|
+
para: para
|
|
110
107
|
})
|
|
111
108
|
.then(function (response) {
|
|
112
109
|
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
@@ -28,6 +28,7 @@ import File from '../File';
|
|
|
28
28
|
import HyperLink from '../HyperLink';
|
|
29
29
|
import PlaceHolder from '../PlaceHolder';
|
|
30
30
|
import SensitiveEye from '../SensitiveEye';
|
|
31
|
+
import Cb from '../Cb';
|
|
31
32
|
|
|
32
33
|
const LibFunction = {
|
|
33
34
|
install(Vue) {
|
|
@@ -294,6 +295,10 @@ const LibFunction = {
|
|
|
294
295
|
item = SensitiveEye(field);
|
|
295
296
|
item.is = 'ct-sensitiveeye';
|
|
296
297
|
break;
|
|
298
|
+
case Enum.ControlType.CheckBox://复选框
|
|
299
|
+
item = Cb(field);
|
|
300
|
+
item.is = 'ct-cb';
|
|
301
|
+
break;
|
|
297
302
|
default:
|
|
298
303
|
item = L(field);
|
|
299
304
|
item.is = 'ct-labelText';
|
|
@@ -69,6 +69,7 @@ const actions = {
|
|
|
69
69
|
reg = /^(\-)?\d*$/;
|
|
70
70
|
}
|
|
71
71
|
else{
|
|
72
|
+
if(dc===-1)dc=12;
|
|
72
73
|
reg = new RegExp("^(\\-)?\\d*[.]{0,1}(\\d{1," + dc + "})?$");
|
|
73
74
|
}
|
|
74
75
|
if (v.value === '') {
|
|
@@ -102,6 +103,7 @@ const actions = {
|
|
|
102
103
|
reg = /^(\-)?\d*$/;
|
|
103
104
|
}
|
|
104
105
|
else{
|
|
106
|
+
if(dc===-1)dc=12;
|
|
105
107
|
reg = new RegExp("^(\\-)?\\d*[.]{0,1}(\\d{1," + dc + "})?$");
|
|
106
108
|
}
|
|
107
109
|
if (v.value === '' && v.value1 === '') {
|
package/src/main.js
CHANGED
|
@@ -12,7 +12,7 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
12
12
|
// 关闭生产模式下给出的提示
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
|
-
baseUrl:
|
|
15
|
+
baseUrl: "http://10.88.22.67:8080/v1/form/router",
|
|
16
16
|
zindex: 999,
|
|
17
17
|
showRequestErrorMessage: true,
|
|
18
18
|
handler: {
|
|
@@ -35,6 +35,8 @@ Vue.use(centaline, {
|
|
|
35
35
|
return {
|
|
36
36
|
oldToken: '2db49cf6-0026-428b-9167-4273376a076f',
|
|
37
37
|
estateId: '20210729104021C49F04B55C50F6AF58',
|
|
38
|
+
originalRequestURL: 'http://10.88.22.67:8080',
|
|
39
|
+
Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE0NmU5ZjEzLTVjMmYtNGVlMy1hM2U5LWIxM2QyZThjZTBhZSJ9.Gl8K5lbG7t5DyCqouu7Ux7Oh9xuAxqdOXr4JnoHCN-YwC3b2zPO-C2sHbYJUZHYQPa7kTNRmg1xJiwugpVo5Xw',
|
|
38
40
|
};
|
|
39
41
|
},
|
|
40
42
|
// 请求完成事件,可判断是否登录过期执行响应操作
|