meixioacomponent 0.3.41 → 0.3.45
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/lib/meixioacomponent.common.js +798 -750
- package/lib/meixioacomponent.umd.js +798 -750
- package/lib/meixioacomponent.umd.min.js +28 -28
- package/lib/style/element/index.css +7 -22
- package/lib/style/index.less +5 -1
- package/package.json +1 -1
- package/packages/components/base/baseArea/baseArea.vue +109 -108
- package/packages/components/base/baseIcon/index.vue +49 -45
- package/packages/components/base/baseLineInfoGroup/baseLineInfoGroup.vue +17 -14
- package/packages/components/base/baseLineInfoItem/baseLineInfoItem.vue +54 -31
- package/packages/components/base/basePopoverButton/index.vue +15 -19
- package/packages/components/base/baseUpload/baseUpload.vue +15 -12
- package/packages/components/base/baseUpload/baseUploadItem.vue +73 -70
- package/packages/components/base/baseUpload/mixins.js +10 -3
- package/packages/components/proForm/proForm/pro_form_item.vue +5 -1
- package/packages/components/proPageTable/oa_pro_colum_config.vue +81 -92
- package/packages/components/proPageTable/oa_pro_handle_table_border.vue +45 -38
- package/packages/components/proPageTable/oa_pro_table-header.vue +23 -21
- package/packages/components/proPageTable/oa_pro_table.vue +120 -98
- package/packages/components/style/element/index.css +7 -22
- package/packages/components/style/index.less +5 -1
- package/src/App.vue +34 -13
- package/src/component/test.vue +46 -190
- package/src/config/CompanyInfoConfig.js +26 -0
- package/src/config/linkViewClass.js +71 -0
- package/src/main.js +1 -1
- package/src/test.js +3 -3
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
:label="`开启斑马条纹:`"
|
|
9
9
|
>
|
|
10
10
|
<template slot="lineInforSlot">
|
|
11
|
-
<base-toggle
|
|
12
|
-
|
|
11
|
+
<base-toggle
|
|
12
|
+
v-model="stripe"
|
|
13
|
+
:toggleList="toggleList"
|
|
14
|
+
:size="`min`"
|
|
15
|
+
></base-toggle>
|
|
13
16
|
</template>
|
|
14
17
|
</base-line-info-item>
|
|
15
18
|
<base-line-info-item
|
|
@@ -24,8 +27,7 @@
|
|
|
24
27
|
v-model="borderColu"
|
|
25
28
|
:toggleList="toggleList"
|
|
26
29
|
:size="`min`"
|
|
27
|
-
>
|
|
28
|
-
</base-toggle>
|
|
30
|
+
></base-toggle>
|
|
29
31
|
</template>
|
|
30
32
|
</base-line-info-item>
|
|
31
33
|
<base-line-info-item
|
|
@@ -36,100 +38,105 @@
|
|
|
36
38
|
:label="`开启横向条纹:`"
|
|
37
39
|
>
|
|
38
40
|
<template slot="lineInforSlot">
|
|
39
|
-
<base-toggle
|
|
40
|
-
|
|
41
|
+
<base-toggle
|
|
42
|
+
v-model="borderRow"
|
|
43
|
+
:toggleList="toggleList"
|
|
44
|
+
:size="`min`"
|
|
45
|
+
></base-toggle>
|
|
41
46
|
</template>
|
|
42
47
|
</base-line-info-item>
|
|
43
48
|
</div>
|
|
44
49
|
</template>
|
|
45
50
|
|
|
46
51
|
<script>
|
|
47
|
-
import componentConfig from
|
|
52
|
+
import componentConfig from '../../config/componentConfig'
|
|
48
53
|
export default {
|
|
49
54
|
data() {
|
|
50
55
|
return {
|
|
51
56
|
tableBorderConfig: null,
|
|
52
57
|
toggleList: [
|
|
53
|
-
{ label:
|
|
54
|
-
{ label:
|
|
58
|
+
{ label: '开启', value: true },
|
|
59
|
+
{ label: '关闭', value: false },
|
|
55
60
|
],
|
|
56
|
-
}
|
|
61
|
+
}
|
|
57
62
|
},
|
|
58
63
|
created() {
|
|
59
|
-
this.init()
|
|
64
|
+
this.init()
|
|
60
65
|
},
|
|
61
66
|
computed: {
|
|
62
67
|
stripe: {
|
|
63
68
|
set(val) {
|
|
64
|
-
this.tableBorderConfig.stripe = val
|
|
65
|
-
componentConfig.eventBus.$emit(
|
|
66
|
-
key:
|
|
69
|
+
this.tableBorderConfig.stripe = val
|
|
70
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
71
|
+
key: 'stripe',
|
|
67
72
|
value: val,
|
|
68
|
-
})
|
|
69
|
-
this.setLocalStorage()
|
|
73
|
+
})
|
|
74
|
+
this.setLocalStorage()
|
|
70
75
|
},
|
|
71
76
|
get() {
|
|
72
|
-
return this.tableBorderConfig.stripe
|
|
77
|
+
return this.tableBorderConfig.stripe
|
|
73
78
|
},
|
|
74
79
|
},
|
|
75
80
|
borderColu: {
|
|
76
81
|
set(val) {
|
|
77
|
-
this.tableBorderConfig.borderColu = val
|
|
78
|
-
componentConfig.eventBus.$emit(
|
|
79
|
-
key:
|
|
82
|
+
this.tableBorderConfig.borderColu = val
|
|
83
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
84
|
+
key: 'borderColu',
|
|
80
85
|
value: val,
|
|
81
|
-
})
|
|
82
|
-
this.setLocalStorage()
|
|
86
|
+
})
|
|
87
|
+
this.setLocalStorage()
|
|
83
88
|
},
|
|
84
89
|
get() {
|
|
85
|
-
return this.tableBorderConfig.borderColu
|
|
90
|
+
return this.tableBorderConfig.borderColu
|
|
86
91
|
},
|
|
87
92
|
},
|
|
88
93
|
borderRow: {
|
|
89
94
|
set(val) {
|
|
90
|
-
this.tableBorderConfig.borderRow = val
|
|
91
|
-
componentConfig.eventBus.$emit(
|
|
92
|
-
key:
|
|
95
|
+
this.tableBorderConfig.borderRow = val
|
|
96
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
97
|
+
key: 'borderRow',
|
|
93
98
|
value: val,
|
|
94
|
-
})
|
|
95
|
-
this.setLocalStorage()
|
|
99
|
+
})
|
|
100
|
+
this.setLocalStorage()
|
|
96
101
|
},
|
|
97
102
|
get() {
|
|
98
|
-
return this.tableBorderConfig.borderRow
|
|
103
|
+
return this.tableBorderConfig.borderRow
|
|
99
104
|
},
|
|
100
105
|
},
|
|
101
106
|
},
|
|
102
107
|
methods: {
|
|
103
108
|
init() {
|
|
104
|
-
let tableBorderConfig = window.localStorage.getItem(
|
|
109
|
+
let tableBorderConfig = window.localStorage.getItem('tableBorderConfig')
|
|
105
110
|
if (tableBorderConfig) {
|
|
106
|
-
this.tableBorderConfig = JSON.parse(tableBorderConfig)
|
|
111
|
+
this.tableBorderConfig = JSON.parse(tableBorderConfig)
|
|
107
112
|
for (const key in this.tableBorderConfig) {
|
|
108
|
-
componentConfig.eventBus.$emit(
|
|
113
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
109
114
|
key: `${key}`,
|
|
110
115
|
value: this.tableBorderConfig[`${key}`],
|
|
111
|
-
})
|
|
116
|
+
})
|
|
112
117
|
}
|
|
113
118
|
} else {
|
|
114
119
|
this.tableBorderConfig = {
|
|
115
120
|
stripe: true,
|
|
116
121
|
borderColu: true,
|
|
117
122
|
borderRow: true,
|
|
118
|
-
}
|
|
123
|
+
}
|
|
119
124
|
}
|
|
120
125
|
},
|
|
121
126
|
|
|
122
127
|
setLocalStorage() {
|
|
123
128
|
window.localStorage.setItem(
|
|
124
|
-
|
|
125
|
-
JSON.stringify(this.tableBorderConfig)
|
|
126
|
-
)
|
|
129
|
+
'tableBorderConfig',
|
|
130
|
+
JSON.stringify(this.tableBorderConfig),
|
|
131
|
+
)
|
|
127
132
|
},
|
|
128
133
|
},
|
|
129
|
-
}
|
|
134
|
+
}
|
|
130
135
|
</script>
|
|
131
136
|
|
|
132
137
|
<style lang="less" scoped>
|
|
133
138
|
.handle-table-border-wrap {
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
padding: var(--padding-2) var(--padding-4);
|
|
134
141
|
}
|
|
135
142
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="table-header" v-show="config.key != 'noData'">
|
|
3
3
|
<div class="table-header-left">
|
|
4
|
-
<span class="cell-text">{{ scope.column.label }}
|
|
4
|
+
<span class="cell-text">{{ scope.column.label }}</span>
|
|
5
5
|
<span class="caret-wrapper defind">
|
|
6
6
|
<i class="sort-caret ascending"></i>
|
|
7
7
|
<i class="sort-caret descending"></i>
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
:plain="true"
|
|
16
16
|
:name="lockClass"
|
|
17
17
|
class="lock-icons"
|
|
18
|
-
:active="config.lock ? true : false"
|
|
19
|
-
v-if="!isAverageWidth"
|
|
20
18
|
@iconClick="handleClick('lock')"
|
|
19
|
+
:active="config.lock ? true : false"
|
|
20
|
+
v-if="!isAverageWidth && config.lock != 'right'"
|
|
21
21
|
></base-icon>
|
|
22
22
|
|
|
23
23
|
<base-icon
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
@iconClick="handleClick('screen')"
|
|
31
31
|
v-if="config.screen"
|
|
32
32
|
></base-icon>
|
|
33
|
+
|
|
34
|
+
<slot name="flex-slot" v-if="config.lock == 'right'"></slot>
|
|
33
35
|
</div>
|
|
34
36
|
</div>
|
|
35
37
|
</template>
|
|
@@ -39,19 +41,19 @@ export default {
|
|
|
39
41
|
data() {
|
|
40
42
|
return {
|
|
41
43
|
// preIndex: null,
|
|
42
|
-
}
|
|
44
|
+
}
|
|
43
45
|
},
|
|
44
46
|
created() {},
|
|
45
47
|
mounted() {},
|
|
46
48
|
computed: {
|
|
47
49
|
preIndex() {
|
|
48
|
-
return this.$props.config.preIndex
|
|
50
|
+
return this.$props.config.preIndex
|
|
49
51
|
},
|
|
50
52
|
lockClass() {
|
|
51
53
|
if (!this.$props.config.lock) {
|
|
52
|
-
return
|
|
54
|
+
return 'meixicomponenticon-suoding'
|
|
53
55
|
}
|
|
54
|
-
return
|
|
56
|
+
return 'meixicomponenticon-jiesuo'
|
|
55
57
|
},
|
|
56
58
|
},
|
|
57
59
|
props: {
|
|
@@ -69,37 +71,37 @@ export default {
|
|
|
69
71
|
methods: {
|
|
70
72
|
handleClick(type) {
|
|
71
73
|
switch (type) {
|
|
72
|
-
case
|
|
73
|
-
this.handleLock()
|
|
74
|
-
break
|
|
75
|
-
case
|
|
76
|
-
this.handleScreen()
|
|
77
|
-
break
|
|
74
|
+
case 'lock':
|
|
75
|
+
this.handleLock()
|
|
76
|
+
break
|
|
77
|
+
case 'screen':
|
|
78
|
+
this.handleScreen()
|
|
79
|
+
break
|
|
78
80
|
|
|
79
81
|
default:
|
|
80
|
-
break
|
|
82
|
+
break
|
|
81
83
|
}
|
|
82
84
|
},
|
|
83
85
|
|
|
84
86
|
handleLock() {
|
|
85
87
|
if (!this.$props.config.lock) {
|
|
86
|
-
this.$emit(
|
|
88
|
+
this.$emit('headerItemLock', {
|
|
87
89
|
preIndex: this.preIndex,
|
|
88
90
|
index: this.$props.index,
|
|
89
|
-
})
|
|
91
|
+
})
|
|
90
92
|
} else {
|
|
91
|
-
this.$emit(
|
|
93
|
+
this.$emit('headerItemUnlock', {
|
|
92
94
|
preIndex: this.preIndex,
|
|
93
95
|
index: this.$props.index,
|
|
94
|
-
})
|
|
96
|
+
})
|
|
95
97
|
}
|
|
96
98
|
},
|
|
97
99
|
|
|
98
100
|
handleScreen() {
|
|
99
|
-
this.$emit(
|
|
101
|
+
this.$emit('handleScreenItem', this.$props.config)
|
|
100
102
|
},
|
|
101
103
|
},
|
|
102
|
-
}
|
|
104
|
+
}
|
|
103
105
|
</script>
|
|
104
106
|
|
|
105
107
|
<style lang="less">
|
|
@@ -133,7 +135,7 @@ export default {
|
|
|
133
135
|
overflow: hidden;
|
|
134
136
|
white-space: nowrap;
|
|
135
137
|
text-overflow: ellipsis;
|
|
136
|
-
color: var(--font-color-
|
|
138
|
+
color: var(--font-color-s);
|
|
137
139
|
font-size: var(--font-size-base);
|
|
138
140
|
font-weight: var(--font-weight-g);
|
|
139
141
|
}
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
ref="elTable"
|
|
47
47
|
:row-key="rowKey"
|
|
48
48
|
:stripe="stripe"
|
|
49
|
+
:fit="true"
|
|
49
50
|
:data="tableData"
|
|
50
51
|
:border="borderColu"
|
|
51
52
|
:height="tableHeight"
|
|
@@ -54,8 +55,6 @@
|
|
|
54
55
|
'no-row-bordel': !borderRow,
|
|
55
56
|
}"
|
|
56
57
|
@sort-change="sortChange"
|
|
57
|
-
@cell-mouse-enter="cellMouseEnter"
|
|
58
|
-
@cell-mouse-leave="cellMouseLeave"
|
|
59
58
|
@selection-change="handleSelectionChange"
|
|
60
59
|
:style="{
|
|
61
60
|
width: width,
|
|
@@ -87,11 +86,10 @@
|
|
|
87
86
|
:selectable="selected"
|
|
88
87
|
></el-table-column>
|
|
89
88
|
<el-table-column
|
|
90
|
-
:key="
|
|
89
|
+
:key="item.key"
|
|
91
90
|
:align="align"
|
|
92
91
|
sortable="custom"
|
|
93
92
|
:fixed="item.lock"
|
|
94
|
-
v-show="item.show"
|
|
95
93
|
:prop="item.key"
|
|
96
94
|
:label="item.label"
|
|
97
95
|
:width="isAverageWidth ? '' : item.width"
|
|
@@ -106,7 +104,14 @@
|
|
|
106
104
|
@headerItemLock="headerItemLock"
|
|
107
105
|
@headerItemUnlock="headerItemUnlock"
|
|
108
106
|
@handleScreenItem="handleScreenItem"
|
|
109
|
-
|
|
107
|
+
>
|
|
108
|
+
<oa_pro_colum_configVue
|
|
109
|
+
slot="flex-slot"
|
|
110
|
+
:config="tableConfig"
|
|
111
|
+
v-if="isListLast(item.key)"
|
|
112
|
+
@setTableHeaderConfig="setTableHeaderConfig"
|
|
113
|
+
></oa_pro_colum_configVue>
|
|
114
|
+
</oaProtableHeader>
|
|
110
115
|
</template>
|
|
111
116
|
|
|
112
117
|
<template slot-scope="scope">
|
|
@@ -116,13 +121,33 @@
|
|
|
116
121
|
v-if="item.template"
|
|
117
122
|
></slot>
|
|
118
123
|
|
|
124
|
+
<el-tooltip
|
|
125
|
+
effect="dark"
|
|
126
|
+
placement="top"
|
|
127
|
+
:content="scope.row[`${item.key}`]"
|
|
128
|
+
v-else-if="item.toolTip && scope.row[`${item.key}`].length > 8"
|
|
129
|
+
>
|
|
130
|
+
<span
|
|
131
|
+
class="cell-content-text"
|
|
132
|
+
:class="[
|
|
133
|
+
item.fun ? 'fun' : '',
|
|
134
|
+
item.click ? 'primary' : '',
|
|
135
|
+
item.color ? item.color : '',
|
|
136
|
+
]"
|
|
137
|
+
@click="rowClick(item, scope.row)"
|
|
138
|
+
>
|
|
139
|
+
{{ scope.row[`${item.key}`] }}
|
|
140
|
+
</span>
|
|
141
|
+
</el-tooltip>
|
|
142
|
+
|
|
119
143
|
<span
|
|
120
144
|
v-else
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
145
|
+
class="cell-content-text"
|
|
146
|
+
:class="[
|
|
147
|
+
item.fun ? 'fun' : '',
|
|
148
|
+
item.click ? 'primary' : '',
|
|
149
|
+
item.color ? item.color : '',
|
|
150
|
+
]"
|
|
126
151
|
@click="rowClick(item, scope.row)"
|
|
127
152
|
>
|
|
128
153
|
{{ scope.row[`${item.key}`] }}
|
|
@@ -137,19 +162,6 @@
|
|
|
137
162
|
@setTableHeaderConfig="setTableHeaderConfig"
|
|
138
163
|
></oa_pro_colum_configVue>
|
|
139
164
|
</div>
|
|
140
|
-
<!-- 每一个单元格提示内容 -->
|
|
141
|
-
<el-tooltip
|
|
142
|
-
class="item"
|
|
143
|
-
effect="dark"
|
|
144
|
-
:manual="true"
|
|
145
|
-
placement="top"
|
|
146
|
-
ref="tableTooltip"
|
|
147
|
-
v-model="tooltip.show"
|
|
148
|
-
:visible-arrow="false"
|
|
149
|
-
:content="`${tooltip.content}`"
|
|
150
|
-
>
|
|
151
|
-
<span class="table-tooltip-wrap" :style="toolTipsStyle"></span>
|
|
152
|
-
</el-tooltip>
|
|
153
165
|
</div>
|
|
154
166
|
|
|
155
167
|
<!-- 表格尾部 -->
|
|
@@ -202,6 +214,7 @@ import baseButtonHandle from '../base/baseButtonHandle/baseButtonHandle.vue' //
|
|
|
202
214
|
|
|
203
215
|
//
|
|
204
216
|
import componentConfig from '../../config/componentConfig'
|
|
217
|
+
let canPush = true
|
|
205
218
|
export default {
|
|
206
219
|
name: 'baseProTable',
|
|
207
220
|
data() {
|
|
@@ -221,28 +234,19 @@ export default {
|
|
|
221
234
|
/* 控制loading动画 */
|
|
222
235
|
loading: false,
|
|
223
236
|
defaultSvg: false,
|
|
224
|
-
/* 黑色提示框数据 */
|
|
225
|
-
tooltip: {
|
|
226
|
-
top: null,
|
|
227
|
-
left: null,
|
|
228
|
-
width: null,
|
|
229
|
-
height: null,
|
|
230
|
-
show: false,
|
|
231
|
-
content: '',
|
|
232
|
-
},
|
|
233
237
|
/* 单选表格 记录之前选择的表格数据 */
|
|
234
238
|
preSingleTableValue: null,
|
|
235
|
-
|
|
236
239
|
// 是否开启斑马纹
|
|
237
240
|
stripe: true,
|
|
238
241
|
// 是否开启表格竖向条纹
|
|
239
242
|
borderColu: true,
|
|
240
|
-
|
|
241
243
|
// 是否开启表格横向条纹
|
|
242
244
|
borderRow: true,
|
|
243
|
-
|
|
244
245
|
// 倒计时
|
|
245
246
|
triggerDown: null,
|
|
247
|
+
|
|
248
|
+
// 组件销毁时重置的class 配合 LinkViewClass使用
|
|
249
|
+
_linkViewClassSubs: null,
|
|
246
250
|
}
|
|
247
251
|
},
|
|
248
252
|
created() {
|
|
@@ -255,6 +259,9 @@ export default {
|
|
|
255
259
|
beforeDestroy() {
|
|
256
260
|
componentConfig.eventBus.$off('handleTableBorder', this.handleTableBorder)
|
|
257
261
|
clearTimeout(this.triggerDown)
|
|
262
|
+
if (this._linkViewClassSubs) {
|
|
263
|
+
this._linkViewClassSubs.init()
|
|
264
|
+
}
|
|
258
265
|
},
|
|
259
266
|
computed: {
|
|
260
267
|
config() {
|
|
@@ -275,7 +282,8 @@ export default {
|
|
|
275
282
|
},
|
|
276
283
|
fixedList() {
|
|
277
284
|
return this.$props.tableConfig.filter((item) => {
|
|
278
|
-
|
|
285
|
+
const { lock } = item
|
|
286
|
+
return lock && lock != 'right'
|
|
279
287
|
})
|
|
280
288
|
},
|
|
281
289
|
|
|
@@ -293,15 +301,6 @@ export default {
|
|
|
293
301
|
return item.show
|
|
294
302
|
})
|
|
295
303
|
},
|
|
296
|
-
|
|
297
|
-
toolTipsStyle() {
|
|
298
|
-
return {
|
|
299
|
-
top: `${this.tooltip.top}px`,
|
|
300
|
-
left: `${this.tooltip.left}px`,
|
|
301
|
-
width: `${this.tooltip.width}px`,
|
|
302
|
-
height: `${this.tooltip.height}px`,
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
304
|
},
|
|
306
305
|
props: {
|
|
307
306
|
// 当加载树形结构的表格时必须传入该值
|
|
@@ -430,6 +429,7 @@ export default {
|
|
|
430
429
|
},
|
|
431
430
|
methods: {
|
|
432
431
|
init() {
|
|
432
|
+
canPush = !this.isAverageWidth
|
|
433
433
|
this.initProScreenConfig()
|
|
434
434
|
this.initFooterHandleConfig()
|
|
435
435
|
this.$props.tableConfig.forEach((item, index) => {
|
|
@@ -438,17 +438,13 @@ export default {
|
|
|
438
438
|
if (!item.width || item.width < 100) {
|
|
439
439
|
item.width = 100
|
|
440
440
|
}
|
|
441
|
+
if (item.lock == 'right') {
|
|
442
|
+
canPush = false
|
|
443
|
+
}
|
|
441
444
|
})
|
|
442
445
|
|
|
443
|
-
if (
|
|
444
|
-
this
|
|
445
|
-
label: '',
|
|
446
|
-
key: 'noData',
|
|
447
|
-
lock: false,
|
|
448
|
-
width: 30,
|
|
449
|
-
show: true,
|
|
450
|
-
template: false,
|
|
451
|
-
})
|
|
446
|
+
if (canPush) {
|
|
447
|
+
this.tableConfigPushEmpty()
|
|
452
448
|
}
|
|
453
449
|
|
|
454
450
|
this.refreshData()
|
|
@@ -457,29 +453,6 @@ export default {
|
|
|
457
453
|
this.searchContentHeight = height
|
|
458
454
|
},
|
|
459
455
|
|
|
460
|
-
cellMouseEnter(row, column, cell, event) {
|
|
461
|
-
let content = row[`${column.property}`]
|
|
462
|
-
this.tooltip.show = false
|
|
463
|
-
if (typeof content == 'number' || typeof content == 'string') {
|
|
464
|
-
const { tooltip } = this
|
|
465
|
-
let style = event.target
|
|
466
|
-
let position = style.getBoundingClientRect()
|
|
467
|
-
const { top, left } = position
|
|
468
|
-
const { clientWidth, clientHeight } = style
|
|
469
|
-
tooltip.width = clientWidth
|
|
470
|
-
tooltip.height = clientHeight
|
|
471
|
-
tooltip.top = top
|
|
472
|
-
tooltip.left = left
|
|
473
|
-
tooltip.content = content
|
|
474
|
-
this.$nextTick(() => {
|
|
475
|
-
tooltip.show = true
|
|
476
|
-
})
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
cellMouseLeave() {
|
|
481
|
-
this.tooltip.show = false
|
|
482
|
-
},
|
|
483
456
|
headerItemLock(params) {
|
|
484
457
|
let { preIndex, index } = { ...params }
|
|
485
458
|
let tableConfig = this.$props.tableConfig
|
|
@@ -671,7 +644,22 @@ export default {
|
|
|
671
644
|
|
|
672
645
|
let screenResult = this.returnProScreenResult()
|
|
673
646
|
this.$props.httpRequire(screenResult).then((res) => {
|
|
674
|
-
|
|
647
|
+
let isArray = res instanceof Array
|
|
648
|
+
if (isArray) {
|
|
649
|
+
this.setTableData(res)
|
|
650
|
+
} else {
|
|
651
|
+
const tableData = res.tableData
|
|
652
|
+
if (
|
|
653
|
+
res._class.__proto__.__proto__.constructor.name ==
|
|
654
|
+
'LinkViewClass' &&
|
|
655
|
+
!this._linkViewClassSubs
|
|
656
|
+
) {
|
|
657
|
+
this._linkViewClassSubs = res._class
|
|
658
|
+
}
|
|
659
|
+
if (tableData) {
|
|
660
|
+
this.setTableData(tableData)
|
|
661
|
+
}
|
|
662
|
+
}
|
|
675
663
|
})
|
|
676
664
|
},
|
|
677
665
|
// 设置表格数据
|
|
@@ -711,23 +699,45 @@ export default {
|
|
|
711
699
|
},
|
|
712
700
|
// 自定义表格的列
|
|
713
701
|
setTableHeaderConfig(configList) {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
702
|
+
let leftFixedList = []
|
|
703
|
+
let rightFixedList = []
|
|
704
|
+
const { tableConfig } = this.$props
|
|
705
|
+
tableConfig.forEach((item) => {
|
|
706
|
+
const { lock } = item
|
|
707
|
+
if (lock && lock != 'right') {
|
|
708
|
+
leftFixedList.push(item)
|
|
709
|
+
} else if (lock && lock == 'right') {
|
|
710
|
+
rightFixedList.push(item)
|
|
711
|
+
}
|
|
712
|
+
})
|
|
713
|
+
|
|
714
|
+
tableConfig.splice(
|
|
715
|
+
leftFixedList.length,
|
|
716
|
+
configList.length - rightFixedList.length + 1,
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
configList.forEach((item, index) => {
|
|
720
|
+
const length = leftFixedList.length
|
|
721
|
+
tableConfig.splice(index + length, 1, item)
|
|
722
|
+
})
|
|
723
|
+
if (rightFixedList.length > 0) {
|
|
724
|
+
rightFixedList.forEach((item) => {
|
|
725
|
+
tableConfig.push(item)
|
|
730
726
|
})
|
|
727
|
+
}
|
|
728
|
+
if (canPush) {
|
|
729
|
+
this.tableConfigPushEmpty()
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
tableConfigPushEmpty() {
|
|
733
|
+
const { tableConfig } = this.$props
|
|
734
|
+
tableConfig.push({
|
|
735
|
+
label: '',
|
|
736
|
+
key: 'noData',
|
|
737
|
+
lock: false,
|
|
738
|
+
width: 40,
|
|
739
|
+
show: true,
|
|
740
|
+
template: false,
|
|
731
741
|
})
|
|
732
742
|
},
|
|
733
743
|
// 表格行被选中时
|
|
@@ -823,8 +833,16 @@ export default {
|
|
|
823
833
|
return 0
|
|
824
834
|
}
|
|
825
835
|
},
|
|
836
|
+
|
|
837
|
+
isListLast(key) {
|
|
838
|
+
const { tableConfig } = this.$props
|
|
839
|
+
let index = tableConfig.findIndex((item) => {
|
|
840
|
+
return item.key == key
|
|
841
|
+
})
|
|
842
|
+
|
|
843
|
+
return index == tableConfig.length - 1
|
|
844
|
+
},
|
|
826
845
|
},
|
|
827
|
-
watch: {},
|
|
828
846
|
}
|
|
829
847
|
</script>
|
|
830
848
|
|
|
@@ -894,11 +912,15 @@ export default {
|
|
|
894
912
|
color: var(--font-color-d) !important;
|
|
895
913
|
font-size: var(--font-size-base) !important;
|
|
896
914
|
}
|
|
897
|
-
|
|
898
|
-
|
|
915
|
+
|
|
916
|
+
.primary,
|
|
917
|
+
.fun {
|
|
899
918
|
font-weight: var(--font-weight-g);
|
|
900
|
-
font-size: var(--font-size-base) !important;
|
|
901
919
|
color: var(--color-primary) !important;
|
|
920
|
+
font-size: var(--font-size-base) !important;
|
|
921
|
+
}
|
|
922
|
+
.fun {
|
|
923
|
+
cursor: pointer;
|
|
902
924
|
&:hover {
|
|
903
925
|
text-decoration: underline;
|
|
904
926
|
}
|
|
@@ -8923,16 +8923,7 @@
|
|
|
8923
8923
|
outline-width: 0;
|
|
8924
8924
|
}
|
|
8925
8925
|
|
|
8926
|
-
|
|
8927
|
-
position: absolute;
|
|
8928
|
-
border-radius: 4px;
|
|
8929
|
-
padding: 10px;
|
|
8930
|
-
z-index: 2000;
|
|
8931
|
-
font-size: 12px;
|
|
8932
|
-
line-height: 1.2;
|
|
8933
|
-
min-width: 10px;
|
|
8934
|
-
word-wrap: break-word;
|
|
8935
|
-
}
|
|
8926
|
+
|
|
8936
8927
|
|
|
8937
8928
|
.el-tooltip__popper .popper__arrow,
|
|
8938
8929
|
.el-tooltip__popper .popper__arrow::after {
|
|
@@ -11522,7 +11513,7 @@
|
|
|
11522
11513
|
resize: vertical;
|
|
11523
11514
|
padding: var(--padding-2) var(--padding-3);
|
|
11524
11515
|
line-height: 1.5;
|
|
11525
|
-
border:
|
|
11516
|
+
border: 2px solid var(--color-gray-d) !important;
|
|
11526
11517
|
-webkit-box-sizing: border-box;
|
|
11527
11518
|
box-sizing: border-box;
|
|
11528
11519
|
width: 100%;
|
|
@@ -11536,6 +11527,10 @@
|
|
|
11536
11527
|
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
11537
11528
|
}
|
|
11538
11529
|
|
|
11530
|
+
.el-textarea__inner:hover {
|
|
11531
|
+
border-color: var(--color-primary) !important;
|
|
11532
|
+
}
|
|
11533
|
+
|
|
11539
11534
|
.el-textarea__inner::-webkit-input-placeholder {
|
|
11540
11535
|
color: #8f959e;
|
|
11541
11536
|
}
|
|
@@ -14276,16 +14271,6 @@
|
|
|
14276
14271
|
outline-width: 0;
|
|
14277
14272
|
}
|
|
14278
14273
|
|
|
14279
|
-
.el-tooltip__popper {
|
|
14280
|
-
position: absolute;
|
|
14281
|
-
border-radius: 4px;
|
|
14282
|
-
padding: 10px;
|
|
14283
|
-
z-index: 2000;
|
|
14284
|
-
font-size: 12px;
|
|
14285
|
-
line-height: 1.2;
|
|
14286
|
-
min-width: 10px;
|
|
14287
|
-
word-wrap: break-word;
|
|
14288
|
-
}
|
|
14289
14274
|
|
|
14290
14275
|
.el-tooltip__popper .popper__arrow,
|
|
14291
14276
|
.el-tooltip__popper .popper__arrow::after {
|
|
@@ -18390,7 +18375,7 @@
|
|
|
18390
18375
|
.el-tooltip__popper {
|
|
18391
18376
|
position: absolute;
|
|
18392
18377
|
border-radius: 4px;
|
|
18393
|
-
padding:
|
|
18378
|
+
padding: 4px;
|
|
18394
18379
|
z-index: 2000;
|
|
18395
18380
|
font-size: 12px;
|
|
18396
18381
|
line-height: 1.2;
|