1、视频圈:增加修改点赞、评论、置顶功能

2、调整菜单栏消息提示逻辑
3、增加人工朗读公共方法speechReminder
This commit is contained in:
1378012178@qq.com 2025-02-07 09:56:16 +08:00
parent 25759f98b3
commit e433696bbf
7 changed files with 431 additions and 157 deletions

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

Binary file not shown.

View File

@ -0,0 +1,20 @@
export function speak(text, options = {}) {
// 检查浏览器是否支持 speech synthesis
if ('speechSynthesis' in window) {
const utterance = new SpeechSynthesisUtterance();
// 设置传递过来的文本
utterance.text = text;
// 可选参数:语言、音量、语速、音调等
utterance.lang = options.lang || 'zh-CN'; // 默认语言为中文
utterance.volume = options.volume || 1; // 音量默认值为1范围0到1
utterance.rate = options.rate || 1.5; // 语速默认值为1范围0.1到10
utterance.pitch = options.pitch || 1; // 音调默认值为1范围0到2
// 开始朗读
window.speechSynthesis.speak(utterance);
} else {
console.log('您的浏览器不支持语音合成');
}
}

View File

@ -3,10 +3,7 @@
<!-- 列表 -->
<div style="display: inline-block">
<span>状态</span>
<el-select
clearable
v-model="status"
style="width: 150px;">
<el-select clearable v-model="status" style="width: 150px;">
<el-option value="" label="全部"></el-option>
<el-option value="0" label="待审批"></el-option>
<el-option value="1" label="已通过"></el-option>
@ -15,184 +12,119 @@
</div>
<div style="margin-left:10px;display: inline-block">
<span>姓名</span>
<el-input
style="width: 200px"
placeholder="请输入技师姓名"
v-model="name">
<el-input style="width: 200px" placeholder="请输入技师姓名" v-model="name">
</el-input>
</div>
<el-button
style="margin-left: 10px"
size="mini"
type="primary"
icon="document"
@click="handleSelect"
>查询
<div style="display: inline-block">
<span>置顶</span>
<el-select clearable v-model="isTop" style="width: 150px;">
<el-option value="" label="全部"></el-option>
<el-option value="1" label="已置顶"></el-option>
<el-option value="0" label="未置顶"></el-option>
</el-select>&nbsp;&nbsp;
</div>
<el-button style="margin-left: 10px" size="mini" type="primary" icon="document" @click="handleSelect">查询
</el-button>
<el-button
style="margin-left: 10px"
size="mini"
type="primary"
icon="document"
@click="handleClear"
>重置
<el-button style="margin-left: 10px" size="mini" type="primary" icon="document" @click="handleClear">重置
</el-button>
<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 prop="artificerImg" label="头像" width="80">
<template slot-scope="scope">
<img
v-if="scope.row.artificerImg && scope.row.artificerImg != ''"
:src="scope.row.artificerImg"
width="40"
height="40"
/>
<img v-if="scope.row.artificerImg && scope.row.artificerImg != ''" :src="scope.row.artificerImg"
width="40" height="40" />
<span v-else>暂无图片</span>
</template>
</el-table-column>
<el-table-column
prop="artificerName"
label="姓名"
width="120"
>
<el-table-column prop="artificerName" label="姓名" width="120">
</el-table-column>
<el-table-column prop="picPath" label="视频" width="120" >
<el-table-column prop="picPath" label="视频" width="120">
<template slot-scope="scope">
<img
v-if="scope.row.picPath && scope.row.picPath != ''"
:src="scope.row.picPath"
width="120"
height="120"
@click="showVideo(scope.row)"
/>
<img v-if="scope.row.picPath && scope.row.picPath != ''" :src="scope.row.picPath" width="120"
height="120" @click="showVideo(scope.row)" />
<span v-else>暂无视频</span>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="申请时间"
width="150"
>
<el-table-column prop="createTime" label="申请时间" width="150">
</el-table-column>
<el-table-column
prop="content"
label="内容"
width="220"
>
<el-table-column prop="content" label="内容" width="220">
</el-table-column>
<el-table-column
prop="dzs"
label="点赞数"
width="120"
>
<el-table-column prop="dzs" label="点赞数" width="120">
<template slot-scope="scope">
<el-button type="text" @click="setDzs(scope.row)">{{ scope.row.dzs }}</el-button>
</template>
</el-table-column>
<el-table-column
prop="pls"
label="评论数"
width="120"
>
<el-table-column prop="pls" label="评论数" width="120">
<template slot-scope="scope">
<el-button type="text" @click="handlePl(scope.row)">{{ scope.row.pls }}</el-button>
</template>
</el-table-column>
<el-table-column
prop="status"
label="状态"
width="120"
>
<el-table-column prop="status" label="状态" width="120">
<template slot-scope="scope">
<span v-if="scope.row.status == 0">待审批</span>
<span v-if="scope.row.status == 1">已通过</span>
<span v-if="scope.row.status == 2">已拒绝</span>
</template>
</el-table-column>
<el-table-column
prop="opinion"
label="意见"
width="150"
>
<el-table-column prop="opinion" label="意见" width="150">
</el-table-column>
<el-table-column label="操作" prop="id" width="300" fixed="right">
<el-table-column prop="topSort" label="置顶" >
<template slot-scope="scope">
<el-button v-if="scope.row.status == 0"
size="mini"
type="primary"
style="margin: 5px"
@click="handleDelete(scope.row)"
>删除
<span v-if="scope.row.topSort == 0" style="color:#909399">未置顶</span>
<span v-else style="color:#67C23A">已置顶{{scope.row.topSort}}</span>
</template>
</el-table-column>
<el-table-column label="操作" prop="id" width="230" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.status == 0" size="mini" type="primary" style="margin: 5px"
@click="handleDelete(scope.row)">删除
</el-button>
<el-button v-if="scope.row.status == 0"
size="mini"
type="primary"
style="margin: 5px"
@click="handleApply(scope.row)"
>审批
<el-button v-if="scope.row.status == 0" size="mini" type="primary" style="margin: 5px"
@click="handleApply(scope.row)">审批
</el-button>
<el-button v-if="scope.row.status == 1 || scope.row.status == 2"
size="mini"
type="primary"
style="margin: 5px"
@click="handleCancelApply(scope.row)"
>取消审批
<el-button size="mini" type="primary"
style="margin: 5px" @click="handleToTop(scope.row,true)">
{{ scope.row.topSort == 0 ? '置顶' : '置顶顺序'}}
</el-button>
<el-button v-if="scope.row.topSort > 0 " size="mini" type="primary"
style="margin: 5px" @click="handleToTop(scope.row,false)">取消置顶
</el-button>
<el-button v-if="scope.row.status == 1 || scope.row.status == 2" size="mini" type="primary"
style="margin: 5px" @click="handleCancelApply(scope.row)">取消审批
</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 @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>
<!-- 审批 -->
<el-dialog :title="titles" :visible.sync="dialogApproveFormVisible" center @close="closeApply">
<div style="margin-bottom: 10px; display: flex">
<span style="width: 200px; display: inline-block; text-align: right">头像</span>
<div
style="
<div style="
width: 148px;
height: 148px;
border: 1px dashed #c0ccda;
border-radius: 6px;
text-align: center;
line-height: 148px;
"
>
<img
:src="artificerImg"
class="avatar"
style="border-radius: 6px; width: 148px; height: 148px"
/>
">
<img :src="artificerImg" class="avatar" style="border-radius: 6px; width: 148px; height: 148px" />
</div>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">姓名</span>
<el-input
style="width: 50%"
v-model="artificerName"
:disabled="true"
></el-input>
<el-input style="width: 50%" v-model="artificerName" :disabled="true"></el-input>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right"
>内容</span
>
<el-input
style="width: 50%"
v-model="content"
type="textarea"
:rows="4"
:disabled="true"
>
<span style="width: 200px; display: inline-block; text-align: right">内容</span>
<el-input style="width: 50%" v-model="content" type="textarea" :rows="4" :disabled="true">
</el-input>
</div>
<div style="margin-bottom: 10px">
@ -204,13 +136,7 @@
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">审批意见</span>
<el-input
style="width: 50%"
v-model="opinion"
type="textarea"
:rows="4"
placeholder="请输入审批意见"
>
<el-input style="width: 50%" v-model="opinion" type="textarea" :rows="4" placeholder="请输入审批意见">
</el-input>
</div>
<div slot="footer" class="dialog-footer">
@ -227,6 +153,39 @@
<el-button @click="dialogVideoFormVisible = false">关闭</el-button>
</div>
</el-dialog>
<!-- 评论管理 -->
<el-dialog :title="'评论管理'" :visible.sync="plDialogVisible" @close="changePlDialog(false)">
<el-table height="500" :data="plTableData" border style="width: 100%;" >
<el-table-column prop="userPhoto" label="头像" width="80">
<template slot-scope="scope">
<img v-if="scope.row.userPhoto && scope.row.userPhoto != ''" :src="scope.row.userPhoto"
width="40" height="40" />
<span v-else>暂无图片</span>
</template>
</el-table-column>
<el-table-column prop="userName" label="姓名" width="120">
</el-table-column>
<el-table-column prop="createTime" label="日期" width="170">
</el-table-column>
<el-table-column prop="content" label="内容" >
</el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="deletePl(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 20px">
<el-row>
<el-col :span="22">
<el-input type="textarea" placeholder="请输入评价..." v-model="plContent"></el-input>
</el-col>
<el-col :span="1">
<el-button type="primary" @click="releasePl"> </el-button>
</el-col>
</el-row>
</div>
</el-dialog>
</div>
</template>
@ -243,6 +202,7 @@ export default {
id: "",
name: "",
status: "",
isTop:"",
artificerImg: "",
artificerName: "",
content: "",
@ -252,10 +212,134 @@ export default {
dialogApproveFormVisible: false,
videoUrl: "",
dialogVideoFormVisible: false,
videoPlayer: null
videoPlayer: null,
plDialogVisible:false,//
plTableData: [],//
plContent:'',//使
pl_shipinquanId:'',//id
};
},
methods: {
//
releasePl(){
this.$http({
url: this.$http.adornUrl("/app/shipinquan/addContent"),
method: "post",
params: {
createBy: null,
content: this.plContent,
shipinquanId: this.pl_shipinquanId,
}
}).then(({ data }) => {
if (data.code == 0) {
this.handlePl({ id: this.pl_shipinquanId })
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
}
}).catch(() => {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
});
},
//
changePlDialog(sign){
this.plDialogVisible = sign
if(!sign){
//
this.handleSelect();
}
},
//
deletePl(row){
this.$http({
url: this.$http.adornUrl("/bl/shipinquanPinglun/delete"),
method: "post",
params: {
id: row.id,
shipinquanId:this.pl_shipinquanId
}
}).then(({ data }) => {
this.handlePl({ id: this.pl_shipinquanId })
}).catch(() => {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
});
},
//
handlePl(row) {
this.plContent = ''
this.pl_shipinquanId = ''
this.$http({
url: this.$http.adornUrl("/app/shipinquan/contentlist"),
method: "get",
params: {
page: 1,
limit: 310,
shipinquanId: row.id
}
}).then(({ data }) => {
if(data.code == 0) this.plTableData = data.data.records
this.pl_shipinquanId = row.id
this.changePlDialog(true)
}).catch(() => {
});
},
//
setDzs(row) {
this.$prompt('当前为:' + row.dzs, '设置点赞数', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^(0|[1-9]\d*)$/,
inputErrorMessage: '请输入正整数'
}).then(({ value }) => {
this.$http({
url: this.$http.adornUrl("bl/shipinquan/modify"),
method: "post",
params: this.$http.adornParams({
id: row.id,
dzs: value,
}),
}).then(({ data }) => {
if (data.code == 0) {
this.$message({
message: "设置成功",
type: "success",
duration: 1500,
onClose: () => {
this.handleSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
}
});
}).catch(() => {
});
},
//
handleSelect() {
this.tableDataLoading = true;
@ -266,12 +350,12 @@ export default {
page: this.page,
limit: this.limit,
artificerName: this.name,
status: this.status
status: this.status,
isTop:this.isTop
}),
}).then(({data}) => {
if (data.code == 0) {
this.tableData = data.data;
console.log(this.tableData);
} else {
this.$notify({
title: "提示",
@ -287,6 +371,7 @@ export default {
handleClear() {
this.name = "";
this.status = "";
this.isTop = "";
this.page = 1;
this.handleSelect();
},
@ -400,6 +485,72 @@ export default {
}
});
},
// isTop true/false
handleToTop(row,isTop){
if (isTop) {
this.$prompt('请输入置顶排序,值越大排名越靠前:', '置顶设置', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^(0|[1-9]\d*)$/,
inputErrorMessage: '请输入正整数'
}).then(({ value }) => {
this.$http({
url: this.$http.adornUrl("bl/shipinquan/modify"),
method: "post",
params: this.$http.adornParams({
id: row.id,
topSort: value,
}),
}).then(({ data }) => {
if (data.code == 0) {
this.$message({
message: "置顶成功",
type: "success",
onClose: () => {
this.handleSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
onClose: () => {
},
});
}
});
}).catch(() => {
});
} else {
//
this.$http({
url: this.$http.adornUrl("bl/shipinquan/modify"),
method: "post",
params: this.$http.adornParams({
id: row.id,
topSort: 0,
}),
}).then(({ data }) => {
if (data.code == 0) {
this.$message({
message: "取消置顶成功",
type: "success",
onClose: () => {
this.handleSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
onClose: () => {
},
});
}
});
}
},
//
handleCancelApply(row){
let id = row.id;

View File

@ -8,6 +8,9 @@
</a>
</h1>
</div>
<div><audio ref="audioPlayer" :src="require('@/assets/mp3/tip.mp3')" autoplay></audio>
<el-button id="aaaaaaaaaa" @click="playAudio">播放</el-button>
</div>
<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">
@ -69,6 +72,7 @@
<script>
import UpdatePassword from './main-navbar-update-password'
import tipmap3 from '@/assets/mp3/tip.mp3';
import {
clearLoginInfo
} from '@/utils'
@ -82,6 +86,7 @@ export default {
isshow: false,
chatNum: 0,
chatNumJl: 0,
chatNumSpq:0,
chatNumQy: 0,
chatNumJjqz: 0,
chatNumYh: 0,
@ -155,6 +160,7 @@ export default {
this.$cookie.set('numberCs', '')
this.$cookie.set('numberJg', '')
this.$cookie.set('numberLts', '')
this.$cookie.set('numberSpq', '')
sessionStorage.clear()
//router.options.isAddDynamicMenuRoutes = false;
this.$router.push({
@ -382,6 +388,21 @@ export default {
}
})
},
playAudio(){
this.$refs.audioPlayer.play()
},
//
dataSelectSpq() {
this.$http({
url: this.$http.adornUrl('/bl/shipinquan/dataSelectSpq'),
method: 'get',
}).then(({ data }) => {
if (data.data >= 0) {
this.$cookie.set('numberSpq', data.data)
document.getElementById('aaaaaaaaaa').click()
}
})
},
//
dataSelectLts() {
this.$http({
@ -533,6 +554,7 @@ export default {
this.dataSelectJjqz()
this.dataSelectYh()
this.dataSelectLts()
this.dataSelectSpq()
if ((this.userId && this.ringOrderId) && (this.userId == this.ringOrderId)) {
this.dataSelectJg()
this.dataSelectCs()
@ -542,17 +564,28 @@ export default {
this.userId = window.localStorage.getItem('userId');
this.ringOrderId = window.localStorage.getItem('ringOrderId');
//
//
// - 8 60
//
// this.chatNumJjqz = setInterval(() => {
// this.dataSelectJjqz()
// }, 60000)
// //
// setTimeout(() => {
// this.chatNumSpq = setInterval(() => {
// this.dataSelectSpq()
// }, 60000)
// }, 8000);
// //
// setTimeout(() => {
// this.chatNumQy = setInterval(() => {
// this.dataSelectPy()
// }, 60000)
// }, 8000);
// //
// this.chatNumJl = setInterval(() => {
// this.dataSelect()
// }, 6000)
// this.chatNumQy = setInterval(() => {
// this.dataSelectPy()
// }, 6000)
// this.chatNumJjqz = setInterval(() => {
// this.dataSelectJjqz()
// }, 6000)
//
// this.chatNumYh = setInterval(() => {
// this.dataSelectYh()
// }, 6000)
@ -579,6 +612,7 @@ export default {
// clearInterval(this.chatNumJg);
// clearInterval(this.chatNumCs);
// clearInterval(this.chatNumXdd);
// clearInterval(this.chatNumSpq);
}
}
</script>

View File

@ -6,6 +6,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==311&&havaMsg(311)" is-dot>
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==129&&chatNumLts!=0" is-dot>
<span> </span>
</el-badge>
@ -43,7 +46,9 @@
<el-badge class="item" v-if="menu.menuId==224&&chatNumFwz!=0" :value="chatNumFwz">
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==314&&chatNumSpq!=0" :value="chatNumSpq">
<span> </span>
</el-badge>
</el-menu-item>
</template>
@ -59,6 +64,7 @@ export default {
chatNumJjqz:0,
chatNumFwz:0,
chatNumLts:0,
chatNumSpq:0,
}
},
props: {
@ -90,6 +96,13 @@ export default {
name: route[0].name
})
}
},
//
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 false
}
},
mounted() {
@ -113,6 +126,9 @@ export default {
if(this.$cookie.get('numberLts')){
this.chatNumLts = this.$cookie.get('numberLts')
}
if(this.$cookie.get('numberSpq')){
this.chatNumSpq = this.$cookie.get('numberSpq')
}
}, 1000)
// this.chatNum2 = setInterval(() => {

View File

@ -141,7 +141,7 @@
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="changehyDialog(scope.row,true)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
@ -304,7 +304,7 @@
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="changehyDialog(scope.row,true)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:updatejb')" v-if="scope.row.consortiaId"
@click="jiebanguser(scope.row)" plain>解绑商家</el-button>
@ -461,7 +461,7 @@
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="changehyDialog(scope.row,true)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
@ -616,7 +616,7 @@
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="changehyDialog(scope.row,true)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
@ -771,7 +771,7 @@
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="changehyDialog(scope.row,true)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
@ -926,7 +926,7 @@
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="changehyDialog(scope.row,true)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
@ -1082,7 +1082,7 @@
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="changehyDialog(scope.row,true)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
@ -1236,6 +1236,28 @@
</div>
</el-dialog>
</el-tabs>
<el-dialog :title="'会员配置'" width="20%" :visible.sync="hyDialogVisible" @close="changehyDialog(null,false)">
<el-row>
<el-col :span="24">
<el-select v-model="hyType" placeholder="请选择会员类型" style="width: 100%;">
<el-option
v-for="item in hylxOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="24">
<div style="float: right;">
<el-button type="info" @click="changehyDialog(null,false)"> </el-button>
<el-button type="primary" @click="updateVip(optionUser)"> </el-button>
</div>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
@ -1244,6 +1266,9 @@ import { serverPaths } from '@/utils/enumData'
export default {
data() {
return {
hyType:null,// 0-30 1-90 2-365
optionUser:null,//
hyDialogVisible:false,//
uploadUrl: serverPaths.uploadUrl,
uploadWatermarkUrl: serverPaths.uploadWatermarkUrl,
openValue: 1,
@ -1353,6 +1378,16 @@ import { serverPaths } from '@/utils/enumData'
}
],
isAuthentication:'',
hylxOptions:[{
value: 0,
label: '月会员'
}, {
value: 1,
label: '季会员'
}, {
value: 2,
label: '年会员'
}],
}
},
methods: {
@ -2031,15 +2066,31 @@ import { serverPaths } from '@/utils/enumData'
})
},
//
changehyDialog(row,sign){
if(!sign){
this.hyDialogVisible = sign
} else{
this.optionUser = row
this.hyDialogVisible = sign
}
},
//
updateVip(row){
if(this.hyType!=0 && this.hyType!=1 && this.hyType!=2){
this.$message({
message: '未设置会员类型',
type: 'warning',
duration: 1500,
})
return
}
this.$http({
url: this.$http.adornUrl('user/giveUserVip'),
method: 'post',
params: this.$http.adornParams({
'userId':row.userId,
'day':30
'type':this.hyType
})
}).then(({
data
@ -2050,6 +2101,7 @@ import { serverPaths } from '@/utils/enumData'
type: 'success',
duration: 1500,
onClose: () => {
this.hyDialogVisible = false
this.dataSelect()
}
})
@ -2059,6 +2111,7 @@ import { serverPaths } from '@/utils/enumData'
type: 'warning',
duration: 1500,
onClose: () => {
this.hyDialogVisible = false
this.dataSelect()
}
})

View File

@ -37,7 +37,7 @@
<div class="left-item-time">
<div class="left-item-time-time" v-if="item.messageTime == null"></div>
<div class="left-item-time-time" v-else>
{{ item.messageTime.substring(11, 16) }}
{{ item.messageTime.substring(0, 16) }}
</div>
<div class="left-item-time-number" style="position: absolute; left: 59px; top: 8px"
v-if="item.storeCount">