提交 51a18495 作者: 毛细亚

更新代码

上级 8783ae50
......@@ -82,6 +82,10 @@ export default {
label: '任务记录',
path: '/taskRecord'
},
{
label: '申请记录',
path: '/applyRecord'
},
// {
// label: '快捷发送',
// path: '/quickSend'
......@@ -135,15 +139,12 @@ export default {
console.log('从 Cookie 恢复 token:', cookieToken)
}
// 调试信息:检查所有关键状态
console.log('App mounted - 关键状态检查:', {
token: this.token,
external_userid: this.external_userid,
showMemberId: this.showMemberId,
cookieToken: Cookies.get('token'),
cookieExternalUserId: Cookies.get('external_userid'),
currentPath: this.$route.path
})
// 页面刷新时从 Cookie 恢复 accountSelect 到 store
const cookieAccountSelect = Cookies.get('accountSelect')
if (cookieAccountSelect && !this.$store.state.game.accountSelect) {
this.set_accountSelect(cookieAccountSelect)
console.log('从 Cookie 恢复 accountSelect:', cookieAccountSelect)
}
// 初始化时处理路径
const currentPath = this.$route.path
......@@ -161,16 +162,34 @@ export default {
this.$nextTick(() => {
this.checkMenuOverflow()
})
this.initVuexValue()
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize)
},
methods:{
...mapMutations('user', ['set_token']),
...mapMutations('user',['set_userid','set_corp_id','set_token','set_cser_info','set_cser_id','set_cser_name','set_userInfo']),
...mapMutations('game', ['set_accountSelect']),
handleSelect(key, keyPath) {
console.log('菜单选择:', key, keyPath, window.location.href)
},
initVuexValue(){
this.set_userid(Cookies.get('userid'))
this.set_corp_id(Cookies.get('corp_id'))
this.set_token(Cookies.get('token'))
this.set_cser_id(Cookies.get('cser_id'))
this.set_cser_name(Cookies.get('cser_name'))
const userinfo = {
cser_id:Cookies.get('cser_id'),
cser_name:Cookies.get('cser_name'),
username:Cookies.get('cser_name'),
id:Cookies.get('cser_id'),
}
this.set_userInfo(userinfo)
const cser_info = Cookies.get('cser_info')
console.log(Cookies.get('cser_id'),'cser_info',Cookies.get('cser_name'))
cser_info?this.set_cser_info(JSON.parse(cser_info)):this.set_cser_info({})
},
// 切换菜单展开收起状态
toggleMenu() {
this.isMenuExpanded = !this.isMenuExpanded
......
import request from '@/utils/request'
import store from '@/store/index'
import Cookies from 'js-cookie'
const zw_user_id = Cookies.get('cser_id') || store.state.user.userInfo.id || store.state.user.cser_id
// 游戏业务所属的接口信息
// 所属分组下拉
function returnApi(api){
......@@ -383,7 +385,7 @@ export function channelList(data) {
// 任务列表
export function taskIndex(data) {
return new Promise((resovle, reject) => {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
cross_systemRequest({
system: 'zhangyou',
api: '/operator_task/index',
......@@ -397,7 +399,7 @@ export function taskIndex(data) {
// 任务详情
export function taskDetails(data) {
return new Promise((resovle, reject) => {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
cross_systemRequest({
system: 'zhangyou',
api: '/operator_task/info',
......@@ -410,7 +412,7 @@ export function taskDetails(data) {
// 分配
export function taskAssign(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -424,7 +426,7 @@ export function taskAssign(data) {
// 完成任务
export function taskTrack(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -438,7 +440,7 @@ export function taskTrack(data) {
// 结果列表
export function taskRecord(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -452,7 +454,7 @@ export function taskRecord(data) {
// 备注
export function logsSave(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -466,7 +468,7 @@ export function logsSave(data) {
// 角色累充
export function RoleTodayOrder(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -479,7 +481,7 @@ export function RoleTodayOrder(data) {
}
// 用户充值
export function memberOrder(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -492,7 +494,7 @@ export function memberOrder(data) {
}
// 下拉加载
export function searchcondition(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -505,7 +507,7 @@ export function searchcondition(data) {
}
// 误操作列表
export function misoperationIndex(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -518,7 +520,7 @@ export function misoperationIndex(data) {
}
// 添加误操作
export function addErrorHandle(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -530,7 +532,7 @@ export function addErrorHandle(data) {
})
}
export function updateErrorHandle(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -543,7 +545,7 @@ export function updateErrorHandle(data) {
}
// 操作数量
export function numErrorHandle(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -556,7 +558,7 @@ export function numErrorHandle(data) {
}
// 操作数量新
export function operationCount(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -569,7 +571,7 @@ export function operationCount(data) {
}
// 任务消息读取
export function taskRead(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -582,7 +584,7 @@ export function taskRead(data) {
}
// 任务消息状态
export function taskReadStatus(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -596,7 +598,7 @@ export function taskReadStatus(data) {
// 撤回消息
export function cancelRefundRequest(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -610,7 +612,7 @@ export function cancelRefundRequest(data) {
// 举报列表
export function reportIndex(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -625,7 +627,7 @@ export function reportIndex(data) {
// 玩家举报
export function playerReport(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -640,7 +642,7 @@ export function playerReport(data) {
// 审批记录
export function reportProcess(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -654,7 +656,7 @@ export function reportProcess(data) {
// 撤销举报
export function reportCancel(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = store.state.user.cser_id || store.state.user.userInfo.id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -668,7 +670,7 @@ export function reportCancel(data) {
// 新增举报
export function reportAdd(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -682,7 +684,7 @@ export function reportAdd(data) {
// 申诉列表
export function appealList(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -696,7 +698,7 @@ export function appealList(data) {
// 新增申诉
export function appealAdd(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -710,7 +712,7 @@ export function appealAdd(data) {
// 撤销申诉
export function appealCancel(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -724,7 +726,7 @@ export function appealCancel(data) {
// 申诉记录
export function appealProcess(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -737,7 +739,7 @@ export function appealProcess(data) {
}
// 玩家举报审批记录
export function gamerReportProcess(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -751,7 +753,7 @@ export function gamerReportProcess(data) {
// 角色列表Holo 实时性较高
export function getRoleHoLo(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -764,7 +766,7 @@ export function getRoleHoLo(data) {
}
// 角色列表 待请求
export function memberTaskStatus(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -778,7 +780,7 @@ export function memberTaskStatus(data) {
// 举报申请列表
export function report_request_list(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -791,7 +793,7 @@ export function report_request_list(data) {
}
// 举报申请驳回或者通过
export function report_request_approval(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -805,7 +807,7 @@ export function report_request_approval(data) {
// 游戏类型下的游戏列表 游戏类型:安卓 h5 ios
export function getTransferRecallGameList(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -818,7 +820,7 @@ export function getTransferRecallGameList(data) {
}
// 转端和召回 游戏类型列表
export function getGameConfig(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -832,7 +834,7 @@ export function getGameConfig(data) {
// 召回的时候染色
export function recallChannelSeq(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -846,7 +848,7 @@ export function recallChannelSeq(data) {
// 获取游戏信息
export function getGameInfo(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -859,7 +861,7 @@ export function getGameInfo(data) {
}
// 新增渠道
export function addChannel(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -872,7 +874,7 @@ export function addChannel(data) {
}
// 一键发送召回渠道链接
export function quickRecallChannelLink(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -885,7 +887,7 @@ export function quickRecallChannelLink(data) {
}
// 转端发送落地页
export function getLandingPageTransfer(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -899,7 +901,7 @@ export function getLandingPageTransfer(data) {
// 工作台关联客服
export function bindUserSelfAdd(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -912,7 +914,7 @@ export function bindUserSelfAdd(data) {
}
// 关联客服列表
export function bindUserList(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -925,7 +927,7 @@ export function bindUserList(data) {
}
// 新增关联客服
export function bindUserAdd(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -939,7 +941,7 @@ export function bindUserAdd(data) {
// 删除关联客服
export function bindUserDelete(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -953,7 +955,7 @@ export function bindUserDelete(data) {
// 调用掌游的日志中心
export function getSystemModelLog(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -967,7 +969,7 @@ export function getSystemModelLog(data) {
export function getMemberTransStatus(data) {
// 转端文档 获取W账号的转端状态 如果状态是 false 表示不允许转端 在工作台 发送游戏 里面转端里 点开发送的时候 提示 当前w账号不满足转端要求,请联系组长处理
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -980,7 +982,7 @@ export function getMemberTransStatus(data) {
}
export function getTaskTracer(data) {
// 获取运营任务的跟进人 参数 member_id
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -993,7 +995,7 @@ export function getTaskTracer(data) {
}
// 用户触达 发送客服号添加消息的日志
export function getTaskTracerTouch(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1006,7 +1008,7 @@ export function getTaskTracerTouch(data) {
}
// 添加一条任务跟进记录
export function getTaskTracerTouchAdd(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1019,7 +1021,7 @@ export function getTaskTracerTouchAdd(data) {
}
// 审批组流程下拉
export function approval_group_flow_list(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1032,7 +1034,7 @@ export function approval_group_flow_list(data) {
}
// 审批人员表格
export function approval_group_flow_user(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1046,7 +1048,7 @@ export function approval_group_flow_user(data) {
// 保存转端提交
export function approval_group_flow_add(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1060,7 +1062,7 @@ export function approval_group_flow_add(data) {
// 转端申请列表
export function member_trans_request_list(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1074,7 +1076,7 @@ export function member_trans_request_list(data) {
// 转端申请审批记录
export function member_trans_request_process(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1088,7 +1090,7 @@ export function member_trans_request_process(data) {
// 转区列表
export function transfer_server_request_list(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1102,7 +1104,7 @@ export function transfer_server_request_list(data) {
// 转区申请
export function transfer_server_request_add(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1116,7 +1118,7 @@ export function transfer_server_request_add(data) {
// 转区申请节点
export function transfer_server_request_process(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1128,7 +1130,7 @@ export function transfer_server_request_process(data) {
})
}
export function getMainGameInfo(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1142,7 +1144,7 @@ export function getMainGameInfo(data) {
// 掌游标签搜索
export function roleLabelSearch(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1156,7 +1158,7 @@ export function roleLabelSearch(data) {
// 掌游标签列表
export function roleGetRoleLabel(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1169,7 +1171,7 @@ export function roleGetRoleLabel(data) {
}
// 编辑角色标签
export function editRoleLabel(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1183,7 +1185,7 @@ export function editRoleLabel(data) {
// 编辑角色标签
export function getRoleLabelCreate(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......@@ -1195,7 +1197,7 @@ export function getRoleLabelCreate(data) {
})
}
export function ruleList(data) {
data.zw_user_id = store.state.user.userInfo.id
data.zw_user_id = zw_user_id
return new Promise((resovle, reject) => {
cross_systemRequest({
system: 'zhangyou',
......
<template>
<div class="search-item">
<div v-if=" label&& label.length<6" class="item-label">{{ label }}</div>
<div v-else-if="label &&label.length>=6 " class="item-label">
{{ label.slice(0,4) }} <br> {{ label.slice(4,label.length) }}
</div>
<div v-else class="item-label"></div>
<div class="item-content selectUser">
<BiDatePicker
v-model="dateValue"
<div class="date-picker-container">
<!-- 开始时间选择器 -->
<div class="date-picker-item rowFlex columnCenter">
<div class="picker-label">开始时间:</div>
<el-date-picker
v-model="startDate"
:disabled="disabled"
:style="{'width':width ||''}"
:type="type?'datetimerange':'daterange'"
:format="type?'yyyy-MM-dd HH:mm:ss':'yyyy-MM-dd'"
:value-format="type?'yyyy-MM-dd HH:mm:ss':'yyyy-MM-dd'"
:default-time="['00:00:00','23:59:59']"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
:clearable="noClearable?!noClearable:true"
@change="selectChange"
:type="type ? 'datetime' : 'date'"
:format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:value-format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:default-time="'00:00:00'"
placeholder="请选择开始时间"
:clearable="noClearable ? !noClearable : true"
@change="handleStartDateChange"
/>
</div>
<!-- 结束时间选择器 -->
<div class="date-picker-item rowFlex columnCenter">
<div class="picker-label">结束时间:</div>
<el-date-picker
v-model="endDate"
:style="{'width':width ||''}"
:disabled="disabled"
:type="type ? 'datetime' : 'date'"
:format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:value-format="type ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
:default-time="'23:59:59'"
placeholder="请选择结束时间"
:clearable="noClearable ? !noClearable : true"
@change="handleEndDateChange"
/>
</div>
</div>
</div>
</template>
......@@ -28,45 +41,99 @@
export default {
name: 'SelectDate',
// noClearable 默认 clearable : true 特殊的关闭
props: ['label', 'width', 'isResize', 'defaultValue', 'pickerOptions', 'index', 'type', 'noClearable', 'disabled'],
props: [ 'width', 'defaultValue', 'type', 'noClearable', 'disabled'],
data() {
return {
dateValue: []
startDate: '',
endDate: ''
}
},
computed: {
},
watch: {
// 监听是否重置
isResize(newVal, oldVal) {
if (newVal) {
if (this.defaultValue) {
this.dateValue = this.defaultValue
defaultValue: {
handler(newVal) {
console.log('defaultValue 变化:', newVal)
if (newVal && newVal.start_date !== undefined && newVal.end_date !== undefined) {
this.setDateValues(newVal.start_date, newVal.end_date)
} else {
this.dateValue = ''
}
this.setDateValues('', '')
}
},
defaultValue(newVal) {
if (newVal) {
this.dateValue = newVal
}
immediate: true,
deep: true
}
},
mounted() {
this.defaultValue ? this.dateValue = this.defaultValue : ''
console.log('组件挂载,defaultValue:', this.defaultValue)
// 组件挂载时处理默认值
if (this.defaultValue && this.defaultValue.start_date !== undefined && this.defaultValue.end_date !== undefined) {
this.setDateValues(this.defaultValue.start_date, this.defaultValue.end_date)
}
},
methods: {
selectChange(value) {
console.log(value, 'value')
if (this.dateValue) {
this.$emit('result', { start_date: this.dateValue[0], end_date: this.dateValue[1], index: this.index || null })
} else {
this.$emit('result', { start_date: '', end_date: '', index: this.index || null })
}
// 安全设置日期值的方法
setDateValues(startDate, endDate) {
this.$nextTick(() => {
this.startDate = startDate || ''
this.endDate = endDate || ''
// 强制更新组件
this.$forceUpdate()
})
},
// 处理开始时间变化
handleStartDateChange(value) {
console.log('开始时间变化:', value)
this.startDate = value
this.emitResult()
},
// 处理结束时间变化
handleEndDateChange(value) {
console.log('结束时间变化:', value)
this.endDate = value
this.emitResult()
},
// 发出结果事件
emitResult() {
if(this.startDate === '' || this.endDate === ''){
this.$message.warning('请选择开始时间和结束时间')
return false
}
console.log('发出结果:', { start_date: this.startDate, end_date: this.endDate })
this.$emit('result', {
start_date: this.startDate || '',
end_date: this.endDate || '',
})
},
// 保持原有的 selectChange 方法,用于兼容
selectChange(value) {
this.emitResult()
}
}
}
</script>
<style lang="scss" scoped>
.date-picker-container {
display: flex;
flex-direction: column;
gap: 12px;
width: 100%;
}
.date-picker-item {
width: 100%;
}
.picker-label {
font-size: 12px;
color: #666;
margin-bottom: 6px;
font-weight: 500;
min-width: 60px;
}
</style>
\ No newline at end of file
......@@ -34,7 +34,7 @@
title="查看大图"
append-to-body
center
top="50%"
top="80%"
:visible.sync="showScoleImage"
>
<div class="showScoleImageContent columnFlex allCenter" v-html="remark"></div>
......@@ -177,7 +177,7 @@
}
.showScoleImageContent img{
max-width: 100%;
max-width: 80%;
margin-bottom: 20px;
}
</style>
<template>
<div class="uploadImage rowFlex flexWarp">
<div
v-if="imgUrl.length>0"
class="rowFlex"
>
<div
v-for="(item,index) in imgUrl"
:key="index"
class="rowFlex allCenter imageLoad"
@mouseenter="item.showLayer = true"
@mouseleave="item.showLayer = false"
>
<img
:src="item.src"
class="avatar"
>
<transition name="el-fade-in">
<div
v-if="item.showLayer"
class="iconsLayer rowFlex spaceAround columnCenter"
>
<i
class="el-icon-zoom-in icon"
@click="showBigImage(index)"
></i>
<i
class="el-icon-download icon"
@click="downImage(index)"
></i>
<i
class="el-icon-delete-solid icon"
@click="deleteImage(index)"
></i>
</div>
</transition>
</div>
</div>
<!-- 通过的上传图片组件包括图片裁剪 -->
<el-upload
class="avatar-uploader"
:http-request="uploadImg"
action="#"
:before-upload="fileSizeLimit"
:on-remove="removeImg"
:show-file-list="false"
>
<!-- 默认的样式 -->
<i class="el-icon-plus avatar-uploader-icon"></i>
<div
slot="tip"
class="el-upload__tip"
>{{ tip }}</div>
</el-upload>
<el-dialog
:visible.sync="dialogVisible"
title="查看大图"
:append-to-body="true"
>
<div class="rowFlex allCenter">
<el-image
style="width: 650px;height: 650px;"
:src="bigUrl"
fit="scale-down"
></el-image>
</div>
</el-dialog>
<!-- 裁剪功能 -->
<!-- <imageCropper
:show.sync="cropperVisible"
:file="file"
@confirm="onConfirm"
/> -->
</div>
</template>
<script type="text/javascript">
import { uploadImageBefore } from '@/utils/index'
// import imageCropper from './imageCorpper.vue'
export default {
components: {
// imageCropper
},
props: ['tip', 'type', 'url', 'customStyle', 'fileList'], // index 第几个上传图片
data() {
return {
imgUrl: [],
bigUrl: '',
cropperVisible: false,
file: {
url: '',
name: ''
},
dialogVisible: false,
showLayer: false,
autoCropWidth: '400px',
autoCropHeight: '400px'
}
},
mounted() {
if (this.fileList && this.fileList.length > 0) {
this.imgUrl = this.fileList.map(item => {
return {
src: item.img || item,
showLayer: false
}
})
}
},
methods: {
showBigImage(index) {
this.dialogVisible = true
this.bigUrl = this.imgUrl[index].src
},
downImage(index) {
window.open(this.imgUrl[index].src || '')
},
deleteImage(index) {
this.imgUrl.splice(index, 1)
const images = this.imgUrl.map(item => item.src)
this.$emit('resultUpload', images)
},
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader()
let imgResult = ''
reader.readAsDataURL(file)
reader.onload = function () {
imgResult = reader.result
}
reader.onerror = function (error) {
reject(error)
}
reader.onloadend = function () {
resolve(imgResult)
}
})
},
// 不需要裁剪图片
async uploadImg(params) {
const result = await this.uploading(params.file)
this.imgUrl.push({
src: result.data,
showLayer: false
})
const images = this.imgUrl.map(item => item.src)
this.$emit('resultUpload', images)
},
// 需要裁剪图片
// async uploadImg(params) {
// if (params.file) {
// this.file.url = await this.getBase64(params.file)
// this.file.name = params.file.name
// this.cropperVisible = true
// }
// },
// 上传之前
fileSizeLimit(file) {
return uploadImageBefore(file, this)
},
// 删除前
removeImg() { },
// 裁剪完成后返回图片地址
async onConfirm(file) {
const uploadConfig = {
dir: '/company_wx/service/avatars/'
}
this.cropperVisible = false
const result = await this.uploading(file, uploadConfig)
console.log(result, 'result')
this.imgUrl = result.data
this.$emit('resultUpload', this.imgUrl)
}
// 上传
}
}
</script>
<style lang="scss" scoped>
.uploadImage {
.imageLoad {
cursor: pointer;
position: relative;
background: #ffffff;
width: 100px;
height: 100px;
border: 1px solid #d9d9d9;
border-radius: 5px;
margin-right: 10px;
margin-bottom: 10px;
}
::v-deep .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
::v-deep .avatar-uploader .el-upload:hover {
border-color: #409eff;
}
::v-deep .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
::v-deep .avatar {
width: 100px;
height: 100px;
display: block;
border-radius: 6px;
}
::v-deep .el-upload__tip {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.iconsLayer {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 10;
background: rgba(0, 0, 0, 0.4);
padding: 10px;
.icon {
font-size: 18px;
color: #ffffff;
cursor: pointer;
}
}
}
</style>
<style>
</style>
\ No newline at end of file
......@@ -26,13 +26,10 @@ if(isTest()){
function isTest(){
return process.env.NODE_ENV !== 'production'
}
errorHandle.onload()
// // 开发环境不收集日志
// if (process.env.NODE_ENV !== 'development') {
// errorHandle.onload()
// }
// 开发环境不收集日志
if (process.env.NODE_ENV !== 'development') {
errorHandle.onload()
}
// 测试一下
Vue.use(uploading)
// 配置和原型方法设置应该在创建Vue实例之前
......
......@@ -4,7 +4,6 @@ import userInfo from '../views/userInfo/userInfo.vue'
import quickReply from '../views/quickReply.vue'
import giftRecord from '../views/giftRecord.vue'
import applyRecord from '../views/applyRecord.vue'
import quickSend from '../views/quickSend.vue'
import addressBook from '../views/addressBook.vue'
import orderList from '../views/orderList.vue'
import roleInfo from '../views/roleInfo.vue'
......@@ -54,11 +53,6 @@ const routes = [
component: applyRecord
},
{
path: '/quickSend',
name: 'quickSend',
component: quickSend
},
{
path: '/addressBook',
name: 'addressBook',
component: addressBook
......@@ -78,11 +72,6 @@ const routes = [
name: 'login',
component: () => import('../views/login.vue')
},
{
path: '/testWx',
name: 'testWx',
component: () => import('../views/testWx.vue')
},
]
const router = new VueRouter({
/* 这里用 hash 模式 因为本项目是在企微 服务器下的一个二级页面 如果用 history 模式 需要修改 nginx 配置 在 nginx 配置中 需要添加 location /company_app/ {
......
......@@ -2,16 +2,30 @@
// 管理公共的store
import { zyouBindMember } from '@/api/works'
import Cookies from 'js-cookie'
// 从本地缓存获取accountSelect
const getAccountSelectFromCache = () => {
return Cookies.get('accountSelect') || ''
}
const state = {
accountSelect: '', // 当前选中的用户的member_id
accountSelect: getAccountSelectFromCache(), // 当前选中的用户的member_id,从缓存初始化
bindGameUserList: [], // 用户绑定的游戏角色
changeSelectWindow: false, // 切换客服窗口的时候 下发通知
gameUserInfo:{},
chatUserInfo: {}, // 当前选中的用户的详情
}
const mutations = {
set_accountSelect(state, data) {
state.accountSelect = data
// 同步到本地缓存
if (data) {
Cookies.set('accountSelect', data, { expires: 30 }) // 30天过期
} else {
Cookies.remove('accountSelect')
}
},
set_bindGameUserList(state, data) {
state.bindGameUserList = data
......
......@@ -618,15 +618,63 @@ export const concatObjArr = function (array) {
return list
}
/**
* 生成UUID
* @returns {string} UUID字符串
*/
export const generateUUID = function() {
var d = new Date().getTime()
if (window.performance && typeof window.performance.now === 'function') {
d += performance.now() // use high-precision timer if available
}
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (d + Math.random() * 16) % 16 | 0
d = Math.floor(d / 16)
return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16)
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
};
/**
* 复制文本到粘贴板
* @param {string} text - 要复制的文本内容
* @param {Function} successCallback - 成功回调函数
* @param {Function} errorCallback - 失败回调函数
* @returns {Promise}
*/
export const copyToClipboard = function(text, successCallback, errorCallback) {
if (navigator.clipboard && window.isSecureContext) {
// 使用现代 Clipboard API
return navigator.clipboard.writeText(text).then(() => {
if (successCallback) successCallback('内容已复制到粘贴板')
}).catch(err => {
console.error('复制失败:', err)
fallbackCopyTextToClipboard(text, successCallback, errorCallback)
})
return uuid
} else {
// 降级方案
return fallbackCopyTextToClipboard(text, successCallback, errorCallback)
}
}
/**
* 降级复制方案(兼容旧版浏览器)
* @param {string} text - 要复制的文本内容
* @param {Function} successCallback - 成功回调函数
* @param {Function} errorCallback - 失败回调函数
*/
export const fallbackCopyTextToClipboard = function(text, successCallback, errorCallback) {
const textArea = document.createElement('textarea')
textArea.value = text
textArea.style.position = 'fixed'
textArea.style.left = '-999999px'
textArea.style.top = '-999999px'
document.body.appendChild(textArea)
textArea.focus()
textArea.select()
try {
document.execCommand('copy')
if (successCallback) successCallback('内容已复制到粘贴板')
} catch (err) {
console.error('复制失败:', err)
if (errorCallback) errorCallback('复制失败')
}
document.body.removeChild(textArea)
}
\ No newline at end of file
const jsApiList = [
'getCurExternalContact',
'sendChatMessage',
]
export default jsApiList
\ No newline at end of file
<template>
<div class="details">
<div class="violationRecord">
<el-form
v-loading="loading"
class="content"
class="violationRecordContent"
label-width="100px"
>
<div v-if="violationList.length > 0">
......@@ -83,13 +83,13 @@
@click="showRemake(item.remake)"
>查看大图</el-button>
</p>
<p v-html="item.remake"></p>
<p class="remakeDetails" v-html="item.remake"></p>
</div>
<div
v-else
class="remakeImage"
>
<p v-html="item.remake"></p>
<p class="remakeDetails" v-html="item.remake"></p>
</div>
</div>
</el-form-item>
......@@ -188,7 +188,7 @@ export default {
...mapState("game", ["accountSelect", "gameTabActive"]),
},
mounted() {
this.requestViolationList();
this.requestViolationList()
},
methods: {
memberChange() {
......@@ -242,7 +242,7 @@ export default {
<style lang="scss">
.remakeImage {
img {
max-width: 200px;
max-width: 100%;
height: auto;
border-radius: 5px;
margin-top: 10px;
......@@ -251,22 +251,23 @@ export default {
.layerImage {
img {
max-width: 300px;
max-width: 100%;
}
}
</style>
<style lang="scss" scoped>
.details {
.violationRecord {
width: 100%;
height: calc(100vh - 170px);
background: #fff;
.content {
.violationRecordContent {
width: 100%;
padding: 20px;
height: 100%;
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
}
.contentItem {
......@@ -317,6 +318,7 @@ export default {
}
.remakeDetails {
word-break: break-all;
::v-deep img {
max-width: 200px;
max-height: 200px;
......
<template>
<div class="applyRecord-content">
申请记录
<div class="gift-tab-container-errorHanledle">
<el-tabs v-model="activeTab">
<el-tab-pane label="误操作" name="errorHandle">
<errorHandle v-if="activeTab=='errorHandle'"></errorHandle>
</el-tab-pane>
<el-tab-pane label="转区申请" name="serve">
<AreaTransferApply v-if="activeTab=='serve'" />
</el-tab-pane>
<el-tab-pane label="转端申请" name="terminal">
<TerminalTransfer v-if="activeTab=='terminal'" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import AreaTransferApply from './components/ApplyRecords/AreaTransferApply.vue'
import errorHandle from './components/ApplyRecords/errorHandle.vue'
import TerminalTransfer from './components/ApplyRecords/TerminaTranfer.vue'
export default {
name: 'ApplyRecord',
name: 'GiftTab',
components: {
AreaTransferApply,
errorHandle,
TerminalTransfer
},
data() {
return {
activeTab: 'errorHandle'
}
}
}
</script>
<style lang="scss" scoped>
.applyRecord-content{
<style lang="scss" scoped>
.gift-tab-container-errorHanledle {
//padding: 20px;
width: 100%;
height: 100%;
padding-top: 10px;
background: #fff;
}
</style>
\ No newline at end of file
::v-deep .el-tabs{
height: calc(100% - 60px);
}
::v-deep .el-tabs__content{
height: 100%;
}
::v-deep .el-tab-pane{
height: 100%;
}
::v-deep .el-tabs .el-tabs__header{
margin: 0;
// height: 60px;
}
::v-deep .el-tabs__nav-next, ::v-deep .el-tabs__nav-prev{
line-height: 50px;
}
}
</style>
\ No newline at end of file
<template>
<div class="terminaListArea">
<div class="addApply rowFlex spaceBetween">
<span></span>
<el-button
type="primary"
icon="el-icon-plus"
@click="showaddAreaTransfer = true,areaTransferItem = {}"
>新增转区申请</el-button>
</div>
<el-form
ref="taskForm"
:model="terminaForm"
class="taskForm"
label-width="85px"
>
<el-form-item label="审批状态">
<el-select
v-model="terminaForm.approval_status"
style="width:95%;"
clearable
placeholder="请选择审批状态"
@change="filterChange"
>
<el-option
v-for="item in approvalList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<BiDatePicker
v-model="create_time"
style="width: 95%"
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
:picker-option="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
:clearable="false"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="createResult"
/>
</el-form-item>
</el-form>
<div
v-infinite-scroll="paperScroll"
:infinite-scroll-disabled="!isMoreRecord"
:infinite-scroll-immediate="false"
class="mailListScroll"
>
<!-- 举报申请 -->
<div class="scrollMain">
<div
v-for="(item, index) in terminaList"
:key="item.id || index"
class="terminaContent"
@click="terminaProcess(item, index)"
>
<div class="terminaItem rowFlex spaceBetween columnCenter">
<i :class=" item.showStep?'el-icon-down':'el-icon-right'"></i>
<div class="terminaItemLeft">
<p><span class="label">新区角色:</span><span class="value">{{ item.role_name }}({{ item.server_name }})</span></p>
<p><span class="label">老区角色:</span><span class="value">{{ item.old_role_name }} ({{ item.old_server_name }}) </span></p>
<p>
<span class="label">登记时间:</span><span class="value">{{ item.create_time || '' }}</span>
</p>
</div>
<div class="terminaItemRight columnFlex columnCenter">
<el-button
v-if="item.approval_status == 4 && item.related_request_id == 0"
type="primary"
size="mini"
style="margin-bottom:15px;"
@click.stop="resubmitApproval(item)"
>重新提交</el-button>
<img
v-if="item.approval_status == 1"
:src="shenpi1"
class="icon"
/>
<img
v-else-if="item.approval_status == 2"
:src="shenpi2"
class="icon"
/>
<img
v-else-if="item.approval_status == 3"
:src="shenpi3"
class="icon"
/>
<img
v-else-if="item.approval_status == 4"
:src="shenpi4"
class="icon"
/>
<img
v-else-if="item.approval_status == 5"
:src="shenpi5"
class="icon"
/>
</div>
</div>
<!-- 审批进度 -->
<el-collapse-transition>
<div
v-if="item.showStep"
class="terminaProcessList"
>
<el-steps
direction="vertical"
:active="item.current"
finish-status="success"
>
<el-step
v-for="(items, indexs) in item.terminaProcessList"
:key="'trans_item_' + indexs"
:title="items.node_name"
>
<template slot="description">
<div
v-if="items"
class="trans-follow-1 card-style"
>
<div class="follow-item">
<span class="follow-info-label label-font">
{{ items.node_sort !== '0' ? '审批人:' : '登记人:' }}
</span>
<span class="info-value value-font">
{{ Array.isArray(items.user_name) ? items.user_name[0] : items.user_name }}
</span>
<el-tooltip
v-if="Array.isArray(items.user_name) && items.user_name.length > 1"
class="item"
effect="dark"
:content="items.user_name.slice(1).join('、')"
placement="top"
>
<span class="info-value value-font info-value-color">
{{ `+${items.user_name.length - 1}` }}
</span>
</el-tooltip>
</div>
<div
v-if="items.node_sort !== '0' || items.node_name === '系统'"
class="follow-item"
>
<span class="follow-info-label label-font">
审批结果:
</span>
<span
class="info-value value-font"
:class="items.current < indexs ? '' : switchStateTag(items.approval_result)"
>
{{ items.current < indexs ? '' : items.approval_result_text }}
</span>
</div>
<div class="follow-item">
<span class="follow-info-label label-font">
{{ items.node_sort !== '0' || items.node_name === '系统' ? '审批时间:' : '登记时间:' }}
</span>
<span class="info-value value-font">
{{ items.node_sort === '0' ? items.create_time : items.update_time }}
</span>
</div>
<div
v-if="(items.node_sort !== '0' || items.node_name === '系统') && items.approval_result === '2'"
class="follow-item"
>
<span class="follow-info-label label-font">
驳回原因:
</span>
<span class="info-value value-font" v-html="items.extra_attribution.approval_remark || ''">
</span>
</div>
<div
v-if="items.node_sort === item.terminaProcessList[item.terminaProcessList.length - 1].node_sort + '' && items.approval_result === '1' && items.node_sort !== '0'"
class="follow-item-remark follow-item"
>
<span class="follow-info-label label-font">
处理结果:
</span>
<span class="info-value value-font">
{{ items.extra_attribution.banned_text }}
</span>
</div>
<div
v-if="items.node_name !== '系统' && items.extra_attribution && items.extra_attribution.remark"
class="info-item-remark"
>
<div style="display: flex;">
<span class="info-label remark-label">详情:</span>
<span
class="preview-btn"
@click.stop="previewRemark(items.extra_attribution.remark)"
>
<i class="el-icon-view"></i>
点击查看大图
</span>
</div>
<div
class="remark-value"
v-html="formatImg(items.extra_attribution && items.extra_attribution.remark ? items.extra_attribution.remark : '')"
>
</div>
</div>
</div>
</template>
</el-step>
</el-steps>
</div>
</el-collapse-transition>
</div>
</div>
</div>
<el-dialog
:visible.sync="dialogRemarkVisible"
append-to-body
title="查看大图"
custom-class="remake-dialog"
>
<div class="remake-box">
<div v-html="dialogRemake"></div>
</div>
</el-dialog>
<!-- 编辑误操作 -->
<AreaTransferDialog
v-if="showaddAreaTransfer"
:visible.sync="showaddAreaTransfer"
:area-transfer-item="areaTransferItem"
@updateList="updateList"
/>
</div>
</template>
<script>
import { searchcondition, transfer_server_request_list, transfer_server_request_process } from '@/api/game'
import { mapState } from 'vuex'
import { removeDp, formatNumber, debounce } from '@/utils/index'
import AreaTransferDialog from './AreaTransferDialog.vue'
// 导入审批状态图标
import shenpi1 from '@/assets/icon/shenpi1.svg'
import shenpi2 from '@/assets/icon/shenpi2.svg'
import shenpi3 from '@/assets/icon/shenpi3.svg'
import shenpi4 from '@/assets/icon/shenpi4.svg'
import shenpi5 from '@/assets/icon/shenpi5.svg'
export default {
computed: {
...mapState('game', ['accountSelect']),
...mapState('user', ['userInfo'])
},
components: {
AreaTransferDialog
},
data() {
return {
pickerOptions: {
disabledDate(time) {
const curDate = (new Date()).getTime()
const three = 90 * 24 * 3600 * 1000
const threeMonths = curDate - three
return time.getTime() > Date.now() || time.getTime() < threeMonths
}
},
terminaForm: {
member_id: '',
create_time_start: '',
create_time_end: '',
approval_status: ''
},
create_time: [],
pageInfo: {
page: 1,
page_size: 20
},
terminaList: [],
isMoreRecord: false,
approvalList: [],
dialogRemarkVisible: false,
dialogRemake: '',
showaddAreaTransfer: false,
formatNumber: formatNumber,
// 审批状态图标
shenpi1,
shenpi2,
shenpi3,
shenpi4,
shenpi5
}
},
watch:{
accountSelect(newVal, oldVal) {
console.log(newVal,'newVal')
if (newVal && newVal !== '') {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isMoreRecord = true
this.filterChange()
}
}
},
mounted() {
this.create_time = [this.$moment().subtract(6, 'days').format('YYYY-MM-DD HH:mm:ss'), this.$moment().format('YYYY-MM-DD HH:mm:ss')]
this.terminaForm.create_time_start = this.create_time[0]
this.terminaForm.create_time_end = this.create_time[1]
this.requstApprovalList()
this.filterChange()
},
methods: {
updateList() {
this.filterChange()
},
createResult: debounce(function (data) {
if (data) {
this.terminaForm.create_time_start = data[0]
this.terminaForm.create_time_end = data[1]
} else {
this.terminaForm.create_time_start = ''
this.terminaForm.create_time_end = ''
}
this.filterChange()
}, 300),
filterChange() {
this.pageInfo.page = 1
this.terminaList = []
this.isMoreRecord = true
this.terminaIndex()
},
resubmitApproval(item) {
this.showaddAreaTransfer = true
this.areaTransferItem = item
},
async requstApprovalList() {
const data = {
type: 'dictionaries',
table_name: 'zs_refund_request',
field_name: 'approval_status'
}
const res = await searchcondition(data)
if (res.status_code === 1) {
this.approvalList = res.data.data
}
},
previewRemark(remark) {
this.dialogRemake = remark
this.dialogRemarkVisible = true
},
async terminaProcess(item, index) {
item.showStep = !item.showStep
if (item.terminaProcessList.length === 0) {
try {
const res = await transfer_server_request_process({ id: item.id })
item.terminaProcessList = res.data.data
res.data.data.map((items) => {
if (items.approval_result !== '0' && items.approval_result !== '2') {
item.current += 1
}
})
} catch (error) {
this.$message.error('获取审批进度失败')
console.error(error)
}
}
this.$forceUpdate()
},
paperScroll() {
this.requestNextPage()
},
requestNextPage(pageInfo) {
this.pageInfo.page++
this.terminaIndex()
},
handleCurrentChange(val) {
this.pageInfo.page = val
},
switchStateTag(status) {
switch (status) {
case '0':
return 'unhandle'
case '1':
return 'handled'
case '2':
return 'sendFail'
default:
return ''
}
},
formatImg(html) {
return html.replaceAll(/<img/g, '<img style="max-width:100px;"')
},
switchStateText(status) {
switch (status) {
case '0':
return '待审批'
case '1':
return '通过'
case '2':
return '驳回'
}
},
async terminaIndex() {
if (this.accountSelect === '') {
this.$message.warning('暂无关联的账号,请先去关联账号!')
return false
}
if (this.pageInfo.page === 1) {
this.terminaList = []
}
const { create_time_start, create_time_end, approval_status } = this.terminaForm
const data = {
approval_status,
create_time_start,
create_time_end,
member_id: this.accountSelect,
...this.pageInfo
}
const res = await transfer_server_request_list(data)
if (this.pageInfo.page === 1) {
this.terminaList = res.data.data
} else {
this.terminaList = this.terminaList.concat(res.data.data)
}
if (this.terminaList.length > 0) {
this.terminaList.map((item) => {
item.showStep = false
item.current = 0
item.terminaProcessList = []
})
} else {
this.terminaList = []
}
if (res.data.data.length < 20) {
this.isMoreRecord = false
} else {
this.isMoreRecord = true
}
}
}
}
</script>
<style lang="scss" scoped>
.terminaListArea {
width: 100%;
height: 100%;
overflow: auto;
::v-deep .el-form-item__label{
font-weight: 400;
}
.addApply {
margin: 15px 0;
margin-right: 20px;
}
.taskForm {
::v-deep .el-form-item {
margin-bottom: 10px;
}
}
// 会话筛选
.filterChat {
width: 100%;
margin-top: 20px;
::v-deep .el-button {
margin-left: 6px;
margin-right: 0 !important;
}
.btnListScroll {
margin-bottom: 10px;
}
.chatIcon {
font-size: 20px;
margin-left: 5px;
margin-top: 10px;
cursor: pointer;
}
.itemActive {
background: #e1fff0;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #00bf8a;
border: none;
}
.btnList {
width: 100%;
margin-bottom: 10px;
overflow: auto;
.btnItem {
border: none;
background: #eef0f4;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6e7073;
}
}
}
.mailListScroll {
width: 100%;
height: calc(100vh - 220px);
overflow-y: auto;
overflow-x: hidden;
.scrollMain {
width: 100%;
height: auto;
margin-bottom: 40px;
.terminaContent {
width: calc(100% - 20px);
margin-left: 10px;
position: relative;
.el-icon-right,.el-icon-down{
position: absolute;
bottom: 12px;
right: 2px;
font-size: 18px;
color: #6e7073;
}
}
//举报申请
.terminaItem {
padding: 10px;
background: #f7f8fa;
margin-bottom: 10px;
position: relative;
cursor: pointer;
color: #333333;
font-size: 14px;
font-weight: 500;
p {
line-height: 25px;
}
.terminaItemLeft {
width: 100%;
.label {
font-weight: 400;
font-size: 14px;
color: #86909c;
line-height: 20px;
margin-right: 10px;
}
.value {
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 20px;
text-align: left;
}
}
.terminaItemRight {
height: 100%;
.icon {
font-size: 50px;
}
}
}
.chatListItem {
width: 100%;
height: 68px;
padding: 3px vw(20);
position: relative;
cursor: pointer;
color: #333333;
font-size: 14px;
font-weight: 500;
.left {
color: #333333;
font-size: 14px;
font-weight: 500;
}
.info,
.top {
font-size: 14px;
font-weight: 400;
}
.bottom {
font-size: 14px;
color: #999999;
}
.right {
font-size: 12px;
font-weight: 400;
}
}
}
.chatListItemActive {
background: #e4fff1 !important;
}
.chatListItem:hover {
background: #e4fff1 !important;
}
}
}
// 掌游的样式
::v-deep.el-step .el-step__line {
width: 1px;
}
::v-deep .el-step > .is-success {
color: #00bf8a;
border-color: #00bf8a;
.el-step__line {
background-color: #e5e6eb;
}
}
::v-deep .el-step__main > .is-success {
color: #00bf8a;
}
::v-deep .el-step > .is-process {
color: #00bf8a;
border-color: #00bf8a;
.el-step__line {
background-color: #e5e6eb;
}
}
::v-deep .el-step__main > .is-process {
color: #00bf8a;
}
.form-item-btn {
margin: 0 0 0 20px;
}
.audit-label {
font-size: 14px;
font-weight: 800;
margin: 0 0 10px 0;
}
.remark-label {
color: #949fb0;
font-size: 14px;
}
.preview-btn {
cursor: pointer;
font-size: 14px;
color: #00bf8a;
margin: 0 0 0 10px;
i {
margin: 0 5px 0 0;
}
}
.remark-value {
min-height: 100px;
margin: 10px 0 0 40px;
padding: 6px 12px;
border: 1px solid #d9d9d9;
border-radius: 4px;
cursor: not-allowed;
color: #333;
}
.flex-box {
display: flex;
.remark-lebel {
width: 50px;
text-align: right;
}
}
.refund-flow-drawer {
position: fixed;
top: 0;
right: 700px;
}
.btm-btn-box {
position: fixed;
bottom: 20px;
width: 560px;
height: 32px;
}
.audit-state {
width: 50px;
height: 50px;
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
z-index: 100;
.audit-state-stamp {
font-size: 50px;
}
}
.info-item {
width: 45%;
display: flex;
height: 18px;
margin: 0 0 12px 0;
}
.info-item-pic {
width: 100%;
min-height: 96px;
max-height: 192px;
display: flex;
.img-list {
width: 464px;
display: flex;
flex-wrap: wrap;
&-item {
width: 80px;
height: 80px;
border-radius: 4px;
overflow: hidden;
margin: 0 10px 10px 0;
position: relative;
.preview-pic {
width: 80px;
height: 80px;
background: rgba(0, 0, 0, 0.5);
position: absolute;
top: 0;
left: 0;
z-index: -1;
text-align: center;
line-height: 80px;
.preview-icon {
font-size: 16px;
color: #fff;
cursor: pointer;
}
}
.screenshot {
object-fit: center;
width: 80px;
height: 80px;
}
&:hover > .preview-pic {
z-index: 100;
}
}
}
}
.flex-btn {
display: flex;
justify-content: space-between;
}
.info-label {
// width: 90px;
// text-align: right;
display: block;
margin: 0 10px 0 0;
font-size: 14px;
color: #949fb0;
}
.info-value {
display: block;
font-size: 14px;
color: #333;
}
.card-style {
background: #f2f2f7;
border-radius: 4px;
}
.trans-follow-1 {
width: vw(300);
min-height: fit-content;
margin: 6px 0 12px 0;
padding: 12px 12px 2px 12px;
position: relative;
.collapse-btn {
position: absolute;
top: 20px;
right: 15px;
}
.follow-item-remark {
width: 100%;
line-height: 20px;
margin: 0 0 12px 0;
}
.info-value-color {
color: #00bf8a;
margin-left: 5px;
}
}
.follow-item {
min-height: 20px;
line-height: 20px;
margin: 0 0 12px 0;
display: flex;
.label-left {
width: 90px;
text-align: right;
}
}
.left-label {
width: 60px;
}
.follow-info-label {
white-space: nowrap;
text-align: left;
margin: 0 10px 0 0;
}
.info-value {
font-size: 14px;
color: #333;
}
.label-font {
font-size: 14px;
color: #949fb0;
}
.info-item-remark {
width: 100%;
padding: 0 0 12px 0;
line-height: 20px;
.info-label {
display: block;
}
.info-value {
display: block;
width: 440px;
}
}
.terminaProcessList {
margin-bottom: 20px;
margin-top: 20px;
}
</style>
\ No newline at end of file
<template>
<el-drawer
title="转区申请"
:visible.sync="dialogVisible"
size="520px"
:append-to-body="true"
@close="handleClose"
>
<div class="areaTransferDialog">
<el-form
ref="form"
class="terminalForm"
:model="form"
:rules="rules"
label-width="80px"
label-position="top"
size="small"
>
<!-- 转区类型 -->
<el-form-item label="转区类型" prop="transfer_type">
<el-select
v-model="form.transfer_type"
placeholder="请选择转区类型"
style="width: 100%"
:clearable="false"
@change="handleTransferTypeChange"
>
<el-option
v-for="item in transfer_type_list"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 普通转区 -->
<div v-if="form.transfer_type === 1">
<el-form-item label="W账号" prop="member_id">
<el-select
v-model="form.member_id"
disabled
placeholder="请选择W账号"
:clearable="false"
style="width: 100%"
>
<el-option
v-for="item in bindGameUserList"
:key="item.member_id"
:label="item.username"
:value="item.member_id"
/>
</el-select>
</el-form-item>
<!-- 角色 -->
<el-form-item label="新区角色" prop="role_id">
<template slot="label">
<span>新区角色</span>
<span class="roleMoney">充值金额:{{ roleMoney }}</span>
</template>
<el-select
v-model="form.role_id"
placeholder="请选择角色"
style="width: 100%"
:clearable="false"
@change="handleRoleChange"
>
<el-option
v-for="(item,index) in roleList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="old_role_id">
<template slot="label">
<span>老区角色</span>
<span class="roleMoney">充值金额:{{ oldRoleMoney }}</span>
</template>
<el-select
v-model="form.old_role_id"
placeholder="请选择角色"
style="width: 100%"
:clearable="false"
@change="handleOldRoleChange"
>
<el-option
v-for="item in roleList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="主游戏" prop="main_game_id">
<mainGameSelect :default-value="form.main_game_id" :disabled="true" width="100%" @result="mainGameResult" />
</el-form-item>
<el-form-item label="项目" prop="weixin_blongs_id">
<el-select
v-model="form.weixin_blongs_id"
placeholder="请选择项目"
style="width: 100%"
:disabled="true"
>
<el-option
v-for="item in weixin_blongs_id_list"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</div>
<!-- 特殊转区 -->
<div v-if="form.transfer_type === 2">
<el-form-item label="新区W账号" prop="member_id">
<el-select
v-model="form.member_id"
placeholder="请选择W账号"
style="width: 100%"
:clearable="false"
@change="handleMemberIdChange($event,1)"
>
<el-option
v-for="item in bindGameUserList"
:key="item.member_id"
:label="item.username"
:value="item.member_id"
/>
</el-select>
</el-form-item>
<!-- 新区角色 -->
<el-form-item label="新区角色" prop="role_id">
<template slot="label">
<span>新区角色</span>
<span class="roleMoney">充值金额:{{ roleMoney }}</span>
</template>
<el-select
v-model="form.role_id"
placeholder="请选择角色"
style="width: 100%"
:clearable="false"
@change="handleRoleChange"
>
<el-option
v-for="(item,index) in roleList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="老区W账号" prop="old_member_id">
<el-select
v-model="form.old_member_id"
placeholder="请选择W账号"
:clearable="false"
style="width: 100%"
@change="handleMemberIdChange($event,2)"
>
<el-option
v-for="item in bindGameUserList"
:key="item.member_id"
:label="item.username"
:value="item.member_id"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="old_role_id">
<template slot="label">
<span>老区角色</span>
<span class="roleMoney">充值金额:{{ oldRoleMoney }}</span>
</template>
<el-select
v-model="form.old_role_id"
placeholder="请选择角色"
style="width: 100%"
:clearable="false"
@change="handleOldRoleChange"
>
<el-option
v-for="item in oldRoleList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</div>
<!-- 备注 -->
<el-form-item label="备注" prop="remark">
<template slot="label">
<span>备注</span>
<span class="remarkText">(请确认老区/新区确认达标,并贴上背包截图和货币 id 截图)</span>
</template>
<textEditor
:remark.sync="form.remark"
domid="termainalRemark"
style="width: 100%"
:contenteditable="true"
@resultReamrk="resultReamrk"
/>
</el-form-item>
</el-form>
<div class="dialog-footer rowFlex">
<el-button @click="handleClose">取 消</el-button>
<el-button
type="primary"
:loading="loading"
@click="handleSubmit"
>
提 交
</el-button>
</div>
</div>
</el-drawer>
</template>
<script>
import { mapState } from 'vuex'
import { searchcondition, transfer_server_request_add } from '@/api/game'
import textEditor from '@/components/textEditor.vue'
import mainGameSelect from '@/components/mainGame.vue'
export default {
name: 'AreaTransferDialog',
components: {
textEditor,
mainGameSelect
},
props: {
visible: {
type: Boolean,
default: false
},
areaTransferItem: {
type: Object,
default: () => {}
}
},
data() {
return {
loading: false,
form: {
transfer_type: 1,
member_id: '',
old_member_id: '',
role_id: '',
old_role_id: '',
related_request_id: '',
remark: '',
main_game_id: '',
weixin_blongs_id: '',
user_id: '',
user_name: ''
},
transfer_type_list: [
{
label: '普通转区',
value: 1
},
{
label: '特殊转区',
value: 2
}
],
roleMoney: 0,
oldRoleMoney: 0,
rules: {
member_id: [
{ required: true, message: '请选择W账号', trigger: 'change' }
],
old_member_id: [
{ required: true, message: '请选择W账号', trigger: 'change' }
],
role_id: [
{ required: true, message: '请选择角色', trigger: 'change' }
],
old_role_id: [
{ required: true, message: '请选择角色', trigger: 'change' },
{
validator: (rule, value, callback) => {
if (value === this.form.role_id) {
callback(new Error('新区角色和旧区角色不能相同'))
} else {
callback()
}
},
trigger: 'change'
}
],
main_game_id: [
{ required: true, message: '请选择主游戏', trigger: 'change' }
],
weixin_blongs_id: [
{ required: true, message: '请选择项目', trigger: 'change' }
],
remark: [
{ required: true, message: '请输入备注信息', trigger: 'blur' }
]
},
roleList: [],
oldRoleList: [],
flowList: [],
approvalNodeList: [],
roleInfo: {}
}
},
computed: {
...mapState({
bindGameUserList: state => state.game.bindGameUserList,
accountSelect: state => state.game.accountSelect,
userInfo: state => state.user.userInfo
}),
...mapState('common', ['weixin_blongs_id_list']),
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
created() {
this.initForm()
},
methods: {
resultReamrk(text) {
console.log(text, '最后编辑器的内容')
},
handleTransferTypeChange() {
this.roleMoney = 0
this.oldRoleMoney = 0
this.form.member_id = this.accountSelect
this.form.old_member_id = ''
},
// 初始化表单
initForm() {
if (this.areaTransferItem && this.areaTransferItem.id) {
// 重新提交模式
this.form = {
member_id: this.areaTransferItem.member_id,
old_member_id: this.areaTransferItem.old_member_id,
user_id: this.userInfo.id,
user_name: this.userInfo.username,
role_id: this.areaTransferItem.role_id,
old_role_id: this.areaTransferItem.old_role_id,
related_request_id: this.areaTransferItem.id,
transfer_type: this.areaTransferItem.transfer_type || 1,
remark: this.areaTransferItem.remark || '',
main_game_id: Number(this.areaTransferItem.main_game_id),
weixin_blongs_id: Number(this.areaTransferItem.weixin_blongs_id)
}
// 初始化充值金额显示
this.roleMoney = this.areaTransferItem.recharge_total_text || 0
this.oldRoleMoney = this.areaTransferItem.old_recharge_total_text || 0
} else {
// 新建模式
this.form = {
member_id: this.accountSelect,
old_member_id: '',
user_id: this.userInfo.id,
user_name: this.userInfo.username,
role_id: '',
old_role_id: '',
related_request_id: '',
transfer_type: 1,
remark: '',
main_game_id: '',
weixin_blongs_id: ''
}
this.roleMoney = 0
this.oldRoleMoney = 0
}
this.roleInfo = {}
this.approvalNodeList = []
this.getRoleList(this.accountSelect, 1)
this.$nextTick(() => {
this.$refs.form && this.$refs.form.clearValidate()
})
},
// 获取角色列表
async getRoleList(member_id, type) {
try {
const data = {
type: 'role',
member_id: member_id
}
const res = await searchcondition(data)
if (res.status_code === 1) {
if (type === 1) {
this.roleList = res.data.data
// 如果是重新提交,在角色列表加载完成后更新充值金额
if (this.areaTransferItem && this.areaTransferItem.id) {
// 更新新区角色充值金额
const roleInfo = this.roleList.find(item => item.value === this.form.role_id)
if (roleInfo) {
this.roleMoney = roleInfo.recharge_total_text || 0
}
// 更新老区角色充值金额
const oldRoleInfo = this.roleList.find(item => item.value === this.form.old_role_id)
if (oldRoleInfo) {
this.oldRoleMoney = oldRoleInfo.recharge_total_text || 0
}
}
} else {
this.oldRoleList = res.data.data
// 如果是重新提交,在角色列表加载完成后更新充值金额
if (this.areaTransferItem && this.areaTransferItem.id) {
// 更新新区角色充值金额
const roleInfo = this.oldRoleList.find(item => item.value === this.form.role_id)
if (roleInfo) {
this.roleMoney = roleInfo.recharge_total_text || 0
}
// 更新老区角色充值金额
const oldRoleInfo = this.oldRoleList.find(item => item.value === this.form.old_role_id)
if (oldRoleInfo) {
this.oldRoleMoney = oldRoleInfo.recharge_total_text || 0
}
}
}
}
} catch (error) {
console.error('获取角色列表失败:', error)
}
},
handleMemberIdChange(val, type) {
if (val) {
this.getRoleList(val, type)
type === 1 ? this.form.role_id = '' : this.form.old_role_id = ''
}
},
// 角色变化
async handleRoleChange(val) {
const roleInfo = this.roleList.find(item => item.value === val)
if (roleInfo) {
this.form.main_game_id = roleInfo.main_game_id
this.form.weixin_blongs_id = Number(roleInfo.weixin_blongs_id)
this.roleMoney = roleInfo.recharge_total_text || 0
}
},
handleOldRoleChange(val) {
const roleInfo = this.roleList.find(item => item.value === val)
if (roleInfo) {
this.oldRoleMoney = roleInfo.recharge_total_text || 0
}
},
mainGameResult(id, label) {
if (id) {
this.form.main_game_id = id
} else {
this.form.main_game_id = ''
}
},
// 关闭弹窗
handleClose() {
this.dialogVisible = false
},
handleForm() {
const { main_game_id, member_id, old_member_id, weixin_blongs_id, transfer_type, role_id, old_role_id, related_request_id, remark, user_id, user_name } = this.form
return {
member_id,
old_member_id,
main_game_id,
weixin_blongs_id,
transfer_type,
role_id,
old_role_id,
related_request_id,
remark,
user_id,
user_name
}
},
// 提交表单
handleSubmit() {
this.$refs.form.validate(async valid => {
if (valid) {
this.loading = true
setTimeout(() => {
this.loading = false
}, 2000)
const data = this.handleForm()
try {
const res = await transfer_server_request_add(data)
if (res.status_code === 1) {
this.$message.success('提交成功')
this.$emit('updateList')
this.handleClose()
} else {
this.loading = false
this.$message.error(res.message || '提交失败')
}
} catch (error) {
console.error('提交失败:', error)
this.$message.error('提交失败: ' + (error.message || '未知错误'))
this.loading = false
} finally {
this.loading = false
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.areaTransferDialog{
width: 100%;
height: 100%;
overflow: auto;
padding-bottom: 120px;
}
.terminalForm{
padding: 0 20px;
.roleMoney{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #86909C;
line-height: 20px;
text-align: left;
font-style: normal;
margin-left: 20px;
}
.remarkText{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #86909C;
margin-left: 10px;
}
}
.el-dialog {
.el-select {
width: 100%;
}
}
</style>
\ No newline at end of file
<template>
<div class="terminaList">
<div class="addApply rowFlex spaceBetween">
<span></span>
<el-button
type="primary"
icon="el-icon-plus"
@click="(showaddAreaTransfer = true,areaTransferItem = {})"
>新增转端申请</el-button>
</div>
<el-form
ref="taskForm"
:model="terminaForm"
class="terminaListForm"
label-width="85px"
>
<el-form-item label="审批状态">
<el-select
v-model="terminaForm.approval_status"
style="width:95%;"
clearable
placeholder="请选择审批状态"
@change="filterChange"
>
<el-option
v-for="item in approvalList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<BiDatePicker
v-model="create_time"
style="width: 95%"
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
:picker-option="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
:clearable="false"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="createResult"
/>
</el-form-item>
</el-form>
<div
v-infinite-scroll="paperScroll"
:infinite-scroll-disabled="!isMoreRecord"
:infinite-scroll-immediate="false"
class="mailListScroll"
>
<!-- 举报申请 -->
<div v-if="terminaList.length>0" class="scrollMain">
<div
v-for="(item, index) in terminaList"
:key="index"
class="terminaContent"
@click="terminaProcess(item, index)"
>
<div class="terminaItem rowFlex spaceBetween columnCenter">
<div class="terminaItemLeft">
<p><span class="label">角色名称:</span><span class="value">{{ item.role_name }}</span></p>
<p>
<span class="label">累计充值:</span><span class="value">{{ formatNumber(item.recharge_total_amount) }}
</span>
</p>
<p>
<span class="label">登记时间:</span><span class="value">{{ item.create_time || '' }}</span>
</p>
<p><span class="label">转端状态:</span><span class="value">{{ item.trans_check_status_text || '-' }}</span></p>
</div>
<div class="terminaItemRight columnFlex columnCenter">
<el-button
v-if="item.approval_status== 3 && item.related_request_id == 0"
type="primary"
size="mini"
style="margin-bottom:15px;"
@click.stop="resubmitApproval(item)"
>重新提交</el-button>
<img
v-if="item.approval_status == 1"
:src="shenpi1"
class="icon"
/>
<img
v-else-if="item.approval_status == 2"
:src="shenpi2"
class="icon"
/>
<img
v-else-if="item.approval_status == 3"
:src="shenpi6"
class="icon"
/>
<img
v-else-if="item.approval_status == 4"
:src="shenpi4"
class="icon"
/>
<img
v-else-if="item.approval_status == 5"
:src="shenpi5"
class="icon"
/>
</div>
</div>
<!-- 审批进度 -->
<el-collapse-transition>
<div
v-if="item.showStep"
class="terminaProcessList"
>
<el-steps
direction="vertical"
:active="item.current"
finish-status="success"
>
<el-step
v-for="(items, indexs) in item.terminaProcessList"
:key="'trans_item_' + indexs"
:title="items.node_name"
>
<template slot="description">
<div
v-if="items"
class="trans-follow-1 card-style"
>
<div class="follow-item">
<span class="follow-info-label label-font">
{{ items.node_sort !== '0' ? '审批人:' : '登记人:' }}
</span>
<span class="info-value value-font">
{{ Array.isArray(items.user_name) ? items.user_name[0] : items.user_name }}
</span>
<el-tooltip
v-if="Array.isArray(items.user_name) && items.user_name.length > 1"
class="item"
effect="dark"
:content="items.user_name.slice(1).join('、')"
placement="top"
>
<span class="info-value value-font info-value-color">
{{ `+${items.user_name.length - 1}` }}
</span>
</el-tooltip>
</div>
<div
v-if="items.node_sort !== '0' || items.node_name === '系统'"
class="follow-item"
>
<span class="follow-info-label label-font">
审批结果:
</span>
<span
class="info-value value-font"
:class="items.current < indexs ? '' : switchStateTag(items.approval_result)"
>
{{ items.current < indexs ? '' : items.approval_result_text=='通过' ? '完成' : items.approval_result_text }}
</span>
</div>
<div class="follow-item">
<span class="follow-info-label label-font">
{{ items.node_sort !== '0' || items.node_name === '系统' ? '审批时间:' : '登记时间:' }}
</span>
<span class="info-value value-font">
{{ items.node_sort === '0' ? items.create_time : items.update_time }}
</span>
</div>
<div
v-if="(items.node_sort !== '0' || items.node_name === '系统') && items.approval_result === '2'"
class="follow-item"
>
<span class="follow-info-label label-font">
驳回原因:
</span>
<span class="info-value value-font">
{{ items.extra_attribution.remark }}
</span>
</div>
<div
v-if="items.node_sort === item.terminaProcessList[item.terminaProcessList.length - 1].node_sort + '' && items.approval_result === '1' && items.node_sort !== '0'"
class="follow-item-remark follow-item"
>
<span class="follow-info-label label-font">
处理结果:
</span>
<span class="info-value value-font">
{{ items.extra_attribution.banned_text }}
</span>
</div>
<div
v-if="items.node_name !== '系统' && items.extra_attribution && items.extra_attribution.remark"
class="info-item-remark"
>
<div style="display: flex;">
<span class="info-label remark-label">详情:</span>
<span
class="preview-btn"
@click.stop="previewRemark(items.extra_attribution.remark)"
>
<i class="el-icon-view"></i>
点击查看大图
</span>
</div>
<div
class="remark-value"
v-html="formatImg(items.extra_attribution && items.extra_attribution.remark ? items.extra_attribution.remark : '')"
>
</div>
</div>
</div>
</template>
</el-step>
</el-steps>
</div>
</el-collapse-transition>
</div>
</div>
<div v-else class="noContent rowFlex allCenter">
<noContent />
</div>
</div>
<el-dialog
:visible.sync="dialogRemarkVisible"
append-to-body
title="查看大图"
custom-class="remake-dialog"
>
<div class="remake-box">
<div v-html="dialogRemake"></div>
</div>
</el-dialog>
<!-- 编辑误操作 -->
<TerminalTransferDialog
v-if="showaddAreaTransfer"
:visible.sync="showaddAreaTransfer"
:area-transfer-item="areaTransferItem"
@updateList="updateList"
/>
</div>
</template>
<script>
import { searchcondition, member_trans_request_list, member_trans_request_process } from '@/api/game'
import { mapState } from 'vuex'
import { removeDp, formatNumber, debounce } from '@/utils/index'
import TerminalTransferDialog from './TerminalTransferDialog.vue'
// 导入审批状态图标
import shenpi1 from '@/assets/icon/shenpi1.svg'
import shenpi2 from '@/assets/icon/shenpi2.svg'
import shenpi4 from '@/assets/icon/shenpi4.svg'
import shenpi5 from '@/assets/icon/shenpi5.svg'
import shenpi6 from '@/assets/icon/shenpi6.svg'
import noContent from '@/components/noContent.vue'
export default {
computed: {
...mapState('game', ['accountSelect']),
...mapState('user', ['userInfo'])
},
components: {
TerminalTransferDialog,
noContent
},
data() {
return {
pickerOptions: {
disabledDate(time) {
const curDate = (new Date()).getTime()
const three = 90 * 24 * 3600 * 1000
const threeMonths = curDate - three
return time.getTime() >= Date.now() || time.getTime() <= threeMonths
}
},
terminaForm: {
member_id: '',
create_time_start: '',
create_time_end: '',
approval_status: ''
},
create_time: [],
pageInfo: {
page: 1,
page_size: 20
},
terminaList: [],
isMoreRecord: false,
approvalList: [],
dialogRemarkVisible: false,
dialogRemake: '',
showaddAreaTransfer: false,
formatNumber: formatNumber,
// 审批状态图标
shenpi1,
shenpi2,
shenpi4,
shenpi5,
shenpi6
}
},
watch: {
accountSelect(newVal, oldVal) {
console.log(newVal, 'newVal')
if (newVal && newVal !== '') {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isMoreRecord = true
this.filterChange()
}
}
},
mounted() {
this.create_time = [this.$moment().subtract(6, 'days').format('YYYY-MM-DD HH:mm:ss'), this.$moment().format('YYYY-MM-DD HH:mm:ss')]
this.terminaForm.create_time_start = this.create_time[0]
this.terminaForm.create_time_end = this.create_time[1]
this.requstApprovalList()
this.filterChange()
},
methods: {
updateList() {
this.filterChange()
},
resubmitApproval(item) {
this.showaddAreaTransfer = true
this.areaTransferItem = item
},
createResult: debounce(function (data) {
if (data) {
this.terminaForm.create_time_start = data[0]
this.terminaForm.create_time_end = data[1]
} else {
this.terminaForm.create_time_start = ''
this.terminaForm.create_time_end = ''
}
this.filterChange()
}, 300),
filterChange() {
this.pageInfo.page = 1
this.terminaList = []
this.isMoreRecord = true
this.terminaIndex()
},
async requstApprovalList() {
const data = {
type: 'dictionaries',
table_name: 'zs_refund_request',
field_name: 'approval_status'
}
const res = await searchcondition(data)
if (res.status_code === 1) {
this.approvalList = res.data.data
}
},
previewRemark(remark) {
this.dialogRemake = remark
this.dialogRemarkVisible = true
},
async terminaProcess(item, index) {
item.showStep = !item.showStep
if (item.terminaProcessList.length === 0) {
try {
const res = await member_trans_request_process({ id: item.id })
item.terminaProcessList = res.data.data
res.data.data.map((items) => {
if (items.approval_result !== '0' && items.approval_result !== '2') {
item.current += 1
}
})
} catch (error) {
this.$message.error('获取审批进度失败')
console.error('获取审批进度失败:', error)
}
}
this.$forceUpdate()
},
paperScroll() {
this.requestNextPage()
},
requestNextPage(pageInfo) {
this.pageInfo.page++
this.terminaIndex()
},
handleCurrentChange(val) {
this.pageInfo.page = val
},
switchStateTag(status) {
switch (status) {
case '0':
return 'unhandle'
case '1':
return 'handled'
case '2':
return 'sendFail'
}
},
formatImg(html) {
return html.replaceAll(/<img/g, '<img style="max-width:100px;"')
},
switchStateText(status) {
switch (status) {
case '0':
return '待审批'
case '1':
return '通过'
case '2':
return '驳回'
}
},
async terminaIndex() {
if (this.accountSelect === '') {
this.$message.warning('暂无关联的账号,请先去关联账号!')
return false
}
if (this.pageInfo.page === 1) {
this.terminaList = []
}
const { create_time_start, create_time_end, approval_status } = this.terminaForm
const data = {
approval_status,
create_time_start,
create_time_end,
member_id: this.accountSelect,
...this.pageInfo
}
const res = await member_trans_request_list(data)
if (this.pageInfo.page === 1) {
this.terminaList = res.data.data
} else {
this.terminaList = this.terminaList.concat(res.data.data)
}
if (this.terminaList.length > 0) {
this.terminaList.map((item) => {
item.showStep = false
item.current = 0
item.terminaProcessList = []
})
} else {
this.terminaList = []
}
if (res.data.data.length < 20) {
this.isMoreRecord = false
} else {
this.isMoreRecord = true
}
}
}
}
</script>
<style lang="scss" scoped>
.terminaList {
width: 100%;
height: 100%;
overflow: auto;
.terminaListForm{
::v-deep .el-form-item__label{
font-weight: 400;
}
}
.addApply {
margin: 15px 0;
margin-right: 20px;
}
.noContent{
width: 100%;
height: 100%;
font-size: 300px;
}
.taskForm {
::v-deep .el-form-item {
margin-bottom: 10px;
}
}
// 会话筛选
.filterChat {
width: 100%;
margin-top: 20px;
::v-deep .el-button {
margin-left: 6px;
margin-right: 0 !important;
}
.btnListScroll {
margin-bottom: 10px;
}
.chatIcon {
font-size: 20px;
margin-left: 5px;
margin-top: 10px;
cursor: pointer;
}
.itemActive {
background: #e1fff0;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #00bf8a;
border: none;
}
.btnList {
width: 100%;
margin-bottom: 10px;
overflow: auto;
.btnItem {
border: none;
background: #eef0f4;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6e7073;
}
}
}
.mailListScroll {
width: 100%;
height: calc(100vh - 240px);
overflow-y: auto;
overflow-x: hidden;
.scrollMain {
width: 100%;
height: auto;
margin-bottom: 40px;
padding: 0 10px;
.terminaContent {
width:100%;
}
//举报申请
.terminaItem {
padding: 10px;
background: #f7f8fa;
margin-bottom: 10px;
position: relative;
cursor: pointer;
color: #333333;
font-size: 14px;
font-weight: 500;
p {
line-height: 25px;
}
.terminaItemLeft {
width: 100%;
.label {
font-weight: 400;
font-size: 14px;
color: #86909c;
line-height: 20px;
margin-right: 10px;
}
.value {
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 20px;
text-align: left;
}
}
.terminaItemRight {
height: 100%;
.icon {
font-size: 50px;
}
}
}
.chatListItem {
width: 100%;
height: 68px;
padding: 3px vw(20);
position: relative;
cursor: pointer;
color: #333333;
font-size: 14px;
font-weight: 500;
.left {
color: #333333;
font-size: 14px;
font-weight: 500;
}
.info,
.top {
font-size: 14px;
font-weight: 400;
}
.bottom {
font-size: 14px;
color: #999999;
}
.right {
font-size: 12px;
font-weight: 400;
}
}
}
.chatListItemActive {
background: #e4fff1 !important;
}
.chatListItem:hover {
background: #e4fff1 !important;
}
}
}
// 掌游的样式
::v-deep.el-step .el-step__line {
width: 1px;
}
::v-deep .el-step > .is-success {
color: #00bf8a;
border-color: #00bf8a;
.el-step__line {
background-color: #e5e6eb;
}
}
::v-deep .el-step__main > .is-success {
color: #00bf8a;
}
::v-deep .el-step > .is-process {
color: #00bf8a;
border-color: #00bf8a;
.el-step__line {
background-color: #e5e6eb;
}
}
::v-deep .el-step__main > .is-process {
color: #00bf8a;
}
.form-item-btn {
margin: 0 0 0 20px;
}
.audit-label {
font-size: 14px;
font-weight: 800;
margin: 0 0 10px 0;
}
.remark-label {
color: #949fb0;
font-size: 14px;
}
.preview-btn {
cursor: pointer;
font-size: 14px;
color: #00bf8a;
margin: 0 0 0 10px;
i {
margin: 0 5px 0 0;
}
}
.remark-value {
min-height: 100px;
margin: 10px 0 0 40px;
padding: 6px 12px;
border: 1px solid #d9d9d9;
border-radius: 4px;
cursor: not-allowed;
color: #333;
}
.flex-box {
display: flex;
.remark-lebel {
width: 50px;
text-align: right;
}
}
.refund-flow-drawer {
position: fixed;
top: 0;
right: 700px;
}
.btm-btn-box {
position: fixed;
bottom: 20px;
width: 560px;
height: 32px;
}
.audit-state {
width: 50px;
height: 50px;
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
z-index: 100;
.audit-state-stamp {
font-size: 50px;
}
}
.info-item {
width: 45%;
display: flex;
height: 18px;
margin: 0 0 12px 0;
}
.info-item-pic {
width: 100%;
min-height: 96px;
max-height: 192px;
display: flex;
.img-list {
width: 464px;
display: flex;
flex-wrap: wrap;
&-item {
width: 80px;
height: 80px;
border-radius: 4px;
overflow: hidden;
margin: 0 10px 10px 0;
position: relative;
.preview-pic {
width: 80px;
height: 80px;
background: rgba(0, 0, 0, 0.5);
position: absolute;
top: 0;
left: 0;
z-index: -1;
text-align: center;
line-height: 80px;
.preview-icon {
font-size: 16px;
color: #fff;
cursor: pointer;
}
}
.screenshot {
object-fit: center;
width: 80px;
height: 80px;
}
&:hover > .preview-pic {
z-index: 100;
}
}
}
}
.flex-btn {
display: flex;
justify-content: space-between;
}
.info-label {
// width: 90px;
// text-align: right;
display: block;
margin: 0 10px 0 0;
font-size: 14px;
color: #949fb0;
}
.info-value {
display: block;
font-size: 14px;
color: #333;
}
.card-style {
background: #f2f2f7;
border-radius: 4px;
}
.trans-follow-1 {
width: vw(300);
min-height: fit-content;
margin: 6px 0 12px 0;
padding: 12px 12px 2px 12px;
position: relative;
.collapse-btn {
position: absolute;
top: 20px;
right: 15px;
}
.follow-item-remark {
width: 100%;
line-height: 20px;
margin: 0 0 12px 0;
}
.info-value-color {
color: #00bf8a;
margin-left: 5px;
}
}
.follow-item {
min-height: 20px;
line-height: 20px;
margin: 0 0 12px 0;
display: flex;
.label-left {
width: 90px;
text-align: right;
}
}
.left-label {
width: 60px;
}
.follow-info-label {
white-space: nowrap;
text-align: left;
margin: 0 10px 0 0;
}
.info-value {
font-size: 14px;
color: #333;
}
.label-font {
font-size: 14px;
color: #949fb0;
}
.info-item-remark {
width: 100%;
padding: 0 0 12px 0;
line-height: 20px;
.info-label {
display: block;
}
.info-value {
display: block;
width: 440px;
}
}
.terminaProcessList {
margin-bottom: 20px;
margin-top: 20px;
}
</style>
\ No newline at end of file
<template>
<el-drawer
title="转端申请"
:visible.sync="dialogVisible"
size="520px"
:append-to-body="true"
@close="handleClose"
>
<div class="terminalTransferDialog">
<el-form
ref="form"
class="terminalForm"
:model="form"
:rules="rules"
label-position="top"
label-width="80px"
size="small"
>
<!-- W账号 -->
<el-form-item label="W账号" prop="member_id">
<el-select
v-model="form.member_id"
disabled
placeholder="请选择W账号"
style="width: 100%"
>
<el-option
v-for="item in bindGameUserList"
:key="item.member_id"
:label="item.username"
:value="item.member_id"
/>
</el-select>
</el-form-item>
<!-- 角色 -->
<el-form-item label="角色" prop="role_id">
<template slot="label">
<span>角色</span>
<span v-if="roleInfo.recharge_total_text" class="role-money">
(充值金额: {{ roleInfo.recharge_total_text }})
</span>
</template>
<el-select
v-model="form.role_id"
placeholder="请选择角色"
style="width: 100%"
@change="handleRoleChange"
>
<el-option
v-for="item in roleList"
:key="item.value"
:label="item.label+' / '+item.server_name"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 审批组流程 -->
<el-form-item label="审批流程" prop="flow_id">
<el-select
v-model="form.flow_id"
placeholder="请选择审批组流程"
style="width: 100%"
@change="handleFlowChange"
>
<el-option
v-for="item in flowList"
:key="item.id"
:label="item.flow_name"
:value="item.id"
/>
</el-select>
</el-form-item>
<!-- 机审规则 -->
<el-form-item label="机审规则">
<el-select
v-model="form.rule_id"
placeholder="请选择机审规则"
style="width: 100%"
>
<el-option
v-for="item in rulesList"
:key="item.id"
:label="item.rule_name"
:value="item.id"
/>
</el-select>
</el-form-item>
<!-- 审批节点 -->
<el-form-item label="审批节点">
<el-table
:data="approvalNodeList"
style="width: 100%"
size="small"
border
>
<el-table-column
prop="node_name"
label="审批节点"
min-width="120"
/>
<el-table-column
prop="approval_users"
label="审批人"
min-width="200"
/>
</el-table>
</el-form-item>
<!-- 备注 -->
<el-form-item label="备注" prop="remark">
<textEditor
:remark.sync="form.remark"
domid="termainalRemark"
style="width: 100%"
:contenteditable="true"
@resultReamrk="resultReamrk"
/>
</el-form-item>
</el-form>
<div class="dialog-footer rowFlex">
<el-button @click="handleClose">取 消</el-button>
<el-button
type="primary"
:loading="loading"
@click="handleSubmit"
>
提 交
</el-button>
</div>
</div>
</el-drawer>
</template>
<script>
import { mapState } from 'vuex'
import { searchcondition, approval_group_flow_list, approval_group_flow_user, approval_group_flow_add, ruleList } from '@/api/game'
import textEditor from '@/components/textEditor.vue'
export default {
name: 'TerminalTransferDialog',
components: {
textEditor
},
props: {
visible: {
type: Boolean,
default: false
},
areaTransferItem: {
type: Object,
default: () => {}
}
},
data() {
return {
loading: false,
form: {
member_id: '',
role_id: '',
flow_id: '',
remark: '',
main_game_id: '',
weixin_blongs_id: '',
user_id: '',
user_name: '',
rule_id: ''
},
rules: {
member_id: [
{ required: true, message: '请选择W账号', trigger: 'change' }
],
role_id: [
{ required: true, message: '请选择角色', trigger: 'change' }
],
flow_id: [
{ required: true, message: '请选择审批组流程', trigger: 'change' }
],
rule_id: [
{ required: true, message: '请选择机审规则', trigger: 'change' }
],
remark: [
{ required: true, message: '请输入备注信息', trigger: 'blur' }
]
},
roleList: [],
flowList: [],
approvalNodeList: [],
roleInfo: {},
rulesList: [],
// 记录上次请求的流程ID,避免重复请求
lastFlowId: ''
}
},
computed: {
...mapState({
bindGameUserList: state => state.game.bindGameUserList,
accountSelect: state => state.game.accountSelect,
userInfo: state => state.user.userInfo
}),
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
created() {
this.initForm()
},
methods: {
resultReamrk(text) {
console.log(text, '最后编辑器的内容')
},
// 初始化表单
initForm() {
if (this.areaTransferItem && this.areaTransferItem.id) {
// 重新提交模式
this.form = {
member_id: this.accountSelect,
role_id: this.areaTransferItem.role_id,
flow_id: this.areaTransferItem.flow_id,
remark: this.areaTransferItem.remark || '',
main_game_id: Number(this.areaTransferItem.main_game_id),
weixin_blongs_id: Number(this.areaTransferItem.weixin_blongs_id),
user_id: this.userInfo.id,
user_name: this.userInfo.username,
related_request_id: this.areaTransferItem.id,
rule_id: this.areaTransferItem.rule_id || ''
}
} else {
// 新建模式
this.form = {
member_id: this.accountSelect,
role_id: '',
flow_id: '',
remark: '',
main_game_id: '',
weixin_blongs_id: '',
user_id: this.userInfo.id,
user_name: this.userInfo.username,
related_request_id: '',
rule_id: ''
}
}
this.roleInfo = {}
this.approvalNodeList = []
this.rulesList = []
this.lastFlowId = ''
this.getRoleList()
this.$nextTick(() => {
this.$refs.form && this.$refs.form.clearValidate()
})
},
// 获取角色列表
async getRoleList() {
try {
const data = {
type: 'role',
member_id: this.accountSelect
}
const res = await searchcondition(data)
if (res.status_code === 1) {
this.roleList = res.data.data
// 如果是重新提交,在角色列表加载完成后更新角色信息
if (this.areaTransferItem && this.areaTransferItem.id) {
const roleInfo = this.roleList.find(item => item.value === this.form.role_id)
if (roleInfo) {
this.roleInfo = roleInfo
this.getFlowList()
}
}
}
} catch (error) {
console.error('获取角色列表失败:', error)
}
},
// 角色变化
async handleRoleChange(val) {
this.roleInfo = this.roleList.find(item => item.value === val) || {}
this.form.main_game_id = this.roleInfo.main_game_id
this.form.weixin_blongs_id = this.roleInfo.weixin_blongs_id
// 重置表单中的流程ID和规则ID
this.form.flow_id = ''
this.form.rule_id = ''
this.approvalNodeList = []
this.rulesList = []
this.lastFlowId = ''
await this.getFlowList()
},
// 获取审批组流程列表
async getFlowList() {
if (!this.form.main_game_id || !this.form.weixin_blongs_id) return
try {
const data = {
approval_type: 13,
main_game_id: this.form.main_game_id,
weixin_blongs_id: this.form.weixin_blongs_id
}
const res = await approval_group_flow_list(data)
if (res.status_code === 1) {
this.flowList = res.data
}
} catch (error) {
console.error('获取审批组流程列表失败:', error)
}
},
// 审批流程变化
async handleFlowChange() {
this.form.rule_id = ''
this.rulesList = []
await this.getApprovalNodes()
await this.getRulesList()
},
// 获取审批节点
async getApprovalNodes() {
if (!this.form.flow_id) return
try {
const data = {
approval_type: 13,
flow_id: this.form.flow_id,
main_game_id: this.form.main_game_id,
weixin_blongs_id: this.form.weixin_blongs_id
}
const res = await approval_group_flow_user(data)
if (res.status_code === 1) {
this.approvalNodeList = res.data.node_user.map(item => ({
...item,
approval_users: item.approval_user.map(user => user.user_name).join('、')
}))
}
} catch (error) {
console.error('获取审批节点失败:', error)
}
},
// 获取机审规则列表
async getRulesList() {
if (!this.form.flow_id) return
// 如果流程ID没变,不重新请求
if (this.lastFlowId === this.form.flow_id && this.rulesList.length > 0) {
return
}
this.lastFlowId = this.form.flow_id
try {
const data = {
flow_id: this.form.flow_id
}
const res = await ruleList(data)
if (res.status_code === 1) {
this.rulesList = res.data
}
} catch (error) {
console.error('获取机审规则列表失败:', error)
}
},
// 关闭弹窗
handleClose() {
this.dialogVisible = false
},
// 提交表单
handleSubmit() {
this.$refs.form.validate(async valid => {
if (valid) {
this.loading = true
try {
const res = await approval_group_flow_add(this.form)
if (res.status_code === 1) {
this.$message.success('提交成功')
this.$emit('updateList')
this.handleClose()
} else {
this.$message.error(res.message || '提交失败')
}
} catch (error) {
console.error('提交失败:', error)
this.$message.error('提交失败: ' + (error.message || '未知错误'))
} finally {
this.loading = false
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.terminalTransferDialog{
width: 100%;
height: 100%;
overflow: auto;
padding-bottom: 120px;
}
.terminalForm{
padding: 0 20px;
width: 100%;
height: 100%;
overflow: auto;
padding-bottom: 100px;
}
.el-dialog {
.el-select {
width: 100%;
}
}
.role-money {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #86909C;
line-height: 20px;
text-align: left;
font-style: normal;
margin-left: 10px;
}
</style>
<template>
<el-drawer
:lock-scroll="true"
:title="title"
:visible="show"
:size="width"
:append-to-body="true"
@close="close"
>
<div class="errorHandleContent">
<div class="handleNum rowFlex spaceAround">
<p class="rowFlex ">提交次数:{{ numInfo.submit_num }}</p>
<p class="rowFlex ">处理次数:{{ numInfo.handle_num }}</p>
</div>
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-position="top" label-width="100px" class="demo-ruleForm">
<el-form-item label="角色名称" prop="role_id">
<searchSelect :default-value="ruleForm.role_id" :disabled="Boolean(info && info.role_id)" style="margin-left:4px;width:100%;" placeholder="请输入角色名称" @result="selectResult" />
</el-form-item>
<el-form-item label="误操作时间" prop="mistake_operation_time">
<el-date-picker
v-model="ruleForm.mistake_operation_time"
style="margin-left:4px;width:100%;"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="请选择误操作时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="误操作类型" prop="type">
<el-select v-model="ruleForm.type" :disabled="Boolean(info && info.role_id)" :clearable='false' placeholder="状态" style="width:100%;margin-bottom:10px;">
<el-option
v-for="item in errorList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<!-- prop="reissue_prop" -->
<el-form-item label="补发道具名称">
<template slot="label">
补发道具名称
<i class="el-icon-circle-plus-outline icon" @click="add_reissue_prop"></i>
</template>
<div v-for="(item,index) in ruleForm.reissue_prop" :key="index" class="numberItem rowFlex columnCenter">
<!-- <el-input v-model="item.name" style="width:210px;" placeholder="请输入名称"></el-input> -->
<el-select
v-model="item.code"
filterable
remote
reserve-keyword
:remote-method="remoteMethod"
placeholder="请输入道具名称"
style="width:210px;"
@change="extraCodeChange(item,index)"
>
<el-option
v-for="item in codeList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-input-number v-model="item.num" :min="1" style="margin:0 20px;"></el-input-number>
<i class="el-icon-remove-outline icon" @click="removeExtra(item,index)"></i>
</div>
</el-form-item>
<el-form-item label="退回道具名称">
<template slot="label">
退回道具名称
<i class="el-icon-circle-plus-outline icon" @click="add_return_prop"></i>
</template>
<div v-for="(item,index) in ruleForm.return_prop" :key="index" class="numberItem rowFlex columnCenter">
<el-select
v-model="item.code"
filterable
remote
reserve-keyword
:remote-method="remoteMethod"
placeholder="请输入道具名称"
style="width:210px;"
@change="backCodeChange(item,index)"
>
<el-option
v-for="item in codeList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-input-number v-model="item.num" :min="1" style="margin:0 20px;"></el-input-number>
<i class="el-icon-remove-outline icon" @click="removeBack(item,index)"></i>
</div>
</el-form-item>
<el-form-item label="文字说明" prop="remark">
<textEditor :remark.sync="ruleForm.remark" domid="addErrorHandle" style="width: 100%" :contenteditable="true" @resultReamrk="resultReamrk" />
</el-form-item>
<el-form-item v-if="info" label="图片上传" prop="images">
<uploadMultiple :file-list="ruleForm.images" @resultUpload="resultUpload" />
</el-form-item>
</el-form>
</div>
<span class="dialog-footer rowFlex">
<el-button class="btn" type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button class="btn" @click="close">取 消</el-button>
</span>
</el-drawer>
</template>
<script type="text/javascript">
import uploadMultiple from '@/components/uploadMultiple.vue'
import searchSelect from '../order/searchUser.vue'
import { addErrorHandle, updateErrorHandle, numErrorHandle, memberView, selectSearch, operationCount } from '@/api/game'
import { mapMutations, mapActions, mapState } from 'vuex'
import textEditor from '@/components/textEditor.vue'
export default {
components: { searchSelect, uploadMultiple, textEditor },
props: ['show', 'width', 'title', 'info'],
computed: {
...mapState('game', ['accountSelect', 'gameTabActive']),
...mapState('user', ['isGameSystem', 'userInfo'])
},
data() {
return {
loading: false,
searchLoading: false,
gameUserInfo: {},
isUpload: false,
numInfo: {
submit_num: 0,
handle_num: 0
},
codeList: [],
ruleForm: {
role_id: [],
mistake_operation_time: '',
type: 1,
remark: '',
reissue_prop: [
// {
// name: '',
// num: '',
// code: ''
// }
],
return_prop: [
// {
// name: '',
// num: '',
// code: ''
// }
],
images: [],
// 其他参数
main_game_id: '',
weixin_blongs_id: '',
member_id: '',
username: '',
server_id: '',
creator_name: ''
},
rules: {
role_id: [
{ required: true, message: '请选择角色名称', trigger: 'change' }
],
mistake_operation_time: [
{ required: true, message: '请选择角色误操作时间', trigger: 'change' }
],
type: [
{ required: true, message: '请选择误操作类型', trigger: 'change' }
],
reissue_prop: [
{ required: true, message: '请选择补发道具名称', trigger: 'change' }
],
return_prop: [
{ required: true, message: '请选择补发退回名称', trigger: 'change' }
],
remark: [
{ required: true, message: '请输入文字说明', trigger: 'blur' }
]
// images: [
// { required: true, message: '请上传图片', trigger: 'change' }
// ]
},
errorList: [
{ label: '误操作', value: 1 },
{ label: '道具补发', value: 2 }
]
}
},
watch: {
show(newVal, oldVal) {
if (newVal) {
console.log('显示弹窗')
}
}
},
mounted() {
// this.gameMemberView()
this.searchHandleStatus()
if (this.info) {
this.handleForm()
}
},
methods: {
handleForm() {
const { type, role_id, mistake_operation_time, remark, reissue_prop, return_prop, images, main_game_id, weixin_blongs_id, member_id, username, server_id, create_user } = this.info
console.log(images.flat(), 'images.flat()')
this.ruleForm = {
role_id,
type: Number(type),
mistake_operation_time,
remark,
reissue_prop,
return_prop,
images: images.flat(),
main_game_id,
weixin_blongs_id,
member_id,
username,
server_id,
creator_name: create_user
}
this.numErrorHandle(role_id)
},
resultReamrk(text) {
// console.log(text, '最后编辑器的内容')
},
// gameMemberView(item) {
// if (this.accountSelect == '') {
// this.$message.warning('暂无关联的账号,请先去关联账号!')
// return false
// }
// const data = { member_id: this.accountSelect, need_roleInfo: 1 }
// memberView(data).then(res => {
// if (res.status_code == 1) {
// this.gameUserInfo = res.data
// // this.remoteMethod('')
// }
// })
// },
// 更新代码
numErrorHandle(role_id) {
operationCount({ role_id: role_id }).then(res => {
if (res.data) {
this.numInfo.submit_num = res.data.submit_num || 0
this.numInfo.handle_num = res.data.handle_num || 0
}
})
},
// 更新代码
resultUpload(value) {
console.log(value, 'value')
this.ruleForm.images = [value]
},
remoteMethod(query) {
if (this.ruleForm.main_game_id === '') {
this.$message.warning('请先选择角色名称')
return
}
if (query.trim() !== '') {
this.searchLoading = true
const data = {
type: 'misoperation_code',
value: query,
main_game_id: this.ruleForm.main_game_id
}
selectSearch(data).then(res => {
this.searchLoading = false
if (res.status_code == 1) {
this.codeList = res.data.data
}
})
}
},
searchHandleStatus() {
const data = {
type: 'dictionaries',
'table_name': 'zs_mistake_operation_request',
'field_name': 'type'
}
selectSearch(data).then(res => {
if (res.status_code == 1) {
this.errorList = res.data.data
}
})
},
extraCodeChange(item, index) {
const label = this.codeList.find(items => items.value == item.code)
item.name = label.label || ''
},
backCodeChange(item, index) {
const label = this.codeList.find(items => items.value == item.code)
item.name = label.label || ''
},
add_reissue_prop() {
this.ruleForm.reissue_prop.length == 10 ? this.$message.error('最多添加10个') : this.ruleForm.reissue_prop.push({
name: '',
num: '',
code: ''
})
},
add_return_prop() {
this.ruleForm.return_prop.length == 10 ? this.$message.error('最多添加10个') : this.ruleForm.return_prop.push({
name: '',
num: '',
code: ''
})
},
removeExtra(item, index) {
this.ruleForm.reissue_prop.splice(index, 1)
},
removeBack(item, index) {
this.ruleForm.return_prop.splice(index, 1)
},
selectResult(value, info) {
if (info) {
this.ruleForm.main_game_id = info.main_game_id
this.ruleForm.weixin_blongs_id = info.weixin_blongs_id
this.ruleForm.member_id = info.member_id
this.ruleForm.username = info.username
this.ruleForm.server_id = info.server_id
}
this.ruleForm.creator_name = this.userInfo.username
this.ruleForm.role_id = value
this.numErrorHandle(value)
},
close() {
this.$emit('update:show', false)
},
async submit() {
// if (this.ruleForm.reissue_prop.length == 0) {
// this.$message.error('请新增补发道具')
// return
// }
// const item = this.ruleForm.reissue_prop.find(item => item.code == '')
// if (item) {
// this.$message.error('请选择补发道具')
// return
// }
this.$refs.ruleForm.validate((valid) => {
if (valid) {
this.loading = true
setTimeout(() => {
this.submitForm()
}, 500)
} else {
console.log('error submit!!')
return false
}
})
},
async submitForm() {
try {
let res = {}
if (this.info && this.info.role_id) {
// 编辑的时候 已经去掉了
const { id, username } = this.info
const { type, remark, reissue_prop, return_prop, images, creator_name, mistake_operation_time } = this.ruleForm
const data = {
id,
type,
remark,
mistake_operation_time,
reissue_prop,
return_prop,
images,
username,
creator_name
}
res = await updateErrorHandle(data)
} else {
const { id, username } = this.userInfo
const params = this.$clone(this.ruleForm)
params.user_id = id
params.user_name = username
setTimeout(() => {
this.loading = false
}, 3000)
res = await addErrorHandle(params)
}
if (res.status_code === 1) {
this.$message.success(res.msg)
this.close()
this.$emit('updateList')
}
setTimeout(() => {
this.loading = false
}, 2000)
} catch (error) {
this.loading = false
} finally {
this.loading = false
}
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-drawer{
height: 100%;
overflow: auto;
overflow-x:hidden ;
}
.dialog-footer{
width: calc(100%);
height: auto;
position: absolute;
padding-top: 20px;
padding-bottom: 20px;
justify-content: flex-end;
background: #fff;
.btn{
width:84px ;
height: 32px;
}
}
.errorHandleContent{
width:100%;
height: calc(100% - 80px);
overflow: auto;
padding: 0 20px;
width: 100%;
height: 100%;
overflow: auto;
padding-bottom: 100px;
.icon{
font-size:24px;
color:#00bf8a;
cursor: pointer;
}
.numberItem{
margin-bottom: 20px;
}
}
</style>
\ No newline at end of file
<template>
<div class="detailsErrorHandle columnFlex">
<div class="detailsErrorHandleContent">
<div class="filterList">
<div class="rowFlex columnCenter" style="margin-top:10px;">
角色名称:
<searchSelect :account-change="accountChange" style="margin-left:4px;width:70%;" placeholder="请输入角色名称" @result="selectResult" />
</div>
<div class="rowFlex columnCenter" style="margin-top:10px;">
<span style="margin-left:25px;margin-right:5px;">状态:</span>
<el-select v-model="pay_type" clearable placeholder="状态" style="width:70%;margin-bottom:10px;" @change="payTypeResult">
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div>
创建时间:
<el-date-picker v-model="searchDate" type="daterange" clearable style="width: 70%" value-format="yyyy-MM-dd" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" @change="dateResult"> </el-date-picker>
</div>
</div>
<div class="list">
<!-- 过滤条件 -->
<!-- 订单列表 -->
<div v-infinite-scroll="requestOrderList" :infinite-scroll-disabled="!isloadMore" class="orderDetailsScroll">
<div v-if="orderList.length>0">
<div v-for="(item,index) in orderList" :key="index" class="orderDetails">
<div class="orderDetailsList">
<el-collapse v-model="collapseValue" @change="handleChange">
<el-collapse-item :name="item.order_id">
<template slot="title">
<div class="orderDetailsTitle">
<div class="money rowFlex spaceBetween">
<p class="text hidden">角色名称:{{ item.role_name }}</p>
</div>
</div>
</template>
<div class="item rowFlex columnCenter spaceBetween">
<div class="rowFlex">
<span class="label">区服名称</span>
<p class="text">{{ item.server_name }}</p>
</div>
<!-- <el-button v-if="(item.status=='未处理' || item.status=='不通过')" type="text" style="margin-right:10px;" size="medium" @click="editErrorHanle(item)">编辑</el-button> -->
</div>
<div class="item rowFlex columnCenter spaceBetween">
<div class="rowFlex">
<span class="label">角色ID</span>
<p class="text">{{ item.role_id }}</p>
</div>
</div>
<div class="item rowFlex columnCenter spaceBetween">
<div class="rowFlex">
<span class="label">状态</span>
<p v-if="item.approval_status==1" class="unhandle" style="margin-left:10px;">{{ item.approval_status_text }}</p>
<p v-else-if="item.approval_status==2" style="margin-left:10px;" class="noSend">{{ item.approval_status_text }}</p>
<p v-else-if="item.approval_status==3" style="margin-left:10px;" class="sended">{{ item.approval_status_text }}</p>
<p v-else-if="item.approval_status==4" style="margin-left:10px;" class="sendFail">{{ item.approval_status_text }}</p>
<p v-else-if="item.approval_status==5" style="margin-left:10px;" class="handled">{{ item.approval_status_text }}</p>
</div>
</div>
<div class="item rowFlex columnCenter spaceBetween">
<div class="rowFlex">
<span class="label">补发道具</span>
<div v-if="item.reissue_prop.length" style="width:75%;">
<p v-for="(items,indexs) in item.reissue_prop" :key="indexs" class="text">{{ items.name }}{{ `(${items.num})` }}</p>
</div>
</div>
</div>
<div class="item rowFlex columnCenter spaceBetween">
<div class="rowFlex">
<span class="label">返回道具</span>
<div v-if="item.return_prop.length" style="width:75%;">
<p v-for="(items,indexs) in item.return_prop" :key="indexs" class="text">{{ items.name }}{{ `(${items.num})` }}</p>
</div>
</div>
</div>
</el-collapse-item>
</el-collapse>
</div>
</div>
</div>
<div v-else class="noContent rowFlex allCenter">
<noContent />
</div>
</div>
</div>
</div>
<!-- 编辑误操作 -->
<addErrorHandle v-if="showAddErrorHandle" :show.sync="showAddErrorHandle" :info="info" title="编辑玩家误操作" width="30%" @updateList="updateList" />
</div>
</template>
<script>
import { mapMutations, mapActions, mapState } from 'vuex'
import searchSelect from '../order/searchUser.vue'
import { memberView, misoperationIndex, searchcondition } from '@/api/game'
import addErrorHandle from './addErrorHandle.vue'
import noContent from '@/components/noContent.vue'
export default {
components: {
searchSelect,
addErrorHandle,
noContent
},
data() {
return {
pay_type: 0,
info: {},
searchDate: [],
create_time_start: '',
create_time_end: '',
showAddErrorHandle: false,
isloadMore: true,
collapseValue: ['1'],
orderList: [],
gameUserInfo: {
recharge_total: 0,
today_amount: 0
},
statusList: [],
role_id: '',
accountChange: false,
pageInfo: {
page: 0,
page_size: 20,
total: 0
}
}
},
computed: {
...mapState('game', ['accountSelect', 'gameTabActive']),
...mapState('user', ['isGameSystem', 'userInfo'])
},
watch: {
accountSelect(newVal, oldVal) {
if (newVal && newVal !== '' && this.gameTabActive == 9) {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.orderList = []
this.requestOrderList('msg')
// this.gameMemberView()
this.accountChange = true
setTimeout(() => {
this.accountChange = false
}, 200)
}
}
},
mounted() {
this.requstStatusList()
// this.gameMemberView()
this.requestOrderList('msg')
},
methods: {
async requstStatusList() {
const data = {
type: 'dictionaries',
table_name: 'zs_refund_request',
field_name: 'approval_status'
}
const res = await searchcondition(data)
if (res.status_code === 1) {
this.statusList = res.data.data
this.statusList.unshift({ label: '全部', value: 0 })
}
},
dateResult(data) {
if (data) {
this.create_time_start = data[0]
this.create_time_end = data[1]
} else {
this.create_time_start = ''
this.create_time_end = ''
}
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.orderList = []
this.requestOrderList()
},
updateList() {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.orderList = []
this.requestOrderList()
},
editErrorHanle(item) {
this.showAddErrorHandle = true
this.info = item
},
payTypeResult() {
this.isloadMore = true
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.orderList = []
this.requestOrderList()
},
selectResult(value) {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.orderList = []
this.role_id = value
this.requestOrderList()
},
// onConfirm() {
// const data = {
// role_id: this.role_id,
// member_id: this.accountSelect,
// status: this.pay_type
// }
// misoperationIndex(data).then(res => {
// if (res.status_code == 1) {
// this.$message.success(res.msg)
// }
// })
// },
// gameMemberView(item) {
// if (this.accountSelect == '') {
// this.$message.warning('暂无关联的账号,请先去关联账号!')
// return false
// }
// const data = { member_id: this.accountSelect }
// memberView(data).then(res => {
// if (res.status_code == 1) {
// this.gameUserInfo = res.data
// }
// })
// },
handleChange(val) {
console.log(val)
},
requestOrderList(msg) {
if (this.accountSelect == '') {
this.$message.warning('暂无关联的账号,请先去关联账号!')
return false
}
if (!this.isloadMore) {
console.log('没有更多数据了')
return false
}
this.pageInfo.page += 1
const data = {
role_id: this.role_id,
member_id: this.accountSelect,
create_time_start: this.create_time_start,
create_time_end: this.create_time_end,
approval_status: this.pay_type,
...this.pageInfo
}
misoperationIndex(data).then(res => {
if (res.data.data && res.data.data.length < 20) {
this.isloadMore = false
}
this.orderList = this.orderList.concat(res.data.data)
this.orderList.map(item => {
!item.remarks || item.remarks.length === 0 ? item.remarks = [{ remark: '' }] : ''
})
if (res.status_code == 1 && msg) {
this.$message.success(res.msg)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detailsErrorHandle {
width: 100%;
height: 100%;
background: #fff;
margin-left: 2px;
position: relative;
overflow: hidden;
.detailsTitle {
width: 100%;
padding: 0 vw(20);
height: 60px;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
border-bottom: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
p {
color: #333333;
}
}
.detailsErrorHandleContent {
width: 100%;
height:100%;
padding: 20px 10px;
.tabSelect{
width: 100%;
height: 60px;
border-bottom: 1px solid #EBEEF5;
cursor: pointer;
.tabSelectItem{
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
padding-top: 10px;
line-height: 47px;
cursor: pointer;
}
.tabSelectItemActive{
color: #00bf8a;
border-bottom: 2px solid #00bf8a;
}
}
.list{
width: 100%;
height: calc(100% - 90px);
overflow: auto;
}
.contentItem{
position: relative;
.title{
position: absolute;
left: 10px;
top: 14px;
font-size: 14px;
color: #999999;
}
}
.item {
width: 100%;
height: auto;
font-size: 14px;
font-weight: 400;
color: #333333;
padding: 6px 0;
transition: all 0.5s;
position: relative;
padding-left: 10px;
cursor: pointer;
div{
width: 100%;
}
.remark{
::v-deep .el-textarea__inner{
height: 80px;
}
}
.tableImage {
width: 40px;
height: 40px;
border-radius: 6px;
margin-right: vw(10);
}
.label {
color: #999999;
}
.text {
color: #333333;
margin-left: 10px;
word-break: break-all;
max-width: 80%;
}
.icon {
display: none;
position: absolute;
right: 0;
top: 12px;
}
.dianFail{
display: inline-block;
width: 8px;
height: 8px;
background: #F45454;
border-radius: 5px;
}
.dian{
display: inline-block;
width: 8px;
height: 8px;
background: #00bf8a;
border-radius: 5px;
}
.dian2{
display: inline-block;
width: 8px;
height: 8px;
background: #FF9D02;
border-radius: 5px;
}
}
.orderMoney{
width: calc(100% + 40px);
height: 80px;
// margin-left: -20px;
padding: 10px 0;
.orderMoneyItem{
width: 50%;
text-align: center;
margin-top:5px;
span{
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
p{
font-size: 22px;
color: #00bf8a;
}
}
}
.filterList{
margin-bottom: 10px;
.filterListInput{
width: 60%;
margin-left: 15px;
margin-bottom:10px;
}
.filterListDate{
width:150px;
margin-bottom:10px;
}
::v-deep .search-item .item-label{
margin-right: 20px;
}
}
.orderDetailsScroll{
width: 100%;
height: calc(100% - 20px);
overflow: auto;
overflow-x: hidden;
}
.orderDetails{
width: 100%;
height: auto;
margin-bottom: 10px;
position: relative;
.bridgeMain{
position: absolute;
top: 0px;
right:0px;
width:50px;
height:50px;
.text{
font-size: 8px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FF9D02;
transform: rotate(48deg);
z-index: 100;
position: absolute;
right:-6px;
top: 10px;
width: 50px;
text-align: center;
}
.bridge{
font-size: 50px;
position: absolute;
top: 0;
right: 0;
}
}
.orderDetailsTitle{
width: 100%;
background: #F9FAFF;
.money{
width: 100%;
height: auto;
padding-left: 10px;
.btns{
padding-right: 40px;
}
.btn{
background: #fff;
border-radius: 4px;
padding: 2px 5px;
margin-left: 10px;
font-size: 12px;
border: 1px solid rgba(0, 0, 0, 0.15);
color: #333333;
cursor: pointer;
}
.btnnot{
background: #FFDDDD;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #F56C6C;
border: none;
}
.btnsuccess{
background: #E1FFF0;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #00bf8a;
border: none;
}
.sended{
padding: 0 8px;
height: 20px;
line-height: 20px;
background: #E1FFF0;
border-radius: 4px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #00bf8a;
}
.noSend{
padding: 0 8px;
height: 20px;
line-height: 20px;
background: #FFFAE0;
border-radius: 4px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFA81D;
}
}
.text{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
max-width: 200px;
overflow: hidden;
white-space: nowrap; /* 防止文字换行 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
}
.orderDetailsList{
width: 100%;
height: auto;
background: #FFFFFF;
border: 1px solid #EBEEF5;
position: relative;
.titleFix{
position: absolute;
left:10px;
top: 20px;
color: #999999;
}
}
}
}
::v-deep .el-tabs__item{
line-height: 26px;
font-size: 16px;
font-weight: 500;
}
::v-deep .el-collapse {
border: none;
}
::v-deep .el-collapse-item__header{
width: 100%;
color: #333333;
font-size: 14px;
font-weight: 400;
/* 单行显示省略号 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-collapse-item__arrow{
position: absolute;
right: 0px;
}
.noContent{
width: 100%;
height: 100%;
font-size: 300px;
}
}
</style>
\ No newline at end of file
<template>
<el-drawer :lock-scroll="true" :title="title" :visible="show" :size="width" :append-to-body="true" @close="close">
<el-drawer :lock-scroll="true" :title="title" :visible="show" size="300px" :append-to-body="true" @close="close">
<div class="errorHandleContent">
<el-form
ref="ruleForm"
......@@ -50,8 +50,8 @@
</el-form-item>
</el-form>
<span class="dialog-footer rowFlex">
<el-button class="btn" type="primary" :loading="searchLoading" @click="submit">确 定</el-button>
<el-button class="btn" @click="close">取 消</el-button>
<el-button class="btn" type="primary" :loading="searchLoading" size="mini" @click="submit">确 定</el-button>
<el-button class="btn" size="mini" @click="close">取 消</el-button>
</span>
</div>
......@@ -62,7 +62,7 @@
import textEditor from '@/components/textEditor.vue'
export default {
components: { textEditor },
props: ['show', 'width', 'title', 'info'],
props: ['show', 'title', 'info'],
data() {
return {
searchLoading: false,
......
......@@ -2,42 +2,41 @@
<div class="detailsRefund columnFlex">
<div class="content refundContent">
<div class="filterList">
<div class="rowFlex columnCenter spaceBetween">
<span>订单号:</span>
<div class="rowFlex columnCenter">
<span class="label">订单号:</span>
<el-input
v-model="requestData.order_id"
placeholder="请输入订单号"
class="filterListInput"
prefix-icon="el-icon-search"
style="margin-left: 13px; width: 75%"
clearable
class="searchInput"
@change="searchInput"
></el-input>
</div>
<div class="rowFlex columnCenter spaceBetween" style="margin-bottom: 10px">
<span>角色名称:</span>
<searchSelect style=" width: 74%" placeholder="请输入角色名称" @result="selectResult" />
<div class="rowFlex columnCenter">
<span class="label">角色名称:</span>
<searchSelect class="searchInput" placeholder="请输入角色名称" @result="selectResult" />
</div>
<div class="rowFlex columnCenter spaceBetween">
<span>审批状态:</span>
<div class="rowFlex columnCenter ">
<span class="label">审批状态:</span>
<el-select
v-model="requestData.refund_status"
clearable
class="searchInput"
placeholder="请选择退款状态"
style="width: 75%; margin-bottom: 10px"
@change="payTypeResult"
>
<el-option v-for="item in refundStatus" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div class="rowFlex columnCenter spaceBetween">
<span>审批状态:</span>
<div class="rowFlex columnCenter ">
<span class="label">审批状态:</span>
<el-select
v-model="requestData.approval_status"
clearable
class="searchInput"
placeholder="请选择审批状态"
style="width: 74%; margin-bottom: 10px"
@change="payTypeResult"
>
<el-option v-for="item in approvalList" :key="item.value" :label="item.label" :value="item.value">
......@@ -203,7 +202,7 @@
</div>
</div>
<div v-else-if="!loading && orderList.length == 0" class="noContent rowFlex allCenter">
<svg-icon icon-class="noContent" />
<noContent/>
</div>
</div>
</div>
......@@ -222,10 +221,12 @@
import searchSelect from './searchUser.vue'
import { throttle } from '@/utils'
import orderRefund from './orderRefund.vue'
import noContent from '@/components/noContent.vue'
export default {
components: {
searchSelect,
orderRefund
orderRefund,
noContent
},
data() {
return {
......@@ -628,21 +629,13 @@
.filterList {
margin-bottom: 10px;
.filterListInput {
width: 60%;
margin-left: 15px;
margin-bottom: 10px;
.label{
min-width: 60px;
}
.filterListDate {
width: 150px;
.searchInput{
width: 100%;
margin-bottom: 10px;
}
::v-deep .search-item .item-label {
margin-right: 20px;
}
}
.detailsRefundScroll {
......
......@@ -55,7 +55,7 @@
<script>
import { procedure_group, procedureList, procedureSort, procedureGroupSort, skillQuote } from '@/api/skill'
import { mapState, mapMutations, mapActions } from 'vuex'
import { throttle } from '@/utils/index'
import { throttle, copyToClipboard } from '@/utils/index'
export default {
components: {},
props: {
......@@ -220,6 +220,16 @@ export default {
// 发送语音的时候 先编辑再发送
sendMessageEdit(item, id) {
console.log(item, id, '--------------')
// 复制内容到粘贴板
if (item && item.text && item.text.content) {
copyToClipboard(
item.text.content,
(message) => this.$message.success(message),
(message) => this.$message.error(message)
)
}
if (!this.setIntervalTimer) {
this.set_isEditSkill([item])
this.skillQuote(id, 1)
......
......@@ -21,7 +21,6 @@
</div>
</div>
<div v-else class="noContent rowFlex allCenter">
<!-- <svg-icon icon-class="noContent" /> -->
<noContent/>
</div>
</el-collapse-transition>
......@@ -93,7 +92,7 @@
// procedure_group, procedureList, procedureSort, procedureGroupSort, skillQuote,
import { groupList, libraryIndex, logClickTime } from '@/api/skill'
import { mapState, mapMutations, mapActions } from 'vuex'
import { throttle,debounce } from '@/utils/index'
import { throttle, debounce, copyToClipboard } from '@/utils/index'
import noContent from '@/components/noContent.vue'
export default {
components: {
......@@ -182,16 +181,16 @@ export default {
this.searchTable()
}
},500),
// skillQuote(id, num) {
// const data = {
// type: this.activeName,
// procedure_id: id,
// quote_count: num || 1
// }
// skillQuote(data).then((res) => {
// console.log(res)
// })
// },
skillQuote(id, num) {
const data = {
type: this.activeName,
procedure_id: id,
quote_count: num || 1
}
skillQuote(data).then((res) => {
console.log(res)
})
},
sortSkill() {
procedureSort(this.sortID).then((res) => {
if (res.status_code == 1) {
......@@ -209,7 +208,17 @@ export default {
// 发送语音的时候 先编辑再发送
sendMessageEdit(item, id) {
console.log(item, id, '----------')
this.logClickTime(id)
// 复制内容到粘贴板
if (item && item.text && item.text.content) {
copyToClipboard(
item.text.content,
(message) => this.$message.success(message),
(message) => this.$message.error(message)
)
}
// this.logClickTime(id)
// this.skillQuote(id, 1)
},
async logClickTime(id) {
......
......@@ -55,7 +55,7 @@
<script>
import { procedure_group, procedureList, procedureSort, procedureGroupSort, skillQuote } from '@/api/skill'
import { mapState, mapMutations, mapActions } from 'vuex'
import { debounce } from '@/utils/index'
import { debounce, copyToClipboard } from '@/utils/index'
export default {
components: {},
props: {
......@@ -217,6 +217,15 @@ export default {
},
// 发送语音的时候 先编辑再发送
sendMessageEdit(item, id) {
// 复制内容到粘贴板
if (item && item.text && item.text.content) {
copyToClipboard(
item.text.content,
(message) => this.$message.success(message),
(message) => this.$message.error(message)
)
}
this.skillQuote(id, 1)
},
contentSearch() {
......
......@@ -46,10 +46,7 @@
<el-option v-for="item in payList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
</div>
<div>
下单时间:
<el-date-picker v-model="searchDate" type="daterange" style="width: 70%" value-format="yyyy-MM-dd" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" @change="dateResult"> </el-date-picker>
</div>
<selectDate :width="'69%'" :defaultValue="searchDate" @result="dateResult"/>
<div class="rowFlex columnCenter" style="margin-top: 10px">
角色名称:
<searchSelect style="margin-left: 4px; width: 70%" placeholder="请输入角色名称" @result="selectResult" />
......@@ -65,7 +62,7 @@
<div v-if="orderList.length > 0">
<div v-for="(item, index) in orderList" :key="index" class="orderDetails">
<div class="bridgeMain">
<p class="text">{{ item.pay_type_text }}</p>
<p class="text">{{ item.pay_type_text || item.pay_type }}</p>
<img :src="sanjiaoxing" class="bridge" />
</div>
<div class="orderDetailsTitle">
......@@ -167,12 +164,12 @@
import noContent from '@/components/noContent.vue'
export default {
components: {
selectDate,
searchSelect,
refundLog,
orderRefund,
selece,
noContent
noContent,
selectDate
},
data() {
return {
......@@ -205,7 +202,7 @@
order_time_start: '',
order_time_end: ''
},
searchDate: [],
searchDate: {},
gameUserInfo: {
recharge_total: 0,
today_amount: 0
......@@ -239,7 +236,10 @@
},
mounted() {
this.payTypeList()
this.searchDate = [this.$moment().subtract(3, 'month').format('YYYY-MM-DD'), this.$moment().format('YYYY-MM-DD')]
this.searchDate = {
start_date: this.$moment().subtract(3, 'month').format('YYYY-MM-DD'),
end_date: this.$moment().format('YYYY-MM-DD')
}
this.timerData.order_time_start = this.$moment().subtract(3, 'month').format('YYYY-MM-DD')
this.timerData.order_time_end = this.$moment().format('YYYY-MM-DD')
},
......@@ -301,8 +301,8 @@
},
dateResult(data) {
if (data) {
this.timerData.order_time_start = data[0]
this.timerData.order_time_end = data[1]
this.timerData.order_time_start = data.start_date
this.timerData.order_time_end = data.end_date
} else {
this.timerData.order_time_start = ''
this.timerData.order_time_end = ''
......
......@@ -60,12 +60,6 @@ export default {
skillLibrary,
// aiLibrary
},
props: {
messageSource: {
type: String,
default: ''
}
},
data() {
return {
activeName: 'personal'
......
<template>
<div class="quickSend-content">
快捷发送
</div>
</template>
<script>
export default {
name: 'QuickSend',
}
</script>
<style lang="scss" scoped>
.quickSend-content{
width: 100%;
height: 100%;
background: #fff;
}
</style>
\ No newline at end of file
<template>
<h1>1231312312312312321</h1>
</template>
<script>
import * as ww from '@wecom/jssdk'
import { getSignature } from '@/api/user'
export default {
name: 'testWx',
data() {
return {
signData: {},
}
},
mounted() {
this.getSignature()
console.log(window.location.href,'window.location.href')
},
methods: {
async getSignature(){
console.log('获取签名',window.location.href)
const res = await getSignature({ corp_id: 'wweaefe716636df3d1', path: window.location.href });
if(res.status_code === 1){
this.signData = res.data
try{
this.registerWeComSDK();
}catch(err){
console.log(err,'初始化sdk 失败')
}
}
},
registerWeComSDK() {
ww.register({
corpId: 'wweaefe716636df3d1',
agentId: this.signData.agent_id,
jsApiList: ['getExternalUserInfo'],
getConfigSignature: () => Promise.resolve({
nonceStr: this.signData.nonce_str,
timestamp: this.signData.signature_time,
signature: this.signData.corp_signature,
}),
// 只用到应用的 api 可以只进行应用的签名
getAgentConfigSignature: () => Promise.resolve({
nonceStr: this.signData.nonce_str,
timestamp: this.signData.signature_time,
signature: this.signData.agent_signature,
}),
onAgentConfigSuccess: (res) => {
console.log('注册成功可以调用企微 js-sdk',res)
this.getCurExternalContact()
// 注册成功后不立即获取外部联系人,等钉钉扫码后再获取
},
onAgentConfigFail: (err) => {
console.log('注册失败不能使用企微js-sdk',err)
// 错误处理
}
});
},
getCurExternalContact() {
ww.getCurExternalContact({
success: (res) => {
if (res.err_msg === "getCurExternalContact:ok") {
console.log(res,'获取企微外部联系人')
}
},
fail: (err) => {
console.log(err,'获取企微外部联系人失败')
// 错误处理
}
});
},
}
}
</script>
\ No newline at end of file
......@@ -32,23 +32,7 @@ export default {
methods:{
...mapMutations('game',['set_chatUserInfo']),
...mapMutations('user',['set_userid','set_corp_id','set_token','set_cser_info','set_cser_id','set_cser_name','set_userInfo']),
initVuexValue(){
this.set_userid(Cookies.get('userid'))
this.set_corp_id(Cookies.get('corp_id'))
this.set_token(Cookies.get('token'))
this.set_cser_id(Cookies.get('cser_id'))
this.set_cser_name(Cookies.get('cser_name'))
const userinfo = {
cser_id:Cookies.get('cser_id'),
cser_name:Cookies.get('cser_name'),
username:Cookies.get('cser_name'),
id:Cookies.get('cser_id'),
}
this.set_userInfo(userinfo)
const cser_info = Cookies.get('cser_info')
console.log(Cookies.get('cser_id'),'cser_info',Cookies.get('cser_name'))
cser_info?this.set_cser_info(JSON.parse(cser_info)):this.set_cser_info({})
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论