瀏覽代碼

feat: 保存

gemercheung 1 年之前
父節點
當前提交
8295965751
共有 4 個文件被更改,包括 26 次插入2 次删除
  1. 3 1
      src/components/infoBox.vue
  2. 2 0
      src/views/collect-detail.vue
  3. 2 0
      src/views/info-detail.vue
  4. 19 1
      src/views/survey-detail.vue

+ 3 - 1
src/components/infoBox.vue

@@ -53,7 +53,8 @@ defineProps({
 </style>
 <style lang="scss" scoped>
 .n-card.info-box {
-  padding: 0.625rem;
+  padding: 1.25rem;
+ 
   --n-padding-left: 0 !important;
   --n-padding-bottom: 0 !important;
   // width: 32.1875rem;
@@ -75,6 +76,7 @@ defineProps({
   .title {
     font-size: 1.625rem;
     margin: 0.9375rem 0;
+    min-height: 5.25rem;
   }
   .info-line {
     display: flex;

+ 2 - 0
src/views/collect-detail.vue

@@ -54,6 +54,8 @@ onMounted(() => {
   if (props.id) {
     collectStore.getDetail(props.id);
   }
+});
+watchEffect(() => {
   if (unref(entity).name) {
     document.title = unref(entity).name;
   }

+ 2 - 0
src/views/info-detail.vue

@@ -79,6 +79,8 @@ onMounted(() => {
   if (props.id) {
     infoStore.getDetail(props.id);
   }
+});
+watchEffect(() => {
   if (unref(detail)) {
     document.title = unref(detail).name;
   }

+ 19 - 1
src/views/survey-detail.vue

@@ -36,7 +36,9 @@
                         {{ answer.name }}
                       </n-radio>
                     </n-space>
+
                     <n-space
+                      v-if="detail.hasDiy"
                       align="center"
                       style="margin-top: 15px; min-width: 450px"
                     >
@@ -67,6 +69,22 @@
                         :label="answer.name"
                       />
                     </n-space>
+      
+                    <n-space
+                      v-if="detail.hasDiy"
+                      align="center"
+                      style="margin-top: 15px; min-width: 450px"
+                    >
+                      <n-checkbox key="diy" value="diy"> 其他 </n-checkbox>
+                      <n-input
+                        style="min-width: 450px"
+                        round
+                        maxlength="100"
+                        show-count
+                        placeholder="请输入内容 最多100字"
+                        v-model:value="detail[`custom-${detail['id']}`]"
+                      />
+                    </n-space>
                   </n-checkbox-group>
                 </n-space>
               </template>
@@ -98,7 +116,7 @@ import sideMenu from "../components/sideMenu";
 import heroSubTitle from "../components/heroSubTitle";
 import { useSurveyStore } from "../store/survey";
 const surveyStore = useSurveyStore();
-const title = ref("detail");
+const title = ref("问卷调查");
 const message = useMessage();
 const details = computed(() => surveyStore.details);