w-ui-v1 1.1.21 → 1.1.22
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
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
<!-- 搜索 -->
|
|
4
4
|
<wSearch :primaryCriteria="pageConfigs.primaryCriteria" :criterias="pageConfigs.drillingParams" @search="search" v-if="pageConfigs.buttons?.includes('query')">
|
|
5
5
|
</wSearch>
|
|
6
|
+
<view v-if="loading" class="enpert">
|
|
7
|
+
<wd-loading />
|
|
8
|
+
</view>
|
|
9
|
+
|
|
6
10
|
<!-- 横向滚动容器 -->
|
|
7
11
|
<scroll-view scroll-x class="table-scroll-x">
|
|
8
12
|
<!-- 表格头部 -->
|
|
@@ -21,7 +25,11 @@
|
|
|
21
25
|
</view>
|
|
22
26
|
|
|
23
27
|
<!-- 表格内容 -->
|
|
24
|
-
<
|
|
28
|
+
<view v-if="cdata.length===0" class="enpert">
|
|
29
|
+
暂无数据~
|
|
30
|
+
</view>
|
|
31
|
+
<scroll-view v-else scroll-y class="table-body" :style="{maxHeight: bodyHeight + 'rpx'}">
|
|
32
|
+
|
|
25
33
|
<view class="table-row" :style="{backgroundColor:(row.dataType==='小计'?'#B9E0FF':row.dataType==='合计'?'#69B0FE':null),fontWeight:row.dataType==='小计'||row.dataType==='合计'?'700':null }" v-for="(row, rowIndex) in cdata" :key="rowIndex"
|
|
26
34
|
:class="{ 'zebra-stripe': rowIndex % 2 === 0 }">
|
|
27
35
|
<view class="body-cell" v-for="(col, colIndex) in ccolumns" :key="colIndex"
|
|
@@ -108,10 +116,10 @@
|
|
|
108
116
|
required: false,
|
|
109
117
|
default: 0
|
|
110
118
|
},
|
|
111
|
-
loading: {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
},
|
|
119
|
+
// loading: {
|
|
120
|
+
// type: Boolean,
|
|
121
|
+
// default: false
|
|
122
|
+
// },
|
|
115
123
|
pagination: {
|
|
116
124
|
type: Boolean,
|
|
117
125
|
default: false
|
|
@@ -119,9 +127,9 @@
|
|
|
119
127
|
})
|
|
120
128
|
|
|
121
129
|
const emit = defineEmits(['page-change', 'sort-change'])
|
|
122
|
-
|
|
130
|
+
const loading=ref(false)
|
|
123
131
|
const currentPage = ref(1)
|
|
124
|
-
const bodyHeight = ref(
|
|
132
|
+
const bodyHeight = ref(1000)
|
|
125
133
|
const sortField = ref('')
|
|
126
134
|
const sortOrder = ref('asc')
|
|
127
135
|
const pageData = ref({})
|
|
@@ -179,11 +187,13 @@
|
|
|
179
187
|
}
|
|
180
188
|
|
|
181
189
|
async function getPageData() {
|
|
190
|
+
loading.value=true
|
|
182
191
|
const kres = await getPageKey(sourceId.value, null, query.value)
|
|
183
192
|
reportPageData(kres.data?.key).then((res) => {
|
|
184
193
|
pageData.value = res.data
|
|
185
194
|
data.value = res.data.entities
|
|
186
195
|
columns.value = res.data.columnConfigs
|
|
196
|
+
loading.value=false
|
|
187
197
|
})
|
|
188
198
|
}
|
|
189
199
|
|
|
@@ -258,6 +268,14 @@
|
|
|
258
268
|
width: 100%;
|
|
259
269
|
overflow-x: auto;
|
|
260
270
|
}
|
|
271
|
+
|
|
272
|
+
.enpert{
|
|
273
|
+
|
|
274
|
+
padding: 12px;
|
|
275
|
+
text-align: center;
|
|
276
|
+
font-size: 16px;
|
|
277
|
+
font-weight: 700;
|
|
278
|
+
}
|
|
261
279
|
|
|
262
280
|
.table-body {
|
|
263
281
|
width: max-content;
|