@zscreate/zhxy-app-component 1.0.171 → 1.0.173

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.
Files changed (79) hide show
  1. package/components/DataTable/DataTable.vue +336 -335
  2. package/components/dying318-picker/Demo.vue +342 -342
  3. package/components/dying318-picker/Picker.nvue +441 -441
  4. package/components/dying318-picker/Picker.vue +442 -442
  5. package/components/dying318-picker/Pickers.vue +321 -321
  6. package/components/dying318-picker/README.md +479 -479
  7. package/components/easydrag-sort/easydrag-sort.vue +248 -248
  8. package/components/evan-form/evan-form.vue +102 -102
  9. package/components/evan-form/utils.js +125 -125
  10. package/components/evan-form-item/components/responsibility.vue +128 -128
  11. package/components/evan-form-item/evan-form-item.vue +2005 -2005
  12. package/components/evan-form-item/mixins/computedMixin.js +44 -44
  13. package/components/evan-form-item/mixins/pubSubMixin.js +171 -171
  14. package/components/evan-form-item/mixins/validateByApiMinxins.js +34 -34
  15. package/components/evan-form-item/mixins/validateFormMixin.js +74 -74
  16. package/components/evan-form-item/mixins/valueChangeMixin.js +92 -92
  17. package/components/evan-form-item/utilForForm.js +35 -35
  18. package/components/form-container/css/style_2.less +365 -365
  19. package/components/form-container/data.js +709 -709
  20. package/components/form-container/form-container.vue +1094 -1094
  21. package/components/fullModal/fullModal.vue +92 -92
  22. package/components/jin-edit/jin-edit.vue +327 -327
  23. package/components/jin-edit/jin-icons.vue +48 -48
  24. package/components/jin-edit/readme.md +64 -64
  25. package/components/l-file/l-file.vue +267 -267
  26. package/components/lb-picker/index.vue +300 -300
  27. package/components/m-textarea/m-textarea.vue +88 -88
  28. package/components/rich-editor/assets/iconfont.css +240 -240
  29. package/components/rich-editor/editor.css +46 -46
  30. package/components/rich-editor/index.vue +335 -335
  31. package/components/rich-editor/t-color-picker.vue +786 -786
  32. package/components/signatrue-write/signatrue-write.vue +228 -228
  33. package/components/t-color-picker/t-color-picker.vue +784 -784
  34. package/components/uni-datetime-picker/changelog.md +76 -76
  35. package/components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue +182 -182
  36. package/components/uni-datetime-picker/components/uni-datetime-picker/calendar.js +546 -546
  37. package/components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +1030 -1030
  38. package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json +19 -19
  39. package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js +8 -8
  40. package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json +19 -19
  41. package/components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json +19 -19
  42. package/components/uni-datetime-picker/components/uni-datetime-picker/keypress.js +44 -44
  43. package/components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue +927 -927
  44. package/components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue +966 -966
  45. package/components/uni-datetime-picker/components/uni-datetime-picker/util.js +437 -437
  46. package/components/uni-datetime-picker/components/uni-datetime-picker/year-mont-picker.vue +901 -901
  47. package/components/uni-datetime-picker/components/uni-datetime-picker/year-picker.vue +271 -271
  48. package/components/uni-datetime-picker/package.json +89 -89
  49. package/components/uni-datetime-picker/readme.md +159 -159
  50. package/components/uni-icons/icons.js +96 -96
  51. package/components/uni-icons/uni-icons.vue +57 -57
  52. package/components/uni-popup/message.js +29 -29
  53. package/components/uni-popup/popup.js +25 -25
  54. package/components/uni-popup/uni-popup-dialog.vue +243 -243
  55. package/components/uni-popup/uni-popup-message.vue +116 -116
  56. package/components/uni-popup/uni-popup-share.vue +165 -165
  57. package/components/uni-popup/uni-popup.vue +297 -297
  58. package/components/uni-rate/uni-rate.vue +361 -361
  59. package/components/uni-transition/uni-transition.vue +279 -279
  60. package/components/uploadFile/uploadFile.vue +316 -316
  61. package/components/userSelectByRole/userSelectByRole.vue +210 -210
  62. package/components/viewcomponents/applicateGrid.vue +96 -96
  63. package/components/viewcomponents/card.vue +166 -166
  64. package/components/viewcomponents/formCard.vue +82 -82
  65. package/components/viewcomponents/infocell.vue +122 -122
  66. package/components/viewcomponents/navsearch.vue +59 -59
  67. package/components/viewcomponents/newscontent.vue +85 -85
  68. package/components/xp-picker/util.js +104 -104
  69. package/components/xp-picker/xp-picker.vue +330 -330
  70. package/index.js +9 -9
  71. package/package.json +30 -30
  72. package/static/iconfont.css +32 -32
  73. package/static/uni.css +1449 -1449
  74. package/utils/formula_run.js +1 -1
  75. package/utils/js-interp.js +6501 -6501
  76. package/utils/js-interp.md +10 -10
  77. package/utils/moment.js +4600 -4600
  78. package/utils/util.js +225 -225
  79. package/components/evan-form-item/mixins/commonMixin.js +0 -15
