bl-common-vue3 3.8.88 → 3.8.90

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,6 +1,6 @@
1
1
  {
2
2
  "name": "bl-common-vue3",
3
- "version": "3.8.88",
3
+ "version": "3.8.90",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "description": "bailing vue3 common components lib",
@@ -6,35 +6,11 @@
6
6
  :style="{ marginBottom: isTitleCollapsed ? '10px' : '0' }">
7
7
  <div class="visitoeTitleText">
8
8
  <span v-for="(filter, filterIndex) in filterParams" :key="filterIndex">
9
- <a-tag
10
- v-if="
11
- (filter?.input_type == 'input' ||
12
- filter?.input_type == 'inputNumber' ||
13
- filter?.input_type == 'datePicker' ||
14
- filter?.input_type == 'dateTimePicker' ||
15
- filter?.input_type == 'timePicker') &&
16
- (filter?.value || filter?.value === 0)
17
- "
18
- color="blue"
19
- closable
20
- @close.prevent="closeTages(filter?.field)"
21
- style="margin-bottom: 5px">
22
- {{ filter?.label }}:{{ filter?.value }}
9
+ <a-tag v-if="(['input', 'inputNumber', 'datePicker', 'dateTimePicker', 'timePicker'].includes(filter?.input_type)) && (filter?.value || filter?.value === 0)" color="blue" closable @close.prevent="closeTages(filter?.field)" style="margin-bottom: 5px;">
10
+ {{ filter?.label }}:{{ isFormatFilterTagValueShow(filter) ? formatFilterTagValueShow(filter) : filter?.value ? filter?.value : '' }}
23
11
  </a-tag>
24
- <a-tag
25
- v-if="
26
- (filter?.input_type == 'dateRangePicker' ||
27
- filter?.input_type == 'dateTimeRangePicker' ||
28
- filter?.input_type == 'timeRangePicker' ||
29
- filter?.input_type == 'numberRange') &&
30
- filter?.value &&
31
- filter?.value.length > 0
32
- "
33
- color="blue"
34
- closable
35
- @close.prevent="closeTages(filter?.field)"
36
- style="margin-bottom: 5px">
37
- {{ filter?.label }}:{{ filter?.value[0] }} ~ {{ filter?.value[1] }}
12
+ <a-tag v-if="(['dateRangePicker', 'dateTimeRangePicker', 'timeRangePicker', 'numberRange'].includes(filter?.input_type)) && filter?.value && filter?.value.length > 0" color="blue" closable @close.prevent="closeTages(filter?.field)" style="margin-bottom: 5px;">
13
+ {{ filter?.label }}:{{ isFormatFilterTagValueShow(filter) ? formatFilterTagValueShow(filter) : filter?.value.join(' ~ ') }}
38
14
  </a-tag>
39
15
  <a-tag
40
16
  v-if="
@@ -4038,6 +4014,44 @@ export default defineComponent({
4038
4014
  return temDataSource;
4039
4015
  });
4040
4016
 
4017
+ // 筛选条件标签文本
4018
+ const singleDateInputTypes = ['datePicker', 'dateTimePicker', 'timePicker'];
4019
+ const rangeDateInputTypes = ['dateRangePicker', 'dateTimeRangePicker', 'timeRangePicker'];
4020
+ const formatFilterTagValueShow = computed(() => {
4021
+ return (filter) => {
4022
+ if (!filter) return '';
4023
+ const { input_type, value, label, field } = filter;
4024
+ let valueShow = "";
4025
+ let dateFormatMaps = utils.getBasicConfigI18n()?.datetime || {}
4026
+ let inputTypeFormatMaps = {
4027
+ 'datePicker': 'date',
4028
+ 'dateTimePicker': 'date_time',
4029
+ 'timePicker': 'time',
4030
+ 'dateRangePicker': 'date',
4031
+ 'dateTimeRangePicker': 'date_time',
4032
+ 'timeRangePicker': 'time',
4033
+ }
4034
+
4035
+ if(singleDateInputTypes.includes(input_type)) {
4036
+ valueShow = dateFormatMaps[inputTypeFormatMaps[input_type]]?dayjs(value).format(dateFormatMaps[inputTypeFormatMaps[input_type]]):value
4037
+ }
4038
+ if(rangeDateInputTypes.includes(input_type)) {
4039
+ valueShow = dateFormatMaps[inputTypeFormatMaps[input_type]]?value.map(item => dayjs(item).format(dateFormatMaps[inputTypeFormatMaps[input_type]])).join(' ~ '):value.join(' ~ ')
4040
+ }
4041
+ return valueShow;
4042
+ }
4043
+ });
4044
+
4045
+ // 筛选条件标签显示value是否需要格式化
4046
+ const isFormatFilterTagValueShow = computed(() => {
4047
+ return (filter) => {
4048
+ if (!filter) return false;
4049
+ const { input_type } = filter;
4050
+ if(!input_type) return false;
4051
+ return singleDateInputTypes.includes(input_type) || rangeDateInputTypes.includes(input_type)
4052
+ }
4053
+ })
4054
+
4041
4055
  return {
4042
4056
  ...toRefs(state),
4043
4057
  localPagination,
@@ -4127,6 +4141,8 @@ export default defineComponent({
4127
4141
  isSecurityRowOn,
4128
4142
  shouldShowSecurityRowBtn,
4129
4143
  shouldShowSecurityHeaderBtn,
4144
+ formatFilterTagValueShow,
4145
+ isFormatFilterTagValueShow,
4130
4146
  };
4131
4147
  },
4132
4148
  });
