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)