|
@@ -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.writeReport||taskOperationControl.uploadReport" @click="connectVirtualMachine()" type="primary" size="mini">连接虚拟机</el-button>
|
|
|
<el-button size="mini" @click="toProject()">项目详情</el-button>
|
|
|
+ <el-button size="mini" @click="toGo()">go语言测试在线测试平台</el-button>
|
|
|
+
|
|
|
<el-popover
|
|
|
placement="top-start"
|
|
|
title="确认结束?"
|
|
@@ -420,6 +422,8 @@ export default {
|
|
|
acceptedUserList: [],
|
|
|
shortLink:'',
|
|
|
editShortLink:false,
|
|
|
+ creatorId:'',
|
|
|
+ receiverId:''
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -433,8 +437,10 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
- this.init()
|
|
|
+ this.init();
|
|
|
+
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
//跳转到任务对应的数据面板
|
|
@@ -479,6 +485,7 @@ export default {
|
|
|
this.getTaskDetail()
|
|
|
this.getWordCloud()
|
|
|
this.setInstitutions()
|
|
|
+ this.getProjectInfo()
|
|
|
},
|
|
|
|
|
|
//北斗测试报告填写跳转
|
|
@@ -493,6 +500,21 @@ export default {
|
|
|
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() {
|
|
|
// this.task.serviceType = ''
|
|
@@ -528,13 +550,27 @@ export default {
|
|
|
//加载用户信息
|
|
|
setUserInfo() {
|
|
|
this.user = storageGet('user')
|
|
|
+ console.log(this.user,'this.user')
|
|
|
+
|
|
|
this.rolesPermissions = storageGet('rolesPermissions')
|
|
|
+ console.log(this.rolesPermissions,'this.rolesPermissions')
|
|
|
if (storageGet('rolesPermissions').isRegionManager || storageGet('rolesPermissions').isSystemAdministrator) {
|
|
|
this.showBD = true;
|
|
|
} else {
|
|
|
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() {
|
|
|
getAllServiceTypes().then((res) => {
|
|
@@ -620,6 +656,7 @@ export default {
|
|
|
serverCode: '',
|
|
|
}
|
|
|
this.taskOperationControl = res.taskOperationControl;
|
|
|
+ // console.log(this.taskOperationControl,'this.taskOperationControl')
|
|
|
this.acceptedUserList = res.acceptedUserList;
|
|
|
this.crowdReportUrl = res.crowdTaskVO.writeReportUrl;
|
|
|
this.handleFormatReport(this.acceptedUserList);
|
|
@@ -645,7 +682,9 @@ export default {
|
|
|
|
|
|
//处理显示报告
|
|
|
handleFormatReport(acceptedUserList) {
|
|
|
+ console.log(acceptedUserList,"this.acceptedUserList")
|
|
|
acceptedUserList.map((user) => {
|
|
|
+
|
|
|
user.crowdReportVOS && user.crowdReportVOS.map((report) => {
|
|
|
report.userName = user.userVO.userName;
|
|
|
this.reportList.push(report);
|