af-mobile-client-vue3 1.4.53 → 1.4.54
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 +1 -1
- package/src/App.vue +14 -2
- package/src/components/common/MateChat/MateChat.vue +248 -0
- package/src/components/common/MateChat/apiService.ts +254 -0
- package/src/components/common/MateChat/assets/035-avatar-13.svg +1 -0
- package/src/components/common/MateChat/components/MateChatHeader.vue +253 -0
- package/src/components/common/MateChat/components/PromptList/PromptList.vue +189 -0
- package/src/components/common/MateChat/components/PromptList/index.ts +1 -0
- package/src/components/common/MateChat/useMateChat.ts +212 -0
- package/src/components/common/otherCharge/ChargePrintSelectorAndRemarks.vue +137 -137
- package/src/components/common/otherCharge/CodePayment.vue +357 -357
- package/src/components/common/otherCharge/FileUploader.vue +602 -602
- package/src/components/common/otherCharge/GridFileUploader.vue +846 -846
- package/src/components/common/otherCharge/PaymentMethodSelector.vue +202 -202
- package/src/components/common/otherCharge/PaymentMethodSelectorCard.vue +45 -45
- package/src/components/common/otherCharge/ReceiptModal.vue +273 -273
- package/src/components/common/otherCharge/index.ts +43 -43
- package/src/components/data/OtherCharge/OtherChargeItemModal.vue +547 -547
- 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/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/utils/timeUtil.ts +27 -27
- package/src/views/component/MateChat/MateChatView.vue +30 -233
- package/src/views/component/XCellListView/index.vue +107 -138
- package/src/views/component/XFormGroupView/index.vue +78 -82
- package/src/views/component/XFormView/index.vue +41 -46
- package/src/views/component/MateChat/apiService.ts +0 -104
|
@@ -1,82 +1,78 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
|
|
3
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
import { showDialog } from 'vant'
|
|
5
|
-
import { ref } from 'vue'
|
|
6
|
-
import { useRoute } from 'vue-router'
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// const configName = ref(
|
|
13
|
-
// const serviceName = ref(
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
// const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
// }
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// function initComponents() {
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
// }
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</
|
|
79
|
-
|
|
80
|
-
<style scoped lang="less">
|
|
81
|
-
|
|
82
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { showDialog } from 'vant'
|
|
5
|
+
import { ref } from 'vue'
|
|
6
|
+
import { useRoute } from 'vue-router'
|
|
7
|
+
|
|
8
|
+
// 纯表单
|
|
9
|
+
const configName = ref('form_check_test')
|
|
10
|
+
const serviceName = ref('af-system')
|
|
11
|
+
|
|
12
|
+
// const configName = ref("计划下发Form")
|
|
13
|
+
// const serviceName = ref("af-linepatrol")
|
|
14
|
+
|
|
15
|
+
// 表单组
|
|
16
|
+
// const configName = ref('lngChargeAuditMobileFormGroup')
|
|
17
|
+
// const serviceName = ref('af-gaslink')
|
|
18
|
+
|
|
19
|
+
const formData = ref({})
|
|
20
|
+
const formGroup = ref(null)
|
|
21
|
+
const route = useRoute()
|
|
22
|
+
const isInit = ref(false)
|
|
23
|
+
function submit(_result) {
|
|
24
|
+
showDialog({ message: '提交成功' }).then(() => {
|
|
25
|
+
history.back()
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 表单组——数据
|
|
30
|
+
// function initComponents () {
|
|
31
|
+
// runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
|
|
32
|
+
// formData.value = {...res}
|
|
33
|
+
// })
|
|
34
|
+
// }
|
|
35
|
+
|
|
36
|
+
// 纯表单——数据
|
|
37
|
+
// function initComponents() {
|
|
38
|
+
// formData.value = { plan_name: 'af-llllll', plan_point: '1号点位', plan_single: '1号点位', plan_range: '2024-12-12' }
|
|
39
|
+
// }
|
|
40
|
+
|
|
41
|
+
// function initComponents() {
|
|
42
|
+
// runLogic('getlngChargeAuditMobileFormGroupData', { id: route.query?.id, o_id: route.query?.o_id }, 'af-gaslink').then((res) => {
|
|
43
|
+
// console.log('res------', res)
|
|
44
|
+
// formData.value = { ...res }
|
|
45
|
+
// formGroup.value.init({
|
|
46
|
+
// configName: configName.value,
|
|
47
|
+
// serviceName: serviceName.value,
|
|
48
|
+
// groupFormData: { ...res },
|
|
49
|
+
// mode: "新增"
|
|
50
|
+
// })
|
|
51
|
+
// isInit.value = true
|
|
52
|
+
// })
|
|
53
|
+
// }
|
|
54
|
+
|
|
55
|
+
// onBeforeMount(() => {
|
|
56
|
+
// initComponents()
|
|
57
|
+
// })
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
62
|
+
<template #layout_content>
|
|
63
|
+
<!-- v-if="isInit" -->
|
|
64
|
+
<XFormGroup
|
|
65
|
+
ref="formGroup"
|
|
66
|
+
:config-name="configName"
|
|
67
|
+
:service-name="serviceName"
|
|
68
|
+
:group-form-data="formData"
|
|
69
|
+
mode="新增"
|
|
70
|
+
@submit="submit"
|
|
71
|
+
/>
|
|
72
|
+
</template>
|
|
73
|
+
</NormalDataLayout>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<style scoped lang="less">
|
|
77
|
+
|
|
78
|
+
</style>
|
|
@@ -1,46 +1,41 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
import { ref } from 'vue'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<style scoped lang="less">
|
|
45
|
-
|
|
46
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { ref } from 'vue'
|
|
5
|
+
|
|
6
|
+
const configName = ref('ceshiForm')
|
|
7
|
+
const serviceName = ref('af-system')
|
|
8
|
+
|
|
9
|
+
const formGroupAddConstruction = ref(null)
|
|
10
|
+
const formData = ref({
|
|
11
|
+
'YYYY': '2025-09-08 16:03:22',
|
|
12
|
+
'YYYY-MM': '2025-09-08 16:03:22',
|
|
13
|
+
'YYYY-MM-DD': '2025-09-08 16:03:22',
|
|
14
|
+
'YYYY-MM-DDHH': '2025-09-08 16:03:22',
|
|
15
|
+
'YYYY-MM-DDHHMM': '2025-09-08 16:03:22',
|
|
16
|
+
'YYYY-MM-DDHHMMSS': '2025-09-08 16:03:22',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
function onSubmit(data: any) {
|
|
20
|
+
console.warn('提交表单', data)
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
26
|
+
<template #layout_content>
|
|
27
|
+
<XForm
|
|
28
|
+
ref="formGroupAddConstruction"
|
|
29
|
+
mode="修改"
|
|
30
|
+
:config-name="configName"
|
|
31
|
+
:service-name="serviceName"
|
|
32
|
+
:form-data="formData"
|
|
33
|
+
@on-submit="onSubmit"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
</NormalDataLayout>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style scoped lang="less">
|
|
40
|
+
|
|
41
|
+
</style>
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { AxiosInstance } from 'axios'
|
|
2
|
-
import axios from 'axios'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 聊天消息接口
|
|
6
|
-
*/
|
|
7
|
-
export interface ChatMessage {
|
|
8
|
-
role: 'user' | 'assistant' | 'system'
|
|
9
|
-
content: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 聊天请求参数接口
|
|
14
|
-
*/
|
|
15
|
-
export interface ChatCompletionsRequest {
|
|
16
|
-
chatId: string
|
|
17
|
-
stream: boolean
|
|
18
|
-
detail: boolean
|
|
19
|
-
variables: {
|
|
20
|
-
uid: string
|
|
21
|
-
name: string
|
|
22
|
-
}
|
|
23
|
-
messages: ChatMessage[]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 聊天响应使用情况接口
|
|
28
|
-
*/
|
|
29
|
-
export interface ChatUsage {
|
|
30
|
-
prompt_tokens: number
|
|
31
|
-
completion_tokens: number
|
|
32
|
-
total_tokens: number
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 聊天响应选择项接口
|
|
37
|
-
*/
|
|
38
|
-
export interface ChatChoice {
|
|
39
|
-
message: {
|
|
40
|
-
role: 'assistant'
|
|
41
|
-
content: string
|
|
42
|
-
}
|
|
43
|
-
finish_reason: string
|
|
44
|
-
index: number
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* 聊天响应接口
|
|
49
|
-
*/
|
|
50
|
-
export interface ChatCompletionsResponse {
|
|
51
|
-
id: string
|
|
52
|
-
model: string
|
|
53
|
-
usage: ChatUsage
|
|
54
|
-
choices: ChatChoice[]
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 创建独立的 axios 实例,不经过拦截器
|
|
59
|
-
*/
|
|
60
|
-
const chatAxiosInstance: AxiosInstance = axios.create({
|
|
61
|
-
baseURL: import.meta.env.VITE_APP_API_BASE_URL || '',
|
|
62
|
-
timeout: 20000,
|
|
63
|
-
headers: {
|
|
64
|
-
'Content-Type': 'application/json',
|
|
65
|
-
},
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 发送聊天请求
|
|
70
|
-
* @param content 用户输入的内容
|
|
71
|
-
* @returns Promise<ChatCompletionsResponse>
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
|
-
* 发送聊天请求
|
|
75
|
-
* @param content 用户输入的内容
|
|
76
|
-
* @returns Promise<ChatCompletionsResponse>
|
|
77
|
-
*/
|
|
78
|
-
export function chatCompletions(content: string): Promise<ChatCompletionsResponse> {
|
|
79
|
-
const requestData: ChatCompletionsRequest = {
|
|
80
|
-
chatId: 'chatId13333113',
|
|
81
|
-
stream: false,
|
|
82
|
-
detail: false,
|
|
83
|
-
variables: {
|
|
84
|
-
uid: 'asdfadsfasfd2323',
|
|
85
|
-
name: '张三',
|
|
86
|
-
},
|
|
87
|
-
messages: [
|
|
88
|
-
{
|
|
89
|
-
role: 'user',
|
|
90
|
-
content,
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return chatAxiosInstance.post<ChatCompletionsResponse>(
|
|
96
|
-
'/v1/chat/completions',
|
|
97
|
-
requestData,
|
|
98
|
-
{
|
|
99
|
-
headers: {
|
|
100
|
-
Authorization: 'Bearer fastgpt-jqZX5C3vo7pUgzqIGdYsdSy5Nb72qxqgSVnAbUWTtYmoP5Yzvh8wgBdIwhXqaf',
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
).then(response => response.data)
|
|
104
|
-
}
|