|
|
|
@ -4,9 +4,9 @@ |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<div class="flex-between"> |
|
|
|
|
<el-page-header @back="goBack" content="项目配置"></el-page-header> |
|
|
|
|
<el-page-header @back="back" content="项目配置"></el-page-header> |
|
|
|
|
<div v-if="!isDetail"> |
|
|
|
|
<el-button v-if="!projectId" type="success" @click="handleSubmit(0,projectManage.isOpen=1,projectManage.ztOpen = 1)">保存为草稿 |
|
|
|
|
<el-button type="success" @click="handleSubmit(0,projectManage.isOpen=1,projectManage.ztOpen = 1)">保存为草稿 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" @click="handleSubmit(1)">确定并发布</el-button> |
|
|
|
|
</div> |
|
|
|
@ -266,7 +266,8 @@ export default { |
|
|
|
|
isToPoint: false, // 判断是否是跳转到判分点系统 |
|
|
|
|
visibleLoading: false, // 加载判分点数据 |
|
|
|
|
listLoading:false,// 列表加载 |
|
|
|
|
submiting: false // 新增编辑防抖标识 |
|
|
|
|
submiting: false, // 新增编辑防抖标识 |
|
|
|
|
updateTime: 0 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -292,12 +293,13 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
// projectJudgmentData: { |
|
|
|
|
// handler(newValue) { |
|
|
|
|
// console.log("newValue:", newValue); |
|
|
|
|
// }, |
|
|
|
|
// deep: true |
|
|
|
|
// }, |
|
|
|
|
// 监听信息是否有更改,有的话页面离开的时候要询问是否要保存 |
|
|
|
|
projectManage: { |
|
|
|
|
handler(){ |
|
|
|
|
this.updateTime++ |
|
|
|
|
}, |
|
|
|
|
deep:true |
|
|
|
|
}, |
|
|
|
|
judgementpointsquery(n) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
@ -305,9 +307,6 @@ export default { |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
// console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId); |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
if (this.$route.query.projectId) { |
|
|
|
|
this.projectId = this.$route.query.projectId; |
|
|
|
@ -328,18 +327,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
goBack() { // 返回 |
|
|
|
|
if (this.isDetail) { |
|
|
|
|
this.$router.back(); |
|
|
|
|
} else { |
|
|
|
|
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$router.push(`/projectList?systemId=${this.$route.query.systemId}&show=${this.isDetails}&founder=${this.founder}&name=${this.$route.query.name}`); |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
permissionChange(){ |
|
|
|
|
if (this.projectManage.permissions == 1){ |
|
|
|
|
this.projectManage.hintOpen = 1 |
|
|
|
@ -480,7 +467,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
updateProject(params) { // 更新项目 |
|
|
|
|
this.$post(`${this.api.updateProjectManage}`, params).then(res => { |
|
|
|
|
this.$post(this.api[params.projectManage.state ? 'updateProjectManage' : 'editProjectDraft'], params).then(res => { |
|
|
|
|
if (res.status === 200) { |
|
|
|
|
// 中台创建的项目,并且更改了项目权限,就需要调这个接口 |
|
|
|
|
if (!params.projectManage.founder && this.oriPer !== params.projectManage.permissions) { |
|
|
|
@ -757,6 +744,25 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
location.href = href; |
|
|
|
|
}, |
|
|
|
|
// 返回列表 |
|
|
|
|
toList() { |
|
|
|
|
this.$router.push(`/projectList?systemId=${this.$route.query.systemId}&show=${this.isDetails}&founder=${this.founder}&name=${this.$route.query.name}`); |
|
|
|
|
}, |
|
|
|
|
// 返回 |
|
|
|
|
back() { |
|
|
|
|
// 更改了信息才需要提示 |
|
|
|
|
if(this.updateTime > 1){ |
|
|
|
|
this.$confirm('编辑的内容未保存,是否保存?', "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.handleSubmit(this.projectManage.state) |
|
|
|
|
}).catch(() => { |
|
|
|
|
this.toList() |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.toList() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|