Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
ln-medicalAppointment-pc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
孙海亮
ln-medicalAppointment-pc
Commits
994827de
Commit
994827de
authored
Dec 14, 2021
by
hailiang.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端分页
parent
b5f3de7c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
243 additions
and
216 deletions
+243
-216
combo.vue
src/views/flow/components/combo.vue
+4
-49
selectInstitution.vue
src/views/flow/components/selectInstitution.vue
+32
-19
index.vue
src/views/flow/index.vue
+31
-4
item.vue
src/views/index/components/item.vue
+100
-87
header.vue
src/views/layout/header.vue
+21
-19
index.vue
src/views/login/index.vue
+55
-38
No files found.
src/views/flow/components/combo.vue
View file @
994827de
<
template
>
<
template
>
<div
class=
"combo"
>
<div
class=
"combo"
>
<div
class=
"title"
>
<div
class=
"title"
><span
class=
"point"
></span>
请选择套餐
</div>
<span
class=
"point"
v-if=
"reservedInfo"
></span
>
{{
reservedInfo
.
chooseName
}}
</div>
<!-- v-if="combos.type === '1'" -->
<!-- v-if="combos.type === '1'" -->
<a-radio-group
class=
"items-radios"
v-model=
"chooseId"
@
change=
"onChange"
>
<a-radio-group
class=
"items-radios"
v-model=
"chooseId"
@
change=
"onChange"
>
<ul
class=
"items"
>
<ul
class=
"items"
>
...
@@ -57,49 +54,6 @@ export default {
...
@@ -57,49 +54,6 @@ export default {
return
{
return
{
chooseId
:
""
,
chooseId
:
""
,
chooseList
:
[],
chooseList
:
[],
// chkvalue: [],
// combos: {
// type: "2",
// items: [
// {
// id: 0,
// title: "21招商信诺-银保客户-豪华套餐女未婚",
// },
// {
// id: 1,
// title: "22招商信诺-银保客户-豪华套餐女未婚",
// },
// {
// id: 2,
// title: "23招商信诺-银保客户-豪华套餐女未婚",
// },
// {
// id: 3,
// title: "24招商信诺-银保客户-豪华套餐女未婚",
// },
// ],
// },
// combos2: {
// type: "1",
// items: [
// {
// value: 0,
// label: "21招商信诺-银保客户-豪华套餐女未婚",
// },
// {
// value: 1,
// label: "22招商信诺-银保客户-豪华套餐女未婚",
// },
// {
// value: 2,
// label: "23招商信诺-银保客户-豪华套餐女未婚",
// },
// {
// value: 3,
// label: "24招商信诺-银保客户-豪华套餐女未婚",
// },
// ],
// },
reservedInfo
:
[],
//可选择的体检套餐
reservedInfo
:
[],
//可选择的体检套餐
};
};
},
},
...
@@ -108,7 +62,7 @@ export default {
...
@@ -108,7 +62,7 @@ export default {
this
.
reservedInfo
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"
reservedInfo
"
));
this
.
reservedInfo
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"
reservedInfo
"
));
let
chooseList
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"
chooseList
"
));
let
chooseList
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"
chooseList
"
));
console
.
log
(
"
????
"
,
chooseList
,
this
.
reservedInfo
);
console
.
log
(
"
????
"
,
chooseList
,
this
.
reservedInfo
);
this
.
chooseId
=
chooseList
.
id
;
this
.
chooseId
=
chooseList
?
chooseList
[
0
].
id
:
""
;
this
.
chooseList
=
this
.
reservedInfo
.
chooseList
.
map
((
item
)
=>
{
this
.
chooseList
=
this
.
reservedInfo
.
chooseList
.
map
((
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
...
@@ -119,9 +73,10 @@ export default {
...
@@ -119,9 +73,10 @@ export default {
},
},
methods
:
{
methods
:
{
onChange
(
checkedValues
)
{
onChange
(
checkedValues
)
{
console
.
log
(
"
这个???
"
,
checkedValues
);
const
chooseList
=
[];
const
chooseList
=
[];
chooseList
.
push
({
chooseList
.
push
({
id
:
this
.
chooseId
,
id
:
this
.
chooseId
||
checkedValues
,
});
});
// 本地存储数据-选择的体检套餐
// 本地存储数据-选择的体检套餐
window
.
localStorage
.
setItem
(
"
chooseList
"
,
JSON
.
stringify
(
chooseList
));
window
.
localStorage
.
setItem
(
"
chooseList
"
,
JSON
.
stringify
(
chooseList
));
...
...
src/views/flow/components/selectInstitution.vue
View file @
994827de
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<a-select-option
<a-select-option
v-for=
"item in provinceList"
v-for=
"item in provinceList"
:key=
"item.id"
:key=
"item.id"
:value
=
"item.provinceCode"
v-model
=
"item.provinceCode"
>
{{
item
.
provinceName
}}
</a-select-option
>
{{
item
.
provinceName
}}
</a-select-option
>
>
</a-select>
</a-select>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<a-select-option
<a-select-option
v-for=
"item in cityList"
v-for=
"item in cityList"
:key=
"item.id"
:key=
"item.id"
:value
=
"item.cityCode"
v-model
=
"item.cityCode"
>
{{
item
.
cityName
}}
</a-select-option
>
{{
item
.
cityName
}}
</a-select-option
>
>
</a-select>
</a-select>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<a-select-option
<a-select-option
v-for=
"item in areaList"
v-for=
"item in areaList"
:key=
"item.id"
:key=
"item.id"
:value
=
"item.districtCode"
v-model
=
"item.districtCode"
>
{{
item
.
districtName
}}
</a-select-option
>
{{
item
.
districtName
}}
</a-select-option
>
>
</a-select>
</a-select>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
<div
class=
"type"
><span
class=
"point"
></span>
请选择服务中心
</div>
<div
class=
"type"
><span
class=
"point"
></span>
请选择服务中心
</div>
</div>
</div>
<ul
class=
"hospital_box"
v-if=
"isShowHospitalList"
>
<ul
class=
"hospital_box"
v-if=
"isShowHospitalList"
>
<li
v-for=
"(item, index) in
hospitalList
"
:key=
"index"
>
<li
v-for=
"(item, index) in
pageData
"
:key=
"index"
>
<div>
<div>
<p
class=
"top"
>
{{
item
.
checkUnitName
}}
</p>
<p
class=
"top"
>
{{
item
.
checkUnitName
}}
</p>
<p
class=
"bottom"
>
{{
item
.
address
}}
</p>
<p
class=
"bottom"
>
{{
item
.
address
}}
</p>
...
@@ -82,6 +82,15 @@
...
@@ -82,6 +82,15 @@
</li>
</li>
</ul>
</ul>
<div
v-else
class=
"hospital_none"
>
暂无可选分院
</div>
<div
v-else
class=
"hospital_none"
>
暂无可选分院
</div>
<a-pagination
style=
"text-align: right; position: relative; bottom: 10px"
v-if=
"hospitalList.length > 5"
v-model=
"current"
:pageSize=
"5"
:total=
"hospitalList.length"
show-less-items
@
change=
"pagechange"
/>
</div>
</div>
<div
class=
"mask"
v-if=
"datePickShow && showDatemask"
>
<div
class=
"mask"
v-if=
"datePickShow && showDatemask"
>
<reserve-date
<reserve-date
...
@@ -121,6 +130,8 @@ export default {
...
@@ -121,6 +130,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
pageData
:
[],
current
:
1
,
showDatemask
:
false
,
showDatemask
:
false
,
datePickShow
:
false
,
datePickShow
:
false
,
selectIndex
:
0
,
selectIndex
:
0
,
...
@@ -285,8 +296,8 @@ export default {
...
@@ -285,8 +296,8 @@ export default {
// 选择服务机构
// 选择服务机构
clickTab
(
index
,
id
)
{
clickTab
(
index
,
id
)
{
this
.
selectIndex
=
index
;
this
.
selectIndex
=
index
;
console
.
log
(
"
选择服务机构id
"
,
index
,
id
);
this
.
supplierIds
=
id
;
this
.
supplierIds
=
id
;
this
.
current
=
1
;
// 点击选择服务机构,显示该机构下的服务中心
// 点击选择服务机构,显示该机构下的服务中心
this
.
getShopByDistrictCode
();
this
.
getShopByDistrictCode
();
},
},
...
@@ -309,14 +320,29 @@ export default {
...
@@ -309,14 +320,29 @@ export default {
if
(
res
.
returnCode
===
"
0000
"
)
{
if
(
res
.
returnCode
===
"
0000
"
)
{
this
.
isShowHospitalList
=
true
;
this
.
isShowHospitalList
=
true
;
this
.
hospitalList
=
res
.
content
;
this
.
hospitalList
=
res
.
content
;
console
.
log
(
"
数量
"
,
this
.
hospitalList
);
console
.
log
(
"
total
"
);
if
(
res
.
content
.
length
>
5
)
{
this
.
pagechange
(
1
,
5
);
}
else
{
this
.
pageData
=
res
.
content
;
}
console
.
log
(
"
根据服务机构-获取服务中心列表=
"
,
this
.
hospitalList
);
console
.
log
(
"
根据服务机构-获取服务中心列表=
"
,
this
.
hospitalList
);
}
else
{
}
else
{
this
.
hospitalList
=
0
;
this
.
isShowHospitalList
=
false
;
this
.
isShowHospitalList
=
false
;
// this.$message.error(res.returnMsg)
// this.$message.error(res.returnMsg)
}
}
});
});
},
},
// 分页
pagechange
(
current
,
size
)
{
var
skipNum
=
(
current
-
1
)
*
size
;
this
.
pageData
=
skipNum
+
size
>=
this
.
hospitalList
.
length
?
this
.
hospitalList
.
slice
(
skipNum
,
this
.
hospitalList
.
length
)
:
this
.
hospitalList
.
slice
(
skipNum
,
skipNum
+
size
);
},
// 打开日期弹框
// 打开日期弹框
openDatePicker
(
item
)
{
openDatePicker
(
item
)
{
if
(
item
.
isDisabled
)
{
if
(
item
.
isDisabled
)
{
...
@@ -349,15 +375,6 @@ export default {
...
@@ -349,15 +375,6 @@ export default {
payList
:
[],
payList
:
[],
supplierId
:
this
.
supplierId
,
//供应商id
supplierId
:
this
.
supplierId
,
//供应商id
hospitalId
:
this
.
hospitalId
,
//医院id
hospitalId
:
this
.
hospitalId
,
//医院id
// checkUnitCode: '2152',
// chooseList: [{ id: 1069 }],
// customerId: 56418,
// dataSource: 'M',
// hospitalId: 2152,
// payList: [],
// serviceDate: '20211127',
// servicepackageId: 1043,
// supplierId: 1007,
};
};
console
.
log
(
"
立即预约=
"
,
query
);
console
.
log
(
"
立即预约=
"
,
query
);
...
@@ -368,12 +385,8 @@ export default {
...
@@ -368,12 +385,8 @@ export default {
okText
:
"
确认
"
,
okText
:
"
确认
"
,
cancelText
:
"
取消
"
,
cancelText
:
"
取消
"
,
onOk
()
{
onOk
()
{
// return new Promise((resolve, reject) => {
// setTimeout(Math.random() > 0.5 ? resolve : reject, 1000)
// }).catch(() => console.log('Oops errors!'))
api
.
addAppointment
(
query
).
then
((
res
)
=>
{
api
.
addAppointment
(
query
).
then
((
res
)
=>
{
if
(
res
.
returnCode
===
"
0000
"
)
{
if
(
res
.
returnCode
===
"
0000
"
)
{
console
.
log
(
"
立即预约=
"
,
res
);
_this
.
$message
.
success
(
"
预约成功
"
);
_this
.
$message
.
success
(
"
预约成功
"
);
_this
.
appointmentId
=
res
.
content
;
_this
.
appointmentId
=
res
.
content
;
// 提示预约成功,之后跳转到预约详情页面
// 提示预约成功,之后跳转到预约详情页面
...
...
src/views/flow/index.vue
View file @
994827de
...
@@ -14,7 +14,10 @@
...
@@ -14,7 +14,10 @@
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
婚姻状况
</span>
<span
class=
"label"
>
婚姻状况
</span>
<a-radio-group
v-model=
"customerInfo.maritalStatus"
>
<a-radio-group
v-model=
"customerInfo.maritalStatus"
:disabled=
"!state.edit"
>
<a-radio
value=
"01"
>
未婚
</a-radio>
<a-radio
value=
"01"
>
未婚
</a-radio>
<a-radio
value=
"02"
>
已婚
</a-radio>
<a-radio
value=
"02"
>
已婚
</a-radio>
</a-radio-group>
</a-radio-group>
...
@@ -25,7 +28,12 @@
...
@@ -25,7 +28,12 @@
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
手机号码:
</span>
<span
class=
"label"
>
手机号码:
</span>
<a-input
:value=
"customerInfo.phone"
/>
<a-input
v-model=
"customerInfo.phone"
:disabled=
"!state.edit"
:maxLength=
"11"
@
input=
"phonechange"
/>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<span
class=
"label"
>
出生日期:
</span>
<span
class=
"label"
>
出生日期:
</span>
...
@@ -36,7 +44,10 @@
...
@@ -36,7 +44,10 @@
</div>
</div>
</div>
</div>
<div
class=
"reset"
>
<div
class=
"reset"
>
<a-button
type=
"primary"
@
click=
"onSubmit"
>
点击修改
</a-button>
<a-button
type=
"primary"
@
click=
"edit"
v-if=
"!state.edit"
>
点击修改
</a-button
>
<a-button
type=
"primary"
@
click=
"onSubmit"
v-else
>
确认修改
</a-button>
</div>
</div>
</div>
</div>
...
@@ -68,6 +79,11 @@ export default {
...
@@ -68,6 +79,11 @@ export default {
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
state
:
{
edit
:
false
,
text1
:
"
点击修改
"
,
text2
:
"
确认修改
"
,
},
next
:
false
,
next
:
false
,
previous
:
false
,
previous
:
false
,
id
:
""
,
//客户id
id
:
""
,
//客户id
...
@@ -87,9 +103,11 @@ export default {
...
@@ -87,9 +103,11 @@ export default {
const
{
id
}
=
this
.
$route
.
query
;
const
{
id
}
=
this
.
$route
.
query
;
this
.
id
=
id
;
this
.
id
=
id
;
this
.
getCustomerDetail
();
//客户信息
this
.
getCustomerDetail
();
//客户信息
console
.
log
(
"
xxxxx
"
);
},
},
methods
:
{
methods
:
{
phonechange
()
{
this
.
customerInfo
.
phone
=
this
.
customerInfo
.
phone
.
replace
(
/
[^\d]
/g
,
""
);
},
nextStep
()
{
nextStep
()
{
this
.
previous
=
true
;
this
.
previous
=
true
;
this
.
next
=
false
;
this
.
next
=
false
;
...
@@ -115,6 +133,9 @@ export default {
...
@@ -115,6 +133,9 @@ export default {
}
}
});
});
},
},
edit
()
{
this
.
state
.
edit
=
true
;
},
// "立即修改"
// "立即修改"
onSubmit
()
{
onSubmit
()
{
const
{
name
,
idType
,
sex
,
idNo
,
phone
,
birthDate
,
maritalStatus
}
=
const
{
name
,
idType
,
sex
,
idNo
,
phone
,
birthDate
,
maritalStatus
}
=
...
@@ -130,10 +151,16 @@ export default {
...
@@ -130,10 +151,16 @@ export default {
birthDate
,
birthDate
,
maritalStatus
,
maritalStatus
,
};
};
// 校验手机长度
if
(
this
.
customerInfo
.
phone
.
length
<
11
)
{
this
.
$message
.
info
(
"
请输入正确的手机号码以确保后续接收短信提醒,谢谢
"
);
return
;
}
api
.
improveInformation
(
query
).
then
((
res
)
=>
{
api
.
improveInformation
(
query
).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
if
(
res
.
returnCode
==
"
0000
"
)
{
// 提交成功之后,提示成功信息,关闭"个人信息填写弹窗",并刷新当前页面
// 提交成功之后,提示成功信息,关闭"个人信息填写弹窗",并刷新当前页面
this
.
$message
.
success
(
"
修改信息成功
"
);
this
.
$message
.
success
(
"
修改信息成功
"
);
this
.
state
.
edit
=
false
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// 刷新列表
// 刷新列表
this
.
getCustomerDetail
();
this
.
getCustomerDetail
();
...
...
src/views/index/components/item.vue
View file @
994827de
...
@@ -5,15 +5,23 @@
...
@@ -5,15 +5,23 @@
<span
class=
"point"
></span>
{{
item
.
servicepackageName
}}
<span
class=
"point"
></span>
{{
item
.
servicepackageName
}}
</div>
</div>
<!-- $router.push(item.fileList[0]&&item.fileList[0].url) -->
<!-- $router.push(item.fileList[0]&&item.fileList[0].url) -->
<div
class=
"detail"
>
<div
class=
"detail"
@
click=
"openModel"
>
<img
:src=
"eyes"
alt=
""
@
click=
"openModel"
/>
点击查看服务套餐详情
<img
:src=
"eyes"
alt=
""
/>
点击查看服务套餐详情
<!--
{{
item
.
fileList
[
0
].
url
}}
-->
<!--
{{
item
.
fileList
[
0
].
url
}}
-->
</div>
</div>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<a-button
v-if=
"listType == 2"
style=
"background: #ffcc00; color: white; border: none; width: 86px"
<a-button
@
click=
"handleReadDetail"
>
查看
</a-button>
v-if=
"listType == 2"
<a-button
v-else
style=
"background: #3f7ffb; color: white; border: none; width: 86px"
@
click=
"handleSubmit"
>
立即预约
style=
"background: #ffcc00; color: white; border: none; width: 86px"
@
click=
"handleReadDetail"
>
查看
</a-button
>
<a-button
v-else
style=
"background: #3f7ffb; color: white; border: none; width: 86px"
@
click=
"handleSubmit"
>
立即预约
</a-button>
</a-button>
<div
class=
"date"
>
<div
class=
"date"
>
{{
{{
...
@@ -24,13 +32,17 @@
...
@@ -24,13 +32,17 @@
</div>
</div>
</div>
</div>
<a-modal
v-model=
"visible"
width=
"1000px"
:footer=
"null"
>
<a-modal
v-model=
"visible"
width=
"1000px"
:footer=
"null"
>
<img
style=
"width: 100%; padding: 20px 20px"
:src=
"item.fileList[0] && item.fileList[0].url"
alt=
""
/>
<img
style=
"width: 100%; padding: 20px 20px"
:src=
"item.fileList[0] && item.fileList[0].url"
alt=
""
/>
</a-modal>
</a-modal>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"
item
"
,
name
:
"
item
"
,
components
:
{},
components
:
{},
props
:
{
props
:
{
...
@@ -44,7 +56,7 @@
...
@@ -44,7 +56,7 @@
},
},
item
:
{
item
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
},
default
:
()
=>
{
},
},
},
},
},
data
()
{
data
()
{
...
@@ -79,14 +91,15 @@
...
@@ -79,14 +91,15 @@
});
});
},
},
openModel
()
{
openModel
()
{
this
.
visible
=
true
console
.
log
(
"
什么问题?
"
);
}
this
.
visible
=
true
;
},
},
};
},
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.item {
.item {
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
background: #fafafa;
background: #fafafa;
...
@@ -125,5 +138,5 @@
...
@@ -125,5 +138,5 @@
}
}
}
}
}
}
}
}
</
style
>
</
style
>
src/views/layout/header.vue
View file @
994827de
...
@@ -12,34 +12,36 @@
...
@@ -12,34 +12,36 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Cookies
from
'
js-cookie
'
import
Cookies
from
"
js-cookie
"
;
export
default
{
export
default
{
name
:
"
Header
"
,
name
:
"
Header
"
,
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
logoImg
:
require
(
"
@/assets/imgs/login/logo.png
"
)
,
logoImg
:
""
,
logout
:
require
(
"
@/assets/imgs/login/logout.png
"
),
logout
:
require
(
"
@/assets/imgs/login/logout.png
"
),
};
};
},
},
created
()
{
console
.
log
(
"
sssss
"
,
this
.
$route
);
this
.
logoImg
=
this
.
$route
.
query
.
logo
;
},
methods
:
{
methods
:
{
logoutEvt
()
{
logoutEvt
()
{
this
.
$confirm
({
this
.
$confirm
({
title
:
'
提示
'
,
title
:
"
提示
"
,
content
:
'
退出登录
'
,
content
:
"
退出登录
"
,
okText
:
'
确认
'
,
okText
:
"
确认
"
,
cancelText
:
'
取消
'
,
cancelText
:
"
取消
"
,
onOk
:
()
=>
{
onOk
:
()
=>
{
Cookies
.
remove
(
'
JSESSIONID
'
);
Cookies
.
remove
(
"
JSESSIONID
"
);
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/login
'
path
:
"
/login
"
,
})
});
},
onCancel
:
()
=>
{},
});
},
},
onCancel
:
()
=>
{
}
})
}
},
},
};
};
</
script
>
</
script
>
...
...
src/views/login/index.vue
View file @
994827de
...
@@ -32,9 +32,13 @@
...
@@ -32,9 +32,13 @@
],
],
},
},
]"
]"
:placeholder=
'userNameHolder'
:placeholder=
"userNameHolder"
>
>
<a-icon
slot=
"prefix"
type=
"user"
style=
"color: rgba(0, 0, 0, 0.25)"
/>
<a-icon
slot=
"prefix"
type=
"user"
style=
"color: rgba(0, 0, 0, 0.25)"
/>
</a-input>
</a-input>
</a-form-item>
</a-form-item>
<a-form-item>
<a-form-item>
...
@@ -53,18 +57,27 @@
...
@@ -53,18 +57,27 @@
type="password"
type="password"
:placeholder="passwordHolder"
:placeholder="passwordHolder"
>
>
<a-icon
slot=
"prefix"
type=
"lock"
style=
"color: rgba(0, 0, 0, 0.25)"
/>
<a-icon
slot=
"prefix"
type=
"lock"
style=
"color: rgba(0, 0, 0, 0.25)"
/>
</a-input>
</a-input>
</a-form-item>
</a-form-item>
<a-form-item>
<a-form-item>
<!-- :disabled="isSub" -->
<!-- :disabled="isSub" -->
<a-button
type=
"primary"
html-type=
"submit"
class=
"login-form-button"
>
登陆
</a-button>
<a-button
type=
"primary"
html-type=
"submit"
class=
"login-form-button"
>
登陆
</a-button
>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div
class=
"concat"
>
<div
class=
"concat"
>
<!-- 如果遇到操作问题,请拨打椋鸟健康热线
<!-- 如果遇到操作问题,请拨打椋鸟健康热线
<span
class=
"code"
>
400-820-6523
</span>
-->
<span
class=
"code"
>
400-820-6523
</span>
-->
<img
:src=
"downImg"
alt=
""
>
<img
:src=
"downImg"
alt=
""
/
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -79,14 +92,14 @@ export default {
...
@@ -79,14 +92,14 @@ export default {
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
logo
:
""
,
logo
:
""
,
left
:
require
(
"
../../assets/imgs/login/left-bg.png
"
),
left
:
require
(
"
../../assets/imgs/login/left-bg.png
"
),
downImg
:
''
,
downImg
:
""
,
isSub
:
true
,
isSub
:
true
,
passwordHolder
:
""
,
passwordHolder
:
""
,
userNameHolder
:
""
,
userNameHolder
:
""
,
fields
:[],
fields
:
[],
loading
:
false
//是否显示loading
loading
:
false
,
//是否显示loading
};
};
},
},
beforeCreate
()
{
beforeCreate
()
{
...
@@ -103,7 +116,8 @@ export default {
...
@@ -103,7 +116,8 @@ export default {
isNumber
(
val
)
{
isNumber
(
val
)
{
//判断是否是数字
//判断是否是数字
var
regPos
=
/^
\d
+
(\.\d
+
)?
$/
;
//非负浮点数
var
regPos
=
/^
\d
+
(\.\d
+
)?
$/
;
//非负浮点数
var
regNeg
=
/^
(
-
(([
0-9
]
+
\.[
0-9
]
*
[
1-9
][
0-9
]
*
)
|
([
0-9
]
*
[
1-9
][
0-9
]
*
\.[
0-9
]
+
)
|
([
0-9
]
*
[
1-9
][
0-9
]
*
)))
$/
;
//负浮点数
var
regNeg
=
/^
(
-
(([
0-9
]
+
\.[
0-9
]
*
[
1-9
][
0-9
]
*
)
|
([
0-9
]
*
[
1-9
][
0-9
]
*
\.[
0-9
]
+
)
|
([
0-9
]
*
[
1-9
][
0-9
]
*
)))
$/
;
//负浮点数
if
(
regPos
.
test
(
val
)
&&
regNeg
.
test
(
val
))
{
if
(
regPos
.
test
(
val
)
&&
regNeg
.
test
(
val
))
{
return
true
;
return
true
;
}
else
{
}
else
{
...
@@ -116,22 +130,24 @@ export default {
...
@@ -116,22 +130,24 @@ export default {
},
},
getLoginConfigFn
()
{
getLoginConfigFn
()
{
const
query
=
{
const
query
=
{
id
:
"
1002
"
//暂时写死的
id
:
"
1002
"
,
//暂时写死的
};
};
api
.
getLoginConfig
(
query
).
then
(
res
=>
{
api
.
getLoginConfig
(
query
).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
'
0000
'
){
//logo 配置
if
(
res
.
returnCode
==
"
0000
"
)
{
if
(
res
.
content
.
loginUp
&&
res
.
content
.
loginUp
[
0
]){
//logo 配置
this
.
logo
=
res
.
content
.
loginUp
[
0
].
url
if
(
res
.
content
.
loginUp
&&
res
.
content
.
loginUp
[
0
])
{
this
.
logo
=
res
.
content
.
loginUp
[
0
].
url
this
.
logo
=
res
.
content
.
loginUp
[
0
].
url
;
this
.
logo
=
res
.
content
.
loginUp
[
0
].
url
;
}
}
if
(
res
.
content
.
loginDown
&&
res
.
content
.
loginDown
[
0
]){
//电话说明配置
if
(
res
.
content
.
loginDown
&&
res
.
content
.
loginDown
[
0
])
{
this
.
downImg
=
res
.
content
.
loginDown
[
0
].
url
//电话说明配置
this
.
downImg
=
res
.
content
.
loginDown
[
0
].
url
;
}
}
if
(
res
.
content
.
lnhConfigs
)
{
if
(
res
.
content
.
lnhConfigs
)
{
let
lnhConfigs
=
res
.
content
.
lnhConfigs
let
lnhConfigs
=
res
.
content
.
lnhConfigs
;
this
.
fields
=
lnhConfigs
this
.
fields
=
lnhConfigs
;
this
.
userNameHolder
=
`请输入`
+
lnhConfigs
[
0
].
remark
this
.
userNameHolder
=
`请输入`
+
lnhConfigs
[
0
].
remark
;
this
.
passwordHolder
=
`请输入`
+
lnhConfigs
[
1
].
remark
this
.
passwordHolder
=
`请输入`
+
lnhConfigs
[
1
].
remark
;
}
}
}
}
});
});
...
@@ -147,16 +163,16 @@ export default {
...
@@ -147,16 +163,16 @@ export default {
{
{
fieldName
:
this
.
fields
[
0
].
remark
,
fieldName
:
this
.
fields
[
0
].
remark
,
value
:
values
.
userName
,
value
:
values
.
userName
,
field
:
this
.
fields
[
0
].
field
field
:
this
.
fields
[
0
].
field
,
},
},
{
{
fieldName
:
this
.
fields
[
1
].
remark
,
fieldName
:
this
.
fields
[
1
].
remark
,
value
:
values
.
password
,
value
:
values
.
password
,
field
:
this
.
fields
[
1
].
field
field
:
this
.
fields
[
1
].
field
,
}
}
,
]
]
,
};
};
api
.
userLogin
(
query
).
then
(
res
=>
{
api
.
userLogin
(
query
).
then
(
(
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
returnCode
==
"
0000
"
)
{
if
(
res
.
returnCode
==
"
0000
"
)
{
console
.
log
(
"
登陆成功
"
);
console
.
log
(
"
登陆成功
"
);
...
@@ -167,8 +183,9 @@ export default {
...
@@ -167,8 +183,9 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
Index
"
,
name
:
"
Index
"
,
query
:
{
query
:
{
id
:
res
.
content
.
id
id
:
res
.
content
.
id
,
}
logo
:
this
.
logo
,
},
});
});
},
1000
);
},
1000
);
}
else
{
}
else
{
...
@@ -178,8 +195,8 @@ export default {
...
@@ -178,8 +195,8 @@ export default {
console
.
log
(
"
Received values of form:
"
,
values
);
console
.
log
(
"
Received values of form:
"
,
values
);
}
}
});
});
}
}
,
}
}
,
};
};
</
script
>
</
script
>
...
@@ -191,7 +208,7 @@ export default {
...
@@ -191,7 +208,7 @@ export default {
.header {
.header {
padding: 2.5px 21.5px;
padding: 2.5px 21.5px;
background: rgba(225, 225, 225, 0.32);
background: rgba(225, 225, 225, 0.32);
img{
img
{
width: 70px;
width: 70px;
height: 50px;
height: 50px;
}
}
...
@@ -257,7 +274,7 @@ export default {
...
@@ -257,7 +274,7 @@ export default {
.code {
.code {
color: #3f7ffb;
color: #3f7ffb;
}
}
img{
img
{
width: 100%;
width: 100%;
}
}
}
}
...
...
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