|
@@ -154,6 +154,9 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item v-if="!isModifyMode">
|
|
<el-form-item v-if="!isModifyMode">
|
|
|
|
+ <el-button v-if="taskOperationControl.update" @click="manageVirtualMachine()" type="primary" size="mini">管理虚拟机</el-button>
|
|
|
|
+ <el-button v-if="taskOperationControl.receive" @click="createVirtualMachine()" type="primary" size="mini">创建虚拟机</el-button>
|
|
|
|
+ <el-button v-if="taskOperationControl.receive" @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-popover
|
|
<el-popover
|
|
placement="top-start"
|
|
placement="top-start"
|
|
@@ -282,7 +285,8 @@ import {
|
|
storageGet,
|
|
storageGet,
|
|
submitTaskRequest,
|
|
submitTaskRequest,
|
|
updateTask,
|
|
updateTask,
|
|
- getTaskWordCloud
|
|
|
|
|
|
+ getTaskWordCloud,
|
|
|
|
+ getToken
|
|
} from '@/js/index'
|
|
} from '@/js/index'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -490,7 +494,6 @@ export default {
|
|
params: {projectId: this.projectId}
|
|
params: {projectId: this.projectId}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
//切换至可编辑页面
|
|
//切换至可编辑页面
|
|
modifyForm() {
|
|
modifyForm() {
|
|
// this.task.serviceType = ''
|
|
// this.task.serviceType = ''
|
|
@@ -555,6 +558,32 @@ export default {
|
|
getTask(this.projectId, this.taskId, this.getTaskDetailSuccess, this.getTaskDetailFail)
|
|
getTask(this.projectId, this.taskId, this.getTaskDetailSuccess, this.getTaskDetailFail)
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ manageVirtualMachine(){
|
|
|
|
+ getToken(this.projectId, this.taskId).then((res) => {
|
|
|
|
+ var token = res.data
|
|
|
|
+ var url = 'http://221.226.112.238:4051/cloudtest/api/oauth/gateway?website=cofortest&token='+ token + '&userId='+this.user.userVO.id +
|
|
|
|
+ '&screen=PROJECT' + '&projectId='+this.projectId+'&taskId='+this.taskId;
|
|
|
|
+ window.open(url);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ createVirtualMachine(){
|
|
|
|
+ getToken(this.projectId, this.taskId).then((res) => {
|
|
|
|
+ var token = res.data
|
|
|
|
+ var url = 'http://221.226.112.238:4051/cloudtest/api/oauth/gateway?website=cofortest&token='+ token + '&userId='+this.user.userVO.id +
|
|
|
|
+ '&screen=HOME';
|
|
|
|
+ window.open(url);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ connectVirtualMachine(){
|
|
|
|
+ getToken(this.projectId, this.taskId).then((res) => {
|
|
|
|
+ var token = res.data
|
|
|
|
+ var url = 'http://221.226.112.238:4051/cloudtest/api/oauth/connect?userId='+this.user.userVO.id+ '&projectId='+
|
|
|
|
+ this.projectId+'&taskId='+this.taskId+'&token='+token;
|
|
|
|
+ window.open(url);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//获取词云
|
|
//获取词云
|
|
getWordCloud(){
|
|
getWordCloud(){
|
|
getTaskWordCloud(this.projectId, this.taskId, this.getTaskCloudSuccess, this.getTaskCloudFail)
|
|
getTaskWordCloud(this.projectId, this.taskId, this.getTaskCloudSuccess, this.getTaskCloudFail)
|