Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
薪
薪瑞通-前端
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
许珑标
薪瑞通-前端
Commits
cf089dbd
Commit
cf089dbd
authored
Jan 03, 2025
by
谢子梦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
名称-合同新增修改
parent
1aa6c479
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1928 additions
and
399 deletions
+1928
-399
.env.development
.env.development
+3
-3
.env.production
.env.production
+2
-2
.env.staging
.env.staging
+2
-2
package.json
package.json
+2
-2
src/layout/components/Sidebar/Logo.vue
src/layout/components/Sidebar/Logo.vue
+9
-4
src/views/business/component/paidUsers.vue
src/views/business/component/paidUsers.vue
+925
-0
src/views/business/component/staffForm.vue
src/views/business/component/staffForm.vue
+804
-0
src/views/business/outContract/index.vue
src/views/business/outContract/index.vue
+53
-93
src/views/business/outPersonal/index.vue
src/views/business/outPersonal/index.vue
+82
-226
src/views/login.vue
src/views/login.vue
+20
-31
src/views/register.vue
src/views/register.vue
+20
-31
vue.config.js
vue.config.js
+6
-5
No files found.
.env.development
View file @
cf089dbd
# 页面标题
# 页面标题
VUE_APP_TITLE =
NewStyle
VUE_APP_TITLE =
'薪瑞通'
# 开发环境配置
# 开发环境配置
ENV = 'development'
ENV = 'development'
#
NewStyle
/开发环境
#
薪瑞通
/开发环境
VUE_APP_BASE_API = 'http://
localhost
:8080/xrt'
VUE_APP_BASE_API = 'http://
192.168.31.195
:8080/xrt'
# 请求、响应数据加密
# 请求、响应数据加密
VUE_APP_AES_ENCRYPT_ENABLED = 'false'
VUE_APP_AES_ENCRYPT_ENABLED = 'false'
# 请求数据加密秘钥串
# 请求数据加密秘钥串
...
...
.env.production
View file @
cf089dbd
# 页面标题
# 页面标题
VUE_APP_TITLE =
NewStyle
VUE_APP_TITLE =
'薪瑞通'
# 生产环境配置
# 生产环境配置
ENV = 'production'
ENV = 'production'
#
NewStyle
/生产环境
#
薪瑞通
/生产环境
VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = '/prod-api'
# 请求、响应数据加密
# 请求、响应数据加密
VUE_APP_AES_ENCRYPT_ENABLED = 'false'
VUE_APP_AES_ENCRYPT_ENABLED = 'false'
...
...
.env.staging
View file @
cf089dbd
# 页面标题
# 页面标题
VUE_APP_TITLE =
NewStyle
VUE_APP_TITLE =
'薪瑞通'
NODE_ENV = production
NODE_ENV = production
# 测试环境配置
# 测试环境配置
ENV = 'staging'
ENV = 'staging'
#
NewStyle
/测试环境
#
薪瑞通
/测试环境
VUE_APP_BASE_API = '/stage-api'
VUE_APP_BASE_API = '/stage-api'
# 请求、响应数据加密
# 请求、响应数据加密
VUE_APP_AES_ENCRYPT_ENABLED = 'true'
VUE_APP_AES_ENCRYPT_ENABLED = 'true'
...
...
package.json
View file @
cf089dbd
{
{
"name"
:
"ruoyi-vue-web"
,
"name"
:
"ruoyi-vue-web"
,
"version"
:
"3.8.3"
,
"version"
:
"3.8.3"
,
"description"
:
"
NewStyle
"
,
"description"
:
"
薪瑞通
"
,
"author"
:
"Tellsea"
,
"author"
:
"Tellsea"
,
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
"scripts"
:
{
"scripts"
:
{
...
...
src/layout/components/Sidebar/Logo.vue
View file @
cf089dbd
<
template
>
<
template
>
<div
class=
"sidebar-logo-container"
:class=
"
{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<div
class=
"sidebar-logo-container"
:class=
"
{ 'collapse': collapse }"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<transition
name=
"sidebarLogoFade"
>
<transition
name=
"sidebarLogoFade"
>
<router-link
v-if=
"collapse"
key=
"collapse"
class=
"sidebar-logo-link"
to=
"/"
>
<router-link
v-if=
"collapse"
key=
"collapse"
class=
"sidebar-logo-link"
to=
"/"
>
<img
v-if=
"logo"
:src=
"logo"
class=
"sidebar-logo"
/>
<img
v-if=
"logo"
:src=
"logo"
class=
"sidebar-logo"
/>
<h1
v-else
class=
"sidebar-title"
:style=
"
{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">
{{
title
}}
</h1>
<h1
v-else
class=
"sidebar-title"
:style=
"
{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">
{{
title
}}
</h1>
</router-link>
</router-link>
<router-link
v-else
key=
"expand"
class=
"sidebar-logo-link"
to=
"/"
>
<router-link
v-else
key=
"expand"
class=
"sidebar-logo-link"
to=
"/"
>
<img
v-if=
"logo"
:src=
"logo"
class=
"sidebar-logo"
/>
<img
v-if=
"logo"
:src=
"logo"
class=
"sidebar-logo"
/>
<h1
class=
"sidebar-title"
:style=
"
{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">
{{
title
}}
</h1>
<h1
class=
"sidebar-title"
:style=
"
{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">
{{
title
}}
</h1>
</router-link>
</router-link>
</transition>
</transition>
</div>
</div>
...
@@ -35,7 +40,7 @@ export default {
...
@@ -35,7 +40,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
title
:
'
NewStyle
'
,
title
:
'
薪瑞通
'
,
logo
:
logoImg
logo
:
logoImg
}
}
}
}
...
...
src/views/business/component/paidUsers.vue
0 → 100644
View file @
cf089dbd
This diff is collapsed.
Click to expand it.
src/views/business/component/staffForm.vue
0 → 100644
View file @
cf089dbd
This diff is collapsed.
Click to expand it.
src/views/business/outContract/index.vue
View file @
cf089dbd
...
@@ -2,37 +2,24 @@
...
@@ -2,37 +2,24 @@
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"80px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"80px"
>
<el-form-item
label=
"合同名称"
prop=
"contractName"
>
<el-form-item
label=
"合同名称"
prop=
"contractName"
>
<el-input
<el-input
v-model=
"queryParams.contractName"
placeholder=
"请输入合同名称"
clearable
v-model=
"queryParams.contractName"
@
keyup.enter.native=
"handleQuery"
/>
placeholder=
"请输入合同名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"合同编号"
prop=
"contractCode"
>
<el-form-item
label=
"合同编号"
prop=
"contractCode"
>
<el-input
<el-input
v-model=
"queryParams.contractCode"
placeholder=
"请输入合同编号"
clearable
v-model=
"queryParams.contractCode"
@
keyup.enter.native=
"handleQuery"
/>
placeholder=
"请输入合同编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"单位名称"
prop=
"groupName"
>
<el-form-item
label=
"单位名称"
prop=
"groupName"
>
<el-input
<el-input
v-model=
"queryParams.groupName"
placeholder=
"请输入单位名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
v-model=
"queryParams.groupName"
placeholder=
"请输入单位名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"单位编码(社会信用代码)"
prop=
"groupCode"
>
-->
<!--
<el-form-item
label=
"单位编码(社会信用代码)"
prop=
"groupCode"
>
-->
<!--
<el-input-->
<!--
<el-input-->
<!-- v-model="queryParams.groupCode"-->
<!-- v-model="queryParams.groupCode"-->
<!-- placeholder="请输入单位编码(社会信用代码)"-->
<!-- placeholder="请输入单位编码(社会信用代码)"-->
<!-- clearable-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
</el-form-item>
-->
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
...
@@ -41,42 +28,20 @@
...
@@ -41,42 +28,20 @@
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
type=
"primary"
v-hasPermi=
"['business:outContract:add']"
>
新增
</el-button>
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['business:outContract:add']"
>
新增
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"success"
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
type=
"success"
v-hasPermi=
"['business:outContract:edit']"
>
修改
</el-button>
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['business:outContract:edit']"
>
修改
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
type=
"danger"
v-hasPermi=
"['business:outContract:remove']"
>
删除
</el-button>
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['business:outContract:remove']"
>
删除
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"warning"
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
type=
"warning"
v-hasPermi=
"['business:outContract:export']"
>
导出
</el-button>
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['business:outContract:export']"
>
导出
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -87,7 +52,7 @@
...
@@ -87,7 +52,7 @@
<el-table-column
label=
"合同编号"
align=
"center"
prop=
"contractCode"
fixed
/>
<el-table-column
label=
"合同编号"
align=
"center"
prop=
"contractCode"
fixed
/>
<el-table-column
label=
"单位名称"
align=
"center"
prop=
"groupName"
fixed
/>
<el-table-column
label=
"单位名称"
align=
"center"
prop=
"groupName"
fixed
/>
<el-table-column
label=
"单位信用代码"
align=
"center"
prop=
"groupCode"
/>
<el-table-column
label=
"单位信用代码"
align=
"center"
prop=
"groupCode"
/>
<el-table-column
label=
"五险一金承担方式"
align=
"center"
prop=
"bearType"
>
<el-table-column
label=
"五险一金承担方式"
align=
"center"
prop=
"bearType"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.bearType && 1 == scope.row.bearType"
>
各自承担
</el-tag>
<el-tag
v-if=
"scope.row.bearType && 1 == scope.row.bearType"
>
各自承担
</el-tag>
<el-tag
type=
"success"
v-if=
"scope.row.bearType && 2 == scope.row.bearType"
>
个人承担全部
</el-tag>
<el-tag
type=
"success"
v-if=
"scope.row.bearType && 2 == scope.row.bearType"
>
个人承担全部
</el-tag>
...
@@ -118,33 +83,20 @@
...
@@ -118,33 +83,20 @@
<el-table-column
label=
"公积金个人承担比例"
align=
"center"
prop=
"providentFundPersonalRate"
/>
<el-table-column
label=
"公积金个人承担比例"
align=
"center"
prop=
"providentFundPersonalRate"
/>
</el-table-column>
</el-table-column>
<el-table-column
label=
"管理费"
align=
"center"
prop=
"operationCost"
/>
<el-table-column
label=
"管理费"
align=
"center"
prop=
"operationCost"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width
"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"120px"
class-name=
"small-padding fixed-width"
fixed=
"right
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
size=
"mini"
v-hasPermi=
"['business:outContract:edit']"
>
修改
</el-button>
type=
"text"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
icon=
"el-icon-edit"
v-hasPermi=
"['business:outContract:remove']"
>
删除
</el-button>
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-user"
@
click=
"staffManage(scope.row)"
v-hasPermi=
"['business:outContract:edit']"
v-hasPermi=
"['business:outContract:manage']"
>
员工管理
</el-button>
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['business:outContract:remove']"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<pagination
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
v-show=
"total>0"
@
pagination=
"getList"
/>
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改发薪合同对话框 -->
<!-- 添加或修改发薪合同对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
...
@@ -373,9 +325,18 @@ export default {
...
@@ -373,9 +325,18 @@ export default {
};
};
},
},
created
()
{
created
()
{
},
mounted
()
{
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
/** 员工管理 */
staffManage
(
row
)
{
// console.log('表格数据', row);
this
.
$router
.
push
({
path
:
"
/business/payOutPersonal
"
,
query
:
{
id
:
row
.
id
,
name
:
row
.
contractName
}
});
},
/** 查询发薪合同列表 */
/** 查询发薪合同列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -435,24 +396,23 @@ export default {
...
@@ -435,24 +396,23 @@ export default {
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
//新方法
this
.
$router
.
push
({
path
:
"
/business/staffForm
"
});
return
// 原方法
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
添加发薪合同
"
;
this
.
title
=
"
添加发薪合同
"
;
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
let
id
=
row
.
id
||
this
.
ids
const
id
=
row
.
id
||
this
.
ids
this
.
$router
.
push
({
path
:
"
/business/staffForm
"
,
query
:
{
id
:
id
}
});
getOutContract
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改发薪合同
"
;
});
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
...
@@ -477,12 +437,12 @@ export default {
...
@@ -477,12 +437,12 @@ export default {
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'
是否确认删除发薪合同编号为"
'
+
ids
+
'
"的数据项?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'
是否确认删除发薪合同编号为"
'
+
ids
+
'
"的数据项?
'
).
then
(
function
()
{
return
delOutContract
(
ids
);
return
delOutContract
(
ids
);
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
();
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
},
},
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
...
...
src/views/business/outPersonal/index.vue
View file @
cf089dbd
This diff is collapsed.
Click to expand it.
src/views/login.vue
View file @
cf089dbd
<
template
>
<
template
>
<div
class=
"login"
>
<div
class=
"login"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
NewStyle
</h3>
<h3
class=
"title"
>
薪瑞通
</h3>
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"username"
>
<el-input
<el-input
v-model=
"loginForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
v-model=
"loginForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<el-input
<el-input
v-model=
"loginForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
v-model=
"loginForm.password"
@
keyup.enter.native=
"handleLogin"
>
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
@
keyup.enter.native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-input
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
v-model=
"loginForm.code"
@
keyup.enter.native=
"handleLogin"
>
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
@
keyup.enter.native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
<div
class=
"login-code"
>
<div
class=
"login-code"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-form-item
style=
"width:100%;"
>
<el-form-item
style=
"width:100%;"
>
<el-button
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
:loading=
"loading"
@
click.native.prevent=
"handleLogin"
>
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click.native.prevent=
"handleLogin"
>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-else
>
登 录 中...
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
</el-button>
...
@@ -97,7 +77,7 @@ export default {
...
@@ -97,7 +77,7 @@ export default {
},
},
watch
:
{
watch
:
{
$route
:
{
$route
:
{
handler
:
function
(
route
)
{
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
},
},
immediate
:
true
immediate
:
true
...
@@ -141,7 +121,7 @@ export default {
...
@@ -141,7 +121,7 @@ export default {
Cookies
.
remove
(
'
rememberMe
'
);
Cookies
.
remove
(
'
rememberMe
'
);
}
}
this
.
$store
.
dispatch
(
"
Login
"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$store
.
dispatch
(
"
Login
"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"
/
"
}).
catch
(()
=>
{
});
this
.
$router
.
push
({
path
:
this
.
redirect
||
"
/
"
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
...
@@ -164,6 +144,7 @@ export default {
...
@@ -164,6 +144,7 @@ export default {
background-image
:
url("../assets/images/login-background.jpg")
;
background-image
:
url("../assets/images/login-background.jpg")
;
background-size
:
cover
;
background-size
:
cover
;
}
}
.title
{
.title
{
margin
:
0px
auto
30px
auto
;
margin
:
0px
auto
30px
auto
;
text-align
:
center
;
text-align
:
center
;
...
@@ -175,32 +156,39 @@ export default {
...
@@ -175,32 +156,39 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
width
:
400px
;
width
:
400px
;
padding
:
25px
25px
5px
25px
;
padding
:
25px
25px
5px
25px
;
.el-input
{
.el-input
{
height
:
38px
;
height
:
38px
;
input
{
input
{
height
:
38px
;
height
:
38px
;
}
}
}
}
.input-icon
{
.input-icon
{
height
:
39px
;
height
:
39px
;
width
:
14px
;
width
:
14px
;
margin-left
:
2px
;
margin-left
:
2px
;
}
}
}
}
.login-tip
{
.login-tip
{
font-size
:
13px
;
font-size
:
13px
;
text-align
:
center
;
text-align
:
center
;
color
:
#bfbfbf
;
color
:
#bfbfbf
;
}
}
.login-code
{
.login-code
{
width
:
33%
;
width
:
33%
;
height
:
38px
;
height
:
38px
;
float
:
right
;
float
:
right
;
img
{
img
{
cursor
:
pointer
;
cursor
:
pointer
;
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
}
}
.el-login-footer
{
.el-login-footer
{
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
...
@@ -213,6 +201,7 @@ export default {
...
@@ -213,6 +201,7 @@ export default {
font-size
:
12px
;
font-size
:
12px
;
letter-spacing
:
1px
;
letter-spacing
:
1px
;
}
}
.login-code-img
{
.login-code-img
{
height
:
38px
;
height
:
38px
;
}
}
...
...
src/views/register.vue
View file @
cf089dbd
<
template
>
<
template
>
<div
class=
"register"
>
<div
class=
"register"
>
<el-form
ref=
"registerForm"
:model=
"registerForm"
:rules=
"registerRules"
class=
"register-form"
>
<el-form
ref=
"registerForm"
:model=
"registerForm"
:rules=
"registerRules"
class=
"register-form"
>
<h3
class=
"title"
>
NewStyle
</h3>
<h3
class=
"title"
>
薪瑞通
</h3>
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"username"
>
<el-input
v-model=
"registerForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
<el-input
v-model=
"registerForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<el-input
<el-input
v-model=
"registerForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
v-model=
"registerForm.password"
@
keyup.enter.native=
"handleRegister"
>
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
@
keyup.enter.native=
"handleRegister"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"confirmPassword"
>
<el-form-item
prop=
"confirmPassword"
>
<el-input
<el-input
v-model=
"registerForm.confirmPassword"
type=
"password"
auto-complete=
"off"
placeholder=
"确认密码"
v-model=
"registerForm.confirmPassword"
@
keyup.enter.native=
"handleRegister"
>
type=
"password"
auto-complete=
"off"
placeholder=
"确认密码"
@
keyup.enter.native=
"handleRegister"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-input
<el-input
v-model=
"registerForm.code"
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
v-model=
"registerForm.code"
@
keyup.enter.native=
"handleRegister"
>
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
@
keyup.enter.native=
"handleRegister"
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
<div
class=
"register-code"
>
<div
class=
"register-code"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"register-code-img"
/>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"register-code-img"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
style=
"width:100%;"
>
<el-form-item
style=
"width:100%;"
>
<el-button
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
:loading=
"loading"
@
click.native.prevent=
"handleRegister"
>
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click.native.prevent=
"handleRegister"
>
<span
v-if=
"!loading"
>
注 册
</span>
<span
v-if=
"!loading"
>
注 册
</span>
<span
v-else
>
注 册 中...
</span>
<span
v-else
>
注 册 中...
</span>
</el-button>
</el-button>
...
@@ -131,7 +111,7 @@ export default {
...
@@ -131,7 +111,7 @@ export default {
type
:
'
success
'
type
:
'
success
'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$router
.
push
(
"
/login
"
);
this
.
$router
.
push
(
"
/login
"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
...
@@ -154,6 +134,7 @@ export default {
...
@@ -154,6 +134,7 @@ export default {
background-image
:
url("../assets/images/login-background.jpg")
;
background-image
:
url("../assets/images/login-background.jpg")
;
background-size
:
cover
;
background-size
:
cover
;
}
}
.title
{
.title
{
margin
:
0px
auto
30px
auto
;
margin
:
0px
auto
30px
auto
;
text-align
:
center
;
text-align
:
center
;
...
@@ -165,32 +146,39 @@ export default {
...
@@ -165,32 +146,39 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
width
:
400px
;
width
:
400px
;
padding
:
25px
25px
5px
25px
;
padding
:
25px
25px
5px
25px
;
.el-input
{
.el-input
{
height
:
38px
;
height
:
38px
;
input
{
input
{
height
:
38px
;
height
:
38px
;
}
}
}
}
.input-icon
{
.input-icon
{
height
:
39px
;
height
:
39px
;
width
:
14px
;
width
:
14px
;
margin-left
:
2px
;
margin-left
:
2px
;
}
}
}
}
.register-tip
{
.register-tip
{
font-size
:
13px
;
font-size
:
13px
;
text-align
:
center
;
text-align
:
center
;
color
:
#bfbfbf
;
color
:
#bfbfbf
;
}
}
.register-code
{
.register-code
{
width
:
33%
;
width
:
33%
;
height
:
38px
;
height
:
38px
;
float
:
right
;
float
:
right
;
img
{
img
{
cursor
:
pointer
;
cursor
:
pointer
;
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
}
}
.el-register-footer
{
.el-register-footer
{
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
...
@@ -203,6 +191,7 @@ export default {
...
@@ -203,6 +191,7 @@ export default {
font-size
:
12px
;
font-size
:
12px
;
letter-spacing
:
1px
;
letter-spacing
:
1px
;
}
}
.register-code-img
{
.register-code-img
{
height
:
38px
;
height
:
38px
;
}
}
...
...
vue.config.js
View file @
cf089dbd
...
@@ -7,7 +7,7 @@ function resolve(dir) {
...
@@ -7,7 +7,7 @@ function resolve(dir) {
const
CompressionPlugin
=
require
(
'
compression-webpack-plugin
'
)
const
CompressionPlugin
=
require
(
'
compression-webpack-plugin
'
)
const
name
=
process
.
env
.
VUE_APP_TITLE
||
'
NewStyle
'
// 网页标题
const
name
=
process
.
env
.
VUE_APP_TITLE
||
'
薪瑞通
'
// 网页标题
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
80
// 端口
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
80
// 端口
...
@@ -35,7 +35,8 @@ module.exports = {
...
@@ -35,7 +35,8 @@ module.exports = {
proxy
:
{
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://localhost:8080`
,
// target: `http://localhost:8080`,
target
:
`http://192.168.31.195:8080`
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
[
'
^
'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
[
'
^
'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
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