Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
82a41625
提交
82a41625
authored
1月 28, 2026
作者:
施汉文
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
客户资料样式修改
上级
f8a92a1f
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
747 行增加
和
357 行删除
+747
-357
index.html
public/index.html
+1
-1
App.vue
src/App.vue
+13
-18
Drawer.vue
src/components/common/Drawer.vue
+3
-3
Empty.vue
src/components/common/Empty.vue
+2
-2
ModificationBox.vue
src/components/common/ModificationBox.vue
+76
-0
index.vue
src/views/agentStatusManagement/index.vue
+12
-12
addUser.vue
src/views/components/bindGameAccount/addUser.vue
+19
-3
login.vue
src/views/login.vue
+175
-124
TagsCheck.vue
src/views/popup/AddTagsDrawer/components/TagsCheck.vue
+6
-6
RecentActivities.vue
...opup/RecentActivitiesPopup/templates/RecentActivities.vue
+23
-17
Info.vue
src/views/userInfo/components/Info.vue
+99
-32
ZyouTag.vue
src/views/userInfo/components/gameInfo/ZyouTag.vue
+14
-14
gameUserInfo.vue
src/views/userInfo/components/gameInfo/gameUserInfo.vue
+53
-19
shareInfo.vue
src/views/userInfo/components/shareInfo.vue
+235
-90
userInfo.vue
src/views/userInfo/userInfo.vue
+16
-16
没有找到文件。
public/index.html
浏览文件 @
82a41625
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<title>
企微侧边栏
</title>
<title>
企微侧边栏
</title>
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no"> -->
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no"> -->
<script
src=
"https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"
></script>
<script
src=
"https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"
></script>
<script
src=
"https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/svg_27278_17
3.e64d61edfe0d4824e2eeb0b7f478e568
.js"
></script>
<script
src=
"https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/svg_27278_17
4.7c507957486002617642b36b416498d5
.js"
></script>
</head>
</head>
<body>
<body>
<noscript>
<noscript>
...
...
src/App.vue
浏览文件 @
82a41625
...
@@ -69,10 +69,10 @@
...
@@ -69,10 +69,10 @@
>
>
<el-badge
is-dot
:type=
"csStatusInfo.type"
>
<el-badge
is-dot
:type=
"csStatusInfo.type"
>
<!-- <span>{{ item.label }}</span> -->
<!-- <span>{{ item.label }}</span> -->
<
iconpark
-icon
<
svg
-icon
class=
"
w-[14px] h
-[14px]"
class=
"
text
-[14px]"
:
n
ame=
"item.icon"
:
svgN
ame=
"item.icon"
></
iconpark
-icon>
></
svg
-icon>
</el-badge>
</el-badge>
</div>
</div>
</el-tooltip>
</el-tooltip>
...
@@ -86,23 +86,15 @@
...
@@ -86,23 +86,15 @@
:content=
"item.label"
:content=
"item.label"
placement=
"left"
placement=
"left"
>
>
<
iconpark
-icon
<
svg
-icon
class=
"w-[14px]
h
-[14px]"
class=
"w-[14px]
text-red h-[14px] text
-[14px]"
:
n
ame=
"item.icon"
:
svgN
ame=
"item.icon"
></
iconpark
-icon>
></
svg
-icon>
</el-tooltip>
</el-tooltip>
</div>
</div>
</el-menu-item>
</el-menu-item>
</el-menu>
</el-menu>
</div>
</div>
<
<<<<<<
HEAD =
======
<!
--
绑定的
w
账号
--
>
<bindUserList
/>
</div>
<div
class=
"mobile-content"
>
<router-view></router-view>
>>>>>>> release
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -185,7 +177,7 @@ export default {
...
@@ -185,7 +177,7 @@ export default {
{
{
label
:
"用户待办"
,
label
:
"用户待办"
,
path
:
"/userToDo"
,
path
:
"/userToDo"
,
hasRedDot
:
false
,
// 红点状态
icon
:
"yonghudaiban"
,
},
},
{
{
label
:
"微言助手"
,
label
:
"微言助手"
,
...
@@ -546,7 +538,7 @@ body {
...
@@ -546,7 +538,7 @@ body {
}
}
.agent-status-management
{
.agent-status-management
{
::v-deep
.el-badge__content.is-dot
{
::v-deep
.el-badge__content.is-dot
{
top
:
38px
!important
;
/* top: 38px !important; */
right
:
2px
!important
;
right
:
2px
!important
;
}
}
}
}
...
@@ -562,4 +554,7 @@ body {
...
@@ -562,4 +554,7 @@ body {
.p-common
{
.p-common
{
padding
:
0
10px
;
padding
:
0
10px
;
}
}
::v-deep
.el-badge__content.is-fixed
{
z-index
:
1
;
}
</
style
>
</
style
>
src/components/common/Drawer.vue
浏览文件 @
82a41625
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
>
>
<template
#
title
>
<template
#
title
>
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<
iconpark
-icon
<
svg
-icon
@
click=
"$emit('close')"
@
click=
"$emit('close')"
n
ame=
"icon-fanhui"
svgN
ame=
"icon-fanhui"
class=
"mr-[8px] w-[20px] text-[20px] cursor-pointer"
class=
"mr-[8px] w-[20px] text-[20px] cursor-pointer"
></
iconpark
-icon>
></
svg
-icon>
<span
class=
"text-[13px] text-[#131920] leading-[13px]"
>
{{
<span
class=
"text-[13px] text-[#131920] leading-[13px]"
>
{{
title
title
}}
</span>
}}
</span>
...
...
src/components/common/Empty.vue
浏览文件 @
82a41625
<
template
>
<
template
>
<div
class=
"w-full h-full flex items-center justify-center"
>
<div
class=
"w-full h-full flex items-center justify-center"
>
<div
class=
"flex flex-col justify-center"
>
<div
class=
"flex flex-col
items-center
justify-center"
>
<
iconpark-icon
name=
"Empty-2"
class=
"text-[80px]"
></iconpark
-icon>
<
svg-icon
svgName=
"Empty-2"
class=
"text-[80px]"
></svg
-icon>
<slot></slot>
<slot></slot>
</div>
</div>
</div>
</div>
...
...
src/components/common/ModificationBox.vue
0 → 100644
浏览文件 @
82a41625
<
template
>
<div
class=
"relative w-full group flex items-center"
>
<template
v-if=
"show"
>
<el-input
v-model=
"value"
class=
"showInputRemarkInput"
:type=
"isInput ? 'text' : 'textarea'"
></el-input>
<div
class=
"absolute bottom-[6px] right-[10px] text-[16px] flex"
>
<svg-icon
svgName=
"icon-quxiao"
class=
"text-[#B0B2B5] cursor-pointer"
@
click=
"close"
></svg-icon>
<svg-icon
svgName=
"icon-queding"
class=
"text-[#267EF0] cursor-pointer ml-[6px]"
@
click=
"confirm"
></svg-icon>
</div>
</
template
>
<
template
v-else
>
<slot></slot>
<svg-icon
svgName=
"ziliao-bianji"
class=
"group-hover:visible ml-[6px] text-primary invisible cursor-pointer text-[16px]"
@
click=
"editRemark"
></svg-icon>
</
template
>
</div>
</template>
<
script
>
export
default
{
name
:
"CommonModificationBox"
,
props
:
{
text
:
{
type
:
String
,
default
:
""
,
},
isInput
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{
value
:
""
,
show
:
false
,
};
},
created
()
{
// 初始化value为text的初始值
this
.
value
=
this
.
text
;
},
watch
:
{
text
(
newVal
)
{
this
.
value
=
newVal
;
},
},
methods
:
{
editRemark
()
{
this
.
show
=
true
;
},
close
()
{
this
.
show
=
false
;
this
.
value
=
this
.
text
;
},
confirm
()
{
this
.
$emit
(
"confirm"
,
this
.
value
);
this
.
show
=
false
;
},
},
};
</
script
>
<
style
></
style
>
src/views/agentStatusManagement/index.vue
浏览文件 @
82a41625
...
@@ -31,10 +31,10 @@
...
@@ -31,10 +31,10 @@
:loading=
"logoutLoading"
:loading=
"logoutLoading"
>
>
<div
class=
"flex items-center justify-center"
>
<div
class=
"flex items-center justify-center"
>
<
iconpark
-icon
<
svg
-icon
n
ame=
"kefucaozuo-xiaxian"
svgN
ame=
"kefucaozuo-xiaxian"
class=
"mr-[8px] text-[14px]"
class=
"mr-[8px] text-[14px]"
></
iconpark
-icon>
></
svg
-icon>
下线
下线
</div>
</div>
</el-button>
</el-button>
...
@@ -51,10 +51,10 @@
...
@@ -51,10 +51,10 @@
:loading=
"startRestLoading"
:loading=
"startRestLoading"
>
>
<div
class=
"flex items-center justify-center"
>
<div
class=
"flex items-center justify-center"
>
<
iconpark
-icon
<
svg
-icon
n
ame=
"kefucaozuo-xiuxi"
svgN
ame=
"kefucaozuo-xiuxi"
class=
"mr-[8px] text-[14px]"
class=
"mr-[8px] text-[14px]"
></
iconpark
-icon>
></
svg
-icon>
开始休息
开始休息
</div>
</div>
</el-button>
</el-button>
...
@@ -67,10 +67,10 @@
...
@@ -67,10 +67,10 @@
:loading=
"finishRestLoading"
:loading=
"finishRestLoading"
>
>
<div
class=
"flex items-center justify-center"
>
<div
class=
"flex items-center justify-center"
>
<
iconpark
-icon
<
svg
-icon
n
ame=
"kefucaozuo-xiuxi"
svgN
ame=
"kefucaozuo-xiuxi"
class=
"mr-[8px] font-bold text-[14px]"
class=
"mr-[8px] font-bold text-[14px]"
></
iconpark
-icon>
></
svg
-icon>
结束休息
结束休息
</div>
</div>
</el-button>
</el-button>
...
@@ -81,10 +81,10 @@
...
@@ -81,10 +81,10 @@
:loading=
"sendCommentLoading"
:loading=
"sendCommentLoading"
>
>
<div
class=
"flex items-center justify-center"
>
<div
class=
"flex items-center justify-center"
>
<
iconpark
-icon
<
svg
-icon
n
ame=
"kefucaozuo-pingjia"
svgN
ame=
"kefucaozuo-pingjia"
class=
"mr-[8px] text-[14px]"
class=
"mr-[8px] text-[14px]"
></
iconpark
-icon>
></
svg
-icon>
发送评价
发送评价
</div>
</div>
</el-button>
</el-button>
...
...
src/views/components/bindGameAccount/addUser.vue
浏览文件 @
82a41625
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
:okDisabled=
"!checkoutUser.member_id"
:okDisabled=
"!checkoutUser.member_id"
@
ok=
"confirmSubmit"
@
ok=
"confirmSubmit"
>
>
<div
class=
"w-full h-full
py-[10px]
"
>
<div
class=
"w-full h-full
flex flex-col py-[10px]"
v-loading=
"loading
"
>
<div
class=
"flex items-center px-[12px]"
>
<div
class=
"flex items-center px-[12px]"
>
<el-input
<el-input
v-model
.
trim=
"inputValue"
v-model
.
trim=
"inputValue"
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
</el-button>
</el-button>
</el-popover>
</el-popover>
</div>
</div>
<div
class=
"mt-[12px] content"
>
<div
class=
"mt-[12px] content"
v-if=
"tableList.length !== 0"
>
<div
<div
class=
"cursor-pointer hover:bg-[#F5F6F7]"
class=
"cursor-pointer hover:bg-[#F5F6F7]"
v-for=
"item in tableList"
v-for=
"item in tableList"
...
@@ -217,6 +217,12 @@
...
@@ -217,6 +217,12 @@
</div>
</div>
</div>
</div>
</div>
</div>
<Empty
v-else
class=
"flex-1 pb-[30%]"
>
<div
class=
"text-[#6D7176] text-[12px]"
>
暂无数据
</div>
<div
class=
"text-[#B0B2B5] mt-[4px] text-[12px]"
>
请点击搜索框或筛选按钮查询
</div>
</Empty>
</div>
</div>
<!--
<div
class=
"content"
>
<!--
<div
class=
"content"
>
...
@@ -395,12 +401,14 @@ import { mapMutations, mapActions, mapState } from "vuex";
...
@@ -395,12 +401,14 @@ import { mapMutations, mapActions, mapState } from "vuex";
import
page
from
"@/components/page/pageNum.vue"
;
import
page
from
"@/components/page/pageNum.vue"
;
import
Drawer
from
"@/components/common/Drawer.vue"
;
import
Drawer
from
"@/components/common/Drawer.vue"
;
import
{
debounce
}
from
"@/utils/index"
;
import
{
debounce
}
from
"@/utils/index"
;
import
Empty
from
"@/components/common/Empty.vue"
;
export
default
{
export
default
{
name
:
"addUser"
,
name
:
"addUser"
,
components
:
{
components
:
{
userTable
,
userTable
,
page
,
page
,
Drawer
,
Drawer
,
Empty
,
},
},
props
:
[
"show"
],
props
:
[
"show"
],
data
()
{
data
()
{
...
@@ -446,6 +454,7 @@ export default {
...
@@ -446,6 +454,7 @@ export default {
...
mapActions
(
"game"
,
[
"gameBindUser"
]),
...
mapActions
(
"game"
,
[
"gameBindUser"
]),
...
mapMutations
(
"game"
,
[
"set_accountSelect"
]),
...
mapMutations
(
"game"
,
[
"set_accountSelect"
]),
requestRoleList
()
{
requestRoleList
()
{
this
.
loading
=
true
;
const
data
=
{
const
data
=
{
member_id
:
this
.
form
.
member_id
,
member_id
:
this
.
form
.
member_id
,
username
:
this
.
form
.
username
.
trim
(),
username
:
this
.
form
.
username
.
trim
(),
...
@@ -457,7 +466,8 @@ export default {
...
@@ -457,7 +466,8 @@ export default {
search_type
:
"bind"
,
search_type
:
"bind"
,
...
this
.
pageInfo
,
...
this
.
pageInfo
,
};
};
getRoleHoLo
(
data
).
then
((
res
)
=>
{
getRoleHoLo
(
data
)
.
then
((
res
)
=>
{
if
(
res
.
status_code
==
1
)
{
if
(
res
.
status_code
==
1
)
{
if
(
res
.
data
.
data
.
length
==
0
)
{
if
(
res
.
data
.
data
.
length
==
0
)
{
this
.
tableList
=
[];
this
.
tableList
=
[];
...
@@ -467,6 +477,9 @@ export default {
...
@@ -467,6 +477,9 @@ export default {
this
.
pageInfo
=
res
.
data
.
page_info
;
this
.
pageInfo
=
res
.
data
.
page_info
;
}
}
}
}
})
.
finally
(()
=>
{
this
.
loading
=
false
;
});
});
},
},
// S181.啊呸¤可瑞 八荒181服
// S181.啊呸¤可瑞 八荒181服
...
@@ -478,6 +491,8 @@ export default {
...
@@ -478,6 +491,8 @@ export default {
},
},
remoteMethodServer
(
query
)
{
remoteMethodServer
(
query
)
{
if
(
query
!==
""
)
{
if
(
query
!==
""
)
{
console
.
log
(
this
.
loading
);
this
.
loading
=
true
;
this
.
loading
=
true
;
const
data
=
{
const
data
=
{
type
:
"server_info"
,
type
:
"server_info"
,
...
@@ -485,6 +500,7 @@ export default {
...
@@ -485,6 +500,7 @@ export default {
main_game_ids
:
this
.
form
.
main_game_id
,
main_game_ids
:
this
.
form
.
main_game_id
,
};
};
selectSearch
(
data
).
then
((
res
)
=>
{
selectSearch
(
data
).
then
((
res
)
=>
{
console
.
log
(
this
.
loading
);
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
status_code
==
1
)
{
if
(
res
.
status_code
==
1
)
{
this
.
serverNameList
=
res
.
data
.
data
;
this
.
serverNameList
=
res
.
data
.
data
;
...
...
src/views/login.vue
浏览文件 @
82a41625
...
@@ -4,13 +4,18 @@
...
@@ -4,13 +4,18 @@
<div
v-if=
"!token"
>
<div
v-if=
"!token"
>
<div>
<div>
当前选中组织:
<span
class=
"current-org"
>
{{
currentOrg
.
name
}}
</span>
当前选中组织:
<span
class=
"current-org"
>
{{
currentOrg
.
name
}}
</span>
<el-button
type=
"text"
@
click=
"showOrgDialog = true"
>
切换组织
</el-button>
<el-button
type=
"text"
@
click=
"showOrgDialog = true"
>
切换组织
</el-button
>
</div>
</div>
<div
class=
"qr-contain"
>
<div
class=
"qr-contain"
>
<div
id=
"dingTalkLoginContainer"
>
<div
id=
"dingTalkLoginContainer"
></div>
</div>
<div
class=
"refresh"
>
<div
class=
"refresh"
>
<i
class=
"el-icon-refresh-right "
@
click=
"refreshDingTalkQRCode"
></i>
<!--
<i
class=
"el-icon-refresh-right "
@
click=
"refreshDingTalkQRCode"
></i>
-->
<svg-icon
svgName=
"icon-zhongxinshengcheng"
@
click=
"refreshDingTalkQRCode"
/>
</div>
</div>
<!-- 生二维码的时候加一个 loading -->
<!-- 生二维码的时候加一个 loading -->
<div
class=
"loading"
v-if=
"qrLoading"
>
<div
class=
"loading"
v-if=
"qrLoading"
>
...
@@ -21,8 +26,12 @@
...
@@ -21,8 +26,12 @@
</div>
</div>
<!-- 组织切换弹窗 -->
<!-- 组织切换弹窗 -->
<el-dialog
:visible
.
sync=
"showOrgDialog"
width=
"300px"
title=
"选择组织"
>
<el-dialog
:visible
.
sync=
"showOrgDialog"
width=
"300px"
title=
"选择组织"
>
<ul
style=
"list-style:none;padding:0;margin-top: -20px;"
>
<ul
style=
"list-style: none; padding: 0; margin-top: -20px"
>
<li
v-for=
"org in orgList"
:key=
"org.app_key"
@
click=
"switchOrg(org)"
:style=
"
{
<li
v-for=
"org in orgList"
:key=
"org.app_key"
@
click=
"switchOrg(org)"
:style=
"
{
padding: '8px 16px',
padding: '8px 16px',
cursor: 'pointer',
cursor: 'pointer',
background: org.app_key === currentOrg.app_key ? '#e6f7ff' : '',
background: org.app_key === currentOrg.app_key ? '#e6f7ff' : '',
...
@@ -30,10 +39,17 @@
...
@@ -30,10 +39,17 @@
fontWeight: org.app_key === currentOrg.app_key ? 'bold' : 'normal',
fontWeight: org.app_key === currentOrg.app_key ? 'bold' : 'normal',
borderRadius: '4px',
borderRadius: '4px',
marginBottom: '4px',
marginBottom: '4px',
transition: 'background 0.2s'
transition: 'background 0.2s',
}" @mouseover="hoveredOrg = org.app_key" @mouseleave="hoveredOrg = null">
}"
@mouseover="hoveredOrg = org.app_key"
@mouseleave="hoveredOrg = null"
>
{{
org
.
name
}}
{{
org
.
name
}}
<span
v-if=
"org.app_key === currentOrg.app_key"
style=
"margin-left:8px;"
>
(当前)
</span>
<span
v-if=
"org.app_key === currentOrg.app_key"
style=
"margin-left: 8px"
>
(当前)
</span
>
</li>
</li>
</ul>
</ul>
</el-dialog>
</el-dialog>
...
@@ -41,17 +57,16 @@
...
@@ -41,17 +57,16 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
*
as
ww
from
'@wecom/jssdk'
import
*
as
ww
from
"@wecom/jssdk"
;
import
{
getOrganization
,
getAuthUser
,
getSignature
}
from
'@/api/user'
import
{
getOrganization
,
getAuthUser
,
getSignature
}
from
"@/api/user"
;
import
Cookies
from
'js-cookie'
import
Cookies
from
"js-cookie"
;
import
{
getParams
}
from
'@/utils/index'
import
{
getParams
}
from
"@/utils/index"
;
import
{
mapMutations
,
mapState
}
from
'vuex'
import
{
mapMutations
,
mapState
}
from
"vuex"
;
import
{
getToken
,
setToken
}
from
'@/utils/auth'
import
{
getToken
,
setToken
}
from
"@/utils/auth"
;
import
jsApiList
from
'@/utils/jsApiList'
import
jsApiList
from
"@/utils/jsApiList"
;
export
default
{
export
default
{
name
:
'login'
,
name
:
"login"
,
components
:
{
components
:
{},
},
data
()
{
data
()
{
return
{
return
{
wecomUserInfo
:
null
,
// 企微用户信息
wecomUserInfo
:
null
,
// 企微用户信息
...
@@ -65,75 +80,90 @@ export default {
...
@@ -65,75 +80,90 @@ export default {
hoveredOrg
:
null
,
hoveredOrg
:
null
,
showRefresh
:
false
,
// 控制刷新按钮显示
showRefresh
:
false
,
// 控制刷新按钮显示
qrLoading
:
false
,
// 控制二维码 loading
qrLoading
:
false
,
// 控制二维码 loading
redirectUri
:
process
.
env
.
NODE_ENV
===
'production'
?
'https://companywx.zwnet.cn/api/api/sidebar_login/ding'
:
'https://companywx.zwwlkj03.top/api/api/sidebar_login/ding'
,
redirectUri
:
DDTestUrl
:
''
,
process
.
env
.
NODE_ENV
===
"production"
token
:
getToken
()
?
"https://companywx.zwnet.cn/api/api/sidebar_login/ding"
}
:
"https://companywx.zwwlkj03.top/api/api/sidebar_login/ding"
,
DDTestUrl
:
""
,
token
:
getToken
(),
};
},
},
async
mounted
()
{
async
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
initLogin
()
this
.
initLogin
()
;
})
})
;
},
},
computed
:
{
computed
:
{
...
mapState
(
'user'
,
[
'corp_id'
])
...
mapState
(
"user"
,
[
"corp_id"
]),
},
},
methods
:
{
methods
:
{
...
mapMutations
(
'user'
,
[
'set_corp_id'
,
'set_userid'
,
'set_userInfo'
,
'set_token'
,
'set_cser_info'
,
'set_signData'
,
'set_cser_id'
,
'set_cser_name'
,
'set_external_userid'
]),
...
mapMutations
(
"user"
,
[
"set_corp_id"
,
"set_userid"
,
"set_userInfo"
,
"set_token"
,
"set_cser_info"
,
"set_signData"
,
"set_cser_id"
,
"set_cser_name"
,
"set_external_userid"
,
]),
async
initLogin
()
{
async
initLogin
()
{
const
urlParams
=
getParams
();
const
urlParams
=
getParams
();
await
this
.
initOrganization
();
await
this
.
initOrganization
();
const
userid
=
Cookies
.
get
(
'userid'
);
const
userid
=
Cookies
.
get
(
"userid"
);
// 如果是钉钉扫码回调页面
// 如果是钉钉扫码回调页面
if
(
urlParams
.
type
&&
urlParams
.
type
===
'ding'
)
{
// 钉钉回调
if
(
urlParams
.
type
&&
urlParams
.
type
===
"ding"
)
{
console
.
log
(
1
)
// 钉钉回调
console
.
log
(
1
);
this
.
handleDingCallback
();
this
.
handleDingCallback
();
}
else
if
(
this
.
token
&&
userid
)
{
// 已经钉钉扫码过 重新获取授权 获取签名 注册企微js-sdk
}
else
if
(
this
.
token
&&
userid
)
{
console
.
log
(
2
)
// 已经钉钉扫码过 重新获取授权 获取签名 注册企微js-sdk
console
.
log
(
2
);
await
this
.
getSignature
();
await
this
.
getSignature
();
}
else
{
}
else
{
console
.
log
(
3
)
console
.
log
(
3
);
if
(
!
userid
)
{
//没有企微授权过 并且 钉钉扫码成功 开始微信授权
if
(
!
userid
)
{
console
.
log
(
4
)
//没有企微授权过 并且 钉钉扫码成功 开始微信授权
console
.
log
(
4
);
await
this
.
startWeComSilentAuth
();
await
this
.
startWeComSilentAuth
();
}
else
{
}
else
{
console
.
log
(
5
)
console
.
log
(
5
)
;
this
.
initDingTalkLogin
();
// 始化钉钉扫码
this
.
initDingTalkLogin
();
// 始化钉钉扫码
}
}
}
}
},
},
// 设置缓存
// 设置缓存
cacheCorp_id
(
corp_id
)
{
cacheCorp_id
(
corp_id
)
{
Cookies
.
set
(
'corp_id'
,
corp_id
,
{
expires
:
30
})
Cookies
.
set
(
"corp_id"
,
corp_id
,
{
expires
:
30
});
this
.
set_corp_id
(
corp_id
)
this
.
set_corp_id
(
corp_id
)
;
},
},
cacheuserid
(
userid
)
{
cacheuserid
(
userid
)
{
Cookies
.
set
(
'userid'
,
userid
,
{
expires
:
30
})
Cookies
.
set
(
"userid"
,
userid
,
{
expires
:
30
});
this
.
set_userid
(
userid
)
this
.
set_userid
(
userid
)
;
},
},
cacheCser
(
cser_id
,
cser_name
)
{
cacheCser
(
cser_id
,
cser_name
)
{
Cookies
.
set
(
'cser_id'
,
cser_id
,
{
expires
:
30
})
Cookies
.
set
(
"cser_id"
,
cser_id
,
{
expires
:
30
});
Cookies
.
set
(
'cser_name'
,
cser_name
,
{
expires
:
30
})
Cookies
.
set
(
"cser_name"
,
cser_name
,
{
expires
:
30
});
this
.
set_cser_info
({
this
.
set_cser_info
({
cser_id
:
cser_id
,
cser_id
:
cser_id
,
cser_name
:
cser_name
cser_name
:
cser_name
,
})
})
;
this
.
set_cser_id
(
cser_id
)
this
.
set_cser_id
(
cser_id
)
;
this
.
set_cser_name
(
cser_name
)
this
.
set_cser_name
(
cser_name
)
;
},
},
cacheSignData
(
signData
)
{
cacheSignData
(
signData
)
{
Cookies
.
set
(
'signData'
,
JSON
.
stringify
(
signData
),
{
expires
:
30
})
Cookies
.
set
(
"signData"
,
JSON
.
stringify
(
signData
),
{
expires
:
30
});
this
.
set_signData
(
signData
)
this
.
set_signData
(
signData
)
;
},
},
// 进入的页面地址是 https://companywx.jianshuwenhua.com/company_app/index.html?corp_id=wweaefe716636df3d1
// 进入的页面地址是 https://companywx.jianshuwenhua.com/company_app/index.html?corp_id=wweaefe716636df3d1
// 1. 企微静默授权
// 1. 企微静默授权
async
startWeComSilentAuth
()
{
async
startWeComSilentAuth
()
{
this
.
urlParams
=
getParams
();
this
.
urlParams
=
getParams
();
const
corp_id
=
Cookies
.
get
(
'corp_id'
)
||
this
.
urlParams
.
corp_id
const
corp_id
=
Cookies
.
get
(
"corp_id"
)
||
this
.
urlParams
.
corp_id
;
if
(
!
corp_id
)
{
if
(
!
corp_id
)
{
this
.
$message
.
error
(
'当前客服号信息异常,请切换会话后重试'
)
this
.
$message
.
error
(
"当前客服号信息异常,请切换会话后重试"
);
return
return
;
}
}
// 确定是第一次进入页面 没有 code 和 state
// 确定是第一次进入页面 没有 code 和 state
if
(
!
this
.
urlParams
.
code
&&
!
this
.
urlParams
.
state
)
{
if
(
!
this
.
urlParams
.
code
&&
!
this
.
urlParams
.
state
)
{
...
@@ -144,63 +174,74 @@ export default {
...
@@ -144,63 +174,74 @@ export default {
return
;
return
;
}
}
// 用code
// 用code
const
res
=
await
getAuthUser
({
code
:
this
.
urlParams
.
code
,
url
:
window
.
location
.
href
,
corp_id
:
corp_id
});
const
res
=
await
getAuthUser
({
code
:
this
.
urlParams
.
code
,
url
:
window
.
location
.
href
,
corp_id
:
corp_id
,
});
if
(
res
.
status_code
===
1
)
{
if
(
res
.
status_code
===
1
)
{
if
(
res
.
data
.
userid
)
{
if
(
res
.
data
.
userid
)
{
this
.
cacheuserid
(
res
.
data
.
userid
)
this
.
cacheuserid
(
res
.
data
.
userid
)
;
this
.
initDingTalkLogin
();
// 初始化钉钉扫码
this
.
initDingTalkLogin
();
// 初始化钉钉扫码
}
else
{
}
else
{
this
.
$message
.
error
(
'获取用户id失败'
)
this
.
$message
.
error
(
"获取用户id失败"
);
return
return
;
}
}
}
else
{
}
else
{
console
.
log
(
'获取useid失败'
,
res
)
console
.
log
(
"获取useid失败"
,
res
);
// 错误处理
// 错误处理
}
}
},
},
async
getSignature
()
{
async
getSignature
()
{
console
.
log
(
'获取签名'
,
window
.
location
.
href
)
console
.
log
(
"获取签名"
,
window
.
location
.
href
);
const
corp_id
=
Cookies
.
get
(
'corp_id'
)
const
corp_id
=
Cookies
.
get
(
"corp_id"
);
try
{
try
{
const
res
=
await
getSignature
({
corp_id
:
corp_id
,
path
:
window
.
location
.
href
});
const
res
=
await
getSignature
({
corp_id
:
corp_id
,
path
:
window
.
location
.
href
,
});
if
(
res
.
status_code
===
1
)
{
if
(
res
.
status_code
===
1
)
{
this
.
signData
=
res
.
data
this
.
signData
=
res
.
data
;
this
.
cacheSignData
(
res
.
data
)
this
.
cacheSignData
(
res
.
data
)
;
try
{
try
{
this
.
registerWeComSDK
();
this
.
registerWeComSDK
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
,
'初始化sdk 失败'
)
console
.
log
(
err
,
"初始化sdk 失败"
);
}
}
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
,
'获取签名失败'
)
console
.
log
(
err
,
"获取签名失败"
);
window
.
location
.
href
=
window
.
location
.
origin
+
'/company_app/index.html?corp_id='
+
corp_id
+
'&msg=signerror'
window
.
location
.
href
=
window
.
location
.
origin
+
"/company_app/index.html?corp_id="
+
corp_id
+
"&msg=signerror"
;
}
}
},
},
getCurExternalContact
()
{
getCurExternalContact
()
{
this
.
$ww
.
getCurExternalContact
({
this
.
$ww
.
getCurExternalContact
({
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
err_msg
===
"getCurExternalContact:ok"
)
{
if
(
res
.
err_msg
===
"getCurExternalContact:ok"
)
{
console
.
log
(
res
,
'重新进入获取企微外部联系人'
)
console
.
log
(
res
,
"重新进入获取企微外部联系人"
);
this
.
set_external_userid
(
res
.
userId
)
this
.
set_external_userid
(
res
.
userId
)
;
// 确保 Vuex 状态更新后再跳转
// 确保 Vuex 状态更新后再跳转
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$router
.
replace
(
'/'
)
this
.
$router
.
replace
(
"/"
);
console
.
log
(
window
.
location
.
href
,
'window.location.hrefuserInfo'
)
console
.
log
(
window
.
location
.
href
,
"window.location.hrefuserInfo"
);
})
})
;
}
}
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
console
.
log
(
err
,
'获取企微外部联系人失败'
)
console
.
log
(
err
,
"获取企微外部联系人失败"
);
// 错误处理
// 错误处理
}
}
,
});
});
},
},
// 2. 注册企微JS-SDK
// 2. 注册企微JS-SDK
registerWeComSDK
()
{
registerWeComSDK
()
{
console
.
log
(
'删除企业签名'
,
1231
)
console
.
log
(
"删除企业签名"
,
1231
);
this
.
$ww
.
register
({
this
.
$ww
.
register
({
corpId
:
Cookies
.
get
(
'corp_id'
),
corpId
:
Cookies
.
get
(
"corp_id"
),
agentId
:
this
.
signData
.
agent_id
,
agentId
:
this
.
signData
.
agent_id
,
jsApiList
:
jsApiList
,
jsApiList
:
jsApiList
,
// getConfigSignature: () => Promise.resolve({
// getConfigSignature: () => Promise.resolve({
...
@@ -209,55 +250,58 @@ export default {
...
@@ -209,55 +250,58 @@ export default {
// signature: this.signData.corp_signature,
// signature: this.signData.corp_signature,
// }),
// }),
// 只用到应用的 api 可以只进行应用的签名
// 只用到应用的 api 可以只进行应用的签名
getAgentConfigSignature
:
()
=>
Promise
.
resolve
({
getAgentConfigSignature
:
()
=>
Promise
.
resolve
({
nonceStr
:
this
.
signData
.
nonce_str
,
nonceStr
:
this
.
signData
.
nonce_str
,
timestamp
:
this
.
signData
.
signature_time
,
timestamp
:
this
.
signData
.
signature_time
,
signature
:
this
.
signData
.
agent_signature
,
signature
:
this
.
signData
.
agent_signature
,
}),
}),
onAgentConfigSuccess
:
(
res
)
=>
{
onAgentConfigSuccess
:
(
res
)
=>
{
console
.
log
(
'注册成功可以调用企微 js-sdk'
,
res
)
console
.
log
(
"注册成功可以调用企微 js-sdk"
,
res
);
// 注册成功后不立即获取外部联系人,等钉钉扫码后再获取
// 注册成功后不立即获取外部联系人,等钉钉扫码后再获取
this
.
getCurExternalContact
()
this
.
getCurExternalContact
()
;
},
},
onAgentConfigFail
:
(
err
)
=>
{
onAgentConfigFail
:
(
err
)
=>
{
console
.
log
(
'注册失败不能使用企微js-sdk'
,
err
)
console
.
log
(
"注册失败不能使用企微js-sdk"
,
err
);
// 错误处理123
// 错误处理123
}
}
,
});
});
},
},
// 3. 获取组织列表并选取默认组织
// 3. 获取组织列表并选取默认组织
async
initOrganization
()
{
async
initOrganization
()
{
const
res
=
await
getOrganization
();
const
res
=
await
getOrganization
();
if
(
res
.
data
.
status_code
===
1
)
{
if
(
res
.
data
.
status_code
===
1
)
{
this
.
orgList
=
res
.
data
.
data
.
data
.
filter
(
item
=>
item
.
id
<=
this
.
organizationNum
)
this
.
orgList
=
res
.
data
.
data
.
data
.
filter
(
(
item
)
=>
item
.
id
<=
this
.
organizationNum
,
);
// 默认组织逻辑:可根据业务自定义
// 默认组织逻辑:可根据业务自定义
this
.
initCurrentApp
();
this
.
initCurrentApp
();
}
}
},
},
initCurrentApp
()
{
initCurrentApp
()
{
const
currentApp
=
this
.
orgList
.
find
(
const
currentApp
=
this
.
orgList
.
find
(
(
item
)
=>
item
.
app_key
===
"dingjigp0ksn9nbljdli"
(
item
)
=>
item
.
app_key
===
"dingjigp0ksn9nbljdli"
,
);
);
this
.
$set
(
this
,
"currentOrg"
,
currentApp
);
this
.
$set
(
this
,
"currentOrg"
,
currentApp
);
},
},
// 4. 初始化钉钉扫码
// 4. 初始化钉钉扫码
initDingTalkLogin
()
{
initDingTalkLogin
()
{
this
.
qrLoading
=
true
;
this
.
qrLoading
=
true
;
console
.
log
(
'进入初始化钉钉'
,
this
.
currentOrg
)
console
.
log
(
"进入初始化钉钉"
,
this
.
currentOrg
);
if
(
!
this
.
currentOrg
.
app_key
)
return
;
if
(
!
this
.
currentOrg
.
app_key
)
return
;
const
appid
=
this
.
currentOrg
.
app_key
;
const
appid
=
this
.
currentOrg
.
app_key
;
// 清空二维码容器,防止切换组织后二维码不刷新
// 清空二维码容器,防止切换组织后二维码不刷新
const
container
=
document
.
getElementById
(
'dingTalkLoginContainer'
);
const
container
=
document
.
getElementById
(
"dingTalkLoginContainer"
);
if
(
container
)
container
.
innerHTML
=
''
;
if
(
container
)
container
.
innerHTML
=
""
;
DDLogin
({
DDLogin
({
id
:
'dingTalkLoginContainer'
,
id
:
"dingTalkLoginContainer"
,
goto
:
encodeURIComponent
(
`https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=
${
appid
}
&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=
${
this
.
redirectUri
}
`
),
goto
:
encodeURIComponent
(
style
:
'border:none;background-color:#FFFFFF;margin:0'
,
`https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=
${
appid
}
&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=
${
this
.
redirectUri
}
`
,
width
:
'210'
,
),
height
:
'250'
style
:
"border:none;background-color:#FFFFFF;margin:0"
,
width
:
"210"
,
height
:
"250"
,
});
});
// 二维码生成后,短暂延迟后隐藏 loading(二维码生成是同步的,但页面渲染有延迟)
// 二维码生成后,短暂延迟后隐藏 loading(二维码生成是同步的,但页面渲染有延迟)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -266,11 +310,11 @@ export default {
...
@@ -266,11 +310,11 @@ export default {
},
1000
);
// 500ms 平滑过渡
},
1000
);
// 500ms 平滑过渡
});
});
window
.
addEventListener
(
'message'
,
this
.
handleDingTalkLogin
,
false
);
window
.
addEventListener
(
"message"
,
this
.
handleDingTalkLogin
,
false
);
if
(
typeof
window
.
addEventListener
!==
'undefined'
)
{
if
(
typeof
window
.
addEventListener
!==
"undefined"
)
{
window
.
addEventListener
(
'message'
,
this
.
handleDingTalkLogin
,
false
)
window
.
addEventListener
(
"message"
,
this
.
handleDingTalkLogin
,
false
);
}
else
if
(
typeof
window
.
attachEvent
!==
'undefined'
)
{
}
else
if
(
typeof
window
.
attachEvent
!==
"undefined"
)
{
window
.
attachEvent
(
'onmessage'
,
this
.
handleDingTalkLogin
)
window
.
attachEvent
(
"onmessage"
,
this
.
handleDingTalkLogin
);
}
}
},
},
// https://companywx.jianshuwenhua.com/company_app/login?code=success&cser_id=4090&cser_name=%E6%AF%9B%E7%BB%86%E4%BA%9A&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOjQwOTAsImRhdGEiOnsiY3Nlcl9pZCI6NDA5MCwiY3Nlcl9uYW1lIjoi5q-b57uG5LqaIn0sImlhdCI6MTc0Nzk5MDM0MiwiZXhwIjoxNzUwNTgyMzQyLCJuYmYiOjE3NDc5OTAzNDIsInN1YiI6InRva2Vu6K6k6K-BIiwianRpIjoiYzYzYTM4NGYzMTFmODVlMGQ2Nzg2ZmJiMTdhNjQzN2EifQ.5ADPtqISjxOqbrDOzlKkCpfTr78Sv0Sdi-_Y1RRiMH0&type=ding
// https://companywx.jianshuwenhua.com/company_app/login?code=success&cser_id=4090&cser_name=%E6%AF%9B%E7%BB%86%E4%BA%9A&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOjQwOTAsImRhdGEiOnsiY3Nlcl9pZCI6NDA5MCwiY3Nlcl9uYW1lIjoi5q-b57uG5LqaIn0sImlhdCI6MTc0Nzk5MDM0MiwiZXhwIjoxNzUwNTgyMzQyLCJuYmYiOjE3NDc5OTAzNDIsInN1YiI6InRva2Vu6K6k6K-BIiwianRpIjoiYzYzYTM4NGYzMTFmODVlMGQ2Nzg2ZmJiMTdhNjQzN2EifQ.5ADPtqISjxOqbrDOzlKkCpfTr78Sv0Sdi-_Y1RRiMH0&type=ding
...
@@ -284,53 +328,60 @@ export default {
...
@@ -284,53 +328,60 @@ export default {
},
},
// 6. 钉钉扫码回调
// 6. 钉钉扫码回调
async
handleDingTalkLogin
(
event
)
{
async
handleDingTalkLogin
(
event
)
{
console
.
log
(
'收到扫码回调'
)
console
.
log
(
"收到扫码回调"
);
const
corp_id
=
Cookies
.
get
(
'corp_id'
)
const
corp_id
=
Cookies
.
get
(
"corp_id"
);
const
userid
=
Cookies
.
get
(
'userid'
)
const
userid
=
Cookies
.
get
(
"userid"
);
if
(
event
.
origin
!==
'https://login.dingtalk.com'
)
return
;
if
(
event
.
origin
!==
"https://login.dingtalk.com"
)
return
;
const
loginTmpCode
=
event
.
data
;
const
loginTmpCode
=
event
.
data
;
// 跳转到后端,后端用loginTmpCode换取钉钉用户信息
// 跳转到后端,后端用loginTmpCode换取钉钉用户信息
const
appid
=
this
.
currentOrg
.
app_key
;
const
appid
=
this
.
currentOrg
.
app_key
;
const
state
=
encodeURIComponent
(
`
${
this
.
currentOrg
.
app_key
}
$
${
this
.
currentOrg
.
template_code
}
$
${
corp_id
}
$
${
userid
}
`
)
const
state
=
encodeURIComponent
(
`
${
this
.
currentOrg
.
app_key
}
$
${
this
.
currentOrg
.
template_code
}
$
${
corp_id
}
$
${
userid
}
`
,
);
const
url
=
`https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=
${
appid
}
&response_type=code&scope=snsapi_login&state=
${
state
}
&redirect_uri=
${
this
.
redirectUri
}
&loginTmpCode=
${
loginTmpCode
}
`
;
const
url
=
`https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=
${
appid
}
&response_type=code&scope=snsapi_login&state=
${
state
}
&redirect_uri=
${
this
.
redirectUri
}
&loginTmpCode=
${
loginTmpCode
}
`
;
console
.
log
(
url
,
'回调 url'
)
console
.
log
(
url
,
"回调 url"
);
this
.
DDTestUrl
=
url
this
.
DDTestUrl
=
url
;
window
.
location
.
href
=
url
;
window
.
location
.
href
=
url
;
},
},
// 7. 钉钉扫码回调页面处理
// 7. 钉钉扫码回调页面处理
async
handleDingCallback
()
{
async
handleDingCallback
()
{
// 在这里处理钉钉扫码成功的回调
// 在这里处理钉钉扫码成功的回调
console
.
log
(
'扫码成功'
)
console
.
log
(
"扫码成功"
);
const
ddParams
=
getParams
();
const
ddParams
=
getParams
();
const
corp_id
=
Cookies
.
get
(
'corp_id'
)
const
corp_id
=
Cookies
.
get
(
"corp_id"
);
if
(
ddParams
.
code
==
'error'
&&
ddParams
.
msg
)
{
if
(
ddParams
.
code
==
"error"
&&
ddParams
.
msg
)
{
this
.
$message
.
error
(
ddParams
.
msg
)
this
.
$message
.
error
(
ddParams
.
msg
)
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
window
.
location
.
href
=
window
.
location
.
origin
+
'/company_app/index.html?corp_id='
+
corp_id
+
'&msg=error'
window
.
location
.
href
=
},
5000
)
window
.
location
.
origin
+
return
"/company_app/index.html?corp_id="
+
corp_id
+
"&msg=error"
;
},
5000
);
return
;
}
}
if
(
ddParams
.
token
&&
ddParams
.
token
!=
'undefined'
)
{
if
(
ddParams
.
token
&&
ddParams
.
token
!=
"undefined"
)
{
setToken
(
ddParams
.
token
)
setToken
(
ddParams
.
token
)
;
this
.
set_token
(
ddParams
.
token
)
this
.
set_token
(
ddParams
.
token
)
;
// 获取签名
// 获取签名
await
this
.
getSignature
();
await
this
.
getSignature
();
}
else
{
}
else
{
console
.
log
(
'没有token'
)
console
.
log
(
"没有token"
);
window
.
location
.
href
=
window
.
location
.
origin
+
'/company_app/index.html?corp_id='
+
corp_id
+
'&msg=notoken'
window
.
location
.
href
=
window
.
location
.
origin
+
"/company_app/index.html?corp_id="
+
corp_id
+
"&msg=notoken"
;
}
}
if
(
ddParams
.
cser_id
)
{
if
(
ddParams
.
cser_id
)
{
this
.
cacheCser
(
ddParams
.
cser_id
,
ddParams
.
cser_name
)
this
.
cacheCser
(
ddParams
.
cser_id
,
ddParams
.
cser_name
)
;
}
}
},
},
refreshDingTalkQRCode
()
{
refreshDingTalkQRCode
()
{
this
.
initDingTalkLogin
();
this
.
initDingTalkLogin
();
},
},
},
},
};
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -374,7 +425,7 @@ export default {
...
@@ -374,7 +425,7 @@ export default {
i
{
i
{
line-height
:
40px
;
line-height
:
40px
;
font-size
:
26px
;
font-size
:
26px
;
color
:
#3491
FA
;
color
:
#3491
fa
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
}
}
...
@@ -404,7 +455,7 @@ export default {
...
@@ -404,7 +455,7 @@ export default {
width
:
40px
;
width
:
40px
;
height
:
40px
;
height
:
40px
;
border
:
4px
solid
#e0e0e0
;
border
:
4px
solid
#e0e0e0
;
border-top
:
4px
solid
#3491
FA
;
border-top
:
4px
solid
#3491
fa
;
border-radius
:
50%
;
border-radius
:
50%
;
animation
:
spin
1s
linear
infinite
;
animation
:
spin
1s
linear
infinite
;
}
}
...
...
src/views/popup/AddTagsDrawer/components/TagsCheck.vue
浏览文件 @
82a41625
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
<div>
<div>
<div
class=
"flex justify-between leading-[22px] font-medium"
>
<div
class=
"flex justify-between leading-[22px] font-medium"
>
<div
class=
"text-[#363E49] text-[13px]"
>
已选择标签
</div>
<div
class=
"text-[#363E49] text-[13px]"
>
已选择标签
</div>
<
iconpark
-icon
<
svg
-icon
@
click=
"clear"
@
click=
"clear"
n
ame=
"icon-qingkong"
svgN
ame=
"icon-qingkong"
class=
"text-[16px] text-[#B0B2B5] hover:text-primary cursor-pointer"
class=
"text-[16px] text-[#B0B2B5] hover:text-primary cursor-pointer"
></
iconpark
-icon>
></
svg
-icon>
</div>
</div>
<div
<div
class=
"flex flex-wrap content-start gap-[8px] mt-[8px] pb-[12px] border-b-[1px] border-dashed border-b-[#E5E5E6] h-[112px] overflow-y-auto"
class=
"flex flex-wrap content-start gap-[8px] mt-[8px] pb-[12px] border-b-[1px] border-dashed border-b-[#E5E5E6] h-[112px] overflow-y-auto"
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
remove
(
item
)
{
remove
(
item
)
{
this
.
$emit
(
this
.
$emit
(
"input"
,
"input"
,
this
.
value
.
filter
((
i
)
=>
i
!==
item
)
this
.
value
.
filter
((
i
)
=>
i
!==
item
)
,
);
);
this
.
$emit
(
"change"
);
this
.
$emit
(
"change"
);
},
},
...
@@ -71,8 +71,8 @@ export default {
...
@@ -71,8 +71,8 @@ export default {
this
.
$emit
(
this
.
$emit
(
"input"
,
"input"
,
this
.
value
.
filter
((
i
)
=>
this
.
value
.
filter
((
i
)
=>
this
.
checkedIds
.
includes
(
i
[
this
.
options
.
value
])
this
.
checkedIds
.
includes
(
i
[
this
.
options
.
value
])
,
)
)
,
);
);
this
.
$emit
(
"change"
);
this
.
$emit
(
"change"
);
},
},
...
...
src/views/popup/RecentActivitiesPopup/templates/RecentActivities.vue
浏览文件 @
82a41625
...
@@ -78,6 +78,12 @@
...
@@ -78,6 +78,12 @@
@
click=
"refreshTag"
@
click=
"refreshTag"
></i>
></i>
<svg-icon
<svg-icon
svgName=
"icon-zhongxinshengcheng"
@
click=
"refreshTag"
:class=
"isRefresh ? 'refreshListActive' : ''"
class=
"mr-[8px] refreshList invisible group-hover:visible"
/>
<svg-icon
icon-class=
"fuzhi"
icon-class=
"fuzhi"
class=
"icon invisible group-hover:visible"
class=
"icon invisible group-hover:visible"
style=
"font-size: 14px"
style=
"font-size: 14px"
...
@@ -97,36 +103,36 @@
...
@@ -97,36 +103,36 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getRoleRecentActivityEditApi
}
from
'@/api/game.js'
;
import
{
getRoleRecentActivityEditApi
}
from
"@/api/game.js"
;
import
{
getGenerateProcedureApi
}
from
'@/api/skill'
;
import
{
getGenerateProcedureApi
}
from
"@/api/skill"
;
import
{
mapState
}
from
'vuex'
;
import
{
mapState
}
from
"vuex"
;
import
{
queryRoleRecentActivityNotPushNum
}
from
'@/views/hooks/useGetCount'
;
import
{
queryRoleRecentActivityNotPushNum
}
from
"@/views/hooks/useGetCount"
;
import
{
corp_activity_procedure_copyUsed
}
from
'@/api/works'
;
import
{
corp_activity_procedure_copyUsed
}
from
"@/api/works"
;
const
UpdateType
=
{
const
UpdateType
=
{
PUSH
:
1
,
//修改推送
PUSH
:
1
,
//修改推送
REMARK
:
2
,
//修改备注
REMARK
:
2
,
//修改备注
};
};
export
default
{
export
default
{
name
:
'RecentActivitiesTemplate'
,
name
:
"RecentActivitiesTemplate"
,
emits
:
[
'handleUpdate'
],
emits
:
[
"handleUpdate"
],
components
:
{},
components
:
{},
props
:
[
'item'
],
props
:
[
"item"
],
data
()
{
data
()
{
return
{
return
{
editShow
:
false
,
editShow
:
false
,
textarea
:
''
,
textarea
:
""
,
isRefresh
:
false
,
isRefresh
:
false
,
pushLanguageTechnique
:
''
,
//推送话术
pushLanguageTechnique
:
""
,
//推送话术
};
};
},
},
computed
:
{
computed
:
{
...
mapState
(
'user'
,
[
'cser_id'
,
'cser_name'
]),
...
mapState
(
"user"
,
[
"cser_id"
,
"cser_name"
]),
...
mapState
(
'game'
,
[
'accountSelect'
,
'bindGameUserList'
]),
...
mapState
(
"game"
,
[
"accountSelect"
,
"bindGameUserList"
]),
nowGameUserInfo
()
{
nowGameUserInfo
()
{
return
{
return
{
member_id
:
this
.
accountSelect
,
member_id
:
this
.
accountSelect
,
username
:
this
.
bindGameUserList
.
find
(
username
:
this
.
bindGameUserList
.
find
(
(
item
)
=>
item
.
member_id
==
this
.
accountSelect
(
item
)
=>
item
.
member_id
==
this
.
accountSelect
,
)?.
username
,
)?.
username
,
};
};
},
},
...
@@ -156,10 +162,10 @@ export default {
...
@@ -156,10 +162,10 @@ export default {
user_id
:
this
.
cser_id
,
user_id
:
this
.
cser_id
,
user_name
:
this
.
cser_name
,
user_name
:
this
.
cser_name
,
});
});
this
.
$message
.
success
(
'修改成功'
);
this
.
$message
.
success
(
"修改成功"
);
queryRoleRecentActivityNotPushNum
(
this
.
accountSelect
);
queryRoleRecentActivityNotPushNum
(
this
.
accountSelect
);
this
.
$emit
(
'handleUpdate'
);
this
.
$emit
(
"handleUpdate"
);
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
$message
.
error
(
error
);
this
.
$message
.
error
(
error
);
}
}
...
@@ -183,9 +189,9 @@ export default {
...
@@ -183,9 +189,9 @@ export default {
try
{
try
{
corp_activity_procedure_copyUsed
({
_id
:
this
.
_id
});
corp_activity_procedure_copyUsed
({
_id
:
this
.
_id
});
await
navigator
.
clipboard
.
writeText
(
this
.
pushLanguageTechnique
);
await
navigator
.
clipboard
.
writeText
(
this
.
pushLanguageTechnique
);
this
.
$message
.
success
(
'复制成功'
);
this
.
$message
.
success
(
"复制成功"
);
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
error
(
'复制失败:'
,
err
);
console
.
error
(
"复制失败:"
,
err
);
}
}
},
},
...
...
src/views/userInfo/components/Info.vue
浏览文件 @
82a41625
...
@@ -2,30 +2,67 @@
...
@@ -2,30 +2,67 @@
<div
class=
"info-tab-content"
>
<div
class=
"info-tab-content"
>
<div
class=
"userDetailsPanel columnFlex"
>
<div
class=
"userDetailsPanel columnFlex"
>
<div
class=
"content px-[10px]"
v-loading=
"viewLoading"
>
<div
class=
"content px-[10px]"
v-loading=
"viewLoading"
>
<div
v-if=
"chatUserDetails.is_phishing_account == 1"
class=
"warnText"
>
<div
<p>
高风险玩家,请立即通知组长!!!!
</p>
v-if=
"chatUserDetails.is_phishing_account == 1"
<p>
class=
"warnText flex"
>
<div>
<svg-icon
class=
"text-[16px] mt-[4px] mr-[4px] text-[#FF7D00]"
svgName=
"weiguitongzhi"
></svg-icon>
</div>
<div>
<p
class=
"text-[13px]"
>
高风险玩家,请立即通知组长!!!!
</p>
<p
class=
"text-[12px]"
>
①千万不能推转游!!不要发送违禁词汇!!不要发送礼包和告知任何礼包信息!!
①千万不能推转游!!不要发送违禁词汇!!不要发送礼包和告知任何礼包信息!!
</p>
</p>
<p>
②不能以任何形式推送APP/网页链接,也不可承认有APP/网页端口!!
</p>
<p
class=
"text-[12px]"
>
②不能以任何形式推送APP/网页链接,也不可承认有APP/网页端口!!
</p>
</div>
</div>
<div
v-if=
"change_appraisal"
class=
"warnText flex"
>
<div>
<svg-icon
class=
"text-[16px] mt-[4px] mr-[4px] text-[#FF7D00]"
svgName=
"weiguitongzhi"
></svg-icon>
</div>
</div>
<div
v-if=
"change_appraisal"
class=
"warnText"
>
<p>
钓鱼号 禁止转端通知组长!
</p>
<p>
钓鱼号 禁止转端通知组长!
</p>
</div>
</div>
<div
v-else-if=
"gameUserInfo.exp_ip"
class=
"warnText"
>
<div
v-else-if=
"gameUserInfo.exp_ip"
class=
"warnText flex"
>
<div>
<svg-icon
class=
"text-[16px] mt-[4px] mr-[4px] text-[#FF7D00]"
svgName=
"weiguitongzhi"
></svg-icon>
</div>
<p>
高风险用户,禁止转端 !!!
</p>
<p>
高风险用户,禁止转端 !!!
</p>
</div>
</div>
<!-- 会话内容存档状态 -->
<!-- 会话内容存档状态 -->
<div
<div
class=
"archive-status"
class=
"archive-status
flex
"
v-if=
"agreeStatus !== 'Agree' || !hasPermit"
v-if=
"agreeStatus !== 'Agree' || !hasPermit"
>
>
<p
v-if=
"agreeStatus !== 'Agree'"
>
当前微信用户未开启会话内容存档
</p>
<i
<p
v-if=
"!hasPermit"
>
当前客服号未授权开启会话内容存档
</p>
class=
"el-icon-info text-[16px] pt-[6px] mr-[4px] text-[#909399]"
></i>
<div
class=
"text-[#909399]"
>
<p
v-if=
"agreeStatus !== 'Agree'"
class=
"!text-[#909399]"
>
当前微信用户未开启会话内容存档
</p>
<p
v-if=
"!hasPermit"
class=
"!text-[#909399]"
>
当前客服号未授权开启会话内容存档
</p>
</div>
</div>
<div
class=
"item rowFlex"
>
</div>
<div
class=
"item rowFlex justify-between pb-[12px] border-b-[1px] border-solid border-[#EBEDF0]"
>
<!-- 公共的信息 -->
<!-- 公共的信息 -->
<div
class=
"flex"
>
<el-image
<el-image
fit=
"fill"
fit=
"fill"
draggable=
"false"
draggable=
"false"
...
@@ -51,12 +88,10 @@
...
@@ -51,12 +88,10 @@
style=
"margin-top: 3px"
style=
"margin-top: 3px"
>
>
<vipLevel
:gameUserInfo=
"gameUserInfo"
/>
<vipLevel
:gameUserInfo=
"gameUserInfo"
/>
<el-button-group>
<!--
<el-button-group>
<el-button
type=
"text"
@
click=
"zyouUnBindConfirm"
<el-button
type=
"text"
@
click=
"zyouUnBindConfirm"
>
解绑
</el-button
>
解绑
</el-button
>
>
<!--
<el-button
type=
"text"
size=
"mini"
@
click=
"autoResetPassword"
>
修改密码
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"changePhoneClick"
>
修改手机号
</el-button>
-->
<el-button
<el-button
v-if=
"!chatUserDetails.bind_cser"
v-if=
"!chatUserDetails.bind_cser"
type=
"text"
type=
"text"
...
@@ -66,13 +101,37 @@
...
@@ -66,13 +101,37 @@
<el-button
type=
"text"
v-if=
"false"
@
click=
"errorHandle"
<el-button
type=
"text"
v-if=
"false"
@
click=
"errorHandle"
>
误操作
</el-button
>
误操作
</el-button
>
>
</el-button-group>
</el-button-group>
-->
</div>
</div>
</div>
</div>
<el-dropdown
trigger=
"click"
class=
"h-[16px]"
>
<div
class=
"cursor-pointer h-[16px] w-[16px] font-bold self-center flex items-center"
>
<i
class=
"text-[16px] el-icon-more"
></i>
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item>
<span
@
click=
"zyouUnBindConfirm"
>
解绑
</span>
</el-dropdown-item>
<el-dropdown-item
v-if=
"!chatUserDetails.bind_cser"
>
<span
@
click=
"relationKfh"
>
关联客服
</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<div
class=
"item rowFlex columnCenter"
>
<div
class=
"item rowFlex columnCenter"
>
<div
class=
"rowFlex columnCenter"
>
<div
class=
"rowFlex columnCenter"
>
<span
class=
"label"
style=
"min-width: 45px"
>
备注:
</span>
<span
class=
"label"
style=
"min-width: 45px"
>
备注:
</span>
<ModificationBox
:text=
"
chatUserDetails.remark && chatUserDetails.remark != ''
? chatUserDetails.remark
: chatUserDetails.name
"
@
confirm=
"handleInputRemark"
>
<p
v-if=
"!showInputRemark"
class=
"text"
style=
"max-width: 170px"
>
<p
v-if=
"!showInputRemark"
class=
"text"
style=
"max-width: 170px"
>
{{
{{
chatUserDetails
.
remark
&&
chatUserDetails
.
remark
!=
""
chatUserDetails
.
remark
&&
chatUserDetails
.
remark
!=
""
...
@@ -80,8 +139,9 @@
...
@@ -80,8 +139,9 @@
:
chatUserDetails
.
name
:
chatUserDetails
.
name
}}
}}
</p>
</p>
</ModificationBox>
</div>
</div>
<el-input
<
!--
<
el-input
v-if=
"showInputRemark"
v-if=
"showInputRemark"
v-model=
"showInputRemarkValue"
v-model=
"showInputRemarkValue"
class=
"showInputRemarkInput"
class=
"showInputRemarkInput"
...
@@ -93,7 +153,7 @@
...
@@ -93,7 +153,7 @@
class=
"el-icon-edit icon"
class=
"el-icon-edit icon"
style=
"font-size: 14px"
style=
"font-size: 14px"
@
click=
"editRemark"
@
click=
"editRemark"
></i>
></i>
-->
</div>
</div>
<div
class=
"item rowFlex columnCenter"
v-if=
"lastTime"
>
<div
class=
"item rowFlex columnCenter"
v-if=
"lastTime"
>
<div
class=
"rowFlex columnCenter"
>
<div
class=
"rowFlex columnCenter"
>
...
@@ -206,11 +266,11 @@
...
@@ -206,11 +266,11 @@
>
+
{{
chatUserDetails
.
tag_group
.
length
-
1
}}
>
+
{{
chatUserDetails
.
tag_group
.
length
-
1
}}
</el-button>
</el-button>
</el-tooltip>
</el-tooltip>
<
iconpark
-icon
<
svg
-icon
n
ame=
"ziliao-tianjia-jb82dh2k"
svgN
ame=
"ziliao-tianjia-jb82dh2k"
class=
"group-hover:visible invisible text-primary text-[14px] ml-[6px]"
class=
"group-hover:visible invisible text-primary text-[14px] ml-[6px]"
@
click=
"editTags"
@
click=
"editTags"
></
iconpark
-icon>
></
svg
-icon>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -270,6 +330,8 @@ import { sendChatMessage } from "@/utils/index.js";
...
@@ -270,6 +330,8 @@ import { sendChatMessage } from "@/utils/index.js";
import
{
getToken
,
removeToken
}
from
"@/utils/auth"
;
import
{
getToken
,
removeToken
}
from
"@/utils/auth"
;
import
vipLevel
from
"./gameInfo/vipLevel.vue"
;
import
vipLevel
from
"./gameInfo/vipLevel.vue"
;
import
Cookies
from
"js-cookie"
;
import
Cookies
from
"js-cookie"
;
import
ModificationBox
from
"@/components/common/ModificationBox.vue"
;
export
default
{
export
default
{
name
:
"info"
,
name
:
"info"
,
components
:
{
components
:
{
...
@@ -278,6 +340,7 @@ export default {
...
@@ -278,6 +340,7 @@ export default {
shareInfo
,
shareInfo
,
selectTag
,
selectTag
,
vipLevel
,
vipLevel
,
ModificationBox
,
},
},
props
:
{
props
:
{
// 用户详情
// 用户详情
...
@@ -560,6 +623,7 @@ export default {
...
@@ -560,6 +623,7 @@ export default {
// 处理备注输入
// 处理备注输入
handleInputRemark
(
val
)
{
handleInputRemark
(
val
)
{
this
.
showInputRemark
=
false
;
this
.
showInputRemark
=
false
;
this
.
showInputRemarkValue
=
val
;
this
.
chatUserDetails
.
remark
=
this
.
showInputRemarkValue
;
this
.
chatUserDetails
.
remark
=
this
.
showInputRemarkValue
;
const
data
=
{
const
data
=
{
userid
:
this
.
chatUserDetails
.
userid
,
userid
:
this
.
chatUserDetails
.
userid
,
...
@@ -641,31 +705,35 @@ export default {
...
@@ -641,31 +705,35 @@ export default {
height
:
100%
;
height
:
100%
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
4px
;
border-radius
:
4px
;
overflow
:
hidden
;
overflow
:
hidden
;
.warnText
{
.warnText
{
width
:
100%
;
padding-top
:
10px
!important
;
border-radius
:
0
!important
;
color
:
#ff7d00
;
background
:
#fffbf5
;
width
:
calc
(
100%
+
20px
)
!important
;
margin-bottom
:
0
!important
;
margin-left
:
-10px
;
height
:
auto
;
height
:
auto
;
font-weight
:
600
;
font-weight
:
600
;
font-size
:
18px
;
font-size
:
13px
;
padding
:
4px
10px
;
p
{
color
:
#f56c6c
;
line-height
:
25px
;
}
}
}
.archive-status
{
.archive-status
{
margin-bottom
:
15px
;
margin-bottom
:
15px
;
padding
:
8
px
;
padding
:
4px
10
px
;
background-color
:
#f8f8f8
;
background-color
:
#f8f8f8
;
border-radius
:
4px
;
line-height
:
20px
;
font-size
:
14px
;
//
border-radius
:
4px
;
font-size
:
12px
;
width
:
calc
(
100%
+
20px
);
margin-left
:
-10px
;
p
{
p
{
margin
:
5px
0
;
margin
:
5px
0
;
color
:
#f56c6c
;
font-weight
:
600
;
}
}
}
}
...
@@ -688,7 +756,6 @@ export default {
...
@@ -688,7 +756,6 @@ export default {
margin-bottom
:
10px
;
margin-bottom
:
10px
;
p
{
p
{
color
:
#f56c6c
;
line-height
:
25px
;
line-height
:
25px
;
}
}
}
}
...
...
src/views/userInfo/components/gameInfo/ZyouTag.vue
浏览文件 @
82a41625
...
@@ -57,12 +57,12 @@
...
@@ -57,12 +57,12 @@
<
/el-button
>
<
/el-button
>
<
/el-tooltip
>
<
/el-tooltip
>
<
/div
>
<
/div
>
<
iconpark
-
icon
<
svg
-
icon
n
ame
=
"ziliao-tianjia-jb82dh2k"
svgN
ame
=
"ziliao-tianjia-jb82dh2k"
class
=
"invisible text-primary text-[14px] ml-[6px]"
class
=
"invisible text-primary text-[14px] ml-[6px]"
:
class
=
"{ 'group-hover:visible': item.label_type == 2
}
"
:
class
=
"{ 'group-hover:visible': item.label_type == 2
}
"
@
click
=
"addTag(item.label)"
@
click
=
"addTag(item.label)"
><
/
iconpark
-icon
>
><
/
svg
-icon
>
<
/div
>
<
/div
>
<
Empty
/>
<
Empty
/>
<
/div
>
<
/div
>
...
@@ -250,7 +250,7 @@ export default {
...
@@ -250,7 +250,7 @@ export default {
this
.
loading
=
true
;
this
.
loading
=
true
;
try
{
try
{
const
weixin_blongs_id
=
this
.
weixin_blongs_id_list
.
map
(
const
weixin_blongs_id
=
this
.
weixin_blongs_id_list
.
map
(
(
item
)
=>
item
.
value
(
item
)
=>
item
.
value
,
);
);
const
res
=
await
roleGetRoleLabel
({
const
res
=
await
roleGetRoleLabel
({
member_id
:
this
.
accountSelect
,
member_id
:
this
.
accountSelect
,
...
@@ -309,7 +309,7 @@ export default {
...
@@ -309,7 +309,7 @@ export default {
async
searchLabel
(
query
)
{
async
searchLabel
(
query
)
{
try
{
try
{
const
weixin_blongs_id
=
this
.
weixin_blongs_id_list
.
map
(
const
weixin_blongs_id
=
this
.
weixin_blongs_id_list
.
map
(
(
item
)
=>
item
.
value
(
item
)
=>
item
.
value
,
);
);
const
res
=
await
roleLabelSearch
({
const
res
=
await
roleLabelSearch
({
label_name
:
query
.
trim
()
||
""
,
label_name
:
query
.
trim
()
||
""
,
...
@@ -346,7 +346,7 @@ export default {
...
@@ -346,7 +346,7 @@ export default {
?
this
.
searchValue
?
this
.
searchValue
:
[];
:
[];
const
hasSelectedInThisGroup
=
group
.
children
.
some
((
child
)
=>
const
hasSelectedInThisGroup
=
group
.
children
.
some
((
child
)
=>
selectedIds
.
includes
(
child
.
label_id
)
selectedIds
.
includes
(
child
.
label_id
)
,
);
);
if
(
hasSelectedInThisGroup
)
{
if
(
hasSelectedInThisGroup
)
{
...
@@ -436,7 +436,7 @@ export default {
...
@@ -436,7 +436,7 @@ export default {
if
(
value
&&
Array
.
isArray
(
value
)
&&
value
.
length
>
0
)
{
if
(
value
&&
Array
.
isArray
(
value
)
&&
value
.
length
>
0
)
{
// 获取当前标签组的标签
// 获取当前标签组的标签
const
currentGroupLabels
=
this
.
roleLabelList
.
find
(
const
currentGroupLabels
=
this
.
roleLabelList
.
find
(
(
item
)
=>
Number
(
item
.
label_type
)
===
2
(
item
)
=>
Number
(
item
.
label_type
)
===
2
,
).
label
;
).
label
;
// 获取所有选中标签的信息
// 获取所有选中标签的信息
...
@@ -446,13 +446,13 @@ export default {
...
@@ -446,13 +446,13 @@ export default {
this
.
searchOptions
.
forEach
((
group
)
=>
{
this
.
searchOptions
.
forEach
((
group
)
=>
{
// 找出该组中被选中的标签
// 找出该组中被选中的标签
const
selectedInGroup
=
group
.
children
.
filter
((
child
)
=>
const
selectedInGroup
=
group
.
children
.
filter
((
child
)
=>
value
.
includes
(
child
.
label_id
)
value
.
includes
(
child
.
label_id
)
,
);
);
// 如果是单选标签组且选中了多个,只保留第一个
// 如果是单选标签组且选中了多个,只保留第一个
if
(
group
.
select_type
===
1
&&
selectedInGroup
.
length
>
1
)
{
if
(
group
.
select_type
===
1
&&
selectedInGroup
.
length
>
1
)
{
this
.
$message
.
warning
(
this
.
$message
.
warning
(
`标签组"${group.label_name
}
"为单选,只能选择一个标签`
`标签组"${group.label_name
}
"为单选,只能选择一个标签`
,
);
);
// 只添加第一个选中的标签
// 只添加第一个选中的标签
selectedLabels
.
push
(
selectedInGroup
[
0
]);
selectedLabels
.
push
(
selectedInGroup
[
0
]);
...
@@ -470,11 +470,11 @@ export default {
...
@@ -470,11 +470,11 @@ export default {
// 检查selectedLabels中的标签组是否与currentGroupLabels中的标签组重复
// 检查selectedLabels中的标签组是否与currentGroupLabels中的标签组重复
if
(
currentGroupLabels
&&
currentGroupLabels
.
length
>
0
)
{
if
(
currentGroupLabels
&&
currentGroupLabels
.
length
>
0
)
{
const
existingGroupIds
=
currentGroupLabels
.
map
(
const
existingGroupIds
=
currentGroupLabels
.
map
(
(
label
)
=>
label
.
label_group_id
(
label
)
=>
label
.
label_group_id
,
);
);
const
hasConflict
=
selectedLabels
.
some
((
label
)
=>
const
hasConflict
=
selectedLabels
.
some
((
label
)
=>
existingGroupIds
.
includes
(
label
.
label_group_id
)
existingGroupIds
.
includes
(
label
.
label_group_id
)
,
);
);
if
(
hasConflict
)
{
if
(
hasConflict
)
{
...
@@ -507,7 +507,7 @@ export default {
...
@@ -507,7 +507,7 @@ export default {
// 找出所有单选标签组
// 找出所有单选标签组
const
singleSelectGroups
=
this
.
searchOptions
.
filter
(
const
singleSelectGroups
=
this
.
searchOptions
.
filter
(
(
group
)
=>
group
.
select_type
===
1
(
group
)
=>
group
.
select_type
===
1
,
);
);
// 检查单选标签组是否有全选操作
// 检查单选标签组是否有全选操作
...
@@ -517,14 +517,14 @@ export default {
...
@@ -517,14 +517,14 @@ export default {
// 检查当前组中选中的标签数量
// 检查当前组中选中的标签数量
const
selectedInThisGroup
=
groupLabelIds
.
filter
((
id
)
=>
const
selectedInThisGroup
=
groupLabelIds
.
filter
((
id
)
=>
value
.
includes
(
id
)
value
.
includes
(
id
)
,
);
);
// 如果选中的标签数量大于1,说明可能是全选操作
// 如果选中的标签数量大于1,说明可能是全选操作
if
(
selectedInThisGroup
.
length
>
1
)
{
if
(
selectedInThisGroup
.
length
>
1
)
{
// 提示用户只能选择一个标签
// 提示用户只能选择一个标签
this
.
$message
.
warning
(
this
.
$message
.
warning
(
`标签组"${group.label_name
}
"为单选,只能选择一个标签`
`标签组"${group.label_name
}
"为单选,只能选择一个标签`
,
);
);
// 清空该组的选择
// 清空该组的选择
...
...
src/views/userInfo/components/gameInfo/gameUserInfo.vue
浏览文件 @
82a41625
...
@@ -18,12 +18,19 @@
...
@@ -18,12 +18,19 @@
trigger=
"hover"
trigger=
"hover"
content=
"手动更新当前用户的智能标签,每个用户半个小时仅能更新一次"
content=
"手动更新当前用户的智能标签,每个用户半个小时仅能更新一次"
>
>
<i
<
!--
<
i
slot=
"reference"
slot=
"reference"
class=
"el-icon-refresh refreshList"
class=
"el-icon-refresh refreshList"
:class=
"isRefresh ? 'refreshListActive' : ''"
@
click=
"refreshTag"
></i>
-->
<svg-icon
svgName=
"icon-zhongxinshengcheng"
slot=
"reference"
@
click=
"refreshTag"
@
click=
"refreshTag"
></i>
class=
"refreshList text-[16px]"
:class=
"isRefresh ? 'refreshListActive' : ''"
/>
</el-popover>
</el-popover>
</div>
</div>
<ZyouTag
:game-user-info=
"gameUserInfo"
:account-select=
"accountSelect"
/>
<ZyouTag
:game-user-info=
"gameUserInfo"
:account-select=
"accountSelect"
/>
...
@@ -62,12 +69,13 @@
...
@@ -62,12 +69,13 @@
>
>
<!-- changeUser -->
<!-- changeUser -->
<div
slot=
"reference"
class=
"rowFlex columnCenter changeUser"
>
<div
slot=
"reference"
class=
"rowFlex columnCenter changeUser"
>
<p>
<svg-icon
svgName=
"ziliao-qiehuan"
/>
<!--
<p>
<i
class=
"el-icon-sort-down"
></i>
<i
class=
"el-icon-sort-down"
></i>
</p>
</p>
<p>
<p>
<i
class=
"el-icon-sort-up"
></i>
<i
class=
"el-icon-sort-up"
></i>
</p>
</p>
-->
</div>
</div>
</el-popconfirm>
</el-popconfirm>
</div>
</div>
...
@@ -84,12 +92,13 @@
...
@@ -84,12 +92,13 @@
@
confirm=
"changeNameFn"
@
confirm=
"changeNameFn"
>
>
<div
slot=
"reference"
class=
"rowFlex columnCenter changeUser"
>
<div
slot=
"reference"
class=
"rowFlex columnCenter changeUser"
>
<p>
<svg-icon
svgName=
"ziliao-qiehuan"
/>
<!--
<p>
<i
class=
"el-icon-sort-down"
></i>
<i
class=
"el-icon-sort-down"
></i>
</p>
</p>
<p>
<p>
<i
class=
"el-icon-sort-up"
></i>
<i
class=
"el-icon-sort-up"
></i>
</p>
</p>
-->
</div>
</div>
</el-popconfirm>
</el-popconfirm>
</div>
</div>
...
@@ -110,12 +119,13 @@
...
@@ -110,12 +119,13 @@
slot=
"reference"
slot=
"reference"
class=
"rowFlex columnCenter changeUser"
class=
"rowFlex columnCenter changeUser"
>
>
<p>
<svg-icon
svgName=
"ziliao-qiehuan"
/>
<!--
<p>
<i
class=
"el-icon-sort-down"
></i>
<i
class=
"el-icon-sort-down"
></i>
</p>
</p>
<p>
<p>
<i
class=
"el-icon-sort-up"
></i>
<i
class=
"el-icon-sort-up"
></i>
</p>
</p>
-->
</div>
</div>
</el-popconfirm>
</el-popconfirm>
</div>
</div>
...
@@ -169,35 +179,53 @@
...
@@ -169,35 +179,53 @@
<div
class=
"item rowFlex columnCenter spaceBetween"
>
<div
class=
"item rowFlex columnCenter spaceBetween"
>
<div
class=
"rowFlex columnCenter"
>
<div
class=
"rowFlex columnCenter"
>
<span
class=
"label"
>
是否愿意转端:
</span>
<span
class=
"label"
>
是否愿意转端:
</span>
<p
class=
"text"
>
<p
class=
"text flex items-center"
>
<el-radio-group
{{
chatUserDetails
.
transferred
==
0
?
"是"
:
"否"
}}
<svg-icon
svgName=
"ziliao-qiehuan"
class=
"text-primary text-[18px] ml-[6px]"
@
click=
"
toTransfer(
chatUserDetails.transferred == 0
? (chatUserDetails.transferred = 1)
: (chatUserDetails.transferred = 0),
)
"
/>
<!--
<el-radio-group
v-model=
"chatUserDetails.transferred"
v-model=
"chatUserDetails.transferred"
@
change=
"toTransfer"
@
change=
"toTransfer"
>
>
<el-radio
:label=
"0"
>
是
</el-radio>
<el-radio
:label=
"0"
>
是
</el-radio>
<el-radio
:label=
"1"
>
否
</el-radio>
<el-radio
:label=
"1"
>
否
</el-radio>
</el-radio-group>
</el-radio-group>
-->
</p>
</p>
</div>
</div>
</div>
</div>
<div
class=
"item rowFlex columnCenter"
>
<div
class=
"item rowFlex columnCenter"
>
<div
class=
"rowFlex columnCenter"
>
<div
class=
"rowFlex columnCenter"
>
<span
class=
"label"
>
手机号:
</span>
<span
class=
"label flex-shrink-0"
>
手机号:
</span>
<ModificationBox
:text=
"gameUserInfo.mobile"
:isInput=
"true"
@
confirm=
"changeUserMobile"
>
<p
v-if=
"!showUserMobile"
class=
"text"
>
{{
gameUserInfo
.
mobile
}}
</p>
<p
v-if=
"!showUserMobile"
class=
"text"
>
{{
gameUserInfo
.
mobile
}}
</p>
</ModificationBox>
</div>
</div>
<el-input
<
!--
<
el-input
v-if=
"showUserMobile"
v-if=
"showUserMobile"
v-model=
"newMobileValue"
v-model=
"newMobileValue"
style=
"width: 120px; margin-left: 10px"
style=
"width: 120px; margin-left: 10px"
@
change=
"changeUserMobile"
@
change=
"changeUserMobile"
@
blur=
"showUserMobile = false"
@
blur=
"showUserMobile = false"
></el-input>
></el-input>
-->
<!-- 暂时禁止用户修改手机号 -->
<!-- 暂时禁止用户修改手机号 -->
<i
<
!--
<
i
class=
"el-icon-edit icon"
class=
"el-icon-edit icon"
style=
"font-size: 14px"
style=
"font-size: 14px"
@
click=
"editUserMobile"
@
click=
"editUserMobile"
></i>
></i>
-->
</div>
</div>
<div
class=
"item rowFlex columnCenter spaceBetween"
>
<div
class=
"item rowFlex columnCenter spaceBetween"
>
<div
class=
"rowFlex columnCenter"
>
<div
class=
"rowFlex columnCenter"
>
...
@@ -311,6 +339,7 @@ import moment from "moment";
...
@@ -311,6 +339,7 @@ import moment from "moment";
import
ZyouTag
from
"./ZyouTag.vue"
;
import
ZyouTag
from
"./ZyouTag.vue"
;
import
{
debounce
}
from
"@/utils"
;
import
{
debounce
}
from
"@/utils"
;
import
LastLogin
from
"@/views/components/quickSendGame/sendGame/lastLogin.vue"
;
import
LastLogin
from
"@/views/components/quickSendGame/sendGame/lastLogin.vue"
;
import
ModificationBox
from
"@/components/common/ModificationBox.vue"
;
export
default
{
export
default
{
name
:
"gameUserInfo"
,
name
:
"gameUserInfo"
,
...
@@ -318,6 +347,7 @@ export default {
...
@@ -318,6 +347,7 @@ export default {
ZyouTag
,
ZyouTag
,
MarketingPanel
,
MarketingPanel
,
LastLogin
,
LastLogin
,
ModificationBox
,
},
},
props
:
[
"gameUserInfo"
,
"chatUserDetails"
],
props
:
[
"gameUserInfo"
,
"chatUserDetails"
],
data
()
{
data
()
{
...
@@ -467,7 +497,7 @@ export default {
...
@@ -467,7 +497,7 @@ export default {
});
});
},
},
// 修改用户手机号
// 修改用户手机号
changeUserMobile
()
{
changeUserMobile
(
v
)
{
if
(
if
(
!
/^1
((
3
[
0-9
])
|
(
4
[
1579
])
|
(
5
[
0-9
])
|
(
6
[
6
])
|
(
7
[
0-9
])
|
(
8
[
0-9
])
|
(
9
[
0-9
]))\d{8}
$/
.
test
(
!
/^1
((
3
[
0-9
])
|
(
4
[
1579
])
|
(
5
[
0-9
])
|
(
6
[
6
])
|
(
7
[
0-9
])
|
(
8
[
0-9
])
|
(
9
[
0-9
]))\d{8}
$/
.
test
(
this
.
newMobileValue
,
this
.
newMobileValue
,
...
@@ -476,6 +506,7 @@ export default {
...
@@ -476,6 +506,7 @@ export default {
this
.
$message
.
warning
(
"请填写正确的手机号"
);
this
.
$message
.
warning
(
"请填写正确的手机号"
);
return
false
;
return
false
;
}
}
this
.
newMobileValue
=
v
;
this
.
gameUserInfo
.
mobile
=
this
.
gameUserInfo
.
mobile
=
this
.
newMobileValue
.
substr
(
0
,
3
)
+
this
.
newMobileValue
.
substr
(
0
,
3
)
+
"****"
+
"****"
+
...
@@ -533,7 +564,7 @@ export default {
...
@@ -533,7 +564,7 @@ export default {
}
}
.changeUser
{
.changeUser
{
font-size
:
18px
;
font-size
:
18px
;
transform
:
rotate
(
90deg
);
//
transform
:
rotate
(
90deg
);
color
:
#3491fa
;
color
:
#3491fa
;
margin-left
:
10px
;
margin-left
:
10px
;
margin-top
:
-5px
;
margin-top
:
-5px
;
...
@@ -633,6 +664,9 @@ export default {
...
@@ -633,6 +664,9 @@ export default {
cursor
:
pointer
;
cursor
:
pointer
;
font-size
:
18px
;
font-size
:
18px
;
margin-left
:
20px
;
margin-left
:
20px
;
&:focus
{
outline
:
none
;
}
}
}
.refreshListActive
{
.refreshListActive
{
animation
:
rotate
0.5s
linear
infinite
;
animation
:
rotate
0.5s
linear
infinite
;
...
...
src/views/userInfo/components/shareInfo.vue
浏览文件 @
82a41625
...
@@ -8,13 +8,63 @@
...
@@ -8,13 +8,63 @@
</div>
-->
</div>
-->
<!-- 显示第一个用户的共享信息 -->
<!-- 显示第一个用户的共享信息 -->
<div
v-if=
"userList.length > 0"
class=
"userList rowFlex"
>
<div
v-if=
"userList.length > 0"
class=
"userList rowFlex"
>
<p
class=
"label hidden"
>
{{
userList
[
0
].
zq_user_name
}}
--
{{
userList
[
0
].
name
}}
</p>
<div
class=
"label flex"
>
<div
style=
"margin-bottom:10px;"
class=
"columnFlex "
>
{{
userList
[
0
].
zq_user_name
}}
<div
v-for=
"(item,index) in userList[0].text"
:key=
"index+'1'"
class=
"keyWordsItem rowFlex columnCenter"
>
<el-tooltip
effect=
"dark"
content=
"共享信息"
placement=
"top"
>
<el-input
v-model=
"item.text"
type=
"textarea"
:disabled=
"chatUserDetails.userid !== userList[0].userid || userList[0].zq_user_id!== userInfo.id"
placeholder=
"请输入共享信息"
@
change=
"inputBlur(0,index)"
>
</el-input>
<svg-icon
<div
v-if=
"chatUserDetails.userid == userList[0].userid && userList[0].zq_user_id=== userInfo.id"
>
svgName=
"icon-gongxiangxinxi"
<i
v-if=
"index==0"
style=
"margin-left:10px;font-size:20px;color:#0AC358;cursor: pointer;"
class=
"el-icon-circle-plus-outline"
type=
"primary"
@
click=
"addInputItem(0,index)"
></i>
class=
"text-[18px] mx-[6px]"
<i
v-else
style=
"margin-left:10px;font-size:20px;color:#0AC358;cursor: pointer;"
class=
"el-icon-remove-outline"
type=
"primary"
@
click=
"removeInput(0,index)"
></i>
/>
</el-tooltip>
{{
userList
[
0
].
name
}}
</div>
<div
style=
"margin-bottom: 10px"
class=
"columnFlex"
>
<div
v-for=
"(item, index) in userList[0].text"
:key=
"index + '1'"
class=
"keyWordsItem rowFlex columnCenter"
>
<el-input
v-model=
"item.text"
type=
"textarea"
:disabled=
"
chatUserDetails.userid !== userList[0].userid ||
userList[0].zq_user_id !== userInfo.id
"
placeholder=
"请输入共享信息"
@
change=
"inputBlur(0, index)"
>
</el-input>
<div
v-if=
"
chatUserDetails.userid == userList[0].userid &&
userList[0].zq_user_id === userInfo.id
"
>
<i
v-if=
"index == 0"
style=
"
margin-left: 10px;
font-size: 20px;
color: #0ac358;
cursor: pointer;
"
class=
"el-icon-circle-plus-outline"
type=
"primary"
@
click=
"addInputItem(0, index)"
></i>
<i
v-else
style=
"
margin-left: 10px;
font-size: 20px;
color: #0ac358;
cursor: pointer;
"
class=
"el-icon-remove-outline"
type=
"primary"
@
click=
"removeInput(0, index)"
></i>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -26,133 +76,230 @@
...
@@ -26,133 +76,230 @@
trigger=
"hover"
trigger=
"hover"
popper-class=
"share-info-popover"
popper-class=
"share-info-popover"
>
>
<div
class=
"share-info-popover-content"
style=
"max-height: 600px; overflow-y: auto;"
>
<div
<div
v-for=
"(user, userIndex) in userList.slice(1)"
:key=
"userIndex"
class=
"share-info-user"
>
class=
"share-info-popover-content"
<p
class=
"share-info-username"
>
{{
user
.
zq_user_name
}}
--
{{
user
.
name
}}
</p>
style=
"max-height: 600px; overflow-y: auto"
>
<div
v-for=
"(user, userIndex) in userList.slice(1)"
:key=
"userIndex"
class=
"share-info-user"
>
<div
class=
"share-info-username flex"
>
{{
user
.
zq_user_name
}}
<el-tooltip
effect=
"dark"
content=
"共享信息"
placement=
"top"
>
<svg-icon
svgName=
"icon-gongxiangxinxi"
class=
"text-[18px] mx-[6px]"
/>
</el-tooltip>
{{
user
.
name
}}
</div>
<div
class=
"share-info-items"
>
<div
class=
"share-info-items"
>
<div
v-for=
"(item, itemIndex) in user.text"
:key=
"itemIndex"
class=
"share-info-item"
>
<div
v-for=
"(item, itemIndex) in user.text"
:key=
"itemIndex"
class=
"share-info-item"
>
<el-input
<el-input
v-model=
"item.text"
v-model=
"item.text"
type=
"textarea"
type=
"textarea"
:disabled=
"chatUserDetails.userid !== user.userid || user.zq_user_id !== userInfo.id"
:disabled=
"
chatUserDetails.userid !== user.userid ||
user.zq_user_id !== userInfo.id
"
placeholder=
"请输入共享信息"
placeholder=
"请输入共享信息"
@
change=
"inputBlur(userIndex + 1, itemIndex)"
@
change=
"inputBlur(userIndex + 1, itemIndex)"
></el-input>
></el-input>
<div
v-if=
"chatUserDetails.userid == user.userid && user.zq_user_id === userInfo.id"
>
<div
<i
v-if=
"itemIndex==0"
style=
"margin-left:10px;font-size:20px;color:#0AC358;cursor: pointer;"
class=
"el-icon-circle-plus-outline"
@
click=
"addInputItem(userIndex + 1, itemIndex)"
></i>
v-if=
"
<i
v-else
style=
"margin-left:10px;font-size:20px;color:#0AC358;cursor: pointer;"
class=
"el-icon-remove-outline"
@
click=
"removeInput(userIndex + 1, itemIndex)"
></i>
chatUserDetails.userid == user.userid &&
user.zq_user_id === userInfo.id
"
>
<!--
<i
v-if=
"itemIndex == 0"
style=
"
margin-left: 10px;
font-size: 20px;
color: #0ac358;
cursor: pointer;
"
class=
"el-icon-circle-plus-outline"
@
click=
"addInputItem(userIndex + 1, itemIndex)"
></i>
-->
<svg-icon
@
click=
"addInputItem(userIndex + 1, itemIndex)"
v-if=
"itemIndex == 0"
svgName=
"tianjia"
class=
"text-[20px] cursor-pointer text-primary ml-[10px]"
/>
<svg-icon
@
click=
"removeInput(userIndex + 1, itemIndex)"
v-else
svgName=
"shanchu"
class=
"text-[20px] cursor-pointer text-[#F53F3F] ml-[10px]"
/>
<!--
<i
v-else
style=
"
margin-left: 10px;
font-size: 20px;
color: #0ac358;
cursor: pointer;
"
class=
"el-icon-remove-outline"
@
click=
"removeInput(userIndex + 1, itemIndex)"
></i>
-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"reference"
class=
"more-users-button"
>
+
{{
userList
.
length
-
1
}}
</div>
<div
slot=
"reference"
class=
"more-users-button"
>
+
{{
userList
.
length
-
1
}}
</div>
</el-popover>
</el-popover>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
shareInfoUpsert
,
shareInfoDel
}
from
'@/api/works'
import
{
shareInfoUpsert
,
shareInfoDel
}
from
"@/api/works"
;
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
"vuex"
;
export
default
{
export
default
{
name
:
'shareInfo'
,
name
:
"shareInfo"
,
props
:
[
'chatUserDetails'
],
props
:
[
"chatUserDetails"
],
data
()
{
data
()
{
return
{
return
{
inputList
:
[],
inputList
:
[],
userList
:
[]
userList
:
[],
}
};
},
},
computed
:
{
computed
:
{
...
mapState
(
'user'
,
[
'userInfo'
])
...
mapState
(
"user"
,
[
"userInfo"
]),
},
},
watch
:
{
watch
:
{
chatUserDetails
(
newVal
,
oldVal
)
{
chatUserDetails
(
newVal
,
oldVal
)
{
this
.
handleUserList
()
this
.
handleUserList
();
}
},
},
},
mounted
()
{
mounted
()
{
this
.
handleUserList
()
this
.
handleUserList
();
},
},
methods
:
{
methods
:
{
handleUserList
()
{
handleUserList
()
{
if
(
this
.
chatUserDetails
.
share_info
&&
this
.
chatUserDetails
.
share_info
.
length
>
0
)
{
if
(
const
item
=
this
.
chatUserDetails
.
share_info
.
find
(
item
=>
item
.
userid
===
this
.
chatUserDetails
.
userid
&&
item
.
zq_user_id
===
this
.
userInfo
.
id
)
this
.
chatUserDetails
.
share_info
&&
this
.
chatUserDetails
.
share_info
.
length
>
0
)
{
const
item
=
this
.
chatUserDetails
.
share_info
.
find
(
(
item
)
=>
item
.
userid
===
this
.
chatUserDetails
.
userid
&&
item
.
zq_user_id
===
this
.
userInfo
.
id
,
);
if
(
!
item
)
{
if
(
!
item
)
{
this
.
userList
=
[...
this
.
chatUserDetails
.
share_info
,
{
zq_user_name
:
this
.
userInfo
.
username
,
zq_user_id
:
this
.
userInfo
.
id
,
userid
:
this
.
chatUserDetails
.
userid
,
name
:
this
.
chatUserDetails
?.
user
?.
name
||
''
,
text
:
[{
id
:
''
,
text
:
''
}]
}]
this
.
userList
=
[
...
this
.
chatUserDetails
.
share_info
,
{
zq_user_name
:
this
.
userInfo
.
username
,
zq_user_id
:
this
.
userInfo
.
id
,
userid
:
this
.
chatUserDetails
.
userid
,
name
:
this
.
chatUserDetails
?.
user
?.
name
||
""
,
text
:
[{
id
:
""
,
text
:
""
}],
},
];
}
else
{
}
else
{
this
.
userList
=
this
.
chatUserDetails
.
share_info
this
.
userList
=
this
.
chatUserDetails
.
share_info
;
}
}
}
else
{
}
else
{
this
.
userList
=
[{
zq_user_name
:
this
.
userInfo
.
username
,
zq_user_id
:
this
.
userInfo
.
id
,
userid
:
this
.
chatUserDetails
.
userid
,
name
:
this
.
chatUserDetails
?.
user
?.
name
||
''
,
text
:
[{
id
:
''
,
text
:
''
}]
}]
this
.
userList
=
[
{
zq_user_name
:
this
.
userInfo
.
username
,
zq_user_id
:
this
.
userInfo
.
id
,
userid
:
this
.
chatUserDetails
.
userid
,
name
:
this
.
chatUserDetails
?.
user
?.
name
||
""
,
text
:
[{
id
:
""
,
text
:
""
}],
},
];
}
}
},
},
addGroupText
()
{
addGroupText
()
{
if
(
this
.
userList
.
length
>
0
)
{
if
(
this
.
userList
.
length
>
0
)
{
const
user
=
this
.
userList
.
find
(
item
=>
{
const
user
=
this
.
userList
.
find
((
item
)
=>
{
if
(
this
.
chatUserDetails
.
user
.
name
===
item
.
zq_user_name
)
{
if
(
this
.
chatUserDetails
.
user
.
name
===
item
.
zq_user_name
)
{
return
item
return
item
;
}
}
})
});
if
(
user
!==
-
1
)
{
if
(
user
!==
-
1
)
{
this
.
$message
.
warning
(
user
.
zq_user_name
+
'共享信息已存在'
)
this
.
$message
.
warning
(
user
.
zq_user_name
+
"共享信息已存在"
);
}
else
{
}
else
{
this
.
userList
.
push
({
zq_user_name
:
this
.
chatUserDetails
.
user
.
name
,
text
:
[{
_id
:
''
,
text
:
''
}]
})
this
.
userList
.
push
({
zq_user_name
:
this
.
chatUserDetails
.
user
.
name
,
text
:
[{
_id
:
""
,
text
:
""
}],
});
}
}
}
else
{
}
else
{
this
.
userList
.
push
({
zq_user_name
:
this
.
chatUserDetails
.
user
.
name
,
text
:
[{
_id
:
''
,
text
:
''
}]
})
this
.
userList
.
push
({
zq_user_name
:
this
.
chatUserDetails
.
user
.
name
,
text
:
[{
_id
:
""
,
text
:
""
}],
});
}
}
},
},
shareInfoUpsert
(
_id
,
text
)
{
shareInfoUpsert
(
_id
,
text
)
{
if
(
text
&&
text
.
trim
()
==
''
)
{
if
(
text
&&
text
.
trim
()
==
""
)
{
this
.
$message
.
warning
(
'请输入内容'
)
this
.
$message
.
warning
(
"请输入内容"
);
return
false
return
false
;
}
}
const
data
=
{
const
data
=
{
_id
:
_id
||
''
,
_id
:
_id
||
""
,
userid
:
this
.
chatUserDetails
.
userid
,
userid
:
this
.
chatUserDetails
.
userid
,
external_userid
:
this
.
chatUserDetails
.
external_userid
,
external_userid
:
this
.
chatUserDetails
.
external_userid
,
text
:
text
.
trim
()
text
:
text
.
trim
(),
}
};
shareInfoUpsert
(
data
).
then
(
res
=>
{
shareInfoUpsert
(
data
).
then
((
res
)
=>
{
if
(
res
.
status_code
==
1
)
{
if
(
res
.
status_code
==
1
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
$message
.
success
(
"保存成功"
);
}
}
})
});
},
},
inputBlur
(
k
,
index
)
{
inputBlur
(
k
,
index
)
{
// 修改信息
// 修改信息
this
.
shareInfoUpsert
(
this
.
userList
[
k
]?.
text
[
index
].
_id
,
this
.
userList
[
k
]?.
text
[
index
].
text
)
this
.
shareInfoUpsert
(
this
.
userList
[
k
]?.
text
[
index
].
_id
,
this
.
userList
[
k
]?.
text
[
index
].
text
,
);
},
},
removeInput
(
k
,
index
)
{
removeInput
(
k
,
index
)
{
if
(
this
.
userList
[
k
]?.
text
[
index
]?.
_id
!==
''
)
{
if
(
this
.
userList
[
k
]?.
text
[
index
]?.
_id
!==
""
)
{
this
.
shareInfoDel
({
_id
:
this
.
userList
[
k
].
text
[
index
].
_id
,
userid
:
this
.
chatUserDetails
.
userid
})
this
.
shareInfoDel
({
_id
:
this
.
userList
[
k
].
text
[
index
].
_id
,
userid
:
this
.
chatUserDetails
.
userid
,
});
// 请求删除接口
// 请求删除接口
}
else
{
}
else
{
}
}
this
.
userList
[
k
].
text
.
splice
(
index
,
1
)
this
.
userList
[
k
].
text
.
splice
(
index
,
1
);
},
},
// 删除共享信息
// 删除共享信息
shareInfoDel
(
data
)
{
shareInfoDel
(
data
)
{
shareInfoDel
(
data
).
then
(
res
=>
{
shareInfoDel
(
data
).
then
((
res
)
=>
{
if
(
res
.
status_code
==
1
)
{
if
(
res
.
status_code
==
1
)
{
this
.
$message
.
success
(
res
.
msg
)
this
.
$message
.
success
(
res
.
msg
);
}
}
})
});
},
},
// 添加时间点
// 添加时间点
addInputItem
(
index
)
{
addInputItem
(
index
)
{
this
.
userList
[
index
].
text
.
push
({
_id
:
''
,
text
:
''
})
this
.
userList
[
index
].
text
.
push
({
_id
:
""
,
text
:
""
});
this
.
inputList
.
push
({
text
:
''
})
this
.
inputList
.
push
({
text
:
""
});
}
},
}
},
}
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.newPage
{
.newPage
{
width
:
100%
;
width
:
100%
;
height
:
auto
;
height
:
auto
;
.item
{
.item
{
...
@@ -195,11 +342,11 @@
...
@@ -195,11 +342,11 @@
width
:
44px
;
width
:
44px
;
height
:
22px
;
height
:
22px
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
#3491FA
;
border
:
1px
solid
#3491fa
;
font-size
:
12px
;
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#3491FA
;
color
:
#3491fa
;
margin-left
:
30px
;
margin-left
:
30px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
...
@@ -229,22 +376,22 @@
...
@@ -229,22 +376,22 @@
display
:
block
;
display
:
block
;
}
}
.userList
{
.userList
{
height
:
auto
;
height
:
auto
;
margin-top
:
20px
;
margin-top
:
20px
;
.label
{
.label
{
margin-right
:
10px
;
margin-right
:
10px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.keyWordsItem
{
.keyWordsItem
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
}
}
.more-users-button
{
.more-users-button
{
display
:
inline-block
;
display
:
inline-block
;
background-color
:
#E8F7FF
;
background-color
:
#e8f7ff
;
color
:
#3491FA
;
color
:
#3491fa
;
padding
:
4px
8px
;
padding
:
4px
8px
;
border-radius
:
4px
;
border-radius
:
4px
;
margin-top
:
10px
;
margin-top
:
10px
;
...
@@ -257,41 +404,40 @@
...
@@ -257,41 +404,40 @@
background-color
:
#d0edff
;
background-color
:
#d0edff
;
}
}
}
}
}
}
</
style
>
</
style
>
<
style
>
<
style
>
.share-info-popover
{
.share-info-popover
{
min-width
:
300px
;
min-width
:
300px
;
max-width
:
360px
;
max-width
:
360px
;
}
}
.share-info-popover-content
.share-info-user
{
.share-info-popover-content
.share-info-user
{
margin-bottom
:
15px
;
margin-bottom
:
15px
;
padding-bottom
:
15px
;
padding-bottom
:
15px
;
border-bottom
:
1px
dashed
#eee
;
border-bottom
:
1px
dashed
#eee
;
}
}
.share-info-popover-content
.share-info-user
:last-child
{
.share-info-popover-content
.share-info-user
:last-child
{
margin-bottom
:
0
;
margin-bottom
:
0
;
padding-bottom
:
0
;
padding-bottom
:
0
;
border-bottom
:
none
;
border-bottom
:
none
;
}
}
.share-info-popover-content
.share-info-username
{
.share-info-popover-content
.share-info-username
{
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
8px
;
margin-bottom
:
8px
;
color
:
#333
;
color
:
#333
;
}
}
.share-info-popover-content
.share-info-item
{
.share-info-popover-content
.share-info-item
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.share-info-popover-content
.share-info-item
:last-child
{
.share-info-popover-content
.share-info-item
:last-child
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/userInfo/userInfo.vue
浏览文件 @
82a41625
...
@@ -19,14 +19,14 @@
...
@@ -19,14 +19,14 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Info
from
'./components/Info.vue'
;
import
Info
from
"./components/Info.vue"
;
import
roleInfo
from
'@/views/roleInfo.vue'
;
import
roleInfo
from
"@/views/roleInfo.vue"
;
import
orderList
from
'@/views/orderList.vue'
;
import
orderList
from
"@/views/orderList.vue"
;
import
{
mapState
,
mapMutations
}
from
'vuex'
;
import
{
mapState
,
mapMutations
}
from
"vuex"
;
import
{
createRoleRecentActivityNotPushNum
}
from
'@/views/hooks/useGetCount'
;
import
{
createRoleRecentActivityNotPushNum
}
from
"@/views/hooks/useGetCount"
;
import
Cookies
from
'js-cookie'
;
import
Cookies
from
"js-cookie"
;
export
default
{
export
default
{
name
:
'userInfo'
,
name
:
"userInfo"
,
components
:
{
components
:
{
Info
,
Info
,
roleInfo
,
roleInfo
,
...
@@ -39,13 +39,13 @@ export default {
...
@@ -39,13 +39,13 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
activeTab
:
'info'
,
activeTab
:
"info"
,
instance
:
null
,
instance
:
null
,
totalNum
:
0
,
totalNum
:
0
,
};
};
},
},
computed
:
{
computed
:
{
...
mapState
(
'game'
,
[
'chatUserInfo'
,
'accountSelect'
]),
...
mapState
(
"game"
,
[
"chatUserInfo"
,
"accountSelect"
]),
},
},
created
()
{
created
()
{
// 初始化 vuex 中的值
// 初始化 vuex 中的值
...
@@ -57,10 +57,10 @@ export default {
...
@@ -57,10 +57,10 @@ export default {
});
});
},
},
methods
:
{
methods
:
{
...
mapMutations
(
'user'
,
[
'set_userInfo'
]),
...
mapMutations
(
"user"
,
[
"set_userInfo"
]),
async
initInstance
()
{
async
initInstance
()
{
this
.
instance
=
await
createRoleRecentActivityNotPushNum
(
this
.
instance
=
await
createRoleRecentActivityNotPushNum
(
this
.
accountSelect
this
.
accountSelect
,
);
);
this
.
totalNum
=
this
.
instance
.
getTotalNum
();
this
.
totalNum
=
this
.
instance
.
getTotalNum
();
...
@@ -70,10 +70,10 @@ export default {
...
@@ -70,10 +70,10 @@ export default {
},
},
initVuexValue
()
{
initVuexValue
()
{
const
userinfo
=
{
const
userinfo
=
{
cser_id
:
Cookies
.
get
(
'cser_id'
),
cser_id
:
Cookies
.
get
(
"cser_id"
),
cser_name
:
Cookies
.
get
(
'cser_name'
),
cser_name
:
Cookies
.
get
(
"cser_name"
),
username
:
Cookies
.
get
(
'cser_name'
),
username
:
Cookies
.
get
(
"cser_name"
),
id
:
Cookies
.
get
(
'cser_id'
),
id
:
Cookies
.
get
(
"cser_id"
),
};
};
this
.
set_userInfo
(
userinfo
);
this
.
set_userInfo
(
userinfo
);
},
},
...
@@ -95,7 +95,7 @@ export default {
...
@@ -95,7 +95,7 @@ export default {
width
:
100%
;
width
:
100%
;
::v-deep
.el-tabs__header
{
::v-deep
.el-tabs__header
{
margin-bottom
:
15px
;
margin-bottom
:
0
;
padding
:
0
10px
;
padding
:
0
10px
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论