first commit

This commit is contained in:
2026-08-26 14:25:17 +08:00
commit 06debfd1fc
10595 changed files with 1836924 additions and 0 deletions
@@ -0,0 +1,105 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
img {
object-fit: contain !important;
}
</style>
<div id="app">
<van-nav-bar title="心理咨询预约" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入姓名或者工号搜索"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item v-model="pageForm.sex" :options="sexOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/psychology/apply/h5PageData"
:page_form.sync="pageForm"
ref="tableListRef"
title="userName"
img="avatar"
@ready="doSearch">
<template v-slot="{index,row}">
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="擅长方向">{{row.specialty}}</table-column>
<table-column label="简介">{{row.introduce}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>详细信息</span>
</div>
<div class="action-btn" @click="onApply(row)">
<i class="fa fa-edit"></i>
<span>预约</span>
</div>
</template>
</table-list>
<doctor-info ref="doctorInfoRef"></doctor-info>
<apply-form ref="applyFormRef"></apply-form>
</div>
<script nonce="${cspNonce!}">
<!--#include('../common/doctorInfo.js'){}#-->
<!--#include('../common/applyForm.js'){}#-->
new Vue({
el: "#app",
store,
components: {
"doctor-info": doctorInfo,
"apply-form": applyForm
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
sex: null,
},
sexOptions: [
{text: '全部', value: null},
{text: '男', value: '男'},
{text: '女', value: '女'},
],
}
},
methods: {
onView(row) {
this.$refs.doctorInfoRef.onOpen(row)
},
onApply(row) {
if(!row.times || row.times.length === 0) {
this.$toast(row.userName + '暂无可预约时间段')
return
}
this.$refs.applyFormRef.onOpen(row)
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,139 @@
const applyForm = {
template: /*language=HTML*/ `
<div>
<van-action-sheet :close-on-click-overlay="false" title="预约信息" v-model="visible">
<van-form ref="formRef" class="form-container">
<van-cell-group title="咨询师信息" class="form-section">
<van-field label="姓名" readonly v-model="row.userName"></van-field>
<van-field label="性别" readonly v-model="row.sex"></van-field>
<van-field label="单位" readonly v-model="row.unitName"></van-field>
<van-field label="电话" readonly v-model="row.mobile"></van-field>
</van-cell-group>
<van-cell-group title="预约时间段" class="form-section">
<van-field required :rules="[{ required: true }]"
label="时间段"
placeholder="请点击时间段"
v-model="formData.time"
readonly
is-link
@click="timePicker = true"
></van-field>
<van-popup position="bottom" round v-model:show="timePicker">
<van-picker
title="请选择预约时间段"
show-toolbar
:columns="row.times"
@confirm="timeConfirm"
@cancel="timePicker = false"
value-key="time"
></van-picker>
</van-popup>
</van-cell-group>
<van-cell-group title="基本信息" class="form-section">
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
<van-field label="单位" readonly v-model="formData.unitName"></van-field>
<van-field required :rules="[{ required: true }]"
label="联系方式"
v-model="formData.mobile"
placeholder="请输入联系方式"
></van-field>
<van-field required :rules="[{ required: true }]"
label="咨询方式"
placeholder="请点击选择联系方式"
v-model="formData.askTypeName"
readonly
is-link
@click="askTypePicker = true"
></van-field>
<van-popup position="bottom" round v-model:show="askTypePicker">
<van-picker
title="请选择咨询方式"
show-toolbar
:columns="askTypeColumns"
@confirm="(val) => {formData.askTypeName = val.name; formData.askTypeValue = val.code; askTypePicker = false}"
@cancel="askTypePicker = false"
value-key="name"
></van-picker>
</van-popup>
<van-field
v-model="formData.remark"
name="remark"
label="预约备注"
type="textarea"
rows="4"
autosize
placeholder="请输入预约备注"
></van-field>
</van-cell-group>
<div class="form-actions">
<van-button @click="onSubmit" round type="info">提交申请</van-button>
</div>
</van-form>
</van-action-sheet>
</div>
`,
store,
dicts: ["PSYCHOLOGY_ASK_TYPE"],
data() {
return {
visible:false,
row: {},
formData: {},
sourceAskTypes: [],
askTypePicker: false,
askTypeColumns: [],
timePicker: false,
}
},
methods: {
onOpen(row) {
row.times.forEach(item => {
this.$set(item, 'time', this.$moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + this.$moment(item.endTime).format('HH:mm'))
})
this.row = row
this.visible = true
this.init()
},
init() {
this.$set(this.formData, 'userId', this.$store.state.user.id)
this.$set(this.formData, 'userName', this.$store.state.user.username)
this.$set(this.formData, 'loginName', this.$store.state.user.loginname)
this.$set(this.formData, 'unitName', this.$store.state.user?.unit?.name)
this.$set(this.formData, 'mobile', this.$store.state.user.mobile)
},
timeConfirm(val, index) {
this.askTypeColumns = this.dict.type.PSYCHOLOGY_ASK_TYPE.filter(o => val.askType.includes(o.code))
this.$set(this.formData, 'time', val.time)
this.$set(this.formData, 'id', val.id)
this.timePicker = false
},
onSubmit() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/platform/psychology/apply/submit", this.formData).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.visible = false
this.$pjaxReplace("/platform/psychology/list/h5")
}
})
})
})
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,49 @@
const applyInfo = {
template: /*language=HTML*/ `
<div>
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
<div class="detail-container">
<van-cell-group title="咨询师信息">
<van-cell title="姓名">{{ row.doctorUserName }}</van-cell>
<van-cell title="工号">{{ row.doctorUnitName }}</van-cell>
<van-cell title="联系方式">{{ row.doctorMobile }}</van-cell>
<van-cell title="职称">{{ row.doctorJobTitle }}</van-cell>
<van-cell title="个人简介" class="direction-column-cell">
{{ row.doctorIntroduce }}
</van-cell>
</van-cell-group>
<van-cell-group title="预约时间段">
<van-cell title="开始时间">{{ row.startTime }}</van-cell>
<van-cell title="结束时间">{{ row.endTime }}</van-cell>
</van-cell-group>
<van-cell-group title="预约人信息">
<van-cell title="姓名">{{ row.appointmentUserName }}</van-cell>
<van-cell title="工号">{{ row.appointmentLoginName }}</van-cell>
<van-cell title="单位">{{ row.appointmentUnitName }}</van-cell>
<van-cell title="联系方式">{{ row.appointmentMobile }}</van-cell>
<van-cell title="预约咨询方式">
<dict-tag :options="dict.type.PSYCHOLOGY_ASK_TYPE" :value="row.askTypeValue"></dict-tag>
</van-cell>
<van-cell title="预约人备注" class="direction-column-cell">{{ row.remark }}</van-cell>
</van-cell-group>
</div>
</van-action-sheet>
</div>
`,
dicts:["PSYCHOLOGY_ASK_TYPE"],
data() {
return {
visible:false,
row: {},
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,77 @@
const doctorInfo = {
template: /*language=HTML*/ `
<div>
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="姓名">{{ row?.userName }}</van-cell>
<van-cell title="性别">{{ row?.sex }}</van-cell>
<van-cell title="职称">{{ row?.jobTitle }}</van-cell>
<van-cell title="单位">{{ row?.unitName }}</van-cell>
<van-cell title="联系方式">{{ row?.mobile }}</van-cell>
<van-cell title="擅长方向" class="direction-column-cell">{{ row?.specialty }}</van-cell>
<van-cell title="个人简介" class="direction-column-cell">{{ row?.introduce }}</van-cell>
</van-cell-group>
<van-cell-group title="可预约时段">
<table v-if="row?.times && row?.times.length > 0" class="table-class">
<thead>
<tr>
<th>日期</th>
<th>开始时间</th>
<th>结束时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in row?.times" :key="index">
<td>{{ $moment(item.startTime).format('YYYY-MM-DD') }}</td>
<td>{{ $moment(item.startTime).format('HH:mm') }}</td>
<td>{{ $moment(item.endTime).format('HH:mm') }}</td>
</tr>
</tbody>
</table>
<div v-else class="empty-text">暂无可预约时段</div>
</van-cell-group>
</div>
</van-action-sheet>
</div>
`,
data() {
return {
visible:false,
row: null,
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
},
},
style: /*language=CSS*/ `
/deep/ .table-class{
width: 100%;
border-radius: 5px;
overflow: hidden;
line-height: 1.5rem;
font-size: 13px;
table-layout: fixed;
border-collapse: collapse;
}
/deep/ .table-class th {
background-color: #f2f2f2;
border: 1px solid #dddddd;
}
/deep/ .table-class tr {
text-align: center;
border-bottom: 1px solid #dddddd;
}
/deep/ .table-class td {
border: 1px solid #dddddd;
}
/deep/ .empty-text {
font-size: 14px;
text-align: center;
padding: 10px 0;
}
`
}
@@ -0,0 +1,98 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</style>
<div id="app">
<van-nav-bar title="预约记录" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<van-sticky offset-top="46px">
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/psychology/list/pageData"
:page_form.sync="pageForm"
ref="tableListRef"
title="doctorUserName"
@ready="doSearch">
<template v-slot="{index,row}">
<table-column label="姓名">{{row.appointmentUserName}}</table-column>
<table-column label="工号">{{row.appointmentLoginName}}</table-column>
<table-column label="单位">{{row.appointmentUnitName}}</table-column>
<table-column label="开始时间">{{row.startTime}}</table-column>
<table-column label="结束时间">{{row.endTime}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div v-if="$moment().unix() < $moment(row.startTime).unix()"
class="action-btn delete" @click="onDelete(row)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<info ref="infoRef"></info>
</div>
<script nonce="${cspNonce!}">
<!--#include('../common/applyInfo.js'){}#-->
new Vue({
el: "#app",
store,
components: {
"info": applyInfo,
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: new Date().getFullYear(),
},
}
},
methods: {
onView(row) {
this.$refs.infoRef.onOpen(row)
},
onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要删除吗?"
})
.then(() => {
this.$axios.post("/platform/psychology/list/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
.catch(() => {})
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,87 @@
const applyForm = {
template: /*language=HTML*/ `
<div>
<van-action-sheet :close-on-click-overlay="false" title="咨询信息" v-model="visible">
<van-notice-bar
left-icon="volume-o"
text="温馨提示:不会发布您的个人隐私信息,您咨询的内容只有咨询师可查看并回复。"
></van-notice-bar>
<van-form ref="formRef" class="form-container">
<van-cell-group title="基本信息" class="form-section">
<van-field label="咨询人姓名" :rules="[{ required: true }]"
:value="$store.state.user.username"
readonly
required
name="username"></van-field>
<van-field label="咨询人工号" :rules="[{ required: true }]"
:value="$store.state.user.loginname"
readonly
required
name="loginname"></van-field>
<van-field
v-model="formData.postTitle"
name="postTitle"
label="咨询主题"
type="textarea"
rows="4"
autosize
placeholder="请简约填写咨询主题,不超过20个字"
:rules="[{ required: true }]"
required
></van-field>
<van-field
v-model="formData.postContent"
name="postContent"
label="主要内容"
type="textarea"
rows="4"
autosize
placeholder="请输入主要内容"
:rules="[{ required: true }]"
required
></van-field>
</van-cell-group>
<div class="form-actions">
<van-button @click="onSubmit" round type="info">提交申请</van-button>
</div>
</van-form>
</van-action-sheet>
</div>
`,
store,
data() {
return {
visible:false,
formData: {},
}
},
methods: {
onOpen(row) {
if(row && row.id) {
this.formData = clone(row)
}
this.visible = true
},
onSubmit() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/platform/psychology/onlinePost/submit", this.formData).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.visible = false
this.$emit('refresh')
}
})
})
})
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,123 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</style>
<div id="app">
<van-nav-bar title="发帖咨询" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder
right-text="我要咨询" @click-right="onAdd"></van-nav-bar>
<van-sticky offset-top="46px">
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
<van-dropdown-item v-model="pageForm.isReply" :options="replyOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/psychology/onlinePost/pageData"
:page_form.sync="pageForm"
ref="tableListRef"
title="postTitle"
@ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="姓名">{{row.userName}}</table-column>
<table-column label="咨询时间">{{row.postingTime}}</table-column>
<table-column label="回复情况">
<van-tag color="#67c23a" v-if="row.isReply">已回复</van-tag>
<van-tag type="primary" v-else>未回复</van-tag>
</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" @click="onEdit(row)">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div v-if="!row.isReply"
class="action-btn delete" @click="onDelete(row)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<info ref="infoRef"></info>
<apply-form ref="applyFormRef" @refresh="doSearch"></apply-form>
</div>
<script nonce="${cspNonce!}">
<!--#include('applyForm.js'){}#-->
<!--#include('info.js'){}#-->
new Vue({
el: "#app",
store,
components: {
"apply-form": applyForm,
"info": info,
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: new Date().getFullYear(),
isReply: null,
},
replyOptions: [
{text: '全部', value: null},
{text: '已回复', value: true},
{text: '未回复', value: false},
],
}
},
methods: {
onView(row) {
const url = '/platform/psychology/onlinePost/fetchOne'
this.$refs.infoRef.onOpen(row, url)
},
onAdd() {
this.$refs.applyFormRef.onOpen()
},
onEdit(row) {
this.$refs.applyFormRef.onOpen(row)
},
onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要删除吗?"
})
.then(() => {
this.$axios.post("/platform/psychology/onlinePost/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
.catch(() => {})
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,73 @@
const info = {
template: /*language=HTML*/ `
<div>
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
<div class="detail-container">
<van-cell-group title="基础信息">
<van-cell title="咨询人">{{ viewData.userName }}</van-cell>
<van-cell title="咨询时间">{{ viewData.postingTime }}</van-cell>
<van-cell title="咨询主题">{{ viewData.postTitle }}</van-cell>
<van-cell title="主要内容" class="direction-column-cell">
{{ viewData.postContent }}
</van-cell>
</van-cell-group>
<van-cell-group title="回复信息">
<van-steps v-if="viewData.replyList && viewData.replyList.length > 0" direction="vertical" active-icon="setting">
<van-step v-for="(item, index) in viewData.replyList">
<div class="user-face">
<svg t="1639966214107" class="icon" viewBox="0 0 3208 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="6251" width="80" height="30">
<path d="M343.496334 367.185736m-225.049322 0a225.049322 225.049322 0 1 0 450.098644 0 225.049322 225.049322 0 1 0-450.098644 0Z"
fill="#FFFFFF" p-id="6252"></path>
<path d="M1879.043392 0H355.341035c-3.079622 0-20.846674 23.689402-23.689402 23.689402 14.687429 3.079622 23.689402-11.370913 33.638951 0C400.350899 58.512824 450.098644 99.49549 497.477449 94.757609h23.689402c37.903044 0 58.512824 5.685457 57.565248 41.693348a155.639373 155.639373 0 0 0 71.068207 118.447012 76.51677 76.51677 0 0 1 10.186443 6.869927 64.19828 64.19828 0 0 1 9.001973 93.573139 152.796645 152.796645 0 0 0-23.689403 134.318911 58.27593 58.27593 0 0 1 3.553411 12.555383A66.567221 66.567221 0 0 1 592.235058 578.495205a161.087936 161.087936 0 0 0-108.260569 87.650788 77.227452 77.227452 0 0 1-6.159244 12.555384c-14.924323 23.689402-19.42531 11.370913-47.378805 6.869926L426.409242 686.992667h9.001973l11.370913 23.689403h1432.261264C2071.164445 710.68207 2226.803818 562.149517 2226.803818 379.030437v-47.378804c0-183.11908-155.639373-331.651633-347.760426-331.651633z"
fill="#EDF5FE" p-id="6253"></path>
<path d="M688.650926 261.767896a74.147829 74.147829 0 0 0-9.949549-6.869927 156.586949 156.586949 0 0 1-67.514797-118.447012 65.619644 65.619644 0 0 0-63.961386-66.804114 61.355552 61.355552 0 0 0-13.266066 1.18447 154.218009 154.218009 0 0 1-126.975196-47.378805 65.145856 65.145856 0 0 0-36.718574-21.557356 21.320462 21.320462 0 0 0-12.318489 12.081595 324.544812 324.544812 0 0 0-58.039036 23.689403 334.020573 334.020573 0 0 1 58.27593-23.689403 21.79425 21.79425 0 0 1 12.555383-12.081595 64.19828 64.19828 0 0 0-54.722519 12.318489 78.88571 78.88571 0 0 0-10.423337 9.475761 154.691797 154.691797 0 0 1-126.975196 47.378805 65.619644 65.619644 0 0 0-76.51677 52.116685 61.355552 61.355552 0 0 0 0 13.266065 157.060737 157.060737 0 0 1-67.514797 118.447012 66.567221 66.567221 0 0 0-23.689402 90.967305 55.433201 55.433201 0 0 0 4.974775 9.475761 158.95589 158.95589 0 0 1 23.689402 134.555805 65.856538 65.856538 0 0 0 37.903044 85.281848 56.617672 56.617672 0 0 0 12.792277 3.553411 156.586949 156.586949 0 0 1 103.522688 87.650788 65.145856 65.145856 0 0 0 82.43912 40.982666 86.466318 86.466318 0 0 0 12.555383-5.92235 154.218009 154.218009 0 0 1 135.266488 0 66.567221 66.567221 0 0 0 22.268038 8.054397 64.672068 64.672068 0 0 0 66.330326-30.559329 59.934188 59.934188 0 0 0 5.685457-12.555384 156.586949 156.586949 0 0 1 103.522688-87.650788 66.330327 66.330327 0 0 0 54.248731-76.279876 58.27593 58.27593 0 0 0-3.55341-12.555383 158.482102 158.482102 0 0 1 23.689402-134.318911 66.330327 66.330327 0 0 0-7.580608-93.810033zM355.341035 564.281563v17.530158a129.107243 129.107243 0 0 0 99.258596 125.316938A129.107243 129.107243 0 0 1 355.341035 581.811721v-17.530158L194.016205 240.684328h81.017756L355.341035 416.933481V25.110766 416.933481l81.017756-176.486047h81.017756zM921.51775 298.249575a584.891343 584.891343 0 0 1-98.074125 96.415868l-20.60978-22.504932a501.978435 501.978435 0 0 0 94.757609-92.151776z m-86.703212-120.10527a415.275223 415.275223 0 0 1 71.068207 54.959414l-21.79425 21.320462a450.098644 450.098644 0 0 0-70.594419-55.433201z m295.643741 227.181369v154.691797h-29.848647v-20.846674h-218.890078v20.846674H852.818484v-154.691797z m-248.738725 104.944052h218.890078v-76.042981h-218.890078z m101.153748-275.507749a260.583426 260.583426 0 0 1-47.378804 62.303128l-19.188416-23.689402a225.996898 225.996898 0 0 0 60.171082-108.260569l30.559329 3.790305c-3.079622 11.607807-6.869927 23.689402-11.370913 36.718573H1160.780714v24.400085a351.55073 351.55073 0 0 1-41.930242 71.068207l-22.504932-18.003946a268.874716 268.874716 0 0 0 30.559329-47.378805h-68.462373c0 16.819476-2.36894 29.374859-3.553411 37.429256 18.003946 47.378805 61.118658 78.648816 129.581031 94.757609l-12.792277 29.137965c-65.619644-18.003946-108.023675-47.378805-127.448985-91.441093-20.372886 40.745772-62.540022 71.068207-126.264514 89.309047l-13.029171-27.716601c68.699267-18.003946 108.734357-48.800169 118.447011-92.151775a298.486469 298.486469 0 0 0 4.027199-38.85062zM1221.18869 299.197151h92.151775v189.515219c11.370913-9.949549 26.058343-23.689402 43.825394-41.693348l8.528185 32.454481A544.856253 544.856253 0 0 1 1286.334546 544.856253l-11.844701-27.242812a25.821449 25.821449 0 0 0 9.475761-18.951522v-170.089909h-62.776916z m51.169109-126.264514a502.926011 502.926011 0 0 1 71.068207 65.619644l-20.846674 21.320462a458.153041 458.153041 0 0 0-72.489571-66.093432z m170.089908 0a395.139231 395.139231 0 0 1-13.502959 42.640924h167.957863q0 231.445461-5.922351 288.53692a54.485625 54.485625 0 0 1-60.64487 53.301156l-40.508878-1.18447-7.343715-27.716601c23.689402 0 37.429256 1.658258 44.062289 1.658258 19.662204 0 31.033117-12.555383 34.586527-37.903044s4.500986-108.260569 5.448563-247.791148h-150.901493a310.33117 310.33117 0 0 1-56.617672 76.279875l-19.42531-23.689402a260.583426 260.583426 0 0 0 72.252677-129.581031z m-58.749717 121.526634h130.528607v195.200675h-130.528607z m29.848647 83.860484h71.068207v-58.749718h-71.068207z m71.068207 84.80806V402.71984h-71.068207v59.223505zM1741.881753 170.800591h29.848647v203.018178q-1.895152 126.975196-86.940107 185.961808l-23.689402-20.135992c52.827367-34.586527 79.359498-90.019729 80.307074-165.825816z m-75.095405 55.906989h29.848646V450.098644h-29.848646z m131.002394-40.508878H2037.2886v29.848647h-104.707158v52.353579h87.650788v208.940529c0 23.689402-10.660231 35.534103-32.217587 35.534103h-29.137965l-8.054397-29.848647 27.242813 1.658259c8.528185 0 12.792277-4.500986 12.792277-13.739854v-173.880213h-58.275929v260.583426h-30.085541v-260.583426h-58.27593v218.653184h-29.374859V268.400928h87.650789V216.047349h-104.707159z"
fill="#4492F4" p-id="6254"></path>
</svg>
<span style="position: relative; top: 2px">{{ item.userName }}</span>
</div>
<div>回复时间:{{ item.replyTime }}</div>
<div>回复内容:{{ item.replyContent }}</div>
</van-step>
</van-steps>
<div v-else class="empty-text">暂无回复信息</div>
</van-cell-group>
</div>
</van-action-sheet>
</div>
`,
data() {
return {
visible:false,
row: {},
viewData: {},
}
},
methods: {
onOpen(row, url) {
this.row = row
this.visible = true
this.fetchOne(url)
},
fetchOne(url) {
this.$axios.post(url, {id: this.row.id})
.then((resp) => {
this.viewData = resp.data
this.visible = true
})
}
},
style: /*language=CSS*/ `
/deep/ .empty-text {
font-size: 14px;
text-align: center;
padding: 10px 0;
}
/deep/ .user-face{
display: flex;
}
/deep/ .van-step__title {
font-size: 13px;
}
`
}
@@ -0,0 +1,68 @@
const applyForm = {
template: /*language=HTML*/ `
<div>
<van-action-sheet :close-on-click-overlay="false" title="回复信息" v-model="visible">
<van-form ref="formRef" class="form-container">
<van-cell-group title="基本情况" class="form-section">
<van-field label="咨询人" readonly :value="viewData.posterUserName"></van-field>
<van-field label="咨询时间" readonly :value="viewData.postingTime"></van-field>
<van-field label="咨询主题" readonly :value="viewData.postTitle"></van-field>
<van-field label="主要内容" readonly :value="viewData.postContent"></van-field>
</van-cell-group>
<van-cell-group title="我来回复" class="form-section">
<van-field
v-model="formData.replyContent"
name="replyContent"
label="回复内容"
type="textarea"
rows="4"
autosize
placeholder="请输入回复内容"
:rules="[{ required: true }]"
required
></van-field>
</van-cell-group>
<div class="form-actions">
<van-button @click="onSubmit" round type="info">提交</van-button>
</div>
</van-form>
</van-action-sheet>
</div>
`,
store,
data() {
return {
visible:false,
formData: {},
viewData: {},
}
},
methods: {
onOpen(row) {
this.viewData = clone({ ...row })
this.$set(this.formData, 'postId', row.id)
this.visible = true
},
onSubmit() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/platform/psychology/onlineReply/submit", this.formData).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.visible = false
this.$emit('refresh')
}
})
})
})
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,96 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</style>
<div id="app">
<van-nav-bar title="咨询回复" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<van-sticky offset-top="46px">
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
<van-dropdown-item v-model="pageForm.isReply" :options="replyOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/psychology/onlineReply/pageData"
:page_form.sync="pageForm"
ref="tableListRef"
title="postTitle"
@ready="doSearch">
<template v-slot="{index,row}">
<table-column label="姓名">{{row.posterUserName}}</table-column>
<table-column label="咨询时间">{{row.postingTime}}</table-column>
<table-column label="回复情况">
<van-tag color="#67c23a" v-if="row.replyCount > 0">已回复</van-tag>
<van-tag type="primary" v-else>未回复</van-tag>
</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" @click="onReply(row)">
<i class="fa fa-edit"></i>
<span>回复</span>
</div>
</template>
</table-list>
<info ref="infoRef"></info>
<apply-form ref="applyFormRef" @refresh="doSearch"></apply-form>
</div>
<script nonce="${cspNonce!}">
<!--#include('applyForm.js'){}#-->
<!--#include('../onlinePost/info.js'){}#-->
new Vue({
el: "#app",
store,
components: {
"apply-form": applyForm,
"info": info,
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: new Date().getFullYear(),
isReply: null,
},
replyOptions: [
{text: '全部', value: null},
{text: '已回复', value: true},
{text: '未回复', value: false},
],
}
},
methods: {
onView(row) {
const url = '/platform/psychology/onlineReply/fetchOne'
this.$refs.infoRef.onOpen(row, url)
},
onReply(row) {
this.$refs.applyFormRef.onOpen(row)
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->