first commit

This commit is contained in:
2025-05-22 10:33:32 +08:00
commit f2ef63d910
581 changed files with 53162 additions and 0 deletions
+184
View File
@@ -0,0 +1,184 @@
<template>
<view class="min-height bg-main-light">
<HeaderItem title="常见问题解答"/>
<view class="bg-white p-20 text-25 flex justify-center items-center">
<text class="tag selected-tag">{{ title }}</text>
</view>
<view class="pos-r" v-if="configList && configList.length">
<view class="circle-bottom-bg"></view>
<view class="tips-card-wrap">
<view class="tips-card">
<view class="text-28 font-bold text-center p-30">【{{ typeLabel }}】</view>
<u-line color="#1DBCBC" dashed></u-line>
<view class="text-25 p-20">{{ configList[activeIndex].title }}</view>
<view class="p-20 flex justify-start items-center" @click="selectItem(item, index)"
v-for="(item, index) in JSON.parse(configList[activeIndex].answer)" :key="index">
<template v-if="configList[activeIndex].type === 'single'">
<u-icon
:name="configList[activeIndex].selected.includes(item) ? '/legalOrgCheckSuggest/static/radio-selected.png' : '/legalOrgCheckSuggest/static/radio.png'"/>
<text class="text-25 ml-10">{{ item }}</text>
</template>
<template v-else-if="configList[activeIndex].type === 'multi'">
<u-icon
:name="configList[activeIndex].selected.includes(item) ? '/legalOrgCheckSuggest/static/checkbox-selected.png' : '/legalOrgCheckSuggest/static/checkbox.png'"/>
<text class="text-25 ml-10">{{ item }}</text>
</template>
</view>
<u-gap height="100rpx"/>
</view>
<view class="flex justify-center items-center">
<view class="mx-15">
<u-button shape="circle" @click="toLastItem" v-if="activeIndex > 0"
:customStyle="{background: 'linear-gradient(91.28deg, rgba(14,146,252,1) 27.63%,rgba(29,188,188,1) 80.08%)',
border: 0, width: '200rpx',
color: 'white'}">
查看上一题
</u-button>
</view>
<view class="mx-15">
<u-button shape="circle" @click="toNextItem"
v-if="activeIndex > 0 && configList[activeIndex].type === 'multi'"
:customStyle="{background: 'linear-gradient(91.28deg, rgba(14,146,252,1) 27.63%,rgba(29,188,188,1) 80.08%)',
border: 0, width: '200rpx',
color: 'white'}">
确认
</u-button>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {listLegalOrgCheckSuggestConfigReq} from "@/api/legalOrgCheckSuggest";
export default {
name: "detail",
components: {HeaderItem},
data() {
return {
id: 0,
title: '',
configList: [],
typeList: [{value: 'single', label: '单选'}, {value: 'multi', label: '多选'}, {value: 'fill', label: '填空'}],
activeIndex: 0,
typeLabel: ''
}
},
methods: {
async getList() {
const {data} = await listLegalOrgCheckSuggestConfigReq({
typeId: this.id
})
this.configList = data
this.typeLabel = this.typeList.find(item => item.value === data[0].type).label
this.configList.map(item => {
item.selected = []
return item
})
},
selectItem(item, index) {
// console.log(index, this.configList[index], this.configList.length - 1)
if (this.configList[this.activeIndex].type === 'single') {
this.configList[this.activeIndex].selected = [item]
if (this.activeIndex === this.configList.length - 1) {
this.toEnd()
} else {
this.activeIndex += 1
this.typeLabel = this.typeList.find(item => item.value === this.configList[this.activeIndex].type).label
}
} else if (this.configList[this.activeIndex].type === 'multi') {
const hasCheckIndex = this.configList[this.activeIndex].selected.findIndex(i => i === item)
console.log(hasCheckIndex)
if (hasCheckIndex > -1) {
this.configList[this.activeIndex].selected.splice(hasCheckIndex, 1)
} else {
this.configList[this.activeIndex].selected.push(item)
}
}
this.$forceUpdate()
},
toNextItem() {
if (!this.configList[this.activeIndex].selected.length) {
return this.$toast('请选择选项')
}
if (this.activeIndex === this.configList.length - 1) {
this.toEnd()
} else {
this.activeIndex += 1
this.typeLabel = this.typeList.find(item => item.value === this.configList[this.activeIndex].type).label
}
},
toLastItem() {
this.activeIndex -= 1
},
toEnd() {
let content = []
this.configList.map(item => {
content.push({
quest: item.title,
answer: item.selected.join('、')
})
})
uni.navigateTo({
url: `/legalOrgCheckSuggest/pages/result?title=${this.title}&typeId=${this.id}`,
success: res => {
res.eventChannel.emit('content', content)
}
})
}
},
onLoad({id, title}) {
this.id = id
this.title = title
this.getList()
}
}
</script>
<style scoped lang="scss">
.tag {
padding: 10rpx 25rpx;
margin-right: 25rpx;
flex-shrink: 0;
}
.selected-tag {
background-color: #FFCA68;
border-radius: 100rpx;
}
.circle-bottom-bg {
background-color: #1DBCBC;
width: 100vw;
height: 200rpx;
position: absolute;
left: 0;
top: 0;
border-radius: 0 0 100vw 100vw;
}
.tips-card-wrap {
position: absolute;
left: 0;
top: 70rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.tips-card {
width: 80%;
line-height: 30rpx;
border-radius: 50rpx;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 0 2px 6px 0 rgba(202, 247, 247, 1);
margin-bottom: 50rpx;
}
}
</style>
+105
View File
@@ -0,0 +1,105 @@
<template>
<view class="min-height bg-main-light">
<HeaderItem title="常见问题解答"/>
<view class="bg-white p-20 text-25 flex justify-start items-center overflow-x">
<text v-for="(item, index) in typeList" :key="index" class="tag"
@click="changeType(index)"
:class="[item.id === activeId ? 'selected-tag' : '']">{{ item.title }}
</text>
</view>
<view class="pos-r">
<view class="circle-bottom-bg"></view>
<view class="tips-card-wrap">
<view class="tips-card">
<view class="text-28 font-bold text-center">{{ activeTitle }}</view>
<view class="text-25 mt-20" style="padding-bottom: 50rpx">
请你根据实际情况对以下问题进行勾选,人工智能小律将根据你勾选的信息提供相关的法律服务,出具针对性的法律意见书。本项咨询将回答有关林地纠纷中常见纠纷的相关问题。
</view>
</view>
<u-button shape="circle" @click="$jump(`/legalOrgCheckSuggest/pages/detail?id=${activeId}&title=${activeTitle}`)"
:customStyle="{background: 'linear-gradient(91.28deg, rgba(14,146,252,1) 27.63%,rgba(29,188,188,1) 80.08%)',
border: 0, width: '200rpx',
color: 'white'}">
开始咨询
</u-button>
</view>
</view>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {listLegalOrgCheckTypeSuggestReq} from "@/api/legalOrgCheckSuggest";
export default {
name: "index",
components: {HeaderItem},
data() {
return {
typeList: [],
activeId: 0,
activeTitle: 0,
}
},
methods: {
async getTypeList() {
const {data} = await listLegalOrgCheckTypeSuggestReq()
this.typeList = data
this.activeId = data[0].id
this.activeTitle = data[0].title
},
changeType(index){
this.activeId = this.typeList[index].id
this.activeTitle = this.typeList[index].title
}
},
onLoad() {
this.getTypeList()
},
}
</script>
<style scoped lang="scss">
.tag {
padding: 10rpx 25rpx;
margin-right: 25rpx;
flex-shrink: 0;
}
.selected-tag {
background-color: #FFCA68;
border-radius: 100rpx;
}
.circle-bottom-bg {
background-color: #1DBCBC;
width: 100vw;
height: 200rpx;
position: absolute;
left: 0;
top: 0;
border-radius: 0 0 100vw 100vw;
}
.tips-card-wrap {
position: absolute;
left: 0;
top: 70rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.tips-card {
width: 80%;
line-height: 30rpx;
padding: 30rpx;
border-radius: 50rpx;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 0 2px 6px 0 rgba(202, 247, 247, 1);
margin-bottom: 50rpx;
}
}
</style>
+27
View File
@@ -0,0 +1,27 @@
<template>
<web-view :src="`https://sifa-h5.wsdns.cn/#/legalOrgCheckSuggest/pages/result?id=${id}&typeId=${typeId}`"
@message="onMessage" @onPostMessage="onMessage"/>
<!-- <web-view :src="`http://localhost:8080/#/legalOrgCheck/pages/result?id=${id}&typeId=${typeId}`"-->
<!-- @message="onMessage" @onPostMessage="onMessage"/>-->
</template>
<script>
export default {
name: "pdfResult",
data() {
return {
id: null,
typeId: null,
}
},
methods: {
onMessage(e) {
console.log(e)
}
},
onLoad({id, typeId}) {
this.id = id
this.typeId = typeId
},
}
</script>
+239
View File
@@ -0,0 +1,239 @@
<template>
<view class="min-height bg-white p-30">
<HeaderItem :title="title"/>
<view class="text-25">
<view>您好!</view>
<view style="text-indent: 50rpx">
非常感谢你的信任和支持,根据你所填写的相关信息,大体了解了目前你的相关状况,利用人工智能深度学习百万相关判例,综合法律专家、资深律师,为你出具以下法律意见,因各地方性法规、规章乃至政策有所不同,小律出具的意见书仅根据全国性法律法规以及最高法院的典型案例作出,与当地法律实务可能有所出入,仅供你参考!
</view>
<view class="flex flex-col justify-start items-start" v-if="content">
<view class="text-25 my-20" v-for="(item, index) in content" :key="index">
{{ item.quest }}: {{ item.answer }}
</view>
</view>
<view class="text-main text-28 font-bold my-25" id="tag0">一、平台分析&法律依据</view>
<!-- <view style="text-indent: 50rpx">-->
<!-- 根据你填写的信息显示:根据《中华人民共和国农村土地承包法》第三十三条的规定,你不可以与不属于同一集体经济组织的成员互换林地承包经营权。-->
<!-- </view>-->
<!-- <view class="text-main text-28 font-bold my-25">二、林地纠纷的法律依据</view>-->
<!-- <view style="text-indent: 50rpx">-->
<!-- 单位之间发生的林木、林地所有权和使用权争议,由县级以上人民政府依法处理。个人之间、个人与单位之间发生的林木所有权和林地使用权争议,由乡镇人民政府或者县级以上人民政府依法处理。当事人对有关人民政府的处理决定不服的可以自接到处理决定通知之日起三十日内,向人民法院起诉,在林木、林地权属争议解决前,除因森林防火、林业有害生物防治、国家重大基础设施建设等需要外,当事人任何一方不得砍伐有争议的林木或者改变林地现状。若是双方协商解决纠纷或者调解纠纷,可以参考下面的法律依据(仅部分参考):1、《中华人民共和国民法典》第一百八十八条-->
<!-- 向人民法院请求保护民事权利的诉讼时效期间为三年。法律另有规定的,依照其规定。诉讼时效期间自权利人知道或者应当知道权利受到损害以及义务人之日起计算。法律另有规定的,依照其规定。但是,自权利受到损害之日起超过二十年的,人民法院不予保护,有特殊情况的,人民法院可以根据权利人的申请决定延长。-->
<!-- </view>-->
<view v-if="loading" class="p-15 flex justify-center items-center">
<u-loading-icon mode="semicircle" :color="MAIN()"></u-loading-icon>
</view>
<zero-markdown-view v-else :markdown="returnContent"></zero-markdown-view>
<!-- <view class="text-main text-28 font-bold my-25">三、林地纠纷维权途径</view>-->
<!-- <view style="text-indent: 50rpx">{{ config ? config.methods : '' }}</view>-->
<!-- <view class="text-main text-28 font-bold my-25">四、林地纠纷诉讼提示</view>-->
<!-- <view style="text-indent: 50rpx">{{ config ? config.tips : '' }}</view>-->
<view class="text-main text-28 font-bold my-25" id="tag1">二、文书范本</view>
<view class="flex flex-col justify-start items-start">
<template v-if="config && config.fileList">
<view class="rounded border border-main p-10 flex justify-between items-center w-90p mb-20"
v-for="(item, index) in JSON.parse(config.fileList)" :key="index" @click="downloadFile(item.file)">
<u-icon name="/legalOrgCheckSuggest/static/file.png" :label="item.title" label-pos="right"
label-color="#116AEF"/>
<u-icon name="arrow-right" color="#116AEF"/>
</view>
</template>
</view>
<view class="text-main text-28 font-bold my-25" id="tag2">三、相关案例</view>
<view class="flex flex-col justify-start items-start">
<template v-if="articleList.length">
<view class="rounded border border-main p-10 flex justify-start items-start w-90p mb-20"
v-for="(item, index) in articleList" :key="index"
@click="$jump(`/articlePages/pages/info?id=${item.articleId}`)">
<u-icon name="/legalOrgCheckSuggest/static/star.png"/>
<text class="text-main text-25 ml-10">{{ item.title }}</text>
</view>
</template>
</view>
<view class="text-main text-28 font-bold my-25" id="tag3">四、法条链接</view>
<view style="text-indent: 50rpx">
<template v-if="config && config.urls">
<view v-for="(item, index) in JSON.parse(config.urls)" :key="index"
class="text-25 mb-15 flex justify-start items-center"
@click="copy(item.url)">
<text class="mr-15">{{ item.title }}</text>
<u-icon name="/legalOrgCheckSuggest/static/copy.png"/>
</view>
</template>
</view>
<view class="text-main text-28 font-bold my-25">特别声明</view>
<view style="text-indent: 50rpx">
(1)本法律意见书是根据您填写的信息,参考相关判例、法律法规,给出的法律建议分析。若您填写的信息不真实,将会导致给出的法律意见有偏差。
</view>
<view style="text-indent: 50rpx">
(2)司法实践中,重调查重证据,且影响判决的因素很多,因此本法律意见书仅供参考,不能替代判决文书或作关证据。
</view>
</view>
<u-gap height="200rpx"></u-gap>
<view class="footer flex justify-center items-center text-white text-25">
<view class="bg-main flex-1 p-20 text-center" @click="showGuide = true">报告导航</view>
<view class="bg-orange flex-1 p-20 text-center" @click="download">下载报告</view>
<view class="bg-main flex-1 p-20 text-center" @click="back">重做</view>
</view>
<u-popup :show="showGuide" close-on-click-overlay @close="showGuide = false" round="10"
:closeable="false" mode="bottom"
:safe-area-inset-bottom="false">
<view class="pos-r">
<view class="p-25 border-bottom" @click="jumpTo(0)">一、平台分析&法律依据</view>
<view class="p-25 border-bottom" @click="jumpTo(1)">二、文书范本</view>
<view class="p-25 border-bottom" @click="jumpTo(2)">三、相关案例</view>
<view class="p-25" @click="jumpTo(3)">四、法条链接</view>
</view>
</u-popup>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {
addLegalOrgCheckContentSuggestReq,
listLegalOrgCheckTypeSuggestInfoReq,
updateLegalOrgCheckContentSuggestReq
} from "@/api/legalOrgCheckSuggest";
import {listArticleReq} from "@/api/common";
import {WS_API} from "@/config";
import {getUserInfo} from "@/util/user";
import {sendChatReq, stopChatReq} from "@/api/lawOrg";
import {MAIN} from "@/config/color";
import {addLegalOrgCheckContentReq, updateLegalOrgCheckContentReq} from "@/api/legalOrgCheck";
export default {
name: "result",
components: {HeaderItem},
data() {
return {
title: '',
typeId: null,
content: [],
config: null,
articleList: [],
returnContent: '',
showGuide: false,
loading: false,
taskId: null,
id: null,
}
},
methods: {
MAIN() {
return MAIN
},
back() {
uni.navigateBack()
},
async getConfig() {
const {data} = await listLegalOrgCheckTypeSuggestInfoReq(this.typeId)
this.config = data
await this.getArticleList()
},
async getArticleList() {
if (!this.config.articleCateId) return
const {data} = await listArticleReq({
categoryId: this.config.articleCateId
})
this.articleList = data
},
downloadFile(file) {
uni.showLoading({title: '加载中'})
uni.downloadFile({
url: file,
success: function (res) {
uni.hideLoading()
uni.openDocument({
showMenu: true,
filePath: res.tempFilePath
})
}
})
},
copy(url) {
uni.setClipboardData({
data: url,
success: function () {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
})
},
jumpTo(id) {
uni.pageScrollTo({
selector: `#tag${id}`,
duration: 300
})
this.showGuide = false
},
async stopAI(){
await stopChatReq({
taskId: this.taskId,
type: 1
})
uni.closeSocket()
},
async addLog(title, content) {
const {data} = await addLegalOrgCheckContentSuggestReq({
title,
content
})
this.id = data
},
download(){
if (!this.aiDone) return this.$toast('请先等待AI回答完毕')
this.$jump(`/legalOrgCheckSuggest/pages/pdfResult?id=${this.id}&typeId=${this.typeId}`)
}
},
onLoad({title, typeId}) {
this.title = title
this.typeId = typeId
this.getConfig()
const eventChannel = this.getOpenerEventChannel();
eventChannel.on('content', data => {
this.content = data
this.addLog(title, JSON.stringify(data))
uni.connectSocket({
url: `${WS_API}/${getUserInfo().uid}`,
success: () => {
this.loading = true
sendChatReq({
query: `我想咨询${title}`,
user: getUserInfo().uid,
type: title,
requestType: 1,
inputs: JSON.stringify(data)
}).finally(() => {
uni.closeSocket()
})
}
})
const _this = this
uni.onSocketMessage(res => {
if (res.data === '连接成功') return
this.loading = false
const aiData = JSON.parse(res.data)
this.taskId = aiData.taskId
if (aiData.answer !== '__END__') this.returnContent += aiData.answer
else {
updateLegalOrgCheckContentSuggestReq({
id: _this.id,
aiContent: _this.returnContent
}).then(() => {
_this.aiDone = true
})
}
})
})
},
onHide() {
this.stopAI()
},
onUnload() {
this.stopAI()
},
}
</script>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB