Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
c7421a87
Commit
c7421a87
authored
Aug 28, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.singsingenglish.com/new-sing/admin
into dev
parents
64fa0a4a
83b530ea
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
227 additions
and
135 deletions
+227
-135
index.vue
src/components/brokerage/index.vue
+3
-1
index.vue
src/components/callBack/index.vue
+124
-52
tag.vue
src/components/system/tag.vue
+3
-1
index.vue
src/components/user/index.vue
+93
-81
api.js
src/service/api.js
+4
-0
No files found.
src/components/brokerage/index.vue
View file @
c7421a87
...
@@ -37,7 +37,9 @@
...
@@ -37,7 +37,9 @@
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
<el-input
type=
"number"
type=
"number"
v-model
.
number=
"scope.row.scale"
></el-input>
v-model
.
number=
"scope.row.scale"
>
<template
slot=
"append"
>
%
</
template
>
</el-input>
</template>
</template>
</el-table-column>
</el-table-column>
...
...
src/components/callBack/index.vue
View file @
c7421a87
<!-- 回访信息 -->
<!-- 回访信息 -->
<
template
>
<
template
>
<div
class=
"callback-container"
>
<el-card
shadow=
"never"
class=
"callback-container"
v-loading=
"loading"
>
<div
class=
"callback-info callback-item"
style=
"margin-bottom: 15px;"
>
ID:
{{
callbackObj
.
user_id
}}
 
<el-card
shadow=
"never"
class=
"callback-info callback-item"
style=
"margin-bottom: 15px;"
>
用户昵称:
{{
callbackObj
.
detail
.
nickname
}}
 
ID:
{{
user
.
user_id
}}
 
宝宝名称:
{{
callbackObj
.
detail
.
baby_name
?
callbackObj
.
detail
.
baby_name
:
'-'
}}
 
用户昵称:
{{
user
.
nickname
}}
 
宝宝生日:
{{
(
callbackObj
.
detail
.
birthday
==
'0000-00-00'
)
?
'-'
:
callbackObj
.
detail
.
birthday
}}
 
宝宝名称:
{{
user
.
baby_name
||
'-'
}}
 
手机号:
{{
callbackObj
.
detail
.
mobile
?
callbackObj
.
detail
.
mobile
:
'--'
}}
 
宝宝生日:
{{
(
user
.
birthday
==
'0000-00-00'
)
?
'-'
:
user
.
birthday
}}
 
手机号:
{{
user
.
mobile
||
'-'
}}
 
<div
style=
"display: inline-block; white-space: nowrap"
>
关联手机号:
关联手机号:
<span
class=
"callback-edit"
>
<span
class=
"callback-edit"
>
<!--
<i
v-if=
"!callbackEdit.mobile.show"
@
click=
"editCallback('mobile')"
>
{{
callbackObj
.
detail
.
relation_mobile
?
callbackObj
.
detail
.
relation_mobile
:
'--'
}}
</i>
-->
<!--
<i
v-if=
"!callbackEdit.mobile.show"
@
click=
"editCallback('mobile')"
>
{{
user
.
relation_mobile
||
'--'
}}
</i>
-->
<template
v-if=
"$store.state.readonly"
>
{{
callbackEdit
.
mobile
.
value
||
'-'
}}
</
template
>
<el-input
<el-input
v-else
ref=
"mobileEdit"
ref=
"mobileEdit"
v-model=
"callbackEdit.mobile.value"
v-model=
"callbackEdit.mobile.value"
style=
"width: 130px;"
size=
"small"
></el-input>
style=
"width: 130px;"
size=
"small"
></el-input>
<!--v-else @blur="callbackEdit.mobile.show = !callbackEdit.mobile.show"-->
<!--v-else @blur="callbackEdit.mobile.show = !callbackEdit.mobile.show"-->
</span>
 
</span>
 
