af-mobile-client-vue3 1.3.73 → 1.3.75
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
|
@@ -838,7 +838,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
838
838
|
<div v-for="(column) in mainColumns" :key="`main_${column.dataIndex}`" class="main-title">
|
|
839
839
|
<p
|
|
840
840
|
class="card_item_title"
|
|
841
|
-
:style="handleFunctionStyle(column.
|
|
841
|
+
:style="handleFunctionStyle(column.styleFunctionForTitle, item)"
|
|
842
842
|
:class="{ 'selectable-title': isMultiSelectMode }"
|
|
843
843
|
@click="handleTitleClick(item, $event)"
|
|
844
844
|
>
|
|
@@ -854,7 +854,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
854
854
|
<div v-for="(column) in subTitleColumns" :key="`subtitle_${column.dataIndex}`" class="sub-title">
|
|
855
855
|
<p
|
|
856
856
|
class="card_item_subtitle"
|
|
857
|
-
:style="handleFunctionStyle(column.
|
|
857
|
+
:style="handleFunctionStyle(column.styleFunctionForTitle, item)"
|
|
858
858
|
>
|
|
859
859
|
<XBadge
|
|
860
860
|
:style="handleFunctionStyle(column.styleFunctionForValue, item)"
|
|
@@ -882,7 +882,9 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
882
882
|
<VanRow gutter="20" class="card_item_details" @click="handleCardClick(item, $event)">
|
|
883
883
|
<VanCol v-for="column of detailColumns" :key="`details_${column.dataIndex}`" :span="column.span">
|
|
884
884
|
<p>
|
|
885
|
-
|
|
885
|
+
<span :style="handleFunctionStyle(column.styleFunctionForTitle, item)">
|
|
886
|
+
{{ (column.showLabel === undefined || column.showLabel) ? `${column.title}: ` : '' }}
|
|
887
|
+
</span>
|
|
886
888
|
<XBadge
|
|
887
889
|
:style="handleFunctionStyle(column.styleFunctionForValue, item)"
|
|
888
890
|
:dict-name="column.dictName"
|
package/src/utils/timeUtil.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
// 时间工具:提供简单的日期时间格式化
|
|
2
|
-
|
|
3
|
-
export function pad2(num: number): string {
|
|
4
|
-
return num < 10 ? `0${num}` : `${num}`
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 按照简单占位符格式化当前时间
|
|
9
|
-
* 支持占位:YYYY MM DD HH mm ss
|
|
10
|
-
* @param format 默认 'YYYY-MM-DD HH:mm:ss'
|
|
11
|
-
*/
|
|
12
|
-
export function formatNow(format: string = 'YYYY-MM-DD HH:mm:ss'): string {
|
|
13
|
-
const d = new Date()
|
|
14
|
-
const map: Record<string, string> = {
|
|
15
|
-
YYYY: `${d.getFullYear()}`,
|
|
16
|
-
MM: pad2(d.getMonth() + 1),
|
|
17
|
-
DD: pad2(d.getDate()),
|
|
18
|
-
HH: pad2(d.getHours()),
|
|
19
|
-
mm: pad2(d.getMinutes()),
|
|
20
|
-
ss: pad2(d.getSeconds()),
|
|
21
|
-
}
|
|
22
|
-
let out = format
|
|
23
|
-
Object.keys(map).forEach((k) => {
|
|
24
|
-
out = out.replace(new RegExp(k, 'g'), map[k])
|
|
25
|
-
})
|
|
26
|
-
return out
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
// 时间工具:提供简单的日期时间格式化
|
|
2
|
+
|
|
3
|
+
export function pad2(num: number): string {
|
|
4
|
+
return num < 10 ? `0${num}` : `${num}`
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 按照简单占位符格式化当前时间
|
|
9
|
+
* 支持占位:YYYY MM DD HH mm ss
|
|
10
|
+
* @param format 默认 'YYYY-MM-DD HH:mm:ss'
|
|
11
|
+
*/
|
|
12
|
+
export function formatNow(format: string = 'YYYY-MM-DD HH:mm:ss'): string {
|
|
13
|
+
const d = new Date()
|
|
14
|
+
const map: Record<string, string> = {
|
|
15
|
+
YYYY: `${d.getFullYear()}`,
|
|
16
|
+
MM: pad2(d.getMonth() + 1),
|
|
17
|
+
DD: pad2(d.getDate()),
|
|
18
|
+
HH: pad2(d.getHours()),
|
|
19
|
+
mm: pad2(d.getMinutes()),
|
|
20
|
+
ss: pad2(d.getSeconds()),
|
|
21
|
+
}
|
|
22
|
+
let out = format
|
|
23
|
+
Object.keys(map).forEach((k) => {
|
|
24
|
+
out = out.replace(new RegExp(k, 'g'), map[k])
|
|
25
|
+
})
|
|
26
|
+
return out
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
@@ -9,10 +9,10 @@ const emit = defineEmits(['deleteRow'])
|
|
|
9
9
|
// 访问路由
|
|
10
10
|
const router = useRouter()
|
|
11
11
|
// 获取默认值
|
|
12
|
-
const idKey = ref('o_id')
|
|
12
|
+
// const idKey = ref('o_id')
|
|
13
13
|
|
|
14
14
|
// 简易crud表单测试
|
|
15
|
-
const configName = ref('
|
|
15
|
+
const configName = ref('ceshiCRUD')
|
|
16
16
|
const serviceName = ref('af-safecheck')
|
|
17
17
|
|
|
18
18
|
// 资源权限测试
|
|
@@ -84,12 +84,12 @@ const serviceName = ref('af-safecheck')
|
|
|
84
84
|
// }
|
|
85
85
|
|
|
86
86
|
// 删除功能
|
|
87
|
-
function deleteRow(result) {
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
const fixQueryForm = ref({
|
|
91
|
-
|
|
92
|
-
})
|
|
87
|
+
// function deleteRow(result) {
|
|
88
|
+
// emit('deleteRow', result.o_id)
|
|
89
|
+
// }
|
|
90
|
+
// const fixQueryForm = ref({
|
|
91
|
+
// f_operator_id: '487184754014158848',
|
|
92
|
+
// })
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
95
|
<template>
|
|
@@ -98,8 +98,6 @@ const fixQueryForm = ref({
|
|
|
98
98
|
<XCellList
|
|
99
99
|
:config-name="configName"
|
|
100
100
|
:service-name="serviceName"
|
|
101
|
-
:fix-query-form="fixQueryForm"
|
|
102
|
-
@delete-row="deleteRow"
|
|
103
101
|
/>
|
|
104
102
|
</template>
|
|
105
103
|
</NormalDataLayout>
|