centaline-data-driven 1.5.46 → 1.5.48
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 +1 -1
- package/release-log.md +11 -0
- package/src/Form.vue +2 -2
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +16 -4
- package/src/centaline/dynamicLayout/src/dynamicLayout.vue +7 -3
- package/src/centaline/dynamicLayout/src/dynamicLayoutLabel.vue +2 -2
- package/src/centaline/loader/src/ctl/Base.js +3 -1
- package/src/centaline/loader/src/ctl/CellLayout.js +1 -1
- package/src/centaline/loader/src/ctl/FormList.js +3 -0
- package/src/main.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +83 -58
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
package/release-log.md
CHANGED
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/
|
|
4
|
+
<ct-form :api="'/api/distribution/commission_presentiment/detail'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
|
|
5
5
|
<ct-dialog-list></ct-dialog-list>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
data() {
|
|
13
13
|
return {
|
|
14
14
|
apiParam:{
|
|
15
|
-
"
|
|
15
|
+
"transactionId":["1661661776303677441","1667002679704797185"],"actionType":2,"pageStyle":2,"pageTitle":"新增预结","pageOnly":true
|
|
16
16
|
},
|
|
17
17
|
topHeight:10,
|
|
18
18
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<el-table size="mini" class="max-table--border" :data="model.tableData" :key="itemKey" border
|
|
18
18
|
style="width: 100%" highlight-current-row :show-summary="model.showSummary" :summary-method="getSummaries">
|
|
19
19
|
<!--数据列-->
|
|
20
|
-
<el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" v-if="v.show !== false && v.type!==13" :render-header="renderHeader" :min-width="tableColumnWith">
|
|
20
|
+
<el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" :width="v.width" :fixed="model.frozenColumns.includes(v.id)" v-if="v.show !== false && v.type!==13" :render-header="renderHeader" :min-width="tableColumnWith">
|
|
21
21
|
<template slot="header" slot-scope="scope">
|
|
22
22
|
<div :class="[{'ct-table-required':v.required&&model.rows[0].edit&& model.rows[0].delete&&!model.tableDisabled},getHeadClass(v)]">
|
|
23
23
|
{{v.label}}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</el-table-column>
|
|
45
45
|
|
|
46
46
|
<!--操作列-->
|
|
47
|
-
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :render-header="renderHeader" :min-width="tableColumnWith">
|
|
47
|
+
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :fixed="fixedButtons" :width="'100%'" :render-header="renderHeader" :min-width="tableColumnWith">
|
|
48
48
|
<template slot-scope="scope">
|
|
49
49
|
<span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
|
|
50
50
|
{{scope.row.isSet?'保存':"修改"}}
|
|
@@ -167,10 +167,11 @@
|
|
|
167
167
|
model: null,
|
|
168
168
|
foucus: false,
|
|
169
169
|
itemKey: Math.random(),
|
|
170
|
-
tableColumnWith: 0
|
|
170
|
+
tableColumnWith: 0,
|
|
171
|
+
fixedButtons:false,
|
|
171
172
|
}
|
|
172
173
|
},
|
|
173
|
-
created() {
|
|
174
|
+
created() {
|
|
174
175
|
let self = this;
|
|
175
176
|
this.model = this.vmodel;
|
|
176
177
|
this.model.OptApi = this.api;
|
|
@@ -181,6 +182,17 @@
|
|
|
181
182
|
self.model.refFieldsLabel = this.$refs.FieldsLabel;
|
|
182
183
|
});
|
|
183
184
|
},
|
|
185
|
+
mounted() {
|
|
186
|
+
this.$nextTick(function () {
|
|
187
|
+
let domT=document.querySelector('#listTable');
|
|
188
|
+
if(domT){
|
|
189
|
+
let domB=domT.querySelector('.el-table__body-wrapper');
|
|
190
|
+
if(domB && domB.scrollWidth>domB.offsetWidth){
|
|
191
|
+
this.fixedButtons='right';
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
},
|
|
184
196
|
methods: {
|
|
185
197
|
getHeadClass(v) {
|
|
186
198
|
if (v.is === "ct-inputNumber") {
|
|
@@ -97,12 +97,16 @@
|
|
|
97
97
|
getValue(data, val) {
|
|
98
98
|
return val.split('.').reduce((data, currentVal) => {
|
|
99
99
|
var rtn = data[currentVal];
|
|
100
|
-
if (typeof rtn !==
|
|
100
|
+
if (typeof rtn !== "undefined" && typeof rtn == "string") {
|
|
101
101
|
rtn = rtn.replace(/"/g, "'");
|
|
102
|
+
rtn = rtn.replace(/&/g, "&");
|
|
102
103
|
rtn = rtn.replace(/>/g, ">");
|
|
103
104
|
rtn = rtn.replace(/</g, "<");
|
|
104
|
-
}
|
|
105
|
-
|
|
105
|
+
} else if (typeof rtn == "object") {
|
|
106
|
+
rtn = currentVal;
|
|
107
|
+
} else if (typeof rtn == "number") {
|
|
108
|
+
rtn = rtn;
|
|
109
|
+
} else {
|
|
106
110
|
rtn = "";
|
|
107
111
|
}
|
|
108
112
|
return rtn
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="model.routerKey&&model.visibility!='0'
|
|
3
|
-
<div
|
|
2
|
+
<div v-if="model.routerKey&&model.visibility!='0'">
|
|
3
|
+
<div v-if="model.rightRouter&&model.value!=''" class="wb" :style="model.styleObject">
|
|
4
4
|
<a href="javascript:void(0);" @click="clickHandler($event)" class="ct-tablecurrencyItem">
|
|
5
5
|
{{model.value}}
|
|
6
6
|
</a>
|
|
@@ -178,11 +178,13 @@ const Base = function (source) {
|
|
|
178
178
|
set locked(v) {
|
|
179
179
|
source.locked = v;
|
|
180
180
|
},
|
|
181
|
+
get width() {
|
|
182
|
+
return source.width;
|
|
183
|
+
},
|
|
181
184
|
get listBind() {
|
|
182
185
|
let bind = {};
|
|
183
186
|
bind = {
|
|
184
187
|
style: {
|
|
185
|
-
//width: 200 + 'px',
|
|
186
188
|
'width': source.width + 'px',
|
|
187
189
|
display: 'inline-table'
|
|
188
190
|
}
|
|
@@ -75,7 +75,7 @@ const CellLayout = function (source, actionRouter,rowdata, forname, forrowindex)
|
|
|
75
75
|
return b.id === source.routerKey;
|
|
76
76
|
});
|
|
77
77
|
if (typeof field !== "undefined") {
|
|
78
|
-
if ((!field.rightField || (typeof rowdata[forname][forrowindex] !== "undefined" && rowdata[forname][forrowindex][field.rightField] == 1))
|
|
78
|
+
if ((!field.rightField || (typeof rowdata[forname][forrowindex] !== "undefined" && (!rowdata[forname][forrowindex][field.rightField]||rowdata[forname][forrowindex][field.rightField] == 1)))) {
|
|
79
79
|
forrightRouter = true;
|
|
80
80
|
}
|
|
81
81
|
}
|
package/src/main.js
CHANGED
|
@@ -14,14 +14,14 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
14
14
|
// 关闭生产模式下给出的提示
|
|
15
15
|
Vue.config.productionTip = false;
|
|
16
16
|
Vue.use(centaline, {
|
|
17
|
-
baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
|
|
17
|
+
// baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
|
|
18
18
|
// baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
|
|
19
19
|
// baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
|
|
20
20
|
// baseUrl: "http://10.25.10.63:9999/service-api/v1/form/router",
|
|
21
21
|
// baseUrl: "http://10.25.10.67:8080/",
|
|
22
22
|
// baseUrl: "http://10.88.22.42:9999/service-api/v1/form/router",
|
|
23
23
|
// baseUrl: "http://10.88.22.69:8080/api/",
|
|
24
|
-
|
|
24
|
+
baseUrl: "http://10.88.22.16:8080/",
|
|
25
25
|
// baseUrl: "http://10.58.2.108:8080/",
|
|
26
26
|
// baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
27
27
|
// baseUrl: "http://tjcpuat.centaline.com.cn:9090/",
|
|
@@ -56,7 +56,7 @@ Vue.use(centaline, {
|
|
|
56
56
|
// 获取请求头
|
|
57
57
|
getRequestHeaders: function () {
|
|
58
58
|
return {
|
|
59
|
-
oldToken: '
|
|
59
|
+
oldToken: '681f7eeb-e659-4c3b-a8c4-88d60c36a518',
|
|
60
60
|
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQRO_iOiv5s1570zn-NBwiIuBIoUIkkUCIuxMEdPRMMRq95s1dzOsgWmHIccikIFr0gKQsMJYCURKxKdKYlHr-BH7UNz26yCFkByg7Aiw2A-tYwLDtEubgUibRiHo9i1aRRy-dtdSIab-8gdNKvcA618uu3v5x7rRMm3YkOZAfR6BtAWp_3LQHBNI8KHbkqlHi8QQAAP__.RrBgBqaFlp478oO3g5k_EEtjPt_o8qpJBkzgSP78Wa4',
|
|
61
61
|
authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEOgjAURf-lMy9p6aPvlY2-wuJHkAIlwckIJBrjv6tRN3fPcIeznHtT6z6oWkVuNEpnQdqyAoxUQdMRQxBmHUqyGLj3H-DHfOmNQU_GtdB4EkCHFtgIg6AT7GJrJURVqHw5qdo4b5CRNBZqSdtbWM_2JfY1nw_5-o9zx215Zj2lZFEbGGbUgKUfIc2ZIdPoHI5I05TV_QEAAP__.JcB2iXcfHNcB2eJQ_kEIhID-UXCMx-HDoIuv9ZIA33I"}',
|
|
62
62
|
|