af-mobile-client-vue3 1.4.65 → 1.4.68
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/__dummy__ +9 -9
- package/build/vite/optimize.ts +36 -36
- package/package.json +121 -120
- package/pnpm-lock.yaml +11070 -0
- package/public/favicon.svg +4 -4
- package/scripts/verifyCommit.js +19 -19
- package/src/components/common/MateChat/components/MateChatContent.vue +274 -274
- package/src/components/common/MateChat/components/MateChatHeader.vue +337 -337
- package/src/components/common/MateChat/index.vue +444 -444
- package/src/components/common/MateChat/types.ts +247 -247
- package/src/components/data/UserDetail/types.ts +1 -1
- package/src/components/data/XFormGroup/doc/DeviceForm.vue +1 -1
- package/src/components/data/XFormGroup/doc/UserForm.vue +1 -1
- package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/components/data/XTag/index.vue +10 -10
- package/src/components/layout/TabBarLayout/index.vue +40 -40
- package/src/hooks/useCommon.ts +9 -9
- package/src/plugins/AppData.ts +38 -38
- package/src/router/invoiceRoutes.ts +33 -33
- package/src/services/api/common.ts +109 -109
- package/src/services/api/manage.ts +8 -8
- package/src/services/api/search.ts +16 -16
- package/src/services/restTools.ts +56 -56
- package/src/stores/modules/user.ts +3 -0
- package/src/utils/authority-utils.ts +84 -84
- package/src/utils/crypto.ts +39 -39
- package/src/utils/runEvalFunction.ts +13 -13
- package/src/utils/timeUtil.ts +27 -27
- package/src/views/component/EvaluateRecordView/index.vue +40 -40
- package/src/views/component/MateChat/MateChatView.vue +10 -10
- package/src/views/component/XCellDetailView/index.vue +217 -217
- package/src/views/component/XFormView/index.vue +2 -2
- package/src/views/component/XReportFormIframeView/index.vue +47 -47
- package/src/views/component/XReportFormView/index.vue +13 -13
- package/src/views/component/XSignatureView/index.vue +50 -50
- package/src/views/component/notice.vue +46 -46
- package/src/views/component/topNav.vue +36 -36
- package/src/views/invoiceShow/index.vue +61 -61
- package/src/views/user/login/LoginForm.vue +0 -1
- package/src/views/user/login/index.vue +22 -22
package/src/utils/timeUtil.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Icon as VanIcon,
|
|
7
|
-
} from 'vant'
|
|
8
|
-
import { ref } from 'vue'
|
|
9
|
-
|
|
10
|
-
const configName = ref('get_evaluate_by_id')
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<NormalDataLayout title="评价纪录">
|
|
15
|
-
<template #layout_header_row_right_col>
|
|
16
|
-
<VanIcon class="header_row_icon" name="filter-o" />
|
|
17
|
-
</template>
|
|
18
|
-
<template #layout_content>
|
|
19
|
-
<XCellList :config-name="configName" id-key="t_id" service-name="af-revenue" />
|
|
20
|
-
</template>
|
|
21
|
-
</NormalDataLayout>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<style scoped lang="less">
|
|
25
|
-
.header_row_icon {
|
|
26
|
-
font-size: 18px;
|
|
27
|
-
}
|
|
28
|
-
//.van-tabs {
|
|
29
|
-
// display: flex;
|
|
30
|
-
// flex-flow: column;
|
|
31
|
-
// height: 100%;
|
|
32
|
-
//}
|
|
33
|
-
//:deep(.van-tabs__content) {
|
|
34
|
-
// flex: 1;
|
|
35
|
-
//}
|
|
36
|
-
//:deep(.van-tab__panel) {
|
|
37
|
-
// height: 100%;
|
|
38
|
-
// max-height: 100vh;
|
|
39
|
-
//}
|
|
40
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Icon as VanIcon,
|
|
7
|
+
} from 'vant'
|
|
8
|
+
import { ref } from 'vue'
|
|
9
|
+
|
|
10
|
+
const configName = ref('get_evaluate_by_id')
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<NormalDataLayout title="评价纪录">
|
|
15
|
+
<template #layout_header_row_right_col>
|
|
16
|
+
<VanIcon class="header_row_icon" name="filter-o" />
|
|
17
|
+
</template>
|
|
18
|
+
<template #layout_content>
|
|
19
|
+
<XCellList :config-name="configName" id-key="t_id" service-name="af-revenue" />
|
|
20
|
+
</template>
|
|
21
|
+
</NormalDataLayout>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style scoped lang="less">
|
|
25
|
+
.header_row_icon {
|
|
26
|
+
font-size: 18px;
|
|
27
|
+
}
|
|
28
|
+
//.van-tabs {
|
|
29
|
+
// display: flex;
|
|
30
|
+
// flex-flow: column;
|
|
31
|
+
// height: 100%;
|
|
32
|
+
//}
|
|
33
|
+
//:deep(.van-tabs__content) {
|
|
34
|
+
// flex: 1;
|
|
35
|
+
//}
|
|
36
|
+
//:deep(.van-tab__panel) {
|
|
37
|
+
// height: 100%;
|
|
38
|
+
// max-height: 100vh;
|
|
39
|
+
//}
|
|
40
|
+
</style>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import MateChat from '@af-mobile-client-vue3/components/common/MateChat/index.vue'
|
|
3
|
-
|
|
4
|
-
// 配置名称,从云端配置中心获取配置
|
|
5
|
-
const configName = '用户端AiChat配置'
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<template>
|
|
9
|
-
<MateChat :config-name="configName" service-name="af-wechat" />
|
|
10
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import MateChat from '@af-mobile-client-vue3/components/common/MateChat/index.vue'
|
|
3
|
+
|
|
4
|
+
// 配置名称,从云端配置中心获取配置
|
|
5
|
+
const configName = '用户端AiChat配置'
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<MateChat :config-name="configName" service-name="af-wechat" />
|
|
10
|
+
</template>
|
|
@@ -1,217 +1,217 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XCellDetail from '@af-mobile-client-vue3/components/data/XCellDetail/index.vue'
|
|
3
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
import TabBarLayout from '@af-mobile-client-vue3/components/layout/TabBarLayout/index.vue'
|
|
5
|
-
import { remove } from '@af-mobile-client-vue3/services/api/common'
|
|
6
|
-
import {
|
|
7
|
-
showConfirmDialog,
|
|
8
|
-
showFailToast,
|
|
9
|
-
showSuccessToast,
|
|
10
|
-
Cell as VanCell,
|
|
11
|
-
CellGroup as VanCellGroup,
|
|
12
|
-
Dialog as VanDialog,
|
|
13
|
-
Field as VanField,
|
|
14
|
-
Form as VanForm,
|
|
15
|
-
Grid as VanGrid,
|
|
16
|
-
GridItem as VanGridItem,
|
|
17
|
-
Popup as VanPopup,
|
|
18
|
-
} from 'vant'
|
|
19
|
-
import { onMounted, ref } from 'vue'
|
|
20
|
-
import { useRoute } from 'vue-router'
|
|
21
|
-
|
|
22
|
-
const options = ref([
|
|
23
|
-
{ text: '微信', icon: 'wechat' },
|
|
24
|
-
{ text: '微博', icon: 'weibo' },
|
|
25
|
-
{ text: '微信', icon: 'wechat' },
|
|
26
|
-
{ text: '微博', icon: 'weibo' },
|
|
27
|
-
{ text: '微信', icon: 'wechat' },
|
|
28
|
-
{ text: '微博', icon: 'weibo' },
|
|
29
|
-
{ text: '微信', icon: 'wechat' },
|
|
30
|
-
{ text: '微博', icon: 'weibo' },
|
|
31
|
-
])
|
|
32
|
-
|
|
33
|
-
const barList = ref([
|
|
34
|
-
{ icon: 'edit', text: '编辑', method: 'editElement' },
|
|
35
|
-
{ icon: 'delete-o', text: '删除', method: 'delElement' },
|
|
36
|
-
{ icon: 'ellipsis', text: '更多', method: 'getMore' },
|
|
37
|
-
])
|
|
38
|
-
|
|
39
|
-
const serviceName = ref('af-system')
|
|
40
|
-
|
|
41
|
-
const queryParamsName = ref('crud_oper_log_manage')
|
|
42
|
-
|
|
43
|
-
const route = useRoute()
|
|
44
|
-
|
|
45
|
-
const id = ref(-1)
|
|
46
|
-
|
|
47
|
-
const showMore = ref(false)
|
|
48
|
-
|
|
49
|
-
const showEdit = ref(false)
|
|
50
|
-
|
|
51
|
-
const msg = ref({
|
|
52
|
-
info1: '',
|
|
53
|
-
info2: '',
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
const loading = ref(true)
|
|
57
|
-
|
|
58
|
-
const detailContent = ref({
|
|
59
|
-
编号: '测试编号3.1415926...',
|
|
60
|
-
姓名: '测试人员',
|
|
61
|
-
部门: '测试部门',
|
|
62
|
-
完成日期: '测试时间 2024/4/16 16:59:12',
|
|
63
|
-
请求方式: '测试方法 POST',
|
|
64
|
-
请求ip: '测试ip 127.0.0.1',
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
const callbacks = {
|
|
68
|
-
editElement,
|
|
69
|
-
delElement,
|
|
70
|
-
getMore,
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function editElement() {
|
|
74
|
-
showEdit.value = true
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function doEdit() {
|
|
78
|
-
showEdit.value = false
|
|
79
|
-
}
|
|
80
|
-
function delElement() {
|
|
81
|
-
showConfirmDialog({
|
|
82
|
-
title: '提示',
|
|
83
|
-
message:
|
|
84
|
-
`确认删除---${id.value}---?`,
|
|
85
|
-
closeOnClickOverlay: true,
|
|
86
|
-
})
|
|
87
|
-
.then(() => {
|
|
88
|
-
const params = {
|
|
89
|
-
queryParamsName: queryParamsName.value,
|
|
90
|
-
idList: [id.value],
|
|
91
|
-
}
|
|
92
|
-
remove(params, serviceName)
|
|
93
|
-
.then((_res) => {
|
|
94
|
-
showSuccessToast('删除成功')
|
|
95
|
-
history.back()
|
|
96
|
-
})
|
|
97
|
-
.catch((_err) => {
|
|
98
|
-
showFailToast('删除失败')
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
.catch((err) => {
|
|
102
|
-
console.warn(err)
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function getMore() {
|
|
107
|
-
showMore.value = true
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
onMounted(() => {
|
|
111
|
-
id.value = route.params.id as unknown as number
|
|
112
|
-
setTimeout(() => {
|
|
113
|
-
loading.value = false
|
|
114
|
-
}, 1000)
|
|
115
|
-
})
|
|
116
|
-
</script>
|
|
117
|
-
|
|
118
|
-
<template>
|
|
119
|
-
<div id="XCellDetailView">
|
|
120
|
-
<NormalDataLayout title="详情" class="normal-body">
|
|
121
|
-
<template #layout_content>
|
|
122
|
-
<XCellDetail
|
|
123
|
-
title="测试标题"
|
|
124
|
-
describe="测试描述信息"
|
|
125
|
-
extra="12345"
|
|
126
|
-
:loading="loading"
|
|
127
|
-
:status-bar="{ icon: 'success', color: 'green' }"
|
|
128
|
-
>
|
|
129
|
-
<template #detailContent>
|
|
130
|
-
<div v-for="(value, key) in detailContent" :key="key" class="detail-content">
|
|
131
|
-
<div class="detail-content-title">
|
|
132
|
-
{{ key }}
|
|
133
|
-
</div>
|
|
134
|
-
<div class="detail-content-msg">
|
|
135
|
-
{{ value }}
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
</template>
|
|
139
|
-
</XCellDetail>
|
|
140
|
-
</template>
|
|
141
|
-
</NormalDataLayout>
|
|
142
|
-
<TabBarLayout :bar-list="barList" :callbacks="callbacks" />
|
|
143
|
-
<VanPopup
|
|
144
|
-
v-model:show="showMore"
|
|
145
|
-
class="pop-box"
|
|
146
|
-
:overlay-style="{ height: '92.5vh', top: '7.5vh' }"
|
|
147
|
-
round
|
|
148
|
-
position="bottom"
|
|
149
|
-
>
|
|
150
|
-
<div class="grid-box">
|
|
151
|
-
<VanGrid :gutter="10">
|
|
152
|
-
<VanGridItem v-for="(item, index) in options" :key="index" :icon="(item as any).icon" :text="(item as any).text" />
|
|
153
|
-
</VanGrid>
|
|
154
|
-
</div>
|
|
155
|
-
<VanCell class="cell" title="取消" @click="showMore = false" />
|
|
156
|
-
</VanPopup>
|
|
157
|
-
<VanDialog :show="showEdit" title="编辑信息" :close-on-click-overlay="true" @confirm="doEdit">
|
|
158
|
-
<VanForm>
|
|
159
|
-
<VanCellGroup class="cell-group">
|
|
160
|
-
<VanField
|
|
161
|
-
v-model="msg.info1"
|
|
162
|
-
name="信息一"
|
|
163
|
-
label="信息一"
|
|
164
|
-
placeholder="请填写信息一"
|
|
165
|
-
:rules="[{ required: true, message: '信息一不得为空' }]"
|
|
166
|
-
/>
|
|
167
|
-
<VanField
|
|
168
|
-
v-model="msg.info2"
|
|
169
|
-
name="信息二"
|
|
170
|
-
label="信息二"
|
|
171
|
-
placeholder="请填写信息二"
|
|
172
|
-
:rules="[{ required: true, message: '信息二不得为空' }]"
|
|
173
|
-
/>
|
|
174
|
-
</VanCellGroup>
|
|
175
|
-
</VanForm>
|
|
176
|
-
</VanDialog>
|
|
177
|
-
</div>
|
|
178
|
-
</template>
|
|
179
|
-
|
|
180
|
-
<style scoped lang="less">
|
|
181
|
-
#XCellDetailView {
|
|
182
|
-
.normal-body {
|
|
183
|
-
height: 92vh;
|
|
184
|
-
}
|
|
185
|
-
.grid-box {
|
|
186
|
-
background-color: #f7f8fa;
|
|
187
|
-
margin-top: 2vh;
|
|
188
|
-
:deep(.van-grid-item__content) {
|
|
189
|
-
background-color: #f7f8fa;
|
|
190
|
-
}
|
|
191
|
-
:deep(.van-grid-item__content:hover) {
|
|
192
|
-
background-color: white;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
.pop-box {
|
|
196
|
-
height: 28vh;
|
|
197
|
-
background-color: #f7f8fa;
|
|
198
|
-
}
|
|
199
|
-
.cell {
|
|
200
|
-
margin-top: 1vh;
|
|
201
|
-
text-align: center;
|
|
202
|
-
}
|
|
203
|
-
.cell-group {
|
|
204
|
-
margin-top: 2vh;
|
|
205
|
-
margin-bottom: 2vh;
|
|
206
|
-
}
|
|
207
|
-
.detail-content {
|
|
208
|
-
margin: 5px 0 0 0;
|
|
209
|
-
font-size: 15px;
|
|
210
|
-
.detail-content-title {
|
|
211
|
-
font-size: 13px;
|
|
212
|
-
margin-bottom: 5px;
|
|
213
|
-
color: var(--van-text-color-2);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XCellDetail from '@af-mobile-client-vue3/components/data/XCellDetail/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import TabBarLayout from '@af-mobile-client-vue3/components/layout/TabBarLayout/index.vue'
|
|
5
|
+
import { remove } from '@af-mobile-client-vue3/services/api/common'
|
|
6
|
+
import {
|
|
7
|
+
showConfirmDialog,
|
|
8
|
+
showFailToast,
|
|
9
|
+
showSuccessToast,
|
|
10
|
+
Cell as VanCell,
|
|
11
|
+
CellGroup as VanCellGroup,
|
|
12
|
+
Dialog as VanDialog,
|
|
13
|
+
Field as VanField,
|
|
14
|
+
Form as VanForm,
|
|
15
|
+
Grid as VanGrid,
|
|
16
|
+
GridItem as VanGridItem,
|
|
17
|
+
Popup as VanPopup,
|
|
18
|
+
} from 'vant'
|
|
19
|
+
import { onMounted, ref } from 'vue'
|
|
20
|
+
import { useRoute } from 'vue-router'
|
|
21
|
+
|
|
22
|
+
const options = ref([
|
|
23
|
+
{ text: '微信', icon: 'wechat' },
|
|
24
|
+
{ text: '微博', icon: 'weibo' },
|
|
25
|
+
{ text: '微信', icon: 'wechat' },
|
|
26
|
+
{ text: '微博', icon: 'weibo' },
|
|
27
|
+
{ text: '微信', icon: 'wechat' },
|
|
28
|
+
{ text: '微博', icon: 'weibo' },
|
|
29
|
+
{ text: '微信', icon: 'wechat' },
|
|
30
|
+
{ text: '微博', icon: 'weibo' },
|
|
31
|
+
])
|
|
32
|
+
|
|
33
|
+
const barList = ref([
|
|
34
|
+
{ icon: 'edit', text: '编辑', method: 'editElement' },
|
|
35
|
+
{ icon: 'delete-o', text: '删除', method: 'delElement' },
|
|
36
|
+
{ icon: 'ellipsis', text: '更多', method: 'getMore' },
|
|
37
|
+
])
|
|
38
|
+
|
|
39
|
+
const serviceName = ref('af-system')
|
|
40
|
+
|
|
41
|
+
const queryParamsName = ref('crud_oper_log_manage')
|
|
42
|
+
|
|
43
|
+
const route = useRoute()
|
|
44
|
+
|
|
45
|
+
const id = ref(-1)
|
|
46
|
+
|
|
47
|
+
const showMore = ref(false)
|
|
48
|
+
|
|
49
|
+
const showEdit = ref(false)
|
|
50
|
+
|
|
51
|
+
const msg = ref({
|
|
52
|
+
info1: '',
|
|
53
|
+
info2: '',
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const loading = ref(true)
|
|
57
|
+
|
|
58
|
+
const detailContent = ref({
|
|
59
|
+
编号: '测试编号3.1415926...',
|
|
60
|
+
姓名: '测试人员',
|
|
61
|
+
部门: '测试部门',
|
|
62
|
+
完成日期: '测试时间 2024/4/16 16:59:12',
|
|
63
|
+
请求方式: '测试方法 POST',
|
|
64
|
+
请求ip: '测试ip 127.0.0.1',
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const callbacks = {
|
|
68
|
+
editElement,
|
|
69
|
+
delElement,
|
|
70
|
+
getMore,
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function editElement() {
|
|
74
|
+
showEdit.value = true
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function doEdit() {
|
|
78
|
+
showEdit.value = false
|
|
79
|
+
}
|
|
80
|
+
function delElement() {
|
|
81
|
+
showConfirmDialog({
|
|
82
|
+
title: '提示',
|
|
83
|
+
message:
|
|
84
|
+
`确认删除---${id.value}---?`,
|
|
85
|
+
closeOnClickOverlay: true,
|
|
86
|
+
})
|
|
87
|
+
.then(() => {
|
|
88
|
+
const params = {
|
|
89
|
+
queryParamsName: queryParamsName.value,
|
|
90
|
+
idList: [id.value],
|
|
91
|
+
}
|
|
92
|
+
remove(params, serviceName)
|
|
93
|
+
.then((_res) => {
|
|
94
|
+
showSuccessToast('删除成功')
|
|
95
|
+
history.back()
|
|
96
|
+
})
|
|
97
|
+
.catch((_err) => {
|
|
98
|
+
showFailToast('删除失败')
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
.catch((err) => {
|
|
102
|
+
console.warn(err)
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function getMore() {
|
|
107
|
+
showMore.value = true
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
id.value = route.params.id as unknown as number
|
|
112
|
+
setTimeout(() => {
|
|
113
|
+
loading.value = false
|
|
114
|
+
}, 1000)
|
|
115
|
+
})
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<template>
|
|
119
|
+
<div id="XCellDetailView">
|
|
120
|
+
<NormalDataLayout title="详情" class="normal-body">
|
|
121
|
+
<template #layout_content>
|
|
122
|
+
<XCellDetail
|
|
123
|
+
title="测试标题"
|
|
124
|
+
describe="测试描述信息"
|
|
125
|
+
extra="12345"
|
|
126
|
+
:loading="loading"
|
|
127
|
+
:status-bar="{ icon: 'success', color: 'green' }"
|
|
128
|
+
>
|
|
129
|
+
<template #detailContent>
|
|
130
|
+
<div v-for="(value, key) in detailContent" :key="key" class="detail-content">
|
|
131
|
+
<div class="detail-content-title">
|
|
132
|
+
{{ key }}
|
|
133
|
+
</div>
|
|
134
|
+
<div class="detail-content-msg">
|
|
135
|
+
{{ value }}
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</template>
|
|
139
|
+
</XCellDetail>
|
|
140
|
+
</template>
|
|
141
|
+
</NormalDataLayout>
|
|
142
|
+
<TabBarLayout :bar-list="barList" :callbacks="callbacks" />
|
|
143
|
+
<VanPopup
|
|
144
|
+
v-model:show="showMore"
|
|
145
|
+
class="pop-box"
|
|
146
|
+
:overlay-style="{ height: '92.5vh', top: '7.5vh' }"
|
|
147
|
+
round
|
|
148
|
+
position="bottom"
|
|
149
|
+
>
|
|
150
|
+
<div class="grid-box">
|
|
151
|
+
<VanGrid :gutter="10">
|
|
152
|
+
<VanGridItem v-for="(item, index) in options" :key="index" :icon="(item as any).icon" :text="(item as any).text" />
|
|
153
|
+
</VanGrid>
|
|
154
|
+
</div>
|
|
155
|
+
<VanCell class="cell" title="取消" @click="showMore = false" />
|
|
156
|
+
</VanPopup>
|
|
157
|
+
<VanDialog :show="showEdit" title="编辑信息" :close-on-click-overlay="true" @confirm="doEdit">
|
|
158
|
+
<VanForm>
|
|
159
|
+
<VanCellGroup class="cell-group">
|
|
160
|
+
<VanField
|
|
161
|
+
v-model="msg.info1"
|
|
162
|
+
name="信息一"
|
|
163
|
+
label="信息一"
|
|
164
|
+
placeholder="请填写信息一"
|
|
165
|
+
:rules="[{ required: true, message: '信息一不得为空' }]"
|
|
166
|
+
/>
|
|
167
|
+
<VanField
|
|
168
|
+
v-model="msg.info2"
|
|
169
|
+
name="信息二"
|
|
170
|
+
label="信息二"
|
|
171
|
+
placeholder="请填写信息二"
|
|
172
|
+
:rules="[{ required: true, message: '信息二不得为空' }]"
|
|
173
|
+
/>
|
|
174
|
+
</VanCellGroup>
|
|
175
|
+
</VanForm>
|
|
176
|
+
</VanDialog>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<style scoped lang="less">
|
|
181
|
+
#XCellDetailView {
|
|
182
|
+
.normal-body {
|
|
183
|
+
height: 92vh;
|
|
184
|
+
}
|
|
185
|
+
.grid-box {
|
|
186
|
+
background-color: #f7f8fa;
|
|
187
|
+
margin-top: 2vh;
|
|
188
|
+
:deep(.van-grid-item__content) {
|
|
189
|
+
background-color: #f7f8fa;
|
|
190
|
+
}
|
|
191
|
+
:deep(.van-grid-item__content:hover) {
|
|
192
|
+
background-color: white;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
.pop-box {
|
|
196
|
+
height: 28vh;
|
|
197
|
+
background-color: #f7f8fa;
|
|
198
|
+
}
|
|
199
|
+
.cell {
|
|
200
|
+
margin-top: 1vh;
|
|
201
|
+
text-align: center;
|
|
202
|
+
}
|
|
203
|
+
.cell-group {
|
|
204
|
+
margin-top: 2vh;
|
|
205
|
+
margin-bottom: 2vh;
|
|
206
|
+
}
|
|
207
|
+
.detail-content {
|
|
208
|
+
margin: 5px 0 0 0;
|
|
209
|
+
font-size: 15px;
|
|
210
|
+
.detail-content-title {
|
|
211
|
+
font-size: 13px;
|
|
212
|
+
margin-bottom: 5px;
|
|
213
|
+
color: var(--van-text-color-2);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
</style>
|
|
@@ -3,8 +3,8 @@ import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
|
3
3
|
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
4
|
import { ref } from 'vue'
|
|
5
5
|
|
|
6
|
-
const configName = ref('
|
|
7
|
-
const serviceName = ref('af-
|
|
6
|
+
const configName = ref('ceshiForm')
|
|
7
|
+
const serviceName = ref('af-system')
|
|
8
8
|
|
|
9
9
|
const formGroupAddConstruction = ref(null)
|
|
10
10
|
const formData = ref({
|