-- fix 评估

This commit is contained in:
yuping
2023-02-28 21:01:58 +08:00
parent 960e294352
commit cddfa6efde

View File

@@ -359,7 +359,7 @@
</div>
<div class="pubtn">
<a-button class="pubtn1" @click="closeModal2">取消</a-button>
<a-button class="pubtn2" @click="createStoreyProject" :loading="projectInfo.validated===1"
<a-button class="pubtn2" @click="createStoreyProject" :loading="buttonLoading || projectInfo.validated===1"
>确定
</a-button>
</div>
@@ -974,6 +974,7 @@ export default {
setup() {
const state = reactive({
tableLoading: false,
buttonLoading: false,
projectName: null,
selectTime: null,
sonproject: false,
@@ -1083,6 +1084,7 @@ export default {
// 创建多层项目
const createStoreyProject = async () => {
state.buttonLoading = true
// 接口需要传递的参数信息
const errorMsgs = {
name: "请输入项目名称",
@@ -1091,6 +1093,7 @@ export default {
sourceBelongId: "请选择资源归属",
};
if (!validate(state.projectInfo, errorMsgs)) {
state.buttonLoading = false
return;
}
/**
@@ -1107,6 +1110,7 @@ export default {
return res.data.data == 1;
});
if (offName) {
state.buttonLoading = false
message.destroy();
return message.warning("项目名称重复,请重新填写");
}
@@ -1115,6 +1119,7 @@ export default {
message.destroy();
message.success("创建成功");
state.currentPage = 1;
state.buttonLoading = false
getTableDate();
});
};