Commit 14be8c86 authored by 赵啸非's avatar 赵啸非

添加检测是否首次安装

parent a30aec8f
......@@ -171,6 +171,9 @@
drawerShow
},
mixins: [table,tree],
mounted() {
this.timer = setInterval(this.syncProjectStatus, 1000 * 60);
},
created() {
//检测是否初始安装
this.$get("/setup/project/check")
......@@ -304,12 +307,10 @@
batchDistribute(row) {
if(this.selection.length==0){
this.$message.error("请勾选需要部署的项目!");
return;
}
this.$post("/setup/project/batchDistribute", {
idList: this.selection,
},{isLoading:true})
......@@ -498,6 +499,30 @@
});
},
syncProjectStatus() {
this.$post("/setup/project/projectStatusUpdate", { })
.then((res) => {
if (res.code == 1) {
this.getData()
}
})
.catch((error) => {
});
},
start(row) {
this.$post("/setup/project/start", row)
.then((res) => {
if (res.code == 1) {
this.$message.success("项目应用启动成功,稍后更新项目状态!");
}
})
.catch((error) => {
});
},
},
data() {
return {
......@@ -533,6 +558,7 @@
// 弹出层标题(设备导入)
title: "选择区域创建站点"
},
timer: "",
areaName: "",
areaCode: "",
siteName: "",
......@@ -612,16 +638,16 @@
<span> </span>
{row.projectCode === 'base-manager' &&row.projectCode === 'base-manager' ? (
{row.projectType === 1&&row.projectStatus>1&&row.projectStatus<4 ? (
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.updateArea(row);
this.start(row);
}}
>
更新子区域
启动项目
</el-button>
) : (
""
......@@ -629,6 +655,7 @@
<span> </span>
{row.projectCode === 'base-manager' ? (
<el-button
size="mini"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment