Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.web
Project
Project
Details
Activity
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
Script
install.web
Commits
23c2f929
Commit
23c2f929
authored
Mar 21, 2020
by
黄贤军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
69bde0e8
Pipeline
#21285
passed with stage
in 2 minutes and 15 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
22 deletions
+49
-22
system.vue
src/app/HsEdi/system.vue
+42
-19
login.vue
src/components/layout/login.vue
+7
-3
No files found.
src/app/HsEdi/system.vue
View file @
23c2f929
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"项目代码"
prop=
"name"
>
<el-form-item
label=
"项目代码"
prop=
"name"
>
<el-input
class=
"demo"
v-model=
"ruleForm.project_no"
></el-input>
<el-input
class=
"demo"
v-model=
"ruleForm.project_no"
></el-input>
<span
class=
"Prompt"
>
向开发人员询问
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"数据库IP"
prop=
"name"
>
<el-form-item
label=
"数据库IP"
prop=
"name"
>
<el-input
class=
"demo"
v-model=
"ruleForm.db_ip"
></el-input>
<el-input
class=
"demo"
v-model=
"ruleForm.db_ip"
></el-input>
...
@@ -12,10 +13,10 @@
...
@@ -12,10 +13,10 @@
<el-form-item
label=
"数据库端口"
prop=
"name"
>
<el-form-item
label=
"数据库端口"
prop=
"name"
>
<el-input
class=
"demo"
v-model=
"ruleForm.db_port"
></el-input>
<el-input
class=
"demo"
v-model=
"ruleForm.db_port"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户名"
prop=
"name"
>
<el-form-item
label=
"
数据库
用户名"
prop=
"name"
>
<el-input
class=
"demo"
v-model=
"ruleForm.db_user"
></el-input>
<el-input
class=
"demo"
v-model=
"ruleForm.db_user"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"密码"
prop=
"name"
>
<el-form-item
label=
"
数据库
密码"
prop=
"name"
>
<el-input
class=
"demo"
type=
"password"
v-model=
"ruleForm.db_password"
></el-input>
<el-input
class=
"demo"
type=
"password"
v-model=
"ruleForm.db_password"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<el-input
class=
"demo"
v-model=
"ruleForm.host_ip"
></el-input>
<el-input
class=
"demo"
v-model=
"ruleForm.host_ip"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"TIIP数据库名"
prop=
"name"
>
<el-form-item
label=
"TIIP数据库名"
prop=
"name"
>
<el-input
class=
"demo"
v-model=
"ruleForm.tiip_db_name"
></el-input>
<el-input
class=
"demo"
placeholder=
"(非必填)"
v-model=
"ruleForm.tiip_db_name"
></el-input>
<el-button
style=
"margin-left: 40px"
type=
"primary"
@
click=
"test(ruleForm.tiip_db_name)"
>
测试连接
</el-button>
<el-button
style=
"margin-left: 40px"
type=
"primary"
@
click=
"test(ruleForm.tiip_db_name)"
>
测试连接
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"MES数据库名"
prop=
"name"
>
<el-form-item
label=
"MES数据库名"
prop=
"name"
>
...
@@ -121,15 +122,15 @@
...
@@ -121,15 +122,15 @@
<el-input
class=
"demo"
v-model=
"remote_server.server_ssh_port"
></el-input>
<el-input
class=
"demo"
v-model=
"remote_server.server_ssh_port"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户名"
prop=
"name"
>
<el-form-item
label=
"
数据库
用户名"
prop=
"name"
>
<el-input
class=
"demo"
v-model=
"remote_server.server_user"
></el-input>
<el-input
class=
"demo"
v-model=
"remote_server.server_user"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"密码"
prop=
"name"
>
<el-form-item
label=
"
数据库
密码"
prop=
"name"
>
<el-input
class=
"demo"
type=
"password"
v-model=
"remote_server.server_password"
></el-input>
<el-input
class=
"demo"
type=
"password"
v-model=
"remote_server.server_password"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"set_remote_server('')"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"set_remote_server('')"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"docker()"
>
安装dokcer
</el-button>
<el-button
type=
"primary"
@
click=
"upgrade('sen_ruleForm')"
>
推送升级
</el-button>
<el-button
type=
"primary"
@
click=
"upgrade('sen_ruleForm')"
>
推送升级
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"float:right;margin-top:-200px;margin-right:47%;"
>
<el-form-item
style=
"float:right;margin-top:-200px;margin-right:47%;"
>
...
@@ -225,32 +226,48 @@ export default {
...
@@ -225,32 +226,48 @@ export default {
closeFullScreen
(
loadings
)
{
closeFullScreen
(
loadings
)
{
loadings
.
close
()
loadings
.
close
()
},
},
// 安装dokcer
docker
()
{
axios
.
get
(
`mesAPI/install/remote_server/docker/`
).
then
(
res
=>
{
this
.
dialogVisible_install
=
true
var
myDate
=
new
Date
()
var
since_time
=
`
${
myDate
.
getFullYear
()}
-
${
myDate
.
getMonth
()
+
1
}
-
${
myDate
.
getDate
()}
${
myDate
.
getHours
()}
:
${
myDate
.
getMinutes
()}
:
${
myDate
.
getSeconds
()}
`
this
.
chatTimer
=
setInterval
(()
=>
{
this
.
get_info_logs
(
since_time
)
},
2000
)
})
},
// 安装runner
// 安装runner
install_runner
()
{
install_runner
()
{
axios
.
get
(
`mesAPI/install/runner/`
).
then
(
res
=>
{
axios
.
get
(
`mesAPI/install/runner/`
).
then
(
res
=>
{
this
.
dialogVisible_install
=
true
this
.
dialogVisible_install
=
true
var
myDate
=
new
Date
()
var
since_time
=
`
${
myDate
.
getFullYear
()}
-
${
myDate
.
getMonth
()
+
1
}
-
${
myDate
.
getDate
()}
${
myDate
.
getHours
()}
:
${
myDate
.
getMinutes
()}
:
${
myDate
.
getSeconds
()}
`
this
.
chatTimer
=
setInterval
(()
=>
{
this
.
chatTimer
=
setInterval
(()
=>
{
this
.
get_info_logs
()
this
.
get_info_logs
(
since_time
)
},
2000
)
},
2000
)
})
})
},
},
get_info_logs
()
{
get_info_logs
(
since_time
)
{
// var myDate = new Date()
axios
.
get
(
`mesAPI/info/logs/?since_time=
${
since_time
}
`
).
then
(
res
=>
{
// var since_time = `${myDate.getFullYear()}-${myDate.getMonth()}-${myDate.getDate()} ${myDate.getHours()}:${myDate.getMinutes()}:${myDate.getSeconds()}`
if
(
res
.
data
.
indexOf
(
'runner安装成功'
)
!==
-
1
||
res
.
data
.
indexOf
(
'远程升级完成'
)
!==
-
1
||
res
.
data
.
indexOf
(
'runner安装失败'
)
!==
-
1
||
res
.
data
.
indexOf
(
'远程升级失败'
)
!==
-
1
||
res
.
data
.
indexOf
(
'docker安装成功'
)
!==
-
1
||
res
.
data
.
indexOf
(
'docker安装失败'
)
!==
-
1
)
{
axios
.
get
(
`mesAPI/info/logs/`
).
then
(
res
=>
{
clearInterval
(
this
.
chatTimer
)
// if (res.data.indexOf('安装成功') !== -1 || res.data.indexOf('远程升级完成') !== -1) {
// clearInterval(this.chatTimer)
// this.text = res.data
// } else {
this
.
text
=
res
.
data
this
.
text
=
res
.
data
// }
}
else
{
this
.
text
=
res
.
data
}
})
})
},
},
upgrade
()
{
upgrade
()
{
axios
.
get
(
`mesAPI/upgrade/remote/`
).
then
(
res
=>
{
axios
.
get
(
`mesAPI/upgrade/remote/`
).
then
(
res
=>
{
if
(
res
.
data
)
{
console
.
log
(
11
)
}
this
.
dialogVisible_install
=
true
this
.
dialogVisible_install
=
true
var
myDate
=
new
Date
()
var
since_time
=
`
${
myDate
.
getFullYear
()}
-
${
myDate
.
getMonth
()
+
1
}
-
${
myDate
.
getDate
()}
${
myDate
.
getHours
()}
:
${
myDate
.
getMinutes
()}
:
${
myDate
.
getSeconds
()}
`
this
.
chatTimer
=
setInterval
(()
=>
{
this
.
chatTimer
=
setInterval
(()
=>
{
this
.
get_info_logs
()
this
.
get_info_logs
(
since_time
)
},
2000
)
},
2000
)
})
})
// this.openFullScreen('正在推送升级,请稍等')
// this.openFullScreen('正在推送升级,请稍等')
...
@@ -265,7 +282,8 @@ export default {
...
@@ -265,7 +282,8 @@ export default {
},
},
test
(
str
)
{
test
(
str
)
{
if
(
!
this
.
ruleForm
.
id
)
{
if
(
!
this
.
ruleForm
.
id
)
{
this
.
$message
.
error
(
'请先系统配置'
)
this
.
$message
.
error
(
'请先设置系统配置并保存'
)
return
}
}
var
url
=
`
${
this
.
ruleForm
.
project_no
}
/
${
str
}
`
var
url
=
`
${
this
.
ruleForm
.
project_no
}
/
${
str
}
`
this
.
$API
.
get
(
`mesAPI/connection/
${
url
}
/`
).
then
(
res
=>
{
this
.
$API
.
get
(
`mesAPI/connection/
${
url
}
/`
).
then
(
res
=>
{
...
@@ -353,6 +371,11 @@ export default {
...
@@ -353,6 +371,11 @@ export default {
}
}
</
script
>
</
script
>
<
style
scope
>
<
style
scope
>
.Prompt
{
margin-left
:
30px
;
color
:
#c1c1c1
;
size
:
10px
;
}
.demo
{
.demo
{
width
:
300px
;
width
:
300px
;
}
}
...
...
src/components/layout/login.vue
View file @
23c2f929
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
style=
"margin-top:20px;color:#31a9d3"
>
<div
style=
"margin-top:20px;color:#31a9d3"
>
<span
style=
"display: inline-block;width:49%;"
v-if=
"user_name"
@
click=
"setting_login"
>
设置登陆信息
</span>
<span
style=
"display: inline-block;width:49%;"
v-if=
"
!
user_name"
@
click=
"setting_login"
>
设置登陆信息
</span>
</div>
</div>
</el-card>
</el-card>
</div>
</div>
...
@@ -109,7 +109,11 @@ export default {
...
@@ -109,7 +109,11 @@ export default {
// 查询用户信息
// 查询用户信息
get_user
()
{
get_user
()
{
this
.
$API
.
get
(
`
${
this
.
module_name
}
/`
).
then
(
res
=>
{
this
.
$API
.
get
(
`
${
this
.
module_name
}
/`
).
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
user_name
=
res
.
data
this
.
user_name
=
res
.
data
}
else
{
this
.
$message
(
'请先设置您的登录信息'
)
}
})
})
},
},
// 登录
// 登录
...
@@ -117,7 +121,7 @@ export default {
...
@@ -117,7 +121,7 @@ export default {
this
.
$API
.
post
(
`
${
this
.
module_name
}
/login/`
,
{},
{},
this
.
form
).
then
(
res
=>
{
this
.
$API
.
post
(
`
${
this
.
module_name
}
/login/`
,
{},
{},
this
.
form
).
then
(
res
=>
{
sessionStorage
.
setItem
(
'user'
,
true
)
sessionStorage
.
setItem
(
'user'
,
true
)
this
.
$router
.
push
({
path
:
'/hs/system'
})
this
.
$router
.
push
({
path
:
'/hs/system'
})
this
.
$message
(
'登录成功'
)
this
.
$message
.
success
(
'登录成功'
)
})
})
},
},
getUserData
()
{
getUserData
()
{
...
...
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