centaline-data-driven-v3 0.1.19 → 0.1.20
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
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="ct-Layout" v-if="Layout !== null && !loading" @click="rowClickHandle"
|
|
2
|
+
<div class="ct-Layout" v-if="Layout !== null && !loading" @click="rowClickHandle"
|
|
3
|
+
:style="{ 'background-color': selectIndex === rowindex ? selectedRowBackColor : '' }">
|
|
3
4
|
<ct-layoutchildren :rowindex="rowindex" :actionRouter="actionRouter" :rowdata="vmodel" :vmodel="LayoutList"
|
|
4
5
|
:flagflex="true" :fields="fields" :parameterAction="parameterAction"
|
|
5
6
|
:rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler"
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
<script setup lang="ts">
|
|
10
11
|
import { ref, nextTick } from 'vue'
|
|
11
12
|
import common from '../../utils/common'
|
|
12
|
-
const emit = defineEmits(['rolRouterclick', 'changeHandler','rowclick'])
|
|
13
|
+
const emit = defineEmits(['rolRouterclick', 'changeHandler', 'rowclick'])
|
|
13
14
|
const props = defineProps({
|
|
14
15
|
action: String,
|
|
15
16
|
cellLayout: String,
|
|
@@ -20,8 +21,8 @@ const props = defineProps({
|
|
|
20
21
|
apiParam: Object,
|
|
21
22
|
parameterAction: String,
|
|
22
23
|
fields: Array,
|
|
23
|
-
selectIndex:Number,
|
|
24
|
-
selectedRowBackColor:String,
|
|
24
|
+
selectIndex: Number,
|
|
25
|
+
selectedRowBackColor: String,
|
|
25
26
|
formListactionRouter: {
|
|
26
27
|
type: Array,
|
|
27
28
|
default: [],
|
|
@@ -61,16 +62,14 @@ function load(data, cellLayout) {
|
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
64
|
if (cellLayout.indexOf("for=") != -1) {
|
|
64
|
-
|
|
65
65
|
var cellxmlDOM = loadXML(cellLayout);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var attribute = listxml.attributes.item(j);
|
|
66
|
+
const nodesWithFor = cellxmlDOM.querySelectorAll('[for]');
|
|
67
|
+
nodesWithFor.forEach((v) => {
|
|
68
|
+
for (var j = 0; j < v.attributes.length; j++) {
|
|
69
|
+
var attribute = v.attributes.item(j);
|
|
71
70
|
if (attribute.nodeName.toLowerCase() == "for".toLowerCase()) {
|
|
72
71
|
var liststr = "";
|
|
73
|
-
var celllist = xmlToString(
|
|
72
|
+
var celllist = xmlToString(v);
|
|
74
73
|
|
|
75
74
|
var celllistNew = loadXML(celllist);
|
|
76
75
|
var newAtt = celllistNew.createAttribute("forrowindex");
|
|
@@ -97,7 +96,7 @@ function load(data, cellLayout) {
|
|
|
97
96
|
cellLayout = cellLayout.replace(celllist, liststr);
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
|
-
}
|
|
99
|
+
});
|
|
101
100
|
}
|
|
102
101
|
if (typeof data !== "undefined") {
|
|
103
102
|
str = cellLayout.replace(/\{\{(.+?)\}\}/g, (...args) => {
|
|
@@ -303,7 +302,7 @@ function clickHandler(routerKey, rowindex, forname, forrowindex, flagHaveAlert)
|
|
|
303
302
|
emit("rolRouterclick", routerKey, rowindex, props.vmodel.$sourceIndex);
|
|
304
303
|
}
|
|
305
304
|
else {
|
|
306
|
-
emit("rolRouterclick", routerKey, rowindex, forname, forrowindex, flagHaveAlert,props.vmodel,props.actionRouter);
|
|
305
|
+
emit("rolRouterclick", routerKey, rowindex, forname, forrowindex, flagHaveAlert, props.vmodel, props.actionRouter);
|
|
307
306
|
}
|
|
308
307
|
}
|
|
309
308
|
}
|
|
@@ -315,7 +314,7 @@ function changeHandler(field) {
|
|
|
315
314
|
emit("changeHandler", field, props.vmodel.$sourceIndex);
|
|
316
315
|
}
|
|
317
316
|
}
|
|
318
|
-
function rowClickHandle(){
|
|
317
|
+
function rowClickHandle() {
|
|
319
318
|
emit("rowclick", props.rowindex);
|
|
320
319
|
}
|
|
321
320
|
</script>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div :class="isOperationalColumn ? 'subdiv_allinline' : ''" v-if="isShowLabel"
|
|
3
3
|
@click="isOperationalColumn ? clickHandler($event) : null">
|
|
4
4
|
<template v-if="eventTriggerType == Enum.EventTriggerType.Hover">
|
|
5
|
-
<el-popover @before-enter="onShow" :width="tooltipModel.width"
|
|
6
|
-
:
|
|
5
|
+
<el-popover @before-enter="onShow" :width="tooltipModel.width" placement="right"
|
|
6
|
+
:popper-options="popperOptions">
|
|
7
7
|
<template #default>
|
|
8
8
|
<div :style="'height: ' + tooltipModel.height + ''">
|
|
9
9
|
<component v-bind="tooltipModel.attrs" :is="tooltipModel.component"></component>
|
|
@@ -174,9 +174,27 @@ function voiceEndedHandler() {
|
|
|
174
174
|
function onShow() {
|
|
175
175
|
emit('mouseenter', props.router, props.rowData, props.rowindex, null, props.columnName, function (data) {
|
|
176
176
|
if (data.height) {
|
|
177
|
-
data.height = (parseInt(data.height.replace('px', ''))+50)+'px';
|
|
177
|
+
data.height = (parseInt(data.height.replace('px', '')) + 50) + 'px';
|
|
178
178
|
}
|
|
179
179
|
tooltipModel.value = data
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
// 自适应位置配置
|
|
183
|
+
const popperOptions = {
|
|
184
|
+
modifiers: [
|
|
185
|
+
{
|
|
186
|
+
name: 'preventOverflow', // 防止溢出视口
|
|
187
|
+
options: {
|
|
188
|
+
padding: 10 // 距离视口边缘的留白
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'flip', // 当空间不足时翻转位置
|
|
193
|
+
options: {
|
|
194
|
+
fallbackPlacements: ['left', 'top', 'bottom'], // 备选位置
|
|
195
|
+
padding: 5
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
182
200
|
</script>
|
package/src/main.js
CHANGED
|
@@ -65,7 +65,7 @@ app.use(centaline, {
|
|
|
65
65
|
//获取请求头
|
|
66
66
|
getRequestHeaders: function () {
|
|
67
67
|
return {
|
|
68
|
-
authobject: '{token:"jiangzf-
|
|
68
|
+
authobject: '{token:"jiangzf-1968847679618506752",platform:"WEB"}',
|
|
69
69
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
70
70
|
//authObject: '{token:"jiangzf-1958445358178844672",platform:"WEB"}',
|
|
71
71
|
//authObject: '{token:"1-90f7df2c-fba7-4ea0-8874-aa7202034f06"}',
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/
|
|
4
|
-
:searchDataApi="'/
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/ReportPersonAttendanceList/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'/ReportPersonAttendanceList/getListOfSearchModel'"></ct-searchlist>
|
|
5
5
|
|
|
6
6
|
<!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/EmployeeMaternityList/getLayoutOfSearch'"
|
|
7
7
|
:searchDataApi="'/EmployeeMaternityList/getListOfSearchModel'"></ct-searchlist> -->
|