提交 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
......
<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"
: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"
/>
</div>
<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 ? '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 uuid
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)
})
} 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{
width: 100%;
height: 100%;
background: #fff;
}
</style>
\ No newline at end of file
</script>
<style lang="scss" scoped>
.gift-tab-container-errorHanledle {
//padding: 20px;
width: 100%;
height: 100%;
padding-top: 10px;
background: #fff;
::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>
<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,8 +208,18 @@ export default {
// 发送语音的时候 先编辑再发送
sendMessageEdit(item, id) {
console.log(item, id, '----------')
this.logClickTime(id)
// this.skillQuote(id, 1)
// 复制内容到粘贴板
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) {
console.log(id, '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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论