Compare commits
3 Commits
cef9f18921
...
7dea1da754
Author | SHA1 | Date |
---|---|---|
|
7dea1da754 | |
|
a8c4158110 | |
|
2649f0f356 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -38,6 +38,7 @@ const mainRoutes = {
|
|||
{ 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: '/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: '/bannerList', component: _import('banner/bannerList'), name: 'bannerList', meta: { title: '首页装修', isTab: true } },
|
||||
{ path: '/materialPackage', component: _import('materialPackage/materialPackage'), name: 'materialPackage', meta: { title: '物料包', isTab: true } },
|
||||
|
|
|
@ -432,6 +432,17 @@ export default {
|
|||
});
|
||||
}).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() {
|
||||
if (this.status == "") {
|
||||
|
@ -472,6 +483,7 @@ export default {
|
|||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.handleSelect();
|
||||
this.dataSelectSpq();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
|
@ -572,6 +584,7 @@ export default {
|
|||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.handleSelect();
|
||||
this.dataSelectSpq();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -34,11 +34,12 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="byUserName" label="被投诉用户" width="100">
|
||||
<el-table-column prop="byUserName" label="被投诉技师" width="100">
|
||||
<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:'未绑定'}}
|
||||
</span>
|
||||
<span v-else style="color: #333;" >平台</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="type" label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type=='0'">待审核</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=='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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<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">通过
|
||||
</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">拒绝
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -92,16 +98,16 @@
|
|||
</el-pagination>
|
||||
</div>
|
||||
<!-- 任务拒绝弹框 -->
|
||||
<el-dialog title="拒绝" :visible.sync="dialogFormVisible" center>
|
||||
<el-dialog :title="tsbt" :visible.sync="dialogFormVisible" center>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span
|
||||
style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;">拒绝理由:</span>
|
||||
<el-input style="width:50%;" v-model="content" type="textarea" :rows="4" placeholder="请输入拒绝理由">
|
||||
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>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="refuseto()">确 定</el-button>
|
||||
<el-button type="primary" @click="replyto()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-tab-pane>
|
||||
|
@ -221,6 +227,7 @@
|
|||
],
|
||||
content: '',
|
||||
status: 1,
|
||||
tsbt:'',
|
||||
helpTakeId: '',
|
||||
indentNumbers: '',
|
||||
complaintId: '',
|
||||
|
@ -373,18 +380,19 @@
|
|||
})
|
||||
},
|
||||
//任务拒绝
|
||||
refuseClick(rows) {
|
||||
refuseClick(rows,tip) {
|
||||
this.tsbt = tip
|
||||
this.status = 2
|
||||
this.helpTakeId = rows.id
|
||||
this.content = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
refuseto() {
|
||||
replyto() {
|
||||
if (this.content == '') {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
duration: 1800,
|
||||
message: '请输入拒绝理由',
|
||||
message: '请输入'+this.status==1?'通过':'拒绝'+'理由',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
|
@ -410,6 +418,7 @@
|
|||
this.content = ''
|
||||
this.status = -1
|
||||
this.dataSelect()
|
||||
this.dataSelectPy()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
@ -424,7 +433,7 @@
|
|||
})
|
||||
},
|
||||
//单条任务通过
|
||||
passClicks(row) {
|
||||
passClicks(row,tip) {
|
||||
this.content = '同意'
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('message/auditMessage'),
|
||||
|
@ -463,46 +472,28 @@
|
|||
|
||||
})
|
||||
},
|
||||
//单条投诉通过
|
||||
passClicks1(row) {
|
||||
this.status = 1
|
||||
this.content = '同意'
|
||||
//统计未处理数据量
|
||||
dataSelectPy() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('message/auditMessage'),
|
||||
method: 'post',
|
||||
url: this.$http.adornUrl('message/selectMessageCount'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'ids': row.id,
|
||||
'status': 1,
|
||||
'auditContent': this.content,
|
||||
'state': 7,
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
if (data.code == 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
if (data.data >= 0) {
|
||||
this.$cookie.set('numberDts', data.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
passClicks1(rows,tip){
|
||||
this.tsbt = tip
|
||||
this.status = 1
|
||||
this.helpTakeId = rows.id
|
||||
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()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 添加素材弹框
|
||||
advertNotice() {
|
||||
|
|
|
@ -127,6 +127,22 @@
|
|||
}
|
||||
},
|
||||
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) {
|
||||
this.checkBoxData = val
|
||||
|
@ -244,6 +260,7 @@
|
|||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.dataSelect()
|
||||
this.dataSelectJjqz()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -270,6 +270,10 @@
|
|||
<el-radio :label="2">所有用户</el-radio>
|
||||
</el-radio-group>
|
||||
</div> -->
|
||||
<div style="margin: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">赠送数量:</span>
|
||||
<el-input-number v-model="yhqzssl" size="small" :min="1" :step="1" :precision="0"></el-input-number>
|
||||
</div>
|
||||
<div style="margin: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">选择用户:</span>
|
||||
<el-tag :key="tag" v-for="(tag,j) in userNameList" closable :disable-transitions="false"
|
||||
|
@ -419,6 +423,7 @@ import { serverPaths } from '@/utils/enumData'
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
yhqzssl:1,//优惠券赠送数量
|
||||
uploadUrl: serverPaths.uploadUrl,
|
||||
size: 10,
|
||||
page: 1,
|
||||
|
@ -885,6 +890,7 @@ import { serverPaths } from '@/utils/enumData'
|
|||
},
|
||||
// 赠送优惠券
|
||||
songCoupon(row) {
|
||||
this.yhqzssl = 1 //重置优惠券默认赠送数量为1
|
||||
this.userIdList = []
|
||||
this.couponIds = row.couponId
|
||||
this.userNameList = []
|
||||
|
@ -930,7 +936,8 @@ import { serverPaths } from '@/utils/enumData'
|
|||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'userIds': userIdList,
|
||||
'couponId': this.couponIds
|
||||
'couponId': this.couponIds,
|
||||
'amount':this.yhqzssl
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div><audio ref="audioPlayer" ></audio>
|
||||
<el-button id="aaaaaaaaaa">播放</el-button>
|
||||
</div>
|
||||
<audio ref="audioPlayer" ></audio>
|
||||
<div class="site-navbar__body clearfix">
|
||||
<el-menu class="site-navbar__menu" mode="horizontal">
|
||||
<el-menu-item class="site-navbar__switch" index="0" @click="sidebarFold = !sidebarFold">
|
||||
|
@ -72,10 +70,10 @@
|
|||
|
||||
<script>
|
||||
import UpdatePassword from './main-navbar-update-password'
|
||||
import tipmap3 from '@/assets/mp3/tip.mp3';
|
||||
import {
|
||||
clearLoginInfo
|
||||
} from '@/utils'
|
||||
import {speak} from '@/utils/speechReminder.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -88,6 +86,9 @@ export default {
|
|||
chatNumJl: 0,
|
||||
chatNumSpq:0,
|
||||
chatNumQy: 0,
|
||||
chatNumLts: 0,
|
||||
chatNumXxzx:0,
|
||||
chatNumXyhzc:0,
|
||||
chatNumJjqz: 0,
|
||||
chatNumYh: 0,
|
||||
chatNumJg: 0,
|
||||
|
@ -161,6 +162,7 @@ export default {
|
|||
this.$cookie.set('numberJg', '')
|
||||
this.$cookie.set('numberLts', '')
|
||||
this.$cookie.set('numberSpq', '')
|
||||
this.$cookie.set('numberXxzx', '')
|
||||
sessionStorage.clear()
|
||||
//router.options.isAddDynamicMenuRoutes = false;
|
||||
this.$router.push({
|
||||
|
@ -316,6 +318,7 @@ export default {
|
|||
}) => {
|
||||
if (data.data >= 0) {
|
||||
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) {
|
||||
this.$cookie.set('numberJjqz', data.data)
|
||||
if (data.data > 0) this.playAudio(require('@/assets/mp3/jjqz.mp3'))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -388,8 +392,8 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
playAudio(){
|
||||
this.$refs.audioPlayer.src = require('@/assets/mp3/tip.mp3');
|
||||
playAudio(media){
|
||||
this.$refs.audioPlayer.src = media;
|
||||
this.$refs.audioPlayer.play();
|
||||
},
|
||||
// 获取视频圈未审核数据
|
||||
|
@ -400,10 +404,31 @@ export default {
|
|||
}).then(({ data }) => {
|
||||
if (data.data >= 0) {
|
||||
this.$cookie.set('numberSpq', data.data)
|
||||
document.getElementById('aaaaaaaaaa').addEventListener('click',()=>{
|
||||
console.log("dddd")
|
||||
this.playAudio()
|
||||
if (data.data > 0) this.playAudio(require('@/assets/mp3/spq.mp3'))
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取消息中心未阅读数据量
|
||||
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 }) => {
|
||||
if (data.data >= 0) {
|
||||
this.$cookie.set('numberLts', data.data)
|
||||
if (data.data > 0) this.playAudio(require('@/assets/mp3/lts.mp3'))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -547,6 +573,9 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
// setInterval(() => {
|
||||
// speak('有新用户注册成功!',{})
|
||||
// }, 3000);
|
||||
this.getRingId();
|
||||
this.userSelect()
|
||||
// this.chatSelect()
|
||||
|
@ -559,6 +588,8 @@ export default {
|
|||
this.dataSelectYh()
|
||||
this.dataSelectLts()
|
||||
this.dataSelectSpq()
|
||||
this.dataSelectXxzx()
|
||||
this.dataSelectXyhzc()
|
||||
if ((this.userId && this.ringOrderId) && (this.userId == this.ringOrderId)) {
|
||||
this.dataSelectJg()
|
||||
this.dataSelectCs()
|
||||
|
@ -585,7 +616,25 @@ export default {
|
|||
// this.chatNumQy = setInterval(() => {
|
||||
// this.dataSelectPy()
|
||||
// }, 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.dataSelect()
|
||||
|
@ -608,15 +657,24 @@ export default {
|
|||
},
|
||||
beforeDestroy() {
|
||||
//生产需替换
|
||||
//紧急求助定时任务
|
||||
// clearInterval(this.chatNumJjqz);
|
||||
// //视频圈定时任务
|
||||
// clearInterval(this.chatNumSpq);
|
||||
// //投诉中心定时任务
|
||||
// clearInterval(this.chatNumQy);
|
||||
// //聊天室定时任务
|
||||
// clearInterval(this.chatNumLts);
|
||||
// //消息中心定时任务
|
||||
// clearInterval(this.chatNumXxzx);
|
||||
// //新用户注册定时任务
|
||||
// clearInterval(this.chatNumXyhzc);
|
||||
// clearInterval(this.chatNum)
|
||||
// clearInterval(this.chatNumJl);
|
||||
// clearInterval(this.chatNumQy);
|
||||
// clearInterval(this.chatNumJjqz);
|
||||
// clearInterval(this.chatNumYh);
|
||||
// clearInterval(this.chatNumJg);
|
||||
// clearInterval(this.chatNumCs);
|
||||
// clearInterval(this.chatNumXdd);
|
||||
// clearInterval(this.chatNumSpq);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
|
||||
<span>{{ menu.name }}</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">
|
||||
<span> </span>
|
||||
</el-badge>
|
||||
|
@ -49,6 +52,9 @@
|
|||
<el-badge class="item" v-if="menu.menuId==314&&chatNumSpq!=0" :value="chatNumSpq">
|
||||
<span> </span>
|
||||
</el-badge>
|
||||
<el-badge class="item" v-if="menu.menuId==321&&chatNumXyhzc!=0" :value="chatNumXyhzc">
|
||||
<span> </span>
|
||||
</el-badge>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
|
||||
|
@ -65,6 +71,8 @@ export default {
|
|||
chatNumFwz:0,
|
||||
chatNumLts:0,
|
||||
chatNumSpq:0,
|
||||
chatNumXxzx:0,
|
||||
chatNumXyhzc:0,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -100,7 +108,7 @@ export default {
|
|||
//检测菜单下是否有消息
|
||||
havaMsg(index){
|
||||
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
|
||||
}
|
||||
|
@ -129,7 +137,12 @@ export default {
|
|||
if(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)
|
||||
// this.chatNum2 = setInterval(() => {
|
||||
// this.messageSelect2()
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<template>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<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-column prop="id" label="编号" width="80">
|
||||
</el-table-column>
|
||||
|
@ -10,6 +14,20 @@
|
|||
</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"
|
||||
|
@ -19,6 +37,10 @@
|
|||
</div>
|
||||
</el-tab-pane>
|
||||
<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-column prop="id" label="编号" width="80">
|
||||
</el-table-column>
|
||||
|
@ -146,7 +168,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
limit: 10,
|
||||
|
@ -203,6 +225,53 @@
|
|||
}
|
||||
},
|
||||
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({
|
||||
|
@ -381,9 +450,7 @@
|
|||
mounted() {
|
||||
this.dataSelect()
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<style></style>
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue