This commit is contained in:
2024-09-01 15:58:58 +08:00
parent fc1f68b69a
commit bdb8c55b2b
7 changed files with 49 additions and 33 deletions

View File

@@ -76,5 +76,16 @@ export default {
method: "get",
params
})
},
/**
* 请求取消生成文档标志设置为True
* @returns 返回是否取消成功
*/
cancel(params = {}) {
return request({
url: `/create/cancel`,
method: "get",
params
})
}
}

View File

@@ -10,10 +10,12 @@ const useTreeDataStore = defineStore("treeDataStore", {
isInit: false
}
},
/**
* 注意action不能使用箭头函数不能绑定this
*/
actions: {
// 不能使用箭头函数无法绑定this
async initTreeData(projectId) {
// 先判断储存pid是否存在
// 判读是否有项目tree储存pid为项目后端id
const pid = localStorage.getItem("pid")
// 如果不存在,则请求后台树状数据
if (!pid) {

View File

@@ -86,6 +86,8 @@ const handleRelatedChange = async (record) => {
}
loading.value = false
emits("relatedOrunrelated")
// 重新刷新表格请求
crudRef.value.refresh()
}
// 数据定义
@@ -455,7 +457,7 @@ const columns = ref([
title: "开发人员",
hide: true,
dataIndex: "designerPerson",
formType: "input",
formType: "input"
},
{
title: "开发方日期",

View File

@@ -12,7 +12,7 @@
<template #icon>
<icon-plus-circle />
</template>
关联添加问题单
添加关联问题单
</a-button>
</template>
</ma-crud>

View File

@@ -6,7 +6,7 @@
hide-cancel
:mask-closable="false"
:on-before-ok="handleClickConfirmButton"
@cancel="handleClickConfirmButton"
:on-before-cancel="handleClickConfirmButton"
>
<template #title>正在生成{{ text }}</template>
<div><a-progress :percent="percent" size="large" /></div>
@@ -17,6 +17,7 @@
<script setup>
import { ref, watch, onUnmounted } from "vue"
import { Notification } from "@arco-design/web-vue"
import seitaiGenerateApi from "@/api/generate/seitaiGenerate"
const emits = defineEmits(["clickConfirm"])
const props = defineProps({
visible: {
@@ -34,7 +35,7 @@ const props = defineProps({
})
const percent = ref(0)
// 点击确定或关闭按钮判断是否完成未完成则无法关闭进度条modal
const handleClickConfirmButton = () => {
const handleClickConfirmButton = async () => {
if (props.isComplete) {
emits("clickConfirm")
return true