@@ -1,335 +1,336 @@
1
- <template>
2
- <view class="wrap" :style="{ height: widget.options.height * 1.5 + 'rpx' }" v-if="dataModel && dataModel.length > 0">
3
- <!-- @scrolltolower:滚动到底部触发 lower-threshold:距离底部多少距离触发@scrolltolower -->
4
- <scroll-view class="scroll-view_H" scroll-x="true" scroll-y="true" @scrolltolower='scrollBottom' :lower-threshold='0'>
5
- <view class="top" id="top" :style="{ width: tableWidths + 'rpx', 'padding-left': '0rpx' }">
6
- <view class="table-header">
7
- <view v-for="(h, n) in header" :key='n' :class="{ 'header_dyg': true, 'flexs': h.flxe, }"
8
- :style="{ width: h.hWidth + 'rpx' }">
9
- <view v-if="h.columnName !== 'slot'">{{ h.columnName }}</view>
10
- <view v-else>
11
- <u-checkbox-group>
12
- <u-checkbox @change="checkboxChangeAll" v-model="checkedAll" name="all"></u-checkbox>
13
- </u-checkbox-group>
14
- </view>
15
- </view>
16
- </view>
17
- </view>
18
- <view class="bottom" :style="{ maxHeight: (widget.options.height - 70) * 1.5 + 'rpx', width: tableWidths + 'rpx', 'padding-left': '0rpx' }"
19
- v-if="tableData.length > 0">
20
- <view class="tablebox" v-for="(t, s) in tableData" :key='s' @click="jumpDetailed(t)">
21
- <view v-for="(h, n) in header" :key="n"
22
- :class="{ 'table_dyg': true, 'tdColClass': h.bgcolor, 'tdRowClass': t.bgcolor, 'flexs': h.flxe, }"
23
- :style="{ width: h.hWidth + 'rpx' }">
24
- <!-- 不等于操作列就显示文字 -->
25
- <text v-if="h.columnCode !== 'action' && h.columnName !== 'slot'" :style="{ color: getColor(t, h), }">{{
26
- t[h.columnCode] }}</text>
27
- <view v-else-if="h.columnName === 'slot'">
28
- <u-checkbox-group>
29
- <u-checkbox @change="checkboxChange" v-model="t.checked" :name="t[rowKey]"></u-checkbox>
30
- </u-checkbox-group>
31
- </view>
32
- <!-- 操作列显示按钮,后期用插槽 -->
33
- <view class="uni-group" v-else style="background-color: #fff;">
34
- <button class="uni-button" size="mini" type="primary" style="margin-right: 5px;"
35
- @click="editTable(t)">编辑</button>
36
- <button class="uni-button" size="mini" type="warn" @click="deleteTable(t)">删除</button>
37
- </view>
38
- </view>
39
- </view>
40
- </view>
41
- </scroll-view>
42
- <view class="empty" v-if="tableData.length == 0">
43
- <!-- <image src="../../static/images/empty.png" style="width: 90vw;height: 400rpx;margin: 50rpx 20rpx;" /> -->
44
- <view class="empty-text" style="text-align: center;width: 100%;">暂无数据</view>
45
- </view>
46
- </view>
47
- </template>
48
-
49
- <script>
50
- // 表头配置:flxe(固定列),bgcolor(列底纹)
51
- // 表体配置:bgcolor(行底纹)
52
- export default {
53
- props: {
54
- dataModel: {
55
- type: [Array, String],
56
- required: true,
57
- default: function () {
58
- return [];
59
- }
60
- },
61
- widget: {
62
- type: Object,
63
- required: true,
64
- default: function () {
65
- return {};
66
- }
67
- },
68
- },
69
- data() {
70
- return {
71
- //表体
72
- tableData: [],
73
- //表头
74
- header: [],
75
- // 表格总长度
76
- tableWidths: 0,
77
- // 全选
78
- checkedAll: false,
79
- flxed: false,
80
- isAll: false,
81
- seletedData: []
82
- }
83
- },
84
- watch: {
85
- // 监听列表
86
- dataModel: {
87
- async handler(a, b) {
88
- console.log(a, b);
89
- if(a && a.length > 0) {
90
- await this.getColumsList(this.widget.options.defaultSQL.querySql)
91
- this.tableData = a
92
- if (!this.header.some(item => item.hWidth)) this.tableWidth()
93
- }
94
- },
95
- deep: true
96
- },
97
- },
98
- created() {
99
- },
100
- methods: {
101
- // 获取表头
102
- getColumsList(id) {
103
- this.$u.get('/dataset/getDatasetColumns', { id }).then(res => {
104
- if (!res.success) return
105
- this.header = res.result ? res.result : []
106
- if (!this.header.some(item => item.hWidth)) this.tableWidth()
107
- })
108
- },
109
- // 重置复选框
110
- reseChecked() {
111
- let obj = this.tableData[0]
112
- obj.checked = false
113
- this.$set(this.tableData, 0, obj);
114
- this.checkedAll = false
115
- this.$emit('isSelectAll', false);
116
- },
117
- // 单选
118
- checkboxChange(e) {
119
- let idx = this.tableData.findIndex(item => item[this.rowKey] === e.name)
120
- let obj = this.tableData[idx]
121
- obj.checked = e.value
122
- this.$set(this.tableData, idx, obj)
123
- if (!e.value && !this.tableData.every(item => item.checked)) this.checkedAll = false
124
- if (e.value && this.tableData.every(item => item.checked)) this.checkedAll = true
125
- },
126
- // 全选
127
- checkboxChangeAll(e) {
128
- if (e.value) {
129
- this.tableData.forEach(item => item.checked = true)
130
- this.$emit('isSelectAll', true);
131
- } else {
132
- this.tableData.forEach(item => item.checked = false)
133
- this.$emit('isSelectAll', false);
134
- }
135
- },
136
- // 返回行数据
137
- jumpDetailed(row) {
138
- this.$emit('rowData', row)
139
- },
140
- // 颜色对比
141
- getColor(row, col) {
142
- let color = 'black'
143
- // 传值给父组件,通过父组件的方法内计算判断当前单元格数据是否需要标红,然后通过回调函数,返回一个color值来渲染
144
- this.$emit('getTextColor', row, col, val => {
145
- color = val
146
- })
147
- return color
148
- },
149
- // 修改按钮
150
- editTable(val) {
151
- this.$emit('getEdit', val)
152
- },
153
- // 删除按钮
154
- deleteTable(val) {
155
- this.$emit('getDelete', val)
156
- },
157
- // 计算单元格宽度
158
- tableWidth() {
159
- let w = 0
160
- this.header.forEach((item, index) => {
161
- item['hWidth'] = this.replaceSpecialCharacters(item.columnName) * 40
162
- if (this.tableData.length > 0) {
163
- this.tableData.forEach((info, index) => {
164
- if (info[item.columnCode] && info[item.columnCode].length > item.columnName.length) {
165
- item['hWidth'] = this.replaceSpecialCharacters(info[item.columnCode]) * 40
166
- }
167
- })
168
- }
169
- w += item['hWidth'] //叠加表格总长度
170
- })
171
- this.tableWidths = w //给表格赋值总长度
172
- console.log(this.header);
173
- },
174
- // 替换特殊字符
175
- replaceSpecialCharacters(str) {
176
- let chineseCount = 0;
177
- let englishCount = 0;
178
- let digitCount = 0;
179
- for (let i = 0; i < str.length; i++) {
180
- const char = str[i];
181
- if (this.isChineseCharacter(char)) {
182
- chineseCount++;
183
- } else if (this.isEnglishCharacter(char)) {
184
- englishCount++;
185
- } else if (this.isDigit(char)) {
186
- digitCount++;
187
- }
188
- }
189
- return chineseCount + ((englishCount + digitCount) * 0.5)
190
- },
191
- isChineseCharacter(char) {
192
- // 使用 Unicode 范围判断是否为中文字符
193
- return /^[\u4e00-\u9fff]$/.test(char);
194
- },
195
- isEnglishCharacter(char) {
196
- // 使用正则表达式判断是否为英文字符
197
- return /^[a-zA-Z]$/.test(char);
198
- },
199
- isDigit(char) {
200
- // 使用正则表达式判断是否为数字字符
201
- return /^[0-9]$/.test(char);
202
- },
203
- }
204
- }
205
- </script>
206
-
207
- <style lang="less" scoped>
208
- /deep/ .u-checkbox__label {
209
- display: none !important;
210
- }
211
-
212
- /deep/ .uni-scroll-view-content {
213
- overflow-x: scroll;
214
-
215
- }
216
-
217
- .wrap {
218
- width: 100%;
219
-
220
- .empty {
221
- // margin: 200rpx 50rpx;
222
- }
223
- }
224
-
225
- // 表头
226
- .top {
227
- position: sticky; //表头向上滚动时固定住
228
- top: 0;
229
- //width: 750px; //左右滚动时不会把固定的表头滚动走
230
- z-index: 100; //滑动时表头不被覆盖
231
-
232
- .table-header {
233
- display: flex;
234
- overflow: visible;
235
-
236
- .flxed {
237
- // position: fixed;
238
- position: sticky;
239
- // top: 0;
240
- left: 0;
241
- border-left: 1px solid #ccc;
242
- }
243
-
244
- // .header_dyg:nth-child(2) {
245
- // padding-left: 90rpx;
246
- // }
247
- .header_dyg:first-child {
248
- border-left: 1px solid #ccc;
249
- }
250
-
251
- .header_dyg {
252
- height: 40px;
253
- text-align: center;
254
- line-height: 40px;
255
- border-top: 1px solid #ccc;
256
- border-right: 1px solid #ccc;
257
- border-bottom: 1px solid #ccc;
258
- padding: 0 5px;
259
- background-color: #f5f5f6;
260
- white-space: nowrap;
261
- overflow: hidden;
262
- text-overflow: ellipsis;
263
- font-size: 14px;
264
- font-weight: bold;
265
- color: #2b2b2b;
266
- flex-shrink: 0;
267
- }
268
-
269
- // 列定位固定单元格
270
- .flexs {
271
- position: absolute;
272
- left: 0;
273
- background-color: #f5f5f6;
274
- z-index: 10;
275
- }
276
- }
277
-
278
-
279
- }
280
-
281
-
282
- // 表格列表
283
- .bottom {
284
- // overflow-y: scroll;
285
- // padding-left: 77rpx;
286
-
287
- .tablebox {
288
- display: flex;
289
- font-size: 14px;
290
- overflow: visible;
291
-
292
- .flxed {
293
- position: sticky;
294
- left: 0;
295
- border-left: 1px solid #ccc;
296
- background-color: #fff;
297
- }
298
- .table_dyg:first-child {
299
- border-left: 1px solid #ccc;
300
- }
301
- .table_dyg {
302
- height: 30px;
303
- text-align: center;
304
- line-height: 30px;
305
- white-space: nowrap;
306
- overflow: hidden;
307
- text-overflow: ellipsis;
308
- border-right: 1px solid #ccc;
309
- border-bottom: 1px solid #ccc;
310
- padding: 0 5px;
311
- flex-shrink: 0;
312
- }
313
-
314
- // 列定位固定单元格
315
- .flexs {
316
- position: absolute;
317
- left: 0;
318
- background-color: #fff;
319
- z-index: 10;
320
- }
321
- }
322
- }
323
-
324
- // 列的颜色
325
- .tdColClass {
326
- background-color: #d9edf7;
327
- }
328
-
329
- // 行的颜色
330
- .tdRowClass {
331
- background-color: #afdfe4;
332
- }
333
- </style>
334
-
335
-
1
+ <template>
2
+ <view class="wrap" :style="{ height: widget.options.height * 1.5 + 'rpx' }" v-if="dataModel && dataModel.length > 0">
3
+ <!-- @scrolltolower:滚动到底部触发 lower-threshold:距离底部多少距离触发@scrolltolower -->
4
+ <view style="overflow: auto;">
5
+ <view class="top" id="top" :style="{ width: tableWidths + 'rpx', 'padding-left': '0rpx' }">
6
+ <view class="table-header-data">
7
+ <view v-for="(h, n) in header" :key='n' :class="{ 'header_dyg': true, 'flexs': h.flxe, }"
8
+ :style="{ width: h.hWidth + 'rpx' }">
9
+ <view v-if="h.columnName !== 'slot'">{{ h.columnName }}</view>
10
+ <view v-else>
11
+ <u-checkbox-group>
12
+ <u-checkbox @change="checkboxChangeAll" v-model="checkedAll" name="all"></u-checkbox>
13
+ </u-checkbox-group>
14
+ </view>
15
+ </view>
16
+ </view>
17
+ </view>
18
+ <view class="bottom" :style="{ maxHeight: (widget.options.height - 70) * 1.5 + 'rpx', width: tableWidths + 'rpx', 'padding-left': '0rpx' }"
19
+ v-if="tableData.length > 0">
20
+ <view class="tablebox" v-for="(t, s) in tableData" :key='s' @click="jumpDetailed(t)">
21
+ <view v-for="(h, n) in header" :key="n"
22
+ :class="{ 'table_dyg': true, 'tdColClass': h.bgcolor, 'tdRowClass': t.bgcolor, 'flexs': h.flxe, }"
23
+ :style="{ width: h.hWidth + 'rpx' }">
24
+ <!-- 不等于操作列就显示文字 -->
25
+ <text v-if="h.columnCode !== 'action' && h.columnName !== 'slot'" :style="{ color: getColor(t, h), }">{{
26
+ t[h.columnCode] }}</text>
27
+ <view v-else-if="h.columnName === 'slot'">
28
+ <u-checkbox-group>
29
+ <u-checkbox @change="checkboxChange" v-model="t.checked" :name="t[rowKey]"></u-checkbox>
30
+ </u-checkbox-group>
31
+ </view>
32
+ <!-- 操作列显示按钮,后期用插槽 -->
33
+ <view class="uni-group" v-else style="background-color: #fff;">
34
+ <button class="uni-button" size="mini" type="primary" style="margin-right: 5px;"
35
+ @click="editTable(t)">编辑</button>
36
+ <button class="uni-button" size="mini" type="warn" @click="deleteTable(t)">删除</button>
37
+ </view>
38
+ </view>
39
+ </view>
40
+ </view>
41
+ </view>
42
+ <view class="empty" v-if="tableData.length == 0">
43
+ <!-- <image src="../../static/images/empty.png" style="width: 90vw;height: 400rpx;margin: 50rpx 20rpx;" /> -->
44
+ <view class="empty-text" style="text-align: center;width: 100%;">暂无数据</view>
45
+ </view>
46
+ </view>
47
+ </template>
48
+
49
+ <script>
50
+ // 表头配置:flxe(固定列),bgcolor(列底纹)
51
+ // 表体配置:bgcolor(行底纹)
52
+ export default {
53
+ props: {
54
+ dataModel: {
55
+ type: [Array, String],
56
+ required: true,
57
+ default: function () {
58
+ return [];
59
+ }
60
+ },
61
+ widget: {
62
+ type: Object,
63
+ required: true,
64
+ default: function () {
65
+ return {};
66
+ }
67
+ },
68
+ },
69
+ data() {
70
+ return {
71
+ //表体
72
+ tableData: [],
73
+ //表头
74
+ header: [],
75
+ // 表格总长度
76
+ tableWidths: 0,
77
+ // 全选
78
+ checkedAll: false,
79
+ flxed: false,
80
+ isAll: false,
81
+ seletedData: []
82
+ }
83
+ },
84
+ watch: {
85
+ // 监听列表
86
+ dataModel: {
87
+ async handler(a, b) {
88
+ console.log(a, b);
89
+ if(a && a.length > 0) {
90
+ await this.getColumsList(this.widget.options.defaultSQL.querySql)
91
+ this.tableData = a
92
+ if (!this.header.some(item => item.hWidth)) this.tableWidth()
93
+ }
94
+ },
95
+ deep: true,
96
+ immediate: true,
97
+ },
98
+ },
99
+ created() {
100
+ },
101
+ methods: {
102
+ // 获取表头
103
+ getColumsList(id) {
104
+ this.$u.get('/dataset/getDatasetColumns', { id }).then(res => {
105
+ if (!res.success) return
106
+ this.header = res.result ? res.result : []
107
+ if (!this.header.some(item => item.hWidth)) this.tableWidth()
108
+ })
109
+ },
110
+ // 重置复选框
111
+ reseChecked() {
112
+ let obj = this.tableData[0]
113
+ obj.checked = false
114
+ this.$set(this.tableData, 0, obj);
115
+ this.checkedAll = false
116
+ this.$emit('isSelectAll', false);
117
+ },
118
+ // 单选
119
+ checkboxChange(e) {
120
+ let idx = this.tableData.findIndex(item => item[this.rowKey] === e.name)
121
+ let obj = this.tableData[idx]
122
+ obj.checked = e.value
123
+ this.$set(this.tableData, idx, obj)
124
+ if (!e.value && !this.tableData.every(item => item.checked)) this.checkedAll = false
125
+ if (e.value && this.tableData.every(item => item.checked)) this.checkedAll = true
126
+ },
127
+ // 全选
128
+ checkboxChangeAll(e) {
129
+ if (e.value) {
130
+ this.tableData.forEach(item => item.checked = true)
131
+ this.$emit('isSelectAll', true);
132
+ } else {
133
+ this.tableData.forEach(item => item.checked = false)
134
+ this.$emit('isSelectAll', false);
135
+ }
136
+ },
137
+ // 返回行数据
138
+ jumpDetailed(row) {
139
+ this.$emit('rowData', row)
140
+ },
141
+ // 颜色对比
142
+ getColor(row, col) {
143
+ let color = 'black'
144
+ // 传值给父组件,通过父组件的方法内计算判断当前单元格数据是否需要标红,然后通过回调函数,返回一个color值来渲染
145
+ this.$emit('getTextColor', row, col, val => {
146
+ color = val
147
+ })
148
+ return color
149
+ },
150
+ // 修改按钮
151
+ editTable(val) {
152
+ this.$emit('getEdit', val)
153
+ },
154
+ // 删除按钮
155
+ deleteTable(val) {
156
+ this.$emit('getDelete', val)
157
+ },
158
+ // 计算单元格宽度
159
+ tableWidth() {
160
+ let w = 0
161
+ this.header.forEach((item, index) => {
162
+ item['hWidth'] = this.replaceSpecialCharacters(item.columnName) * 40
163
+ if (this.tableData.length > 0) {
164
+ this.tableData.forEach((info, index) => {
165
+ if (info[item.columnCode] && info[item.columnCode].length > item.columnName.length) {
166
+ item['hWidth'] = this.replaceSpecialCharacters(info[item.columnCode]) * 40
167
+ }
168
+ })
169
+ }
170
+ w += item['hWidth'] //叠加表格总长度
171
+ })
172
+ this.tableWidths = w //给表格赋值总长度
173
+ console.log(this.header);
174
+ },
175
+ // 替换特殊字符
176
+ replaceSpecialCharacters(str) {
177
+ let chineseCount = 0;
178
+ let englishCount = 0;
179
+ let digitCount = 0;
180
+ for (let i = 0; i < str.length; i++) {
181
+ const char = str[i];
182
+ if (this.isChineseCharacter(char)) {
183
+ chineseCount++;
184
+ } else if (this.isEnglishCharacter(char)) {
185
+ englishCount++;
186
+ } else if (this.isDigit(char)) {
187
+ digitCount++;
188
+ }
189
+ }
190
+ return chineseCount + ((englishCount + digitCount) * 0.5)
191
+ },
192
+ isChineseCharacter(char) {
193
+ // 使用 Unicode 范围判断是否为中文字符
194
+ return /^[\u4e00-\u9fff]$/.test(char);
195
+ },
196
+ isEnglishCharacter(char) {
197
+ // 使用正则表达式判断是否为英文字符
198
+ return /^[a-zA-Z]$/.test(char);
199
+ },
200
+ isDigit(char) {
201
+ // 使用正则表达式判断是否为数字字符
202
+ return /^[0-9]$/.test(char);
203
+ },
204
+ }
205
+ }
206
+ </script>
207
+
208
+ <style lang="less" scoped>
209
+ /deep/ .u-checkbox__label {
210
+ display: none !important;
211
+ }
212
+
213
+ /deep/ .uni-scroll-view-content {
214
+ overflow-x: scroll;
215
+
216
+ }
217
+
218
+ .wrap {
219
+ width: 100%;
220
+
221
+ .empty {
222
+ // margin: 200rpx 50rpx;
223
+ }
224
+ }
225
+
226
+ // 表头
227
+ .top {
228
+ position: sticky; //表头向上滚动时固定住
229
+ top: 0;
230
+ //width: 750px; //左右滚动时不会把固定的表头滚动走
231
+ z-index: 100; //滑动时表头不被覆盖
232
+
233
+ .table-header-data{
234
+ display: flex;
235
+ overflow: visible;
236
+
237
+ .flxed {
238
+ // position: fixed;
239
+ position: sticky;
240
+ // top: 0;
241
+ left: 0;
242
+ border-left: 1px solid #ccc;
243
+ }
244
+
245
+ // .header_dyg:nth-child(2) {
246
+ // padding-left: 90rpx;
247
+ // }
248
+ .header_dyg:first-child {
249
+ border-left: 1px solid #ccc;
250
+ }
251
+
252
+ .header_dyg {
253
+ height: 40px;
254
+ text-align: center;
255
+ line-height: 40px;
256
+ border-top: 1px solid #ccc;
257
+ border-right: 1px solid #ccc;
258
+ border-bottom: 1px solid #ccc;
259
+ padding: 0 5px;
260
+ background-color: #f5f5f6;
261
+ white-space: nowrap;
262
+ overflow: hidden;
263
+ text-overflow: ellipsis;
264
+ font-size: 14px;
265
+ font-weight: bold;
266
+ color: #2b2b2b;
267
+ flex-shrink: 0;
268
+ }
269
+
270
+ // 列定位固定单元格
271
+ .flexs {
272
+ position: absolute;
273
+ left: 0;
274
+ background-color: #f5f5f6;
275
+ z-index: 10;
276
+ }
277
+ }
278
+
279
+
280
+ }
281
+
282
+
283
+ // 表格列表
284
+ .bottom {
285
+ // overflow-y: scroll;
286
+ // padding-left: 77rpx;
287
+
288
+ .tablebox {
289
+ display: flex;
290
+ font-size: 14px;
291
+ overflow: visible;
292
+
293
+ .flxed {
294
+ position: sticky;
295
+ left: 0;
296
+ border-left: 1px solid #ccc;
297
+ background-color: #fff;
298
+ }
299
+ .table_dyg:first-child {
300
+ border-left: 1px solid #ccc;
301
+ }
302
+ .table_dyg {
303
+ height: 30px;
304
+ text-align: center;
305
+ line-height: 30px;
306
+ white-space: nowrap;
307
+ overflow: hidden;
308
+ text-overflow: ellipsis;
309
+ border-right: 1px solid #ccc;
310
+ border-bottom: 1px solid #ccc;
311
+ padding: 0 5px;
312
+ flex-shrink: 0;
313
+ }
314
+
315
+ // 列定位固定单元格
316
+ .flexs {
317
+ position: absolute;
318
+ left: 0;
319
+ background-color: #fff;
320
+ z-index: 10;
321
+ }
322
+ }
323
+ }
324
+
325
+ // 列的颜色
326
+ .tdColClass {
327
+ background-color: #d9edf7;
328
+ }
329
+
330
+ // 行的颜色
331
+ .tdRowClass {
332
+ background-color: #afdfe4;
333
+ }
334
+ </style>
335
+
336
+