centaline-data-driven 1.5.66 → 1.5.68
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/.vs/Centaline.Front_End.DataDriven/DesignTimeBuild/.dtbcache +0 -0
- package/.vs/Centaline.Front_End.DataDriven/v16/Server/sqlite3/db.lock +0 -0
- package/.vs/Centaline.Front_End.DataDriven/v16/Server/sqlite3/storage.ide +0 -0
- package/obj/Centaline.Front_End.DataDriven.csproj.nuget.dgspec.json +11 -10
- package/obj/Centaline.Front_End.DataDriven.csproj.nuget.g.props +11 -14
- package/obj/Centaline.Front_End.DataDriven.csproj.nuget.g.targets +7 -7
- package/obj/project.assets.json +11 -52
- package/package.json +1 -1
- package/release-log.md +22 -2
- package/src/Detail.vue +3 -3
- package/src/Form.vue +4 -8
- package/src/SearchList.vue +48 -25
- package/src/centaline/api/index.js +51 -6
- package/src/centaline/dynamicCb/src/dynamicCb.vue +5 -1
- package/src/centaline/dynamicForm/src/dynamicForm.vue +2 -2
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +7 -50
- package/src/centaline/dynamicHyperLink/index.js +1 -1
- package/src/centaline/dynamicLayout/src/dynamicLayoutChildren.vue +17 -17
- package/src/centaline/dynamicPlaceHolder/index.js +1 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +1 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +88 -14
- package/src/centaline/dynamicViewerFile/src/dynamicViewerFile.vue +20 -7
- package/src/centaline/loader/src/ctl/Base.js +7 -6
- package/src/centaline/loader/src/ctl/Button.js +16 -16
- package/src/centaline/loader/src/ctl/FormList.js +2 -2
- package/src/centaline/loader/src/ctl/Mo.js +4 -2
- package/src/centaline/loader/src/ctl/PlaceHolder.js +2 -2
- package/src/centaline/loader/src/ctl/Router.js +14 -0
- package/src/centaline/loader/src/ctl/TimeSelect.js +6 -2
- package/src/main.js +15 -10
- package/wwwroot/static/centaline/centaline-data-driven.js +212 -108
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
- package/.vs/Centaline.Front_End.DataDriven/DesignTimeBuild/.dtbcache.v2 +0 -0
- package/.vs/Centaline.Front_End.DataDriven/config/applicationhost.config +0 -1034
- package/obj/Debug/netcoreapp2.1/Centaline.Front_End.DataDriven.csproj.FileListAbsolute.txt +0 -6
package/src/SearchList.vue
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
+
|
|
3
4
|
<!-- <ct-searchlist :searchConditionApi="'/api/third-dept-tran/transaction-workflow/getLayoutOfSearch'" :searchDataApi="'/api/third-dept-tran/transaction-workflow/list'"></ct-searchlist> -->
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/third-dept-tran/tran-list/layout'" :searchDataApi="'/api/third-dept-tran/tran-list'"></ct-searchlist> -->
|
|
6
7
|
|
|
7
|
-
<!-- <ct-searchlist :apiParam="para"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/third-dept-tran/profit-return/layout'" :searchDataApi="'/api/third-dept-tran/profit-return'"></ct-searchlist> -->
|
|
9
|
+
|
|
10
|
+
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/third-dept-tran/tran-list/tran-emp-achievement-layout'" :searchDataApi="'/api/third-dept-tran/tran-list/tran-emp-achievement-list'"></ct-searchlist> -->
|
|
11
|
+
|
|
12
|
+
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/finance/tran-commission-allocate/process-layout'" :searchDataApi="'/api/finance/tran-commission-allocate/process-list'"></ct-searchlist> -->
|
|
13
|
+
|
|
14
|
+
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/shift-approver/layout'" :searchDataApi="'/api/shift-approver/list'"></ct-searchlist> -->
|
|
15
|
+
|
|
16
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/api/necessaryFile/importTransFile/getLayoutOfSearch'" :searchDataApi="'/api/necessaryFile/importTransFile/getTableList'"></ct-searchlist> -->
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<!-- <ct-searchlist :searchConditionApi="'/mainlandsecond/CustAndContractRegSumList/getLayoutOfSearch'" :searchDataApi="'/mainlandsecond/CustAndContractRegSumList/getList'"></ct-searchlist> -->
|
|
20
|
+
|
|
21
|
+
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/filemanage/batchdownlist/getLayoutOfSearch'" :searchDataApi="'/filemanage/batchdownlist/getList'"></ct-searchlist> -->
|
|
22
|
+
|
|
11
23
|
|
|
12
24
|
<!-- <ct-searchlist :apiParam="para"
|
|
13
25
|
:searchConditionApi="'/api/transaction/adjustRecord/getLayoutOfSearch'"
|
|
@@ -37,16 +49,12 @@
|
|
|
37
49
|
:searchStatsApi="'/ProfileWorklistList/getListStats'">
|
|
38
50
|
</ct-searchlist> -->
|
|
39
51
|
|
|
40
|
-
|
|
41
|
-
:searchConditionApi="'/
|
|
42
|
-
:searchDataApi="'/
|
|
43
|
-
</ct-searchlist
|
|
52
|
+
<!-- <ct-searchlist :apiParam="para"
|
|
53
|
+
:searchConditionApi="'/RightValueList/getLayoutOfSearch'"
|
|
54
|
+
:searchDataApi="'/RightValueList/getListOfSearchModel'">
|
|
55
|
+
</ct-searchlist> -->
|
|
44
56
|
|
|
45
|
-
|
|
46
|
-
:searchCategoryApi="'/PropertyPublishList/getLayoutOfSearchCategory'"
|
|
47
|
-
:searchConditionApi="'/PropertyPublishList/getLayoutOfSearchForRET'" :searchStatsApi="'/PropertyPublishList/getListStatsForRET'"
|
|
48
|
-
:searchDataApi="'/PropertyPublishList/getListOfSearchModelForRET'">
|
|
49
|
-
</ct-searchlist>-->
|
|
57
|
+
<!-- <ct-searchlist :searchCategoryApi="'/PropertyPublishList/getLayoutOfSearchCategory'" :searchConditionApi="'/PropertyPublishList/getLayoutOfSearchForRET'" :searchStatsApi="'/PropertyPublishList/getListStatsForRET'" :searchDataApi="'/PropertyPublishList/getListOfSearchModelForRET'"></ct-searchlist> -->
|
|
50
58
|
|
|
51
59
|
<!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
|
|
52
60
|
:searchDataApi="'/PropertyRETList/getListOfSearchModel'"
|
|
@@ -54,25 +62,37 @@
|
|
|
54
62
|
:searchStatsApi="'/PropertyRETList/getListStats'">
|
|
55
63
|
</ct-searchlist> -->
|
|
56
64
|
|
|
57
|
-
<!-- <ct-searchlist :searchConditionApi="'/PropertyOFIList/getLayoutOfSearch'"
|
|
65
|
+
<!-- <ct-searchlist :searchConditionApi="'/PropertyOFIList/getLayoutOfSearch'" :appRootUrl="appRootUrl"
|
|
58
66
|
:searchDataApi="'/PropertyOFIList/getListOfSearchModel'"
|
|
59
67
|
:searchCategoryApi="'/PropertyOFIList/getLayoutOfSearchCategory'"
|
|
60
68
|
:searchStatsApi="'/PropertyOFIList/getListStats'">
|
|
61
69
|
</ct-searchlist> -->
|
|
62
70
|
|
|
63
|
-
<!-- <ct-searchlist :searchConditionApi="'/EstateList/getLayoutOfSearch'"
|
|
64
|
-
:searchDataApi="'/EstateList/getListOfSearchModel'">
|
|
65
|
-
</ct-searchlist> -->
|
|
71
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/EstateList/getLayoutOfSearch'" :searchDataApi="'/EstateList/getListOfSearchModel'"></ct-searchlist> -->
|
|
66
72
|
|
|
67
|
-
<!-- <ct-searchlist :searchConditionApi="'/EstateBuildingList/getLayoutOfSearch'"
|
|
68
|
-
:searchDataApi="'/EstateBuildingList/getListOfSearchModel'">
|
|
69
|
-
</ct-searchlist> -->
|
|
73
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/EstateBuildingList/getLayoutOfSearch'" :searchDataApi="'/EstateBuildingList/getListOfSearchModel'"></ct-searchlist> -->
|
|
70
74
|
|
|
71
|
-
<!-- <ct-searchlist :searchConditionApi="'/DistrictList/getLayoutOfSearch'"
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/DistrictList/getLayoutOfSearch'" :searchDataApi="'/DistrictList/getListOfSearchModel'"></ct-searchlist> -->
|
|
76
|
+
|
|
77
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/CustomerImportList/getLayoutOfSearch'" :searchDataApi="'/CustomerImportList/getListOfSearchModel'"></ct-searchlist> -->
|
|
74
78
|
|
|
75
|
-
<!-- <ct-searchlist :searchConditionApi="'/
|
|
79
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/CustomerList/getLayoutOfSearch'" :searchStatsApi="'/CustomerList/getListStats'" :searchDataApi="'/CustomerList/getListOfSearchModel'"></ct-searchlist> -->
|
|
80
|
+
|
|
81
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/CallTaskList/getLayoutOfSearch'" :searchDataApi="'/CallTaskList/getListOfSearchModel'"></ct-searchlist> -->
|
|
82
|
+
|
|
83
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/RoleList/getLayoutOfSearch'" :searchStatsApi="'/RoleList/getListStats'" :searchDataApi="'/RoleList/getListOfSearchModel'"></ct-searchlist> -->
|
|
84
|
+
|
|
85
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/TaskList/getLayoutOfSearch'" :searchStatsApi="'/TaskList/getListStats'" :searchDataApi="'/TaskList/getListOfSearchModel'"></ct-searchlist> -->
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/cache/getLayoutOfSearchForCache'" :searchDataApi="'/cache/getListOfSearchModelForCache'"></ct-searchlist> -->
|
|
90
|
+
|
|
91
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/AttendanceClassList/getLayoutOfSearch'" :searchDataApi="'/AttendanceClassList/getListOfSearchModel'"></ct-searchlist> -->
|
|
92
|
+
|
|
93
|
+
<ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/ReportMonthAttendanceList/getLayoutOfSearch'" :searchDataApi="'/ReportMonthAttendanceList/getListOfSearchModel'"></ct-searchlist>
|
|
94
|
+
|
|
95
|
+
|
|
76
96
|
|
|
77
97
|
<ct-dialog-list></ct-dialog-list>
|
|
78
98
|
</div>
|
|
@@ -84,6 +104,9 @@
|
|
|
84
104
|
name: 'DataDrivenSearch',
|
|
85
105
|
data() {
|
|
86
106
|
return {
|
|
107
|
+
// appRootUrl:'http://10.88.22.13:17070/max-uplink-api/',
|
|
108
|
+
// appRootUrl:'http://10.88.22.13:6060/onecard-api/',
|
|
109
|
+
appRootUrl:'',
|
|
87
110
|
para:{
|
|
88
111
|
|
|
89
112
|
},
|
|
@@ -127,7 +127,11 @@ Axios.defaults.maxContentLength = 400000;
|
|
|
127
127
|
|
|
128
128
|
const api = {
|
|
129
129
|
get(url, params, callback) {
|
|
130
|
-
if
|
|
130
|
+
if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
|
|
131
|
+
url=params.action;
|
|
132
|
+
params = params.para;
|
|
133
|
+
}
|
|
134
|
+
else if (common.flagRouterSelf()) {
|
|
131
135
|
url = url + (url=='' || url.substr(-1)=='/'?'':'/') + params.action;
|
|
132
136
|
params = params.para;
|
|
133
137
|
}
|
|
@@ -142,7 +146,11 @@ const api = {
|
|
|
142
146
|
);
|
|
143
147
|
},
|
|
144
148
|
post(url, params, callback) {
|
|
145
|
-
if
|
|
149
|
+
if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
|
|
150
|
+
url=params.action;
|
|
151
|
+
params = params.para;
|
|
152
|
+
}
|
|
153
|
+
else if (common.flagRouterSelf()) {
|
|
146
154
|
url = url + (url=='' || url.substr(-1)=='/'?'':'/') + params.action;
|
|
147
155
|
params = params.para;
|
|
148
156
|
}
|
|
@@ -165,7 +173,6 @@ const api = {
|
|
|
165
173
|
|
|
166
174
|
// 执行js
|
|
167
175
|
if (data.clientActionType === Enum.ClientActionType.ExcuteScript && data.content) {
|
|
168
|
-
// eval(data.content);
|
|
169
176
|
common.excute.call(scripts, data.content);
|
|
170
177
|
}
|
|
171
178
|
|
|
@@ -241,15 +248,21 @@ const api = {
|
|
|
241
248
|
return Promise.reject(response);
|
|
242
249
|
}
|
|
243
250
|
//返回给下一个链式调用
|
|
244
|
-
return Promise.resolve(response.data);
|
|
251
|
+
return Promise.resolve(response.data,response.headers);
|
|
245
252
|
},
|
|
246
253
|
postHandler(url, params, scripts) {
|
|
247
|
-
if
|
|
254
|
+
if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
|
|
255
|
+
url=params.action;
|
|
256
|
+
params = params.para;
|
|
257
|
+
}
|
|
258
|
+
else if (common.flagRouterSelf()) {
|
|
248
259
|
url = url + (url=='' || url.substr(-1)=='/'?'':'/') + params.action;
|
|
249
260
|
params = params.para;
|
|
250
261
|
}
|
|
262
|
+
let responseType=params.responseType || 'json';
|
|
251
263
|
return Axios.post(url, params, {
|
|
252
|
-
headers: common.getDataDrivenOpts().handler.getRequestHeaders()
|
|
264
|
+
headers: common.getDataDrivenOpts().handler.getRequestHeaders(),
|
|
265
|
+
responseType:responseType
|
|
253
266
|
}).then((response) => {
|
|
254
267
|
return this.postThenHandler(response, scripts);
|
|
255
268
|
}).catch((ex) => {
|
|
@@ -269,6 +282,38 @@ const api = {
|
|
|
269
282
|
}
|
|
270
283
|
return Promise.resolve(ex.data ? ex.data : ex);//错误处理了,直接返回成功,要判断response.rtnCode=200再处理
|
|
271
284
|
});
|
|
285
|
+
},
|
|
286
|
+
postBlobHandler(url, params, scripts) {
|
|
287
|
+
if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
|
|
288
|
+
url=params.action;
|
|
289
|
+
params = params.para;
|
|
290
|
+
}
|
|
291
|
+
else if (common.flagRouterSelf()) {
|
|
292
|
+
url = url + (url=='' || url.substr(-1)=='/'?'':'/') + params.action;
|
|
293
|
+
params = params.para;
|
|
294
|
+
}
|
|
295
|
+
return Axios.post(url, params, {
|
|
296
|
+
headers: common.getDataDrivenOpts().handler.getRequestHeaders(),
|
|
297
|
+
responseType:'blob'
|
|
298
|
+
}).then((response) => {
|
|
299
|
+
return this.postThenHandler(response, scripts);
|
|
300
|
+
}).catch((ex) => {
|
|
301
|
+
if (ex.message) {
|
|
302
|
+
Vue.prototype.$message({
|
|
303
|
+
message: ex.message,
|
|
304
|
+
type: 'error',
|
|
305
|
+
showClose:true,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
else if (typeof ex.data === "string") {
|
|
309
|
+
Vue.prototype.$message({
|
|
310
|
+
message: ex.data,
|
|
311
|
+
type: 'error',
|
|
312
|
+
showClose:true,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
return Promise.resolve(ex);//错误处理了,直接返回成功,要判断response.rtnCode=200再处理
|
|
316
|
+
});
|
|
272
317
|
},
|
|
273
318
|
SliceUpload(url, params, scripts) {
|
|
274
319
|
return Axios.post(url, params, {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
mixins: [dynamicElement],
|
|
26
26
|
props: {
|
|
27
27
|
vmodel: Object,
|
|
28
|
-
api: String
|
|
28
|
+
api: String,
|
|
29
|
+
from:String
|
|
29
30
|
},
|
|
30
31
|
data() {
|
|
31
32
|
return {
|
|
@@ -50,6 +51,9 @@
|
|
|
50
51
|
methods: {
|
|
51
52
|
load(data) {
|
|
52
53
|
this.model = data;
|
|
54
|
+
if(this.from=="form"&&this.model.code1==""){
|
|
55
|
+
this.model.code1="0";
|
|
56
|
+
}
|
|
53
57
|
},
|
|
54
58
|
toggleCheckbox() {
|
|
55
59
|
this.model.value = !this.model.value;
|
|
@@ -665,7 +665,7 @@
|
|
|
665
665
|
field.doAction(submitData, (data) => {
|
|
666
666
|
if (data.content) {
|
|
667
667
|
if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
|
|
668
|
-
if(data.
|
|
668
|
+
if(data.content.indexOf(".zip") > -1){
|
|
669
669
|
window.location.href = encodeURI(data.action);
|
|
670
670
|
}
|
|
671
671
|
else{
|
|
@@ -989,7 +989,7 @@
|
|
|
989
989
|
if (f.model && typeof f.validExcute !== 'undefined') {
|
|
990
990
|
if (!f.validExcute()) {
|
|
991
991
|
if (i === 0) {
|
|
992
|
-
if (f.model.is == "ct-file"||f.model.is == "ct-repeat") {
|
|
992
|
+
if (f.model.is == "ct-file"||f.model.is == "ct-repeat"||f.model.is == "ct-form-list-table") {
|
|
993
993
|
self.$message({
|
|
994
994
|
message: f.validMessage,
|
|
995
995
|
type: 'error',
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div id="listTable">
|
|
15
15
|
<el-row>
|
|
16
16
|
<el-col :span="24">
|
|
17
|
-
<el-table size="mini" class="max-table--border" :data="model.tableData"
|
|
17
|
+
<el-table size="mini" class="max-table--border" :data="model.tableData" border
|
|
18
18
|
style="width: 100%" highlight-current-row :show-summary="model.showSummary" :summary-method="getSummaries">
|
|
19
19
|
<!--数据列-->
|
|
20
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">
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
<template slot-scope="scope">
|
|
27
27
|
<span v-if="scope.row.isSet">
|
|
28
28
|
<component ref="Fields" :is="model.currentRow.data[v.id].locked || model.currentRow.data[v.id].is!==v.is?model.currentRow.data[v.id].is:v.is"
|
|
29
|
-
:vmodel="model.currentRow.data[v.id]" :api="model.OptApi" :key="model.currentRow.data[v.id].rowKey"
|
|
29
|
+
:vmodel="model.currentRow.data[v.id]" :api="model.OptApi" :key="model.currentRow.data[v.id].rowKey+itemKey"
|
|
30
30
|
@change="changeHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"
|
|
31
31
|
@input="inputHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"></component>
|
|
32
32
|
</span>
|
|
33
33
|
<span v-else-if="v.is=='ct-sensitiveeye'">
|
|
34
|
-
<component ref="Fields" :is="v.is" :vmodel="scope.row[v.id]" :vrowmodel="scope.row" :api="model.OptApi"></component>
|
|
34
|
+
<component ref="Fields" :is="v.is" :vmodel="scope.row[v.id]" :vrowmodel="scope.row" :api="model.OptApi" :key="model.currentRow.data[v.id].rowKey+itemKey"></component>
|
|
35
35
|
</span>
|
|
36
36
|
<!--可点击的列-->
|
|
37
37
|
<span v-else-if="v.router" :class="'cell'" style="display: flex;">
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<ct-tablecurrency :router="v.router" :colValue="scope.row[v.id].code1" :rowData="scope.row" @click="rolRouterClickHandler">
|
|
40
40
|
</ct-tablecurrency>
|
|
41
41
|
</span>
|
|
42
|
-
<ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" :rowData="scope.row" :key="scope.row[v.id].rowKey" ref="FieldsLabel"></ct-span>
|
|
42
|
+
<ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" :rowData="scope.row" :key="scope.row[v.id].rowKey+itemKey" ref="FieldsLabel"></ct-span>
|
|
43
43
|
</template>
|
|
44
44
|
</el-table-column>
|
|
45
45
|
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
break;
|
|
143
143
|
case 43:
|
|
144
144
|
labelShow=this.vmodel.value?'是':'否';
|
|
145
|
-
break;
|
|
145
|
+
break;
|
|
146
146
|
default:
|
|
147
147
|
break;
|
|
148
148
|
}
|
|
@@ -169,7 +169,6 @@
|
|
|
169
169
|
itemKey: Math.random(),
|
|
170
170
|
tableColumnWith: 0,
|
|
171
171
|
fixedButtons:false,
|
|
172
|
-
scrollLeft:0,
|
|
173
172
|
}
|
|
174
173
|
},
|
|
175
174
|
created() {
|
|
@@ -183,22 +182,7 @@
|
|
|
183
182
|
self.model.refFieldsLabel = this.$refs.FieldsLabel;
|
|
184
183
|
});
|
|
185
184
|
},
|
|
186
|
-
mounted() {
|
|
187
|
-
let self=this;
|
|
188
|
-
this.$nextTick(function () {
|
|
189
|
-
let domT=document.querySelector('#listTable');
|
|
190
|
-
if(domT){
|
|
191
|
-
let domB=domT.querySelector('.el-table__body-wrapper');
|
|
192
|
-
if(domB && domB.scrollWidth>domB.offsetWidth){
|
|
193
|
-
this.fixedButtons='right';
|
|
194
|
-
}
|
|
195
|
-
if(domB){
|
|
196
|
-
domB.addEventListener("scroll", function(){
|
|
197
|
-
self.scrollLeft=domB.scrollLeft;
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
});
|
|
185
|
+
mounted() {
|
|
202
186
|
},
|
|
203
187
|
methods: {
|
|
204
188
|
getHeadClass(v) {
|
|
@@ -230,7 +214,6 @@
|
|
|
230
214
|
app.model.currentRow.isNew = true;
|
|
231
215
|
app.model.currentRow.index = app.model.tableData.length - 1;
|
|
232
216
|
}
|
|
233
|
-
app.resetScroll();
|
|
234
217
|
},
|
|
235
218
|
//修改
|
|
236
219
|
saveRow(row, index, isCancel) {
|
|
@@ -259,7 +242,6 @@
|
|
|
259
242
|
}
|
|
260
243
|
row.isSet = !row.isSet;
|
|
261
244
|
app.itemKey = Math.random();
|
|
262
|
-
app.resetScroll();
|
|
263
245
|
return ;
|
|
264
246
|
}
|
|
265
247
|
|
|
@@ -288,7 +270,6 @@
|
|
|
288
270
|
app.itemKey = Math.random();
|
|
289
271
|
this.model.change = this.model.formListChange;
|
|
290
272
|
app.$emit('change');
|
|
291
|
-
app.resetScroll();
|
|
292
273
|
}
|
|
293
274
|
}
|
|
294
275
|
}
|
|
@@ -299,7 +280,6 @@
|
|
|
299
280
|
app.model.currentRow.isSet = true;
|
|
300
281
|
row.isSet = true;
|
|
301
282
|
app.itemKey = Math.random();
|
|
302
|
-
app.resetScroll();
|
|
303
283
|
}
|
|
304
284
|
},
|
|
305
285
|
//删除
|
|
@@ -334,8 +314,6 @@
|
|
|
334
314
|
fd.$forceUpdate();
|
|
335
315
|
}
|
|
336
316
|
});
|
|
337
|
-
self.itemKey = Math.random();
|
|
338
|
-
self.resetScroll();
|
|
339
317
|
});
|
|
340
318
|
},
|
|
341
319
|
fieldsValidExcute() {
|
|
@@ -365,11 +343,7 @@
|
|
|
365
343
|
};
|
|
366
344
|
|
|
367
345
|
if (rtnBool && self.model.required && this.model.tableData.length === 0) {
|
|
368
|
-
self
|
|
369
|
-
message: this.model.label + " 表格不能为空",
|
|
370
|
-
type: 'warning',
|
|
371
|
-
showClose:true,
|
|
372
|
-
});
|
|
346
|
+
self.validMessage=this.model.label + " 表格不能为空";
|
|
373
347
|
rtnBool = false;
|
|
374
348
|
}
|
|
375
349
|
self.foucus = true;
|
|
@@ -503,23 +477,6 @@
|
|
|
503
477
|
document.body.removeChild(span);
|
|
504
478
|
return h('span', column.label);
|
|
505
479
|
},
|
|
506
|
-
resetScroll(){
|
|
507
|
-
let self=this;
|
|
508
|
-
this.$nextTick(function () {
|
|
509
|
-
let domT=document.querySelector('#listTable');
|
|
510
|
-
if(domT){
|
|
511
|
-
let domB=domT.querySelector('.el-table__body-wrapper');
|
|
512
|
-
if(domB){
|
|
513
|
-
if(this.scrollLeft>0){
|
|
514
|
-
domB.scrollLeft=this.scrollLeft;
|
|
515
|
-
}
|
|
516
|
-
domB.addEventListener("scroll", function(){
|
|
517
|
-
self.scrollLeft=domB.scrollLeft;
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
});
|
|
522
|
-
},
|
|
523
480
|
}
|
|
524
481
|
}
|
|
525
482
|
</script>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-container v-if="model.routerKey&&model.visibility!='0'&&model.rightRouter&&model.value!=''" :direction="model.orientation" :style="model.styleObject" ref="layoutchildren">
|
|
3
|
-
<div @click="clickHandlerLayout($event)">
|
|
4
|
-
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index" :is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex" @click="clickHandler"></component>
|
|
5
|
-
</div>
|
|
6
|
-
</el-container>
|
|
7
|
-
<el-container v-else-if="model.value!=''&&model.visibility!='0'" :direction="model.orientation" :style="model.styleObject" ref="layoutchildren">
|
|
8
|
-
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index" :is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex" @click="clickHandler"></component>
|
|
9
|
-
</el-container>
|
|
1
|
+
<template>
|
|
2
|
+
<el-container v-if="model.routerKey&&model.visibility!='0'&&model.rightRouter&&model.value!=''" :direction="model.orientation" :style="model.styleObject" ref="layoutchildren">
|
|
3
|
+
<div @click="clickHandlerLayout($event)">
|
|
4
|
+
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index" :is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex" @click="clickHandler"></component>
|
|
5
|
+
</div>
|
|
6
|
+
</el-container>
|
|
7
|
+
<el-container v-else-if="model.value!=''&&model.visibility!='0'" :direction="model.orientation" :style="model.styleObject" ref="layoutchildren">
|
|
8
|
+
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index" :is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex" @click="clickHandler"></component>
|
|
9
|
+
</el-container>
|
|
10
10
|
</template>
|
|
11
11
|
<script>
|
|
12
12
|
import dynamicElement from '../../mixins/dynamicElement'
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
39
|
created() {
|
|
40
|
-
this.model = this.loaderObj.CellLayout(this.vmodel);
|
|
40
|
+
this.model = this.loaderObj.CellLayout(this.vmodel);
|
|
41
41
|
},
|
|
42
42
|
methods: {
|
|
43
43
|
clickHandler(routerKey, rowindex, forname, forrowindex,flagHaveAlert) {
|
|
44
44
|
this.$emit('click', routerKey, rowindex, forname, forrowindex,flagHaveAlert);
|
|
45
|
-
},
|
|
46
|
-
clickHandlerLayout(ev) {
|
|
45
|
+
},
|
|
46
|
+
clickHandlerLayout(ev) {
|
|
47
47
|
this.$emit(
|
|
48
48
|
"click",
|
|
49
49
|
this.model.routerKey,
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
for (const vn of vnodes) {
|
|
65
65
|
destroyDeep(vn)
|
|
66
66
|
}
|
|
67
|
-
}
|
|
68
|
-
if (typeof vnode.componentInstance !== 'undefined') {
|
|
69
|
-
vnode.componentInstance.$destroy()
|
|
67
|
+
}
|
|
68
|
+
if (typeof vnode.componentInstance !== 'undefined') {
|
|
69
|
+
vnode.componentInstance.$destroy()
|
|
70
70
|
}
|
|
71
71
|
setTimeout(() => {
|
|
72
72
|
vnode.componentInstance = undefined
|
|
73
73
|
vnode.elm.innerHTML = ''
|
|
74
74
|
}, 0)
|
|
75
75
|
}
|
|
76
|
-
destroyDeep(this._vnode)
|
|
76
|
+
destroyDeep(this._vnode)
|
|
77
77
|
},
|
|
78
78
|
}
|
|
79
|
-
</script>
|
|
79
|
+
</script>
|
|
@@ -478,7 +478,7 @@ import dynamicElement from '../../mixins/dynamicElement';
|
|
|
478
478
|
field.doAction(submitData, (data) => {
|
|
479
479
|
if (data.content) {
|
|
480
480
|
if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
|
|
481
|
-
if(data.
|
|
481
|
+
if(data.content.indexOf(".zip") > -1){
|
|
482
482
|
window.location.href = encodeURI(data.action);
|
|
483
483
|
}
|
|
484
484
|
else{
|
|
@@ -691,7 +691,7 @@ export default {
|
|
|
691
691
|
break;
|
|
692
692
|
}
|
|
693
693
|
else {
|
|
694
|
-
topHeigth = topHeigth + this.model.listData[index].$heigth;
|
|
694
|
+
topHeigth = topHeigth + this.model.listData[index].$heigth||31;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
this.firstRow = index - 1;
|
|
@@ -1206,7 +1206,54 @@ export default {
|
|
|
1206
1206
|
else if (field.isExport || field.flagAsync) {
|
|
1207
1207
|
if (field.flagAsync) {
|
|
1208
1208
|
field.doAction(submitData, (res) => {
|
|
1209
|
-
if
|
|
1209
|
+
if(res.rtnCode && res.rtnCode===202 && res.rtnMsg){
|
|
1210
|
+
self.$common.confirm(res.rtnMsg, '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
1211
|
+
submitData.flagHaveAlert=1;
|
|
1212
|
+
field.doAction(submitData, (res) => {
|
|
1213
|
+
if (res.content && res.content.action) {
|
|
1214
|
+
var dialogOption = {
|
|
1215
|
+
title: field.pageTitle || field.label,
|
|
1216
|
+
content: [{
|
|
1217
|
+
component: 'ct-progress',
|
|
1218
|
+
attrs: {
|
|
1219
|
+
progressAction: res.content.action,
|
|
1220
|
+
progressKey: res.content.key,
|
|
1221
|
+
progressType: field.isExport ? 'export' : 'import',
|
|
1222
|
+
width: '350px',
|
|
1223
|
+
height: '165px'
|
|
1224
|
+
},
|
|
1225
|
+
on: {
|
|
1226
|
+
finished(data) {
|
|
1227
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
1228
|
+
if (data.rtnMsg) {
|
|
1229
|
+
self.$message({
|
|
1230
|
+
message: data.rtnMsg,
|
|
1231
|
+
type: 'success',
|
|
1232
|
+
showClose:true,
|
|
1233
|
+
});
|
|
1234
|
+
}
|
|
1235
|
+
if(!field.isExport){
|
|
1236
|
+
self.getPage(1);
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
error(data) {
|
|
1240
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
1241
|
+
self.$message({
|
|
1242
|
+
message: data.rtnMsg,
|
|
1243
|
+
type: 'warning',
|
|
1244
|
+
showClose:true,
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
}]
|
|
1249
|
+
};
|
|
1250
|
+
self.$common.openDialog(dialogOption);
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
})
|
|
1254
|
+
.catch(() => { });
|
|
1255
|
+
}
|
|
1256
|
+
else if (res.content && res.content.action) {
|
|
1210
1257
|
var dialogOption = {
|
|
1211
1258
|
title: field.pageTitle || field.label,
|
|
1212
1259
|
content: [{
|
|
@@ -1262,23 +1309,50 @@ export default {
|
|
|
1262
1309
|
}
|
|
1263
1310
|
}
|
|
1264
1311
|
else {
|
|
1265
|
-
field.
|
|
1266
|
-
if
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
if (data.content.indexOf("
|
|
1273
|
-
|
|
1312
|
+
field.doBlobAction(submitData, (data,headers) => {
|
|
1313
|
+
if(data.type=="application/json"){
|
|
1314
|
+
const reader = new FileReader();
|
|
1315
|
+
reader.readAsText(data, 'utf-8');
|
|
1316
|
+
reader.onload=function(){
|
|
1317
|
+
data = JSON.parse(reader.result);
|
|
1318
|
+
if (data.content) {
|
|
1319
|
+
if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
|
|
1320
|
+
if(data.content.indexOf(".zip") > -1){
|
|
1321
|
+
window.location.href = encodeURI(data.action);
|
|
1322
|
+
}
|
|
1323
|
+
else{
|
|
1324
|
+
if (data.content.indexOf("?") > -1) {
|
|
1325
|
+
self.downloadUrl = data.content + "&" + Math.random();
|
|
1326
|
+
}
|
|
1327
|
+
else {
|
|
1328
|
+
self.downloadUrl = data.content + "?" + Math.random();
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1274
1331
|
}
|
|
1275
1332
|
else {
|
|
1276
|
-
self.downloadUrl = data.content + "?" + Math.random();
|
|
1277
1333
|
}
|
|
1278
1334
|
}
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
else{
|
|
1338
|
+
if(!headers['content-disposition']){
|
|
1339
|
+
self.$message({
|
|
1340
|
+
message: '返回结果headers必须包含Access-Control-Expose-Headers和Content-Disposition!',
|
|
1341
|
+
type: 'error',
|
|
1342
|
+
showClose:true,
|
|
1343
|
+
});
|
|
1344
|
+
return false;
|
|
1279
1345
|
}
|
|
1280
|
-
|
|
1281
|
-
}
|
|
1346
|
+
|
|
1347
|
+
let blob = new Blob([data],{type:"application/octet-stream;"})
|
|
1348
|
+
const url = window.URL.createObjectURL(blob);
|
|
1349
|
+
const link = document.createElement('a');
|
|
1350
|
+
let fileName=decodeURIComponent(escape(headers['content-disposition'].split('filename=')[1]));
|
|
1351
|
+
link.href = url;
|
|
1352
|
+
link.setAttribute('download',fileName);
|
|
1353
|
+
document.body.appendChild(link);
|
|
1354
|
+
link.click();
|
|
1355
|
+
document.body.removeChild(link);
|
|
1282
1356
|
}
|
|
1283
1357
|
});
|
|
1284
1358
|
}
|