mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-14 22:42:10 +08:00
Pre Merge pull request !127 from harris2012/N/A
This commit is contained in:
commit
0116d920c1
@ -62,6 +62,16 @@ export const updateProjectApi = async (data: object) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// * 重命名项目名称
|
||||||
|
export const renameProjectApi = async (data: object) => {
|
||||||
|
try {
|
||||||
|
const res = await http(RequestHttpEnum.POST)(`${ModuleTypeEnum.PROJECT}/rename`, data)
|
||||||
|
return res
|
||||||
|
} catch {
|
||||||
|
httpErrorHandle()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// * 删除项目
|
// * 删除项目
|
||||||
export const deleteProjectApi = async (data: object) => {
|
export const deleteProjectApi = async (data: object) => {
|
||||||
try {
|
try {
|
||||||
|
@ -32,7 +32,7 @@ import { ResultEnum } from '@/enums/httpEnum'
|
|||||||
import { fetchRouteParamsLocation, httpErrorHandle, setTitle } from '@/utils'
|
import { fetchRouteParamsLocation, httpErrorHandle, setTitle } from '@/utils'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { ProjectInfoEnum, EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { ProjectInfoEnum, EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
import { updateProjectApi } from '@/api/path'
|
import { renameProjectApi } from '@/api/path'
|
||||||
import { useSync } from '../../hooks/useSync.hook'
|
import { useSync } from '../../hooks/useSync.hook'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ const handleFocus = () => {
|
|||||||
const handleBlur = async () => {
|
const handleBlur = async () => {
|
||||||
focus.value = false
|
focus.value = false
|
||||||
chartEditStore.setProjectInfo(ProjectInfoEnum.PROJECT_NAME, title.value || '')
|
chartEditStore.setProjectInfo(ProjectInfoEnum.PROJECT_NAME, title.value || '')
|
||||||
const res = (await updateProjectApi({
|
const res = (await renameProjectApi({
|
||||||
id: fetchRouteParamsLocation(),
|
id: fetchRouteParamsLocation(),
|
||||||
projectName: title.value
|
projectName: title.value
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user