centaline-data-driven-v3 0.1.10 → 0.1.11
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
|
@@ -91,117 +91,121 @@
|
|
|
91
91
|
@drop="drop($event, row, column, 'table')" @dragover.prevent
|
|
92
92
|
@dragenter="dragenter($event, column, 'table')"
|
|
93
93
|
@dragleave="dragleave($event, column, 'table')">
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<template v-
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
<div class="card__delete-wrapper">
|
|
95
|
+
<!--操作列-->
|
|
96
|
+
<div v-if="column.id === 'operation'" class="div_allinline"
|
|
97
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
|
|
98
|
+
style="float: left;">
|
|
99
|
+
<template v-for="(router, rowRouterIndex) in getRowRouterShow(row)">
|
|
100
|
+
<template v-if="router.isCallTel">
|
|
101
|
+
<component
|
|
102
|
+
v-if="!router.rightField || !row[router.rightField] || row[router.rightField] == 1"
|
|
103
|
+
:key="rowRouterIndex"
|
|
104
|
+
:ref="el => getRowsRouterRef(el, 'router' + router.key + rowindex)"
|
|
105
|
+
:rowData="row" :rowindex="rowindex" :is="router.is"
|
|
106
|
+
:vmodel="router" :api="model.parameterAction"
|
|
107
|
+
@click="rolRouterClickHandler">
|
|
108
|
+
</component>
|
|
109
|
+
</template>
|
|
110
|
+
<template v-else>
|
|
111
|
+
<Tablecurrency
|
|
112
|
+
v-if="!router.rightField || row[router.rightField] == 1"
|
|
113
|
+
:key="rowRouterIndex" :rowData="row" :rowindex="rowindex"
|
|
114
|
+
:isOperationalColumn="true" :router="router"
|
|
115
|
+
:colValue="router.controlLabel"
|
|
116
|
+
@click="rolRouterClickHandler">
|
|
117
|
+
</Tablecurrency>
|
|
118
|
+
</template>
|
|
116
119
|
</template>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
</
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
</
|
|
120
|
+
<el-popover v-if="getRowRouterDisplay(row).length > 0"
|
|
121
|
+
:ref="el => getRowsPopoverRef(el, rowindex)"
|
|
122
|
+
:append-to-table="option.appendId ? option.appendId : ''"
|
|
123
|
+
:placement="option.placement ? option.placement : 'left'"
|
|
124
|
+
:trigger="option.trigger ? option.trigger : ''">
|
|
125
|
+
<div class="tab-list" style="border-bottom: none">
|
|
126
|
+
<template
|
|
127
|
+
v-for="(router, rowRouterIndex) in getRowRouterDisplay(row)">
|
|
128
|
+
<template v-if="router.isCallTel">
|
|
129
|
+
<component
|
|
130
|
+
v-if="!router.rightField || !row[router.rightField] || row[router.rightField] == 1"
|
|
131
|
+
:key="rowRouterIndex"
|
|
132
|
+
:ref="el => getRowsRouterRef(el, 'router' + router.key + rowindex)"
|
|
133
|
+
:rowData="row" :rowindex="rowindex" :is="router.is"
|
|
134
|
+
:vmodel="router" :api="model.parameterAction"
|
|
135
|
+
@click="rolRouterClickHandler">
|
|
136
|
+
</component>
|
|
137
|
+
</template>
|
|
138
|
+
<template v-else>
|
|
139
|
+
<Tablecurrency
|
|
140
|
+
v-if="!router.rightField || row[router.rightField] == 1"
|
|
141
|
+
:key="rowRouterIndex" :rowData="row"
|
|
142
|
+
:rowindex="rowindex" :isOperationalColumn="true"
|
|
143
|
+
:router="router" :colValue="router.label"
|
|
144
|
+
:isShowImg="false" @click="rolRouterClickHandler">
|
|
145
|
+
</Tablecurrency>
|
|
146
|
+
</template>
|
|
144
147
|
</template>
|
|
148
|
+
</div>
|
|
149
|
+
<template #reference>
|
|
150
|
+
<span class="icon-more Stats-popover"></span>
|
|
145
151
|
</template>
|
|
146
|
-
</div>
|
|
147
|
-
<template #reference>
|
|
148
|
-
<span class="icon-more Stats-popover"></span>
|
|
149
|
-
</template>
|
|
150
152
|
|
|
151
|
-
|
|
153
|
+
</el-popover>
|
|
152
154
|
|
|
153
155
|
|
|
154
156
|
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<template v-else-if="column.id === 'linksCol'">
|
|
158
|
-
<div v-if="row[column.id]">
|
|
159
|
-
<template v-for="(r, linksColIndex) in JSON.parse(row[column.id])">
|
|
160
|
-
<a v-if="r.routerKey" style="padding-right: 10px;"
|
|
161
|
-
class="ct-tablecurrencyItem" :key="linksColIndex"
|
|
162
|
-
@click="linksColClickHandler(r)" v-html="r.name"
|
|
163
|
-
href="javascript:void(0);">
|
|
164
|
-
</a>
|
|
165
|
-
<span v-else v-html="r.name" style="padding-right: 10px;"></span>
|
|
166
|
-
</template>
|
|
167
157
|
</div>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
:
|
|
185
|
-
|
|
158
|
+
|
|
159
|
+
<template v-else-if="column.id === 'linksCol'">
|
|
160
|
+
<div v-if="row[column.id]">
|
|
161
|
+
<template v-for="(r, linksColIndex) in JSON.parse(row[column.id])">
|
|
162
|
+
<a v-if="r.routerKey" style="padding-right: 10px;"
|
|
163
|
+
class="ct-tablecurrencyItem" :key="linksColIndex"
|
|
164
|
+
@click="linksColClickHandler(r)" v-html="r.name"
|
|
165
|
+
href="javascript:void(0);">
|
|
166
|
+
</a>
|
|
167
|
+
<span v-else v-html="r.name"
|
|
168
|
+
style="padding-right: 10px;"></span>
|
|
169
|
+
</template>
|
|
170
|
+
</div>
|
|
171
|
+
</template>
|
|
172
|
+
|
|
173
|
+
<Tablecurrency v-else-if="column.id === 'voice'" :isShowVoice="true"
|
|
174
|
+
:router="column.router" :colValue="column.router.label"
|
|
175
|
+
:rowindex="rowindex" :rowData="row" @click="rolRouterClickHandler"
|
|
176
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'">
|
|
186
177
|
</Tablecurrency>
|
|
187
|
-
</template>
|
|
188
178
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
179
|
+
<!--可点击的列-->
|
|
180
|
+
<template v-else-if="column.router">
|
|
181
|
+
<div v-if="column.router.rightField && row[column.router.rightField] == 0"
|
|
182
|
+
v-html="row[column.id]"></div>
|
|
183
|
+
<Tablecurrency v-else :rowindex="rowindex" :align="column.attrs.align"
|
|
184
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
|
|
185
|
+
:columnName="column.id" :router="column.router"
|
|
186
|
+
:colValue="row[column.id]" :rowData="row"
|
|
187
|
+
:eventTriggerType="column.eventTriggerType"
|
|
188
|
+
@click="rolRouterClickHandler"
|
|
189
|
+
@mouseenter="rolRouterMouseenterHandler">
|
|
190
|
+
</Tablecurrency>
|
|
191
|
+
</template>
|
|
194
192
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
<el-icon v-if="showDelete(row, column)" class="el-icon-close card__delete"
|
|
201
|
-
@click="deleteColumn(row, column)">
|
|
202
|
-
<CircleClose />
|
|
203
|
-
</el-icon>
|
|
193
|
+
<!--正常的列-->
|
|
194
|
+
<div v-else-if="column.flagHtml" v-html="row[column.id]"
|
|
195
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
|
|
196
|
+
:style="column.style ? column.style : ''">
|
|
197
|
+
</div>
|
|
204
198
|
|
|
199
|
+
<div v-else-if="typeof column.template === 'undefined'"
|
|
200
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
|
|
201
|
+
:style="column.style ? column.style : ''">
|
|
202
|
+
{{ common.getDataOfUpperLower(row, column.id) }}
|
|
203
|
+
</div>
|
|
204
|
+
<el-icon v-if="showDelete(row, column)" class="el-icon-close card__delete"
|
|
205
|
+
@click.stop="deleteColumn(row, column)">
|
|
206
|
+
<CircleClose />
|
|
207
|
+
</el-icon>
|
|
208
|
+
</div>
|
|
205
209
|
</td>
|
|
206
210
|
</template>
|
|
207
211
|
|
|
@@ -1394,13 +1398,13 @@ function onDragStartColumn(event, row, column, name) {
|
|
|
1394
1398
|
|
|
1395
1399
|
|
|
1396
1400
|
function drop(e, row, column, name) {
|
|
1397
|
-
if ((
|
|
1401
|
+
if ((props.dragStartName == "top" || dragStartName.value == "table") && name == "table" && column.paramName == "drop") {
|
|
1398
1402
|
|
|
1399
1403
|
|
|
1400
1404
|
if (dragStartName.value == "table") {
|
|
1401
1405
|
exchangeRequest(row, column, dragStartItem.value, dragStartColumn.value);
|
|
1402
1406
|
}
|
|
1403
|
-
else if (
|
|
1407
|
+
else if (props.dragStartName == "top") {
|
|
1404
1408
|
dropRequest(row, column, props.dragStartItem);
|
|
1405
1409
|
}
|
|
1406
1410
|
if (name === "table") {
|
|
@@ -1597,7 +1601,7 @@ function addClass(el, className) {
|
|
|
1597
1601
|
newClassName.push(className);
|
|
1598
1602
|
el.className = newClassName.join(" ");
|
|
1599
1603
|
}
|
|
1600
|
-
|
|
1604
|
+
|
|
1601
1605
|
defineExpose({
|
|
1602
1606
|
model,
|
|
1603
1607
|
searchComplate,
|
|
@@ -1609,15 +1613,22 @@ defineExpose({
|
|
|
1609
1613
|
})
|
|
1610
1614
|
</script>
|
|
1611
1615
|
<style lang="css" scoped>
|
|
1612
|
-
.
|
|
1616
|
+
.card__delete-wrapper {
|
|
1617
|
+
width: 100%;
|
|
1618
|
+
height: 100%;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
/* 鼠标移上去才变成 relative */
|
|
1622
|
+
.card__delete-wrapper:hover {
|
|
1613
1623
|
position: relative;
|
|
1624
|
+
|
|
1614
1625
|
}
|
|
1615
1626
|
|
|
1616
1627
|
/* 右上角删除图标,默认隐藏 */
|
|
1617
1628
|
.card__delete {
|
|
1618
1629
|
position: absolute;
|
|
1619
|
-
top:
|
|
1620
|
-
right:
|
|
1630
|
+
top: 1px;
|
|
1631
|
+
right: -5px;
|
|
1621
1632
|
font-size: 14px;
|
|
1622
1633
|
color: #909399;
|
|
1623
1634
|
cursor: pointer;
|
|
@@ -1628,7 +1639,7 @@ defineExpose({
|
|
|
1628
1639
|
}
|
|
1629
1640
|
|
|
1630
1641
|
/* 鼠标悬停卡片时让图标出现,并恢复点击事件 */
|
|
1631
|
-
.
|
|
1642
|
+
.card__delete-wrapper:hover .card__delete {
|
|
1632
1643
|
opacity: 1;
|
|
1633
1644
|
pointer-events: auto;
|
|
1634
1645
|
}
|