532 lines
15 KiB
HTML
532 lines
15 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" v-cloak>
|
|
<van-nav-bar title="意见箱" fixed placeholder @click-left="pjaxReplace('/mobile/index')" left-text="返回" left-arrow></van-nav-bar>
|
|
|
|
<!-- 顶部Banner区域 -->
|
|
<div class="banner-section">
|
|
<div class="banner-content">
|
|
<div class="banner-text">
|
|
<h2>我们重视您的意见</h2>
|
|
<p>每一条建议都将认真对待</p>
|
|
</div>
|
|
<div class="banner-image">
|
|
<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48cGF0aCBkPSJNMTI1LjYgMTAyLjdsLTE5LTE2LjhtLTQuNy0yMy43bDExLjUtNi44TTU3LjQgMTZsMTEuNSAxMS43TTMxLjIgNTMuOGwyMy42IDcuOSIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6I2ZmZjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDtvcGFjaXR5Oi40Ii8+PHBhdGggZD0iTTY0LjEgMzEuN0w0NyA0OS45Yy0zIDMuMi0zLjEgOC4xLS4xIDExLjJsMjQuNCAyNWMzIDMuMSA3LjkgMy4yIDExIC4xTDk5IDY5YzMtMy4yIDMuMS04LjEuMS0xMS4yTDc0LjcgMzIuOGMtMyAzLjEtNy45IDMuMS0xMC42LTEuMXoiIHN0eWxlPSJmaWxsOiNmZmY7c3Ryb2tlOiNmZmY7c3Ryb2tlLW1pdGVybGltaXQ6MTAiLz48cGF0aCBkPSJNMTA4LjkgOTUuN2wtMTUuOC0xMi0xMi4yIDEzIDE0LjQgMTMuN2MuMyAyLjUgMi4zIDQuNSA0LjggNC41aDEzLjdjMi43IDAgNC45LTIuMiA0LjktNC45VjkzLjVjMC0yLjgtMi4xLTUtNC45LTV2OC40cy4xLTEuMi00LjkgMi44LjEtMyAuMS0zeiIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6I2ZmZjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMCIvPjwvc3ZnPg=="
|
|
alt="Feedback">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 功能卡片区域 -->
|
|
<div class="cards-container">
|
|
<!-- 提交意见 -->
|
|
<div class="feature-card" @click="goToSubmitPage">
|
|
<div class="card-icon submit-icon">
|
|
<van-icon name="edit"/>
|
|
</div>
|
|
<div class="card-info">
|
|
<h3>提交意见</h3>
|
|
<p>分享您的想法和建议</p>
|
|
</div>
|
|
<div class="card-arrow">
|
|
<van-icon name="arrow"/>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 我的意见 -->
|
|
<div class="feature-card" @click="goToMyOpinionsPage">
|
|
<div class="card-icon my-icon">
|
|
<van-icon name="records"/>
|
|
</div>
|
|
<div class="card-info">
|
|
<h3>我的意见</h3>
|
|
<p>查看您提交的所有意见</p>
|
|
</div>
|
|
<div class="card-arrow">
|
|
<van-icon name="arrow"/>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 意见管理(管理员) -->
|
|
<div class="feature-card" v-if="isAdmin" @click="goToAllOpinionsPage">
|
|
<div class="card-icon admin-icon">
|
|
<van-icon name="manager"/>
|
|
</div>
|
|
<div class="card-info">
|
|
<h3>意见管理</h3>
|
|
<p>管理所有用户提交的意见</p>
|
|
</div>
|
|
<div class="card-arrow">
|
|
<van-icon name="arrow"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 使用指南 -->
|
|
<div class="guide-container" v-if="!isAdmin">
|
|
<div class="guide-header">
|
|
<h3>使用指南</h3>
|
|
</div>
|
|
<div class="guide-steps">
|
|
<div class="guide-step">
|
|
<div class="step-number">1</div>
|
|
<div class="step-content">
|
|
<h4>提交意见</h4>
|
|
<p>点击"提交意见"按钮,填写您的意见和建议</p>
|
|
</div>
|
|
<div class="step-icon">
|
|
<van-icon name="edit"/>
|
|
</div>
|
|
</div>
|
|
<div class="step-divider"></div>
|
|
<div class="guide-step">
|
|
<div class="step-number">2</div>
|
|
<div class="step-content">
|
|
<h4>等待处理</h4>
|
|
<p>我们将在3个工作日内处理您的意见</p>
|
|
</div>
|
|
<div class="step-icon">
|
|
<van-icon name="underway-o"/>
|
|
</div>
|
|
</div>
|
|
<div class="step-divider"></div>
|
|
<div class="guide-step">
|
|
<div class="step-number">3</div>
|
|
<div class="step-content">
|
|
<h4>查看回复</h4>
|
|
<p>在"我的意见"中查看官方回复</p>
|
|
</div>
|
|
<div class="step-icon">
|
|
<van-icon name="comment-o"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 常见问题 -->
|
|
<div class="faq-container" v-if="!isAdmin">
|
|
<div class="faq-header">
|
|
<h3>常见问题</h3>
|
|
<span class="faq-subtitle">解答您的疑惑</span>
|
|
</div>
|
|
<div class="faq-list">
|
|
<div class="faq-item" :class="{'faq-active': activeFaq === 1}" @click="toggleFaq(1)">
|
|
<div class="faq-question">
|
|
<span class="faq-icon"><van-icon name="question-o"/></span>
|
|
<span>如何提交带附件的意见?</span>
|
|
<span class="faq-arrow"><van-icon name="arrow-down"/></span>
|
|
</div>
|
|
<div class="faq-answer" v-show="activeFaq === 1">
|
|
<p>在提交意见表单中,您可以上传最多3个文件作为附件,支持图片格式。点击附件上传区域,选择您要上传的文件即可。</p>
|
|
</div>
|
|
</div>
|
|
<div class="faq-item" :class="{'faq-active': activeFaq === 2}" @click="toggleFaq(2)">
|
|
<div class="faq-question">
|
|
<span class="faq-icon"><van-icon name="question-o"/></span>
|
|
<span>意见提交后多久能收到回复?</span>
|
|
<span class="faq-arrow"><van-icon name="arrow-down"/></span>
|
|
</div>
|
|
<div class="faq-answer" v-show="activeFaq === 2">
|
|
<p>我们会在3个工作日内处理您的意见,紧急问题会优先处理。您可以随时在"我的意见"中查看处理进度。</p>
|
|
</div>
|
|
</div>
|
|
<div class="faq-item" :class="{'faq-active': activeFaq === 3}" @click="toggleFaq(3)">
|
|
<div class="faq-question">
|
|
<span class="faq-icon"><van-icon name="question-o"/></span>
|
|
<span>我可以修改已提交的意见吗?</span>
|
|
<span class="faq-arrow"><van-icon name="arrow-down"/></span>
|
|
</div>
|
|
<div class="faq-answer" v-show="activeFaq === 3">
|
|
<p>提交后的意见暂不支持修改,如有补充,请重新提交并说明这是对之前意见的补充。我们会将相关意见关联处理。</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
:root {
|
|
--primary-color: rgb(0, 78, 100);
|
|
--primary-light: rgba(0, 78, 100, 0.1);
|
|
--secondary-color: #37A6BD;
|
|
--text-color: #333333;
|
|
--text-secondary: #666666;
|
|
--text-light: #999999;
|
|
--bg-color: #f6f6f6;
|
|
--card-bg: #ffffff;
|
|
--border-color: #eeeeee;
|
|
--success-color: #07c160;
|
|
--warning-color: #ff976a;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-color);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.page-container {
|
|
padding-bottom: 50px;
|
|
}
|
|
|
|
/* 顶部Banner */
|
|
.banner-section {
|
|
padding: 0;
|
|
height: 180px;
|
|
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
|
|
position: relative;
|
|
overflow: visible;
|
|
}
|
|
|
|
.banner-curve {
|
|
display: none;
|
|
}
|
|
|
|
.banner-content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 24px 20px 0;
|
|
height: 100%;
|
|
}
|
|
|
|
.banner-text {
|
|
color: white;
|
|
z-index: 2;
|
|
}
|
|
|
|
.banner-text h2 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.banner-text p {
|
|
font-size: 14px;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.banner-image {
|
|
width: 100px;
|
|
height: 100px;
|
|
z-index: 2;
|
|
}
|
|
|
|
.banner-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* 功能卡片 */
|
|
.cards-container {
|
|
padding: 20px 16px 16px;
|
|
margin-top: -20px;
|
|
position: relative;
|
|
z-index: 10;
|
|
background-color: var(--bg-color);
|
|
border-radius: 20px 20px 0 0;
|
|
}
|
|
|
|
.feature-card {
|
|
display: flex;
|
|
align-items: center;
|
|
background: var(--card-bg);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
margin-bottom: 12px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.feature-card:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.card-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 12px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin-right: 16px;
|
|
}
|
|
|
|
.card-icon .van-icon {
|
|
font-size: 24px;
|
|
color: white;
|
|
}
|
|
|
|
.submit-icon {
|
|
background: linear-gradient(135deg, #1989fa 0%, #39b9f9 100%);
|
|
}
|
|
|
|
.my-icon {
|
|
background: linear-gradient(135deg, #07c160 0%, #10d878 100%);
|
|
}
|
|
|
|
.admin-icon {
|
|
background: linear-gradient(135deg, #ff6b6b 0%, #ffaa7f 100%);
|
|
}
|
|
|
|
.card-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.card-info h3 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin-bottom: 4px;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.card-info p {
|
|
font-size: 13px;
|
|
color: var(--text-light);
|
|
margin: 0;
|
|
}
|
|
|
|
.card-arrow {
|
|
color: #ccc;
|
|
}
|
|
|
|
/* 使用指南 */
|
|
.guide-container {
|
|
padding: 0 16px 16px;
|
|
}
|
|
|
|
.guide-header {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.guide-header h3 {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.guide-steps {
|
|
background: var(--card-bg);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.guide-step {
|
|
display: flex;
|
|
align-items: center;
|
|
position: relative;
|
|
}
|
|
|
|
.step-number {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
background: var(--primary-color);
|
|
color: white;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
font-weight: 600;
|
|
margin-right: 16px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.step-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.step-content h4 {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
margin-bottom: 4px;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.step-content p {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
margin: 0;
|
|
}
|
|
|
|
.step-icon {
|
|
margin-left: 12px;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.step-divider {
|
|
height: 24px;
|
|
width: 1px;
|
|
background: #e8e8e8;
|
|
margin: 8px 0 8px 15px;
|
|
}
|
|
|
|
/* 常见问题 */
|
|
.faq-container {
|
|
padding: 0 16px 16px;
|
|
}
|
|
|
|
.faq-header {
|
|
margin-bottom: 16px;
|
|
display: flex;
|
|
align-items: baseline;
|
|
}
|
|
|
|
.faq-header h3 {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: var(--text-color);
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.faq-subtitle {
|
|
font-size: 12px;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.faq-list {
|
|
background: var(--card-bg);
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.faq-item {
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.faq-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.faq-question {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 16px;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
.faq-active .faq-question {
|
|
background-color: var(--primary-light);
|
|
}
|
|
|
|
.faq-icon {
|
|
color: var(--primary-color);
|
|
margin-right: 12px;
|
|
}
|
|
|
|
.faq-arrow {
|
|
margin-left: auto;
|
|
color: var(--text-light);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.faq-active .faq-arrow .van-icon {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.faq-answer {
|
|
padding: 0 16px 16px 44px;
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
border-top: 1px dashed var(--border-color);
|
|
background-color: rgba(0, 0, 0, 0.02);
|
|
}
|
|
|
|
/* 弹窗样式 */
|
|
.popup-title {
|
|
text-align: center;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
padding: 16px 0;
|
|
border-bottom: 1px solid #ebedf0;
|
|
}
|
|
|
|
.popup-content {
|
|
padding: 16px;
|
|
max-height: calc(100% - 60px);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.suggestion-content {
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.suggestion-title {
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
margin-bottom: 6px;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.suggestion-meta {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.attachment-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
new Vue({
|
|
el: '#app',
|
|
data: function () {
|
|
return {
|
|
isAdmin: false, // 控制是否为管理员
|
|
allSuggestions: [],
|
|
user: 'user1',
|
|
activeFaq: null,
|
|
totalSuggestions: 0,
|
|
respondedPercent: 0,
|
|
recentSuggestions: []
|
|
}
|
|
},
|
|
computed: {
|
|
userSuggestions: function () {
|
|
return this.allSuggestions.filter(function (item) {
|
|
return item.user === this.user;
|
|
}.bind(this));
|
|
}
|
|
},
|
|
methods: {
|
|
goToSubmitPage: function () {
|
|
window.location.href = '/platform/suggestionBox/h5/write';
|
|
},
|
|
goToMyOpinionsPage: function () {
|
|
window.location.href = '/platform/suggestionBox/h5/mine';
|
|
},
|
|
goToAllOpinionsPage: function () {
|
|
window.location.href = '/platform/suggestionBox/admin/h5';
|
|
},
|
|
toggleFaq: function (id) {
|
|
this.activeFaq = this.activeFaq === id ? null : id;
|
|
}
|
|
},
|
|
created: function () {
|
|
// 初始化数据
|
|
this.isAdmin = "${@shiro.hasRole('sysadmin')}" === "true"
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|