centaline-data-driven 1.5.97 → 1.5.99
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 +23 -0
- package/src/Form.vue +2 -2
- package/src/SearchList.vue +3 -1
- package/src/apptest.vue +111 -0
- package/src/centaline/dialogList/src/dialog.vue +1 -1
- package/src/centaline/dynamicAppContainer/src/dynamicAppContainer.vue +62 -7
- package/src/centaline/dynamicAppContainer/src/dynamicAppContainerLayout.vue +44 -29
- package/src/centaline/dynamicCalendar/src/dynamicCalendar.vue +50 -74
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +1 -2
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +6 -2
- package/src/centaline/loader/src/ctl/AppContainer.js +1 -3
- package/src/centaline/loader/src/ctl/FormList.js +17 -0
- package/src/centaline/templateControls/src/dynamicTableCurrency.vue +3 -2
- package/src/main.js +8 -8
- package/src/router/index.js +6 -0
- package/wwwroot/static/centaline/centaline-data-driven.js +133 -87
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
package/release-log.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
# v1.5.99
|
|
2
|
+
2024-02-29
|
|
3
|
+
|
|
4
|
+
优化
|
|
5
|
+
|
|
6
|
+
列表单元格点击时,支持把当前列的columnName传递到api
|
|
7
|
+
|
|
8
|
+
列表弹层高度计算优化
|
|
9
|
+
|
|
10
|
+
# v1.5.98
|
|
11
|
+
2024-01-31
|
|
12
|
+
|
|
13
|
+
优化
|
|
14
|
+
|
|
15
|
+
容器布局组件 appContainer 布局优化
|
|
16
|
+
|
|
17
|
+
# v1.5.98
|
|
18
|
+
2024-01-31
|
|
19
|
+
|
|
20
|
+
优化
|
|
21
|
+
|
|
22
|
+
表单列表操作显示逻辑优化
|
|
23
|
+
|
|
1
24
|
# v1.5.97
|
|
2
25
|
2024-01-29
|
|
3
26
|
新增
|
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="'/
|
|
4
|
+
<ct-form :api="'/third-dept-tran/second-hand-transaction/electronic-contract'" :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
|
+
"originalTraId":"1752262617589448705"
|
|
16
16
|
},
|
|
17
17
|
topHeight:10,
|
|
18
18
|
}
|
package/src/SearchList.vue
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/TaskList/getLayoutOfSearch'" :searchStatsApi="'/TaskList/getListStats'" :searchDataApi="'/TaskList/getListOfSearchModel'"></ct-searchlist> -->
|
|
98
98
|
|
|
99
|
-
<ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/PropertyVRRealLookBalanceList/getLayoutOfSearchForOFI'" :searchDataApi="'/PropertyVRRealLookBalanceList/getListOfSearchModel'"></ct-searchlist>
|
|
99
|
+
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/PropertyVRRealLookBalanceList/getLayoutOfSearchForOFI'" :searchDataApi="'/PropertyVRRealLookBalanceList/getListOfSearchModel'"></ct-searchlist> -->
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
@@ -116,6 +116,8 @@
|
|
|
116
116
|
|
|
117
117
|
<!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/AttendanceBalanceAlertList/getLayoutOfSearch'" :searchDataApi="'/AttendanceBalanceAlertList/getListOfSearchModel'"></ct-searchlist> -->
|
|
118
118
|
|
|
119
|
+
<ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/ReportWorkQuantifyList/getLayoutOfSearch'" :searchDataApi="'/ReportWorkQuantifyList/getListOfSearchModel'"></ct-searchlist>
|
|
120
|
+
|
|
119
121
|
|
|
120
122
|
<ct-dialog-list></ct-dialog-list>
|
|
121
123
|
</div>
|
package/src/apptest.vue
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
|
+
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
4
|
+
<ct-appContainer :api="api" :apiParam="apiParam" :topHeight="topHeight"></ct-appContainer>
|
|
5
|
+
<ct-dialog-list></ct-dialog-list>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'apptest',
|
|
12
|
+
data() {
|
|
13
|
+
return {
|
|
14
|
+
// api: "",
|
|
15
|
+
api: "AppContainer/EmployeeClassAssign",
|
|
16
|
+
apiParam: {
|
|
17
|
+
},
|
|
18
|
+
topHeight: undefined,
|
|
19
|
+
source: {
|
|
20
|
+
|
|
21
|
+
"apps": [
|
|
22
|
+
{
|
|
23
|
+
"appID": "employeeList",
|
|
24
|
+
"appName": "员工列表",
|
|
25
|
+
"appType": "Search",
|
|
26
|
+
"appRootUrl": "",
|
|
27
|
+
"formAction": "",
|
|
28
|
+
"actionType": 2,
|
|
29
|
+
"searchCategoryAction": "",
|
|
30
|
+
"searchAppMenuAction": "",
|
|
31
|
+
"searchConditionAction": "/EmployeeClassList/getEmployeeLayoutOfSearch",
|
|
32
|
+
"searchStatsAction": "",
|
|
33
|
+
"searchDataAction": "/EmployeeClassList/getEmployeeListOfSearchModel",
|
|
34
|
+
"relationAppID": ""
|
|
35
|
+
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"appID": "employeeClassList",
|
|
39
|
+
"appName": "员工班次",
|
|
40
|
+
"appType": "Search",
|
|
41
|
+
"appRootUrl": "",
|
|
42
|
+
"formAction": "",
|
|
43
|
+
"actionType": 2,
|
|
44
|
+
"searchCategoryAction": "",
|
|
45
|
+
"searchAppMenuAction": "",
|
|
46
|
+
"searchConditionAction": "/EmployeeClassList/getLayoutOfSearch",
|
|
47
|
+
"searchStatsAction": "",
|
|
48
|
+
"searchDataAction": "/EmployeeClassList/getListOfSearchModel",
|
|
49
|
+
"relationAppID": "employeeList"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"appID": "employeeClassCalenderList",
|
|
53
|
+
"appName": "员工班次",
|
|
54
|
+
"appType": "Search",
|
|
55
|
+
"appRootUrl": "",
|
|
56
|
+
"formAction": "",
|
|
57
|
+
"actionType": 2,
|
|
58
|
+
"searchCategoryAction": "",
|
|
59
|
+
"searchAppMenuAction": "",
|
|
60
|
+
"searchConditionAction": "/EmployeeClassCalenderList/getLayoutOfSearch",
|
|
61
|
+
"searchStatsAction": "",
|
|
62
|
+
"searchDataAction": "/EmployeeClassCalenderList/getListOfSearchModel",
|
|
63
|
+
"relationAppID": "employeeList"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"layout": {
|
|
67
|
+
"containerLayoutType": "Container",
|
|
68
|
+
"appID": "",
|
|
69
|
+
"layouts": [
|
|
70
|
+
{
|
|
71
|
+
"containerLayoutType": "Header",
|
|
72
|
+
"appID": "employeeList",
|
|
73
|
+
"height": "500px",
|
|
74
|
+
"layouts": []
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"containerLayoutType": "Container",
|
|
78
|
+
"appID": "",
|
|
79
|
+
"layouts": [
|
|
80
|
+
{
|
|
81
|
+
"containerLayoutType": "Aside",
|
|
82
|
+
"appID": "employeeClassList",
|
|
83
|
+
"layouts": [],
|
|
84
|
+
"width": "50%",
|
|
85
|
+
"height": "400px",
|
|
86
|
+
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"containerLayoutType": "Main",
|
|
90
|
+
"appID": "employeeClassCalenderList",
|
|
91
|
+
"width": "50%",
|
|
92
|
+
"height": "400px",
|
|
93
|
+
"layouts": []
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
activated() {
|
|
104
|
+
},
|
|
105
|
+
methods: {
|
|
106
|
+
test111(val) {
|
|
107
|
+
|
|
108
|
+
},
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</script>
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
else if(self.vmodel.pane && self.vmodel.pane.$el){
|
|
172
|
-
if(self.vmodel.pane.$el.clientHeight<ph) {
|
|
172
|
+
if(self.vmodel.pane.$el.clientHeight<ph+44) {
|
|
173
173
|
item.attrs.height=(self.vmodel.pane.$el.clientHeight-60)+'px';
|
|
174
174
|
}
|
|
175
175
|
if(item.component=='ct-form'){
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="common-layout"
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div class="common-layout" v-loading="loading" ref="refappContainer" style="display: flex; /* 创建flex容器 */
|
|
3
|
+
justify-content: center;" :style="{ height: appContainerHeight }">
|
|
4
|
+
<!-- {{appContainerWidth}}<br> -->
|
|
5
|
+
<appContainerLayout :apps="model.apps" :layouts="model.layouts" v-if="model !== null && !loading&&flagShow" :firstLoad="true"
|
|
6
|
+
:appContainerTop="appContainerTop+''" :appContainerLeft="appContainerLeft+''" :appContainerHeight="appContainerHeight+''"
|
|
7
|
+
:appContainerWidth="appContainerWidth+''" :orientation="'1'" style="width: 100%;">
|
|
8
|
+
</appContainerLayout>
|
|
5
9
|
</div>
|
|
6
10
|
</template>
|
|
7
11
|
|
|
@@ -23,7 +27,13 @@ export default {
|
|
|
23
27
|
},
|
|
24
28
|
data() {
|
|
25
29
|
return {
|
|
26
|
-
loading: true
|
|
30
|
+
loading: true,
|
|
31
|
+
appContainerTop: 0,
|
|
32
|
+
appContainerLeft: 0,
|
|
33
|
+
appContainerHeight: 0,
|
|
34
|
+
appContainerWidth: 0,
|
|
35
|
+
flagShow: true,
|
|
36
|
+
data: null
|
|
27
37
|
}
|
|
28
38
|
},
|
|
29
39
|
methods: {
|
|
@@ -31,26 +41,60 @@ export default {
|
|
|
31
41
|
var self = this;
|
|
32
42
|
//初始化
|
|
33
43
|
this.loading = true;
|
|
34
|
-
this.$nextTick(function () {
|
|
35
|
-
|
|
44
|
+
this.$nextTick(function () {
|
|
45
|
+
if (typeof self.source !== 'undefined') {
|
|
36
46
|
self.load(self.loaderObj.AppContainer(self.source));
|
|
37
47
|
}
|
|
38
|
-
|
|
48
|
+
else if (typeof self.api !== 'undefined') {
|
|
39
49
|
self.loaderObj.AppContainer(self.api, this.apiParam, self.load);
|
|
40
50
|
}
|
|
51
|
+
|
|
41
52
|
else if (self.vmodel) {
|
|
42
53
|
self.load(self.vmodel);
|
|
43
54
|
}
|
|
44
55
|
});
|
|
45
56
|
},
|
|
46
57
|
load(data) {
|
|
58
|
+
console.log('data',data);
|
|
59
|
+
this.data = data;
|
|
47
60
|
this.model = data;
|
|
48
61
|
this.model.self = this;
|
|
49
62
|
this.loading = false;
|
|
50
63
|
},
|
|
64
|
+
setresize() {
|
|
65
|
+
let highparentNode = this.getparentNode(this.$refs.refappContainer);
|
|
66
|
+
this.appContainerHeight = (highparentNode.offsetHeight||document.body.offsetHeight)-5
|
|
67
|
+
this.appContainerWidth = (highparentNode.offsetWidth||document.body.offsetWidth)-5
|
|
68
|
+
this.appContainerTop = document.body.offsetHeight - this.appContainerHeight;
|
|
69
|
+
this.appContainerLeft = document.body.offsetWidth - this.appContainerWidth;
|
|
70
|
+
},
|
|
71
|
+
// 获取当前元素的指定父级
|
|
72
|
+
getparentNode(el) {
|
|
73
|
+
if (!el.parentNode) {
|
|
74
|
+
return el;
|
|
75
|
+
}
|
|
76
|
+
let parentElement = el.parentNode; // 初始化为当前元素的父级
|
|
77
|
+
while (parentElement && typeof parentElement !== 'undefined' && parentElement.offsetHeight <= 0) {
|
|
78
|
+
parentElement = parentElement.parentNode; // 更新父级元素
|
|
79
|
+
}
|
|
80
|
+
return parentElement;
|
|
81
|
+
|
|
82
|
+
},
|
|
51
83
|
},
|
|
52
84
|
mounted() {
|
|
85
|
+
let self = this;
|
|
86
|
+
window.addEventListener('resize', function () {
|
|
87
|
+
// self.flagShow = false;
|
|
88
|
+
self.$nextTick(() => {
|
|
89
|
+
self.model = self.data;
|
|
90
|
+
self.setresize();
|
|
91
|
+
// self.flagShow = true;
|
|
92
|
+
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
self.setresize();
|
|
53
96
|
this.init();
|
|
97
|
+
|
|
54
98
|
},
|
|
55
99
|
}
|
|
56
100
|
</script>
|
|
@@ -59,9 +103,20 @@ body {
|
|
|
59
103
|
height: 100%;
|
|
60
104
|
overflow: hidden;
|
|
61
105
|
background: #ddd;
|
|
106
|
+
margin: 0;
|
|
107
|
+
padding: 0;
|
|
108
|
+
height: 100%; /* 确保html和body占据全屏 */
|
|
62
109
|
}
|
|
63
110
|
|
|
64
111
|
html {
|
|
65
112
|
height: 100%;
|
|
113
|
+
margin: 0;
|
|
114
|
+
padding: 0;
|
|
115
|
+
height: 100%; /* 确保html和body占据全屏 */
|
|
116
|
+
}
|
|
117
|
+
.common-layout{
|
|
118
|
+
display: flex;
|
|
119
|
+
height: 100%;
|
|
120
|
+
width: 100%;
|
|
66
121
|
}
|
|
67
122
|
</style>
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div :class="orientation == 2? 'isRow' : 'isColumn'">
|
|
3
|
+
<div v-for="(item, index) in layouts" :style="{ height: item.height , width: item.width ,
|
|
4
|
+
'padding-bottom': '5px','flex-grow':item.weight=='1'?'1':''}">
|
|
5
|
+
<!-- 容器 -->
|
|
6
|
+
<div v-if="item.appID"
|
|
7
|
+
:height="item.height " style="height:100%;">
|
|
8
8
|
<template v-for="(app) in getAppParm(item.appID)">
|
|
9
9
|
<template v-if="app.relationAppID == '' || (app.relationAppID != '' &&
|
|
10
10
|
JSON.stringify(apiParam) != '{}')">
|
|
11
|
+
<!-- 组件 -->
|
|
11
12
|
<component :is="'ct-'+app.appType" :searchConditionApi="app.searchConditionAction"
|
|
12
|
-
:appID="app.appID" :ref="'ref' + app.appID" :key="index"
|
|
13
|
+
:appID="app.appID" :ref="'ref' + app.appID" :key="index" :pageHeight="item.height "
|
|
13
14
|
:searchDataApi="app.searchDataAction" @rowClickHandle="rowClickHandle" :apiParam="apiParam"
|
|
14
15
|
:style="{ 'padding-left': index > 0 ? '10px' : '' }" :from="'hasTop'">
|
|
15
16
|
</component>
|
|
16
|
-
<!-- <ct-searchlist :searchConditionApi="app.searchConditionAction" :appID="item.appID"
|
|
17
|
-
:ref="'ref' + item.appID" :key="index" :searchDataApi="app.searchDataAction"
|
|
18
|
-
@rowClickHandle="rowClickHandle" :apiParam="apiParam"></ct-searchlist> -->
|
|
19
17
|
</template>
|
|
20
18
|
</template>
|
|
21
|
-
</
|
|
19
|
+
</div>
|
|
22
20
|
|
|
23
21
|
<dynamicAppContainerLayout v-if="item.layouts && item.layouts.length > 0" :layouts="item.layouts"
|
|
24
|
-
:apps="apps" :apiParam="screenPara" :parentAppID="appID" :firstLoad="false"
|
|
25
|
-
|
|
22
|
+
:apps="apps" :apiParam="screenPara" :parentAppID="appID" :firstLoad="false"
|
|
23
|
+
:appContainerTop="appContainerTop + ''" :appContainerLeft="appContainerLeft + ''"
|
|
24
|
+
:appContainerHeight="item.height + ''" :appContainerWidth="item.width + ''"
|
|
25
|
+
:orientation="item.orientation+''"/>
|
|
26
|
+
|
|
26
27
|
|
|
27
|
-
</
|
|
28
|
+
</div>
|
|
28
29
|
|
|
29
30
|
</div>
|
|
30
31
|
</template>
|
|
@@ -54,29 +55,30 @@ export default {
|
|
|
54
55
|
parentAppID: {
|
|
55
56
|
type: String,
|
|
56
57
|
default: "",
|
|
58
|
+
},
|
|
59
|
+
orientation: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "",
|
|
57
62
|
},
|
|
58
63
|
firstLoad: {
|
|
59
64
|
type: Boolean,
|
|
60
65
|
default: true,
|
|
61
66
|
},
|
|
67
|
+
appContainerTop: String,
|
|
68
|
+
appContainerLeft: String,
|
|
69
|
+
appContainerHeight: String,
|
|
70
|
+
appContainerWidth: String,
|
|
62
71
|
},
|
|
63
72
|
data() {
|
|
64
73
|
return {
|
|
65
74
|
screenPara: {},
|
|
66
75
|
appID: "",
|
|
67
|
-
appIDs: {}
|
|
76
|
+
appIDs: {},
|
|
77
|
+
|
|
68
78
|
}
|
|
69
79
|
},
|
|
70
|
-
computed: {
|
|
71
|
-
isFlex() {
|
|
72
|
-
return this.layouts.some(n => {
|
|
73
|
-
return n.containerLayoutType == "Aside"
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
},
|
|
79
80
|
created() {
|
|
81
|
+
this.load();
|
|
80
82
|
},
|
|
81
83
|
mounted() {
|
|
82
84
|
},
|
|
@@ -92,6 +94,11 @@ export default {
|
|
|
92
94
|
this.appID = appID;
|
|
93
95
|
this.screenPara = data;
|
|
94
96
|
},
|
|
97
|
+
load() {
|
|
98
|
+
let self = this;
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
}
|
|
95
102
|
},
|
|
96
103
|
watch: {
|
|
97
104
|
//监听父级传过来的的数据
|
|
@@ -119,18 +126,26 @@ export default {
|
|
|
119
126
|
|
|
120
127
|
})
|
|
121
128
|
},
|
|
129
|
+
appContainerWidth: function (newVal, oldVal) {
|
|
130
|
+
this.load()
|
|
131
|
+
}
|
|
122
132
|
},
|
|
123
133
|
}
|
|
124
134
|
</script>
|
|
125
135
|
<style scoped>
|
|
126
|
-
.isFlex {
|
|
127
|
-
display: flex;
|
|
128
|
-
flex-direction: row;
|
|
129
|
-
flex-wrap: wrap;
|
|
130
|
-
}
|
|
131
136
|
|
|
132
137
|
.el-header,
|
|
133
138
|
.el-main {
|
|
134
139
|
padding: 0px;
|
|
135
140
|
}
|
|
141
|
+
.isRow{
|
|
142
|
+
display: flex;
|
|
143
|
+
flex: 1;
|
|
144
|
+
height: 100%;
|
|
145
|
+
}
|
|
146
|
+
.isColumn {
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-direction: column;
|
|
149
|
+
}
|
|
150
|
+
|
|
136
151
|
</style>
|
|
@@ -1,79 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="canlendarBox">
|
|
3
|
-
<
|
|
4
|
-
ref="screen"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@loaded="screenLoaded"
|
|
8
|
-
:screenPara="apiParam"
|
|
9
|
-
@resetSearch="resetSearch()"
|
|
10
|
-
@search="search()"
|
|
11
|
-
style="margin-bottom: 10px"
|
|
12
|
-
></ct-searchScreen>
|
|
3
|
+
<DIV v-if="flagShow">
|
|
4
|
+
<ct-searchScreen ref="screen" :api="searchConditionApi" :key="reloadKeyScreen" @loaded="screenLoaded"
|
|
5
|
+
:screenPara="apiParam" @resetSearch="resetSearch()" @search="search()"
|
|
6
|
+
style="margin-bottom: 10px"></ct-searchScreen>
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
value.isCurrentMonth ? '' : 'item-disabled',
|
|
37
|
-
value.isSelected && !value.isToday ? 'canlendar_selected' : '',
|
|
38
|
-
value.isToday ? 'canlendar_today' : '',
|
|
39
|
-
'item canlendar_item flex flex-column flex-center',
|
|
40
|
-
]"
|
|
41
|
-
>
|
|
42
|
-
<section
|
|
43
|
-
v-for="(item, index) in getDayData(value.day)"
|
|
44
|
-
:key="index"
|
|
45
|
-
v-if="value.isCurrentMonth&&model.columns"
|
|
46
|
-
>
|
|
47
|
-
<div v-for="(col, index) in model.columns" :key="index">
|
|
48
|
-
<div v-if="col.fieldName != 'operation'">
|
|
49
|
-
<span v-if="col.fieldName == 'date'" class="date-text">
|
|
50
|
-
{{ extractedDate(item[col.fieldName]) }}
|
|
51
|
-
</span>
|
|
52
|
-
<span v-else v-html="item[col.fieldName]"> </span>
|
|
8
|
+
<div class="canlendar" id="canlendar" :style="getCalerndarStyle" :class="[theme ? theme : '']" v-loading="loading">
|
|
9
|
+
<div class="canlendar_content flex flex-wrap" id="fieldNameBox">
|
|
10
|
+
<div class="header-item flex flex-column flex-center" v-for="item in weekArr" :key="item"
|
|
11
|
+
@contextmenu.prevent.stop="closeRightClick">
|
|
12
|
+
<div>{{ item }}</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div id="fieldName" v-for="(value, index) in dayArr" @contextmenu.prevent.stop="openRightClick($event, value)"
|
|
15
|
+
:key="index" :class="[
|
|
16
|
+
value.isCurrentMonth ? '' : 'item-disabled',
|
|
17
|
+
value.isSelected && !value.isToday ? 'canlendar_selected' : '',
|
|
18
|
+
value.isToday ? 'canlendar_today' : '',
|
|
19
|
+
'item canlendar_item flex flex-column flex-center',
|
|
20
|
+
]">
|
|
21
|
+
<section v-for="(item, index) in getDayData(value.day)" :key="index"
|
|
22
|
+
v-if="value.isCurrentMonth && model.columns">
|
|
23
|
+
<div v-for="(col, index) in model.columns" :key="index">
|
|
24
|
+
<div v-if="col.fieldName != 'operation'">
|
|
25
|
+
<span v-if="col.fieldName == 'date'" class="date-text">
|
|
26
|
+
{{ extractedDate(item[col.fieldName]) }}
|
|
27
|
+
</span>
|
|
28
|
+
<span v-else v-html="item[col.fieldName]"> </span>
|
|
29
|
+
</div>
|
|
53
30
|
</div>
|
|
54
|
-
</
|
|
55
|
-
</
|
|
31
|
+
</section>
|
|
32
|
+
</div>
|
|
56
33
|
</div>
|
|
57
34
|
</div>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
>
|
|
65
|
-
<div
|
|
66
|
-
class="opertion"
|
|
67
|
-
v-for="(item, index) in actionRouter"
|
|
68
|
-
:key="index"
|
|
69
|
-
@click="routerClickHandler(item)"
|
|
70
|
-
>
|
|
71
|
-
<div v-if="currentData[item.rightField] == 1">
|
|
72
|
-
<div class="memuItem">{{ item.label }}</div>
|
|
35
|
+
<div class="box-menu" id="boxMenu" v-show="menuVisible && actionRouter"
|
|
36
|
+
:style="{ left: menu_left + 'px', top: menu_top + 'px' }">
|
|
37
|
+
<div class="opertion" v-for="(item, index) in actionRouter" :key="index" @click="routerClickHandler(item)">
|
|
38
|
+
<div v-if="currentData[item.rightField] == 1">
|
|
39
|
+
<div class="memuItem">{{ item.label }}</div>
|
|
40
|
+
</div>
|
|
73
41
|
</div>
|
|
74
42
|
</div>
|
|
75
43
|
</div>
|
|
76
|
-
</
|
|
44
|
+
</DIV>
|
|
77
45
|
</template>
|
|
78
46
|
|
|
79
47
|
<script>
|
|
@@ -111,7 +79,7 @@ export default {
|
|
|
111
79
|
searchDataApi: String,
|
|
112
80
|
apiParam: {
|
|
113
81
|
type: Object,
|
|
114
|
-
default: () => {},
|
|
82
|
+
default: () => { },
|
|
115
83
|
},
|
|
116
84
|
},
|
|
117
85
|
computed: {
|
|
@@ -122,7 +90,7 @@ export default {
|
|
|
122
90
|
};
|
|
123
91
|
},
|
|
124
92
|
},
|
|
125
|
-
created() {},
|
|
93
|
+
created() { },
|
|
126
94
|
data() {
|
|
127
95
|
let year = moment().year();
|
|
128
96
|
let month = moment().month() + 1;
|
|
@@ -152,9 +120,10 @@ export default {
|
|
|
152
120
|
menu_top: 0,
|
|
153
121
|
menu_left: 0,
|
|
154
122
|
actionRouter: [],
|
|
123
|
+
flagShow:true
|
|
155
124
|
};
|
|
156
125
|
},
|
|
157
|
-
mounted() {},
|
|
126
|
+
mounted() { },
|
|
158
127
|
methods: {
|
|
159
128
|
extractedDate(date) {
|
|
160
129
|
// 使用 split 方法按照 "-" 分割字符串,然后返回最后一个元素
|
|
@@ -279,7 +248,7 @@ export default {
|
|
|
279
248
|
}
|
|
280
249
|
// 监听事件鼠标点击事件,若点击则隐藏菜单
|
|
281
250
|
document.addEventListener("click", this.foo);
|
|
282
|
-
}else{
|
|
251
|
+
} else {
|
|
283
252
|
this.menuVisible = false;
|
|
284
253
|
}
|
|
285
254
|
},
|
|
@@ -346,7 +315,7 @@ export default {
|
|
|
346
315
|
.then(() => {
|
|
347
316
|
clickAcion();
|
|
348
317
|
})
|
|
349
|
-
.catch(() => {});
|
|
318
|
+
.catch(() => { });
|
|
350
319
|
} else {
|
|
351
320
|
clickAcion();
|
|
352
321
|
}
|
|
@@ -362,10 +331,10 @@ export default {
|
|
|
362
331
|
|
|
363
332
|
self.openDialog(action, actionRouterData, function (newData) {
|
|
364
333
|
// 在页面增加删除修改
|
|
365
|
-
self.model.doAction(action, newData,self.searchDataApi);
|
|
334
|
+
self.model.doAction(action, newData, self.searchDataApi);
|
|
366
335
|
});
|
|
367
336
|
},
|
|
368
|
-
|
|
337
|
+
|
|
369
338
|
change() {
|
|
370
339
|
let fullDate = moment(
|
|
371
340
|
this.year + "-" + this.month + "-" + this.day,
|
|
@@ -458,6 +427,13 @@ export default {
|
|
|
458
427
|
}
|
|
459
428
|
this.change();
|
|
460
429
|
},
|
|
430
|
+
reload() {
|
|
431
|
+
let self = this;
|
|
432
|
+
this.flagShow = false;
|
|
433
|
+
self.$nextTick(() => {
|
|
434
|
+
this.flagShow = true;
|
|
435
|
+
})
|
|
436
|
+
},
|
|
461
437
|
},
|
|
462
438
|
};
|
|
463
439
|
</script>
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
</span>
|
|
36
36
|
<!--可点击的列-->
|
|
37
37
|
<span v-else-if="v.router" :class="'cell'" style="display: flex;">
|
|
38
|
-
<span>{{scope.row.isSet}}</span>
|
|
39
38
|
<ct-tablecurrency :router="v.router" :colValue="scope.row[v.id].code1" :rowData="scope.row" @click="rolRouterClickHandler">
|
|
40
39
|
</ct-tablecurrency>
|
|
41
40
|
</span>
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
</el-table-column>
|
|
45
44
|
|
|
46
45
|
<!--操作列-->
|
|
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">
|
|
46
|
+
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || (model.buttons.length > 0 && model.buttonsShow.length > 0)" :fixed="fixedButtons" :width="'100%'" :render-header="renderHeader" :min-width="tableColumnWith">
|
|
48
47
|
<template slot-scope="scope">
|
|
49
48
|
<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
49
|
{{scope.row.isSet?'保存':"修改"}}
|