centaline-data-driven 1.2.82 → 1.2.83
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/README.md +3 -3
- package/package.json +1 -1
- package/src/Form.vue +1 -5
- package/src/centaline/api/index.js +7 -17
- package/src/centaline/dynamicForm/src/dynamicForm.vue +9 -1
- package/src/centaline/dynamicLayout/src/dynamicLayoutImage.vue +1 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1 -1
- package/src/centaline/loader/src/ctl/Base.js +3 -0
- package/src/centaline/loader/src/ctl/Form.js +8 -8
- package/src/centaline/loader/src/ctl/Router.js +2 -2
- package/src/main.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/README.md
CHANGED
|
@@ -128,9 +128,9 @@ execServerScript(action, object, successCallback)
|
|
|
128
128
|
/**
|
|
129
129
|
* @method
|
|
130
130
|
* @param {string} message 消息文字。
|
|
131
|
-
* @param {string}
|
|
132
|
-
* @param {boolean}
|
|
133
|
-
* @param {number} duration 显示时间,
|
|
131
|
+
* @param {string} type 主题:success/warning/info/error。
|
|
132
|
+
* @param {boolean} center 是否居中。
|
|
133
|
+
* @param {number} duration 显示时间,1500毫秒。设为 0 则不会自动关闭。
|
|
134
134
|
* @param {boolean} showClose 是否显示关闭按钮。
|
|
135
135
|
* @desc 消息提示。常用于主动操作后的反馈提示。
|
|
136
136
|
*/
|
package/package.json
CHANGED
package/src/Form.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
3
|
<!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
|
|
4
4
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
5
|
-
<ct-form :api="'/
|
|
5
|
+
<ct-form :api="'/example/readDetail'" :apiParam="apiParam"></ct-form>
|
|
6
6
|
<!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
|
|
7
7
|
<ct-dialog-list></ct-dialog-list>
|
|
8
8
|
</div>
|
|
@@ -19,10 +19,6 @@
|
|
|
19
19
|
// apiParam: {originalTraId: "1516290587463507969", actionType: "3", pageStyle: "2", pageTitle: "成交报告",pageOnly: "true"}
|
|
20
20
|
apiParam:{
|
|
21
21
|
actionType: 2,
|
|
22
|
-
originalTraId: "1527194056950345730",
|
|
23
|
-
pageOnly: true,
|
|
24
|
-
pageStyle: 2,
|
|
25
|
-
pageTitle: "新增代收款"
|
|
26
22
|
}
|
|
27
23
|
}
|
|
28
24
|
},
|
|
@@ -156,7 +156,7 @@ const api = {
|
|
|
156
156
|
}
|
|
157
157
|
);
|
|
158
158
|
},
|
|
159
|
-
postThenHandler: function (response) {
|
|
159
|
+
postThenHandler: function (response,scripts) {
|
|
160
160
|
var data = response.data;
|
|
161
161
|
|
|
162
162
|
if (typeof common.getDataDrivenOpts().handler.requestComplete === 'function') {
|
|
@@ -165,7 +165,8 @@ const api = {
|
|
|
165
165
|
|
|
166
166
|
// 执行js
|
|
167
167
|
if (data.clientActionType === Enum.ClientActionType.ExcuteScript && data.content) {
|
|
168
|
-
eval(data.content);
|
|
168
|
+
// eval(data.content);
|
|
169
|
+
common.excute.call(scripts, data.content);
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
//关闭tab页
|
|
@@ -192,9 +193,6 @@ const api = {
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
if (data.notification === Enum.ActionType.Export && data.content) {//导出
|
|
195
|
-
//var fileName = data.content.fieldName1;
|
|
196
|
-
//var fileContent = window.atob(data.content.code1);
|
|
197
|
-
//Vue.prototype.$common.saveFile(fileName, fileContent);
|
|
198
196
|
var dialogOption = {
|
|
199
197
|
title: "导出",
|
|
200
198
|
content: [{
|
|
@@ -222,14 +220,6 @@ const api = {
|
|
|
222
220
|
}
|
|
223
221
|
else {
|
|
224
222
|
Vue.prototype.$message.error(response.data.rtnMsg);
|
|
225
|
-
// Vue.prototype.$message({
|
|
226
|
-
// message: response.data.rtnMsg,//消息文字
|
|
227
|
-
// dangerouslyUseHTMLString: false,
|
|
228
|
-
// type: 'error',//主题:success/warning/info/error
|
|
229
|
-
// center: true,//是否居中
|
|
230
|
-
// duration: 0, //显示时间, 毫秒。设为 0 则不会自动关闭
|
|
231
|
-
// showClose: true,//是否显示关闭按钮
|
|
232
|
-
// });
|
|
233
223
|
}
|
|
234
224
|
}
|
|
235
225
|
return Promise.reject(response);
|
|
@@ -237,22 +227,22 @@ const api = {
|
|
|
237
227
|
//返回给下一个链式调用
|
|
238
228
|
return Promise.resolve(response.data);
|
|
239
229
|
},
|
|
240
|
-
postHandler(url, params,
|
|
230
|
+
postHandler(url, params, scripts) {
|
|
241
231
|
if(common.flagRouterSelf()){
|
|
242
232
|
url=url+params.action;
|
|
243
233
|
params=params.para;
|
|
244
234
|
}
|
|
245
235
|
return Axios.post(url, params, {
|
|
246
236
|
headers: common.getDataDrivenOpts().handler.getRequestHeaders()
|
|
247
|
-
}).then(
|
|
248
|
-
|
|
237
|
+
}).then((response) => {
|
|
238
|
+
return this.postThenHandler(response,scripts);
|
|
239
|
+
}).catch((ex) => {
|
|
249
240
|
if (ex.message) {
|
|
250
241
|
Vue.prototype.$message.error(ex.message);
|
|
251
242
|
}
|
|
252
243
|
else if (typeof ex.data === "string") {
|
|
253
244
|
Vue.prototype.$message.error(ex.data);
|
|
254
245
|
}
|
|
255
|
-
//return Promise.reject(ex.data ? ex.data : ex);
|
|
256
246
|
return Promise.resolve(ex.data ? ex.data : ex);//错误处理了,直接返回成功,要判断response.rtnCode=200再处理
|
|
257
247
|
});
|
|
258
248
|
}
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
else{
|
|
413
413
|
self.model.doAction(data);
|
|
414
414
|
}
|
|
415
|
-
})
|
|
415
|
+
},self.model.scripts);
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
}
|
|
@@ -474,6 +474,14 @@
|
|
|
474
474
|
self.model.hiddenHandle(field);
|
|
475
475
|
self.model.requiredHandle(field);
|
|
476
476
|
//self.model.validMrf(field);
|
|
477
|
+
|
|
478
|
+
if(field.onAfterChanged){
|
|
479
|
+
var router =self.model.actionRouters.find((v) => {
|
|
480
|
+
return v.id === field.onAfterChanged;
|
|
481
|
+
});
|
|
482
|
+
self.clickHandler(router);
|
|
483
|
+
}
|
|
484
|
+
|
|
477
485
|
self.$forceUpdate();
|
|
478
486
|
},
|
|
479
487
|
changeCallBackHandler(field, callBackFunName, callBackPara) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="model.routerKey">
|
|
3
3
|
<div v-if="model.rightRouter&&model.value!=''" :ref="'router'+forname+forrowindex" :style="model.styleObject">
|
|
4
|
-
<el-popover class="Stats-popover" :
|
|
4
|
+
<el-popover class="Stats-popover" :placement="option.placement?option.placement:'left'"
|
|
5
5
|
v-model="visible" :trigger="option.trigger?option.trigger:''">
|
|
6
6
|
<div style="border-bottom:none">
|
|
7
7
|
<div style="color: #388cd3;text-align: center;">{{message}}</div>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<table border="0" cellpadding="0" cellspacing="0"
|
|
25
25
|
:class="['ct-table',model.attrs.size?'ct-table-'+model.attrs.size:'']">
|
|
26
26
|
<!--表头-->
|
|
27
|
-
<thead ref="tableHead">
|
|
27
|
+
<thead ref="tableHead" class="right-no-fixation-th">
|
|
28
28
|
<tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr" :key="columnsIndex">
|
|
29
29
|
<th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th checkbox-td" :class="[model.tdClass]">
|
|
30
30
|
<label class="el-checkbox">
|
|
@@ -442,24 +442,24 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
442
442
|
},
|
|
443
443
|
//消息提示 type主题:success/warning/info/error。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。 showClose 是否显示关闭按钮。
|
|
444
444
|
message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
|
|
445
|
-
|
|
445
|
+
if (typeof center === 'undefined') {
|
|
446
446
|
center = true;
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
}
|
|
448
|
+
if (typeof duration === 'undefined') {
|
|
449
449
|
duration = 1500;
|
|
450
|
-
|
|
451
|
-
|
|
450
|
+
}
|
|
451
|
+
if (typeof showClose === 'undefined') {
|
|
452
452
|
showClose = false;
|
|
453
|
-
|
|
453
|
+
}
|
|
454
454
|
|
|
455
|
-
|
|
455
|
+
Vue.prototype.$message({
|
|
456
456
|
message: message,//消息文字
|
|
457
457
|
dangerouslyUseHTMLString: dangerouslyUseHTMLString || false,
|
|
458
458
|
type: type || 'error',//主题:success/warning/info/error
|
|
459
459
|
center: center,//是否居中
|
|
460
460
|
duration: duration, //显示时间, 毫秒。设为 0 则不会自动关闭
|
|
461
461
|
showClose: showClose,//是否显示关闭按钮
|
|
462
|
-
|
|
462
|
+
});
|
|
463
463
|
},
|
|
464
464
|
},
|
|
465
465
|
getFormObj() {
|
|
@@ -241,9 +241,9 @@ const Router = function (source) {
|
|
|
241
241
|
}
|
|
242
242
|
return params;
|
|
243
243
|
},
|
|
244
|
-
doAction(data, callback) {
|
|
244
|
+
doAction(data, callback,scripts) {
|
|
245
245
|
if (rtn.action) {
|
|
246
|
-
Vue.prototype.$api.postHandler(common.globalUri(), rtn.getActionPara(data)).then((response) => {
|
|
246
|
+
Vue.prototype.$api.postHandler(common.globalUri(), rtn.getActionPara(data),scripts).then((response) => {
|
|
247
247
|
callback(response);
|
|
248
248
|
}).catch((ex) => {
|
|
249
249
|
callback(ex);//里面需要有data.rtnCode === 200的处理
|
package/src/main.js
CHANGED
|
@@ -12,10 +12,10 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
12
12
|
// 关闭生产模式下给出的提示
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
|
-
|
|
15
|
+
baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
16
16
|
// baseUrl: "http://10.88.23.22:9999/v1/form/router",
|
|
17
|
-
baseUrl: "http://10.88.22.69:8080/",
|
|
18
|
-
flagRouterSelf: true,
|
|
17
|
+
// baseUrl: "http://10.88.22.69:8080/",
|
|
18
|
+
// flagRouterSelf: true,
|
|
19
19
|
zindex: 999,
|
|
20
20
|
showRequestErrorMessage: true,
|
|
21
21
|
handler: {
|