Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
scanmanage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yyh
scanmanage
Commits
f1cb05cf
提交
f1cb05cf
authored
9月 16, 2021
作者:
zwh
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'zwh' 到 'master'
zwh 查看合并请求
!1
上级
9827ad00
9a080546
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
145 行增加
和
97 行删除
+145
-97
services.js
src/axios/services.js
+22
-4
addNew.vue
src/views/addNew.vue
+107
-92
home.vue
src/views/home.vue
+0
-0
layout.vue
src/views/layout.vue
+2
-1
login.vue
src/views/login.vue
+14
-0
没有找到文件。
src/axios/services.js
浏览文件 @
f1cb05cf
import
axios
from
'./axios'
;
import
axios
from
'./axios'
;
import
url
from
'./index'
;
//
import url from './index';
const
server
=
{
const
server
=
{
login
(
data
)
{
//科协组织数据分布
login
(
data
)
{
// 登录
return
axios
(
'/auth/login'
,
{
return
axios
(
'/auth/login'
,
{
method
:
'post'
,
method
:
'post'
,
data
data
})
})
},
},
acRandom
()
{
//科协组织数据分布
acRandom
(
data
)
{
// 激活码
return
axios
(
'/sacs/ac/random?companyId=1&mac=1&sysName=1'
,
{
return
axios
(
`/ac/random?companyId=
${
data
.
companyId
}
&mac=
${
data
.
mac
}
&sysName=
${
data
.
sysName
}
`
,
{
method
:
'get'
method
:
'get'
})
})
},
},
companyInfo
(
data
)
{
// 获取单位信息
return
axios
(
`/company?id=
${
data
}
`
,
{
data
,
method
:
'get'
})
},
getNum
(
data
)
{
return
axios
(
`/ac/nums?companyId=
${
data
}
`
,
{
data
,
method
:
'get'
})
},
getList
(
data
)
{
return
axios
(
`/ac/acCode?companyId=
${
data
.
companyId
}
&page=
${
data
.
page
}
&size=
${
data
.
size
}
&mac=
${
data
.
mac
}
`
,
{
data
,
method
:
'get'
})
}
}
}
export
default
server
;
export
default
server
;
src/views/addNew.vue
浏览文件 @
f1cb05cf
...
@@ -5,20 +5,38 @@
...
@@ -5,20 +5,38 @@
<div
class=
"title-name"
>
基本信息
</div>
<div
class=
"title-name"
>
基本信息
</div>
</div>
</div>
<div
class=
"form-size"
>
<div
class=
"form-size"
>
<el-form
ref=
"rulesForm"
label-position=
"right"
:rules=
"rules"
:model=
"rulesForm"
label-width=
"160px"
>
<el-form
<el-form-item
label=
"所在单位/公司:"
prop=
"adviceName"
>
ref=
"rulesForm"
label-position=
"right"
:rules=
"rules"
:model=
"rulesForm"
label-width=
"160px"
>
<el-form-item
label=
"所在单位/公司:"
prop=
"company"
>
<div
class=
"input-size"
>
<div
class=
"input-size"
>
<el-input
v-model=
"rulesForm.adviceName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"rulesForm.company"
placeholder=
"请输入"
:disabled=
"true"
></el-input>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"公司电话:"
prop=
"adviceName
"
>
<el-form-item
label=
"公司电话:"
prop=
"companytel
"
>
<div
class=
"input-size"
>
<div
class=
"input-size"
>
<el-input
v-model=
"rulesForm.adviceName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"rulesForm.companytel"
placeholder=
"请输入"
:disabled=
"true"
></el-input>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"联系人:"
prop=
"adviceName
"
>
<el-form-item
label=
"联系人:"
prop=
"person
"
>
<div
class=
"input-size"
>
<div
class=
"input-size"
>
<el-input
v-model=
"rulesForm.adviceName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"rulesForm.person"
:disabled=
"true"
placeholder=
"请输入"
></el-input>
</div>
</div>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"公司所在地:"
prop=
"adviceName"
>
<!--
<el-form-item
label=
"公司所在地:"
prop=
"adviceName"
>
...
@@ -48,97 +66,95 @@
...
@@ -48,97 +66,95 @@
</el-select>
</el-select>
</div>
</div>
</el-form-item>
-->
</el-form-item>
-->
<el-form-item
label=
"详细地址:"
prop=
"remark
s"
>
<el-form-item
label=
"详细地址:"
prop=
"adres
s"
>
<div
class=
"input-size"
>
<div
class=
"input-size"
>
<el-input
v-model=
"rulesForm.remarks"
placeholder=
"请输入标题"
></el-input>
<el-input
v-model=
"rulesForm.address"
:disabled=
"true"
placeholder=
"请输入标题"
></el-input>
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
<div
class=
"bottom-btn"
>
<!--
<div
class=
"bottom-btn"
>
<div
class=
"cancel"
>
取消
</div>
<div
class=
"cancel"
>
取消
</div>
<div
class=
"submit"
>
确定
</div>
<div
class=
"submit"
>
确定
</div>
</div
>
</div>
--
>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
getMap
from
'../utils/map'
import
getMap
from
"../utils/map"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
rulesForm
:{
"adviceName"
:
""
,
rulesForm
:
{
"advicePerson"
:
""
,
address
:
""
,
province
:
''
,
company
:
""
,
city
:
''
,
companytel
:
""
,
areaName
:
''
,
person
:
""
,
"adviceUnit"
:
""
,
"content"
:
""
,
"periods"
:
""
,
"publicationDate"
:
""
,
"remarks"
:
""
},
rules
:
{
adviceName
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
],
publicationDate
:
[
{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}
],
content
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
],
advicePerson
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
],
adviceUnit
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
],
periods
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
]
},
},
city2
:[],
rules
:
{
province2
:[
],
address
:
[{
message
:
"请输入地址"
,
trigger
:
"change"
}
],
areaName2
:[]
company
:
[{
required
:
true
,
message
:
"请选择"
,
trigger
:
"change"
}],
companytel
:
[{
required
:
true
,
message
:
"请输入"
,
trigger
:
"change"
}],
}
person
:
[{
required
:
true
,
message
:
"请输入"
,
trigger
:
"change"
}],
},
},
methods
:{
city2
:
[],
changeProvince
(
pro
){
// province2: [],
this
.
city2
=
getMap
.
getCity
(
pro
)
// areaName2: [],
this
.
rulesForm
.
city
=
""
};
this
.
rulesForm
.
areaName
=
""
},
},
changeCity
(
pro
,
cy
){
beforeCreate
(){
this
.
areaName2
=
getMap
.
getArea
(
pro
,
cy
)
this
.
$server
.
companyInfo
(
localStorage
.
getItem
(
'id'
)).
then
(
res
=>
{
this
.
rulesForm
.
areaName
=
""
if
(
res
.
status
===
200
){
this
.
rulesForm
.
address
=
res
.
data
.
address
this
.
rulesForm
.
company
=
res
.
data
.
name
this
.
rulesForm
.
companytel
=
res
.
data
.
tel
this
.
rulesForm
.
person
=
res
.
data
.
contactPerson
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
},
submit
(){
methods
:
{
// changeProvince(pro) {
// this.city2 = getMap.getCity(pro);
// this.rulesForm.city = "";
// this.rulesForm.areaName = "";
// },
// changeCity(pro, cy) {
// this.areaName2 = getMap.getArea(pro, cy);
// this.rulesForm.areaName = "";
// },
submit
()
{
this
.
$refs
[
"rulesForm"
].
validate
((
valid
)
=>
{
this
.
$refs
[
"rulesForm"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
$axios
.
edit
(
this
.
rulesForm
).
then
(
res
=>
{
this
.
$axios
sessionStorage
.
setItem
(
"add"
,
1
)
.
edit
(
this
.
rulesForm
)
this
.
$message
.
success
(
"操作成功"
)
.
then
((
res
)
=>
{
this
.
$router
.
back
()
sessionStorage
.
setItem
(
"add"
,
1
);
}).
catch
(
err
=>
{
this
.
$message
.
success
(
"操作成功"
);
this
.
$router
.
back
();
})
})
}
else
{
.
catch
((
err
)
=>
{});
return
false
}
else
{
return
false
;
}
}
})
});
},
},
cancel
(){
// cancel() {
sessionStorage
.
setItem
(
"add"
,
1
)
// sessionStorage.setItem("add", 1);
this
.
$router
.
back
()
// this.$router.back();
// },
},
},
},
// mounted() {
mounted
(){
// this.province2 = getMap.getProvince();
this
.
province2
=
getMap
.
getProvince
()
// },
}
};
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.content-add{
.content-add
{
width: 100%;
width: 100%;
height: 100%;
height: 100%;
box-sizing: border-box;
box-sizing: border-box;
...
@@ -150,41 +166,41 @@ export default {
...
@@ -150,41 +166,41 @@ export default {
font-weight: normal;
font-weight: normal;
font-stretch: normal;
font-stretch: normal;
letter-spacing: 0px;
letter-spacing: 0px;
.form-size
{
.form-size
{
margin-left: 350px;
margin-left: 350px;
margin-top: 80px;
margin-top: 80px;
}
}
.input-size
{
.input-size
{
width: 600px;
width: 600px;
}
}
.same-title
{
.same-title
{
display: flex;
display: flex;
height: 22px;
height: 22px;
align-items: center;
align-items: center;
font-size: 20px;
font-size: 20px;
font-family: "AlibabaPuHuiTi-Medium";
font-family: "AlibabaPuHuiTi-Medium";
font-weight: normal;
font-weight: normal;
color: #1F295D
;
color: #1f295d
;
line-height: 22px;
line-height: 22px;
.title-icon
{
.title-icon
{
width: 6px;
width: 6px;
height: 20px;
height: 20px;
background-image: url('../assets/img/split.png'
);
background-image: url("../assets/img/split.png"
);
background-size: 100% 100%;
background-size: 100% 100%;
background-repeat: no-repeat;
background-repeat: no-repeat;
margin-right: 4px;
margin-right: 4px;
}
}
}
}
/deep/ .el-form .el-form-item
{
/deep/ .el-form .el-form-item
{
margin-bottom: 40px;
margin-bottom: 40px;
}
}
/deep/ .el-form .el-form-item__label
{
/deep/ .el-form .el-form-item__label
{
font-family: "AlibabaPuHuiTi-Regular";
font-family: "AlibabaPuHuiTi-Regular";
font-size: 16px;
font-size: 16px;
font-weight: normal;
font-weight: normal;
font-stretch: normal;
font-stretch: normal;
letter-spacing: 0px;
letter-spacing: 0px;
color: #747C
93;
color: #747c
93;
}
}
// .inline-form{
// .inline-form{
// display: flex !important;
// display: flex !important;
...
@@ -215,14 +231,14 @@ export default {
...
@@ -215,14 +231,14 @@ export default {
// color: #333333;
// color: #333333;
// min-height:400px !important;
// min-height:400px !important;
// }
// }
.backList
{
.backList
{
width: 100%;
width: 100%;
height: 32px;
height: 32px;
display: flex;
display: flex;
border-bottom: 1px dashed #dedede;
border-bottom: 1px dashed #dedede;
margin-bottom: 40px;
margin-bottom: 40px;
}
}
.up-rect
{
.up-rect
{
width: 36px;
width: 36px;
height: 36px;
height: 36px;
background-color: #f5f5f5;
background-color: #f5f5f5;
...
@@ -232,13 +248,14 @@ export default {
...
@@ -232,13 +248,14 @@ export default {
justify-content: center;
justify-content: center;
align-items: center;
align-items: center;
cursor: pointer;
cursor: pointer;
.up-icon{
.up-icon {
width: 16px;height: 14px;
width: 16px;
background-image: url('../assets/img/upload_icon.png');
height: 14px;
background-image: url("../assets/img/upload_icon.png");
cursor: pointer;
cursor: pointer;
}
}
}
}
.bottom-btn
{
.bottom-btn
{
font-family: "AlibabaPuHuiTi-Medium";
font-family: "AlibabaPuHuiTi-Medium";
font-size: 20px;
font-size: 20px;
font-weight: normal;
font-weight: normal;
...
@@ -251,7 +268,7 @@ export default {
...
@@ -251,7 +268,7 @@ export default {
justify-content: center;
justify-content: center;
margin-top: 70px;
margin-top: 70px;
.cancel
{
.cancel
{
cursor: pointer;
cursor: pointer;
width: 158px;
width: 158px;
height: 50px;
height: 50px;
...
@@ -261,7 +278,7 @@ export default {
...
@@ -261,7 +278,7 @@ export default {
color: #317ce3;
color: #317ce3;
margin-right: 92px;
margin-right: 92px;
}
}
.submit
{
.submit
{
cursor: pointer;
cursor: pointer;
width: 158px;
width: 158px;
height: 50px;
height: 50px;
...
@@ -270,6 +287,5 @@ export default {
...
@@ -270,6 +287,5 @@ export default {
color: #ffffff;
color: #ffffff;
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/home.vue
浏览文件 @
f1cb05cf
差异被折叠。
点击展开。
src/views/layout.vue
浏览文件 @
f1cb05cf
...
@@ -50,7 +50,7 @@ export default {
...
@@ -50,7 +50,7 @@ export default {
watch
:{
watch
:{
"$route.path"
:
{
"$route.path"
:
{
handler
(
newName
,
oldName
)
{
handler
(
newName
,
oldName
)
{
console
.
log
(
newName
);
//
console.log(newName);
this
.
nowRouter
=
newName
this
.
nowRouter
=
newName
},
},
immediate
:
true
immediate
:
true
...
@@ -60,6 +60,7 @@ export default {
...
@@ -60,6 +60,7 @@ export default {
methods
:
{
methods
:
{
logout
(){
logout
(){
this
.
$router
.
push
(
'/login'
)
this
.
$router
.
push
(
'/login'
)
localStorage
.
clear
();
},
},
jumRouter
(
router
){
jumRouter
(
router
){
this
.
$router
.
push
(
router
)
this
.
$router
.
push
(
router
)
...
...
src/views/login.vue
浏览文件 @
f1cb05cf
...
@@ -45,13 +45,27 @@ export default {
...
@@ -45,13 +45,27 @@ export default {
},
},
methods
:
{
methods
:
{
login
(){
login
(){
if
(
!
this
.
userNameLogin
){
this
.
$message
.
error
(
'请输入用户名'
)
return
}
if
(
!
this
.
passwordLogin
){
this
.
$message
.
error
(
'请输入密码'
)
return
}
let
data
=
{
let
data
=
{
"password"
:
this
.
passwordLogin
,
"password"
:
this
.
passwordLogin
,
"rememberMe"
:
true
,
"rememberMe"
:
true
,
"username"
:
this
.
userNameLogin
"username"
:
this
.
userNameLogin
}
}
this
.
$server
.
login
(
data
).
then
(
res
=>
{
this
.
$server
.
login
(
data
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
status
===
200
){
localStorage
.
setItem
(
'token'
,
res
.
data
.
authorization
)
localStorage
.
setItem
(
'id'
,
res
.
data
.
companyId
)
this
.
$router
.
push
(
'/home'
)
}
})
})
}
}
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论