af-mobile-client-vue3 1.4.54 → 1.4.56
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/build/vite/optimize.ts +36 -36
- package/package.json +1 -1
- package/public/favicon.svg +4 -4
- package/scripts/verifyCommit.js +19 -19
- package/src/components/common/MateChat/apiService.ts +134 -103
- package/src/components/common/MateChat/components/MateChatContent.vue +281 -0
- package/src/components/common/MateChat/components/MateChatHeader.vue +298 -253
- package/src/components/common/MateChat/components/PasswordDialog.vue +97 -0
- package/src/components/common/MateChat/composables/useChatHistoryCache.ts +117 -0
- package/src/components/common/MateChat/composables/useChatMessagesCache.ts +72 -0
- package/src/components/common/MateChat/composables/useMateChat.ts +372 -0
- package/src/components/common/MateChat/composables/usePasswordManager.ts +38 -0
- package/src/components/common/MateChat/index.vue +443 -0
- package/src/components/common/MateChat/types.ts +241 -0
- 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/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 -51
- package/src/views/component/XCellDetailView/index.vue +217 -217
- 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/index.vue +22 -22
- package/vite.config.ts +2 -1
- package/src/components/common/MateChat/MateChat.vue +0 -248
- package/src/components/common/MateChat/useMateChat.ts +0 -212
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { getImageUrl } from '@af-mobile-client-vue3/utils/common'
|
|
3
|
-
import {
|
|
4
|
-
Divider as VanDivider,
|
|
5
|
-
NoticeBar as VanNoticeBar,
|
|
6
|
-
} from 'vant/es'
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div>
|
|
11
|
-
<VanNoticeBar class="notice" color="#1989fa" background="#ebf2fb" mode="link">
|
|
12
|
-
<img class="notice_icon" :src="getImageUrl('../assets/img/home/notice/icon.png')">
|
|
13
|
-
<span class="notice_title">
|
|
14
|
-
消息中心<VanDivider vertical :style="{ borderColor: '#1989fa' }" />
|
|
15
|
-
</span>
|
|
16
|
-
<span class="notice_content">
|
|
17
|
-
您有0条未读消息
|
|
18
|
-
</span>
|
|
19
|
-
</VanNoticeBar>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<style scoped lang="less">
|
|
24
|
-
.notice {
|
|
25
|
-
font-size: 14px;
|
|
26
|
-
margin-bottom: var(--base-interval-1);
|
|
27
|
-
.notice_icon {
|
|
28
|
-
width: 30px;
|
|
29
|
-
height: 30px;
|
|
30
|
-
vertical-align: middle;
|
|
31
|
-
position: relative;
|
|
32
|
-
bottom: 2px;
|
|
33
|
-
}
|
|
34
|
-
.notice_title {
|
|
35
|
-
padding-left: 4px;
|
|
36
|
-
line-height: 50px;
|
|
37
|
-
}
|
|
38
|
-
.notice_content {
|
|
39
|
-
color: #000;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
:deep(.van-notice-bar) {
|
|
43
|
-
height: 50px;
|
|
44
|
-
padding: 0 8px;
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { getImageUrl } from '@af-mobile-client-vue3/utils/common'
|
|
3
|
+
import {
|
|
4
|
+
Divider as VanDivider,
|
|
5
|
+
NoticeBar as VanNoticeBar,
|
|
6
|
+
} from 'vant/es'
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div>
|
|
11
|
+
<VanNoticeBar class="notice" color="#1989fa" background="#ebf2fb" mode="link">
|
|
12
|
+
<img class="notice_icon" :src="getImageUrl('../assets/img/home/notice/icon.png')">
|
|
13
|
+
<span class="notice_title">
|
|
14
|
+
消息中心<VanDivider vertical :style="{ borderColor: '#1989fa' }" />
|
|
15
|
+
</span>
|
|
16
|
+
<span class="notice_content">
|
|
17
|
+
您有0条未读消息
|
|
18
|
+
</span>
|
|
19
|
+
</VanNoticeBar>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style scoped lang="less">
|
|
24
|
+
.notice {
|
|
25
|
+
font-size: 14px;
|
|
26
|
+
margin-bottom: var(--base-interval-1);
|
|
27
|
+
.notice_icon {
|
|
28
|
+
width: 30px;
|
|
29
|
+
height: 30px;
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
position: relative;
|
|
32
|
+
bottom: 2px;
|
|
33
|
+
}
|
|
34
|
+
.notice_title {
|
|
35
|
+
padding-left: 4px;
|
|
36
|
+
line-height: 50px;
|
|
37
|
+
}
|
|
38
|
+
.notice_content {
|
|
39
|
+
color: #000;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
:deep(.van-notice-bar) {
|
|
43
|
+
height: 50px;
|
|
44
|
+
padding: 0 8px;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
Col as VanCol,
|
|
4
|
-
Row as VanRow,
|
|
5
|
-
Search as VanSearch,
|
|
6
|
-
} from 'vant/es'
|
|
7
|
-
import { ref } from 'vue'
|
|
8
|
-
|
|
9
|
-
const value = ref('')
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<div class="top_nav_main">
|
|
14
|
-
<VanRow gutter="54" align="center">
|
|
15
|
-
<VanCol span="2">
|
|
16
|
-
<img alt="default-user-profile" class="default_user_profile" src="../../assets/common/default-user-profile.png">
|
|
17
|
-
</VanCol>
|
|
18
|
-
<VanCol span="22">
|
|
19
|
-
<VanSearch v-model="value" placeholder="请输入搜索关键词" />
|
|
20
|
-
</VanCol>
|
|
21
|
-
</VanRow>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<style scoped lang="less">
|
|
26
|
-
.top_nav_main {
|
|
27
|
-
padding-bottom: var(--base-interval-1);
|
|
28
|
-
}
|
|
29
|
-
.default_user_profile {
|
|
30
|
-
border-radius: 50%;
|
|
31
|
-
width: 33px;
|
|
32
|
-
height: 33px;
|
|
33
|
-
position: relative;
|
|
34
|
-
top: 2px;
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Col as VanCol,
|
|
4
|
+
Row as VanRow,
|
|
5
|
+
Search as VanSearch,
|
|
6
|
+
} from 'vant/es'
|
|
7
|
+
import { ref } from 'vue'
|
|
8
|
+
|
|
9
|
+
const value = ref('')
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="top_nav_main">
|
|
14
|
+
<VanRow gutter="54" align="center">
|
|
15
|
+
<VanCol span="2">
|
|
16
|
+
<img alt="default-user-profile" class="default_user_profile" src="../../assets/common/default-user-profile.png">
|
|
17
|
+
</VanCol>
|
|
18
|
+
<VanCol span="22">
|
|
19
|
+
<VanSearch v-model="value" placeholder="请输入搜索关键词" />
|
|
20
|
+
</VanCol>
|
|
21
|
+
</VanRow>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style scoped lang="less">
|
|
26
|
+
.top_nav_main {
|
|
27
|
+
padding-bottom: var(--base-interval-1);
|
|
28
|
+
}
|
|
29
|
+
.default_user_profile {
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
width: 33px;
|
|
32
|
+
height: 33px;
|
|
33
|
+
position: relative;
|
|
34
|
+
top: 2px;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { http } from '@af-mobile-client-vue3/utils/http'
|
|
3
|
-
import { showDialog, Loading as VanLoading } from 'vant'
|
|
4
|
-
import { onMounted, ref } from 'vue'
|
|
5
|
-
import { useRoute } from 'vue-router'
|
|
6
|
-
|
|
7
|
-
// 获取url中的sellid参数
|
|
8
|
-
const route = useRoute()
|
|
9
|
-
const sellid = route.query.sellid
|
|
10
|
-
const showLoading = ref(true)
|
|
11
|
-
|
|
12
|
-
onMounted(async () => {
|
|
13
|
-
if (sellid) {
|
|
14
|
-
http.request({
|
|
15
|
-
url: '/invoice/rs/logic/getInvoiceBySellId',
|
|
16
|
-
method: 'post',
|
|
17
|
-
data: {
|
|
18
|
-
sellid,
|
|
19
|
-
},
|
|
20
|
-
}).then((_res: any) => {
|
|
21
|
-
showLoading.value = false
|
|
22
|
-
if (_res.type === 'success') {
|
|
23
|
-
if (_res.url)
|
|
24
|
-
window.open(_res.url)
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
showDialog({
|
|
28
|
-
message: _res.msg,
|
|
29
|
-
theme: 'round-button',
|
|
30
|
-
showConfirmButton: false,
|
|
31
|
-
}).then(() => {
|
|
32
|
-
// on close
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<template>
|
|
41
|
-
<div class="invoiceShow">
|
|
42
|
-
<VanLoading v-if="showLoading" type="spinner" color="#1989fa" vertical>
|
|
43
|
-
正在努力获取发票信息,请稍后。。。
|
|
44
|
-
</VanLoading>
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<style scoped lang="less">
|
|
49
|
-
.invoiceShow {
|
|
50
|
-
width: 100vw !important;
|
|
51
|
-
height: 100vh !important;
|
|
52
|
-
overflow-y: hidden;
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
align-items: center;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.invoiceShow > * {
|
|
59
|
-
transform: scale(1.5);
|
|
60
|
-
}
|
|
61
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { http } from '@af-mobile-client-vue3/utils/http'
|
|
3
|
+
import { showDialog, Loading as VanLoading } from 'vant'
|
|
4
|
+
import { onMounted, ref } from 'vue'
|
|
5
|
+
import { useRoute } from 'vue-router'
|
|
6
|
+
|
|
7
|
+
// 获取url中的sellid参数
|
|
8
|
+
const route = useRoute()
|
|
9
|
+
const sellid = route.query.sellid
|
|
10
|
+
const showLoading = ref(true)
|
|
11
|
+
|
|
12
|
+
onMounted(async () => {
|
|
13
|
+
if (sellid) {
|
|
14
|
+
http.request({
|
|
15
|
+
url: '/invoice/rs/logic/getInvoiceBySellId',
|
|
16
|
+
method: 'post',
|
|
17
|
+
data: {
|
|
18
|
+
sellid,
|
|
19
|
+
},
|
|
20
|
+
}).then((_res: any) => {
|
|
21
|
+
showLoading.value = false
|
|
22
|
+
if (_res.type === 'success') {
|
|
23
|
+
if (_res.url)
|
|
24
|
+
window.open(_res.url)
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
showDialog({
|
|
28
|
+
message: _res.msg,
|
|
29
|
+
theme: 'round-button',
|
|
30
|
+
showConfirmButton: false,
|
|
31
|
+
}).then(() => {
|
|
32
|
+
// on close
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<div class="invoiceShow">
|
|
42
|
+
<VanLoading v-if="showLoading" type="spinner" color="#1989fa" vertical>
|
|
43
|
+
正在努力获取发票信息,请稍后。。。
|
|
44
|
+
</VanLoading>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style scoped lang="less">
|
|
49
|
+
.invoiceShow {
|
|
50
|
+
width: 100vw !important;
|
|
51
|
+
height: 100vh !important;
|
|
52
|
+
overflow-y: hidden;
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.invoiceShow > * {
|
|
59
|
+
transform: scale(1.5);
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import ForgetPasswordForm from './ForgetPasswordForm.vue'
|
|
3
|
-
import LoginForm from './LoginForm.vue'
|
|
4
|
-
import LoginTitle from './LoginTitle.vue'
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<div class="login_container">
|
|
9
|
-
<LoginTitle />
|
|
10
|
-
<LoginForm />
|
|
11
|
-
<ForgetPasswordForm />
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style scoped lang="less">
|
|
16
|
-
.login_container {
|
|
17
|
-
height: 100vh;
|
|
18
|
-
padding-top: 10px;
|
|
19
|
-
background: var(--van-background-2);
|
|
20
|
-
position: relative;
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ForgetPasswordForm from './ForgetPasswordForm.vue'
|
|
3
|
+
import LoginForm from './LoginForm.vue'
|
|
4
|
+
import LoginTitle from './LoginTitle.vue'
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="login_container">
|
|
9
|
+
<LoginTitle />
|
|
10
|
+
<LoginForm />
|
|
11
|
+
<ForgetPasswordForm />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style scoped lang="less">
|
|
16
|
+
.login_container {
|
|
17
|
+
height: 100vh;
|
|
18
|
+
padding-top: 10px;
|
|
19
|
+
background: var(--van-background-2);
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
package/vite.config.ts
CHANGED
|
@@ -65,7 +65,8 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|
|
65
65
|
rewrite: path => path.replace(/^\/linepatrol\/geoserver/, '/geoserver'),
|
|
66
66
|
},
|
|
67
67
|
// MateChat 聊天 API 代理
|
|
68
|
-
'/api/
|
|
68
|
+
'/api/fastApi': {
|
|
69
|
+
rewrite: (path: string) => path.replace(/^\/api\/fastApi/, '/api'),
|
|
69
70
|
target: 'http://k8s.aofengcloud.com:32202',
|
|
70
71
|
ws: false,
|
|
71
72
|
changeOrigin: true,
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import liuliLogo from '@af-mobile-client-vue3/assets/img/component/liuli.png'
|
|
3
|
-
import userAvatarImg from '@af-mobile-client-vue3/components/common/MateChat/assets/035-avatar-13.svg'
|
|
4
|
-
import MateChatHeader from '@af-mobile-client-vue3/components/common/MateChat/components/MateChatHeader.vue'
|
|
5
|
-
import { PromptList } from '@af-mobile-client-vue3/components/common/MateChat/components/PromptList'
|
|
6
|
-
// MateChat ai 对话相关
|
|
7
|
-
import { Button as VanButton } from 'vant'
|
|
8
|
-
import { defineProps, toRefs, withDefaults } from 'vue'
|
|
9
|
-
import { useMateChat } from './useMateChat'
|
|
10
|
-
import 'vant/es/image-preview/style'
|
|
11
|
-
|
|
12
|
-
interface MateChatPromptItem {
|
|
13
|
-
value: string
|
|
14
|
-
label: string
|
|
15
|
-
iconConfig?: {
|
|
16
|
-
name: string
|
|
17
|
-
color?: string
|
|
18
|
-
}
|
|
19
|
-
desc?: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface MateChatProps {
|
|
23
|
-
/**
|
|
24
|
-
* 介绍文案,不传或为空数组时不展示 McIntroduction
|
|
25
|
-
*/
|
|
26
|
-
description?: string[]
|
|
27
|
-
/**
|
|
28
|
-
* 首屏推荐问题列表
|
|
29
|
-
*/
|
|
30
|
-
introPrompt?: MateChatPromptItem[]
|
|
31
|
-
/**
|
|
32
|
-
* 底部快捷问题列表
|
|
33
|
-
*/
|
|
34
|
-
simplePrompt?: MateChatPromptItem[]
|
|
35
|
-
/**
|
|
36
|
-
* 客服名称,默认:智能能客服
|
|
37
|
-
*/
|
|
38
|
-
serviceName?: string
|
|
39
|
-
/**
|
|
40
|
-
* 是否使用流式对话
|
|
41
|
-
*/
|
|
42
|
-
useStream?: boolean
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const props = withDefaults(defineProps<MateChatProps>(), {
|
|
46
|
-
description: () => [],
|
|
47
|
-
introPrompt: () => [],
|
|
48
|
-
simplePrompt: () => [],
|
|
49
|
-
serviceName: '智能客服',
|
|
50
|
-
useStream: false,
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
const { description, introPrompt, simplePrompt, serviceName, useStream } = toRefs(props)
|
|
54
|
-
|
|
55
|
-
const {
|
|
56
|
-
startPage,
|
|
57
|
-
inputValue,
|
|
58
|
-
messages,
|
|
59
|
-
newConversation,
|
|
60
|
-
onSubmit,
|
|
61
|
-
} = useMateChat({
|
|
62
|
-
useStream: useStream.value,
|
|
63
|
-
})
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<template>
|
|
67
|
-
<div id="mate-chat-view">
|
|
68
|
-
<McLayout class="chat-card">
|
|
69
|
-
<MateChatHeader
|
|
70
|
-
v-if="!startPage"
|
|
71
|
-
:logo-image="liuliLogo"
|
|
72
|
-
:title="serviceName"
|
|
73
|
-
/>
|
|
74
|
-
<McLayoutContent
|
|
75
|
-
v-if="startPage"
|
|
76
|
-
style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px"
|
|
77
|
-
>
|
|
78
|
-
<McIntroduction
|
|
79
|
-
v-if="description && description.length"
|
|
80
|
-
:logo-img="liuliLogo"
|
|
81
|
-
:title="serviceName"
|
|
82
|
-
:sub-title="`Hi,我是${serviceName}`"
|
|
83
|
-
:description="description"
|
|
84
|
-
class="McIntroduction"
|
|
85
|
-
/>
|
|
86
|
-
<PromptList
|
|
87
|
-
v-if="introPrompt && introPrompt.length"
|
|
88
|
-
:list="introPrompt"
|
|
89
|
-
@item-click="onSubmit($event.label)"
|
|
90
|
-
/>
|
|
91
|
-
</McLayoutContent>
|
|
92
|
-
<McLayoutContent v-else class="content-container">
|
|
93
|
-
<template v-for="(msg, idx) in messages" :key="idx">
|
|
94
|
-
<McBubble
|
|
95
|
-
v-if="msg.from === 'user'"
|
|
96
|
-
:content="msg.content"
|
|
97
|
-
align="right"
|
|
98
|
-
:avatar-config="{ imgSrc: userAvatarImg }"
|
|
99
|
-
/>
|
|
100
|
-
<McBubble
|
|
101
|
-
v-else-if="msg.from === 'service'"
|
|
102
|
-
:content="msg.content"
|
|
103
|
-
:avatar-config="{ imgSrc: userAvatarImg }"
|
|
104
|
-
/>
|
|
105
|
-
<McBubble v-else :content="msg.content" :avatar-config="{ imgSrc: liuliLogo }" :loading="msg.loading">
|
|
106
|
-
<McMarkdownCard
|
|
107
|
-
:content="msg.content"
|
|
108
|
-
:typing="!useStream"
|
|
109
|
-
/>
|
|
110
|
-
</McBubble>
|
|
111
|
-
</template>
|
|
112
|
-
</McLayoutContent>
|
|
113
|
-
<div class="shortcut" style="display: flex; align-items: center; gap: 8px">
|
|
114
|
-
<PromptList
|
|
115
|
-
v-if="!startPage && simplePrompt && simplePrompt.length"
|
|
116
|
-
:list="simplePrompt"
|
|
117
|
-
direction="horizontal"
|
|
118
|
-
class="shortcut-prompt"
|
|
119
|
-
style="flex: 1"
|
|
120
|
-
@item-click="onSubmit($event.label)"
|
|
121
|
-
/>
|
|
122
|
-
<VanButton
|
|
123
|
-
style="margin-left: auto"
|
|
124
|
-
icon="add"
|
|
125
|
-
title="新建对话"
|
|
126
|
-
size="small"
|
|
127
|
-
round
|
|
128
|
-
@click="newConversation"
|
|
129
|
-
/>
|
|
130
|
-
</div>
|
|
131
|
-
<McLayoutSender>
|
|
132
|
-
<McInput
|
|
133
|
-
:value="inputValue"
|
|
134
|
-
placeholder="请输入您的问题,我会为您解答"
|
|
135
|
-
:max-length="2000"
|
|
136
|
-
@change="(e) => (inputValue = e)"
|
|
137
|
-
@submit="onSubmit"
|
|
138
|
-
/>
|
|
139
|
-
</McLayoutSender>
|
|
140
|
-
</McLayout>
|
|
141
|
-
</div>
|
|
142
|
-
</template>
|
|
143
|
-
|
|
144
|
-
<style scoped lang="less">
|
|
145
|
-
#mate-chat-view {
|
|
146
|
-
/* 外层渐变背景容器 */
|
|
147
|
-
width: 100%;
|
|
148
|
-
min-height: 100vh;
|
|
149
|
-
background: linear-gradient(to bottom, #a8f0ed 0%, #a8e6cf 8%, #c5b3ff 12%, #e0b3ff 40%, #fff4b8 60%, #ffb8d1 90%);
|
|
150
|
-
/* background: linear-gradient(to bottom, #d0c9ff 0%, #e6d6f0 8%, #f1dbea 12%, #c8dcfb 40%, #abc6f6 60%, #87aefe 90%); */
|
|
151
|
-
padding: 20px;
|
|
152
|
-
display: flex;
|
|
153
|
-
justify-content: center;
|
|
154
|
-
align-items: flex-start;
|
|
155
|
-
box-sizing: border-box;
|
|
156
|
-
|
|
157
|
-
/* 中间白色圆角卡片 */
|
|
158
|
-
.chat-card {
|
|
159
|
-
width: 100%;
|
|
160
|
-
max-width: 1200px;
|
|
161
|
-
height: calc(100vh - 40px);
|
|
162
|
-
background: #ffffff;
|
|
163
|
-
border-radius: 24px;
|
|
164
|
-
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
|
|
165
|
-
overflow: hidden;
|
|
166
|
-
display: flex;
|
|
167
|
-
flex-direction: column;
|
|
168
|
-
transition: all 0.3s ease;
|
|
169
|
-
padding: 20px;
|
|
170
|
-
gap: 8px;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.chat-card:hover {
|
|
174
|
-
box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* 移动端适配 */
|
|
178
|
-
@media (max-width: 768px) {
|
|
179
|
-
padding: 8px;
|
|
180
|
-
.chat-card {
|
|
181
|
-
height: calc(100vh - 16px);
|
|
182
|
-
border-radius: 16px;
|
|
183
|
-
padding: 8px;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.content-container {
|
|
188
|
-
display: flex;
|
|
189
|
-
flex-direction: column;
|
|
190
|
-
gap: 8px;
|
|
191
|
-
overflow: auto;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.input-foot-wrapper {
|
|
195
|
-
display: flex;
|
|
196
|
-
justify-content: space-between;
|
|
197
|
-
align-items: center;
|
|
198
|
-
width: 100%;
|
|
199
|
-
height: 100%;
|
|
200
|
-
margin-right: 8px;
|
|
201
|
-
|
|
202
|
-
.input-foot-left {
|
|
203
|
-
display: flex;
|
|
204
|
-
align-items: center;
|
|
205
|
-
gap: 8px;
|
|
206
|
-
|
|
207
|
-
span {
|
|
208
|
-
font-size: 14px;
|
|
209
|
-
line-height: 18px;
|
|
210
|
-
color: #252b3a;
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.input-foot-dividing-line {
|
|
215
|
-
width: 1px;
|
|
216
|
-
height: 14px;
|
|
217
|
-
background-color: #d7d8da;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.input-foot-maxlength {
|
|
221
|
-
font-size: 14px;
|
|
222
|
-
color: #71757f;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.input-foot-right {
|
|
227
|
-
.demo-button-content {
|
|
228
|
-
font-size: 14px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
& > *:not(:first-child) {
|
|
232
|
-
margin-left: 8px;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
:deep(.mc-header-logo-container img) {
|
|
237
|
-
width: 32px;
|
|
238
|
-
height: 32px;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.McIntroduction {
|
|
242
|
-
:deep(.mc-introduction-logo-container img) {
|
|
243
|
-
width: 64px;
|
|
244
|
-
height: 64px;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
</style>
|