centaline-data-driven-v3 0.0.47 → 0.0.49
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/dist/centaline-data-driven-v3.umd.js +44 -44
- package/package.json +1 -1
- package/src/components/app/Form.vue +3 -4
- package/src/components/app/PhotoSelectList.vue +1 -3
- package/src/components/web/PhotoSelectList.vue +1 -3
- package/src/components/web/TreeList.vue +84 -7
- package/src/loader/src/CheckBoxList.js +8 -0
- package/src/loader/src/SearchTable.js +6 -1
- package/src/main.js +2 -2
package/package.json
CHANGED
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
<template v-if="model.isHorizontalLayout">
|
|
30
30
|
<van-tabs v-model:active="activeName" title-active-color="#EE6B6B" title-inactive-color="#000000"
|
|
31
31
|
background="#FFFFFF" color="#EE6B6B" shrink>
|
|
32
|
-
<template v-for="(
|
|
33
|
-
<van-tab :title="
|
|
32
|
+
<template v-for="(item, index) in model.collapse" :key="index">
|
|
33
|
+
<van-tab :title="item.controlLabel" :name="index.toString()" v-if="item.show !== false">
|
|
34
34
|
<van-cell-group inset :border="false"
|
|
35
35
|
v-for="(field, collapseIndex) in model.collapseFields[index + 1]"
|
|
36
36
|
:key="collapseIndex">
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<!--分组-->
|
|
50
50
|
<template v-else>
|
|
51
51
|
<van-cell-group v-for="(item, index) in model.collapse" :key="index">
|
|
52
|
-
<template v-for="(field, collapseIndex) in model.collapseFields[index + 1]"
|
|
52
|
+
<template v-if="item.show !== false" v-for="(field, collapseIndex) in model.collapseFields[index + 1]"
|
|
53
53
|
:key="collapseIndex">
|
|
54
54
|
<component ref="Fields" :is="field.is" v-if="field.show !== false" :vmodel="field"
|
|
55
55
|
:parameterAction="model.parameterAction" v-bind="field.bindPara"
|
|
@@ -210,7 +210,6 @@ function load(data) {
|
|
|
210
210
|
nextTick(function () {
|
|
211
211
|
setFormHeight()
|
|
212
212
|
})
|
|
213
|
-
|
|
214
213
|
//通知父组件加载完成
|
|
215
214
|
emit('loaded', model.value);
|
|
216
215
|
}
|
|
@@ -203,9 +203,7 @@ function allchoose() {
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
function handleClick() {
|
|
206
|
-
|
|
207
|
-
emit('handlePhoto', chooseList.value);
|
|
208
|
-
}
|
|
206
|
+
emit('handlePhoto', chooseList.value);
|
|
209
207
|
}
|
|
210
208
|
function rolRouterCellClickHandler(routerKey, rowindex, sourceIndex) {
|
|
211
209
|
if (routerKey == 'photoPreview') {
|
|
@@ -209,9 +209,7 @@ function allchoose() {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
function handleClick() {
|
|
212
|
-
|
|
213
|
-
emit('handlePhoto', chooseList.value);
|
|
214
|
-
}
|
|
212
|
+
emit('handlePhoto', chooseList.value);
|
|
215
213
|
}
|
|
216
214
|
function rolRouterCellClickHandler(routerKey, rowindex, sourceIndex) {
|
|
217
215
|
if (routerKey == 'photoPreview') {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="ct-TreeList" style=" height: 100%;" ref="refleft">
|
|
3
3
|
<el-container style="height: 100%;">
|
|
4
|
-
<el-aside :width="
|
|
4
|
+
<el-aside :width="asideWidth ? asideWidth + 'px' : '15%'"
|
|
5
5
|
style="background-color:white;border-radius: 6px;overflow-y:hidden">
|
|
6
6
|
<div>
|
|
7
|
-
<ct-tree :flagsearch="true" :searchConditionApi="searchConditionApi"
|
|
8
|
-
:searchtreeHeight="searchtreeHeight" @loaded="loaded"></ct-tree>
|
|
7
|
+
<ct-tree :flagsearch="true" :searchConditionApi="searchConditionApi" ref="reftree"
|
|
8
|
+
:searchDataApi="searchDataApi" :searchtreeHeight="searchtreeHeight" @loaded="loaded"></ct-tree>
|
|
9
9
|
</div>
|
|
10
|
+
|
|
11
|
+
<div class="resizer" @mousedown="startResizing"></div>
|
|
10
12
|
</el-aside>
|
|
11
13
|
<el-main v-if="isShowMain">
|
|
12
14
|
|
|
@@ -19,9 +21,9 @@
|
|
|
19
21
|
</div>
|
|
20
22
|
</template>
|
|
21
23
|
<template v-else>
|
|
22
|
-
<div :style="{'height':searchtreeHeight+'px'}">
|
|
24
|
+
<div :style="{ 'height': searchtreeHeight + 'px' }">
|
|
23
25
|
<ct-searchlist :searchConditionApi="searchTableConditionApi" :searchDataApi="searchTableDataApi"
|
|
24
|
-
:api-param="apiParam"></ct-searchlist>
|
|
26
|
+
:api-param="apiParam" @refreshParent="refreshParentHandler"></ct-searchlist>
|
|
25
27
|
</div>
|
|
26
28
|
</template>
|
|
27
29
|
|
|
@@ -30,8 +32,9 @@
|
|
|
30
32
|
</div>
|
|
31
33
|
</template>
|
|
32
34
|
<script lang="ts" setup>
|
|
33
|
-
import { ref, nextTick, watch, onActivated, onMounted } from 'vue'
|
|
35
|
+
import { ref, nextTick, watch, onActivated, onMounted, onUnmounted } from 'vue'
|
|
34
36
|
import common from '../../utils/common'
|
|
37
|
+
import Enum from '../../utils/Enum'
|
|
35
38
|
const emit = defineEmits(['loaded'])
|
|
36
39
|
|
|
37
40
|
|
|
@@ -59,11 +62,26 @@ const pageType = ref('list')
|
|
|
59
62
|
const apiParam = ref()
|
|
60
63
|
const searchtreeHeight = ref(0)
|
|
61
64
|
const refleft = ref()
|
|
65
|
+
const reftree = ref()
|
|
66
|
+
|
|
67
|
+
const asideWidth = ref(Number(props.leftWidth ? props.leftWidth : 200));
|
|
68
|
+
|
|
69
|
+
let isResizing = false;
|
|
70
|
+
let startX = 0;
|
|
71
|
+
let startWidth = 0;
|
|
72
|
+
const dataRowRouter = ref("");
|
|
62
73
|
function loaded(data) {
|
|
63
74
|
|
|
64
75
|
isShowMain.value = false;
|
|
65
76
|
pageType.value = "list";
|
|
66
77
|
if (data && data.rowRouter && (JSON.stringify(data.rowRouter) != "{}")) {
|
|
78
|
+
dataRowRouter.value = JSON.stringify(data.rowRouter);
|
|
79
|
+
|
|
80
|
+
let localStorageWidth = window.localStorage.getItem(dataRowRouter.value);
|
|
81
|
+
localStorageWidth = localStorageWidth ? localStorageWidth : asideWidth.value + "";
|
|
82
|
+
asideWidth.value = Number(localStorageWidth);
|
|
83
|
+
|
|
84
|
+
|
|
67
85
|
formApi.value = data.rowRouter.getLayout;
|
|
68
86
|
pageType.value = data.rowRouter.pageType != undefined ? data.rowRouter.pageType : "list";
|
|
69
87
|
width.value = parseFloat(data.rowRouter.width != undefined ? data.rowRouter.width : "0");
|
|
@@ -93,6 +111,43 @@ function setsearchtreeHeight() {
|
|
|
93
111
|
searchtreeHeight.value = refleft.value.offsetHeight | 0;
|
|
94
112
|
}
|
|
95
113
|
}
|
|
114
|
+
function refreshParentHandler(Data) {
|
|
115
|
+
//删除树节点
|
|
116
|
+
if (Data.Notification == Enum.ActionType.Delete) {
|
|
117
|
+
reftree.value.remove(Data);
|
|
118
|
+
}
|
|
119
|
+
else if (Data.Notification == Enum.ActionType.Delete) {
|
|
120
|
+
reftree.value.addNode(Data);
|
|
121
|
+
}
|
|
122
|
+
else if (Data.Notification == Enum.ActionType.Delete) {
|
|
123
|
+
reftree.value.updateNode(Data);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const startResizing = (event: MouseEvent) => {
|
|
129
|
+
isResizing = true;
|
|
130
|
+
startX = event.clientX;
|
|
131
|
+
startWidth = asideWidth.value;
|
|
132
|
+
document.addEventListener('mousemove', resizeAside);
|
|
133
|
+
document.addEventListener('mouseup', stopResizing);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const resizeAside = (event: MouseEvent) => {
|
|
137
|
+
if (isResizing) {
|
|
138
|
+
const newWidth = startWidth + (event.clientX - startX);
|
|
139
|
+
asideWidth.value = newWidth > 50 ? newWidth : 50; // 设置最小宽度为 50px
|
|
140
|
+
|
|
141
|
+
window.localStorage.setItem(dataRowRouter.value, asideWidth.value);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const stopResizing = () => {
|
|
146
|
+
isResizing = false;
|
|
147
|
+
document.removeEventListener('mousemove', resizeAside);
|
|
148
|
+
document.removeEventListener('mouseup', stopResizing);
|
|
149
|
+
};
|
|
150
|
+
|
|
96
151
|
onActivated(() => {
|
|
97
152
|
nextTick(() => {
|
|
98
153
|
setsearchtreeHeight();
|
|
@@ -105,6 +160,28 @@ onMounted(() => {
|
|
|
105
160
|
})
|
|
106
161
|
})
|
|
107
162
|
setsearchtreeHeight();
|
|
163
|
+
document.addEventListener('mouseup', stopResizing);
|
|
164
|
+
|
|
108
165
|
})
|
|
109
166
|
|
|
110
|
-
|
|
167
|
+
onUnmounted(() => {
|
|
168
|
+
document.removeEventListener('mouseup', stopResizing);
|
|
169
|
+
});
|
|
170
|
+
</script>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<style scoped>
|
|
174
|
+
.el-aside {
|
|
175
|
+
position: relative;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.resizer {
|
|
179
|
+
position: absolute;
|
|
180
|
+
top: 0;
|
|
181
|
+
right: 0;
|
|
182
|
+
width: 3px;
|
|
183
|
+
height: 100%;
|
|
184
|
+
cursor: ew-resize;
|
|
185
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
186
|
+
}
|
|
187
|
+
</style>
|
|
@@ -28,6 +28,13 @@ const CheckBoxList = function (source) {
|
|
|
28
28
|
let currentOptions = source.selectItems1.filter((v) => {
|
|
29
29
|
return this.value.indexOf(v['code']) >= 0;
|
|
30
30
|
});
|
|
31
|
+
currentOptions.forEach((v) => {
|
|
32
|
+
rtn.globalOptions.forEach((v1) => {
|
|
33
|
+
if(v.code===v1.code){
|
|
34
|
+
v['rowID']=v1['rowID']
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
31
38
|
if (source.code1) {
|
|
32
39
|
let checked = JSON.parse(source.code1)
|
|
33
40
|
checked.forEach((v) => {
|
|
@@ -42,6 +49,7 @@ const CheckBoxList = function (source) {
|
|
|
42
49
|
else {
|
|
43
50
|
return
|
|
44
51
|
}
|
|
52
|
+
|
|
45
53
|
currentOptions.push(v)
|
|
46
54
|
});
|
|
47
55
|
source.code1 = JSON.stringify(currentOptions);
|
|
@@ -205,6 +205,9 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
205
205
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
+
else{
|
|
209
|
+
data=data.replace("总耗时", "").replace("總耗時", "");
|
|
210
|
+
}
|
|
208
211
|
return data;
|
|
209
212
|
}
|
|
210
213
|
else {
|
|
@@ -752,7 +755,9 @@ function apiData(model, callback) {
|
|
|
752
755
|
}
|
|
753
756
|
}
|
|
754
757
|
else {
|
|
755
|
-
model.$vue.loadStats
|
|
758
|
+
if (model.$vue && model.$vue.loadStats) {
|
|
759
|
+
model.$vue.loadStats();
|
|
760
|
+
}
|
|
756
761
|
}
|
|
757
762
|
if (response.content.updateToolButtons) {
|
|
758
763
|
if (response.content.toolButtons) {
|
package/src/main.js
CHANGED
|
@@ -26,7 +26,7 @@ app.use(centaline, {
|
|
|
26
26
|
//baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
|
|
27
27
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
28
28
|
flagRouterSelf: true,
|
|
29
|
-
flagApp:
|
|
29
|
+
flagApp: false,//是否app端
|
|
30
30
|
zindex: 999,
|
|
31
31
|
showRequestSuccessMessage: true,
|
|
32
32
|
showRequestErrorMessage: true,
|
|
@@ -63,7 +63,7 @@ app.use(centaline, {
|
|
|
63
63
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
64
64
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
65
65
|
//authObject: '{token:"1647-1802885825978044416",platform:"WEB"}',
|
|
66
|
-
authObject: '{EmpID:"
|
|
66
|
+
authObject: '{EmpID:"Token_4e6cac0d-0185-4e8c-83ca-e4cf26373ff8",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_4e6cac0d-0185-4e8c-83ca-e4cf26373ff8",Platform:"WEB"}',
|
|
67
67
|
};
|
|
68
68
|
},
|
|
69
69
|
// 请求完成事件,可判断是否登录过期执行响应操作
|