Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
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
华国豪
CRM
Commits
3d2bd0ff
Commit
3d2bd0ff
authored
Oct 15, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端调整
parent
04078522
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
473 additions
and
428 deletions
+473
-428
HomeNavLeft.vue
src/components/HomeNav/HomeNavLeft.vue
+155
-145
HomeNavTop.vue
src/components/HomeNav/HomeNavTop.vue
+140
-124
domainManager.js
src/plugins/domainManager.js
+19
-22
index.js
src/plugins/index.js
+51
-68
customerField.vue
src/views/customerSet/components/customerField.vue
+65
-61
index.vue
src/views/index.vue
+7
-4
login.vue
src/views/login.vue
+36
-4
No files found.
src/components/HomeNav/HomeNavLeft.vue
View file @
3d2bd0ff
<
style
>
.home-nav
{
width
:
100%
;
height
:
100%
;
/* font-family: perfectFont; */
user-select
:
none
;
}
.log-box
{
width
:
100%
;
height
:
13.19%
;
}
.log-box
{
background-color
:
#f4f5f9
;
}
.log-box
>
div
{
height
:
100%
;
width
:
100%
;
background
:
#3d3b4f
;
/* border-radius:0px 40px 40px 0px; */
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.log-box
img
{
width
:
42px
;
}
.home-nav
.home-menu-box
{
height
:
86.81%
;
overflow
:
hidden
;
}
.home-nav
.home-menu
{
padding
:
0
8px
;
height
:
100%
;
overflow-y
:
scroll
;
}
.home-nav
.home-menu
.home-menu-item
{
color
:
rgba
(
255
,
255
,
255
,
1
);
font-size
:
13px
;
cursor
:
pointer
;
transition
:
all
linear
0.2s
;
background-color
:
#f4f5f9
;
border-radius
:
4px
;
overflow
:
hidden
;
font-family
:
"perfectFont"
;
}
.home-nav
.home-menu
.home-menu-item
>
div
{
padding
:
0
0
0
15px
;
background-color
:
#3d3b4f
;
height
:
50px
;
line-height
:
50px
;
}
.home-nav
.home-menu
.home-menu-item.active
{
background-color
:
#3d3b4f
;
}
.home-nav
.home-menu
.home-menu-item.active
>
div
{
/* font-weight: bold; */
color
:
#fff
;
opacity
:
1
;
transition
:
all
linear
0.2s
;
background-color
:
#409efe
;
/* border-radius: 19px 0 0 19px; */
}
.home-nav
.home-menu
.home-menu-item
>
div
.iconfont
{
padding-right
:
10px
;
}
.home-nav
{
width
:
100%
;
height
:
100%
;
/* font-family: perfectFont; */
user-select
:
none
;
}
.log-box
{
width
:
100%
;
height
:
13.19%
;
}
.log-box
{
background-color
:
#f4f5f9
;
}
.log-box
>
div
{
height
:
100%
;
width
:
100%
;
background
:
#3d3b4f
;
/* border-radius:0px 40px 40px 0px; */
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.log-box
img
{
width
:
42px
;
}
.home-nav
.home-menu-box
{
height
:
86.81%
;
overflow
:
hidden
;
}
.home-nav
.home-menu
{
padding
:
0
8px
;
height
:
100%
;
overflow-y
:
scroll
;
}
.home-nav
.home-menu
.home-menu-item
{
color
:
rgba
(
255
,
255
,
255
,
1
);
font-size
:
13px
;
cursor
:
pointer
;
transition
:
all
linear
0.2s
;
background-color
:
#f4f5f9
;
border-radius
:
4px
;
overflow
:
hidden
;
font-family
:
"perfectFont"
;
}
.home-nav
.home-menu
.home-menu-item
>
div
{
padding
:
0
0
0
15px
;
background-color
:
#3d3b4f
;
height
:
50px
;
line-height
:
50px
;
}
.home-nav
.home-menu
.home-menu-item.active
{
background-color
:
#3d3b4f
;
}
.home-nav
.home-menu
.home-menu-item.active
>
div
{
/* font-weight: bold; */
color
:
#fff
;
opacity
:
1
;
transition
:
all
linear
0.2s
;
background-color
:
#409efe
;
/* border-radius: 19px 0 0 19px; */
}
.home-nav
.home-menu
.home-menu-item
>
div
.iconfont
{
padding-right
:
10px
;
}
</
style
>
<
template
>
<div
class=
"home-nav"
>
...
...
@@ -73,13 +84,8 @@
</div>
<div
class=
"home-menu-box"
>
<ul
class=
"home-menu"
>
<li
class=
"home-menu-item"
v-for=
"(item, index) in navList"
:key=
"index"
:class=
"[index === activeIndex ? 'active' : '']"
@
click=
"changeMenu(item, index)"
>
<li
class=
"home-menu-item"
v-for=
"(item, index) in navList"
:key=
"index"
:class=
"[index === activeIndex ? 'active' : '']"
@
click=
"changeMenu(item, index)"
>
<div>
<i
class=
"iconfont"
:class=
"[item.MenuStyle ? JSON.parse(item.MenuStyle).icon : '']"
></i>
<span>
{{
item
.
MenuName
}}
</span>
...
...
@@ -87,82 +93,86 @@
</li>
</ul>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
activeIndex
:
0
,
navList
:
[
{
class
:
"iconfont iconyibiaopan"
,
name
:
"仪表盘"
,
path
:
"/Home"
,
},
{
class
:
"iconfont icondaiban"
,
name
:
"待办事项"
,
path
:
"/waitMatter"
,
},
{
class
:
"iconfont iconxiansuo"
,
name
:
"线索"
,
path
:
"/clueManagement"
,
},
{
class
:
"iconfont iconkehu"
,
name
:
"客户"
,
path
:
"/customerManage"
,
},
{
class
:
"iconfont iconkehu1"
,
name
:
"联系人"
,
path
:
"/contactsManagement"
,
},
{
class
:
"iconfont icongonghaiguanli"
,
name
:
"公海"
,
path
:
"/watersManagement"
,
},
{
class
:
"iconfont iconshangji"
,
name
:
"商机"
,
path
:
"/businessManagement"
,
},
{
class
:
"iconfont iconhetong"
,
name
:
"合同"
,
},
{
class
:
"iconfont iconchanpin1"
,
name
:
"产品"
,
},
{
class
:
"iconfont icondingdan1"
,
name
:
"订单"
,
},
],
};
},
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
();
this
.
userInfo
=
userInfo
;
this
.
navList
=
userInfo
.
UserMenu
[
0
].
ChildMenu
[
0
].
ChildMenu
;
let
$this
=
this
;
this
.
MsgBus
.
$on
(
"setLeftNav"
,
function
(
val
)
{
$this
.
activeIndex
=
0
;
$this
.
navList
=
userInfo
.
UserMenu
[
0
].
ChildMenu
[
val
].
ChildMenu
;
});
},
methods
:
{
changeMenu
:
function
(
item
,
ind
)
{
this
.
activeIndex
=
ind
;
this
.
$router
.
push
({
path
:
item
.
MenuUrl
,
export
default
{
data
()
{
return
{
activeIndex
:
0
,
navList
:
[{
class
:
"iconfont iconyibiaopan"
,
name
:
"仪表盘"
,
path
:
"/Home"
,
},
{
class
:
"iconfont icondaiban"
,
name
:
"待办事项"
,
path
:
"/waitMatter"
,
},
{
class
:
"iconfont iconxiansuo"
,
name
:
"线索"
,
path
:
"/clueManagement"
,
},
{
class
:
"iconfont iconkehu"
,
name
:
"客户"
,
path
:
"/customerManage"
,
},
{
class
:
"iconfont iconkehu1"
,
name
:
"联系人"
,
path
:
"/contactsManagement"
,
},
{
class
:
"iconfont icongonghaiguanli"
,
name
:
"公海"
,
path
:
"/watersManagement"
,
},
{
class
:
"iconfont iconshangji"
,
name
:
"商机"
,
path
:
"/businessManagement"
,
},
{
class
:
"iconfont iconhetong"
,
name
:
"合同"
,
},
{
class
:
"iconfont iconchanpin1"
,
name
:
"产品"
,
},
{
class
:
"iconfont icondingdan1"
,
name
:
"订单"
,
},
],
};
},
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
();
this
.
userInfo
=
userInfo
;
if
(
userInfo
&&
userInfo
.
UserMenu
&&
userInfo
.
UserMenu
.
length
>
0
)
{
this
.
navList
=
userInfo
.
UserMenu
[
0
].
ChildMenu
[
0
].
ChildMenu
;
}
let
$this
=
this
;
this
.
MsgBus
.
$on
(
"setLeftNav"
,
function
(
val
)
{
$this
.
activeIndex
=
0
;
if
(
userInfo
&&
userInfo
.
UserMenu
&&
userInfo
.
UserMenu
.
length
>
0
)
{
$this
.
navList
=
userInfo
.
UserMenu
[
0
].
ChildMenu
[
val
].
ChildMenu
;
}
});
},
},
};
</
script
>
methods
:
{
changeMenu
:
function
(
item
,
ind
)
{
this
.
activeIndex
=
ind
;
this
.
$router
.
push
({
path
:
item
.
MenuUrl
,
});
},
},
};
</
script
>
\ No newline at end of file
src/components/HomeNav/HomeNavTop.vue
View file @
3d2bd0ff
<
style
>
.nav-right
{
height
:
100%
;
margin
:
0
30px
;
display
:
flex
;
font-family
:
perfectFont
;
user-select
:
none
;
}
.nav-right
.nav-right-menu
,
.nav-right
.nav-right-info
{
display
:
flex
;
align-items
:
center
;
height
:
100%
;
flex
:
1
;
}
.nav-right
.nav-right-menu
ul
{
padding
:
0
;
margin
:
0
;
display
:
flex
;
width
:
100%
;
height
:
100%
;
}
.nav-right
.nav-right-menu
ul
li
{
line-height
:
56px
;
display
:
inline-block
;
border-bottom
:
3px
solid
rgba
(
13
,
36
,
129
,
0
);
margin
:
0
20px
;
color
:
#666
;
font-size
:
16px
;
cursor
:
pointer
;
font-family
:
perfectFont
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.nav-right
.nav-right-menu
ul
li
:first-child
{
margin-left
:
0px
;
}
.nav-right
.nav-right-menu
ul
li
.active
{
color
:
#409efe
;
border-bottom-color
:
#409efe
;
font-family
:
pingfangR
;
}
.nav-right
.nav-right-menu
ul
li
i
{
font-size
:
16px
;
margin-right
:
5px
;
}
.nav-right
.nav-right-info
{
flex
:
unset
;
width
:
240px
;
justify-content
:
flex-end
;
}
.nav-right
.nav-right-info
.right-item
{
text-align
:
right
;
padding-left
:
20px
;
display
:
flex
;
flex-wrap
:
nowrap
;
align-items
:
center
;
}
/* .nav-right .nav-right-info .right-item:last-child{
.nav-right
{
height
:
100%
;
margin
:
0
30px
;
display
:
flex
;
font-family
:
perfectFont
;
user-select
:
none
;
}
.nav-right
.nav-right-menu
,
.nav-right
.nav-right-info
{
display
:
flex
;
align-items
:
center
;
height
:
100%
;
flex
:
1
;
}
.nav-right
.nav-right-menu
ul
{
padding
:
0
;
margin
:
0
;
display
:
flex
;
width
:
100%
;
height
:
100%
;
}
.nav-right
.nav-right-menu
ul
li
{
line-height
:
56px
;
display
:
inline-block
;
border-bottom
:
3px
solid
rgba
(
13
,
36
,
129
,
0
);
margin
:
0
20px
;
color
:
#666
;
font-size
:
16px
;
cursor
:
pointer
;
font-family
:
perfectFont
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.nav-right
.nav-right-menu
ul
li
:first-child
{
margin-left
:
0px
;
}
.nav-right
.nav-right-menu
ul
li
.active
{
color
:
#409efe
;
border-bottom-color
:
#409efe
;
font-family
:
pingfangR
;
}
.nav-right
.nav-right-menu
ul
li
i
{
font-size
:
16px
;
margin-right
:
5px
;
}
.nav-right
.nav-right-info
{
flex
:
unset
;
width
:
240px
;
justify-content
:
flex-end
;
}
.nav-right
.nav-right-info
.right-item
{
text-align
:
right
;
padding-left
:
20px
;
display
:
flex
;
flex-wrap
:
nowrap
;
align-items
:
center
;
}
/* .nav-right .nav-right-info .right-item:last-child{
margin: 0px;
} */
.nav-right
.nav-right-info
.right-item
img
{
width
:
34px
;
height
:
34px
;
border-radius
:
100%
;
}
.nav-right
.nav-right-info
.right-item
.welcomne-txt
{
font-size
:
12px
;
color
:
#bbb
;
margin-right
:
5px
;
white-space
:
nowrap
;
}
.nav-right
.nav-right-info
.right-item
.usr-name
{
font-size
:
16px
;
font-weight
:
bold
;
color
:
black
;
white-space
:
nowrap
;
}
.nav-right
.nav-right-info
.right-item
i
{
font-size
:
20px
;
color
:
#409efe
;
}
.nav-right
.nav-right-info
.right-item
img
{
width
:
34px
;
height
:
34px
;
border-radius
:
100%
;
}
.nav-right
.nav-right-info
.right-item
.welcomne-txt
{
font-size
:
12px
;
color
:
#bbb
;
margin-right
:
5px
;
white-space
:
nowrap
;
}
.nav-right
.nav-right-info
.right-item
.usr-name
{
font-size
:
16px
;
font-weight
:
bold
;
color
:
black
;
white-space
:
nowrap
;
}
.nav-right
.nav-right-info
.right-item
i
{
font-size
:
20px
;
color
:
#409efe
;
}
</
style
>
<
template
>
<div
class=
"nav-right"
>
<div
class=
"nav-right-menu"
>
<ul>
<li
:class=
"
{'active':chosenMenuId==item.MenuId}" v-for="(item, index) in menuList[0].ChildMenu" :key="index" @click="chosenFirstLeaveMenu(item, index)">
<i
class=
"iconfont"
:class=
"[item.MenuStyle ? JSON.parse(item.MenuStyle).icon : '']"
></i>
{{
item
.
MenuName
}}
</li>
<template
v-if=
"menuList&&menuList.length>0"
>
<li
:class=
"
{'active':chosenMenuId==item.MenuId}" v-for="(item, index) in menuList[0].ChildMenu" :key="index"
@click="chosenFirstLeaveMenu(item, index)">
<i
class=
"iconfont"
:class=
"[item.MenuStyle ? JSON.parse(item.MenuStyle).icon : '']"
></i>
{{
item
.
MenuName
}}
</li>
</
template
>
</ul>
</div>
<div
class=
"nav-right-info"
>
...
...
@@ -101,11 +117,7 @@
<span
class=
"usr-name"
>
{{userInfo.EmName}}
</span>
</div>
<div
class=
"right-item"
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"click"
v-model=
"visible"
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"click"
v-model=
"visible"
>
<ul
style=
"padding:0;margin:0;display:block;"
>
<li
style=
"padding:0;margin:0;color:#000;cursor: pointer;"
@
click=
"signout"
>
<i
class=
"iconfont icontuichu"
></i>
...
...
@@ -121,41 +133,45 @@
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
activeIndex
:
0
,
value
:
0
,
menuList
:
[{
ChildMenu
:
[]
}],
chosenMenuId
:
0
,
userInfo
:
{
EmName
:
""
,
Icon
:
""
,
},
visible
:
false
,
};
},
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
();
this
.
userInfo
=
userInfo
;
this
.
menuList
=
userInfo
.
UserMenu
;
this
.
chosenMenuId
=
userInfo
.
UserMenu
[
0
].
ChildMenu
[
0
].
MenuId
;
},
methods
:
{
chosenFirstLeaveMenu
(
item
,
index
)
{
this
.
chosenMenuId
=
item
.
MenuId
;
this
.
MsgBus
.
$emit
(
"setLeftNav"
,
index
);
this
.
$router
.
push
({
path
:
item
.
ChildMenu
[
0
].
MenuUrl
,
});
export
default
{
data
()
{
return
{
activeIndex
:
0
,
value
:
0
,
menuList
:
[{
ChildMenu
:
[]
}],
chosenMenuId
:
0
,
userInfo
:
{
EmName
:
""
,
Icon
:
""
,
},
visible
:
false
,
};
},
errorHandler
()
{
return
true
;
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
();
this
.
userInfo
=
userInfo
;
if
(
userInfo
&&
userInfo
.
UserMenu
&&
userInfo
.
UserMenu
.
length
>
0
)
{
this
.
menuList
=
userInfo
.
UserMenu
;
this
.
chosenMenuId
=
userInfo
.
UserMenu
[
0
].
ChildMenu
[
0
].
MenuId
;
}
},
signout
()
{
window
.
localStorage
.
removeItem
(
"userInfo"
);
this
.
$router
.
push
(
"/login"
);
methods
:
{
chosenFirstLeaveMenu
(
item
,
index
)
{
this
.
chosenMenuId
=
item
.
MenuId
;
this
.
MsgBus
.
$emit
(
"setLeftNav"
,
index
);
this
.
$router
.
push
({
path
:
item
.
ChildMenu
[
0
].
MenuUrl
,
});
},
errorHandler
()
{
return
true
;
},
signout
()
{
window
.
localStorage
.
removeItem
(
"userInfo"
);
this
.
$router
.
push
(
"/login"
);
},
},
},
};
</
script
>
};
</
script
>
\ No newline at end of file
src/plugins/domainManager.js
View file @
3d2bd0ff
...
...
@@ -3,24 +3,23 @@ const isOnline = function () {
}
export
default
function
()
{
//CRM API
let
domainUrl
=
""
;
domainUrl
=
"http://192.168.5.46:5003"
;
let
locationName
=
window
.
location
.
hostname
;
let
domainUrl
=
"http://192.168.5.46:5003"
;
//旅游ERPApi
let
domainPostUrl
=
""
domainPostUrl
=
"http://192.168.5.46"
;
let
erpApiUrl
=
"http://192.168.5.46"
let
erpSiteUrl
=
""
;
//ERP前端域名
let
javaUrl
=
"http://192.168.10.215:9000"
;
//javaapi域名获取优惠卷
let
ViittoFileUrl
=
"http://192.168.5.214:8130"
;
//文件预览站点
let
UploadUrl
=
"http://192.168.5.214:8120"
;
//文件上传站点
if
(
isOnline
())
{
if
(
window
.
location
.
host
.
indexOf
(
'fcrmyx.oytour.com'
)
!=
-
1
)
{
domainUrl
=
"http://crm.oytour.com"
domainPostUrl
=
"http://reborn.oytour.com"
}
else
{
domainUrl
=
"http://testcrm.oytour.com"
domainPostUrl
=
"http://testapi.oytour.com"
}
domainUrl
=
"http://crm.oytour.com"
;
erpApiUrl
=
"http://reborn.oytour.com"
;
javaUrl
=
"http://efficient.oytour.com"
;
ViittoFileUrl
=
"http://imgfile.oytour.com"
;
UploadUrl
=
"http://uploadfile.oytour.com"
;
}
let
erpSiteUrl
=
""
;
var
storageUser
=
this
.
getLocalStorage
();
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
)
{
if
(
isOnline
()
)
{
erpSiteUrl
=
"http://admin.oytour.com/#/"
;
if
(
storageUser
&&
storageUser
.
ERPUrl
)
{
erpSiteUrl
=
storageUser
.
ERPUrl
+
"/#/"
;
...
...
@@ -33,19 +32,17 @@ export default function () {
}
var
obj
=
{
//主地址
DomainUrl
:
domainUrl
,
DownLoadContractUrl
:
domainPostUrl
,
DownLoadContractUrl
:
erpApiUrl
,
//阿里服务器地址
AliUrl
:
"https://reborndev.oss-cn-hangzhou.aliyuncs.com"
,
//CRMApi地址
PostUrl
:
domainUrl
,
//旅游ERPApi地址
ERPApiUrl
:
domainPost
Url
+
"/api/common/post"
,
ERPApiUrlFile
:
domainPost
Url
+
"/api/file/GetFileFromWebApi"
,
javaUrl
:
locationName
.
indexOf
(
'testb2b'
)
==
-
1
?
"http://efficient.oytour.com"
:
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://47.96.12.235:9001"
:
"http://192.168.10.215:9000"
,
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://staticfile.oytour.com"
:
'http://192.168.10.214:8130'
,
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://uploadfile.oytour.com"
:
"http://192.168.10.214:8120"
,
ERPApiUrl
:
erpApi
Url
+
"/api/common/post"
,
ERPApiUrlFile
:
erpApi
Url
+
"/api/file/GetFileFromWebApi"
,
javaUrl
:
javaUrl
,
ViittoFileUrl
:
ViittoFileUrl
,
UploadUrl
:
UploadUrl
,
erpRoutingUrl
:
erpSiteUrl
};
return
obj
;
...
...
src/plugins/index.js
View file @
3d2bd0ff
...
...
@@ -8,78 +8,60 @@ export default {
domainManager
,
install
(
Vue
,
options
)
{
Vue
.
prototype
.
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
},
//域名管理对象
Vue
.
prototype
.
domainManager
=
domainManager
,
return
process
.
env
.
NODE_ENV
!==
'development'
;
};
//域名管理对象
Vue
.
prototype
.
domainManager
=
domainManager
;
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"success"
});
},
//错误提示
Vue
.
prototype
.
Error
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"error"
});
},
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"success"
});
}
//错误提示
Vue
.
prototype
.
Error
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"error"
});
}
//一般提示
Vue
.
prototype
.
Info
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"info"
});
},
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
//一般提示
Vue
.
prototype
.
Info
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"info"
});
}
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"warning"
});
}
//Confirm
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
this
.
$confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
if
(
typeof
callback
===
'function'
)
{
callback
();
}
})
.
catch
(()
=>
{
this
.
Info
(
"已取消操作"
);
});
},
//Confirm
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
this
.
$confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
if
(
typeof
callback
===
'function'
)
{
callback
();
}
})
.
catch
(()
=>
{
this
.
Info
(
"已取消操作"
);
});
},
//压缩图片
//path : 图片路径
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
let
url
=
this
.
domainManager
().
UploadUrl
;
let
poise
=
'width='
;
w
=
w
?
w
:
''
h
=
h
?
h
:
''
if
(
type
===
'w'
)
{
poise
=
'width'
}
else
if
(
type
===
'h'
)
{
poise
=
'height'
}
return
path
.
split
(
'?'
)[
0
]
+
'?width='
+
w
;
}
}
//旅游ERP接口
Vue
.
prototype
.
apipost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
...
...
@@ -315,6 +297,7 @@ export default {
console
.
log
(
"GetLocalFile"
,
res
);
});
}
//erp下载文件
Vue
.
prototype
.
GetLocalFile2
=
function
(
cmd
,
msg
,
fileName
,
callBack
)
{
if
(
msg
==
null
||
msg
==
""
)
{
...
...
src/views/customerSet/components/customerField.vue
View file @
3d2bd0ff
...
...
@@ -2,7 +2,7 @@
<div
class=
"q-pa-md customerField"
>
<div
style=
"text-align: right;"
>
<el-button
type=
"primary"
style=
"float:right;margin-bottom: 10px;"
size=
"sm"
class=
"q-mr-md"
icon=
"plus"
@
click=
"goaddfield()"
>
新增字段
</el-button>
@
click=
"goaddfield()"
>
新增字段
</el-button>
</div>
<table
class=
"payTable"
>
<thead>
...
...
@@ -21,58 +21,61 @@
<td
:colspan=
"8"
align=
"center"
>
暂无数据
</td>
</tr>
<!--
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
:move=
"getdata"
@
update=
"datadragEnd"
>
-->
<template>
<tr
v-for=
"element in data"
:key=
"element.Id"
>
<td><span>
{{
element
.
Name
}}
</span></td>
<td>
<span
v-if=
"element.IsSystem!=1"
>
{{
element
.
TypeName
}}
</span>
<span
v-if=
"element.IsSystem==1"
>
系统字段
</span>
</td>
<td><span>
{{
element
.
DeptName
}}
</span></td>
<td>
<q-toggle
v-if=
"element.IsLock==1"
v-model=
"element.Enable"
:true-value=
"1"
:false-value=
"2"
icon=
"lock"
disable
/>
<q-toggle
v-else
v-model=
"element.Enable"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"godelete(element,1)"
/>
</td>
<td>
<q-toggle
v-model=
"element.Required"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"godelete(element,2)"
/>
</td>
<td>
<div>
{{
element
.
UpdateByName
}}
</div>
<div>
{{
element
.
UpdateTime
}}
</div>
</td>
<td>
<el-button
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
@
click=
"goedit(element)"
>
编辑
</el-button>
<el-button
v-if=
'element.IsDefault!=1'
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
@
click=
"godelete(element,3)"
>
删除
</el-button>
</td>
<td>
<i
class=
"iconfont icon-drag"
style=
"font-size: 20px;color: #777;"
></i>
</td>
</tr>
</
template
>
<template>
<tr
v-for=
"element in data"
:key=
"element.Id"
>
<td><span>
{{
element
.
Name
}}
</span></td>
<td>
<span
v-if=
"element.IsSystem!=1"
>
{{
element
.
TypeName
}}
</span>
<span
v-if=
"element.IsSystem==1"
>
系统字段
</span>
</td>
<td><span>
{{
element
.
DeptName
}}
</span></td>
<td>
<q-toggle
v-if=
"element.IsLock==1"
v-model=
"element.Enable"
:true-value=
"1"
:false-value=
"2"
icon=
"lock"
disable
/>
<q-toggle
v-else
v-model=
"element.Enable"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"godelete(element,1)"
/>
</td>
<td>
<q-toggle
v-model=
"element.Required"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"godelete(element,2)"
/>
</td>
<td>
<div>
{{
element
.
UpdateByName
}}
</div>
<div>
{{
element
.
UpdateTime
}}
</div>
</td>
<td>
<el-button
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
@
click=
"goedit(element)"
>
编辑
</el-button>
<el-button
v-if=
'element.IsDefault!=1'
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
@
click=
"godelete(element,3)"
>
删除
</el-button>
</td>
<td>
<i
class=
"iconfont icon-drag"
style=
"font-size: 20px;color: #777;"
></i>
</td>
</tr>
</
template
>
<!-- </draggable> -->
</table>
<div>
<el-dialog
:visible
.
sync=
"Isadd"
persistent
title=
"新建/修改字段"
>
<addfield
@
getcancel=
'getcancel'
:passobj=
"addMsg"
:passdeptl=
"deptl"
:passtabsList=
"tabsList"
:passcheckboxList=
"checkboxList"
></addfield>
</el-dialog>
<el-dialog
:visible
.
sync=
"Isadd"
persistent
title=
"新建/修改字段"
>
<addfield
@
getcancel=
'getcancel'
:passobj=
"addMsg"
:passdeptl=
"deptl"
:passtabsList=
"tabsList"
:passcheckboxList=
"checkboxList"
></addfield>
</el-dialog>
</div>
</div>
</template>
<scr
<
script
>
import
draggable
from
"vuedraggable"
;
import
Vue
from
'vue'
import
addfield
from
'./addfield.vue'
export
default
{
components: { draggable, addfield },
components
:
{
draggable
,
addfield
},
data
()
{
return
{
data
:
[],
...
...
@@ -98,19 +101,21 @@
}
}
},
mounted() {
this.changePage()
this.getCustomerFieldType()
this.getDepartList()
//获取部门
this.getFieldInputType()
//输入类型
mounted
()
{
this
.
changePage
()
this
.
getCustomerFieldType
()
this
.
getDepartList
()
//获取部门
this
.
getFieldInputType
()
//输入类型
},
methods
:
{
changePage
()
{
this.apipost("/api/Scene/GetCustomerFiledList", {Enable: -1}, (res) => {
if (res.data.resultCode == 1) {
this.data = res.data.data
}
});
this
.
apipost
(
"/api/Scene/GetCustomerFiledList"
,
{
Enable
:
-
1
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
data
=
res
.
data
.
data
}
});
},
datadragEnd
(
e
)
{
let
olddragId
=
0
...
...
@@ -124,13 +129,11 @@
FiledId
:
dragId
,
SortFiledId
:
olddragId
,
}
this.apipost('/api/Scene/SetCustomerFiledState',msg,(res) => {
if (res.data.Code == 1) {
} else {//如果移动失败 重新获取列表
this
.
apipost
(
'/api/Scene/SetCustomerFiledState'
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{}
else
{
//如果移动失败 重新获取列表
this
.
changePage
()
}
})
},
getdata
(
e
)
{
this
.
dragId
=
e
.
draggedContext
.
element
.
Id
...
...
@@ -141,7 +144,7 @@
FiledId
:
item
.
Id
,
SortFiledId
:
0
,
}
this.apipost('/api/Scene/SetCustomerFiledState',
msg,
(res) => {
this
.
apipost
(
'/api/Scene/SetCustomerFiledState'
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{
this
.
$message
.
success
({
icon
:
'iconfont icon-chenggong'
,
...
...
@@ -151,13 +154,13 @@
position
:
'top'
})
this
.
changePage
()
} else {//如果移动失败 重新获取列表
}
else
{
//如果移动失败 重新获取列表
}
})
},
godelete
(
item
,
type
)
{
let
text
=
''
if (type == 1) {//tyep等于1和2的时候 先让弹出提示 然后再给予掉接口 所以把原本的值暂时先赋值给本身
if
(
type
==
1
)
{
//tyep等于1和2的时候 先让弹出提示 然后再给予掉接口 所以把原本的值暂时先赋值给本身
text
=
'确定修改启用状态'
if
(
item
.
Enable
==
2
)
{
item
.
Enable
=
1
...
...
@@ -190,7 +193,7 @@
});
},
getCustomerFieldType
()
{
this.apipost('/api/Scene/GetCustomerFieldTypeEnumList',
{},
(res) => {
this
.
apipost
(
'/api/Scene/GetCustomerFieldTypeEnumList'
,
{},
(
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{
this
.
tabsList
=
res
.
data
.
Data
this
.
tabsList
.
forEach
(
x
=>
{
...
...
@@ -205,7 +208,6 @@
},
goaddfield
()
{
this
.
Isadd
=
true
;
console.log('@vue/composition-api goaddfield', this.Isadd)
this
.
addMsg
=
{
Id
:
0
,
Type
:
1
,
...
...
@@ -232,14 +234,16 @@
}
},
getDepartList
()
{
this.apipost('/User/GetDeptTree',{ School_Id: 0 },(res) => {
this
.
apipost
(
'/User/GetDeptTree'
,
{
School_Id
:
0
},
(
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{
this
.
deptl
=
res
.
data
.
Data
}
})
},
getFieldInputType
()
{
this.apipost('/api/Scene/GetCustomerFieldInputTypeEnumList', {},(res) => {
this
.
apipost
(
'/api/Scene/GetCustomerFieldInputTypeEnumList'
,
{},
(
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{
this
.
checkboxList
=
res
.
data
.
Data
}
...
...
src/views/index.vue
View file @
3d2bd0ff
...
...
@@ -175,7 +175,7 @@
<p><span></span>
新建场景
</p>
<span
icon=
"el-icon-close"
></span>
</div>
<sceneBox
:LableType=
"LableType"
:sceneType=
"sceneType"
:sceneDataList=
"sceneDataList"
/>
<sceneBox
:LableType=
"LableType"
:sceneType=
"sceneType"
:sceneDataList=
"sceneDataList"
/>
</el-dialog>
<!-- 高级筛选修改 -->
<el-dialog
:visible
.
sync=
"sceneEditBoxShow"
:close-on-click-modal=
"false"
width=
"800px"
...
...
@@ -443,7 +443,7 @@
$this
.
sceneType
=
sceneType
;
$this
.
sceneDataList
=
sceneDataList
;
$this
.
sceneShow
=
true
;
});
this
.
MsgBus
.
$on
(
"sceneBoxClose"
,
function
()
{
$this
.
sceneShow
=
false
;
...
...
@@ -564,15 +564,18 @@
},
Employee
()
{
let
msg
=
{
RB_Group_id
:
this
.
userInfo
.
RB_Group_id
,
RB_Group_id
:
0
,
BranchId
:
-
1
,
DepartmentId
:
0
,
PostId
:
0
,
IsLeave
:
0
,
};
if
(
this
.
userInfo
&&
this
.
userInfo
.
RB_Group_id
)
{
msg
.
RB_Group_id
=
this
.
userInfo
.
RB_Group_id
;
}
this
.
apipost2
(
"admin_get_EmployeeGetList"
,
this
.
msg
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
EmployeeList
=
res
.
data
.
data
;
...
...
src/views/login.vue
View file @
3d2bd0ff
...
...
@@ -8,7 +8,11 @@
<div
class=
"head-icon"
>
<img
src=
"http://imgfile.oytour.com/Upload/User/636681352035115417.jpg"
/>
</div>
<div
class=
"publisher"
>
徐总
</div>
<div
class=
"publisher"
>
<template
v-if=
"groupModel&&groupModel.GroupName&&groupModel.GroupName!=''"
>
{{
groupModel
.
ContactPersion
}}
</
template
>
</div>
<div
class=
"job"
>
总经理
</div>
<div
class=
"content"
>
職場上成功者與失敗者最大的分別就是,前者找機會,後者找藉口,今日的你痛恨每天上班「度日如年」,將來的你會感激經歷過這一切,你練成了更強大的自己,玻璃心不再怕碎。
</div>
...
...
@@ -17,7 +21,11 @@
</el-carousel>
</div>
<div
class=
"right-card"
>
<div
class=
"company"
>
四川和平国际旅行社有限公司
</div>
<div
class=
"company"
>
<
template
v-if=
"groupModel&&groupModel.GroupName&&groupModel.GroupName!=''"
>
{{
groupModel
.
GroupName
}}
</
template
>
</div>
<div
class=
"t"
>
登录
</div>
<div
class=
"field_wrap"
>
<div
class=
"pwd_box"
>
...
...
@@ -90,6 +98,7 @@
pwd
:
""
,
isLogining
:
false
,
isAutoLogin
:
false
,
groupModel
:
{},
};
},
created
()
{
...
...
@@ -100,7 +109,28 @@
this
.
pwd
=
autoLogin
?
autoLogin
.
pwd
:
""
;
this
.
isAutoLogin
=
autoLogin
?
true
:
false
;
},
mounted
()
{
this
.
getGroup
();
},
methods
:
{
getGroup
()
{
//获取集团
let
Domain
=
window
.
location
.
hostname
;
if
(
this
.
isOnline
())
{
if
(
Domain
==
"fcrmyx.oytour.com"
)
{
Domain
=
"admin.oytour.com"
;
}
else
{
Domain
=
Domain
.
replace
(
"crm"
,
''
);
}
}
this
.
apipost2
(
'admin_get_GetModelByDomain'
,
{
'Domain'
:
Domain
},
res
=>
{
this
.
groupModel
=
res
.
data
.
data
;
if
(
this
.
groupModel
&&
this
.
groupModel
.
GroupName
&&
this
.
groupModel
.
GroupName
!=
''
)
{
document
.
title
=
"欢迎使用 "
+
this
.
groupModel
.
GroupName
+
" CRM系统"
;
}
},
err
=>
{})
},
goLogin
()
{
if
(
this
.
account
==
""
)
{
return
this
.
$message
({
...
...
@@ -121,13 +151,15 @@
};
if
(
!
this
.
isOnline
())
{
msg
.
Domain
=
"localhost"
;
}
else
{
let
currentDomain
=
window
.
location
.
hostname
;
msg
.
Domain
=
currentDomain
;
}
this
.
apipost
(
"/api/Login/UserLogin"
,
msg
,
(
res
)
=>
{
var
jsonData
=
res
.
data
;
if
(
jsonData
.
resultCode
==
1
)
{
//登录成功
let
autoLogin
=
this
.
isAutoLogin
?
{
let
autoLogin
=
this
.
isAutoLogin
?
{
acc
:
this
.
account
,
pwd
:
this
.
pwd
,
}
:
...
...
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