This commit is contained in:
qsh
2025-03-03 17:44:39 +08:00
parent 039ab28c15
commit 770d700ba1
11 changed files with 205 additions and 61 deletions

View File

@@ -20,7 +20,13 @@
<div style="width: 300px; border-right: 1px solid #eee">
<div style="display: flex; justify-content: space-between; padding-right: 20px">
<div style="font-size: 18px; font-weight: bold">密卷</div>
<el-button type="primary" link @click="addMjItem">新增</el-button>
<el-button
type="primary"
link
@click="addMjItem"
v-hasPermi="['xj-applet:vip-data:mj:add']"
>新增</el-button
>
</div>
<el-radio-group
v-model="mjIndex"
@@ -30,8 +36,20 @@
<el-radio v-for="(item, index) in mjList" :key="index" :label="index" class="flex-radio">
<div style="flex: 1; width: 100px">{{ getMjTitle(index) }}</div>
<div style="padding-right: 15px">
<el-button type="primary" link @click="removeMj(item)">删除</el-button>
<el-button type="primary" link @click="clearMjDetail(item)">清空</el-button>
<el-button
type="primary"
link
@click="removeMj(item)"
v-hasPermi="['xj-applet:vip-data:mj:remove']"
>删除</el-button
>
<el-button
type="primary"
link
@click="clearMjDetail(item)"
v-hasPermi="['xj-applet:vip-data:mj:clear']"
>清空</el-button
>
</div>
</el-radio>
</el-radio-group>
@@ -45,7 +63,12 @@
当前密卷{{ getMjTitle(mjIndex) }}
</div>
<div style="margin-left: 10px; margin-right: 10px"> 题目数{{ tableList.length }} </div>
<el-button type="primary" @click="addMjDetail">新增密卷试题</el-button>
<el-button
type="primary"
@click="addMjDetail"
v-hasPermi="['xj-applet:vip-data:mj:add-question']"
>新增密卷试题</el-button
>
</div>
<el-table
v-loading="loading"
@@ -85,7 +108,13 @@
<el-table-column label="操作" align="center" width="100px">
<template #default="{ row }">
<el-button type="primary" link @click="takeoutMj(row)">移出密卷</el-button>
<el-button
type="primary"
link
@click="takeoutMj(row)"
v-hasPermi="['xj-applet:vip-data:mj:remove-question']"
>移出密卷</el-button
>
</template>
</el-table-column>
</el-table>

View File

@@ -18,6 +18,7 @@
<el-form-item>
<el-button
type="primary"
v-hasPermi="['xj-applet:vip-data:jx:search']"
@click="
() => {
queryParams.pageNo = 1
@@ -27,7 +28,9 @@
>
查询
</el-button>
<el-button type="primary" @click="addMjDetail">新增精选试题</el-button>
<el-button type="primary" @click="addMjDetail" v-hasPermi="['xj-applet:vip-data:jx:add']">
新增精选试题
</el-button>
</el-form-item>
</el-row>
</el-form>
@@ -62,7 +65,15 @@
</el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template #default="{ row }">
<el-button size="small" type="primary" link @click="takeoutMj(row)">移出精选</el-button>
<el-button
size="small"
type="primary"
link
@click="takeoutMj(row)"
v-hasPermi="['xj-applet:vip-data:jx:remove']"
>
移出精选
</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -1,15 +1,16 @@
<template>
<el-tabs v-model="tabIndex">
<el-tab-pane label="精选题" :name="1">
<el-tab-pane label="精选题" :name="1" v-if="checkPermi(['xj-applet:vip-data:jx'])">
<SimpleData v-if="tabIndex == 1" />
</el-tab-pane>
<el-tab-pane label="密卷" :name="2">
<el-tab-pane label="密卷" :name="2" v-if="checkPermi(['xj-applet:vip-data:mj'])">
<SecretData v-if="tabIndex == 2" />
</el-tab-pane>
</el-tabs>
</template>
<script setup name="VipData">
import { checkPermi } from '@/utils/permission'
import SimpleData from './conponents/SimpleData.vue'
import SecretData from './conponents/SecretData.vue'