diff --git a/src/App.vue b/src/App.vue index aee81b0..1301bf3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,7 +4,7 @@ import { onMounted } from 'vue'; import appBridge from '@/assets/js/appBridge'; import utils from '@/assets/js/common'; -onMounted(async () => { +onMounted(async() => { if (utils.getParameter('digitalYiliToken')) { // 隐藏/显示 header appBridge.setHeaderShown(false); diff --git a/src/views/Design/components/Questions/MartrixQuestion.vue b/src/views/Design/components/Questions/MartrixQuestion.vue index 2600b0a..844e77a 100644 --- a/src/views/Design/components/Questions/MartrixQuestion.vue +++ b/src/views/Design/components/Questions/MartrixQuestion.vue @@ -13,12 +13,12 @@ const question = defineModel('element', { // eslint-disable-next-line const activeComponent = computed(() => { switch (question.value.question_type) { - case 8: - return MatrixText; - case 9: - return MatrixRadio; - case 10: - return MatrixCheckbox; + case 8: + return MatrixText; + case 9: + return MatrixRadio; + case 10: + return MatrixCheckbox; } }); diff --git a/src/views/Design/components/Questions/NPS.vue b/src/views/Design/components/Questions/NPS.vue index 46d769e..32574d2 100644 --- a/src/views/Design/components/Questions/NPS.vue +++ b/src/views/Design/components/Questions/NPS.vue @@ -30,9 +30,9 @@

{{ element.config.prompt_right }}

diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index c104cde..a99bef1 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -9,7 +9,7 @@ import { showFailToast } from 'vant'; const contentShow = ref(false); const show = ref(false); -onMounted(async () => { +onMounted(async() => { if (utils.getSessionStorage('xToken')) { const appToken = utils.getSessionStorage('xToken'); getUserInfo(appToken) diff --git a/src/views/Home/components/LastSurvey/Index.vue b/src/views/Home/components/LastSurvey/Index.vue index ec1549c..1d01dd5 100644 --- a/src/views/Home/components/LastSurvey/Index.vue +++ b/src/views/Home/components/LastSurvey/Index.vue @@ -61,7 +61,7 @@ import endPng from '@/assets/img/publish/end.png'; const survey = ref({ project_name: '' }); -const fetchSurveys = async () => { +const fetchSurveys = async() => { const params = { page: 1, per_page: 10, diff --git a/src/views/Survey/Index.vue b/src/views/Survey/Index.vue index b737ff5..67f3816 100644 --- a/src/views/Survey/Index.vue +++ b/src/views/Survey/Index.vue @@ -134,7 +134,7 @@ const onLoad = () => { fetchSurveys(); }, 500); }; -const fetchSurveys = async () => { +const fetchSurveys = async() => { const params = { page: form.value.page, per_page: form.value.pageSize, @@ -172,7 +172,7 @@ const deleteItem = (item) => { showCancelButton: true, confirmButtonColor: '#03B03C' }) - .then(async () => { + .then(async() => { const res = await deleteSurveys(item.sn); if (res.data.message) { showToast(res.data.message); @@ -196,7 +196,7 @@ const copyItem = (item) => { showCancelButton: true, confirmButtonColor: '#03B03C' }) - .then(async () => { + .then(async() => { const res = await copySurveys(item.sn); if (res.data.code === 200 || res.data.code === 201) { showSuccessToast('复制成功'); @@ -237,7 +237,7 @@ const editItem = (item) => { }); }; // 保存为模板 -const saveTemplate = async (item) => { +const saveTemplate = async(item) => { const data = JSON.parse(JSON.stringify(item)); const res = await saveTemplates(item.sn, data); if (res.data.code === 200 || res.data.code === 201) { diff --git a/src/views/Survey/views/Create/Index.vue b/src/views/Survey/views/Create/Index.vue index 26f3a31..c6987eb 100644 --- a/src/views/Survey/views/Create/Index.vue +++ b/src/views/Survey/views/Create/Index.vue @@ -271,8 +271,8 @@ { options: item.json.options.length > 0 ? item.json.options.map((item) => { - return item.map((it) => { - return { - ...it, - // 主键生成 - id: uuidv4() - }; - }); - }) + return item.map((it) => { + return { + ...it, + // 主键生成 + id: uuidv4() + }; + }); + }) : [] }) ); @@ -579,7 +579,7 @@ const previewQuestion = () => { router.push({ name: 'preview', query: { ...route.query } }); }; -onMounted(async () => { +onMounted(async() => { await getQuestionDetail(); }); @@ -795,6 +795,7 @@ onMounted(async () => { :deep(.van-cell) { padding: 8px; } + .survey-action { position: fixed; bottom: 0;