first commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<el-dialog title="查看详情" :visible.sync="viewDialogVisible" width="55%" top="100px"
|
||||
:close-on-click-modal="false">
|
||||
<el-form :model="formData" ref="ruleForm" :rules="rules" label-width="100px" label-suffix=":">
|
||||
<vi-title title="咨询信息"></vi-title>
|
||||
<el-form-item label="咨询人">
|
||||
<span>{{viewData.posterUserName}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="咨询主题" prop="postTitle">
|
||||
<span>{{viewData.postTitle}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要内容" prop="postContent">
|
||||
<span>{{viewData.postContent}}</span>
|
||||
</el-form-item>
|
||||
|
||||
<vi-title title="回复信息"></vi-title>
|
||||
<template v-if="viewData.replyList">
|
||||
<div class="reply-list">
|
||||
<div class="reply-list-item" v-for="item 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>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-user">{{item.replyUserName}}</div>
|
||||
<p class="content-text">{{item.replyContent}}</p>
|
||||
<div class="content-info">
|
||||
<span>{{item.replyTime}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
无人回复
|
||||
</template>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
@@ -0,0 +1,50 @@
|
||||
.reply-list{
|
||||
/*box-sizing: content-box;*/
|
||||
/*position: relative;*/
|
||||
}
|
||||
.reply-list-item{
|
||||
box-sizing: content-box;
|
||||
position: relative;
|
||||
}
|
||||
.reply-list-item>.user-face{
|
||||
margin: 24px 0 0 0px;
|
||||
position: absolute;
|
||||
width: 82px;
|
||||
}
|
||||
.reply-list-item>.content{
|
||||
position: relative;
|
||||
margin-left: 85px;
|
||||
padding: 22px 0 14px 0;
|
||||
border-top: 1px solid #e5e9ef;
|
||||
}
|
||||
|
||||
.reply-list-item>.content>.content-user{
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
padding-bottom: 4px;
|
||||
display: block;
|
||||
word-wrap: break-word;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.reply-list-item>.content>.content-text{
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
line-height: 20px;
|
||||
padding: 2px 0;
|
||||
font-size: 14px;
|
||||
text-shadow: none;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.reply-list-item>.content>.content-info{
|
||||
color: #99a2aa;
|
||||
line-height: 14px;
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
<!--
|
||||
#include
|
||||
|
||||
(
|
||||
"/platform/psychology/onlinePost/include/postInfoCss.html"
|
||||
)
|
||||
{
|
||||
}
|
||||
#-- >
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.isReply">
|
||||
<el-option :value="null" label="全部"></el-option>
|
||||
<el-option :value="true" label="已回复"></el-option>
|
||||
<el-option :value="false" label="未回复"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button type="primary" @click="openAdd">
|
||||
我要咨询
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="咨询记录" :app="this">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" stripe border :size="tableSize" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop==='isReply'" scope="{row}">
|
||||
<el-tag type="success" v-if="row.isReply">已回复</el-tag>
|
||||
<el-tag type="info" v-else>未回复</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="250">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
||||
<el-button v-if="!row.isReply" size="mini" type="danger" @click="doDelete(row.id)">删除咨询
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog :title="formData.id ? '编辑咨询内容' : '发布咨询内容'" :visible.sync="addDialogVisible" width="55%" top="100px"
|
||||
:close-on-click-modal="false">
|
||||
<el-form :model="formData" ref="ruleForm" :rules="rules" label-width="100px" label-suffix=":">
|
||||
<el-row type="flex" :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="咨询人姓名">
|
||||
<el-input v-model="formData.posterUserName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="咨询人工号">
|
||||
<el-input v-model="formData.posterLoginName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="咨询主题" prop="postTitle">
|
||||
<el-input v-model="formData.postTitle" maxlength="20" placeholder="请简约填写咨询主题,不超过20个字"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="主要内容" prop="postContent">
|
||||
<el-input type="textarea" rows="5" v-model="formData.postContent" maxlength="500"
|
||||
placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<div class="text-primary">
|
||||
<i class="el-icon-warning"></i>
|
||||
提示:不会发布您的个人隐私信息,您咨询的内容只有心理咨询师可查看并回复。
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="addDialogVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="doAdd">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<!--#include("/platform/psychology/onlinePost/include/postInfo.html"){}#-->
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'posterLoginName', label: '工号'},
|
||||
{prop: 'posterUserName', label: '姓名'},
|
||||
{prop: 'postTitle', label: '标题'},
|
||||
{prop: 'postingTime', label: '咨询时间'},
|
||||
{prop: 'isReply', label: '回复情况'}
|
||||
],
|
||||
addDialogVisible: false,
|
||||
viewDialogVisible: false,
|
||||
rules: {
|
||||
postTitle: [{required: true, message: '请输入咨询主题', trigger: ['change', 'blur']}],
|
||||
postContent: [{required: true, message: '请输入咨询内容', trigger: ['change', 'blur']}],
|
||||
},
|
||||
formData: {
|
||||
postTitle: null,
|
||||
postContent: null
|
||||
},
|
||||
pageForm: {
|
||||
isReply: null,
|
||||
year: null
|
||||
},
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd() {
|
||||
this.addDialogVisible = true
|
||||
if (this.$refs['ruleForm']) {
|
||||
this.$refs['ruleForm'].resetFields()
|
||||
}
|
||||
this.$set(this.formData, 'posterLoginName', "${@shiro.getPrincipalProperty('loginname')}")
|
||||
this.$set(this.formData, 'posterUserName', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'postTitle', null)
|
||||
this.$set(this.formData, 'postContent', null)
|
||||
delete this.formData.id
|
||||
},
|
||||
async doAdd() {
|
||||
const valid = await this.$refs['ruleForm'].validate()
|
||||
if (valid) {
|
||||
const method = this.formData.id ? '/doEdit' : '/doAdd'
|
||||
const resp = await $.post(loc() + method, this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.addDialogVisible = false
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post(loc() + '/doDelete', {id})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
},
|
||||
openEdit(row) {
|
||||
const {id, posterUserName, posterLoginName, postTitle, postContent} = row
|
||||
this.formData = {
|
||||
id, posterUserName, posterLoginName, postTitle, postContent
|
||||
}
|
||||
this.addDialogVisible = true
|
||||
},
|
||||
openView(row) {
|
||||
this.viewDialogVisible = true
|
||||
this.viewData = row
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = new Date().getFullYear().toString()
|
||||
this.pageForm.isReply = null
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,173 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
<!--
|
||||
#include
|
||||
|
||||
(
|
||||
"/platform/psychology/onlinePost/include/postInfoCss.html"
|
||||
)
|
||||
{
|
||||
}
|
||||
#-- >
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.isReply">
|
||||
<el-option :value="null" label="全部"></el-option>
|
||||
<el-option :value="true" label="已回复"></el-option>
|
||||
<el-option :value="false" label="未回复"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="咨询列表" :app="this">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" stripe border :size="tableSize" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop==='replyCount'" scope="{row}">
|
||||
<el-tag type="success" v-if="row.replyCount>0">已回复</el-tag>
|
||||
<el-tag type="info" v-else>未回复</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="250">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button size="mini" type="primary" @click="openReply(row)">回复</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="回复咨询" :visible.sync="replyDialogVisible" width="55%" top="100px"
|
||||
:close-on-click-modal="false">
|
||||
<el-form :model="formData" ref="ruleForm" :rules="rules" label-width="100px" label-suffix=":">
|
||||
<vi-title title="咨询信息"></vi-title>
|
||||
<el-form-item label="咨询人">
|
||||
<span>{{formData.posterUserName}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="咨询主题" prop="postTitle">
|
||||
<span>{{formData.postTitle}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要内容" prop="postContent">
|
||||
<span>{{formData.postContent}}</span>
|
||||
</el-form-item>
|
||||
|
||||
<vi-title title="我来回复"></vi-title>
|
||||
<el-form-item label="回复内容" prop="replyContent">
|
||||
<el-input type="textarea" rows="3" v-model="formData.replyContent"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row type="flex" justify="center">
|
||||
<el-button @click="replyDialogVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="doReply">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<!--#include("/platform/psychology/onlinePost/include/postInfo.html"){}#-->
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'posterUserName', label: '姓名'},
|
||||
{prop: 'postTitle', label: '标题'},
|
||||
{prop: 'postingTime', label: '咨询时间'},
|
||||
{prop: 'replyCount', label: '回复情况'}
|
||||
],
|
||||
replyDialogVisible: false,
|
||||
viewDialogVisible: false,
|
||||
rules: {
|
||||
replyContent: [{required: true, message: '请输入回复内容', trigger: ['change', 'blur']}],
|
||||
|
||||
},
|
||||
formData: {
|
||||
postTitle: null,
|
||||
postContent: null,
|
||||
replyContent: null
|
||||
},
|
||||
pageForm: {
|
||||
isReply: null,
|
||||
year: null
|
||||
},
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openReply(row) {
|
||||
const {id, posterUserName, postTitle, postContent} = row
|
||||
this.formData = {
|
||||
id, posterUserName, postTitle, postContent,
|
||||
replyContent: null
|
||||
}
|
||||
this.replyDialogVisible = true
|
||||
},
|
||||
async doReply() {
|
||||
const valid = await this.$refs['ruleForm'].validate()
|
||||
if (valid) {
|
||||
const params = {
|
||||
replyContent: this.formData.replyContent,
|
||||
postId: this.formData.id
|
||||
}
|
||||
const resp = await $.post(loc() + '/doReply', params)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.replyDialogVisible = false
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
this.viewDialogVisible = true
|
||||
this.viewData = row
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = new Date().getFullYear().toString()
|
||||
this.pageForm.isReply = null
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user