From f6e3778a2d9da784a70cd97a3a8a6640f39b119c Mon Sep 17 00:00:00 2001 From: sudoooooo Date: Wed, 14 Aug 2024 21:32:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/management/stores/edit.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web/src/management/stores/edit.ts b/web/src/management/stores/edit.ts index 2568f523..6d19f76d 100644 --- a/web/src/management/stores/edit.ts +++ b/web/src/management/stores/edit.ts @@ -367,16 +367,18 @@ function usePageEdit( if (pageConf.value.length <= 1) return const { startIndex, endIndex } = getSorter(index) const newQuestionList = _cloneDeep(questionDataList.value) - const deleteFields = newQuestionList.slice(startIndex, endIndex - startIndex).map(i => i.field) - + const deleteFields = newQuestionList + .slice(startIndex, endIndex - startIndex) + .map((i) => i.field) + // 删除分页判断题目是否存在逻辑关联 const hasLogic = deleteFields.filter((field) => { const { hasShowLogic } = useShowLogicInfo(field) const { hasJumpLogic } = useJumpLogicInfo(field) return hasShowLogic || hasJumpLogic }) - if(hasLogic.length) { - ElMessageBox.alert('该分页下有题目被显示或跳转逻辑关联,请先清除逻辑依赖', '提示', { + if (hasLogic.length) { + ElMessageBox.alert('该分页下有题目被显示或跳转逻辑关联,请先清除', '提示', { confirmButtonText: '确定', type: 'warning' }) @@ -488,8 +490,8 @@ export const useEditStore = defineStore('edit', () => { const schemaUpdateTime = ref(Date.now()) const { schema, initSchema, getSchemaFromRemote, showLogicEngine, jumpLogicEngine } = useInitializeSchema(surveyId, () => { - editGlobalBaseConf.initCounts() - }) + editGlobalBaseConf.initCounts() + }) const questionDataList = toRef(schema, 'questionDataList') const editGlobalBaseConf = useEditGlobalBaseConf(questionDataList, updateTime)