centaline-data-driven 1.2.80 → 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/build/centaline/centaline.path.js +0 -2
- package/package.json +1 -1
- package/src/Form.vue +2 -6
- package/src/centaline/api/index.js +7 -17
- package/src/centaline/css/max.css +4 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +16 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +15 -0
- package/src/centaline/dynamicFile/src/dynamicFile.vue +15 -37
- package/src/centaline/dynamicForm/index.js +0 -4
- package/src/centaline/dynamicForm/src/dynamicForm.vue +10 -2
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +18 -0
- package/src/centaline/dynamicLayout/src/dynamicLayout.vue +3 -190
- package/src/centaline/dynamicLayout/src/dynamicLayoutChildren.vue +1 -2
- package/src/centaline/dynamicLayout/src/dynamicLayoutImage.vue +4 -5
- package/src/centaline/dynamicLayout/src/dynamicLayoutLabel.vue +6 -4
- package/src/centaline/dynamicLayout/src/dynamicLayoutLine.vue +3 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +285 -59
- package/src/centaline/loader/src/ctl/Base.js +3 -0
- package/src/centaline/loader/src/ctl/CellLayout.js +49 -61
- package/src/centaline/loader/src/ctl/File.js +0 -1
- package/src/centaline/loader/src/ctl/Form.js +8 -8
- package/src/centaline/loader/src/ctl/FormList.js +73 -19
- package/src/centaline/loader/src/ctl/Router.js +2 -2
- package/src/centaline/loader/src/ctl/SearchTable.js +49 -45
- package/src/main.js +4 -4
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
- package/src/centaline/dynamicLabel/index.js +0 -11
- package/src/centaline/dynamicLabel/src/dynamicLabel.vue +0 -73
- package/src/centaline/dynamicLs/index.js +0 -22
- package/src/centaline/dynamicLs/src/dynamicLs.vue +0 -233
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
|
*/
|
|
@@ -3,7 +3,6 @@ const paths = {
|
|
|
3
3
|
"dynamicD": "./src/centaline/dynamicD/index.js",//日期组件
|
|
4
4
|
"dynamicGp": "./src/centaline/dynamicGp/index.js",//分组标签组件
|
|
5
5
|
"dynamicIti": "./src/centaline/dynamicIti/index.js",//数字区域组件
|
|
6
|
-
"dynamicLs": "./src/centaline/dynamicLs/index.js",//表单列表组件
|
|
7
6
|
"dynamicMt": "./src/centaline/dynamicMt/index.js",//多行文本组件
|
|
8
7
|
"dynamicSo": "./src/centaline/dynamicSo/index.js",//单选下拉菜单
|
|
9
8
|
"dynamicSos": "./src/centaline/dynamicSos/index.js",//单选搜索下拉菜单
|
|
@@ -11,7 +10,6 @@ const paths = {
|
|
|
11
10
|
"dynamicT": "./src/centaline/dynamicT/index.js",//文本input组件
|
|
12
11
|
"dynamicL": "./src/centaline/dynamicL/index.js",//文本label组件
|
|
13
12
|
"dynamicTags": "./src/centaline/dynamicTags/index.js",//多选搜索下拉菜单组件
|
|
14
|
-
"dynamicLabel": "./src/centaline/dynamicLabel/index.js",//标签组件
|
|
15
13
|
"dynamicForm": "./src/centaline/dynamicForm/index.js",//表单组件
|
|
16
14
|
"dynamicDrop": "./src/centaline/dynamicDrop/index.js",//快捷下拉输入组件
|
|
17
15
|
"dynamicSearchList": "./src/centaline/dynamicSearchList/index.js",//查询表单组件
|
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>
|
|
@@ -18,11 +18,7 @@
|
|
|
18
18
|
// apiParam: {originalTraId: "1475658732246241281", actionType: 2, chanceID: "1"} ,
|
|
19
19
|
// apiParam: {originalTraId: "1516290587463507969", actionType: "3", pageStyle: "2", pageTitle: "成交报告",pageOnly: "true"}
|
|
20
20
|
apiParam:{
|
|
21
|
-
actionType:
|
|
22
|
-
originalTraId: "1526048947277938690",
|
|
23
|
-
pageOnly: true,
|
|
24
|
-
pageStyle: 2,
|
|
25
|
-
pageTitle: "成交报告"
|
|
21
|
+
actionType: 2,
|
|
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
|
}
|
|
@@ -354,6 +354,20 @@
|
|
|
354
354
|
if(this.model.tags2 && this.model.tags2[0]){
|
|
355
355
|
this.model.getTags2List(0);
|
|
356
356
|
}
|
|
357
|
+
if (typeof window.localStorage !== 'undefined') {
|
|
358
|
+
var tagkey = window.localStorage.getItem('detailtagkey');
|
|
359
|
+
for (var i = 0; i < self.model.tags1.length; i++) {
|
|
360
|
+
if (tagkey == self.model.tags1[i].appID) {
|
|
361
|
+
self.model.activeIndex1 = i.toString();
|
|
362
|
+
if (self.model.tags1 && self.model.tags1[i]) {
|
|
363
|
+
self.listKey = self.listKey + 1;
|
|
364
|
+
self.model.searchConditionApiTags1 = self.model.tags1[i].searchConditionApiUrl || '';
|
|
365
|
+
self.model.searchDataApiTags1 = self.model.tags1[i].searchDataApiUrl || '';
|
|
366
|
+
self.model.paramDataTags1 = self.model.tags1[i].paramData || '';
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
357
371
|
this.loadOperation();
|
|
358
372
|
this.loadCommission();
|
|
359
373
|
this.setDetailHeight();
|
|
@@ -444,7 +458,8 @@
|
|
|
444
458
|
this.listKey=this.listKey+1;
|
|
445
459
|
this.model.searchConditionApiTags1=this.model.tags1[i].searchConditionApiUrl||'';
|
|
446
460
|
this.model.searchDataApiTags1=this.model.tags1[i].searchDataApiUrl||'';
|
|
447
|
-
this.model.paramDataTags1=this.model.tags1[i].paramData||'';
|
|
461
|
+
this.model.paramDataTags1 = this.model.tags1[i].paramData || '';
|
|
462
|
+
window.localStorage.setItem("detailtagkey", this.model.tags1[i].appID);//存储
|
|
448
463
|
}
|
|
449
464
|
},
|
|
450
465
|
fieldClickHandler(field) {
|
|
@@ -149,6 +149,20 @@
|
|
|
149
149
|
if(this.model.tags2 && this.model.tags2[0]){
|
|
150
150
|
this.model.getTags2List(0);
|
|
151
151
|
}
|
|
152
|
+
if (typeof window.localStorage !== 'undefined') {
|
|
153
|
+
var tagkey = window.localStorage.getItem('simpletagkey');
|
|
154
|
+
for (var i = 0; i < self.model.tags1.length;i++) {
|
|
155
|
+
if (tagkey == self.model.tags1[i].appID) {
|
|
156
|
+
self.model.activeIndex1 = i.toString();
|
|
157
|
+
if (self.model.tags1 && self.model.tags1[i]) {
|
|
158
|
+
self.listKey = self.listKey + 1;
|
|
159
|
+
self.model.searchConditionApiTags1 = self.model.tags1[i].searchConditionApiUrl || '';
|
|
160
|
+
self.model.searchDataApiTags1 = self.model.tags1[i].searchDataApiUrl || '';
|
|
161
|
+
self.model.paramDataTags1 = self.model.tags1[i].paramData || '';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
152
166
|
this.loadOperation();
|
|
153
167
|
this.setDetailStyle();
|
|
154
168
|
this.$nextTick(() => {
|
|
@@ -249,6 +263,7 @@
|
|
|
249
263
|
this.model.searchConditionApiTags1 = this.model.tags1[i].searchConditionApiUrl || '';
|
|
250
264
|
this.model.searchDataApiTags1 = this.model.tags1[i].searchDataApiUrl || '';
|
|
251
265
|
this.model.paramDataTags1 = this.model.tags1[i].paramData || '';
|
|
266
|
+
window.localStorage.setItem("simpletagkey", this.model.tags1[i].appID);//存储
|
|
252
267
|
}
|
|
253
268
|
},
|
|
254
269
|
fieldClickHandler(field) {
|
|
@@ -207,7 +207,6 @@
|
|
|
207
207
|
},
|
|
208
208
|
//不能共用的数据校验
|
|
209
209
|
selfValidExcute: function (eventName) {
|
|
210
|
-
|
|
211
210
|
if (this.model.required) {
|
|
212
211
|
if (this.model.getfileListLength() === 0) {
|
|
213
212
|
this.validMessage = "必须上传附件";
|
|
@@ -217,48 +216,31 @@
|
|
|
217
216
|
}
|
|
218
217
|
|
|
219
218
|
if (this.model.max) {
|
|
220
|
-
|
|
221
|
-
if(this.model.getfileListLength() >= this.model.max)
|
|
222
|
-
{
|
|
219
|
+
if(this.model.getfileListLength() >= this.model.max){
|
|
223
220
|
this.disableUpload=true;
|
|
224
|
-
}
|
|
225
|
-
{
|
|
221
|
+
}
|
|
222
|
+
else{
|
|
226
223
|
this.disableUpload=false;
|
|
227
224
|
}
|
|
228
|
-
|
|
229
|
-
// if (this.model.getfileListLength() > this.model.max) {
|
|
230
|
-
// this.validMessage = "附件数量";
|
|
231
|
-
// if(this.model.min)
|
|
232
|
-
// {
|
|
233
|
-
// this.validMessage += "最少" + this.model.min + "个"+",";
|
|
234
|
-
// }
|
|
235
|
-
// // this.validMessage += "最多" + this.model.max+ "个";
|
|
236
|
-
// this.valid = false;
|
|
237
|
-
// return false;
|
|
238
|
-
// }
|
|
239
225
|
}
|
|
240
226
|
if (this.model.min) {
|
|
241
227
|
if (this.model.getfileListLength() < this.model.min) {
|
|
242
228
|
//change时需要判断有没有上传图片如果没有图片则不提示
|
|
243
|
-
|
|
244
|
-
if(eventName=='change' && this.model.getfileListLength()>0)
|
|
245
|
-
{
|
|
229
|
+
if(eventName=='change' && this.model.getfileListLength()>0){
|
|
246
230
|
this.validMessage = "附件数量还差" + (parseInt(this.model.min)-this.model.getfileListLength()) + "张";
|
|
247
231
|
this.valid = false;
|
|
248
|
-
}
|
|
249
|
-
{
|
|
232
|
+
}
|
|
233
|
+
else if(eventName=='valid'){
|
|
250
234
|
this.validMessage = "附件数量还差" + (parseInt(this.model.min)-this.model.getfileListLength()) + "张";
|
|
251
235
|
this.valid = false;
|
|
252
|
-
}else if(eventName=='remove')
|
|
253
|
-
{
|
|
254
|
-
this.valid = true;
|
|
255
236
|
}
|
|
256
|
-
|
|
237
|
+
else if(eventName=='remove'){
|
|
238
|
+
this.valid = true;
|
|
239
|
+
}
|
|
257
240
|
return false;
|
|
258
241
|
}
|
|
259
242
|
}
|
|
260
|
-
if(eventName=='valid'&&!this.validFileClass())
|
|
261
|
-
{
|
|
243
|
+
if(eventName=='valid'&&!this.validFileClass()){
|
|
262
244
|
this.validMessage="请选择附件分类";
|
|
263
245
|
this.valid = false;
|
|
264
246
|
return false;
|
|
@@ -267,17 +249,13 @@
|
|
|
267
249
|
return this.valid;
|
|
268
250
|
},
|
|
269
251
|
//验证附件分类是否必填
|
|
270
|
-
validFileClass()
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
{
|
|
274
|
-
if(this.model.sourceList&&this.model.sourceList.length>0)
|
|
275
|
-
{
|
|
252
|
+
validFileClass(){
|
|
253
|
+
if(this.model.paramName){
|
|
254
|
+
if(this.model.sourceList&&this.model.sourceList.length>0){
|
|
276
255
|
let notClass= this.model.sourceList.filter(item=>{
|
|
277
|
-
return item.mediaLabelID==undefined||item.mediaLabelID=="";
|
|
256
|
+
return (item.mediaLabelID==undefined||item.mediaLabelID=="") && item.flagDeleted !== true;
|
|
278
257
|
})
|
|
279
|
-
if(notClass.length>0)
|
|
280
|
-
{
|
|
258
|
+
if(notClass.length>0){
|
|
281
259
|
return false
|
|
282
260
|
}
|
|
283
261
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import dynamicForm from './src/dynamicForm'
|
|
2
2
|
import dynamicInput from '../dynamicInput/index'
|
|
3
|
-
import dynamicLabel from '../dynamicLabel/index'
|
|
4
|
-
import dynamicLs from '../dynamicLs/index'
|
|
5
3
|
import api from '../api/index'
|
|
6
4
|
import common from '../common/index'
|
|
7
5
|
import validate from '../validate/index'
|
|
@@ -9,8 +7,6 @@ import validate from '../validate/index'
|
|
|
9
7
|
dynamicForm.install = function (Vue) {
|
|
10
8
|
Vue.component(dynamicForm.name, dynamicForm);
|
|
11
9
|
Vue.component(dynamicInput.name, dynamicInput);
|
|
12
|
-
Vue.component(dynamicLabel.name, dynamicLabel);
|
|
13
|
-
Vue.component(dynamicLs.name, dynamicLs);
|
|
14
10
|
|
|
15
11
|
Vue.use(api);
|
|
16
12
|
Vue.use(common);
|
|
@@ -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) {
|
|
@@ -552,7 +560,7 @@
|
|
|
552
560
|
self.$refs.Fields.forEach((f) => {
|
|
553
561
|
if (f.model && typeof f.validExcute !== 'undefined') {
|
|
554
562
|
if (!f.validExcute()) {
|
|
555
|
-
if(i===0){
|
|
563
|
+
if(i===0 && f.model.label){
|
|
556
564
|
self.$message.error('【'+f.model.label+'】不能为空!');
|
|
557
565
|
}
|
|
558
566
|
i++;
|
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
<span v-else-if="v.is=='ct-sensitiveeye'">
|
|
31
31
|
<component v-if ref="Fields" :is="v.is" :vmodel="scope.row[v.id]" :vrowmodel="scope.row" :api="model.OptApi"></component>
|
|
32
32
|
</span>
|
|
33
|
+
<!--可点击的列-->
|
|
34
|
+
<span v-else-if="v.router" :class="'cell'" style="display: flex;">
|
|
35
|
+
<ct-tablecurrency :router="v.router" :colValue="scope.row[v.id].label" :rowData="scope.row"
|
|
36
|
+
@click="rolRouterClickHandler">
|
|
37
|
+
</ct-tablecurrency>
|
|
38
|
+
</span>
|
|
33
39
|
<ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" ref="FieldsLabel"></ct-span>
|
|
34
40
|
</template>
|
|
35
41
|
</el-table-column>
|
|
@@ -281,6 +287,18 @@
|
|
|
281
287
|
|
|
282
288
|
this.$emit('tableButtonClick', button, submitData);
|
|
283
289
|
},
|
|
290
|
+
rolRouterClickHandler(field, rowData,rowindex) {
|
|
291
|
+
if(this.$refs['popover'+rowindex]){
|
|
292
|
+
this.$refs['popover'+rowindex][0].doClose();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
var submitData = {};
|
|
296
|
+
field.submitListField.forEach((k) => {
|
|
297
|
+
submitData[k] = rowData[k];
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
this.$emit('tableButtonClick', field, submitData);
|
|
301
|
+
},
|
|
284
302
|
//汇总行 计算
|
|
285
303
|
getSummaries(param) {
|
|
286
304
|
const self = this;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-loading="loading" class="ct-Layout" v-if="Layout !== null && !loading">
|
|
3
|
-
<ct-layoutchildren :
|
|
3
|
+
<ct-layoutchildren :rowindex="rowindex" :vmodel="Layout" @click="clickHandler"></ct-layoutchildren>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
<script>
|
|
@@ -91,9 +91,7 @@
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
var xmlDOM = this.loadXML(str);
|
|
94
|
-
console.log(xmlDOM)
|
|
95
94
|
this.Layout = this.xmlToJson(xmlDOM);
|
|
96
|
-
this.model = this.loaderObj.CellLayout(this.Layout);
|
|
97
95
|
this.loading = false;
|
|
98
96
|
},
|
|
99
97
|
getValue(data, val) {
|
|
@@ -215,193 +213,8 @@
|
|
|
215
213
|
}
|
|
216
214
|
return obj;
|
|
217
215
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
var submitData = {};
|
|
221
|
-
var rowData = self.vmodel;
|
|
222
|
-
var actionRouter = self.actionRouter;
|
|
223
|
-
let field = actionRouter.find(b => {
|
|
224
|
-
return b.id === routerKey;
|
|
225
|
-
});
|
|
226
|
-
if (typeof forname !== "undefined") {
|
|
227
|
-
field.submitListField.forEach((k) => {
|
|
228
|
-
submitData[k] = rowData[forname][forrowindex][k];
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
field.submitListField.forEach((k) => {
|
|
233
|
-
submitData[k] = rowData[k];
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
let action = field.action;
|
|
237
|
-
if (field.actionField) {
|
|
238
|
-
action = rowData[field.actionField];
|
|
239
|
-
}
|
|
240
|
-
this.routerClickHandler(field, submitData, action, rowindex,forname, forrowindex);
|
|
241
|
-
},
|
|
242
|
-
routerClickHandler(field, submitData, action, rowindex, forname, forrowindex) {
|
|
243
|
-
let self = this;
|
|
244
|
-
action = action || field.action;
|
|
245
|
-
|
|
246
|
-
var clickAcion = function () {
|
|
247
|
-
//若不是客户端方法,则直接访问接口
|
|
248
|
-
if (!field.isClientFuntion) {
|
|
249
|
-
// 外部框架tab页打开
|
|
250
|
-
if (field.isFormPageInTab) {
|
|
251
|
-
submitData = field.getActionPara(submitData).para;
|
|
252
|
-
if (field.pageStyle) {
|
|
253
|
-
submitData.pageStyle = field.pageStyle;
|
|
254
|
-
}
|
|
255
|
-
self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
|
|
256
|
-
}
|
|
257
|
-
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
258
|
-
submitData = field.getActionPara(submitData).para;
|
|
259
|
-
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
260
|
-
}
|
|
261
|
-
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
262
|
-
submitData = field.getActionPara(submitData).para;
|
|
263
|
-
let query = self.$common.objectToQueryStr(submitData);
|
|
264
|
-
window.open(action + query, "_blank");
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
//self.operationLoading = true;
|
|
268
|
-
|
|
269
|
-
//Form
|
|
270
|
-
if (field.isOpenForm) {
|
|
271
|
-
var dialogOption = {
|
|
272
|
-
title: field.pageTitle,
|
|
273
|
-
pane: self.$common.getParentPane(self),
|
|
274
|
-
content: [{
|
|
275
|
-
component: field.navToNewPageName,
|
|
276
|
-
attrs: {
|
|
277
|
-
//source: data.content,
|
|
278
|
-
api: action,
|
|
279
|
-
apiParam: field.getActionPara(submitData).para,
|
|
280
|
-
showTitle: false,
|
|
281
|
-
width: field.dialogWidth + 'px',
|
|
282
|
-
height: field.dialogHeight + 'px'
|
|
283
|
-
},
|
|
284
|
-
on: {
|
|
285
|
-
submit(ev) {
|
|
286
|
-
if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
|
|
287
|
-
self.model.doAction(ev);
|
|
288
|
-
}
|
|
289
|
-
self.$forceUpdate();
|
|
290
|
-
self.$refs.footer.$forceUpdate();
|
|
291
|
-
self.$common.closeDialog(dialogOption.dialog);
|
|
292
|
-
self.updateCurrentRow(field, ev);
|
|
293
|
-
},
|
|
294
|
-
refreshParent() {
|
|
295
|
-
self.getPage(1);
|
|
296
|
-
self.$common.closeDialog(dialogOption.dialog);
|
|
297
|
-
},
|
|
298
|
-
closeDialog() {
|
|
299
|
-
self.updateCurrentRow(field);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}]
|
|
303
|
-
};
|
|
304
|
-
self.$common.openDialog(dialogOption);
|
|
305
|
-
}
|
|
306
|
-
//SearchList
|
|
307
|
-
else if (field.isOpenList) {
|
|
308
|
-
var dialogOption = {
|
|
309
|
-
title: field.pageTitle,
|
|
310
|
-
pane: self.$common.getParentPane(self),
|
|
311
|
-
content: [{
|
|
312
|
-
component: field.navToNewPageName,
|
|
313
|
-
attrs: {
|
|
314
|
-
searchConditionApi: field.actionForSearchLayout,
|
|
315
|
-
searchDataApi: field.actionForSearch,
|
|
316
|
-
apiParam: submitData,
|
|
317
|
-
width: field.dialogWidth + 'px',
|
|
318
|
-
height: field.dialogHeight + 'px'
|
|
319
|
-
},
|
|
320
|
-
on: {
|
|
321
|
-
refreshParent() {
|
|
322
|
-
self.getPage(1);
|
|
323
|
-
self.$common.closeDialog(dialogOption.dialog);
|
|
324
|
-
},
|
|
325
|
-
closeDialog() {
|
|
326
|
-
self.updateCurrentRow(field);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}]
|
|
330
|
-
};
|
|
331
|
-
self.$common.openDialog(dialogOption);
|
|
332
|
-
}
|
|
333
|
-
//Tabs
|
|
334
|
-
else if (field.isOpenTabs) {
|
|
335
|
-
var dialogOption = {
|
|
336
|
-
title: field.pageTitle,
|
|
337
|
-
pane: self.$common.getParentPane(self),
|
|
338
|
-
content: [{
|
|
339
|
-
component: field.navToNewPageName,
|
|
340
|
-
attrs: {
|
|
341
|
-
searchConditionApi: field.actionForSearchLayout,
|
|
342
|
-
searchDataApi: field.actionForSearch,
|
|
343
|
-
apiParam: submitData,
|
|
344
|
-
width: field.dialogWidth + 'px',
|
|
345
|
-
height: field.dialogHeight + 'px'
|
|
346
|
-
},
|
|
347
|
-
on: {
|
|
348
|
-
}
|
|
349
|
-
}]
|
|
350
|
-
};
|
|
351
|
-
self.$common.openDialog(dialogOption);
|
|
352
|
-
}
|
|
353
|
-
else {
|
|
354
|
-
field.doAction(submitData, (data) => {
|
|
355
|
-
self.model.doAction(data, field);
|
|
356
|
-
if (field.actionType === 19) {
|
|
357
|
-
self.callTelClick(self.$refs['layout' + rowindex].$refs.layoutchildren, data, forname, forrowindex)
|
|
358
|
-
}
|
|
359
|
-
})
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
//执行客户端脚本
|
|
364
|
-
else {
|
|
365
|
-
// let parm={submitData:submitData,field:field}
|
|
366
|
-
// self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
367
|
-
let title = field.pageTitle == undefined ? field.label : field.pageTitle;
|
|
368
|
-
submitData.actionType = field.actionType;
|
|
369
|
-
var fun = self.$common.getDataDrivenOpts().handler[action];
|
|
370
|
-
fun(submitData, title, self.model);
|
|
371
|
-
// var fun = self.model.scripts.formData[action];
|
|
372
|
-
// fun(submitData,field);
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
if (field.alert) {
|
|
377
|
-
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
378
|
-
confirmButtonText: field.alertOKButtonText,
|
|
379
|
-
cancelButtonText: field.alertCancelButtonText,
|
|
380
|
-
//type: 'warning'
|
|
381
|
-
center: field.alertCenter
|
|
382
|
-
}).then(() => {
|
|
383
|
-
clickAcion();
|
|
384
|
-
}).catch(() => {
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
else {
|
|
388
|
-
clickAcion();
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
callTelClick(VueCom, data, forname, forrowindex) {
|
|
392
|
-
if (typeof VueCom.$refs['router' + forname + forrowindex] !== "undefined") {
|
|
393
|
-
VueCom.callTelClick(data);
|
|
394
|
-
return true;
|
|
395
|
-
}
|
|
396
|
-
if (VueCom.$children.length>0) {
|
|
397
|
-
for (var i = 0; i < VueCom.$children.length; i++) {
|
|
398
|
-
var item = VueCom.$children[i];
|
|
399
|
-
var result = this.callTelClick(item, data,forname, forrowindex);
|
|
400
|
-
if (result) {
|
|
401
|
-
return result;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
216
|
+
clickHandler(routerKey, rowindex, forname, forrowindex) {
|
|
217
|
+
this.$emit('click', routerKey, rowindex, forname, forrowindex);
|
|
405
218
|
},
|
|
406
219
|
|
|
407
220
|
},
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="model.routerKey">
|
|
3
|
-
<div :ref="'router'+forname+forrowindex" :style="model.styleObject">
|
|
4
|
-
<el-popover class="Stats-popover" :
|
|
3
|
+
<div v-if="model.rightRouter&&model.value!=''" :ref="'router'+forname+forrowindex" :style="model.styleObject">
|
|
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>
|
|
8
8
|
<img v-show="qrCode" :src="qrCode" style="margin-top: 5px;" :style="{'width':width+'px','height':height+'px'}" />
|
|
9
9
|
</div>
|
|
10
|
-
<
|
|
11
|
-
fit="fit" slot="reference" @click="clickHandler($event)" style="cursor:pointer;"></el-image>
|
|
10
|
+
<img :src="tellImgUrl?tellImgUrl:model.value" slot="reference" @click="clickHandler($event)" style="cursor:pointer;width:100%" />
|
|
12
11
|
</el-popover>
|
|
13
12
|
</div>
|
|
14
13
|
</div>
|
|
15
|
-
<div v-else :style="model.styleObject">
|
|
14
|
+
<div v-else-if="model.value!=''" :style="model.styleObject">
|
|
16
15
|
<el-image :src="model.value"
|
|
17
16
|
fit="fit"></el-image>
|
|
18
17
|
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="model.routerKey">
|
|
3
|
-
<div
|
|
3
|
+
<div v-if="model.rightRouter&&model.value!=''" :style="model.styleObject">
|
|
4
4
|
<a href="javascript:void(0);" @click="clickHandler($event)" class="ct-tablecurrencyItem">
|
|
5
5
|
{{model.value}}
|
|
6
6
|
</a>
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
9
|
-
<div v-else :style="model.styleObject" v-html="model.value">
|
|
9
|
+
<div v-else-if="model.value!=''" :style="model.styleObject" v-html="model.value">
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
mixins: [dynamicElement],
|
|
18
18
|
props: {
|
|
19
19
|
vmodel: Object,
|
|
20
|
-
rowindex: Number
|
|
20
|
+
rowindex: Number,
|
|
21
|
+
forname: String,
|
|
22
|
+
forrowindex: String
|
|
21
23
|
},
|
|
22
24
|
data() {
|
|
23
25
|
return {
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
|
|
30
32
|
methods: {
|
|
31
33
|
clickHandler(ev) {
|
|
32
|
-
this.$emit('click', this.model.routerKey, this.rowindex);
|
|
34
|
+
this.$emit('click', this.model.routerKey, this.rowindex, this.forname, this.forrowindex);
|
|
33
35
|
}
|
|
34
36
|
},
|
|
35
37
|
computed: {
|