1、新增功能:互动管理-新用户注册统计

2、完成互动管理各菜单内容统计、声音提示
This commit is contained in:
1378012178@qq.com 2025-02-10 14:29:15 +08:00
parent a8c4158110
commit 7dea1da754
14 changed files with 754 additions and 282 deletions

BIN
src/assets/mp3/jjqz.mp3 Normal file

Binary file not shown.

BIN
src/assets/mp3/lts.mp3 Normal file

Binary file not shown.

BIN
src/assets/mp3/ts.mp3 Normal file

Binary file not shown.

BIN
src/assets/mp3/xxzx.mp3 Normal file

Binary file not shown.

BIN
src/assets/mp3/xyhzc.mp3 Normal file

Binary file not shown.

View File

@ -38,6 +38,7 @@ const mainRoutes = {
{ path: '/allocationList', component: _import('allocation/allocationList'), name: 'allocationList', meta: { title: '配置列表', isTab: true } }, { path: '/allocationList', component: _import('allocation/allocationList'), name: 'allocationList', meta: { title: '配置列表', isTab: true } },
{ path: '/financeList', component: _import('finance/financeList'), name: 'financeList', meta: { title: '财务中心', isTab: true } }, { path: '/financeList', component: _import('finance/financeList'), name: 'financeList', meta: { title: '财务中心', isTab: true } },
{ path: '/message', component: _import('message/message'), name: 'message', meta: { title: '消息中心', isTab: true } }, { path: '/message', component: _import('message/message'), name: 'message', meta: { title: '消息中心', isTab: true } },
{ path: '/newUserTip', component: _import('newUserTip/newUserTip'), name: 'newUserTip', meta: { title: '新用户注册', isTab: true } },
{ path: '/taskConfig', component: _import('taskConfig/taskConfig'), name: 'taskConfig', meta: { title: '任务配置', isTab: true } }, { path: '/taskConfig', component: _import('taskConfig/taskConfig'), name: 'taskConfig', meta: { title: '任务配置', isTab: true } },
{ path: '/bannerList', component: _import('banner/bannerList'), name: 'bannerList', meta: { title: '首页装修', isTab: true } }, { path: '/bannerList', component: _import('banner/bannerList'), name: 'bannerList', meta: { title: '首页装修', isTab: true } },
{ path: '/materialPackage', component: _import('materialPackage/materialPackage'), name: 'materialPackage', meta: { title: '物料包', isTab: true } }, { path: '/materialPackage', component: _import('materialPackage/materialPackage'), name: 'materialPackage', meta: { title: '物料包', isTab: true } },

View File

@ -432,6 +432,17 @@ export default {
}); });
}).catch(() => {}); }).catch(() => {});
}, },
//
dataSelectSpq() {
this.$http({
url: this.$http.adornUrl('/bl/shipinquan/dataSelectSpq'),
method: 'get',
}).then(({ data }) => {
if (data.data >= 0) {
this.$cookie.set('numberSpq', data.data)
}
})
},
// //
handleApprove() { handleApprove() {
if (this.status == "") { if (this.status == "") {
@ -472,6 +483,7 @@ export default {
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.handleSelect(); this.handleSelect();
this.dataSelectSpq();
}, },
}); });
} else { } else {
@ -572,6 +584,7 @@ export default {
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.handleSelect(); this.handleSelect();
this.dataSelectSpq();
}, },
}); });
} else { } else {

View File

@ -34,11 +34,12 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="byUserName" label="被投诉用户" width="100"> <el-table-column prop="byUserName" label="被投诉技师" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row.byUserId)"> <span v-if="scope.row.byUserId != -1" style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row.byUserId)">
{{ scope.row.byUserName?scope.row.byUserName:'未绑定'}} {{ scope.row.byUserName?scope.row.byUserName:'未绑定'}}
</span> </span>
<span v-else style="color: #333;" >平台</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="typeName" label="投诉类型" width="150"> <el-table-column prop="typeName" label="投诉类型" width="150">
@ -69,17 +70,22 @@
<el-table-column prop="createAt" label="投诉时间" width="100"></el-table-column> <el-table-column prop="createAt" label="投诉时间" width="100"></el-table-column>
<el-table-column prop="type" label="状态" width="100"> <el-table-column prop="type" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type=='0'">待审核</span> <span v-if="scope.row.type=='0' && scope.row.byUserId!='-1'">待审核</span>
<span v-if="scope.row.type=='1'">通过</span> <span v-if="scope.row.type=='0' && scope.row.byUserId=='-1'">待回复</span>
<span v-if="scope.row.type=='1' && scope.row.byUserId!='-1'">通过</span>
<span v-if="scope.row.type=='1' && scope.row.byUserId=='-1'">已回复</span>
<span v-if="scope.row.type=='2'">拒绝</span> <span v-if="scope.row.type=='2'">拒绝</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100" align="center" fixed="right"> <el-table-column label="操作" width="100" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" v-if="scope.row.type=='0'" @click="passClicks1(scope.row)" <el-button size="mini" type="primary" v-if="scope.row.type=='0' && scope.row.byUserId == '-1'" @click="passClicks1(scope.row,'回复')"
:disabled="!isAuth('business:tongguo')" style="margin:5px">回复
</el-button>
<el-button size="mini" type="primary" v-if="scope.row.type=='0' && scope.row.byUserId != '-1'" @click="passClicks1(scope.row,'通过')"
:disabled="!isAuth('business:tongguo')" style="margin:5px">通过 :disabled="!isAuth('business:tongguo')" style="margin:5px">通过
</el-button> </el-button>
<el-button size="mini" type="primary" v-if="scope.row.type=='0'" @click="refuseClick(scope.row)" <el-button size="mini" type="primary" v-if="scope.row.type=='0' && scope.row.byUserId != '-1'" @click="refuseClick(scope.row,'拒绝')"
:disabled="!isAuth('business:jujue')" style="margin:5px">拒绝 :disabled="!isAuth('business:jujue')" style="margin:5px">拒绝
</el-button> </el-button>
</template> </template>
@ -92,16 +98,16 @@
</el-pagination> </el-pagination>
</div> </div>
<!-- 任务拒绝弹框 --> <!-- 任务拒绝弹框 -->
<el-dialog title="拒绝" :visible.sync="dialogFormVisible" center> <el-dialog :title="tsbt" :visible.sync="dialogFormVisible" center>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span <span
style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;">拒绝理由</span> style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;">{{(tsbt=='回复')?(tsbt+'内容'):(tsbt+'理由')}}</span>
<el-input style="width:50%;" v-model="content" type="textarea" :rows="4" placeholder="请输入拒绝理由"> <el-input style="width:50%;" v-model="content" type="textarea" :rows="4" :placeholder="'请输入'">
</el-input> </el-input>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button> <el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="refuseto()"> </el-button> <el-button type="primary" @click="replyto()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-tab-pane> </el-tab-pane>
@ -221,6 +227,7 @@
], ],
content: '', content: '',
status: 1, status: 1,
tsbt:'',
helpTakeId: '', helpTakeId: '',
indentNumbers: '', indentNumbers: '',
complaintId: '', complaintId: '',
@ -373,18 +380,19 @@
}) })
}, },
// //
refuseClick(rows) { refuseClick(rows,tip) {
this.tsbt = tip
this.status = 2 this.status = 2
this.helpTakeId = rows.id this.helpTakeId = rows.id
this.content = '' this.content = ''
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
refuseto() { replyto() {
if (this.content == '') { if (this.content == '') {
this.$notify({ this.$notify({
title: '提示', title: '提示',
duration: 1800, duration: 1800,
message: '请输入拒绝理由', message: '请输入'+this.status==1?'通过':'拒绝'+'理由',
type: 'warning' type: 'warning'
}); });
return return
@ -410,6 +418,7 @@
this.content = '' this.content = ''
this.status = -1 this.status = -1
this.dataSelect() this.dataSelect()
this.dataSelectPy()
} }
}) })
} else { } else {
@ -424,7 +433,7 @@
}) })
}, },
// //
passClicks(row) { passClicks(row,tip) {
this.content = '同意' this.content = '同意'
this.$http({ this.$http({
url: this.$http.adornUrl('message/auditMessage'), url: this.$http.adornUrl('message/auditMessage'),
@ -463,47 +472,29 @@
}) })
}, },
// //
passClicks1(row) { dataSelectPy() {
this.status = 1
this.content = '同意'
this.$http({ this.$http({
url: this.$http.adornUrl('message/auditMessage'), url: this.$http.adornUrl('message/selectMessageCount'),
method: 'post', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
'ids': row.id, 'state': 7,
'status': 1,
'auditContent': this.content,
}) })
}).then(({ }).then(({
data data
}) => { }) => {
if (data.code == 0) { if (data.data >= 0) {
this.$message({ this.$cookie.set('numberDts', data.data)
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.content = ''
this.status = -1
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'error',
duration: 1500,
onClose: () => {
this.content = ''
this.status = -1
this.dataSelect()
}
})
} }
}) })
}, },
passClicks1(rows,tip){
this.tsbt = tip
this.status = 1
this.helpTakeId = rows.id
this.content = ''
this.dialogFormVisible = true
},
// //
advertNotice() { advertNotice() {
this.dialogFormVisible2 = true this.dialogFormVisible2 = true

View File

@ -127,6 +127,22 @@
} }
}, },
methods: { methods: {
//
dataSelectJjqz() {
this.$http({
url: this.$http.adornUrl('message/selectMessageCount'),
method: 'get',
params: this.$http.adornParams({
'state': 9,
})
}).then(({
data
}) => {
if (data.data >= 0) {
this.$cookie.set('numberJjqz', data.data)
}
})
},
// //
changeFun(val) { changeFun(val) {
this.checkBoxData = val this.checkBoxData = val
@ -244,6 +260,7 @@
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.dataSelect() this.dataSelect()
this.dataSelectJjqz()
} }
}) })
} else { } else {

View File

@ -8,9 +8,7 @@
</a> </a>
</h1> </h1>
</div> </div>
<div><audio ref="audioPlayer" ></audio> <audio ref="audioPlayer" ></audio>
<el-button id="aaaaaaaaaa">播放</el-button>
</div>
<div class="site-navbar__body clearfix"> <div class="site-navbar__body clearfix">
<el-menu class="site-navbar__menu" mode="horizontal"> <el-menu class="site-navbar__menu" mode="horizontal">
<el-menu-item class="site-navbar__switch" index="0" @click="sidebarFold = !sidebarFold"> <el-menu-item class="site-navbar__switch" index="0" @click="sidebarFold = !sidebarFold">
@ -72,10 +70,10 @@
<script> <script>
import UpdatePassword from './main-navbar-update-password' import UpdatePassword from './main-navbar-update-password'
import tipmap3 from '@/assets/mp3/tip.mp3';
import { import {
clearLoginInfo clearLoginInfo
} from '@/utils' } from '@/utils'
import {speak} from '@/utils/speechReminder.js'
export default { export default {
data() { data() {
return { return {
@ -88,6 +86,9 @@ export default {
chatNumJl: 0, chatNumJl: 0,
chatNumSpq:0, chatNumSpq:0,
chatNumQy: 0, chatNumQy: 0,
chatNumLts: 0,
chatNumXxzx:0,
chatNumXyhzc:0,
chatNumJjqz: 0, chatNumJjqz: 0,
chatNumYh: 0, chatNumYh: 0,
chatNumJg: 0, chatNumJg: 0,
@ -161,6 +162,7 @@ export default {
this.$cookie.set('numberJg', '') this.$cookie.set('numberJg', '')
this.$cookie.set('numberLts', '') this.$cookie.set('numberLts', '')
this.$cookie.set('numberSpq', '') this.$cookie.set('numberSpq', '')
this.$cookie.set('numberXxzx', '')
sessionStorage.clear() sessionStorage.clear()
//router.options.isAddDynamicMenuRoutes = false; //router.options.isAddDynamicMenuRoutes = false;
this.$router.push({ this.$router.push({
@ -316,6 +318,7 @@ export default {
}) => { }) => {
if (data.data >= 0) { if (data.data >= 0) {
this.$cookie.set('numberDts', data.data) this.$cookie.set('numberDts', data.data)
if (data.data > 0) this.playAudio(require('@/assets/mp3/ts.mp3'))
} }
}) })
}, },
@ -332,6 +335,7 @@ export default {
}) => { }) => {
if (data.data >= 0) { if (data.data >= 0) {
this.$cookie.set('numberJjqz', data.data) this.$cookie.set('numberJjqz', data.data)
if (data.data > 0) this.playAudio(require('@/assets/mp3/jjqz.mp3'))
} }
}) })
}, },
@ -388,8 +392,8 @@ export default {
} }
}) })
}, },
playAudio(){ playAudio(media){
this.$refs.audioPlayer.src = require('@/assets/mp3/tip.mp3'); this.$refs.audioPlayer.src = media;
this.$refs.audioPlayer.play(); this.$refs.audioPlayer.play();
}, },
// //
@ -400,10 +404,31 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
if (data.data >= 0) { if (data.data >= 0) {
this.$cookie.set('numberSpq', data.data) this.$cookie.set('numberSpq', data.data)
document.getElementById('aaaaaaaaaa').addEventListener('click',()=>{ if (data.data > 0) this.playAudio(require('@/assets/mp3/spq.mp3'))
console.log("dddd") }
this.playAudio() })
}) },
//
dataSelectXxzx() {
this.$http({
url: this.$http.adornUrl('/message/dataSelectXxzx'),
method: 'get',
}).then(({ data }) => {
if (data.data >= 0) {
this.$cookie.set('numberXxzx', data.data)
if (data.data > 0) this.playAudio(require('@/assets/mp3/xxzx.mp3'))
}
})
},
//
dataSelectXyhzc() {
this.$http({
url: this.$http.adornUrl('/message/dataSelectXyhzc'),
method: 'get',
}).then(({ data }) => {
if (data.data >= 0) {
this.$cookie.set('numberXyhzc', data.data)
if (data.data > 0) this.playAudio(require('@/assets/mp3/xyhzc.mp3'))
} }
}) })
}, },
@ -419,6 +444,7 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
if (data.data >= 0) { if (data.data >= 0) {
this.$cookie.set('numberLts', data.data) this.$cookie.set('numberLts', data.data)
if (data.data > 0) this.playAudio(require('@/assets/mp3/lts.mp3'))
} }
}) })
}, },
@ -547,6 +573,9 @@ export default {
} }
}, },
mounted() { mounted() {
// setInterval(() => {
// speak('',{})
// }, 3000);
this.getRingId(); this.getRingId();
this.userSelect() this.userSelect()
// this.chatSelect() // this.chatSelect()
@ -559,6 +588,8 @@ export default {
this.dataSelectYh() this.dataSelectYh()
this.dataSelectLts() this.dataSelectLts()
this.dataSelectSpq() this.dataSelectSpq()
this.dataSelectXxzx()
this.dataSelectXyhzc()
if ((this.userId && this.ringOrderId) && (this.userId == this.ringOrderId)) { if ((this.userId && this.ringOrderId) && (this.userId == this.ringOrderId)) {
this.dataSelectJg() this.dataSelectJg()
this.dataSelectCs() this.dataSelectCs()
@ -585,7 +616,25 @@ export default {
// this.chatNumQy = setInterval(() => { // this.chatNumQy = setInterval(() => {
// this.dataSelectPy() // this.dataSelectPy()
// }, 60000) // }, 60000)
// }, 8000); // }, 16000);
// //
// setTimeout(() => {
// this.chatNumLts = setInterval(() => {
// this.dataSelectLts()
// }, 60000)
// }, 24000);
// //
// setTimeout(() => {
// this.chatNumXxzx = setInterval(() => {
// this.dataSelectXxzx()
// }, 60000)
// }, 32000);
// //
// setTimeout(() => {
this.chatNumXyhzc = setInterval(() => {
this.dataSelectXyhzc()
}, 8000)
// }, 32000);
// // // //
// this.chatNumJl = setInterval(() => { // this.chatNumJl = setInterval(() => {
// this.dataSelect() // this.dataSelect()
@ -608,15 +657,24 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
// //
//
// clearInterval(this.chatNumJjqz);
// //
// clearInterval(this.chatNumSpq);
// //
// clearInterval(this.chatNumQy);
// //
// clearInterval(this.chatNumLts);
// //
// clearInterval(this.chatNumXxzx);
// //
// clearInterval(this.chatNumXyhzc);
// clearInterval(this.chatNum) // clearInterval(this.chatNum)
// clearInterval(this.chatNumJl); // clearInterval(this.chatNumJl);
// clearInterval(this.chatNumQy);
// clearInterval(this.chatNumJjqz);
// clearInterval(this.chatNumYh); // clearInterval(this.chatNumYh);
// clearInterval(this.chatNumJg); // clearInterval(this.chatNumJg);
// clearInterval(this.chatNumCs); // clearInterval(this.chatNumCs);
// clearInterval(this.chatNumXdd); // clearInterval(this.chatNumXdd);
// clearInterval(this.chatNumSpq);
} }
} }
</script> </script>

View File

@ -28,6 +28,9 @@
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg> <icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span> <span>{{ menu.name }}</span>
</span> </span>
<el-badge class="item" v-if="menu.menuId==41&&chatNumXxzx!=0" :value="chatNumXxzx">
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==79&&chatNumLts!=0" :value="chatNumLts"> <el-badge class="item" v-if="menu.menuId==79&&chatNumLts!=0" :value="chatNumLts">
<span> </span> <span> </span>
</el-badge> </el-badge>
@ -49,6 +52,9 @@
<el-badge class="item" v-if="menu.menuId==314&&chatNumSpq!=0" :value="chatNumSpq"> <el-badge class="item" v-if="menu.menuId==314&&chatNumSpq!=0" :value="chatNumSpq">
<span> </span> <span> </span>
</el-badge> </el-badge>
<el-badge class="item" v-if="menu.menuId==321&&chatNumXyhzc!=0" :value="chatNumXyhzc">
<span> </span>
</el-badge>
</el-menu-item> </el-menu-item>
</template> </template>
@ -65,6 +71,8 @@ export default {
chatNumFwz:0, chatNumFwz:0,
chatNumLts:0, chatNumLts:0,
chatNumSpq:0, chatNumSpq:0,
chatNumXxzx:0,
chatNumXyhzc:0,
} }
}, },
props: { props: {
@ -100,7 +108,7 @@ export default {
// //
havaMsg(index){ havaMsg(index){
if(index == 311){ if(index == 311){
return this.chatNumDrz != 0 || this.chatNumDts != 0 || this.chatNumJjqz != 0 || this.chatNumDsm != 0 || this.chatNumFwz != 0 || this.chatNumLts != 0 || this.chatNumSpq != 0 return this.chatNumDrz != 0 || this.chatNumDts != 0 || this.chatNumJjqz != 0 || this.chatNumDsm != 0 || this.chatNumFwz != 0 || this.chatNumLts != 0 || this.chatNumSpq != 0 || this.chatNumXxzx != 0 || this.chatNumXyhzc != 0
} }
return false return false
} }
@ -129,7 +137,12 @@ export default {
if(this.$cookie.get('numberSpq')){ if(this.$cookie.get('numberSpq')){
this.chatNumSpq = this.$cookie.get('numberSpq') this.chatNumSpq = this.$cookie.get('numberSpq')
} }
if(this.$cookie.get('numberXxzx')){
this.chatNumXxzx = this.$cookie.get('numberXxzx')
}
if(this.$cookie.get('numberXyhzc')){
this.chatNumXyhzc = this.$cookie.get('numberXyhzc')
}
}, 1000) }, 1000)
// this.chatNum2 = setInterval(() => { // this.chatNum2 = setInterval(() => {
// this.messageSelect2() // this.messageSelect2()

