Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
customer-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
customer-admin
Commits
69386e1c
提交
69386e1c
authored
10月 25, 2021
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码提交
上级
5f863494
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
86 行增加
和
60 行删除
+86
-60
api.js
src/modules/customer/api.js
+6
-2
BaseInfo.vue
src/modules/customer/components/BaseInfo.vue
+2
-2
Contact.vue
src/modules/customer/components/Contact.vue
+49
-46
CreateContact.vue
src/modules/customer/components/CreateContact.vue
+27
-8
Details.vue
src/modules/customer/views/Details.vue
+2
-2
没有找到文件。
src/modules/customer/api.js
浏览文件 @
69386e1c
...
@@ -8,11 +8,15 @@ export function getCustomerList(params) {
...
@@ -8,11 +8,15 @@ export function getCustomerList(params) {
export
function
createCustomer
(
data
)
{
export
function
createCustomer
(
data
)
{
return
httpRequest
.
post
(
'/api/customer/admin/v1/customer'
,
data
)
return
httpRequest
.
post
(
'/api/customer/admin/v1/customer'
,
data
)
}
}
// 获取基本信息
export
function
getBaseDetail
(
params
)
{
return
httpRequest
.
get
(
'/api/customer/admin/v1/customer/{id}'
,
{
params
})
}
// 新建联系人
// 新建联系人
export
function
createContact
(
data
)
{
export
function
createContact
(
data
)
{
return
httpRequest
.
post
(
'/api/customer/admin/v1/{customer_id}/contact'
,
data
)
return
httpRequest
.
post
(
'/api/customer/admin/v1/{customer_id}/contact'
,
data
)
}
}
// 获取联系人
// 获取联系人
export
function
getContact
Detail
(
params
)
{
export
function
getContact
List
(
params
)
{
return
httpRequest
.
get
(
`/api/customer/admin/v1/
customer/
${
params
.
id
}
`
,
params
)
return
httpRequest
.
get
(
`/api/customer/admin/v1/
${
params
.
customer_id
}
/contacts
`
,
params
)
}
}
src/modules/customer/components/BaseInfo.vue
浏览文件 @
69386e1c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
get
Contact
Detail
}
from
'../api'
import
{
get
Base
Detail
}
from
'../api'
export
default
{
export
default
{
props
:
{
props
:
{
id
:
{
id
:
{
...
@@ -42,7 +42,7 @@ export default {
...
@@ -42,7 +42,7 @@ export default {
methods
:
{
methods
:
{
getBaseInfo
()
{
getBaseInfo
()
{
const
params
=
{
id
:
this
.
id
}
const
params
=
{
id
:
this
.
id
}
get
Contact
Detail
(
params
).
then
(
res
=>
{
get
Base
Detail
(
params
).
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
form
=
res
.
data
})
})
}
}
...
...
src/modules/customer/components/Contact.vue
浏览文件 @
69386e1c
<
template
>
<
template
>
<div
class=
"base-info"
>
<div
class=
"base-info"
>
<div
class=
"bar"
>
<div
class=
"bar"
>
<el-button
type=
"primary"
size=
"small"
>
添加联系人
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"add"
>
添加联系人
</el-button>
</div>
</div>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<!-- 操作 -->
<!-- 操作 -->
...
@@ -11,80 +11,83 @@
...
@@ -11,80 +11,83 @@
<el-button
type=
"text"
@
click=
"handleDelete(row)"
size=
"mini"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
size=
"mini"
>
删除
</el-button>
</
template
>
</
template
>
</template>
</template>
<CreateContact
:visible
.
sync=
"isShowDialog"
:isEdit=
"isEdit"
:data=
"data"
/>
</app-list>
</app-list>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
// 组件
// 组件
import
CreateContact
from
'./CreateContact.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
{
getContactList
}
from
'../api'
export
default
{
export
default
{
name
:
'Contact'
,
components
:
{
AppList
,
CreateContact
},
components
:
{
AppList
},
data
()
{
return
{
data
:
{},
isEdit
:
false
,
isShowDialog
:
false
}
},
props
:
{
id
:
{
type
:
String
,
default
:
''
}
},
computed
:
{
computed
:
{
// 列表配置
// 列表配置
tableOptions
()
{
tableOptions
()
{
return
{
return
{
// remote: {
remote
:
{
// httpRequest: getRoleList,
httpRequest
:
getContactList
,
// params: { },
params
:
{
// },
customer_id
:
this
.
id
,
data
:
[
id
:
''
,
{
nameL
:
''
,
name
:
'李老师'
,
mobile
:
''
post
:
'校长'
,
department
:
'综合管理部'
,
phone
:
'13500010002'
,
email
:
'seraphim1230@sina.com'
,
wechat
:
'wfewfwefwef'
,
mobile
:
'13500030004'
,
qq
:
'379628069'
,
creator
:
'单小楠'
,
created_time
:
'2021-12-12 12:12'
}
}
]
,
}
,
columns
:
[
columns
:
[
// { type: 'selection', minWidth: '40px' },
{
prop
:
'name'
,
label
:
'姓名'
,
minWidth
:
'120px'
},
{
prop
:
'name'
,
label
:
'姓名'
,
minWidth
:
'120px'
},
{
prop
:
'pos
t
'
,
label
:
'职位'
,
minWidth
:
'120px'
},
{
prop
:
'pos
ition
'
,
label
:
'职位'
,
minWidth
:
'120px'
},
{
prop
:
'department'
,
label
:
'部门'
,
minWidth
:
'80px'
},
{
prop
:
'department'
,
label
:
'部门'
,
minWidth
:
'80px'
},
{
prop
:
'
phon
e'
,
label
:
'电话'
,
minWidth
:
'150px'
},
{
prop
:
'
mobil
e'
,
label
:
'电话'
,
minWidth
:
'150px'
},
{
prop
:
'email'
,
label
:
'邮箱'
,
minWidth
:
'150px'
},
{
prop
:
'email'
,
label
:
'邮箱'
,
minWidth
:
'150px'
},
{
prop
:
'wechat'
,
label
:
'微信号'
,
minWidth
:
'140px'
},
{
prop
:
'wechat'
,
label
:
'微信号'
,
minWidth
:
'140px'
},
{
prop
:
'mobile'
,
label
:
'附属手机号'
,
minWidth
:
'140px'
},
{
prop
:
'
sub_
mobile'
,
label
:
'附属手机号'
,
minWidth
:
'140px'
},
{
prop
:
'qq'
,
label
:
'QQ号'
,
minWidth
:
'140px'
},
{
prop
:
'qq'
,
label
:
'QQ号'
,
minWidth
:
'140px'
},
{
prop
:
'creat
or
'
,
label
:
'创建员工'
,
minWidth
:
'140px'
},
{
prop
:
'creat
ed_by
'
,
label
:
'创建员工'
,
minWidth
:
'140px'
},
{
prop
:
'created_
time
'
,
label
:
'创建时间'
,
minWidth
:
'140px'
},
{
prop
:
'created_
at
'
,
label
:
'创建时间'
,
minWidth
:
'140px'
},
{
label
:
'操作'
,
minWidth
:
'140px'
,
slots
:
'table-operate'
}
{
label
:
'操作'
,
minWidth
:
'140px'
,
slots
:
'table-operate'
}
]
]
}
}
}
}
},
},
data
()
{
return
{
form
:
{
name
:
'北京大学继续教育学院'
,
abbr
:
'北大继教'
,
source
:
'公司资源'
,
category
:
'院校类'
,
area
:
'北京市北京市海淀区'
,
address
:
'北京市海淀区颐和园路5号'
,
remark
:
'北京大学怎么怎么样等等'
}
}
},
methods
:
{
methods
:
{
handleEdit
()
{},
handleEdit
(
row
)
{
this
.
Edit
=
false
this
.
data
=
row
this
.
isShowDialog
=
true
},
add
()
{
this
.
Edit
=
true
this
.
data
=
{}
this
.
isShowDialog
=
true
},
handleDelete
()
{}
handleDelete
()
{}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.bar
{
.bar
{
padding-bottom
:
10px
;
padding-bottom
:
10px
;
}
}
.item
{
.item
{
font-size
:
16px
;
font-size
:
16px
;
line-height
:
48px
;
line-height
:
48px
;
color
:
#494949
;
color
:
#494949
;
}
}
</
style
>
</
style
>
src/modules/customer/components/CreateContact.vue
浏览文件 @
69386e1c
<
template
>
<
template
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
width=
"30%"
top=
"40vh"
:title=
"title"
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
top=
"40vh"
:title=
"title"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
v-model=
"form.name"
/>
<el-input
v-model=
"form.name"
/>
...
@@ -58,19 +58,38 @@ export default {
...
@@ -58,19 +58,38 @@ export default {
data
:
{
data
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({})
default
:
()
=>
({})
},
isEdit
:
{
type
:
Boolean
,
default
:
false
}
},
computed
:
{
title
()
{
return
this
.
isEdit
?
'编辑联系人'
:
'创建联系人'
}
}
},
},
methods
:
{
methods
:
{
// 提交
// 提交
submit
()
{
submit
()
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
const
params
=
Object
.
assign
({
group_id
:
this
.
id
},
this
.
form
)
this
.
isEdit
?
this
.
edit
()
:
this
.
create
()
createContact
(
params
).
then
(
res
=>
{
})
this
.
$message
.
success
(
'新建联系人成功'
)
},
this
.
$emit
(
'update:visible'
,
false
)
edit
()
{
this
.
$emit
(
'success'
,
res
.
data
)
const
params
=
Object
.
assign
({
group_id
:
this
.
id
},
this
.
form
)
})
createContact
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'新建联系人成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
})
},
create
()
{
const
params
=
Object
.
assign
({
group_id
:
this
.
id
},
this
.
form
)
createContact
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'新建联系人成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
})
})
}
}
}
}
...
...
src/modules/customer/views/Details.vue
浏览文件 @
69386e1c
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<el-tab-pane
label=
"基本信息"
name=
"baseInfo"
>
<el-tab-pane
label=
"基本信息"
name=
"baseInfo"
>
<base-info
:id=
"id"
/>
<base-info
:id=
"id"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"联系人"
name=
"contacts"
>
<el-tab-pane
label=
"联系人"
name=
"contacts"
lazy
>
<
contact
/>
<
Contact
:id=
"id"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"合作项目"
name=
"project"
>
<el-tab-pane
label=
"合作项目"
name=
"project"
>
<project
/>
<project
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论