mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
chore: 修改项目信息结构
This commit is contained in:
@@ -28,7 +28,7 @@ import { ref, nextTick, computed, watchEffect } from 'vue'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
import { fetchRouteParamsLocation, httpErrorHandle } from '@/utils'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { ProjectInfoEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { updateProjectApi } from '@/api/path/project'
|
||||
import { useSync } from '../../hooks/useSync.hook'
|
||||
import { icon } from '@/plugins'
|
||||
@@ -43,7 +43,7 @@ const inputInstRef = ref(null)
|
||||
const title = ref<string>(fetchRouteParamsLocation())
|
||||
|
||||
watchEffect(() => {
|
||||
title.value = chartEditStore.getEditCanvasConfig.projectName || ''
|
||||
title.value = chartEditStore.getProjectInfo.projectName || ''
|
||||
})
|
||||
|
||||
const comTitle = computed(() => {
|
||||
@@ -60,13 +60,10 @@ const handleFocus = () => {
|
||||
|
||||
const handleBlur = async () => {
|
||||
focus.value = false
|
||||
chartEditStore.setEditCanvasConfig(EditCanvasConfigEnum.PROJECT_NAME, title.value || '')
|
||||
const { remarks, backgroundImage, background } = chartEditStore.getEditCanvasConfig
|
||||
chartEditStore.setProjectInfo(ProjectInfoEnum.PROJECT_NAME, title.value || '')
|
||||
const res:any = await updateProjectApi({
|
||||
id: fetchRouteParamsLocation(),
|
||||
projectName: title.value,
|
||||
indexImage: backgroundImage || background,
|
||||
remarks: remarks
|
||||
})
|
||||
if(res.code === ResultEnum.SUCCESS) {
|
||||
dataSyncUpdate()
|
||||
|
||||
Reference in New Issue
Block a user