</div>
<div
style=
"display: inline-block; white-space: nowrap"
>
微信号:
微信号:
<span
class=
"callback-edit"
>
<span
class=
"callback-edit"
>
<!--
<i
v-if=
"!callbackEdit.wechat.show"
@
click=
"editCallback('wechat')"
>
{{
callbackObj
.
detail
.
wx_number
?
callbackObj
.
detail
.
wx_number
:
'--'
}}
</i>
-->
<!--<i v-if="!callbackEdit.wechat.show" @click="editCallback('wechat')">{{user.wx_number || '--'}}</i>-->
<
template
v-if=
"$store.state.readonly"
>
{{
callbackEdit
.
wechat
.
value
||
'-'
}}
</
template
>
<el-input
<el-input
v-else
ref=
"wechatEdit"
ref=
"wechatEdit"
v-model=
"callbackEdit.wechat.value"
v-model=
"callbackEdit.wechat.value"
style=
"width: 100px;"
size=
"small"
></el-input>
style=
"width: 100px;"
size=
"small"
></el-input>
<!--v-else @blur="callbackEdit.wechat.show = !callbackEdit.wechat.show"-->
<!--v-else @blur="callbackEdit.wechat.show = !callbackEdit.wechat.show"-->
</span>
 
</span>
 
</div>
<el-button
<el-button
v-if=
"!$store.state.readonly"
@
click=
"editCallbackSave"
@
click=
"editCallbackSave"
:disabled=
"(callbackEdit.wechat.value == callbackEdit.wechat.origin) && (callbackEdit.mobile.value == callbackEdit.mobile.origin)"
:disabled=
"(callbackEdit.wechat.value == callbackEdit.wechat.origin) && (callbackEdit.mobile.value == callbackEdit.mobile.origin)"
type=
"primary"
plain
size=
"small"
>
更新用户信息
</el-button>
 
type=
"primary"
plain
size=
"small"
>
更新用户信息
<span
style=
"font-size: 12px; color: #999999; white-space: nowrap"
>
最后更新:
{{
callbackObj
.
detail
.
updated_at
}}
</span>
</el-button>
 
