添加cid正在运行项目查询
This commit is contained in:
parent
0da522c90b
commit
3c22de6e2f
|
|
@ -81,4 +81,15 @@ function getRequest() {
|
|||
request1 = createRequestInstance("https://"+server)
|
||||
}
|
||||
return request1;
|
||||
}
|
||||
|
||||
export function getCIDRuningListService(data) {
|
||||
let request1 = getRequest();
|
||||
let path = '/cid/running?type=' + data.type;
|
||||
|
||||
return request1.get(path, {
|
||||
headers: {
|
||||
'token': data.token, // 将 token 替换为您的令牌值
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ import { getCIDListService } from "@/api/cid.js";
|
|||
import { runCIDService } from "@/api/cid.js";
|
||||
import { addCIDService } from "@/api/cid.js";
|
||||
import { deleteCIDService } from "@/api/cid.js";
|
||||
import { updateCIDService } from "@/api/cid.js";
|
||||
import { updateCIDService,getCIDRuningListService } from "@/api/cid.js";
|
||||
import router from "@/router/index.js";
|
||||
import Menu from "@/views/Menu.vue";
|
||||
|
||||
|
|
@ -24,6 +24,8 @@ export default {
|
|||
userId: localStorage.getItem("userId"),
|
||||
username: localStorage.getItem("username"),
|
||||
},
|
||||
runningData: [],
|
||||
runningDialogVisible: false,
|
||||
addDialogVisible: false,
|
||||
updateDialogVisible: false,
|
||||
searchForm: {
|
||||
|
|
@ -207,6 +209,23 @@ export default {
|
|||
this.tableLoading = false;
|
||||
}
|
||||
},
|
||||
async GetCIDRuningList(){
|
||||
let req = {
|
||||
token: this.tokenData.token,
|
||||
type: 0,
|
||||
}
|
||||
try{
|
||||
let result = await getCIDRuningListService(req);
|
||||
if(result.code == 0){
|
||||
this.runningData = result.data;
|
||||
this.runningDialogVisible = true;
|
||||
}else{
|
||||
ElMessage.error("获取失败");
|
||||
}
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getIpClient() {
|
||||
try {
|
||||
const response = await axios.get("https://ipinfo.io/json");
|
||||
|
|
@ -288,6 +307,11 @@ export default {
|
|||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="GetCIDRuningList()"
|
||||
>正在运行</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-dialog
|
||||
|
|
@ -397,6 +421,24 @@ export default {
|
|||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-model="runningDialogVisible"
|
||||
title="正在运行项目"
|
||||
width="50%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-table
|
||||
:data="runningData"
|
||||
stripe
|
||||
width="90%"
|
||||
fit
|
||||
>
|
||||
<el-table-column prop="id" label="CID" width="150"></el-table-column>
|
||||
<el-table-column prop="cid" label="名称" width="150"></el-table-column>
|
||||
<el-table-column prop="start_time" label="开始时间" width="300">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue