8/31 dev 权限,sse,账单,bug

This commit is contained in:
Zy
2026-08-31 08:09:28 +08:00
parent bfdfa05cd7
commit e4417f35b1
82 changed files with 2327 additions and 1644 deletions

View File

@@ -2,19 +2,24 @@
<div class="p-2 h-full flex flex-col">
<PageHeader></PageHeader>
<el-card class="mt-20px" style="min-height: 80px">
<div class="tabs">
<div class="tab-item" :class="{ 'active': activeTab == 'preview' }" @click="handleTabClick('preview')">
<div class="tab-content">问卷预览</div>
<div class="flex justify-between">
<div class="tabs">
<div :class="{ 'active': activeTab == 'preview' }" class="tab-item" @click="handleTabClick('preview')">
<div class="tab-content">问卷预览</div>
</div>
<div :class="{ 'active': activeTab == 'detail' }" class="tab-item" @click="handleTabClick('detail')">
<div class="tab-content">调查详情</div>
</div>
</div>
<div class="tab-item" :class="{ 'active': activeTab == 'detail' }" @click="handleTabClick('detail')">
<div class="tab-content">调查详情</div>
<div class="tabs">
<el-button @click="handleBack">返回</el-button>
</div>
</div>
</el-card>
<div class="flex-1 mt-20px">
<el-card v-if="activeTab == 'preview'">
<div class="container_box flex-1">
<div class="contentBox h-full" v-loading="viewLoading">
<div v-loading="viewLoading" class="contentBox h-full">
<div class="detail-header">
<h2>{{ viewData.title }}</h2>
<p style="color: #666">{{ viewData.description }}</p>
@@ -24,7 +29,7 @@
<div v-for="(q, index) in viewData.content" :key="q.cid" class="question-item">
<div class="title">
<span style="font-weight: bold">{{ index + 1 }}. {{ q.title }}</span>
<span style="color: #f56c6c; margin-left: 5px" v-if="q.required">*</span>
<span v-if="q.required" style="color: #f56c6c; margin-left: 5px">*</span>
</div>
<div class="type-tag">
<el-tag size="small">{{ getComponentLabel(q.type) }}</el-tag>
@@ -42,7 +47,7 @@
<el-input disabled placeholder="用户输入区域" />
</div>
<div v-else-if="q.type === 'textarea'" class="input-placeholder">
<el-input disabled type="textarea" placeholder="用户输入区域" />
<el-input disabled placeholder="用户输入区域" type="textarea" />
</div>
</div>
</div>
@@ -56,25 +61,25 @@
<el-card v-else-if="activeTab == 'detail'">
<div>
<el-table :data="list" style="width: 100%">
<el-table-column prop="answerName" label="答题人" />
<el-table-column prop="type" label="提交时间" />
<el-table-column prop="options" label="操作">
<el-table-column label="答题人" prop="answerName" />
<el-table-column label="提交时间" prop="type" />
<el-table-column label="操作" prop="options">
<template #default="scope">
<el-button type="primary" link @click="handleGetMain(scope.row.id)">查看详情</el-button>
<el-button link type="primary" @click="handleGetMain(scope.row.id)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
</div>
</el-card>
</div>
<el-dialog :title="dialog.title" v-model="dialog.visible" width="680px" append-to-body>
<el-dialog v-model="dialog.visible" :title="dialog.title" append-to-body width="680px">
<el-form ref="houseRentalFormRef" :model="form.content" label-width="120px">
<div class="detail-header">
<h2>{{ viewData.title }}</h2>
@@ -85,7 +90,7 @@
<div v-for="(q, index) in form.content" :key="q.cid" class="question-item">
<div class="title">
<span style="font-weight: bold">{{ index + 1 }}. {{ q.title }}</span>
<span style="color: #f56c6c; margin-left: 5px" v-if="q.required">*</span>
<span v-if="q.required" style="color: #f56c6c; margin-left: 5px">*</span>
</div>
<div class="type-tag">
<el-tag size="small">{{ getComponentLabel(q.type) }}</el-tag>
@@ -96,7 +101,7 @@
<el-radio-group v-model="q.value as string">
<div>
<div v-for="(opt, idx) in q.options" :key="idx">
<el-radio disabled :value="opt.label">{{ opt.label }}</el-radio>
<el-radio :value="opt.label" disabled>{{ opt.label }}</el-radio>
</div>
</div>
</el-radio-group>
@@ -104,16 +109,16 @@
<div v-if="q.type === 'checkbox'" class="options">
<el-checkbox-group v-model="q.value as string[]">
<div v-for="(opt, idx) in q.options" :key="idx">
<el-checkbox disabled :label="opt.label" :value="opt.label" />
<el-checkbox :label="opt.label" :value="opt.label" disabled />
</div>
</el-checkbox-group>
</div>
<!-- 填空题/多行文本展示 -->
<div v-else-if="q.type === 'input'" class="input-placeholder">
<el-input disabled placeholder="" v-model="q.value as string" />
<el-input v-model="q.value as string" disabled placeholder="" />
</div>
<div v-else-if="q.type === 'textarea'" class="input-placeholder">
<el-input disabled type="textarea" placeholder="" v-model="q.value as string" />
<el-input v-model="q.value as string" disabled placeholder="" type="textarea" />
</div>
</div>
</div>
@@ -126,7 +131,7 @@
</div>
</template>
<script setup lang="ts">
<script lang="ts" setup>
import { getQuestionnaire, getQuestionnaireAnswer, getQuestionnaireAnswerMain } from '@/api/system/Questionnaire';
import { QuestionComponentItem } from '@/api/system/Questionnaire/type';
import { ref } from 'vue';
@@ -198,6 +203,10 @@ function init() {
});
}
init();
const router = useRouter();
function handleBack() {
router.back();
}
const dialog = reactive<DialogOption>({
visible: false,
@@ -242,7 +251,7 @@ function handleGetMain(id: string) {
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.tabs {
display: flex;
flex-direction: row;