Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xcLab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
吴旭健
xcLab
Commits
0bc3d723
提交
0bc3d723
authored
3月 31, 2020
作者:
Lxq
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'lxq' 到 'master'
修改选中项 查看合并请求
!7
上级
bcaff8b5
80a7722a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
51 行增加
和
12 行删除
+51
-12
newApply.vue
src/components/dial/newApply.vue
+28
-9
labSystem.vue
src/views/labSystem.vue
+23
-3
没有找到文件。
src/components/dial/newApply.vue
浏览文件 @
0bc3d723
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
class=
"whole"
v-for=
"(item,index) in val "
>
<div
class=
"whole"
v-for=
"(item,index) in val "
>
<div
class=
"newApply-title"
>
<div
class=
"newApply-title"
>
<!--
<el-radio
v-model=
"tech"
:label=
"1"
>
{{
item
.
name
}}
</el-radio>
-->
<!--
<el-radio
v-model=
"tech"
:label=
"1"
>
{{
item
.
name
}}
</el-radio>
-->
<span
@
click=
"check(index)"
>
<i
:class=
"(i
sCheck==index
) ? 'isActive': ''"
></i>
</span>
<span
@
click=
"check(index)"
>
<i
:class=
"(i
ndex == isCheck - 1
) ? 'isActive': ''"
></i>
</span>
<div>
{{
item
.
name
}}
</div>
<div>
{{
item
.
name
}}
</div>
</div>
</div>
<div
class=
"newApply-content"
>
<div
class=
"newApply-content"
>
...
@@ -33,7 +33,7 @@ export default {
...
@@ -33,7 +33,7 @@ export default {
name
:
'newApply'
,
name
:
'newApply'
,
// import引入的组件需要注入到对象中才能使用
// import引入的组件需要注入到对象中才能使用
components
:
{},
components
:
{},
props
:
[
'val'
,
'applyId'
],
props
:
[
'val'
,
'applyId'
,
'osId'
],
data
()
{
data
()
{
// 这里存放数据
// 这里存放数据
return
{
return
{
...
@@ -49,11 +49,14 @@ export default {
...
@@ -49,11 +49,14 @@ export default {
},
},
check
(
i
)
{
check
(
i
)
{
console
.
log
(
'选中'
,
i
)
console
.
log
(
'选中'
,
i
)
this
.
isCheck
=
i
;
console
.
log
(
this
.
isCheck
)
this
.
isCheck
=
i
+
1
console
.
log
(
this
.
isCheck
)
},
},
makeSure
()
{
makeSure
()
{
let
a
=
this
.
applyId
;
let
a
=
this
.
applyId
;
let
b
=
this
.
isCheck
+
1
;
let
b
=
this
.
isCheck
;
let
obj
=
{
let
obj
=
{
id
:
a
,
id
:
a
,
techId
:
b
techId
:
b
...
@@ -61,9 +64,13 @@ export default {
...
@@ -61,9 +64,13 @@ export default {
this
.
$server
.
postMidify
(
obj
).
then
(
res
=>
{
this
.
$server
.
postMidify
(
obj
).
then
(
res
=>
{
console
.
log
(
'postMidify'
,
res
);
console
.
log
(
'postMidify'
,
res
);
this
.
$emit
(
'on-close'
);
this
.
$emit
(
'on-close'
);
console
.
log
(
this
.
$parent
)
this
.
$emit
(
'on-closeWeb'
);
this
.
$emit
(
'on-project'
);
this
.
$emit
(
'on-project'
);
// this.$emit('on-websocket');
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
this
.
$message
.
error
(
'请求失败'
)
this
.
$message
.
error
(
'请求失败'
)
...
@@ -79,12 +86,22 @@ export default {
...
@@ -79,12 +86,22 @@ export default {
},
},
'applyId'
:
function
(
applyId
)
{
'applyId'
:
function
(
applyId
)
{
console
.
log
(
'项目id'
,
applyId
)
console
.
log
(
'项目id'
,
applyId
)
}
},
'osId'
:
function
(
osId
)
{
console
.
log
(
'osIdid'
,
osId
)
this
.
isCheck
=
this
.
osId
},
},
},
//生命周期 - 创建完成(可以访问当前this实例)
//生命周期 - 创建完成(可以访问当前this实例)
created
()
{},
created
()
{
},
// 生命周期 - 挂载完成(可以访问DOM元素)
// 生命周期 - 挂载完成(可以访问DOM元素)
mounted
()
{},
mounted
()
{
console
.
log
(
this
.
osId
)
this
.
isCheck
=
this
.
osId
console
.
log
(
'122222'
,
this
.
isCheck
)
},
// 生命周期 - 创建之前
// 生命周期 - 创建之前
beforeCreate
()
{},
beforeCreate
()
{},
// 生命周期 - 挂载之前
// 生命周期 - 挂载之前
...
@@ -92,7 +109,9 @@ export default {
...
@@ -92,7 +109,9 @@ export default {
// 生命周期 - 更新之前
// 生命周期 - 更新之前
beforeUpdate
()
{},
beforeUpdate
()
{},
// 生命周期 - 更新之后
// 生命周期 - 更新之后
updated
()
{},
updated
()
{
// this.check(this.osId);
},
// 生命周期 - 销毁之前
// 生命周期 - 销毁之前
beforeDestroy
()
{},
beforeDestroy
()
{},
// 生命周期 - 销毁完成
// 生命周期 - 销毁完成
...
...
src/views/labSystem.vue
浏览文件 @
0bc3d723
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
</div>
</div>
<!--重新申请弹窗-->
<!--重新申请弹窗-->
<el-dialog
:visible
.
sync=
"applyModal"
width=
"0%"
>
<el-dialog
:visible
.
sync=
"applyModal"
width=
"0%"
>
<newApply
:val=
"applyMessage"
:applyId=
"applyId"
:osId=
"osId"
@
on-project=
"newProject()"
@
on-close=
"reset()"
></newApply>
<newApply
:val=
"applyMessage"
:applyId=
"applyId"
:osId=
"osId"
@
on-
closeWeb=
"websocketCosle"
@
on-websocket=
"newWebsocket()"
@
on-
project=
"newProject()"
@
on-close=
"reset()"
></newApply>
<img
src=
"../assets/img/close.png"
class=
"closeModel"
@
click=
"reset()"
>
<img
src=
"../assets/img/close.png"
class=
"closeModel"
@
click=
"reset()"
>
</el-dialog>
</el-dialog>
...
@@ -168,7 +168,8 @@ export default {
...
@@ -168,7 +168,8 @@ export default {
jenkinsName
:
''
,
// webstock
jenkinsName
:
''
,
// webstock
logData
:
''
,
// 日志
logData
:
''
,
// 日志
data
:
''
,
data
:
''
,
osId
:
''
osId
:
''
,
techId
:
''
};
};
},
},
// 方法集合
// 方法集合
...
@@ -193,6 +194,11 @@ export default {
...
@@ -193,6 +194,11 @@ export default {
this
.
pathSuffix
=
res
.
data
.
pathSuffix
this
.
pathSuffix
=
res
.
data
.
pathSuffix
this
.
jenkinsName
=
res
.
data
.
jenkinsName
this
.
jenkinsName
=
res
.
data
.
jenkinsName
this
.
copyWebsocket
(
res
.
data
.
jenkinsName
)
this
.
copyWebsocket
(
res
.
data
.
jenkinsName
)
// localStorage.setItem('jenkinsName',this.jenkinsName);
// console.log(localStorage.getItem('jenkinsName'))
this
.
techId
=
res
.
data
.
techId
;
console
.
log
(
'66666666'
,
this
.
techId
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
// console.log(err);
// console.log(err);
this
.
$message
.
error
(
'数据请求失败'
);
this
.
$message
.
error
(
'数据请求失败'
);
...
@@ -206,7 +212,8 @@ export default {
...
@@ -206,7 +212,8 @@ export default {
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
this
.
applyMessage
=
res
.
data
this
.
applyMessage
=
res
.
data
this
.
applyId
=
this
.
id
this
.
applyId
=
this
.
id
this
.
osId
=
this
.
os
.
id
this
.
osId
=
this
.
techId
console
.
log
(
'909090'
,
this
.
osId
)
// console.log('77777',this.applyId)
// console.log('77777',this.applyId)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
// console.log(err)
// console.log(err)
...
@@ -258,11 +265,14 @@ export default {
...
@@ -258,11 +265,14 @@ export default {
},
},
// websocket
// websocket
copyWebsocket
(
val
)
{
copyWebsocket
(
val
)
{
// console.log(this.val,this.close)
var
that
=
this
;
var
that
=
this
;
// Create WebSocket connection.
// Create WebSocket connection.
// console.log('this.jenkinsName2121',this.jenkinsName)
// console.log('this.jenkinsName2121',this.jenkinsName)
// const socket = new WebSocket('ws://' + baseUrl.WS_CONT + '/webServer/${this.jenkinsName}');
// const socket = new WebSocket('ws://' + baseUrl.WS_CONT + '/webServer/${this.jenkinsName}');
const
socket
=
new
WebSocket
(
`ws://
${
baseUrl
.
WS_CONT
}
/webServer/
${
val
}
`
);
const
socket
=
new
WebSocket
(
`ws://
${
baseUrl
.
WS_CONT
}
/webServer/
${
val
}
`
);
this
.
WS
=
socket
;
// Connection opened
// Connection opened
socket
.
addEventListener
(
'open'
,
function
(
event
)
{
socket
.
addEventListener
(
'open'
,
function
(
event
)
{
socket
.
send
(
'Hello Server!'
);
socket
.
send
(
'Hello Server!'
);
...
@@ -282,6 +292,16 @@ export default {
...
@@ -282,6 +292,16 @@ export default {
newProject
(){
newProject
(){
console
.
log
(
1
)
console
.
log
(
1
)
this
.
getProject
();
this
.
getProject
();
},
// newWebsocket(){
// console.log(99)
// this.copyWebsocket();
// },
websocketCosle
(
e
){
this
.
WS
.
close
()
// const socket = new WebSocket(`ws://${baseUrl.WS_CONT}/webServer/${this.jenkinsName}`);
// socket.close();
// this.copyWebsocket();
}
}
},
},
// 监听属性 类似于data概念
// 监听属性 类似于data概念
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论