</div>
<span
style=
"font-size: 12px; color: #999999; white-space: nowrap"
>
最后更新:{{user.updated_at || '-'}}
</span>
</el-card>
<
div
class=
"callback-item"
style=
"display: flex; align-items: flex-start; margin-bottom: 15px; line-height: 32px;"
>
<
el-card
shadow=
"never"
class=
"callback-item"
style=
"display: flex; align-items: flex-start; margin-bottom: 15px; line-height: 32px;"
>
标签:
标签:
<span
class=
"callback-tag-wrapper"
v-if=
"tag.length"
>
<span
class=
"callback-tag-wrapper"
v-if=
"tag.length"
>
<el-tag
:key=
"item.id"
:type=
"item.type==1 ? 'info' : ''"
v-for=
"item in tag"
>
{{item.label_name}}
</el-tag>
<el-tag
:key=
"item.id"
:type=
"item.type==1 ? 'info' : ''"
v-for=
"item in tag"
>
{{item.label_name}}
</el-tag>
</span>
</span>
<el-button
type=
"warning"
size=
"small"
plain
@
click=
"dialogToggle"
>
编辑标签
</el-button>
<el-button
v-if=
"!$store.state.readonly"
type=
"warning"
size=
"small"
plain
@
click=
"dialogToggle"
>
编辑标签
</el-button>
</
div
>
</
el-card
>
<div
class=
"callback-item callback-input"
v-if=
"callbackObj.teacher_id && callbackAdd"
>
<!--添加回访信息-->
<el-card
shadow=
"never"
v-if=
"callbackObj.teacher_id && callbackAdd && !$store.state.readonly"
class=
"callback-item callback-input"
>
<el-form
size=
"small"
inline
>
<el-form
size=
"small"
inline
>
<el-form-item
required
>
<el-form-item
required
>
<el-select
v-model=
"add.method"
placeholder=
"回访方式"
style=
"width: 140px;"
>
<el-select
v-model=
"add.method"
placeholder=
"回访方式"
style=
"width: 140px;"
>
...
@@ -73,9 +91,9 @@
...
@@ -73,9 +91,9 @@
<el-input
<el-input
type=
"textarea"
:rows=
"3"
type=
"textarea"
:rows=
"3"
placeholder=
"请输入回访内容"
v-model=
"add.desc"
></el-input>
placeholder=
"请输入回访内容"
v-model=
"add.desc"
></el-input>
</
div
>
</
el-card
>
<
div
class=
"callback-list callback-item"
>
<
el-card
shadow=
"never"
class=
"callback-list callback-item"
>
<ol
v-if=
"list.length"
>
<ol
v-if=
"list.length"
>
<li
:key=
"item.id"
v-for=
"item in list"
>
<li
:key=
"item.id"
v-for=
"item in list"
>
<!--系统-->
<!--系统-->
...
@@ -98,7 +116,7 @@
...
@@ -98,7 +116,7 @@
</ol>
</ol>
<p
class=
"callback-list-text"
v-else
>
暂无回访数据
</p>
<p
class=
"callback-list-text"
v-else
>
暂无回访数据
</p>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</
div
>
</
el-card
>
<el-dialog
:title=
"dialog.title"
append-to-body
:visible
.
sync=
"dialog.show"
width=
"800px"
>
<el-dialog
:title=
"dialog.title"
append-to-body
:visible
.
sync=
"dialog.show"
width=
"800px"
>
...
@@ -116,7 +134,8 @@
...
@@ -116,7 +134,8 @@
slot=
"reference"
slot=
"reference"
@
close=
"tagDel(item)"
@
close=
"tagDel(item)"
:closable=
"item.type==1 ? false : true"
:closable=
"item.type==1 ? false : true"
:type=
"item.type==1 ? 'info' : ''"
>
{{
item
.
label_name
}}
</el-tag>
:type=
"item.type==1 ? 'info' : ''"
>
{{
item
.
label_name
}}
</el-tag>
</el-popover>
</el-popover>
</
template
>
</
template
>
...
@@ -142,21 +161,32 @@
...
@@ -142,21 +161,32 @@
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</el-card>
</template>
</template>
<
script
>
<
script
>
import
{
CALLBACK_METHOD
,
CALLBACK_TYPE
,
CALLBACK_INTENTION
}
from
"@/util/wordbook"
;
import
{
CALLBACK_METHOD
,
CALLBACK_TYPE
,
CALLBACK_INTENTION
}
from
"@/util/wordbook"
;
import
{
getUserTagApi
,
getTagApi
,
getCallBackApi
,
postCallBackApi
,
postUserTagApi
,
delUserTagApi
,
putUserInfoApi
}
from
"@/service/api"
;
import
{
getUserDetailApi
,
getUserTagApi
,
getTagApi
,
getCallBackApi
,
postCallBackApi
,
postUserTagApi
,
delUserTagApi
,
putUserInfoApi
}
from
"@/service/api"
;
import
page
from
'@/components/framework/page'
import
page
from
'@/components/framework/page'
export
default
{
export
default
{
name
:
"CallBack"
,
name
:
"CallBack"
,
components
:
{
page
},
components
:
{
page
},
props
:
{
props
:
{
callbackObj
:
{
callbackObj
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
},
},
callbackAdd
:
{
callbackAdd
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -165,6 +195,15 @@
...
@@ -165,6 +195,15 @@
},
},
data
()
{
data
()
{
return
{
return
{
loading
:
true
,
user
:
{
user_id
:
''
,
nickname
:
''
,
baby_name
:
''
,
birthday
:
''
,
mobile
:
''
,
updated_at
:
''
},
CALLBACK_METHOD
:
CALLBACK_METHOD
,
CALLBACK_METHOD
:
CALLBACK_METHOD
,
CALLBACK_TYPE
:
CALLBACK_TYPE
,
CALLBACK_TYPE
:
CALLBACK_TYPE
,
CALLBACK_INTENTION
:
CALLBACK_INTENTION
,
CALLBACK_INTENTION
:
CALLBACK_INTENTION
,
...
@@ -223,20 +262,23 @@
...
@@ -223,20 +262,23 @@
created
()
{
created
()
{
},
},
watch
:
{
watch
:
{
'
callbackObj.detail
'
()
{
'
user
'
()
{
this
.
callbackEdit
.
mobile
.
value
=
this
.
callbackObj
.
detail
.
relation_mobile
;
this
.
callbackEdit
.
mobile
.
value
=
this
.
user
.
relation_mobile
;
this
.
callbackEdit
.
mobile
.
origin
=
this
.
callbackObj
.
detail
.
relation_mobile
;
this
.
callbackEdit
.
mobile
.
origin
=
this
.
user
.
relation_mobile
;
this
.
callbackEdit
.
wechat
.
value
=
this
.
callbackObj
.
detail
.
wx_number
;
this
.
callbackEdit
.
wechat
.
value
=
this
.
user
.
wx_number
;
this
.
callbackEdit
.
wechat
.
origin
=
this
.
callbackObj
.
detail
.
wx_number
;
this
.
callbackEdit
.
wechat
.
origin
=
this
.
user
.
wx_number
;
}
}
},
},
mounted
()
{
mounted
()
{
this
.
user
.
user_id
=
this
.
callbackObj
.
user_id
;
this
.
getUser
();
this
.
getTag
();
this
.
getTag
();
this
.
getData
();
},
},
methods
:
{
methods
:
{
filterName
(
string
,
type
)
{
filterName
(
string
,
type
)
{
return
this
[
type
].
find
(
i
=>
{
return
i
.
value
==
string
}).
label
return
this
[
type
].
find
(
i
=>
{
return
i
.
value
==
string
}).
label
},
},
editCallback
(
type
)
{
editCallback
(
type
)
{
...
@@ -250,8 +292,9 @@
...
@@ -250,8 +292,9 @@
relation_mobile
:
this
.
callbackEdit
.
mobile
.
value
,
relation_mobile
:
this
.
callbackEdit
.
mobile
.
value
,
wx_number
:
this
.
callbackEdit
.
wechat
.
value
wx_number
:
this
.
callbackEdit
.
wechat
.
value
}
}
putUserInfoApi
(
this
.
callbackObj
.
user_id
,
json
).
then
(
res
=>
{
putUserInfoApi
(
this
.
user
.
user_id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'用户信息更新成功'
});
this
.
$message
({
type
:
'success'
,
message
:
'用户信息更新成功'
});
this
.
getUser
();
// this.$emit('updateUser');
// this.$emit('updateUser');
})
})
},
},
...
@@ -264,7 +307,7 @@
...
@@ -264,7 +307,7 @@
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delUserTagApi
(
item
.
id
).
then
(
res
=>
{
delUserTagApi
(
item
.
id
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'标签删除成功!'
});
this
.
$message
({
type
:
'success'
,
message
:
'标签删除成功!'
});
this
.
getTag
();
this
.
getTag
();
})
})
})
})
...
@@ -285,18 +328,18 @@
...
@@ -285,18 +328,18 @@
},
},
dialogSave
()
{
dialogSave
()
{
if
(
!
this
.
tagSelected
.
length
)
{
if
(
!
this
.
tagSelected
.
length
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择标签!'
});
this
.
$message
({
type
:
'error'
,
message
:
'请选择标签!'
});
return
return
}
}
var
json
=
{
var
json
=
{
user_id
:
this
.
callbackObj
.
user_id
,
user_id
:
this
.
user
.
user_id
,
type
:
0
,
type
:
0
,
first_label_id
:
this
.
tagSelected
[
0
]
first_label_id
:
this
.
tagSelected
[
0
]
};
};
this
.
tagSelected
[
1
]
?
json
.
second_label_id
=
this
.
tagSelected
[
1
]
:
''
;
this
.
tagSelected
[
1
]
?
json
.
second_label_id
=
this
.
tagSelected
[
1
]
:
''
;
this
.
tagSelected
[
2
]
?
json
.
third_label_id
=
this
.
tagSelected
[
2
]
:
''
;
this
.
tagSelected
[
2
]
?
json
.
third_label_id
=
this
.
tagSelected
[
2
]
:
''
;
postUserTagApi
(
json
).
then
(
res
=>
{
postUserTagApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'添加成功!'
});
this
.
$message
({
type
:
'success'
,
message
:
'添加成功!'
});
this
.
getTag
();
this
.
getTag
();
this
.
dialogReset
();
this
.
dialogReset
();
})
})
...
@@ -331,17 +374,24 @@
...
@@ -331,17 +374,24 @@
})
})
}
}
}
}
getTagApi
().
then
(
res
=>
{
getTagApi
().
then
(
res
=>
{
recursion
(
res
);
recursion
(
res
);
this
.
treeDataOrigin
=
res
;
this
.
treeDataOrigin
=
res
;
});
});
},
},
getUser
()
{
getUserDetailApi
(
this
.
user
.
user_id
).
then
(
res
=>
{
// console.log(res, 999)
this
.
user
=
res
;
this
.
getData
();
this
.
loading
=
false
;
})
},
getTag
()
{
getTag
()
{
if
(
this
.
callbackObj
.
user_id
)
{
getUserTagApi
(
this
.
user
.
user_id
).
then
(
res
=>
{
getUserTagApi
(
this
.
callbackObj
.
user_id
).
then
(
res
=>
{
this
.
tag
=
res
;
this
.
tag
=
res
;
})
})
}
},
},
getData
()
{
getData
()
{
let
json
=
{
let
json
=
{
...
@@ -349,7 +399,7 @@
...
@@ -349,7 +399,7 @@
page
:
this
.
nowPage
page
:
this
.
nowPage
};
};
this
.
teacher_num
?
json
.
teacher_num
=
this
.
teacher_num
:
''
;
this
.
teacher_num
?
json
.
teacher_num
=
this
.
teacher_num
:
''
;
this
.
callbackObj
.
user_id
?
json
.
user_id
=
this
.
callbackObj
.
user_id
:
''
;
this
.
user
.
user_id
?
json
.
user_id
=
this
.
user
.
user_id
:
''
;
// console.log(json, 9000)
// console.log(json, 9000)
getCallBackApi
(
json
).
then
(
res
=>
{
getCallBackApi
(
json
).
then
(
res
=>
{
this
.
list
=
res
.
page_data
;
this
.
list
=
res
.
page_data
;
...
@@ -378,7 +428,7 @@
...
@@ -378,7 +428,7 @@
return
return
}
}
let
json
=
{
let
json
=
{
user_id
:
this
.
callbackObj
.
user_id
,
user_id
:
this
.
user
.
user_id
,
teacher_id
:
this
.
callbackObj
.
teacher_id
,
// TODO
teacher_id
:
this
.
callbackObj
.
teacher_id
,
// TODO
// teacher_id: 84, // TODO
// teacher_id: 84, // TODO
method
:
this
.
add
.
method
,
method
:
this
.
add
.
method
,
...
@@ -408,9 +458,14 @@
...
@@ -408,9 +458,14 @@
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.callback-container {
.callback-container {
border: none;
.el-divider--horizontal {
.el-divider--horizontal {
margin: 20px 0;
margin: 20px 0;
}
}
.el-card__body {
padding: 0;
}
}
}
.callback-item {
.callback-item {
...
@@ -420,26 +475,32 @@
...
@@ -420,26 +475,32 @@
border: solid 1px rgba(220, 223, 230, 0.5);
border: solid 1px rgba(220, 223, 230, 0.5);
border-radius: 2px;
border-radius: 2px;
font-size: 14px;
font-size: 14px;
&:last-child {
&:last-child {
margin-bottom: 0;
margin-bottom: 0;
}
}
}
}
.callback-info {
.callback-info {
/*display: flex;*/
/*display: flex;*/
padding: 10px 15px;
padding: 10px 15px;
line-height: 32px;
line-height: 32px;
.callback-edit {
.callback-edit {
display: inline-block;
display: inline-block;
.el-input__inner {
.el-input__inner {
vertical-align: top;
vertical-align: top;
}
}
i {
i {
margin: 0 -4px;
margin: 0 -4px;
padding: 0 4px;
padding: 0 4px;
font-style: normal;
font-style: normal;
cursor: pointer;
cursor: pointer;
transition: 240ms background-color;
transition: 240ms background-color;
&:hover {
&:hover {
background-color: #dde4ee;
background-color: #dde4ee;
border-radius: 3px;
border-radius: 3px;
...
@@ -471,29 +532,37 @@
...
@@ -471,29 +532,37 @@
padding: 2px 0;
padding: 2px 0;
line-height: 24px;
line-height: 24px;
font-size: 14px;
font-size: 14px;
span {
span {
/*display: inline-block;*/
/*display: inline-block;*/
margin-right: 12px;
margin-right: 12px;
&.time {
&.time {
font-family: monospace;
font-family: monospace;
font-size: 13px;
font-size: 13px;
}
}
&.grey {
&.grey {
color: #555;
color: #555;
}
}
&.dark {
&.dark {
color: #333;
color: #333;
}
}
&.bold {
&.bold {
font-weight: bold;
font-weight: bold;
}
}
&.info {
&.info {
font-size: 13px;
font-size: 13px;
color: #888;
color: #888;
}
}
&.green {
&.green {
color: #33CC66;
color: #33CC66;
}
}
&.red {
&.red {
color: red;
color: red;
}
}
...
@@ -503,12 +572,15 @@
...
@@ -503,12 +572,15 @@
.callback-input {
.callback-input {
font-size: 0;
font-size: 0;
.el-form-item {
.el-form-item {
margin-right: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin-bottom: 10px;
}
}
.is-required .el-select {
.is-required .el-select {
display: flex;
display: flex;
&:before {
&:before {
content: '*';
content: '*';
color: #F56C6C;
color: #F56C6C;
...
...
src/components/system/tag.vue
View file @
c7421a87
...
@@ -19,15 +19,17 @@
...
@@ -19,15 +19,17 @@
<div
class=
"tag-tree"
>
<div
class=
"tag-tree"
>
<el-tree
<el-tree
:indent=
"40"
:data=
"treeData"
:data=
"treeData"
node-key=
"id"
ref=
"tagTree"
node-key=
"id"
ref=
"tagTree"
:props=
"
{children: 'children', label: 'name'}"
:props=
"
{children: 'children', label: 'name'}"
:indent="40"
@node-expand="tagExpand"
@node-expand="tagExpand"
@node-collapse="tagCollapse"
@node-collapse="tagCollapse"
:filter-node-method="filterNode"
:filter-node-method="filterNode"
:default-expanded-keys="tagExpanded"
:default-expanded-keys="tagExpanded"
:expand-on-click-node="true">
:expand-on-click-node="true">
<!--:check-on-click-node="true"
:check-strictly="true"-->
<div
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<div
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<el-tag
class=
"tag-tree-item"
effect=
"plain"
size=
"medium"
>
{{
node
.
label
}}
</el-tag>
<el-tag
class=
"tag-tree-item"
effect=
"plain"
size=
"medium"
>
{{
node
.
label
}}
</el-tag>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
...
...
src/components/user/index.vue
View file @
c7421a87
<
template
>
<
template
>
<div
class=
"admin-refresh"
v-loading=
"loading"
>
<div
class=
"admin-refresh"
v-loading=
"loading"
>
<!--为了共享user权限-->
<user-detail
v-if=
"inDetail"
></user-detail>
<div
v-else
>
<div
class=
"section-search"
>
<div
class=
"section-search"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
inline
>
<el-form-item>
<el-form-item>
...
@@ -27,7 +32,6 @@
...
@@ -27,7 +32,6 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
<el-table
<el-table
:data=
"userList"
:data=
"userList"
style=
"width: 100%"
>
style=
"width: 100%"
>
...
@@ -46,7 +50,7 @@
...
@@ -46,7 +50,7 @@
<el-table-column
label=
"操作"
width=
"200px"
>
<el-table-column
label=
"操作"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"goToDetail(scope.row.user_id)"
>
查看详情
</el-button>
-->
<!--
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"goToDetail(scope.row.user_id)"
>
查看详情
</el-button>
-->
<router-link
:to=
"
{path:'/userDetail', query:{
userid: scope.row.user_id}}" target="_blank">
<el-button
size=
"mini"
plain
type=
"primary"
>
查看详情
</el-button></router-link>
<router-link
:to=
"
{path:'/user', query:{type: 'detail',
userid: scope.row.user_id}}" target="_blank">
<el-button
size=
"mini"
plain
type=
"primary"
>
查看详情
</el-button></router-link>
<el-button
size=
"mini"
v-if=
"!$store.state.readonly"
plain
type=
"warning"
@
click=
"userTransfer(scope.row)"
>
用户转移
</el-button>
<el-button
size=
"mini"
v-if=
"!$store.state.readonly"
plain
type=
"warning"
@
click=
"userTransfer(scope.row)"
>
用户转移
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -91,6 +95,8 @@
...
@@ -91,6 +95,8 @@
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -104,6 +110,7 @@
...
@@ -104,6 +110,7 @@
name
:
"index"
,
name
:
"index"
,
data
()
{
data
()
{
return
{
return
{
inDetail
:
false
,
addShow
:
false
,
addShow
:
false
,
userTransferList
:
[],
userTransferList
:
[],
userObj
:
{
userObj
:
{
...
@@ -161,8 +168,13 @@
...
@@ -161,8 +168,13 @@
teacherDialog
teacherDialog
},
},
mounted
()
{
mounted
()
{
this
.
$route
.
query
.
id
?
this
.
searchFrom
.
userId
=
this
.
$route
.
query
.
id
:
''
;
if
(
this
.
$route
.
query
.
type
&&
this
.
$route
.
query
.
type
==
'detail'
)
{
// 详情页
this
.
inDetail
=
true
}
else
{
// 列表页
this
.
inDetail
=
false
;
this
.
getUser
();
this
.
getUser
();
}
this
.
$route
.
query
.
id
?
this
.
searchFrom
.
userId
=
this
.
$route
.
query
.
id
:
''
;
},
},
methods
:
{
methods
:
{
userTransfer
(
row
)
{
userTransfer
(
row
)
{
...
...
src/service/api.js
View file @
c7421a87
...
@@ -71,6 +71,10 @@ export const getCallBackApi = function (json) {
...
@@ -71,6 +71,10 @@ export const getCallBackApi = function (json) {
// console.log(json, 9001)
// console.log(json, 9001)
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/user/visit/
${
json
.
user_id
}
`
,
json
)
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/user/visit/
${
json
.
user_id
}
`
,
json
)
};
};
// 获取上次回访信息
export
const
getCallBackPrevApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
user/last/visit/
${
json
.
user_id
}
`
,
json
)
};
// 添加回访信息
// 添加回访信息
export
const
postCallBackApi
=
function
(
json
)
{
export
const
postCallBackApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/user/visit/
${
json
.
user_id
}
/
${
json
.
teacher_id
}
`
,
json
)
return
Vue
.
prototype
.
$post
(
`
${
_baseUrl
}
api/admin/user/visit/
${
json
.
user_id
}
/
${
json
.
teacher_id
}
`
,
json
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment