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

添加检测是否首次安装

parent a30aec8f
...@@ -171,6 +171,9 @@ ...@@ -171,6 +171,9 @@
drawerShow drawerShow
}, },
mixins: [table,tree], mixins: [table,tree],
mounted() {
this.timer = setInterval(this.syncProjectStatus, 1000 * 60);
},
created() { created() {
//检测是否初始安装 //检测是否初始安装
this.$get("/setup/project/check") this.$get("/setup/project/check")
...@@ -304,12 +307,10 @@ ...@@ -304,12 +307,10 @@
batchDistribute(row) { batchDistribute(row) {
if(this.selection.length==0){ if(this.selection.length==0){
this.$message.error("请勾选需要部署的项目!"); this.$message.error("请勾选需要部署的项目!");
return; return;
} }
this.$post("/setup/project/batchDistribute", { this.$post("/setup/project/batchDistribute", {
idList: this.selection, idList: this.selection,
},{isLoading:true}) },{isLoading:true})
...@@ -498,6 +499,30 @@ ...@@ -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() { data() {
return { return {
...@@ -533,6 +558,7 @@ ...@@ -533,6 +558,7 @@
// 弹出层标题(设备导入) // 弹出层标题(设备导入)
title: "选择区域创建站点" title: "选择区域创建站点"
}, },
timer: "",
areaName: "", areaName: "",
areaCode: "", areaCode: "",
siteName: "", siteName: "",
...@@ -612,16 +638,16 @@ ...@@ -612,16 +638,16 @@
<span> </span> <span> </span>
{row.projectCode === 'base-manager' &&row.projectCode === 'base-manager' ? ( {row.projectType === 1&&row.projectStatus>1&&row.projectStatus<4 ? (
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-open" icon="el-icon-open"
onClick={() => { onClick={() => {
this.updateArea(row); this.start(row);
}} }}
> >
更新子区域 启动项目
</el-button> </el-button>
) : ( ) : (
"" ""
...@@ -629,6 +655,7 @@ ...@@ -629,6 +655,7 @@
<span> </span> <span> </span>
{row.projectCode === 'base-manager' ? ( {row.projectCode === 'base-manager' ? (
<el-button <el-button
size="mini" 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