diff --git a/.env.development b/.env.development index 4a6493c..12fb88a 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # .env.development -VITE_APP_BASEURL=http://192.168.8.165:15011/ +VITE_APP_BASEURL=https://yls-api-uat.dctest.digitalyili.com/ VITE_APP_ENV=development VITE_APP_CURRENTMODE=dev VITE_APP_BASEOSS=https://diaoyan-files.automark.cc diff --git a/auto-imports.d.ts b/auto-imports.d.ts index b0b0357..9d24007 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -5,4 +5,6 @@ // Generated by unplugin-auto-import // biome-ignore lint: disable export {} -declare global {} +declare global { + +} diff --git a/components.d.ts b/components.d.ts index b42a979..548e5af 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,6 +8,7 @@ export {} declare module 'vue' { export interface GlobalComponents { Contenteditable: typeof import('./src/components/contenteditable.vue')['default'] + RichText: typeof import('./src/components/RichText.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] VanActionSheet: typeof import('vant/es')['ActionSheet'] @@ -16,18 +17,14 @@ declare module 'vue' { VanCellGroup: typeof import('vant/es')['CellGroup'] VanCheckbox: typeof import('vant/es')['Checkbox'] VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup'] - VanCol: typeof import('vant/es')['Col'] VanDivider: typeof import('vant/es')['Divider'] VanField: typeof import('vant/es')['Field'] - VanGrid: typeof import('vant/es')['Grid'] - VanGridItem: typeof import('vant/es')['GridItem'] VanIcon: typeof import('vant/es')['Icon'] VanNavBar: typeof import('vant/es')['NavBar'] VanPicker: typeof import('vant/es')['Picker'] VanPopup: typeof import('vant/es')['Popup'] VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] - VanRow: typeof import('vant/es')['Row'] VanSearch: typeof import('vant/es')['Search'] VanStepper: typeof import('vant/es')['Stepper'] VanSwitch: typeof import('vant/es')['Switch'] diff --git a/src/components/RichText.vue b/src/components/RichText.vue index 21fc6d8..cd635a0 100644 --- a/src/components/RichText.vue +++ b/src/components/RichText.vue @@ -1,9 +1,11 @@ @@ -32,8 +34,8 @@ export default defineComponent({ onClick(evt) { const targetTagName = (evt.target || evt.srcElement).tagName || ''; if (targetTagName.toLowerCase() === 'img') { - evt.stopPropagation() - evt.cancelBubble = true + evt.stopPropagation(); + evt.cancelBubble = true; } } } diff --git a/src/request/api/modules/survey.ts b/src/request/api/modules/survey.ts index 9c65fcc..f475575 100644 --- a/src/request/api/modules/survey.ts +++ b/src/request/api/modules/survey.ts @@ -1 +1 @@ -export const surveyQuestion = 'https://yls-api-uat.dctest.digitalyili.com/api/console/surveys/RWNK9BYp/questions'; \ No newline at end of file +export const surveyQuestion = 'https://yls-api-uat.dctest.digitalyili.com/api/console/surveys/RWNK9BYp/questions'; \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index eb23be3..5027aa9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -49,7 +49,7 @@ const router = createRouter({ path: '/preview', name: 'preview', meta: {}, - component: ()=> import ( '@/views/Survey/views/Preview/Index.vue') + component: () => import('@/views/Survey/views/Preview/Index.vue') }, { path: '/create', diff --git a/src/stores/Questions/useQuestionStore.ts b/src/stores/Questions/useQuestionStore.ts index bb7a5eb..2c93747 100644 --- a/src/stores/Questions/useQuestionStore.ts +++ b/src/stores/Questions/useQuestionStore.ts @@ -31,7 +31,7 @@ export const useQuestionStore = defineStore('questionStore', () => { // 作用未知 const l = ref({}); -// 主题颜色 + // 主题颜色 const themeColor = ref({}); return { @@ -44,7 +44,8 @@ export const useQuestionStore = defineStore('questionStore', () => { loading, prevLoading, localPageTimer, - questions,showPage + questions, + showPage }; }); \ No newline at end of file diff --git a/src/utils/directives/useVFocus.ts b/src/utils/directives/useVFocus.ts index babf717..55ce9d3 100644 --- a/src/utils/directives/useVFocus.ts +++ b/src/utils/directives/useVFocus.ts @@ -8,4 +8,3 @@ export const vFocus: Directive = { el.focus(); } }; - diff --git a/src/utils/request.js b/src/utils/request.js index b0a82e5..d583f16 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -42,10 +42,10 @@ service.interceptors.request.use( service.interceptors.response.use( (response) => { if ( - response.status === 200 || - response.status === 201 || - response.status === 202 || - response.status === 204 + response.status === 200 + || response.status === 201 + || response.status === 202 + || response.status === 204 ) { if (response.config.method === 'put') { // message.success('保存中...'); diff --git a/src/views/Design/Index.vue b/src/views/Design/Index.vue index 0b18fdb..4b65d24 100644 --- a/src/views/Design/Index.vue +++ b/src/views/Design/Index.vue @@ -335,6 +335,9 @@ const actionFun = { // emit 事件 const saveQueItem = (logics, questions, survey) => { + // questions.map((item, index) => { + // item.title = index + 1; + // }); saveQuestion({ sn: route.query.sn, data: { diff --git a/src/views/Design/components/ActionCompoents/QuestionAction.vue b/src/views/Design/components/ActionCompoents/QuestionAction.vue index 712c8e4..442c7a1 100644 --- a/src/views/Design/components/ActionCompoents/QuestionAction.vue +++ b/src/views/Design/components/ActionCompoents/QuestionAction.vue @@ -11,7 +11,12 @@
操作选项
- + @@ -71,7 +72,7 @@ @@ -130,6 +131,7 @@ v-model="actionQuestion.config.line_type" icon-size="0.4rem" direction="horizontal" + @change="emit('saveOption')" > 单行 多行 @@ -165,7 +167,7 @@ label-align="left" input-align="right" class="action-field" - placeholder="不限" + placeholder="" @blur="emit('saveOption')" @update:model-value=" (value) => { @@ -239,6 +241,7 @@ const selectText = (textType) => { const confirm = ({ selectedValues }) => { actionQuestion.value.config.text_type = Number(selectedValues[0]); selectTextTypeModel.value = false; + emit('saveOption'); }; const actionQuestion = computed({ diff --git a/src/views/Design/components/Questions/Completion.vue b/src/views/Design/components/Questions/Completion.vue index eaf5ff4..ec31fdb 100644 --- a/src/views/Design/components/Questions/Completion.vue +++ b/src/views/Design/components/Questions/Completion.vue @@ -17,7 +17,11 @@ > @@ -45,7 +49,6 @@ const props = defineProps({ // 创建一个本地副本以保存更改 const emit = defineEmits(['update:element']); const { element } = toRefs(props); - const emitValue = () => { emit('update:element', element.value); }; @@ -55,7 +58,7 @@ const emitValue = () => { .cont { .other_input { width: 100%; - height: 40px; + min-height: 40px; margin-bottom: 10px; padding: 3px 5px; border: 1px solid #ccc; diff --git a/src/views/Design/components/Questions/MatrixCheckbox.vue b/src/views/Design/components/Questions/MatrixCheckbox.vue index 4a054c1..8c1b40a 100644 --- a/src/views/Design/components/Questions/MatrixCheckbox.vue +++ b/src/views/Design/components/Questions/MatrixCheckbox.vue @@ -1,51 +1,51 @@ \ No newline at end of file + diff --git a/src/views/Design/components/Questions/MatrixRadio.vue b/src/views/Design/components/Questions/MatrixRadio.vue index a1d13ff..bec3123 100644 --- a/src/views/Design/components/Questions/MatrixRadio.vue +++ b/src/views/Design/components/Questions/MatrixRadio.vue @@ -1,79 +1,79 @@ \ No newline at end of file + diff --git a/src/views/Design/components/Questions/MatrixText.vue b/src/views/Design/components/Questions/MatrixText.vue index 76f2ab3..698f35c 100644 --- a/src/views/Design/components/Questions/MatrixText.vue +++ b/src/views/Design/components/Questions/MatrixText.vue @@ -1,56 +1,62 @@ diff --git a/src/views/Survey/views/Preview/Index.vue b/src/views/Survey/views/Preview/Index.vue index fa6ae94..83cb9b3 100644 --- a/src/views/Survey/views/Preview/Index.vue +++ b/src/views/Survey/views/Preview/Index.vue @@ -11,16 +11,18 @@ - - - + - -