|
@@ -157,6 +157,8 @@
|
|
<el-button v-if="taskOperationControl.update||taskOperationControl.taskRecommend" @click="manageVirtualMachine()" type="primary" size="mini">管理虚拟机</el-button>
|
|
<el-button v-if="taskOperationControl.update||taskOperationControl.taskRecommend" @click="manageVirtualMachine()" type="primary" size="mini">管理虚拟机</el-button>
|
|
<el-button v-if="taskOperationControl.writeReport||taskOperationControl.uploadReport" @click="connectVirtualMachine()" type="primary" size="mini">连接虚拟机</el-button>
|
|
<el-button v-if="taskOperationControl.writeReport||taskOperationControl.uploadReport" @click="connectVirtualMachine()" type="primary" size="mini">连接虚拟机</el-button>
|
|
<el-button size="mini" @click="toProject()">项目详情</el-button>
|
|
<el-button size="mini" @click="toProject()">项目详情</el-button>
|
|
|
|
+ <el-button size="mini" @click="toGo()">go语言测试在线测试平台</el-button>
|
|
|
|
+
|
|
<el-popover
|
|
<el-popover
|
|
placement="top-start"
|
|
placement="top-start"
|
|
title="确认结束?"
|
|
title="确认结束?"
|
|
@@ -420,6 +422,8 @@ export default {
|
|
acceptedUserList: [],
|
|
acceptedUserList: [],
|
|
shortLink:'',
|
|
shortLink:'',
|
|
editShortLink:false,
|
|
editShortLink:false,
|
|
|
|
+ creatorId:'',
|
|
|
|
+ receiverId:''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -433,8 +437,10 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.init()
|
|
|
|
|
|
+ this.init();
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//跳转到任务对应的数据面板
|
|
//跳转到任务对应的数据面板
|
|
@@ -479,6 +485,7 @@ export default {
|
|
this.getTaskDetail()
|
|
this.getTaskDetail()
|
|
this.getWordCloud()
|
|
this.getWordCloud()
|
|
this.setInstitutions()
|
|
this.setInstitutions()
|
|
|
|
+ this.getProjectInfo()
|
|
},
|
|
},
|
|
|
|
|
|
//北斗测试报告填写跳转
|
|
//北斗测试报告填写跳转
|
|
@@ -493,6 +500,21 @@ export default {
|
|
params: {projectId: this.projectId}
|
|
params: {projectId: this.projectId}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ toGo() {
|
|
|
|
+ let roleid=1;
|
|
|
|
+ // console.log(this.user.roleList.length,"this.user.roleList.length");
|
|
|
|
+ // console.log(this.user.roleList.includes("generalUser"),'this.user.roleList.includes("generalUser")');
|
|
|
|
+ // console.log(this.receiverId,"this.receiverId ",this.user.userVO.id,"this.user.userVO.id");
|
|
|
|
+ // console.log(this.creatorId,'this.creatorId')
|
|
|
|
+ if(this.user.roleList.length==1 && this.user.roleList.includes("generalUser")){roleid = 1;}
|
|
|
|
+ if(this.creatorId==this.user.userVO.id){roleid=3;}
|
|
|
|
+ if(this.taskOperationControl.uploadReport){roleid=4;}
|
|
|
|
+ if(this.receiverId==this.user.userVO.id){roleid=2;}
|
|
|
|
+
|
|
|
|
+ // console.log(roleid,'roleid')
|
|
|
|
+ let goUrl='http://101.132.74.9:1106/hjc2?project_code='+this.projectId+'&user_id'+this.user.userVO.id+'&role_id='+roleid;
|
|
|
|
+ window.open(goUrl, '_blank');
|
|
|
|
+ },
|
|
//切换至可编辑页面
|
|
//切换至可编辑页面
|
|
modifyForm() {
|
|
modifyForm() {
|
|
// this.task.serviceType = ''
|
|
// this.task.serviceType = ''
|
|
@@ -528,13 +550,27 @@ export default {
|
|
//加载用户信息
|
|
//加载用户信息
|
|
setUserInfo() {
|
|
setUserInfo() {
|
|
this.user = storageGet('user')
|
|
this.user = storageGet('user')
|
|
|
|
+ console.log(this.user,'this.user')
|
|
|
|
+
|
|
this.rolesPermissions = storageGet('rolesPermissions')
|
|
this.rolesPermissions = storageGet('rolesPermissions')
|
|
|
|
+ console.log(this.rolesPermissions,'this.rolesPermissions')
|
|
if (storageGet('rolesPermissions').isRegionManager || storageGet('rolesPermissions').isSystemAdministrator) {
|
|
if (storageGet('rolesPermissions').isRegionManager || storageGet('rolesPermissions').isSystemAdministrator) {
|
|
this.showBD = true;
|
|
this.showBD = true;
|
|
} else {
|
|
} else {
|
|
this.showBD = false;
|
|
this.showBD = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ getProjectInfo(){
|
|
|
|
+ Http.get(Apis.PROJECT.GET_PROJECT.replace('{projectId}', this.projectId)).then((res) => {
|
|
|
|
+ // console.log(res,"获取project res");
|
|
|
|
+ this.creatorId = res.projectDetails.userId;
|
|
|
|
+ this.receiverId =res.projectDetails.regionManagerId;
|
|
|
|
+ // console.log(typeof res.projectDetails.field)
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ // this.hideLoading()
|
|
|
|
+ // notify('error', error.data)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//加载任务的测试类型
|
|
//加载任务的测试类型
|
|
setServiceType() {
|
|
setServiceType() {
|
|
getAllServiceTypes().then((res) => {
|
|
getAllServiceTypes().then((res) => {
|
|
@@ -560,7 +596,7 @@ export default {
|
|
manageVirtualMachine(){
|
|
manageVirtualMachine(){
|
|
getToken(this.projectId, this.taskId).then((res) => {
|
|
getToken(this.projectId, this.taskId).then((res) => {
|
|
var token = res.data
|
|
var token = res.data
|
|
- var url = 'http://49.232.124.49:38080/cloudtest/api/oauth/gateway?website=cofortest&token='+ token + '&userId='+this.user.userVO.id +
|
|
|
|
|
|
+ var url = 'http://docker.chuangchaokeji.cn:38080/cloudtest/api/oauth/gateway?website=cofortest&token='+ token + '&userId='+this.user.userVO.id +
|
|
'&screen=PROJECT' + '&projectId='+this.projectId+'&taskId='+this.taskId;
|
|
'&screen=PROJECT' + '&projectId='+this.projectId+'&taskId='+this.taskId;
|
|
window.open(url);
|
|
window.open(url);
|
|
})
|
|
})
|
|
@@ -569,7 +605,7 @@ export default {
|
|
// createVirtualMachine(){
|
|
// createVirtualMachine(){
|
|
// getToken(this.projectId, this.taskId).then((res) => {
|
|
// getToken(this.projectId, this.taskId).then((res) => {
|
|
// var token = res.data
|
|
// var token = res.data
|
|
- // var url = 'http://49.232.124.49:38080/cloudtest/api/oauth/gateway?website=cofortest&token='+ token + '&userId='+this.user.userVO.id +
|
|
|
|
|
|
+ // var url = 'http://docker.chuangchaokeji.cn:38080/cloudtest/api/oauth/gateway?website=cofortest&token='+ token + '&userId='+this.user.userVO.id +
|
|
// '&screen=HOME';
|
|
// '&screen=HOME';
|
|
// window.open(url);
|
|
// window.open(url);
|
|
// })
|
|
// })
|
|
@@ -578,7 +614,7 @@ export default {
|
|
connectVirtualMachine(){
|
|
connectVirtualMachine(){
|
|
getToken(this.projectId, this.taskId).then((res) => {
|
|
getToken(this.projectId, this.taskId).then((res) => {
|
|
var token = res.data
|
|
var token = res.data
|
|
- var url = 'http://49.232.124.49:38080/cloudtest/api/oauth/connect?userId='+this.user.userVO.id+ '&projectId='+
|
|
|
|
|
|
+ var url = 'http://docker.chuangchaokeji.cn:38080/cloudtest/api/oauth/connect?userId='+this.user.userVO.id+ '&projectId='+
|
|
this.projectId+'&taskId='+this.taskId+'&token='+token;
|
|
this.projectId+'&taskId='+this.taskId+'&token='+token;
|
|
window.open(url);
|
|
window.open(url);
|
|
})
|
|
})
|
|
@@ -620,6 +656,7 @@ export default {
|
|
serverCode: '',
|
|
serverCode: '',
|
|
}
|
|
}
|
|
this.taskOperationControl = res.taskOperationControl;
|
|
this.taskOperationControl = res.taskOperationControl;
|
|
|
|
+ // console.log(this.taskOperationControl,'this.taskOperationControl')
|
|
this.acceptedUserList = res.acceptedUserList;
|
|
this.acceptedUserList = res.acceptedUserList;
|
|
this.crowdReportUrl = res.crowdTaskVO.writeReportUrl;
|
|
this.crowdReportUrl = res.crowdTaskVO.writeReportUrl;
|
|
this.handleFormatReport(this.acceptedUserList);
|
|
this.handleFormatReport(this.acceptedUserList);
|
|
@@ -645,7 +682,9 @@ export default {
|
|
|
|
|
|
//处理显示报告
|
|
//处理显示报告
|
|
handleFormatReport(acceptedUserList) {
|
|
handleFormatReport(acceptedUserList) {
|
|
|
|
+ console.log(acceptedUserList,"this.acceptedUserList")
|
|
acceptedUserList.map((user) => {
|
|
acceptedUserList.map((user) => {
|
|
|
|
+
|
|
user.crowdReportVOS && user.crowdReportVOS.map((report) => {
|
|
user.crowdReportVOS && user.crowdReportVOS.map((report) => {
|
|
report.userName = user.userVO.userName;
|
|
report.userName = user.userVO.userName;
|
|
this.reportList.push(report);
|
|
this.reportList.push(report);
|