View File

@ -1,6 +1,10 @@
<template> <template>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="意见反馈" name="first"> <el-tab-pane label="意见反馈" name="first">
<div style="margin-right:2%;text-align:right;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="dataSelect">刷新
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column prop="id" label="编号" width="80"> <el-table-column prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
@ -10,6 +14,20 @@
</el-table-column> </el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180"> <el-table-column prop="createAt" label="创建时间" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="isSee" label="状态" width="180">
<template slot-scope="scope">
<span v-if="scope.row.isSee == 2" style="color: #67C23A;">已读</span>
<span v-else style="color: #909399;">未读</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="changeState(scope.row, true)"
v-if="scope.row.isSee != 2">标为已读</el-button>
<el-button type="info" size="small" @click="changeState(scope.row, false)"
v-if="scope.row.isSee == 2">标为未读</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;"> <div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
@ -19,6 +37,10 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="注销账号" name="fourth"> <el-tab-pane label="注销账号" name="fourth">
<div style="margin-right:2%;text-align:right;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="dataSelect">刷新
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column prop="id" label="编号" width="80"> <el-table-column prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
@ -146,244 +168,289 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
limit: 10, limit: 10,
page: 1, page: 1,
state: 2, state: 2,
url: '', url: '',
title: '', title: '',
type: '', type: '',
id: '',
types: [{
value: 'word',
label: '文字'
},
{
value: 'url',
label: '链接'
}
],
form: {
id: '', id: '',
title: '',
url: '',
type: '',
state: '',
types: [{ types: [{
value: 'word', value: 'word',
label: '文字' label: '文字'
},
{
value: 'url',
label: '链接'
}
],
form: {
id: '',
title: '',
url: '',
type: '',
state: '',
types: [{
value: 'word',
label: '文字'
},
{
value: 'url',
label: '链接'
}
],
}, },
phone: '', {
content: '', value: 'url',
flag: '', label: '链接'
flags: [{ }
value: 1,
label: '单个用户'
},
{
value: 2,
label: '全部用户'
}
], ],
formLabelWidth: '200px', },
activeName: 'first', phone: '',
tableDataLoading: false, content: '',
dialogFormVisible1: false, flag: '',
dialogFormVisible2: false, flags: [{
dialogFormVisible: false, value: 1,
tableData: [], label: '单个用户'
},
{
value: 2,
label: '全部用户'
}
],
formLabelWidth: '200px',
activeName: 'first',
tableDataLoading: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible: false,
tableData: [],
}
},
methods: {
//
dataSelectXxzx() {
this.$http({
url: this.$http.adornUrl('/message/dataSelectXxzx'),
method: 'get',
}).then(({ data }) => {
if (data.data >= 0) {
this.$cookie.set('numberXxzx', data.data)
}
})
},
//
changeState(row, type) {
let isSee = 1
if (type) isSee = 2
else isSee = 1
this.$http({
url: this.$http.adornUrl('message/updateMessage'),
method: 'post',
data: this.$http.adornData({
'id': row.id,
'isSee': isSee
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
this.dataSelectXxzx()
}
})
} else {
this.$notify({
title: '提示',
duration: 1800,
message: data.msg,
type: 'warning'
})
}
})
},
//
updataDetails(row) {
this.$router.push({
path: '/userDetail',
query: {
userId: row.userId
}
});
},
handleSizeChange(val) {
this.limit = val;
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
handleClick(tab, event) {
if (tab._props.label == '意见反馈') {
this.page = 1
this.limit = 10
this.state = 2
this.dataSelect()
}
if (tab._props.label == '注销账号') {
this.page = 1
this.limit = 5
this.state = 3
this.dataSelect()
}
if (tab._props.label == '消息推送') {
this.page = 1
this.limit = 5
this.state = 8
this.dataSelect()
} }
}, },
methods: { //
// magNotice() {
updataDetails(row) { this.dialogFormVisible2 = true
this.$router.push({ },
path: '/userDetail', //
query: { magNoticeTo() {
userId: row.userId if (this.flag == '') {
} this.$notify({
title: '提示',
duration: 1800,
message: '请选择类型',
type: 'warning'
}); });
}, return
handleSizeChange(val) { }
this.limit = val; if (this.title == '') {
this.dataSelect() this.$notify({
}, title: '提示',
handleCurrentChange(val) { duration: 1800,
this.page = val; message: '请输入标题',
this.dataSelect() type: 'warning'
}, });
handleClick(tab, event) { return
if (tab._props.label == '意见反馈') { }
this.page = 1 if (this.content == '') {
this.limit = 10 this.$notify({
this.state = 2 title: '提示',
this.dataSelect() duration: 1800,
} message: '请输入内容',
if (tab._props.label == '注销账号') { type: 'warning'
this.page = 1 });
this.limit = 5 return
this.state = 3 }
this.dataSelect() if (this.flag == 1) {
} if (this.phone == '') {
if (tab._props.label == '消息推送') {
this.page = 1
this.limit = 5
this.state = 8
this.dataSelect()
}
},
//
magNotice() {
this.dialogFormVisible2 = true
},
//
magNoticeTo() {
if (this.flag == '') {
this.$notify({ this.$notify({
title: '提示', title: '提示',
duration: 1800, duration: 1800,
message: '请选择类型', message: '请输入用户手机号',
type: 'warning' type: 'warning'
}); });
return return
} }
if (this.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入标题',
type: 'warning'
});
return
}
if (this.content == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入内容',
type: 'warning'
});
return
}
if (this.flag == 1) {
if (this.phone == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入用户手机号',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('/cash/sendMsg'),
method: 'get',
params: this.$http.adornParams({
'title': this.title,
'content': this.content,
'phone': this.phone,
'flag': this.flag
})
}).then(({
data
}) => {
this.dialogFormVisible2 = false
if (data.code == -100) {
this.$message({
message: data.msg,
type: 'error',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.phone = ''
this.flag = ''
this.dataSelect()
}
})
}
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.phone = ''
this.flag = ''
this.dataSelect()
}
})
}
})
}
if (this.flag == 2) {
this.$http({
url: this.$http.adornUrl('/cash/sendMsg'),
method: 'get',
params: this.$http.adornParams({
'title': this.title,
'content': this.content,
'flag': this.flag,
})
}).then(({
data
}) => {
this.dialogFormVisible2 = false
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.flag = ''
this.dataSelect()
}
})
}
})
}
},
//
dataSelect() {
this.tableDataLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`message/page/${this.state}/${this.page}/${this.limit}`), url: this.$http.adornUrl('/cash/sendMsg'),
method: 'get', method: 'get',
params: this.$http.adornParams({}) params: this.$http.adornParams({
'title': this.title,
'content': this.content,
'phone': this.phone,
'flag': this.flag
})
}).then(({ }).then(({
data data
}) => { }) => {
this.tableDataLoading = false this.dialogFormVisible2 = false
// for (var i in data.data.list) { if (data.code == -100) {
// var a = data.data.list[i].content.toString() this.$message({
// var b = JSON.parse(a) message: data.msg,
// data.data.list[i].content = b.content type: 'error',
// console.log('key', b.content) duration: 1500,
// } onClose: () => {
let returnData = data.data; this.title = ''
this.tableData = returnData this.content = ''
this.phone = ''
this.flag = ''
this.dataSelect()
}
})
}
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.phone = ''
this.flag = ''
this.dataSelect()
}
})
}
}) })
}, }
if (this.flag == 2) {
this.$http({
url: this.$http.adornUrl('/cash/sendMsg'),
method: 'get',
params: this.$http.adornParams({
'title': this.title,
'content': this.content,
'flag': this.flag,
})
}).then(({
data
}) => {
this.dialogFormVisible2 = false
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.flag = ''
this.dataSelect()
}
})
}
})
}
}, },
mounted() { //
this.dataSelect() dataSelect() {
} this.tableDataLoading = true
}; this.$http({
url: this.$http.adornUrl(`message/page/${this.state}/${this.page}/${this.limit}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
this.tableDataLoading = false
// for (var i in data.data.list) {
// var a = data.data.list[i].content.toString()
// var b = JSON.parse(a)
// data.data.list[i].content = b.content
// console.log('key', b.content)
// }
let returnData = data.data;
this.tableData = returnData
})
},
},
mounted() {
this.dataSelect()
}
};
</script> </script>
<style> <style></style>
</style>

View File

@ -0,0 +1,312 @@
<template>
<div>
<div style="margin-right:2%;text-align:right;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="dataSelect">刷新
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column prop="id" label="编号" width="80">
</el-table-column>
<el-table-column prop="title" label="联系方式">
</el-table-column>
<el-table-column prop="content" label="内容">
</el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180">
</el-table-column>
<el-table-column prop="isSee" label="状态" width="180">
<template slot-scope="scope">
<span v-if="scope.row.isSee == 2" style="color: #67C23A;">已读</span>
<span v-else style="color: #909399;">未读</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="changeState(scope.row, true)"
v-if="scope.row.isSee != 2">标为已读</el-button>
<el-button type="info" size="small" @click="changeState(scope.row, false)"
v-if="scope.row.isSee == 2">标为未读</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
limit: 10,
page: 1,
state: 99,
url: '',
title: '',
type: '',
id: '',
types: [{
value: 'word',
label: '文字'
},
{
value: 'url',
label: '链接'
}
],
form: {
id: '',
title: '',
url: '',
type: '',
state: '',
types: [{
value: 'word',
label: '文字'
},
{
value: 'url',
label: '链接'
}
],
},
phone: '',
content: '',
flag: '',
flags: [{
value: 1,
label: '单个用户'
},
{
value: 2,
label: '全部用户'
}
],
formLabelWidth: '200px',
activeName: 'first',
tableDataLoading: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible: false,
tableData: [],
}
},
methods: {
//
dataSelectXyhzc() {
this.$http({
url: this.$http.adornUrl('/message/dataSelectXyhzc'),
method: 'get',
}).then(({ data }) => {
if (data.data >= 0) {
this.$cookie.set('numberXyhzc', data.data)
}
})
},
//
changeState(row, type) {
let isSee = 1
if (type) isSee = 2
else isSee = 1
this.$http({
url: this.$http.adornUrl('message/updateMessage'),
method: 'post',
data: this.$http.adornData({
'id': row.id,
'isSee': isSee
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
this.dataSelectXyhzc()
}
})
} else {
this.$notify({
title: '提示',
duration: 1800,
message: data.msg,
type: 'warning'
})
}
})
},
//
updataDetails(row) {
this.$router.push({
path: '/userDetail',
query: {
userId: row.userId
}
});
},
handleSizeChange(val) {
this.limit = val;
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
handleClick(tab, event) {
this.page = 1
this.limit = 10
this.state = 99
this.dataSelect()
},
//
magNotice() {
this.dialogFormVisible2 = true
},
//
magNoticeTo() {
if (this.flag == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择类型',
type: 'warning'
});
return
}
if (this.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入标题',
type: 'warning'
});
return
}
if (this.content == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入内容',
type: 'warning'
});
return
}
if (this.flag == 1) {
if (this.phone == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入用户手机号',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('/cash/sendMsg'),
method: 'get',
params: this.$http.adornParams({
'title': this.title,
'content': this.content,
'phone': this.phone,
'flag': this.flag
})
}).then(({
data
}) => {
this.dialogFormVisible2 = false
if (data.code == -100) {
this.$message({
message: data.msg,
type: 'error',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.phone = ''
this.flag = ''
this.dataSelect()
}
})
}
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.phone = ''
this.flag = ''
this.dataSelect()
}
})
}
})
}
if (this.flag == 2) {
this.$http({
url: this.$http.adornUrl('/cash/sendMsg'),
method: 'get',
params: this.$http.adornParams({
'title': this.title,
'content': this.content,
'flag': this.flag,
})
}).then(({
data
}) => {
this.dialogFormVisible2 = false
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.title = ''
this.content = ''
this.flag = ''
this.dataSelect()
}
})
}
})
}
},
//
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`message/page/${this.state}/${this.page}/${this.limit}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
this.tableDataLoading = false
// for (var i in data.data.list) {
// var a = data.data.list[i].content.toString()
// var b = JSON.parse(a)
// data.data.list[i].content = b.content
// console.log('key', b.content)
// }
let returnData = data.data;
this.tableData = returnData
})
},
},
mounted() {
this.dataSelect()
}
};
</script>
<style></style>