@@ -22,7 +22,8 @@
22
22
  >
23
23
  <template #column-action="{ record }">
24
24
  <div v-if="record.is_system == 1">
25
- <a-tooltip>
25
+ <a-button @click="handleEdit(record)" type="link" v-if="record?.can_edit">{{t('common.button.edit')}}</a-button>
26
+ <a-tooltip v-else>
26
27
  <template #title>{{t('villageIotInfo.index.885385-0')}}</template>
27
28
  <a-button disabled type="link">{{t('common.button.edit')}}</a-button>
28
29
  </a-tooltip>
@@ -486,7 +486,7 @@ export default defineComponent({
486
486
  .title-image {
487
487
  width: 100%;
488
488
  height: 150px;
489
- background: url("https://app.kuaijingai.com/public_h5/static/images/contact/userTopBg.png")
489
+ background: url("/public_h5/static/images/contact/userTopBg.png")
490
490
  no-repeat;
491
491
  background-size: 100% 150%;
492
492
  background-position-y: -50px;
@@ -5,7 +5,7 @@ export default {
5
5
  "common.button.export": "匯出",
6
6
  "common.button.import": "導入",
7
7
  "common.button.search": "蒐索",
8
- "common.button.reset": "重置",
8
+ "common.button.reset": "重設",
9
9
  "common.button.more": "更多",
10
10
  "common.switch.open": "開啟",
11
11
  "common.switch.close": "關閉",
@@ -5,7 +5,7 @@ export default {
5
5
  "common.button.export": "匯出",
6
6
  "common.button.import": "導入",
7
7
  "common.button.search": "搜尋",
8
- "common.button.reset": "重置",
8
+ "common.button.reset": "重設",
9
9
  "common.button.more": "更多",
10
10
  "common.switch.open": "開啟",
11
11
  "common.switch.close": "關閉",
@@ -10,7 +10,7 @@
10
10
  "CustomTable.index.074786-8": "起數",
11
11
  "CustomTable.index.074786-9": "至數",
12
12
  "CustomTable.index.074786-13": "加載中…",
13
- "CustomTable.index.074786-14": "刷新",
13
+ "CustomTable.index.074786-14": "重新整理",
14
14
  "CustomTable.index.074786-15": "導入數據",
15
15
  "CustomTable.index.074786-16": "匯出數據",
16
16
  "CustomTable.index.074786-17": "字典設定",
@@ -132,7 +132,7 @@
132
132
  "CustomImport.index.951685-1": "點擊或將檔案拖拽到這裡上傳",
133
133
  "CustomImport.index.951685-2": "支持副檔名:{0}",
134
134
  "CustomImport.index.951685-4": "導入錯誤",
135
- "CustomImport.index.951685-5": "有誤條數:{0}",
135
+ "CustomImport.index.951685-5": "有誤筆數:{0}",
136
136
  "CustomImport.index.951685-6": "請下載迴響檔案,導入結果可以幫助您更快鎖定問題",
137
137
  "CustomImport.index.951685-7": "下載檔案",
138
138
  "CustomImport.index.951685-8": "返回",
@@ -305,11 +305,11 @@
305
305
  "UserDetail.index.833219-3": "信箱",
306
306
  "UserDetail.index.833219-4": "工號",
307
307
  "UserDetail.index.833219-5": "職位",
308
- "ViewEnergyList.index.921424-0": "刷新",
308
+ "ViewEnergyList.index.921424-0": "重新整理",
309
309
  "ViewEnergyList.index.921424-1": "如需要綁定其他錶請前往對應的錶應用新增錶資訊並綁定房間。",
310
310
  "ViewEnergyList.index.921424-3": "讀錶",
311
311
  "ViewEnergyList.index.921424-4": "抄表",
312
- "ViewEnergyList.index.921424-6": "確定重置該{0}嗎?",
312
+ "ViewEnergyList.index.921424-6": "確定重設該{0}嗎?",
313
313
  "ViewEnergyList.index.921424-8": "提醒",
314
314
  "ViewEnergyList.index.921424-9": "當前未綁定水電價格標準,請新增對應位置的價格標準後再進行抄表",
315
315
  "ViewEnergyList.index.921424-10": "知道了",
@@ -384,8 +384,8 @@
384
384
  "components.ImportResult.699608-0": "導入結果",
385
385
  "components.ImportResult.699608-1": "導入出錯",
386
386
  "components.ImportResult.699608-2": "導入成功",
387
- "components.ImportResult.699608-3": "成功條數:",
388
- "components.ImportResult.699608-4": "失敗條數:",
387
+ "components.ImportResult.699608-3": "成功筆數:",
388
+ "components.ImportResult.699608-4": "失敗筆數:",
389
389
  "components.ImportResult.699608-5": "下載導入結果",
390
390
  "village.translate.292926-0": "數據遷移",
391
391
  "village.translate.292926-1": "數據遷移至",
@@ -10,7 +10,7 @@
10
10
  "CustomTable.index.074786-8": "起數",
11
11
  "CustomTable.index.074786-9": "至數",
12
12
  "CustomTable.index.074786-13": "加載中…",
13
- "CustomTable.index.074786-14": "刷新",
13
+ "CustomTable.index.074786-14": "重新整理",
14
14
  "CustomTable.index.074786-15": "導入數據",
15
15
  "CustomTable.index.074786-16": "匯出數據",
16
16
  "CustomTable.index.074786-17": "字典設定",
@@ -132,7 +132,7 @@
132
132
  "CustomImport.index.951685-1": "點擊或將檔案拖拽到這裡上傳",
133
133
  "CustomImport.index.951685-2": "支持副檔名:{0}",
134
134
  "CustomImport.index.951685-4": "導入錯誤",
135
- "CustomImport.index.951685-5": "有誤條數:{0}",
135
+ "CustomImport.index.951685-5": "有誤筆數:{0}",
136
136
  "CustomImport.index.951685-6": "請下載迴響檔案,導入結果可以幫助您更快鎖定問題",
137
137
  "CustomImport.index.951685-7": "下載檔案",
138
138
  "CustomImport.index.951685-8": "返回",
@@ -305,11 +305,11 @@
305
305
  "UserDetail.index.833219-3": "郵箱",
306
306
  "UserDetail.index.833219-4": "工號",
307
307
  "UserDetail.index.833219-5": "職位",
308
- "ViewEnergyList.index.921424-0": "刷新",
308
+ "ViewEnergyList.index.921424-0": "重新整理",
309
309
  "ViewEnergyList.index.921424-1": "如需要綁定其他錶請前往對應的錶應用添加錶資訊並綁定房間。",
310
310
  "ViewEnergyList.index.921424-3": "讀錶",
311
311
  "ViewEnergyList.index.921424-4": "抄表",
312
- "ViewEnergyList.index.921424-6": "確定重置該{0}嗎?",
312
+ "ViewEnergyList.index.921424-6": "確定重設該{0}嗎?",
313
313
  "ViewEnergyList.index.921424-8": "提醒",
314
314
  "ViewEnergyList.index.921424-9": "當前未綁定水電價格標準,請添加對應位置的價格標準後再進行抄表",
315
315
  "ViewEnergyList.index.921424-10": "知道了",