任教课程-当前学期/历史学期各功能界面适配手机端样式调整

This commit is contained in:
1378012178@qq.com 2024-12-18 17:24:05 +08:00
parent 387813728f
commit deeea7c3d4
22 changed files with 1607 additions and 742 deletions

View File

@ -379,3 +379,7 @@ Online表单&Online报表&代码生成
## 判断是否小尺寸屏幕
import { useScreenSize } from '/src/utils/screenSize/useScreenSize'
const { isSmallScreen } = useScreenSize();

View File

@ -60,22 +60,29 @@ export function useModal(): UseModalReturnType {
getInstance()?.redoModalHeight?.(); getInstance()?.redoModalHeight?.();
}, },
openModal: <T = any>(visible = true, data?: T, openOnSet = true): void => { openModal: <T = any>(visible = true, data?: T, openOnSet = true, options?: { onOpen?: () => void; onClose?: () => void }): void => {
getInstance()?.setModalProps({ getInstance()?.setModalProps({
visible: visible, visible: visible,
}); });
if (!data) return; if (!data) return;
const id = unref(uid); const id = unref(uid);
if (openOnSet) { if (openOnSet) {
dataTransfer[id] = null; dataTransfer[id] = null;
dataTransfer[id] = toRaw(data); dataTransfer[id] = toRaw(data);
options?.onOpen?.(); // 打开时调用 onOpen 回调
return; return;
} }
const equal = isEqual(toRaw(dataTransfer[id]), toRaw(data)); const equal = isEqual(toRaw(dataTransfer[id]), toRaw(data));
if (!equal) { if (!equal) {
dataTransfer[id] = toRaw(data); dataTransfer[id] = toRaw(data);
} }
if (!visible && options?.onClose) {
options.onClose(); // 关闭时调用 onClose 回调
}
}, },
closeModal: () => { closeModal: () => {

View File

@ -111,6 +111,7 @@
props: tinymceProps, props: tinymceProps,
emits: ['change', 'update:modelValue', 'inited', 'init-error'], emits: ['change', 'update:modelValue', 'inited', 'init-error'],
setup(props, { emit, attrs }) { setup(props, { emit, attrs }) {
const showImageUpload = ref(false);
const editorRef = ref<Nullable<Editor>>(null); const editorRef = ref<Nullable<Editor>>(null);
const fullscreen = ref(false); const fullscreen = ref(false);
const tinymceId = ref<string>(buildShortUUID('tiny-vue')); const tinymceId = ref<string>(buildShortUUID('tiny-vue'));
@ -145,7 +146,7 @@
return { return {
selector: `#${unref(tinymceId)}`, selector: `#${unref(tinymceId)}`,
height, height,
toolbar, toolbar: [...toolbar, 'customImageUpload'],
menubar: menubar, menubar: menubar,
plugins, plugins,
// external_plugins: { // external_plugins: {
@ -185,6 +186,15 @@
...options, ...options,
setup: (editor: Editor) => { setup: (editor: Editor) => {
editorRef.value = editor; editorRef.value = editor;
editor.ui.registry.addButton('customImageUpload', {
text: 'Insert Image',
onAction: () => {
// ImgUpload
showImageUpload.value = true;
}
});
editor.on('init', (e) => initSetup(e)); editor.on('init', (e) => initSetup(e));
}, },
}; };

View File

@ -0,0 +1,33 @@
import { computed, onMounted, onUnmounted } from 'vue';
interface UseScreenSizeReturn {
isSmallScreen: import('vue').ComputedRef<boolean>;
}
export function useScreenSize(): UseScreenSizeReturn {
// 计算是否为小屏设备
const isSmallScreen = computed<boolean>(() => window.innerWidth < 600); // 根据需要调整断点
// 更新 isSmallScreen 的函数(这里不需要单独的更新函数,因为计算属性会自动响应变化)
// 当组件挂载时添加事件监听器以响应窗口大小的变化
onMounted(() => {
const updateIsSmallScreen = () => {
// 强制重新计算计算属性,确保响应式更新
isSmallScreen.value;
};
window.addEventListener('resize', updateIsSmallScreen);
updateIsSmallScreen(); // 初始化调用一次
});
// 当组件卸载时移除事件监听器
onUnmounted(() => {
window.removeEventListener('resize', () => {
});
});
return {
isSmallScreen,
};
}

View File

@ -1,5 +1,5 @@
<template> <template>
><div id="siteMain"> <div id="siteMain">
<div id="maxSite"> <div id="maxSite">
<a-layout> <a-layout>
<!-- 页头 --> <!-- 页头 -->
@ -62,7 +62,7 @@
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span >题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
> >
</template> </template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-radio-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px"> <a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span> <span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span>
@ -71,6 +71,23 @@
</a-radio> </a-radio>
</div> </div>
</a-radio-group> </a-radio-group>
<a-radio-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2" class="radio-item">
<!-- Radio 按钮和标题 -->
<div style="display: flex; align-items: center;">
<a-radio :value="tmxx.itemIndex + ''">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000;"></span>
</a-radio>
</div>
<!-- 正确答案和选择人数 -->
<div style="display: flex; justify-content: space-between; margin-top: 5px;padding-left:20px;height: 25px;">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" >选择人数{{ tmxx.num }}</span>
</div>
<!-- 分隔线仅在不是最后一个选项时显示 -->
<hr v-if="index2 !== item.wjxWjxxTmxxList.length - 1" class="divider-line"/>
</div>
</a-radio-group>
</a-card> </a-card>
</div> </div>
<!-- 多选题 --> <!-- 多选题 -->
@ -82,7 +99,28 @@
>题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span >题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span
> >
</template> </template>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-checkbox-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<!-- Checkbox and Title -->
<div style="display: flex; flex-direction: column;">
<a-checkbox :value="tmxx.itemIndex" style="flex: 1 0 auto; width: 100%; margin-bottom: 5px;">
<div style="width: 100%; font-size: 16px; color: #000; word-break: break-all; white-space: normal;">
<span v-html="tmxx.itemTitle"></span>
</div>
</a-checkbox>
<!-- Correct Answer and Selection Count -->
<div style="display: flex; align-items: center; height: 50px;"
:style="{ 'border-bottom': index2 !== item.wjxWjxxTmxxList.length - 1 ? '1px solid #ccc' : 'none' }">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; flex: 1; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" style="text-align: right; padding-right: 10px; flex: 1;">选择人数{{ tmxx.num }}</span>
</div>
</div>
</a-col>
</a-row>
</a-checkbox-group>
<a-checkbox-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row> <a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px"> <a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px">
@ -96,7 +134,39 @@
</a-card> </a-card>
</div> </div>
<!-- 填空题 --> <!-- 填空题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && isSmallScreen">
<a-card>
<!-- 确保正确答案正确人数错误人数各占一行 -->
<div style="text-align: left;">
<!-- 正确答案独占一行 -->
<div v-if="item.wjAnswer" style="color: #9e9e9e; margin-bottom: 4px;">
(正确答案: {{ item.wjAnswer }})
</div>
<!-- 正确人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
正确人数{{ item.num }}
</div>
<!-- 错误人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
错误人数{{ item.num2 }}
</div>
</div>
<!-- 题目类型和分值独占一行 -->
<template #extra v-if="zyInfo.atype == 6">
<div style="display: flex;justify-content: space-between;align-items: center;">
<!-- 确保填空题独占一行 -->
<div>
<span class="question-type">填空题</span>
</div>
<!-- 确保题目分值独占一行 -->
<div>
<span style="margin-left: 10px;">题目分值<span class="answer-word">{{ item.wjScore }}</span> </span>
</div>
</div>
</template>
</a-card>
</div>
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && !isSmallScreen">
<a-card> <a-card>
<template #title> <template #title>
<span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span> <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
@ -116,13 +186,14 @@
<!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</span> --> <!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</span> -->
<!-- <span class="tjfx-zql">正确率15%</span> --> <!-- <span class="tjfx-zql">正确率15%</span> -->
<a-card> <a-card>
<template #title> <template #title v-if="!isSmallScreen">
<j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload> <j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
<!-- <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> --> <!-- <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> -->
<!-- <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span> <!-- <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span> <span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> --> <span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> -->
</template> </template>
<j-upload v-if="isSmallScreen" v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">文件题</span> <span class="question-type" style="margin-left: 40px">文件题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
@ -148,11 +219,11 @@
<!-- 单选题 --> <!-- 单选题 -->
<div style="width: 98%; margin: 0 auto"> <div style="width: 98%; margin: 0 auto">
<a-row :span="24"> <a-row :span="24">
<a-col :span="12"> <a-col :span="24" :lg="{span:12}">
<pie :chartData="getPieData(item)" :option="pieOption" height="300px" style="width: 500px" /> <pie :chartData="getPieData(item)" :option="pieOption" :height="isSmallScreen?'20vh':'300px'" class="char-class" />
</a-col> </a-col>
<a-col :span="12"> <a-col :span="24" :lg="{span:12}">
<BarMulti :chartData="getBarData(item)" :option="multiBarOption" height="300px" style="width: 500px"></BarMulti> <BarMulti :chartData="getBarData(item)" :option="multiBarOption" :height="isSmallScreen?'30vh':'300px'" class="char-class"></BarMulti>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -178,7 +249,7 @@
</template> </template>
<script lang="ts" name="zyInfo-zyInfo" setup> <script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive, onMounted, unref, onBeforeUnmount } from 'vue'; import { ref, reactive, onMounted, unref, onBeforeUnmount, onUnmounted, watchEffect } from 'vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
@ -275,6 +346,22 @@ onMounted(() => {
function clear() { function clear() {
intervalId && window.clearInterval(intervalId); intervalId && window.clearInterval(intervalId);
} }
const isSmallScreen = ref(false);
const checkScreenSize = () => {
isSmallScreen.value = window.innerWidth <= 768; //
};
//
watchEffect(() => {
checkScreenSize();
const resizeObserver = () => checkScreenSize();
window.addEventListener('resize', resizeObserver);
onUnmounted(() => {
window.removeEventListener('resize', resizeObserver);
});
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -491,6 +578,18 @@ function clear() {
position: absolute; position: absolute;
right: 15px; right: 15px;
} }
@media (max-width: 768px) { /* 根据需要调整这个宽度 */
.tjfx-xzrs {
font-size: 12px;
}
}
.divider-line {
border: none;
height: 1px;
background-color: #e0e0e0; /* 淡灰色 */
margin: 10px 0; /* 上下间距 */
}
.tjfx-xzrs1 { .tjfx-xzrs1 {
margin-left: 30px; margin-left: 30px;
font-size: 12px; font-size: 12px;
@ -548,4 +647,16 @@ function clear() {
} }
} }
} }
@media (max-width: 768px) {
.char-class{
width:70vw;
}
}
@media (min-width: 769px) {
.char-class{
width:300px;
}
}
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
><div id="siteMain"> <div id="siteMain">
<div id="maxSite"> <div id="maxSite">
<a-layout> <a-layout>
<!-- 页头 --> <!-- 页头 -->
@ -62,7 +62,7 @@
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span >题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
> >
</template> </template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-radio-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px"> <a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span> <span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span>
@ -71,6 +71,23 @@
</a-radio> </a-radio>
</div> </div>
</a-radio-group> </a-radio-group>
<a-radio-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2" class="radio-item">
<!-- Radio 按钮和标题 -->
<div style="display: flex; align-items: center;">
<a-radio :value="tmxx.itemIndex + ''">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000;"></span>
</a-radio>
</div>
<!-- 正确答案和选择人数 -->
<div style="display: flex; justify-content: space-between; margin-top: 5px;padding-left:20px;height: 25px;">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" >选择人数{{ tmxx.num }}</span>
</div>
<!-- 分隔线仅在不是最后一个选项时显示 -->
<hr v-if="index2 !== item.wjxWjxxTmxxList.length - 1" class="divider-line"/>
</div>
</a-radio-group>
</a-card> </a-card>
</div> </div>
<!-- 多选题 --> <!-- 多选题 -->
@ -82,7 +99,28 @@
>题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span >题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span
> >
</template> </template>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-checkbox-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<!-- Checkbox and Title -->
<div style="display: flex; flex-direction: column;">
<a-checkbox :value="tmxx.itemIndex" style="flex: 1 0 auto; width: 100%; margin-bottom: 5px;">
<div style="width: 100%; font-size: 16px; color: #000; word-break: break-all; white-space: normal;">
<span v-html="tmxx.itemTitle"></span>
</div>
</a-checkbox>
<!-- Correct Answer and Selection Count -->
<div style="display: flex; align-items: center; height: 50px;"
:style="{ 'border-bottom': index2 !== item.wjxWjxxTmxxList.length - 1 ? '1px solid #ccc' : 'none' }">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; flex: 1; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" style="text-align: right; padding-right: 10px; flex: 1;">选择人数{{ tmxx.num }}</span>
</div>
</div>
</a-col>
</a-row>
</a-checkbox-group>
<a-checkbox-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row> <a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px"> <a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px">
@ -96,7 +134,39 @@
</a-card> </a-card>
</div> </div>
<!-- 填空题 --> <!-- 填空题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && isSmallScreen">
<a-card>
<!-- 确保正确答案正确人数错误人数各占一行 -->
<div style="text-align: left;">
<!-- 正确答案独占一行 -->
<div v-if="item.wjAnswer" style="color: #9e9e9e; margin-bottom: 4px;">
(正确答案: {{ item.wjAnswer }})
</div>
<!-- 正确人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
正确人数{{ item.num }}
</div>
<!-- 错误人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
错误人数{{ item.num2 }}
</div>
</div>
<!-- 题目类型和分值独占一行 -->
<template #extra v-if="zyInfo.atype == 6">
<div style="display: flex;justify-content: space-between;align-items: center;">
<!-- 确保填空题独占一行 -->
<div>
<span class="question-type">填空题</span>
</div>
<!-- 确保题目分值独占一行 -->
<div>
<span style="margin-left: 10px;">题目分值<span class="answer-word">{{ item.wjScore }}</span> </span>
</div>
</div>
</template>
</a-card>
</div>
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && !isSmallScreen">
<a-card> <a-card>
<template #title> <template #title>
<span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span> <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
@ -116,13 +186,14 @@
<!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</span> --> <!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</span> -->
<!-- <span class="tjfx-zql">正确率15%</span> --> <!-- <span class="tjfx-zql">正确率15%</span> -->
<a-card> <a-card>
<template #title> <template #title v-if="!isSmallScreen">
<j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload> <j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
<!-- <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> --> <!-- <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> -->
<!-- <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span> <!-- <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span> <span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> --> <span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> -->
</template> </template>
<j-upload v-if="isSmallScreen" v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">文件题</span> <span class="question-type" style="margin-left: 40px">文件题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
@ -148,11 +219,11 @@
<!-- 单选题 --> <!-- 单选题 -->
<div style="width: 98%; margin: 0 auto"> <div style="width: 98%; margin: 0 auto">
<a-row :span="24"> <a-row :span="24">
<a-col :span="12"> <a-col :span="24" :lg="{span:12}">
<pie :chartData="getPieData(item)" :option="pieOption" height="300px" style="width: 500px" /> <pie :chartData="getPieData(item)" :option="pieOption" :height="isSmallScreen?'20vh':'300px'" class="char-class" />
</a-col> </a-col>
<a-col :span="12"> <a-col :span="24" :lg="{span:12}">
<BarMulti :chartData="getBarData(item)" :option="multiBarOption" height="300px" style="width: 500px"></BarMulti> <BarMulti :chartData="getBarData(item)" :option="multiBarOption" :height="isSmallScreen?'30vh':'300px'" class="char-class"></BarMulti>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -178,7 +249,7 @@
</template> </template>
<script lang="ts" name="zyInfo-zyInfo" setup> <script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive, onMounted, unref, onBeforeUnmount } from 'vue'; import { ref, reactive, onMounted, unref, onBeforeUnmount , onUnmounted, watchEffect} from 'vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
@ -275,6 +346,23 @@ onMounted(() => {
function clear() { function clear() {
intervalId && window.clearInterval(intervalId); intervalId && window.clearInterval(intervalId);
} }
const isSmallScreen = ref(false);
const checkScreenSize = () => {
isSmallScreen.value = window.innerWidth <= 768; //
};
//
watchEffect(() => {
checkScreenSize();
const resizeObserver = () => checkScreenSize();
window.addEventListener('resize', resizeObserver);
onUnmounted(() => {
window.removeEventListener('resize', resizeObserver);
});
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -491,6 +579,20 @@ function clear() {
position: absolute; position: absolute;
right: 15px; right: 15px;
} }
@media (max-width: 768px) { /* 根据需要调整这个宽度 */
.tjfx-xzrs {
font-size: 12px;
}
}
.divider-line {
border: none;
height: 1px;
background-color: #e0e0e0; /* 淡灰色 */
margin: 10px 0; /* 上下间距 */
}
.tjfx-xzrs1 { .tjfx-xzrs1 {
margin-left: 30px; margin-left: 30px;
font-size: 12px; font-size: 12px;
@ -548,4 +650,15 @@ function clear() {
} }
} }
} }
@media (max-width: 768px) {
.char-class{
width:70vw;
}
}
@media (min-width: 769px) {
.char-class{
width:300px;
}
}
</style> </style>

View File

@ -70,7 +70,7 @@
<div style="text-align: center"> <div style="text-align: center">
<a-button type="primary" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button> <a-button type="primary" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button type="primary" @click="reloadZy"><Icon icon="ant-design:export-outlined" style="margin-right: 10px" />返回</a-button> <a-button type="primary" @click="reloadZy"><Icon icon="ant-design:arrow-left-outlined" style="margin-right: 10px" />返回</a-button>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -92,7 +92,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="region"> <div class="region">
<div class="region-title">基本信息</div> <div class="region-title">基本信息</div>
<a-col :span="24"> <a-col :span="24" class="jbxx-cytm">
<a-form-item label="测验名称" v-bind="validateInfos.title"> <a-form-item label="测验名称" v-bind="validateInfos.title">
<a-input v-model:value="zyInfo.title" placeholder="请输入测验题目" :disabled="editDisabled"></a-input> <a-input v-model:value="zyInfo.title" placeholder="请输入测验题目" :disabled="editDisabled"></a-input>
</a-form-item> </a-form-item>
@ -106,7 +106,7 @@
<a-col :span="24" style="padding: 0 20px" v-if="dataKhnr.length > 0"> <a-col :span="24" style="padding: 0 20px" v-if="dataKhnr.length > 0">
<a-table :columns="columnsKhnr" rowKey="id" :data-source="dataKhnr" :pagination="false" /> <a-table :columns="columnsKhnr" rowKey="id" :data-source="dataKhnr" :pagination="false" />
</a-col> --> </a-col> -->
<a-col :span="24"> <a-col :span="24" class="jbxx-cykssj">
<a-form-item label="测验开始时间" v-bind="validateInfos.startTime"> <a-form-item label="测验开始时间" v-bind="validateInfos.startTime">
<a-date-picker <a-date-picker
placeholder="请选择测验开始时间" placeholder="请选择测验开始时间"
@ -128,13 +128,13 @@
<Icon <Icon
icon="ant-design:question-circle-outlined" icon="ant-design:question-circle-outlined"
:size="20" :size="20"
style="float: right; margin-top: 5px; color: #029c88; margin-right: 19px" class="jbxx-cykssj-ico"
/> />
</a-popover> </a-popover>
</span> </span>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24" class="jbxx-cyjssj">
<a-form-item label="测验结束时间" v-bind="validateInfos.endTime"> <a-form-item label="测验结束时间" v-bind="validateInfos.endTime">
<a-date-picker <a-date-picker
placeholder="请选择测验结束时间" placeholder="请选择测验结束时间"
@ -147,7 +147,7 @@
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24" class="jbxx-ms">
<a-form-item label="描述" v-bind="validateInfos.content"> <a-form-item label="描述" v-bind="validateInfos.content">
<j-editor v-model:value="zyInfo.content" v-if="zyyqShow" @blur="handleZyyqShow(0)" /> <j-editor v-model:value="zyInfo.content" v-if="zyyqShow" @blur="handleZyyqShow(0)" />
<div style="color: #777777" v-html="zyInfo.content" v-if="!zyyqShow"></div> <div style="color: #777777" v-html="zyInfo.content" v-if="!zyyqShow"></div>
@ -157,48 +157,30 @@
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-row style="min-height: 100px"> <a-row :gutter="[16, 0]">
<a-col :span="4" style="padding: 10px"> <a-col :span="24" :lg="{ span: 4 }" style="padding: 10px;">
<a-card title="可选题型" style="height: 370px; border: 1px solid #e8e8e8"> <a-row>
<p <a-col :span="12" :lg="{ span: 24 }">
><a-button type="primary" @click="addTigan(3)" :disabled="editDisabled" <a-card title="可选题型" style="height: 370px; border: 1px solid #e8e8e8;">
>单选题</a-button <p><a-button type="primary" @click="addTigan(3)" :disabled="editDisabled">单选题</a-button></p>
></p <p><a-button type="primary" @click="addTigan(4)" :disabled="editDisabled">多选题</a-button></p>
> <p><a-button type="primary" @click="addTigan(5)" :disabled="editDisabled">填空题</a-button></p>
<p <p><a-button type="primary" @click="addTigan(8)" :disabled="editDisabled">文件题</a-button></p>
><a-button type="primary" @click="addTigan(4)" :disabled="editDisabled" <p><a-button type="primary" @click="addTigan(502)" :disabled="editDisabled">简答题</a-button></p>
>多选题</a-button <p><a-button type="primary" @click="addTigan(305)" :disabled="editDisabled">判断题</a-button></p>
></p </a-card>
> </a-col>
<p <a-col :span="12" :lg="{ span: 24 }">
><a-button type="primary" @click="addTigan(5)" :disabled="editDisabled" <a-card title="引用题库">
>填空题</a-button <p><a-button type="primary" @click="handleYylx('0')" :disabled="editDisabled">我的题库</a-button></p>
></p <p><a-button type="primary" @click="handleYylx('1')" :disabled="editDisabled">公有题库</a-button></p>
> <p><a-button type="primary" @click="importOpen = true" :disabled="editDisabled">导入试题</a-button></p>
<p </a-card>
><a-button type="primary" @click="addTigan(8)" :disabled="editDisabled" </a-col>
>文件题</a-button </a-row>
></p
>
<p
><a-button type="primary" @click="addTigan(502)" :disabled="editDisabled"
>简答题</a-button
></p
>
<p
><a-button type="primary" @click="addTigan(305)" :disabled="editDisabled"
>判断题</a-button
></p
>
</a-card>
<a-card title="引用题库">
<p><a-button type="primary" @click="handleYylx('0')" :disabled="editDisabled">我的题库</a-button></p>
<p><a-button type="primary" @click="handleYylx('1')" :disabled="editDisabled">公有题库</a-button></p>
<p><a-button type="primary" @click="importOpen = true" :disabled="editDisabled">导入试题</a-button></p>
</a-card>
</a-col> </a-col>
<a-col :span="20" style="overflow-y: scroll; min-height: 100px"> <a-col :span="24" :lg="{ span: 20 }" style="overflow-y: scroll; min-height: 100px;">
<draggable @end="end" v-model="tiganData" item-key="id"> <draggable :handle="isSmallScreen ? '.drag-handle' : null" @end="end" v-model="tiganData" item-key="id">
<template #item="{ index, element: item }"> <template #item="{ index, element: item }">
<div> <div>
<!-- 单选题 --> <!-- 单选题 -->
@ -207,10 +189,10 @@
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[单选题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[单选题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select
style="width: 120px" style="width: 120px"
@ -229,6 +211,12 @@
@click="handleDelTigan(item, index)" @click="handleDelTigan(item, index)"
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
<Icon
v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -238,7 +226,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -284,10 +272,10 @@
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[多选题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[多选题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select
style="width: 120px" style="width: 120px"
@ -306,6 +294,12 @@
@click="handleDelTigan(item, index)" @click="handleDelTigan(item, index)"
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
<Icon
v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -315,7 +309,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -362,10 +356,10 @@
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[填空题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[填空题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select
style="width: 120px" style="width: 120px"
@ -385,6 +379,12 @@
@click="handleDelTigan(item, index)" @click="handleDelTigan(item, index)"
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
<Icon
v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -394,7 +394,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -420,18 +420,17 @@
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[文件题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[文件题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select
style="width: 120px" style="width: 120px"
v-model:value="item.wjScore" v-model:value="item.wjScore"
placeholder="请选择分数" placeholder="请选择分数"
v-if="item.wjSfqh == '0'" v-if="item.wjSfqh == '0'"
:disabled="editDisabled" :disabled="editDisabled">
>
<a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option> <a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
</a-select> </a-select>
@ -443,6 +442,12 @@
@click="handleDelTigan(item, index)" @click="handleDelTigan(item, index)"
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
<Icon
v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -452,7 +457,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -466,10 +471,10 @@
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[判断题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[判断题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select
style="width: 120px" style="width: 120px"
@ -488,6 +493,12 @@
@click="handleDelTigan(item, index)" @click="handleDelTigan(item, index)"
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
<Icon
v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -497,7 +508,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -542,10 +553,10 @@
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[简答题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[简答题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select
style="width: 120px" style="width: 120px"
@ -564,6 +575,12 @@
@click="handleDelTigan(item, index)" @click="handleDelTigan(item, index)"
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
<Icon
v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -573,7 +590,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -612,7 +629,7 @@
<span class="title">统计分析</span> <span class="title">统计分析</span>
</a-col> </a-col>
<a-col :span="4" style="text-align: right"> <a-col :span="4" style="text-align: right">
<a-button class="buttonClass" @click="reloadZy" style="margin-right: 10px"><Icon icon="ant-design:export-outlined" />返回</a-button> <a-button class="buttonClass" @click="reloadZy" style="margin-right: 10px"><Icon icon="ant-design:arrow-left-outlined" />返回</a-button>
</a-col> </a-col>
</a-row> </a-row>
<a-divider /> <a-divider />
@ -647,18 +664,18 @@
<a-col :span="24" v-for="(item, index) in tiganData" :key="index"> <a-col :span="24" v-for="(item, index) in tiganData" :key="index">
<div style="width: 100%"> <div style="width: 100%">
<!-- 单选题 --> <!-- 单选题 -->
<div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3"> <div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3 && item.wjSubtype == null">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">单选题</span> <span class="question-type" style="margin-left: 40px">单选题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span >题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
> >
</template> </template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-radio-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px"> <a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span> <span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span>
@ -667,21 +684,59 @@
</a-radio> </a-radio>
</div> </div>
</a-radio-group> </a-radio-group>
<a-radio-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2" class="radio-item">
<!-- Radio 按钮和标题 -->
<div style="display: flex; align-items: center;">
<a-radio :value="tmxx.itemIndex + ''">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000;"></span>
</a-radio>
</div>
<!-- 正确答案和选择人数 -->
<div style="display: flex; justify-content: space-between; margin-top: 5px;padding-left:20px;height: 25px;">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" >选择人数{{ tmxx.num }}</span>
</div>
<!-- 分隔线仅在不是最后一个选项时显示 -->
<hr v-if="index2 !== item.wjxWjxxTmxxList.length - 1" class="divider-line"/>
</div>
</a-radio-group>
</a-card> </a-card>
</div> </div>
<!-- 多选题 --> <!-- 多选题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 4"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 4">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">多选题</span> <span class="question-type" style="margin-left: 40px">多选题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
>题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span >题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span
> >
</template> </template>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-checkbox-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<!-- Checkbox and Title -->
<div style="display: flex; flex-direction: column;">
<a-checkbox :value="tmxx.itemIndex" style="flex: 1 0 auto; width: 100%; margin-bottom: 5px;">
<div style="width: 100%; font-size: 16px; color: #000; word-break: break-all; white-space: normal;">
<span v-html="tmxx.itemTitle"></span>
</div>
</a-checkbox>
<!-- Correct Answer and Selection Count -->
<div style="display: flex; align-items: center; height: 50px;"
:style="{ 'border-bottom': index2 !== item.wjxWjxxTmxxList.length - 1 ? '1px solid #ccc' : 'none' }">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; flex: 1; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" style="text-align: right; padding-right: 10px; flex: 1;">选择人数{{ tmxx.num }}</span>
</div>
</div>
</a-col>
</a-row>
</a-checkbox-group>
<a-checkbox-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row> <a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px"> <a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px">
@ -695,14 +750,47 @@
</a-card> </a-card>
</div> </div>
<!-- 填空题 --> <!-- 填空题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == null && isSmallScreen">
<a-card>
<!-- 确保正确答案正确人数错误人数各占一行 -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div style="text-align: left;">
<!-- 正确答案独占一行 -->
<div v-if="item.wjAnswer" style="color: #9e9e9e; margin-bottom: 4px;">
(正确答案: {{ item.wjAnswer }})
</div>
<!-- 正确人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
正确人数{{ item.num }}
</div>
<!-- 错误人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
错误人数{{ item.num2 }}
</div>
</div>
<!-- 题目类型和分值独占一行 -->
<template #extra v-if="zyInfo.atype == 6">
<div style="display: flex;justify-content: space-between;align-items: center;">
<!-- 确保填空题独占一行 -->
<div>
<span class="question-type" style="margin-left: 40px">填空题</span>
</div>
<!-- 确保题目分值独占一行 -->
<div>
<span style="margin-left: 40px;">题目分值<span class="answer-word">{{ item.wjScore }}</span> </span>
</div>
</div>
</template>
</a-card>
</div>
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == null && !isSmallScreen">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span> <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span> <span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> <span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span>
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">填空题</span> <span class="question-type" style="margin-left: 40px">填空题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
@ -714,9 +802,9 @@
<!-- 文件题 --> <!-- 文件题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 8"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 8">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">文件题</span> <span class="question-type" style="margin-left: 40px">文件题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
@ -727,7 +815,97 @@
<j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload> <j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
</a-card> </a-card>
</div> </div>
<div v-else> 无对应类型 </div> <!-- 解答题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == 5 && isSmallScreen">
<a-card>
<!-- 确保正确答案正确人数错误人数各占一行 -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div style="text-align: left;">
<!-- 正确答案独占一行 -->
<div v-if="item.wjAnswer" style="color: #9e9e9e; margin-bottom: 4px;">
(正确答案: {{ item.wjAnswer }})
</div>
<!-- 正确人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
正确人数{{ item.num }}
</div>
<!-- 错误人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
错误人数{{ item.num2 }}
</div>
</div>
<!-- 题目类型和分值独占一行 -->
<template #extra v-if="zyInfo.atype == 6">
<div style="display: flex;justify-content: space-between;align-items: center;">
<!-- 确保填空题独占一行 -->
<div>
<span class="question-type" style="margin-left: 40px">解答题</span>
</div>
<!-- 确保题目分值独占一行 -->
<div>
<span style="margin-left: 40px;">题目分值<span class="answer-word">{{ item.wjScore }}</span> </span>
</div>
</div>
</template>
</a-card>
</div>
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == 5 && !isSmallScreen">
<a-card>
<!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span>
<!-- </template> -->
<template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">解答题</span>
<span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
>
</template>
</a-card>
</div>
<!-- 判断题 -->
<div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3 && item.wjSubtype == 305">
<a-card>
<!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
<!-- </template> -->
<template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">判断题</span>
<span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
>
</template>
<a-radio-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span>
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案)</span>
<span class="tjfx-xzrs">选择人数{{ tmxx.num }}</span>
</a-radio>
</div>
</a-radio-group>
<a-radio-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2" class="radio-item">
<!-- Radio 按钮和标题 -->
<div style="display: flex; align-items: center;">
<a-radio :value="tmxx.itemIndex + ''">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000;"></span>
</a-radio>
</div>
<!-- 正确答案和选择人数 -->
<div style="display: flex; justify-content: space-between; margin-top: 5px;padding-left:20px;height: 25px;">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" >选择人数{{ tmxx.num }}</span>
</div>
<!-- 分隔线仅在不是最后一个选项时显示 -->
<hr v-if="index2 !== item.wjxWjxxTmxxList.length - 1" class="divider-line"/>
</div>
</a-radio-group>
</a-card>
</div>
<!-- <div v-else> 无对应类型 </div> -->
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -739,9 +917,9 @@
<a-row> <a-row>
<a-col :span="24"><span class="title">布置测验</span><a-divider /></a-col> <a-col :span="24"><span class="title">布置测验</span><a-divider /></a-col>
<a-col :span="24" style="text-align: right; margin-top: 5px"> <a-col :span="24" style="text-align: right; margin-top: 5px">
<a-button type="primary" @click="handleSzzycs(1)" style="margin-top: 10px;"><Icon icon="ant-design:edit-outlined" />修改课程测验次数</a-button> <a-button type="primary" @click="handleSzzycs(1)" style="margin-top: 10px;"><Icon v-if="!isSmallScreen" icon="ant-design:edit-outlined" />修改课程测验次数</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button type="primary" @click="handleAddOne" style="margin-top: 10px;"><Icon icon="ant-design:file-add-outlined" />新增测验</a-button> <a-button type="primary" @click="handleAddOne" style="margin-top: 10px;"><Icon v-if="!isSmallScreen" icon="ant-design:file-add-outlined" />新增测验</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button type="primary" @click="handleTiku('6')" style="margin-left: 8px; margin-right: 18px;margin-top: 10px;">题库</a-button> <a-button type="primary" @click="handleTiku('6')" style="margin-left: 8px; margin-right: 18px;margin-top: 10px;">题库</a-button>
</a-col> </a-col>
@ -854,7 +1032,7 @@
<template #overlay> <template #overlay>
<a-menu> <a-menu>
<a-menu-item> <a-menu-item>
<a href="javascript:;" disabled style="color: #9e9e9e">设置测验</a> <a href="javascript:;" disabled style="color: #9e9e9e">设置测验</a>
</a-menu-item> </a-menu-item>
<!-- <a-menu-item> <!-- <a-menu-item>
<a href="javascript:;" disabled style="color: #9e9e9e">修改题目</a> <a href="javascript:;" disabled style="color: #9e9e9e">修改题目</a>
@ -870,11 +1048,12 @@
<a-col :md="4" :xs="12"> <a-col :md="4" :xs="12">
<span style="margin-left: 10px"> <span style="margin-left: 10px">
<a-dropdown> <a-dropdown>
<a class="ant-dropdown-link" @click.prevent <a class="ant-dropdown-link" @click.prevent="handleViewEwm(item)" >
><Icon icon="ant-design:setting-outlined" @click="handleViewEwm(item)" /><span @click="handleViewEwm(item)"> 发送问卷</span> <Icon icon="ant-design:setting-outlined" />
<span> 发送问卷</span>
</a> </a>
<template #overlay> <template #overlay>
<a-menu> <a-menu v-show="!ewmvisible">
<a-menu-item> <a-menu-item>
<a href="javascript:;" @click="handleViewEwm(item)">链接&二维码</a> <a href="javascript:;" @click="handleViewEwm(item)">链接&二维码</a>
<!-- <QrCode :value="qrCodeUrl" class="enter-x flex justify-center xl:justify-start" :width="280" /> --> <!-- <QrCode :value="qrCodeUrl" class="enter-x flex justify-center xl:justify-start" :width="280" /> -->
@ -1087,7 +1266,7 @@
</template> </template>
<script lang="ts" name="zyInfo-zyInfo" setup> <script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive, onMounted, unref } from 'vue'; import { ref, reactive, onMounted, unref, onUnmounted, watchEffect } from 'vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
@ -2295,16 +2474,66 @@ function openXkrs(record) {
XxhbbksListModalPage.value.init(record); XxhbbksListModalPage.value.init(record);
} }
const isSmallScreen = ref(false);
const checkScreenSize = () => {
isSmallScreen.value = window.innerWidth <= 768; //
};
//
watchEffect(() => {
checkScreenSize();
const resizeObserver = () => checkScreenSize();
window.addEventListener('resize', resizeObserver);
onUnmounted(() => {
window.removeEventListener('resize', resizeObserver);
});
});
onMounted(() => { onMounted(() => {
reloadZy(); reloadZy();
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.title { @media (max-width: 768px) {
margin-left: 20px; .title {
font-size: 18px; margin-left: 5px;
font-size: 18px;
}
.jbxx-cytm{
padding:10px;
}
.jbxx-cykssj{
padding:10px;
}
.jbxx-cykssj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 0px
}
.jbxx-cyjssj{
padding:10px;
}
.jbxx-ms{
padding:10px;
}
} }
@media (min-width: 769px) {
.title {
margin-left: 20px;
font-size: 18px;
}
.jbxx-cykssj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 19px
}
}
.title2 { .title2 {
font-size: 18px; font-size: 18px;
} }
@ -2577,4 +2806,10 @@ onMounted(() => {
// width: 20rem !important; // width: 20rem !important;
// height: 100px; // height: 100px;
// } // }
.rich-text-container {
white-space: pre-wrap; /* 强制换行 */
word-break: break-all; /* 长单词和 URL 地址换行 */
overflow-wrap: break-word; /* 在长单词内部换行 */
}
</style> </style>

View File

@ -70,7 +70,7 @@
<div style="text-align: center"> <div style="text-align: center">
<!-- <a-button type="primary" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button> --> <!-- <a-button type="primary" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button> -->
<!-- <a-divider type="vertical" /> --> <!-- <a-divider type="vertical" /> -->
<a-button type="primary" @click="reloadZy"><Icon icon="ant-design:export-outlined" style="margin-right: 10px" />返回</a-button> <a-button type="primary" @click="reloadZy"><Icon icon="ant-design:arrow-left-outlined" style="margin-right: 10px" />返回</a-button>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -92,7 +92,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="region"> <div class="region">
<div class="region-title">基本信息</div> <div class="region-title">基本信息</div>
<a-col :span="24"> <a-col :span="24" class="jbxx-cytm">
<a-form-item label="测验名称" v-bind="validateInfos.title"> <a-form-item label="测验名称" v-bind="validateInfos.title">
<a-input v-model:value="zyInfo.title" placeholder="" disabled></a-input> <a-input v-model:value="zyInfo.title" placeholder="" disabled></a-input>
</a-form-item> </a-form-item>
@ -106,7 +106,7 @@
<a-col :span="24" style="padding: 0 20px" v-if="dataKhnr.length > 0"> <a-col :span="24" style="padding: 0 20px" v-if="dataKhnr.length > 0">
<a-table :columns="columnsKhnr" rowKey="id" :data-source="dataKhnr" :pagination="false" /> <a-table :columns="columnsKhnr" rowKey="id" :data-source="dataKhnr" :pagination="false" />
</a-col> --> </a-col> -->
<a-col :span="24"> <a-col :span="24" class="jbxx-cykssj">
<a-form-item label="测验开始时间" v-bind="validateInfos.startTime"> <a-form-item label="测验开始时间" v-bind="validateInfos.startTime">
<a-date-picker <a-date-picker
placeholder="请选择测验开始时间" placeholder="请选择测验开始时间"
@ -128,13 +128,13 @@
<Icon <Icon
icon="ant-design:question-circle-outlined" icon="ant-design:question-circle-outlined"
:size="20" :size="20"
style="float: right; margin-top: 5px; color: #029c88; margin-right: 19px" class="jbxx-cykssj-ico"
/> />
</a-popover> </a-popover>
</span> --> </span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24" class="jbxx-cyjssj">
<a-form-item label="测验结束时间" v-bind="validateInfos.endTime"> <a-form-item label="测验结束时间" v-bind="validateInfos.endTime">
<a-date-picker <a-date-picker
placeholder="请选择测验结束时间" placeholder="请选择测验结束时间"
@ -148,7 +148,7 @@
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24" class="jbxx-ms">
<a-form-item label="描述" v-bind="validateInfos.content"> <a-form-item label="描述" v-bind="validateInfos.content">
<p v-html="zyInfo.content"></p> <p v-html="zyInfo.content"></p>
<!-- <j-editor v-model:value="zyInfo.content" v-if="zyyqShow" @blur="handleZyyqShow(0)" /> <!-- <j-editor v-model:value="zyInfo.content" v-if="zyyqShow" @blur="handleZyyqShow(0)" />
@ -200,7 +200,7 @@
</a-card> </a-card>
</a-col> --> </a-col> -->
<a-col :span="24" style="overflow-y: scroll; min-height: 100px"> <a-col :span="24" style="overflow-y: scroll; min-height: 100px">
<draggable @end="end" v-model="tiganData" item-key="id"> <draggable :handle="'.drag-handle'" @end="end" v-model="tiganData" item-key="id">
<template #item="{ index, element: item }"> <template #item="{ index, element: item }">
<div> <div>
<!-- 单选题 --> <!-- 单选题 -->
@ -240,7 +240,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -317,7 +317,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -396,7 +396,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -454,7 +454,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -499,7 +499,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -575,7 +575,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -614,7 +614,7 @@
<span class="title">统计分析</span> <span class="title">统计分析</span>
</a-col> </a-col>
<a-col :span="4" style="text-align: right"> <a-col :span="4" style="text-align: right">
<a-button class="buttonClass" @click="reloadZy" style="margin-right: 10px"><Icon icon="ant-design:export-outlined" />返回</a-button> <a-button class="buttonClass" @click="reloadZy" style="margin-right: 10px"><Icon icon="ant-design:arrow-left-outlined" />返回</a-button>
</a-col> </a-col>
</a-row> </a-row>
<a-divider /> <a-divider />
@ -649,18 +649,18 @@
<a-col :span="24" v-for="(item, index) in tiganData" :key="index"> <a-col :span="24" v-for="(item, index) in tiganData" :key="index">
<div style="width: 100%"> <div style="width: 100%">
<!-- 单选题 --> <!-- 单选题 -->
<div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3"> <div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3 && item.wjSubtype == null">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">单选题</span> <span class="question-type" style="margin-left: 40px">单选题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span >题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
> >
</template> </template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-radio-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px"> <a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span> <span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span>
@ -669,21 +669,59 @@
</a-radio> </a-radio>
</div> </div>
</a-radio-group> </a-radio-group>
<a-radio-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2" class="radio-item">
<!-- Radio 按钮和标题 -->
<div style="display: flex; align-items: center;">
<a-radio :value="tmxx.itemIndex + ''">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000;"></span>
</a-radio>
</div>
<!-- 正确答案和选择人数 -->
<div style="display: flex; justify-content: space-between; margin-top: 5px;padding-left:20px;height: 25px;">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" >选择人数{{ tmxx.num }}</span>
</div>
<!-- 分隔线仅在不是最后一个选项时显示 -->
<hr v-if="index2 !== item.wjxWjxxTmxxList.length - 1" class="divider-line"/>
</div>
</a-radio-group>
</a-card> </a-card>
</div> </div>
<!-- 多选题 --> <!-- 多选题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 4"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 4">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">多选题</span> <span class="question-type" style="margin-left: 40px">多选题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
>题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span >题目分值 <span class="answer-word">{{ item.wjScore }}</span> </span
> >
</template> </template>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-checkbox-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<!-- Checkbox and Title -->
<div style="display: flex; flex-direction: column;">
<a-checkbox :value="tmxx.itemIndex" style="flex: 1 0 auto; width: 100%; margin-bottom: 5px;">
<div style="width: 100%; font-size: 16px; color: #000; word-break: break-all; white-space: normal;">
<span v-html="tmxx.itemTitle"></span>
</div>
</a-checkbox>
<!-- Correct Answer and Selection Count -->
<div style="display: flex; align-items: center; height: 50px;"
:style="{ 'border-bottom': index2 !== item.wjxWjxxTmxxList.length - 1 ? '1px solid #ccc' : 'none' }">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; flex: 1; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" style="text-align: right; padding-right: 10px; flex: 1;">选择人数{{ tmxx.num }}</span>
</div>
</div>
</a-col>
</a-row>
</a-checkbox-group>
<a-checkbox-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row> <a-row>
<a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2"> <a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px"> <a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px">
@ -697,14 +735,47 @@
</a-card> </a-card>
</div> </div>
<!-- 填空题 --> <!-- 填空题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == null && isSmallScreen">
<a-card>
<!-- 确保正确答案正确人数错误人数各占一行 -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div style="text-align: left;">
<!-- 正确答案独占一行 -->
<div v-if="item.wjAnswer" style="color: #9e9e9e; margin-bottom: 4px;">
(正确答案: {{ item.wjAnswer }})
</div>
<!-- 正确人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
正确人数{{ item.num }}
</div>
<!-- 错误人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
错误人数{{ item.num2 }}
</div>
</div>
<!-- 题目类型和分值独占一行 -->
<template #extra v-if="zyInfo.atype == 6">
<div style="display: flex;justify-content: space-between;align-items: center;">
<!-- 确保填空题独占一行 -->
<div>
<span class="question-type" style="margin-left: 40px">填空题</span>
</div>
<!-- 确保题目分值独占一行 -->
<div>
<span style="margin-left: 40px;">题目分值<span class="answer-word">{{ item.wjScore }}</span> </span>
</div>
</div>
</template>
</a-card>
</div>
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == null && !isSmallScreen">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span> <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span> <span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> <span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span>
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">填空题</span> <span class="question-type" style="margin-left: 40px">填空题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
@ -716,20 +787,109 @@
<!-- 文件题 --> <!-- 文件题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 8"> <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 8">
<a-card> <a-card>
<template #title> <!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
</template> <!-- </template> -->
<template #extra v-if="zyInfo.atype == 6"> <template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">文件题</span> <span class="question-type" style="margin-left: 40px">文件题</span>
<span style="margin-left: 40px" <span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span >题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span>
>
</template> </template>
<j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload> <j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
</a-card> </a-card>
</div> </div>
<div v-else> 无对应类型 </div> <!-- 解答题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == 5 && isSmallScreen">
<a-card>
<!-- 确保正确答案正确人数错误人数各占一行 -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div style="text-align: left;">
<!-- 正确答案独占一行 -->
<div v-if="item.wjAnswer" style="color: #9e9e9e; margin-bottom: 4px;">
(正确答案: {{ item.wjAnswer }})
</div>
<!-- 正确人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
正确人数{{ item.num }}
</div>
<!-- 错误人数独占一行 -->
<div style="color: #9e9e9e; margin-bottom: 4px;">
错误人数{{ item.num2 }}
</div>
</div>
<!-- 题目类型和分值独占一行 -->
<template #extra v-if="zyInfo.atype == 6">
<div style="display: flex;justify-content: space-between;align-items: center;">
<!-- 确保填空题独占一行 -->
<div>
<span class="question-type" style="margin-left: 40px">解答题</span>
</div>
<!-- 确保题目分值独占一行 -->
<div>
<span style="margin-left: 40px;">题目分值<span class="answer-word">{{ item.wjScore }}</span> </span>
</div>
</div>
</template>
</a-card>
</div>
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5 && item.wjSubtype == 5 && !isSmallScreen">
<a-card>
<!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span>
<!-- </template> -->
<template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">解答题</span>
<span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
>
</template>
</a-card>
</div>
<!-- 判断题 -->
<div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3 && item.wjSubtype == 305">
<a-card>
<!-- <template #title> -->
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
<!-- </template> -->
<template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">判断题</span>
<span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
>
</template>
<a-radio-group v-if="!isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span>
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案)</span>
<span class="tjfx-xzrs">选择人数{{ tmxx.num }}</span>
</a-radio>
</div>
</a-radio-group>
<a-radio-group v-if="isSmallScreen" v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2" class="radio-item">
<!-- Radio 按钮和标题 -->
<div style="display: flex; align-items: center;">
<a-radio :value="tmxx.itemIndex + ''">
<span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000;"></span>
</a-radio>
</div>
<!-- 正确答案和选择人数 -->
<div style="display: flex; justify-content: space-between; margin-top: 5px;padding-left:20px;height: 25px;">
<span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; font-size: 12px;">(正确答案)</span>
<span class="tjfx-xzrs" >选择人数{{ tmxx.num }}</span>
</div>
<!-- 分隔线仅在不是最后一个选项时显示 -->
<hr v-if="index2 !== item.wjxWjxxTmxxList.length - 1" class="divider-line"/>
</div>
</a-radio-group>
</a-card>
</div>
<!-- <div v-else> 无对应类型 </div> -->
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -1115,7 +1275,9 @@ import { create } from 'sortablejs';
import { downloadByUrl } from '/@/utils/file/download'; import { downloadByUrl } from '/@/utils/file/download';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import ZyCyFenxiangListModal from '/@/views/zy/zyCyFenxiang/ZyCyFenxiangListModal.vue'; import ZyCyFenxiangListModal from '/@/views/zy/zyCyFenxiang/ZyCyFenxiangListModal.vue';
import { useScreenSize } from '/src/utils/screenSize/useScreenSize'
const { isSmallScreen } = useScreenSize();
const glob = useGlobSetting(); const glob = useGlobSetting();
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
@ -2302,6 +2464,33 @@ onMounted(() => {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@media (max-width: 768px) {
.jbxx-cytm{
padding:10px;
}
.jbxx-cykssj{
padding:10px;
}
.jbxx-cykssj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 0px
}
.jbxx-ms{
padding:10px;
}
}
@media (min-width: 769px) {
.jbxx-cykssj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 19px
}
}
.title { .title {
margin-left: 20px; margin-left: 20px;
font-size: 18px; font-size: 18px;
@ -2578,4 +2767,10 @@ onMounted(() => {
// width: 20rem !important; // width: 20rem !important;
// height: 100px; // height: 100px;
// } // }
.rich-text-container {
white-space: pre-wrap; /* 强制换行 */
word-break: break-all; /* 长单词和 URL 地址换行 */
overflow-wrap: break-word; /* 在长单词内部换行 */
}
</style> </style>

View File

@ -53,7 +53,7 @@
</template> </template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup> <script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import { ref, reactive, defineExpose, unref } from 'vue'; import { ref, reactive, defineExpose, unref , computed, onMounted, onUnmounted} from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
@ -69,6 +69,29 @@ const WjxWjxxTmlbDjjgModalPage = ref();
const ZgtpfModalPage = ref(); const ZgtpfModalPage = ref();
const sjxxInfo = ref<any>({}); const sjxxInfo = ref<any>({});
const loadingCeshi = ref<boolean>(false); const loadingCeshi = ref<boolean>(false);
//
const actionColumnWidth = ref(220);
//
const isSmallScreen = computed(() => window.innerWidth < 600); //
//
const updateWidth = () => {
actionColumnWidth.value = isSmallScreen.value ? 220 : 220;
};
//
onMounted(() => {
window.addEventListener('resize', updateWidth);
updateWidth(); //
});
//
onUnmounted(() => {
window.removeEventListener('resize', updateWidth);
});
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
@ -78,7 +101,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
canResize: false, canResize: false,
useSearchForm: false, useSearchForm: false,
actionColumn: { actionColumn: {
width: 220, width: actionColumnWidth,
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {

View File

@ -13,9 +13,12 @@
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import WjxWjxxTmlbDjjgsList from './WjxWjxxTmlbDjjgsList.vue' import WjxWjxxTmlbDjjgsList from './WjxWjxxTmlbDjjgsList.vue'
import WjxWjxxTmlbAllDjjgsList from './WjxWjxxTmlbAllDjjgsList.vue' import WjxWjxxTmlbAllDjjgsList from './WjxWjxxTmlbAllDjjgsList.vue'
import { useScreenSize } from '/src/utils/screenSize/useScreenSize'
const { isSmallScreen } = useScreenSize();
console.log("🚀 ~ isSmallScreen:", isSmallScreen)
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('65%'); const width = ref<string>(isSmallScreen?'90%':'65%');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();

View File

@ -13,9 +13,11 @@
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import WjxWjxxTmlbDjjgsList from './WjxWjxxTmlbDjjgsList.vue' import WjxWjxxTmlbDjjgsList from './WjxWjxxTmlbDjjgsList.vue'
import WjxWjxxTmlbAllDjjgsListhis from './WjxWjxxTmlbAllDjjgsListhis.vue' import WjxWjxxTmlbAllDjjgsListhis from './WjxWjxxTmlbAllDjjgsListhis.vue'
import { useScreenSize } from '/src/utils/screenSize/useScreenSize'
const { isSmallScreen } = useScreenSize();
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('65%'); const width = ref<string>(isSmallScreen?'90%':'65%');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();

View File

@ -35,7 +35,7 @@
<Icon <Icon
icon="ant-design:question-circle-outlined" icon="ant-design:question-circle-outlined"
:size="20" :size="20"
style="float: right; margin-top: 5px; color: #029c88; margin-right: 19px" class="jbxx-cykssj-ico"
/> />
</a-popover> </a-popover>
</span> </span>
@ -68,7 +68,7 @@
<a-col :span="24"> <a-col :span="24">
<a-row style="min-height: 100px"> <a-row style="min-height: 100px">
<a-col :span="24" style="overflow-y: scroll; min-height: 100px"> <a-col :span="24" style="overflow-y: scroll; min-height: 100px">
<draggable @end="end" v-model="tiganData" item-key="id"> <draggable :handle="isSmallScreen?'.draggclass':false" @end="end" v-model="tiganData" item-key="id">
<template #item="{ index, element: item }"> <template #item="{ index, element: item }">
<div> <div>
<!-- 单选题 --> <!-- 单选题 -->
@ -125,7 +125,7 @@
:disabled="editDisabled" :disabled="editDisabled"
v-if="!editDisabled" v-if="!editDisabled"
/> />
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
</template> </template>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col> <a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col>
@ -218,7 +218,7 @@
:disabled="editDisabled" :disabled="editDisabled"
v-if="!editDisabled" v-if="!editDisabled"
/> />
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
</template> </template>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col> <a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col>
@ -313,7 +313,7 @@
:disabled="editDisabled" :disabled="editDisabled"
v-if="!editDisabled" v-if="!editDisabled"
/> />
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
</template> </template>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24"> <a-col :span="24">
@ -387,7 +387,7 @@
:disabled="editDisabled" :disabled="editDisabled"
v-if="!editDisabled" v-if="!editDisabled"
/> />
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
</template> </template>
</a-card> </a-card>
</div> </div>
@ -419,7 +419,9 @@ import { useRouter } from 'vue-router';
import dayjs, { Dayjs } from 'dayjs'; import dayjs, { Dayjs } from 'dayjs';
import draggable from 'vuedraggable'; import draggable from 'vuedraggable';
import JEditor2 from '/@/components/Form/src/jeecg/components/JEditor2.vue'; import JEditor2 from '/@/components/Form/src/jeecg/components/JEditor2.vue';
import { useScreenSize } from '/src/utils/screenSize/useScreenSize'
const { isSmallScreen } = useScreenSize();
// //
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
const { query } = unref(currentRoute); const { query } = unref(currentRoute);
@ -616,6 +618,24 @@ defineExpose({
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@media (max-width: 768px) {
.jbxx-cykssj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 0px
}
}
@media (min-width: 769px) {
.jbxx-cykssj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 19px
}
}
.antd-modal-form { .antd-modal-form {
min-height: 500px !important; min-height: 500px !important;
overflow-y: auto; overflow-y: auto;
@ -738,4 +758,10 @@ defineExpose({
margin-left: 10px; margin-left: 10px;
font-size: 12px; font-size: 12px;
} }
.rich-text-container {
white-space: pre-wrap; /* 强制换行 */
word-break: break-all; /* 长单词和 URL 地址换行 */
overflow-wrap: break-word; /* 在长单词内部换行 */
}
</style> </style>

View File

@ -66,19 +66,13 @@
</template> </template>
<template #fileSlot="{ text }"> <template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span> <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> <a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small"
@click="downloadFile(text)">下载</a-button>
</template> </template>
</BasicTable> </BasicTable>
<a-modal <a-modal title="Excel导入指导" :width="800" :visible="importOpen" :maskClosable="false"
title="Excel导入指导" :okButtonProps="{ class: { 'jee-hidden': true } }" @cancel="importOpen = false" cancelText="关闭">
:width="800"
:visible="importOpen"
:maskClosable="false"
:okButtonProps="{ class: { 'jee-hidden': true } }"
@cancel="importOpen = false"
cancelText="关闭"
>
<div style="padding: 20px; background-color: rgb(225, 243, 237); border-radius: 5px; margin: 20px"> <div style="padding: 20px; background-color: rgb(225, 243, 237); border-radius: 5px; margin: 20px">
<p>Excel导入指导</p> <p>Excel导入指导</p>
<p>1.下载题目导入模板文件</p> <p>1.下载题目导入模板文件</p>
@ -86,32 +80,37 @@
<p>3.在模板内录入信息后上传文件导入题目</p> <p>3.在模板内录入信息后上传文件导入题目</p>
<p>4.点击导入题目选择已完成录入的文件平台将会验证数据的正确性</p> <p>4.点击导入题目选择已完成录入的文件平台将会验证数据的正确性</p>
<p>5.若发现错误会给予提示重新修正后再次上传:若无错误即将数据导入到平台中</p> <p>5.若发现错误会给予提示重新修正后再次上传:若无错误即将数据导入到平台中</p>
<p <p><a @click="downloadByUrl({ url: '/downPath/stdrmb.xls', target: '_self', fileName: '试题导入模板.xls' })">
><a @click="downloadByUrl({ url: '/downPath/stdrmb.xls', target: '_self', fileName: '试题导入模板.xls' })" <Icon icon="ant-design:download-outlined" :size="20" />导入模板下载
><Icon icon="ant-design:download-outlined" :size="20" />导入模板下载</a </a></p>
></p
>
</div> </div>
<div style="text-align: center; margin-top: 20px; margin-bottom: 20px"> <div style="text-align: center; margin-top: 20px; margin-bottom: 20px">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="importXls">导入试题</j-upload-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="importXls">导入试题</j-upload-button>
</div> </div>
</a-modal> </a-modal>
<a-modal title="手动添加" :width="`80%`" :visible="addOpen" :maskClosable="false" @cancel="addOpen = false" cancelText="关闭" @ok="handleOk"> <a-modal title="手动添加" :style="{ width: computedWidth }" :visible="addOpen" :maskClosable="false" @cancel="addOpen = false"
<div style="padding: 20px; margin: 20px"> cancelText="关闭" @ok="handleOk">
<a-row style="min-height: 100px"> <div class="sdtj-div">
<a-col :span="4" style="padding: 10px"> <a-row :gutter="[16, 16]">
<a-col :xs="24" :lg="4" style="padding: 10px">
<a-card title="可选题型" style="height: 360px; border: 1px solid #e8e8e8"> <a-card title="可选题型" style="height: 360px; border: 1px solid #e8e8e8">
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(3)">单选题</a-button></p> <p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(3)">单选题</a-button>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(4)">多选题</a-button></p> </p>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(5)">填空题</a-button></p> <p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(4)">多选题</a-button>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(8)">文件题</a-button></p> </p>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(502)">简答题</a-button></p> <p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(5)">填空题</a-button>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(305)">判断题</a-button></p> </p>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(8)">文件题</a-button>
</p>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined"
@click="addTigan(502)">简答题</a-button></p>
<p><a-button type="primary" preIcon="ant-design:check-square-outlined"
@click="addTigan(305)">判断题</a-button></p>
</a-card> </a-card>
</a-col> </a-col>
<a-col :span="20" style="overflow-y: scroll; min-height: 100px"> <a-col :xs="24" :lg="20" style="overflow-y: scroll; min-height: 100px">
<draggable @end="end" v-model="tiganData" item-key="id"> <draggable :handle="isSmallScreen ? '.drag-handle' : null" @end="end" v-model="tiganData" item-key="id">
<template #item="{ index, element: item }"> <template #item="{ index, element: item }">
<div> <div>
<!-- 单选题 --> <!-- 单选题 -->
@ -120,71 +119,60 @@
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[单选题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[单选题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数"
style="width: 120px" v-if="item.wjSfqh == '0'" :disabled="editDisabled">
v-model:value="item.wjScore" <a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
placeholder="请选择分数"
v-if="item.wjSfqh == '0'"
:disabled="editDisabled"
>
<a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
</a-select> </a-select>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topRight" title="删除此题" <a-tooltip placement="topRight" title="删除此题">
><Icon <Icon icon="ant-design:delete-outlined"
icon="ant-design:delete-outlined" style="cursor: pointer; font-size: 20px; margin: 5px"
style="cursor: pointer; font-size: 20px; margin: 10px" @click="handleDelTigan(item, index)" v-if="!editDisabled" />
@click="handleDelTigan(item, index)" </a-tooltip>
v-if="!editDisabled" <Icon
/></a-tooltip> v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<JEditor2 placeholder="请填写文件题题干" <JEditor2 placeholder="请填写文件题题干" v-model:value="item.wjTitle" :bordered="false"
v-model:value="item.wjTitle" :style="{ width: '30rem' }" :auto-size="{ minRows: 1, maxRows: 5 }" :disabled="editDisabled"
:bordered="false" v-if="!editDisabled" />
:style="{ width: '30rem' }" <div v-else v-html="item.wjTitle"></div>
:auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库"
</div> :disabled="editDisabled" />
</div>
</template> </template>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col> <a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col>
</a-row> </a-row>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="!isShow"> <a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default"
:disabled="!isShow">
<div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index"> <div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%"> <a-radio :value="tmxx.itemIndex + ``" style="width: 100%">
<a-input <a-input placeholder="请填写选项" v-model:value="tmxx.itemTitle" :style="{ width: '30rem' }"
placeholder="请填写选项" :bordered="false" :disabled="editDisabled" />
v-model:value="tmxx.itemTitle"
:style="{ width: '30rem' }"
:bordered="false"
:disabled="editDisabled"
/>
<span style="color: #ecb646" v-if="item.itemSelected == tmxx.itemIndex">(正确答案)</span> <span style="color: #ecb646" v-if="item.itemSelected == tmxx.itemIndex">(正确答案)</span>
<a-tooltip placement="topLeft" title="在下方添加新的选项" <a-tooltip placement="topLeft" title="在下方添加新的选项">
><Icon <Icon icon="ant-design:plus-circle-outlined"
icon="ant-design:plus-circle-outlined"
style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff" style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
@click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)" @click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)" v-if="!editDisabled" />
v-if="!editDisabled" </a-tooltip>
/></a-tooltip> <a-tooltip placement="topLeft" title="删除选项">
<a-tooltip placement="topLeft" title="删除选项" <Icon icon="ant-design:minus-circle-outlined"
><Icon
icon="ant-design:minus-circle-outlined"
style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff" style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
@click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)" @click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)" v-if="!editDisabled" />
v-if="!editDisabled" </a-tooltip>
/></a-tooltip>
</a-radio> </a-radio>
</div> </div>
</a-radio-group> </a-radio-group>
@ -197,132 +185,113 @@
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[多选题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[多选题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数"
style="width: 120px" v-if="item.wjSfqh == '0'" :disabled="editDisabled">
v-model:value="item.wjScore" <a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
placeholder="请选择分数"
v-if="item.wjSfqh == '0'"
:disabled="editDisabled"
>
<a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
</a-select> </a-select>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topRight" title="删除此题" <a-tooltip placement="topRight" title="删除此题">
><Icon <Icon icon="ant-design:delete-outlined"
icon="ant-design:delete-outlined" style="cursor: pointer; font-size: 20px; margin: 5px"
style="cursor: pointer; font-size: 20px; margin: 10px" @click="handleDelTigan(item, index)" v-if="!editDisabled" />
@click="handleDelTigan(item, index)" </a-tooltip>
v-if="!editDisabled" <Icon
/></a-tooltip> v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<JEditor2 placeholder="请填写多选题题干" <JEditor2 placeholder="请填写多选题题干" v-model:value="item.wjTitle" :bordered="false"
v-model:value="item.wjTitle" :style="{ width: '30rem' }" :auto-size="{ minRows: 1, maxRows: 5 }" :disabled="editDisabled"
:bordered="false" v-if="!editDisabled" />
:style="{ width: '30rem' }" <div v-else v-html="item.wjTitle"></div>
:auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库"
</div> :disabled="editDisabled" />
</div>
</template> </template>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col> <a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col>
</a-row> </a-row>
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" :disabled="!isShow" @change="handleChecked"> <a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" :disabled="!isShow"
@change="handleChecked">
<a-row> <a-row>
<a-col :span="24" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index"> <a-col :span="24" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index">
<!-- -{{item.itemSelected}}-{{tmxx.itemIndex}} --> <!-- -{{item.itemSelected}}-{{tmxx.itemIndex}} -->
<a-checkbox :value="tmxx.itemIndex" <a-checkbox :value="tmxx.itemIndex"><a-input placeholder="请填写选项"
><a-input v-model:value="tmxx.itemTitle" :bordered="false" :style="{ width: '30rem' }"
placeholder="请填写选项" :disabled="editDisabled" /></a-checkbox>
v-model:value="tmxx.itemTitle"
:bordered="false"
:style="{ width: '30rem' }"
:disabled="editDisabled"
/></a-checkbox>
<span style="color: #ecb646" v-if="cheGrp(item.itemSelected, tmxx.itemIndex)">(正确答案)</span> <span style="color: #ecb646" v-if="cheGrp(item.itemSelected, tmxx.itemIndex)">(正确答案)</span>
<a-tooltip placement="topLeft" title="在下方添加新的选项" <a-tooltip placement="topLeft" title="在下方添加新的选项">
><Icon <Icon icon="ant-design:plus-circle-outlined"
icon="ant-design:plus-circle-outlined"
style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff" style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
@click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)" @click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)" v-if="!editDisabled" />
v-if="!editDisabled" </a-tooltip>
/></a-tooltip> <a-tooltip placement="topLeft" title="删除选项">
<a-tooltip placement="topLeft" title="删除选项" <Icon icon="ant-design:minus-circle-outlined"
><Icon
icon="ant-design:minus-circle-outlined"
style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff" style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
@click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)" @click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)" v-if="!editDisabled" />
v-if="!editDisabled" </a-tooltip>
/></a-tooltip>
</a-col> </a-col>
</a-row> </a-row>
</a-checkbox-group> </a-checkbox-group>
</a-card> </a-card>
</div> </div>
<!-- 填空题 --> <!-- 填空题 -->
<div style="width: 100%" v-else-if="(item.wjType == 5 || item.wjType == '5') && item.wjSubtype == null"> <div style="width: 100%"
v-else-if="(item.wjType == 5 || item.wjType == '5') && item.wjSubtype == null">
<a-card> <a-card>
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[填空题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[填空题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数"
style="width: 120px" v-if="item.wjSfqh == '0'" :disabled="editDisabled">
v-model:value="item.wjScore"
placeholder="请选择分数"
v-if="item.wjSfqh == '0'"
:disabled="editDisabled"
>
<a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option> <a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
</a-select> </a-select>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topRight" title="删除此题" <a-tooltip placement="topRight" title="删除此题">
><Icon <Icon icon="ant-design:delete-outlined"
icon="ant-design:delete-outlined" style="cursor: pointer; font-size: 20px; margin: 5px"
style="cursor: pointer; font-size: 20px; margin: 10px" @click="handleDelTigan(item, index)" v-if="!editDisabled" />
@click="handleDelTigan(item, index)" </a-tooltip>
v-if="!editDisabled" <Icon
/></a-tooltip> v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<JEditor2 placeholder="请填写填空题题干" <JEditor2 placeholder="请填写填空题题干" v-model:value="item.wjTitle" :bordered="false"
v-model:value="item.wjTitle" :style="{ width: '30rem' }" :auto-size="{ minRows: 1, maxRows: 5 }" :disabled="editDisabled"
:bordered="false" v-if="!editDisabled" />
:style="{ width: '30rem' }" <div v-else v-html="item.wjTitle"></div>
:auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库"
</div> :disabled="editDisabled" />
</div>
</template> </template>
<a-row > <a-row>
<a-col :span="24"> <a-col :span="24">
<a-textarea <a-textarea placeholder="请填写答案" v-model:value="item.wjAnswer" :bordered="false"
placeholder="请填写答案" style="width: 100%" :auto-size="{ minRows: 1, maxRows: 5 }" :disabled="editDisabled" />
v-model:value="item.wjAnswer"
:bordered="false"
style="width: 100%"
:auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled"
/>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
@ -333,164 +302,149 @@
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[文件题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[文件题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数"
style="width: 120px" v-if="item.wjSfqh == '0'" :disabled="editDisabled">
v-model:value="item.wjScore"
placeholder="请选择分数"
v-if="item.wjSfqh == '0'"
:disabled="editDisabled"
>
<a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option> <a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
</a-select> </a-select>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topRight" title="删除此题" <a-tooltip placement="topRight" title="删除此题">
><Icon <Icon icon="ant-design:delete-outlined"
icon="ant-design:delete-outlined" style="cursor: pointer; font-size: 20px; margin: 5px"
style="cursor: pointer; font-size: 20px; margin: 10px" @click="handleDelTigan(item, index)" v-if="!editDisabled" />
@click="handleDelTigan(item, index)" </a-tooltip>
v-if="!editDisabled" <Icon
/></a-tooltip> v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<JEditor2 placeholder="请填写文件题题干" <JEditor2 placeholder="请填写文件题题干" v-model:value="item.wjTitle" :bordered="false"
v-model:value="item.wjTitle" :style="{ width: '30rem' }" :auto-size="{ minRows: 1, maxRows: 5 }" :disabled="editDisabled"
:bordered="false" v-if="!editDisabled" />
:style="{ width: '30rem' }" <div v-else v-html="item.wjTitle"></div>
:auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库"
</div> :disabled="editDisabled" />
</div>
</template> </template>
</a-card> </a-card>
</div> </div>
<!-- 判断题 --> <!-- 判断题 -->
<div style="width: 100%" v-else-if="(item.wjType == 3 || item.wjType == '3') && (item.wjSubtype == 305 || item.wjSubtype == '305')"> <div style="width: 100%"
v-else-if="(item.wjType == 3 || item.wjType == '3') && (item.wjSubtype == 305 || item.wjSubtype == '305')">
<a-card> <a-card>
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[判断题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[判断题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数"
style="width: 120px" v-if="item.wjSfqh == '0'" :disabled="editDisabled">
v-model:value="item.wjScore" <a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
placeholder="请选择分数"
v-if="item.wjSfqh == '0'"
:disabled="editDisabled"
>
<a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
</a-select> </a-select>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topRight" title="删除此题" <a-tooltip placement="topRight" title="删除此题">
><Icon <Icon icon="ant-design:delete-outlined"
icon="ant-design:delete-outlined" style="cursor: pointer; font-size: 20px; margin: 5px"
style="cursor: pointer; font-size: 20px; margin: 10px" @click="handleDelTigan(item, index)" v-if="!editDisabled" />
@click="handleDelTigan(item, index)" </a-tooltip>
v-if="!editDisabled" <Icon
/></a-tooltip> v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<JEditor2 placeholder="请填写文件题题干" <JEditor2 placeholder="请填写文件题题干" v-model:value="item.wjTitle" :bordered="false"
v-model:value="item.wjTitle" :style="{ width: '30rem' }" :auto-size="{ minRows: 1, maxRows: 5 }" :disabled="editDisabled"
:bordered="false" v-if="!editDisabled" />
:style="{ width: '30rem' }" <div v-else v-html="item.wjTitle"></div>
:auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库"
</div> :disabled="editDisabled" />
</div>
</template> </template>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col> <a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col>
</a-row> </a-row>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="!isShow"> <a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default"
:disabled="!isShow">
<div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index"> <div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index">
<a-radio :value="tmxx.itemIndex + ``" style="width: 100%"> <a-radio :value="tmxx.itemIndex + ``" style="width: 100%">
<a-input <a-input placeholder="请填写选项" v-model:value="tmxx.itemTitle" :style="{ width: '30rem' }"
placeholder="请填写选项" :bordered="false" :disabled="editDisabled" />
v-model:value="tmxx.itemTitle"
:style="{ width: '30rem' }"
:bordered="false"
:disabled="editDisabled"
/>
<span style="color: #ecb646" v-if="item.itemSelected == tmxx.itemIndex">(正确答案)</span> <span style="color: #ecb646" v-if="item.itemSelected == tmxx.itemIndex">(正确答案)</span>
<a-tooltip placement="topLeft" title="在下方添加新的选项" <a-tooltip placement="topLeft" title="在下方添加新的选项">
><Icon <Icon icon="ant-design:plus-circle-outlined"
icon="ant-design:plus-circle-outlined"
style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff" style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
@click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)" @click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)" v-if="!editDisabled" />
v-if="!editDisabled" </a-tooltip>
/></a-tooltip> <a-tooltip placement="topLeft" title="删除选项">
<a-tooltip placement="topLeft" title="删除选项" <Icon icon="ant-design:minus-circle-outlined"
><Icon
icon="ant-design:minus-circle-outlined"
style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff" style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
@click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)" @click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)" v-if="!editDisabled" />
v-if="!editDisabled" </a-tooltip>
/></a-tooltip>
</a-radio> </a-radio>
</div> </div>
</a-radio-group> </a-radio-group>
</a-card> </a-card>
</div> </div>
<!-- 简答题 --> <!-- 简答题 -->
<div style="width: 100%" v-else-if="(item.wjType == 5 || item.wjType == '5') && (item.wjSubtype == 5 || item.wjSubtype == '5')"> <div style="width: 100%"
v-else-if="(item.wjType == 5 || item.wjType == '5') && (item.wjSubtype == 5 || item.wjSubtype == '5')">
<a-card> <a-card>
<template #title> <template #title>
<div> <div>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="11">
<span>{{ index + 1 }}<span style="color: #c2bfbf">[简答题]</span></span> <span>{{ index + 1 }}<span style="color: #c2bfbf">[简答题]</span></span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="13" style="text-align: right;">
<a-tooltip placement="topLeft" title="题目分数" v-if="isShow"> <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
<a-select <a-select style="width: 120px" v-model:value="item.wjScore" placeholder="请选择分数"
style="width: 120px" v-if="item.wjSfqh == '0'" :disabled="editDisabled">
v-model:value="item.wjScore" <a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
placeholder="请选择分数"
v-if="item.wjSfqh == '0'"
:disabled="editDisabled"
>
<a-select-option :value="item" v-for="(item) in scoreData">{{item}}</a-select-option>
</a-select> </a-select>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topRight" title="删除此题" <a-tooltip placement="topRight" title="删除此题">
><Icon <Icon icon="ant-design:delete-outlined"
icon="ant-design:delete-outlined" style="cursor: pointer; font-size: 20px; margin: 5px"
style="cursor: pointer; font-size: 20px; margin: 10px" @click="handleDelTigan(item, index)" v-if="!editDisabled" />
@click="handleDelTigan(item, index)" </a-tooltip>
v-if="!editDisabled" <Icon
/></a-tooltip> v-if="isSmallScreen && !editDisabled"
icon="pixelarticons:chevrons-vertical"
class="drag-handle"
style="cursor: move; font-size: 20px; margin-right: 10px;"
/>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<JEditor2 placeholder="请填写简答题题干" <JEditor2 placeholder="请填写简答题题干" v-model:value="item.wjTitle" :bordered="false"
v-model:value="item.wjTitle" :style="{ width: '30rem' }" :auto-size="{ minRows: 1, maxRows: 5 }" :disabled="editDisabled"
:bordered="false" v-if="!editDisabled" />
:style="{ width: '30rem' }" <div v-else v-html="item.wjTitle"></div>
:auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库"
</div> :disabled="editDisabled" />
</div>
</template> </template>
</a-card> </a-card>
</div> </div>
@ -516,7 +470,7 @@
</template> </template>
<script lang="ts" name="wjxWjxxTmlb-siyou" setup> <script lang="ts" name="wjxWjxxTmlb-siyou" setup>
import { ref, reactive, watch, computed, unref, onMounted } from 'vue'; import { ref, reactive, watch, computed, unref, onMounted, onUnmounted } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
@ -540,6 +494,8 @@ const checkedKeys = ref<Array<string | number>>([]);
const importOpen = ref<boolean>(false); const importOpen = ref<boolean>(false);
const addOpen = ref<boolean>(false); const addOpen = ref<boolean>(false);
const glob = useGlobSetting(); const glob = useGlobSetting();
//
const width = ref('80%');
const tiganData = ref<any>([]); const tiganData = ref<any>([]);
const isShow = ref<boolean>(true); const isShow = ref<boolean>(true);
@ -861,11 +817,13 @@ function handleEdit(record: Recordable, wjSytype) {
/** /**
* 详情 * 详情
*/ */
function handleDetail(record: Recordable) { function handleDetail(record: Recordable) {
//
openModal(true, { openModal(true, {
record, record,
isUpdate: true, isUpdate: true,
showFooter: false, showFooter: false,
className: 'custom-modal-detail', //
}); });
} }
/** /**
@ -1000,7 +958,30 @@ function searchReset() {
reload(); reload();
} }
// 使
const computedWidth = computed(() => {
return isSmallScreen.value ? '90%' : width.value;
});
//
const isSmallScreen = ref(false);
// isSmallScreen
const updateScreenWidth = () => {
isSmallScreen.value = window.innerWidth < 600; //
};
onUnmounted(() => {
window.removeEventListener('resize', updateScreenWidth);
});
onMounted(() => { onMounted(() => {
//
window.addEventListener('resize', updateScreenWidth);
//
updateScreenWidth();
// wjLeixing.value = "1"; // wjLeixing.value = "1";
// console.log(`🚀 ~ onMounted ~ wjLeixing:`, wjLeixing) // console.log(`🚀 ~ onMounted ~ wjLeixing:`, wjLeixing)
// queryParam.value.wjLeixing = wjLeixing; // queryParam.value.wjLeixing = wjLeixing;
@ -1010,6 +991,20 @@ onMounted(() => {
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@media (max-width: 768px) {
.sdtj-div {
padding: 0;
margin: 0;
}
}
@media (min-width: 769px) {
.sdtj-div {
padding: 20px;
margin: 20px;
}
}
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
@ -1026,4 +1021,13 @@ onMounted(() => {
text-align: center; text-align: center;
} }
} }
/deep/.ant-card-head-title {
padding:0px;
}
.custom-modal-detail .ant-card-head-title {
white-space: normal !important; /* 覆盖原有的 white-space: nowrap */
}
</style> </style>

View File

@ -1,64 +1,89 @@
<template> <template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> <a-modal :title="title" :style="{ width: computedWidth }" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<TikuListMain ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></TikuListMain> <TikuListMain ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></TikuListMain>
</a-modal> </a-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose, onMounted, onUnmounted, computed } from 'vue';
import TikuListMain from './TikuListMain.vue' import TikuListMain from './TikuListMain.vue'
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('80%'); const width = ref<string>('80%');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();
const emit = defineEmits(['register', 'success']); const emit = defineEmits(['register', 'success']);
/** /**
* 编辑 * 编辑
* @param record * @param record
*/ */
function init(record) { function init(record) {
title.value = '题库'; title.value = '题库';
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.init(record); registerForm.value.init(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
init,
disableSubmit,
}); });
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
// 使
const computedWidth = computed(() => {
return isSmallScreen.value ? '100%' : width.value;
});
//
const isSmallScreen = ref(false);
// isSmallScreen
const updateScreenWidth = () => {
isSmallScreen.value = window.innerWidth < 600; //
};
//
onMounted(() => {
window.addEventListener('resize', updateScreenWidth);
//
updateScreenWidth();
});
onUnmounted(() => {
window.removeEventListener('resize', updateScreenWidth);
});
defineExpose({
init,
disableSubmit,
});
</script> </script>
<style> <style>
/**隐藏样式-modal确定按钮 */ /**隐藏样式-modal确定按钮 */
.jee-hidden { .jee-hidden {
display: none !important; display: none !important;
} }
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<a-form v-bind="formItemLayout"> <a-form v-bind="formItemLayout">
<draggable @end="end" v-model="tiganData" item-key="id"> <draggable handle="'.dragclass'" @end="end" v-model="tiganData" item-key="id">
<template #item="{ index, element: item }"> <template #item="{ index, element: item }">
<div> <div>
<!-- 单选题 --> <!-- 单选题 -->
@ -35,7 +35,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -105,7 +105,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -177,7 +177,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -228,7 +228,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -266,7 +266,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -335,7 +335,7 @@
:style="{ width: '30rem' }" :style="{ width: '30rem' }"
:auto-size="{ minRows: 1, maxRows: 5 }" :auto-size="{ minRows: 1, maxRows: 5 }"
:disabled="editDisabled" v-if="!editDisabled"/> :disabled="editDisabled" v-if="!editDisabled"/>
<div v-else v-html="item.wjTitle"></div> <div v-else class="rich-text-container" v-html="item.wjTitle"></div>
<div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库 <div style="text-align: right;color: #c2bfbf" v-if="isShow">是否加入题库
<j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/> <j-dict-select-tag type='radio' v-model:value="item.sftjtk" dictCode="yn" placeholder="是否加入题库" :disabled="editDisabled"/>
@ -364,6 +364,9 @@ import { Form } from 'ant-design-vue';
import JEditor2 from '/@/components/Form/src/jeecg/components/JEditor2.vue'; import JEditor2 from '/@/components/Form/src/jeecg/components/JEditor2.vue';
import draggable from 'vuedraggable'; import draggable from 'vuedraggable';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { useScreenSize } from '/src/utils/screenSize/useScreenSize'
const { isSmallScreen } = useScreenSize();
const useForm = Form.useForm; const useForm = Form.useForm;
export default defineComponent({ export default defineComponent({
@ -600,3 +603,11 @@ const scoreData = [
}, },
}); });
</script> </script>
<style scoped>
.rich-text-container {
white-space: pre-wrap; /* 强制换行 */
word-break: break-all; /* 长单词和 URL 地址换行 */
overflow-wrap: break-word; /* 在长单词内部换行 */
}
</style>

View File

@ -128,9 +128,9 @@
<a-menu-item key="sub6" @click="getGzt('kczy')"> <a-menu-item key="sub6" @click="getGzt('kczy')">
<span>课程资源</span> <span>课程资源</span>
</a-menu-item> </a-menu-item>
<a-menu-item key="sub7"> <!-- <a-menu-item key="sub7">
<span @click="getGzt('jxdg')">教学大纲</span> <span @click="getGzt('jxdg')">教学大纲</span>
</a-menu-item> </a-menu-item> -->
<!-- <a-menu-item key="sub7" @click="getGzt('khcl')"> <!-- <a-menu-item key="sub7" @click="getGzt('khcl')">
<span>上传考核材料</span> <span>上传考核材料</span>

View File

@ -49,10 +49,10 @@
<BlockOutlined /> <BlockOutlined />
<span>课程资源</span> <span>课程资源</span>
</a-menu-item> </a-menu-item>
<a-menu-item key="sub7" @click="getGzt('khcl')"> <!-- <a-menu-item key="sub7" @click="getGzt('khcl')">
<BlockOutlined /> <BlockOutlined />
<span>上传考核材料</span> <span>上传考核材料</span>
</a-menu-item> </a-menu-item> -->
<!-- <a-menu-item key="sub6"> <!-- <a-menu-item key="sub6">
<template #icon> <template #icon>
<BlockOutlined /> <BlockOutlined />

View File

@ -69,7 +69,7 @@
<div style="text-align: center"> <div style="text-align: center">
<a-button class="buttonClass" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button> <a-button class="buttonClass" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button class="buttonClass" @click="reloadZy"><Icon icon="ant-design:export-outlined" />返回</a-button> <a-button class="buttonClass" @click="reloadZy"><Icon icon="ant-design:arrow-left-outlined" />返回</a-button>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -165,7 +165,7 @@
label="是否允许学生查看" label="是否允许学生查看"
:labelCol="labelCol2" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" :wrapperCol="wrapperCol2"
style="margin-top: -1px; margin-left: -17px" class="pjbz-sfyxxsck"
> >
<j-dict-select-tag <j-dict-select-tag
type="radio" type="radio"
@ -210,7 +210,7 @@
label="互评结果使用" label="互评结果使用"
:labelCol="labelCol3" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" :wrapperCol="wrapperCol3"
style="margin-top: 20px; margin-left: -30px" class="sshp-hpjgsy"
> >
<a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default" :disabled="editDisabled"> <a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default" :disabled="editDisabled">
<a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio> <a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio>
@ -221,7 +221,7 @@
label="是否允许学生看到互评成绩" label="是否允许学生看到互评成绩"
:labelCol="labelCol4" :labelCol="labelCol4"
:wrapperCol="wrapperCol4" :wrapperCol="wrapperCol4"
style="margin-top: 20px; margin-left: -10px" class="sshp-sfyxxskdhpcj"
> >
<a-radio-group v-model:value="zyInfo.xssfck"> <a-radio-group v-model:value="zyInfo.xssfck">
<a-radio :value="'1'" style="margin-top: 5px">(匿名)</a-radio> <a-radio :value="'1'" style="margin-top: 5px">(匿名)</a-radio>
@ -277,7 +277,7 @@
label="检测通过率" label="检测通过率"
:labelCol="labelCol3" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" :wrapperCol="wrapperCol3"
style="margin: -1px; margin-left: -10px" class="ccsz-jctgl"
v-if="zyInfo.sfcc == '1'" v-if="zyInfo.sfcc == '1'"
> >
<a-input-number <a-input-number
@ -295,7 +295,7 @@
label="比对库设置" label="比对库设置"
:labelCol="labelCol3" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" :wrapperCol="wrapperCol3"
style="margin-left: -10px" class="ccsz-bdksz"
v-if="zyInfo.sfcc == '1'" v-if="zyInfo.sfcc == '1'"
> >
<div style="padding: 5px 0">维普</div> <div style="padding: 5px 0">维普</div>
@ -336,7 +336,7 @@
<a-row> <a-row>
<a-col :span="24" <a-col :span="24"
><span class="title">批阅考试</span> - <span class="title2">考试详情页</span> ><span class="title">批阅考试</span> - <span class="title2">考试详情页</span>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="reloadZy" style="float: right; margin-right: 8px"> 返回</a-button> <a-button type="primary" preIcon="ant-design:arrow-left-outlined" @click="reloadZy" style="float: right; margin-right: 8px"> 返回</a-button>
<a-popover title="温馨提示"> <a-popover title="温馨提示">
<template #content> <template #content>
<p>1非高峰期预计30分钟内返回检测结果高峰期预计时间会更长请您耐心等待</p> <p>1非高峰期预计30分钟内返回检测结果高峰期预计时间会更长请您耐心等待</p>
@ -375,13 +375,28 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <!-- <a-col :span="24">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQueryZyxq">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQueryZyxq">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px">发布成绩</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px">发布成绩</a-button> -->
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleKhcl" style="margin-left: 8px">上传考核材料</a-button> --> <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleKhcl" style="margin-left: 8px">上传考核材料</a-button> -->
<span class="tishi" style="margin-left: 20px; padding: 10px">温馨提示考试完成后请及时发布评分</span> <!-- <span class="tishi" style="margin-left: 20px; padding: 10px">温馨提示考试完成后请及时发布评分</span>
</a-col> -->
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24" :lg="{ span: 16 }">
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:search-outlined'"
@click="searchQueryZyxq">查询</a-button>
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:reload-outlined'"
@click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:export-outlined'"
@click="onExportXls" style="margin-left: 8px">导出</a-button>
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:export-outlined'"
@click="batchHandleFabu" style="margin-left: 8px">发布成绩</a-button>
</a-col>
<a-col :span="24" :lg="{ span: 8 }">
<span class="tishi" style="padding: 10px">温馨提示考试完成后请及时发布评分</span>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
@ -434,7 +449,7 @@
<a-col :span="24" <a-col :span="24"
><span class="title">批阅考试</span> - <span class="title2">考试详情页</span> - <span class="title2">查重相似度详情</span> ><span class="title">批阅考试</span> - <span class="title2">考试详情页</span> - <span class="title2">查重相似度详情</span>
<a-button type="primary" @click="handleShowType(3)" style="float: right; margin-right: 8px" <a-button type="primary" @click="handleShowType(3)" style="float: right; margin-right: 8px"
><Icon icon="ant-design:export-outlined" />返回</a-button ><Icon icon="ant-design:arrow-left-outlined" />返回</a-button
> >
<a-divider <a-divider
/></a-col> /></a-col>
@ -511,13 +526,13 @@
><span>{{ item.ypynum }}</span><span>已评阅</span></div ><span>{{ item.ypynum }}</span><span>已评阅</span></div
> >
</div> </div>
<div class="flex"> <div>
<div style="width: 100%; display: flex; margin-top: 20px"> <div style="width: 100%; display: flex; margin-top: 20px">
<div class="ellip-word" <div class="ellip-word flex"
><span class="ellip-word2">作业发布时间</span ><span class="ellip-word2">作业发布时间</span
>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div >{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div
> >
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div> <div class="ellip-word flex"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
</div> </div>
<div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%"> <div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%">
<!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a> <!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a>
@ -587,7 +602,7 @@
</template> </template>
<script lang="ts" name="zyInfo-zyInfo" setup> <script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive, onMounted, unref } from 'vue'; import { ref, reactive, onMounted, unref , onUnmounted, watchEffect } from 'vue';
import { list, deleteOne } from './ZyInfo.api'; import { list, deleteOne } from './ZyInfo.api';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -1741,6 +1756,22 @@ function handlePageChange(record) {
reloadZy(); reloadZy();
} }
const isSmallScreen = ref(false);
const checkScreenSize = () => {
isSmallScreen.value = window.innerWidth <= 768; //
};
//
watchEffect(() => {
checkScreenSize();
const resizeObserver = () => checkScreenSize();
window.addEventListener('resize', resizeObserver);
onUnmounted(() => {
window.removeEventListener('resize', resizeObserver);
});
});
onMounted(() => { onMounted(() => {
searchQuery(); searchQuery();
}); });
@ -1909,6 +1940,16 @@ onMounted(() => {
color: #999999; color: #999999;
font-size: 12px; font-size: 12px;
} }
@media (max-width: 768px) {
.region {
margin: 6px 12px;
padding: 10px;
background: #fff;
border-radius: 5px;
border: 1px solid #e6e6e6;
}
}
@media (min-width: 769px) {
.region { .region {
margin: 6px 12px; margin: 6px 12px;
padding-bottom: 20px; padding-bottom: 20px;
@ -1916,6 +1957,30 @@ onMounted(() => {
border-radius: 5px; border-radius: 5px;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
} }
.ccsz-bdksz{
margin-left: -10px;
}
.ccsz-jctgl{
margin-top: -1px;
margin-left: -10px;
}
.sshp-sfyxxskdhpcj{
margin-top: 20px;
margin-left: -10px;
}
.sshp-hpjgsy {
margin-left: -30px;
}
.pjbz-sfyxxsck {
margin-top: -1px;
margin-left: -17px;
}
}
.region:hover { .region:hover {
margin: 6px 12px; margin: 6px 12px;
padding-bottom: 20px; padding-bottom: 20px;

View File

@ -168,7 +168,7 @@
label="是否允许学生查看" label="是否允许学生查看"
:labelCol="labelCol2" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" :wrapperCol="wrapperCol2"
style="margin-top: -1px; margin-left: -17px" class="pjbz-sfyxxsck"
> >
<j-dict-select-tag <j-dict-select-tag
type="radio" type="radio"
@ -215,7 +215,7 @@
label="互评结果使用" label="互评结果使用"
:labelCol="labelCol3" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" :wrapperCol="wrapperCol3"
style="margin-top: 20px; margin-left: -30px" class="sshp-hpjgsy"
> >
<a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default" disabled> <a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default" disabled>
<a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio> <a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio>
@ -226,7 +226,7 @@
label="是否允许学生看到互评成绩" label="是否允许学生看到互评成绩"
:labelCol="labelCol4" :labelCol="labelCol4"
:wrapperCol="wrapperCol4" :wrapperCol="wrapperCol4"
style="margin-top: 20px; margin-left: -10px" class="sshp-sfyxxskdhpcj"
> >
<a-radio-group v-model:value="zyInfo.xssfck" disabled> <a-radio-group v-model:value="zyInfo.xssfck" disabled>
<a-radio :value="'1'" style="margin-top: 5px">(匿名)</a-radio> <a-radio :value="'1'" style="margin-top: 5px">(匿名)</a-radio>
@ -284,7 +284,7 @@
label="检测通过率" label="检测通过率"
:labelCol="labelCol3" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" :wrapperCol="wrapperCol3"
style="margin: -1px; margin-left: -10px" class="ccsz-jctgl"
v-if="zyInfo.sfcc == '1'" v-if="zyInfo.sfcc == '1'"
> >
<a-input-number <a-input-number
@ -302,7 +302,7 @@
label="比对库设置" label="比对库设置"
:labelCol="labelCol3" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" :wrapperCol="wrapperCol3"
style="margin-left: -10px" class="ccsz-bdksz"
v-if="zyInfo.sfcc == '1'" v-if="zyInfo.sfcc == '1'"
> >
<div style="padding: 5px 0">维普</div> <div style="padding: 5px 0">维普</div>
@ -518,13 +518,13 @@
><span>{{ item.ypynum }}</span><span>已评阅</span></div ><span>{{ item.ypynum }}</span><span>已评阅</span></div
> >
</div> </div>
<div class="flex"> <div>
<div style="width: 100%; display: flex; margin-top: 20px"> <div style="width: 100%; display: flex; margin-top: 20px">
<div class="ellip-word" <div class="ellip-word flex"
><span class="ellip-word2">作业发布时间</span ><span class="ellip-word2">作业发布时间</span
>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div >{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div
> >
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div> <div class="ellip-word flex"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
</div> </div>
<div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%"> <div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%">
<!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a> <!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a>
@ -1916,6 +1916,16 @@ onMounted(() => {
color: #999999; color: #999999;
font-size: 12px; font-size: 12px;
} }
@media (max-width: 768px) {
.region {
margin: 6px 12px;
padding: 10px;
background: #fff;
border-radius: 5px;
border: 1px solid #e6e6e6;
}
}
@media (min-width: 769px) {
.region { .region {
margin: 6px 12px; margin: 6px 12px;
padding-bottom: 20px; padding-bottom: 20px;
@ -1923,6 +1933,29 @@ onMounted(() => {
border-radius: 5px; border-radius: 5px;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
} }
.ccsz-bdksz{
margin-left: -10px;
}
.ccsz-jctgl{
margin-top: -1px;
margin-left: -10px;
}
.sshp-sfyxxskdhpcj{
margin-top: 20px;
margin-left: -10px;
}
.sshp-hpjgsy {
margin-left: -30px;
}
.pjbz-sfyxxsck {
margin-top: -1px;
margin-left: -17px;
}
}
.region:hover { .region:hover {
margin: 6px 12px; margin: 6px 12px;
padding-bottom: 20px; padding-bottom: 20px;

View File

@ -20,28 +20,22 @@
<a-col :span="24"><span class="title">课程作业次数设置</span><a-divider /></a-col> <a-col :span="24"><span class="title">课程作业次数设置</span><a-divider /></a-col>
<a-col :span="24" style="margin-top: 10px; height: 50px"> <a-col :span="24" style="margin-top: 10px; height: 50px">
<a-row style="text-align: center"> <a-row style="text-align: center">
<a-col :span="8" <a-col :span="8"><span>课程作业占比:</span><span>{{ kczyzb }}%;</span></a-col>
><span>课程作业占比:</span><span>{{ kczyzb }}%;</span></a-col <a-col :span="8"><span>期末考试占比:</span><span>{{ qmkszb }}%;</span></a-col>
> <a-col :span="8"><span>课堂测验占比:</span><span>{{ ktcyzb }}%;</span></a-col>
<a-col :span="8"
><span>期末考试占比:</span><span>{{ qmkszb }}%;</span></a-col
>
<a-col :span="8"
><span>课堂测验占比:</span><span>{{ ktcyzb }}%;</span></a-col
>
</a-row> </a-row>
</a-col> </a-col>
<a-col :span="24" style="padding: 0 0 0 30px"> <a-col :span="24" style="padding: 0 0 0 30px">
<a-row> <a-row>
<a-col :span="18" style="margin-top: 5px"> <a-col :span="18" style="margin-top: 5px">
<span style="color: #777777">学生修完本课程需要完成的作业次数</span> <span style="color: #777777">学生修完本课程需要完成的作业次数</span>
<a-input-number style="width: 30%" v-model:value="zycs" @change="handleZycs" :max="100" :disabled="zycsDisabled" /><span <a-input-number style="width: 30%" v-model:value="zycs" @change="handleZycs" :max="100"
style="margin-left: 5px" :disabled="zycsDisabled" /><span style="margin-left: 5px"></span>
></span
>
</a-col> </a-col>
<a-col :span="6" style="text-align: right; padding: 5px 0 0 0"> <a-col :span="6" style="text-align: right; padding: 5px 0 0 0">
<a-button type="primary" @click="handleAddZycs" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增作业</a-button> <a-button type="primary" @click="handleAddZycs" class="mar-right20">
<Icon icon="ant-design:file-add-outlined" />新增作业
</a-button>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -50,7 +44,8 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'score'"> <template v-if="column.key === 'score'">
<span> <span>
<a-input-number v-model:value="record.score" :min="0" :max="100"> <template #addonAfter> % </template></a-input-number> <a-input-number v-model:value="record.score" :min="0" :max="100"> <template #addonAfter> %
</template></a-input-number>
</span> </span>
</template> </template>
<template v-else-if="column.key === 'lstitle'"> <template v-else-if="column.key === 'lstitle'">
@ -66,9 +61,13 @@
</a-col> </a-col>
<a-col :span="24" style="margin-top: 30px; font-size: 18px"> <a-col :span="24" style="margin-top: 30px; font-size: 18px">
<div style="text-align: center"> <div style="text-align: center">
<a-button class="buttonClass" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button> <a-button class="buttonClass" @click="handleBatchAdd">
<Icon icon="ant-design:save-outlined" />保存
</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button class="buttonClass" @click="reloadZy"><Icon icon="ant-design:arrow-left-outlined" />返回</a-button> <a-button class="buttonClass" @click="reloadZy">
<Icon icon="ant-design:arrow-left-outlined" />返回
</a-button>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -78,7 +77,8 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div style="text-align: right"> <div style="text-align: right">
<a-button style="margin-right: 10px" type="primary" @click="handleYyzy" :disabled="editDisabled">引用作业</a-button> <a-button style="margin-right: 10px" type="primary" @click="handleYyzy"
:disabled="editDisabled">引用作业</a-button>
</div> </div>
<div> <div>
<span class="title">编辑作业</span> - <span class="title2">布置作业设置第{{ zyInfo.sort }}次作业内容及要求</span> <span class="title">编辑作业</span> - <span class="title2">布置作业设置第{{ zyInfo.sort }}次作业内容及要求</span>
@ -107,42 +107,27 @@
</a-col> --> </a-col> -->
<a-col :span="24"> <a-col :span="24">
<a-form-item label="作业截止时间" v-bind="validateInfos.endTime"> <a-form-item label="作业截止时间" v-bind="validateInfos.endTime">
<a-date-picker <a-date-picker placeholder="请选择作业截止时间" v-model:value="zyInfo.endTime"
placeholder="请选择作业截止时间" :disabled-date="disabledDate" :show-time="{ format: 'YYYY-MM-DD HH:mm' }"
v-model:value="zyInfo.endTime" valueFormat="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm" style="width: 100%"
:disabled-date="disabledDate" @change="handleEndTime" />
:show-time="{ format: 'YYYY-MM-DD HH:mm' }"
valueFormat="YYYY-MM-DD HH:mm"
format="YYYY-MM-DD HH:mm"
style="width: 100%"
@change="handleEndTime"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="作业发布时间" v-bind="validateInfos.startTime"> <a-form-item label="作业发布时间" v-bind="validateInfos.startTime">
<a-date-picker <a-date-picker placeholder="请选择作业发布时间" v-model:value="zyInfo.startTime"
placeholder="请选择作业发布时间" :disabled-date="disabledDate" :show-time="{ format: 'YYYY-MM-DD HH:mm' }"
v-model:value="zyInfo.startTime" valueFormat="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm" style="width: 90%"
:disabled-date="disabledDate" :disabled="editDisabled" />
:show-time="{ format: 'YYYY-MM-DD HH:mm' }"
valueFormat="YYYY-MM-DD HH:mm"
format="YYYY-MM-DD HH:mm"
style="width: 90%"
:disabled="editDisabled"
/>
<span> <span>
<a-popover title="温馨提示"> <a-popover title="温馨提示">
<template #content> <template #content>
<p <p>填写作业发布时间则作业在指定时间进行发布如未填写作业发布时间则布置完成作业后可手动点击发布作业进行作业发布</p>
>填写作业发布时间则作业在指定时间进行发布如未填写作业发布时间则布置完成作业后可手动点击发布作业进行作业发布</p
>
</template> </template>
<Icon <Icon
icon="ant-design:question-circle-outlined" icon="ant-design:question-circle-outlined"
:size="20" :size="20"
style="float: right; margin-top: 5px; color: #029c88; margin-right: 19px" class="jbxx-zyfbsj-ico" />
/>
</a-popover> </a-popover>
</span> </span>
</a-form-item> </a-form-item>
@ -162,19 +147,10 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="评分标准" layout="inline" v-bind="validateInfos.pfbz"> <a-form-item label="评分标准" layout="inline" v-bind="validateInfos.pfbz">
<a-form-item <a-form-item label="是否允许学生查看" :labelCol="labelCol2" :wrapperCol="wrapperCol2"
label="是否允许学生查看" class="pjbz-sfyxxsck">
:labelCol="labelCol2" <j-dict-select-tag type="radio" v-model:value="zyInfo.sturead" dictCode="yn"
:wrapperCol="wrapperCol2" placeholder="请选择评分标准是否允许学生查看" :disabled="editDisabled" />
class="pjbz-sfyxxsck"
>
<j-dict-select-tag
type="radio"
v-model:value="zyInfo.sturead"
dictCode="yn"
placeholder="请选择评分标准是否允许学生查看"
:disabled="editDisabled"
/>
</a-form-item> </a-form-item>
<a-form-item label=""> <a-form-item label="">
<j-editor v-model:value="zyInfo.pfbz" v-if="pfbzShow" @blur="handlePfbzShow(0)" /> <j-editor v-model:value="zyInfo.pfbz" v-if="pfbzShow" @blur="handlePfbzShow(0)" />
@ -189,41 +165,26 @@
<div class="region"> <div class="region">
<div class="region-title"><span class="region-title-headline"></span><span>学生互评</span></div> <div class="region-title"><span class="region-title-headline"></span><span>学生互评</span></div>
<a-form-item label="学生互评"> <a-form-item label="学生互评">
<div class="tishi" v-if="zyInfo.xshpkg == '1'" <div class="tishi" v-if="zyInfo.xshpkg == '1'">
>每份作业至少互评三次每个学生互评五份作业按时完成互评任务的学生可额外获得最终分数的2%作为互评奖励互评作业质量高的学生可额外获得最终分数的5%作为互评奖励</div 每份作业至少互评三次每个学生互评五份作业按时完成互评任务的学生可额外获得最终分数的2%作为互评奖励互评作业质量高的学生可额外获得最终分数的5%作为互评奖励</div>
> <j-dict-select-tag type="radio" v-model:value="zyInfo.xshpkg" dictCode="yn"
<j-dict-select-tag placeholder="请选择是否允许学生查看" style="margin-top: 15px" :disabled="editDisabled"
type="radio" @change="handleXshpkg" />
v-model:value="zyInfo.xshpkg"
dictCode="yn"
placeholder="请选择是否允许学生查看"
style="margin-top: 15px"
:disabled="editDisabled"
@change="handleXshpkg"
/>
<div v-if="zyInfo.xshpkg == '1'"> <div v-if="zyInfo.xshpkg == '1'">
<!-- <a-form-item label="设置互评人数" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="margin-top: 20px"> <!-- <a-form-item label="设置互评人数" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="margin-top: 20px">
<a-input-number v-model:value="zyInfo.xshprsq" placeholder="请设置互评人数" style="width: 60%" :max="100" :min="0"> <a-input-number v-model:value="zyInfo.xshprsq" placeholder="请设置互评人数" style="width: 60%" :max="100" :min="0">
<template #addonAfter></template> <template #addonAfter></template>
</a-input-number> </a-input-number>
</a-form-item> --> </a-form-item> -->
<a-form-item <a-form-item label="互评结果使用" :labelCol="labelCol3" :wrapperCol="wrapperCol3" class="sshp-hpjgsy">
label="互评结果使用" <a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default"
:labelCol="labelCol3" :disabled="editDisabled">
:wrapperCol="wrapperCol3"
class="sshp-hpjgsy"
>
<a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default" :disabled="editDisabled">
<a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio> <a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio>
<a-radio :value="'0'" style="width: 100%; margin-bottom: 5px">互评成绩作为教师评分的参考成绩</a-radio> <a-radio :value="'0'" style="width: 100%; margin-bottom: 5px">互评成绩作为教师评分的参考成绩</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="是否允许学生看到互评成绩" :labelCol="labelCol4" :wrapperCol="wrapperCol4"
label="是否允许学生看到互评成绩" class="sshp-sfyxxskdhpcj">
:labelCol="labelCol4"
:wrapperCol="wrapperCol4"
class="sshp-sfyxxskdhpcj"
>
<a-radio-group v-model:value="zyInfo.xssfck"> <a-radio-group v-model:value="zyInfo.xssfck">
<a-radio :value="'1'" style="margin-top: 5px">(匿名)</a-radio> <a-radio :value="'1'" style="margin-top: 5px">(匿名)</a-radio>
<a-radio :value="'0'" style="margin-top: 5px"></a-radio> <a-radio :value="'0'" style="margin-top: 5px"></a-radio>
@ -237,26 +198,14 @@
/> --> /> -->
</a-form-item> </a-form-item>
<a-form-item label="互评开始时间" :labelCol="labelCol2" :wrapperCol="wrapperCol2" hidden> <a-form-item label="互评开始时间" :labelCol="labelCol2" :wrapperCol="wrapperCol2" hidden>
<a-date-picker <a-date-picker placeholder="请选择互评开始时间" v-model:value="zyInfo.xshpkssj"
placeholder="请选择互评开始时间" :disabled-date="disabledDate" :show-time="{ format: 'YYYY-MM-DD HH:mm' }"
v-model:value="zyInfo.xshpkssj" valueFormat="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm" style="width: 100%" />
:disabled-date="disabledDate"
:show-time="{ format: 'YYYY-MM-DD HH:mm' }"
valueFormat="YYYY-MM-DD HH:mm"
format="YYYY-MM-DD HH:mm"
style="width: 100%"
/>
</a-form-item> </a-form-item>
<a-form-item label="互评结束时间" :labelCol="labelCol2" :wrapperCol="wrapperCol2"> <a-form-item label="互评结束时间" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
<a-date-picker <a-date-picker placeholder="请选择互评结束时间" v-model:value="zyInfo.xshpjssj"
placeholder="请选择互评结束时间" :disabled-date="disabledDate" :show-time="{ format: 'YYYY-MM-DD HH:mm' }"
v-model:value="zyInfo.xshpjssj" valueFormat="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm" style="width: 100%" />
:disabled-date="disabledDate"
:show-time="{ format: 'YYYY-MM-DD HH:mm' }"
valueFormat="YYYY-MM-DD HH:mm"
format="YYYY-MM-DD HH:mm"
style="width: 100%"
/>
</a-form-item> </a-form-item>
</div> </div>
</a-form-item> </a-form-item>
@ -266,40 +215,19 @@
<div class="region"> <div class="region">
<div class="region-title"><span class="region-title-headline"></span><span>查重设置</span></div> <div class="region-title"><span class="region-title-headline"></span><span>查重设置</span></div>
<a-form-item label="是否进行查重" :labelCol="labelCol3" :wrapperCol="wrapperCol3"> <a-form-item label="是否进行查重" :labelCol="labelCol3" :wrapperCol="wrapperCol3">
<j-dict-select-tag <j-dict-select-tag type="radio" v-model:value="zyInfo.sfcc" dictCode="yn" placeholder="请选择是否查重"
type="radio" :disabled="editDisabled" />
v-model:value="zyInfo.sfcc"
dictCode="yn"
placeholder="请选择是否查重"
:disabled="editDisabled"
/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="检测通过率" :labelCol="labelCol3" :wrapperCol="wrapperCol3" class="ccsz-jctgl"
label="检测通过率" v-if="zyInfo.sfcc == '1'">
:labelCol="labelCol3" <a-input-number v-model:value="zyInfo.wwtgl" placeholder="请输入检测通过率" style="width: 50%" :max="100"
:wrapperCol="wrapperCol3" :min="0" :disabled="editDisabled">
class="ccsz-jctgl"
v-if="zyInfo.sfcc == '1'"
>
<a-input-number
v-model:value="zyInfo.wwtgl"
placeholder="请输入检测通过率"
style="width: 50%"
:max="100"
:min="0"
:disabled="editDisabled"
>
<template #addonAfter> % </template> <template #addonAfter> % </template>
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="比对库设置" :labelCol="labelCol3" :wrapperCol="wrapperCol3" class="ccsz-bdksz"
label="比对库设置" v-if="zyInfo.sfcc == '1'">
:labelCol="labelCol3"
:wrapperCol="wrapperCol3"
class="ccsz-bdksz"
v-if="zyInfo.sfcc == '1'"
>
<div style="padding: 5px 0">维普</div> <div style="padding: 5px 0">维普</div>
<div style="display: flex; flex-direction: column"> <div style="display: flex; flex-direction: column">
<a-checkbox v-model:checked="zyInfo.wwcc" :disabled="editDisabled" style="margin-left: 8px"> <a-checkbox v-model:checked="zyInfo.wwcc" :disabled="editDisabled" style="margin-left: 8px">
@ -307,18 +235,19 @@
<span class="bled-countenance2">中文科技期刊数据库硕博学位论文库高校特色论文库互联网数据资源/互联网文档资源</span> <span class="bled-countenance2">中文科技期刊数据库硕博学位论文库高校特色论文库互联网数据资源/互联网文档资源</span>
</a-checkbox> </a-checkbox>
<a-checkbox v-model:checked="zyInfo.xncc" :disabled="editDisabled"> <a-checkbox v-model:checked="zyInfo.xncc" :disabled="editDisabled">
<span class="bled-countenance">学校作业库查重</span><br /><span class="bled-countenance2">历届学生提供的作业库内查重</span> <span class="bled-countenance">学校作业库查重</span><br /><span
class="bled-countenance2">历届学生提供的作业库内查重</span>
</a-checkbox> </a-checkbox>
<a-checkbox v-model:checked="zyInfo.nwcc" :disabled="editDisabled"> <a-checkbox v-model:checked="zyInfo.nwcc" :disabled="editDisabled">
<span class="bled-countenance">本次作业查重</span><br /><span class="bled-countenance2">本次学生提交的作业间查重</span> <span class="bled-countenance">本次作业查重</span><br /><span
class="bled-countenance2">本次学生提交的作业间查重</span>
</a-checkbox> </a-checkbox>
</div> </div>
<div style="padding: 5px 0">AIGC</div> <div style="padding: 5px 0">AIGC</div>
<div> <div>
<a-checkbox v-model:checked="zyInfo.aigccc" style="margin-left: 8px" :disabled="editDisabled"> <a-checkbox v-model:checked="zyInfo.aigccc" style="margin-left: 8px" :disabled="editDisabled">
<span class="bled-countenance">AIGC查重</span><br /><span class="bled-countenance2" <span class="bled-countenance">AIGC查重</span><br /><span
>检测作业是否部分或全部由AI模型生成</span class="bled-countenance2">检测作业是否部分或全部由AI模型生成</span>
>
</a-checkbox> </a-checkbox>
</div> </div>
</a-form-item> </a-form-item>
@ -336,9 +265,9 @@
</div> </div>
<div v-show="showType == 3" style="overflow-y: auto"> <div v-show="showType == 3" style="overflow-y: auto">
<a-row> <a-row>
<a-col :span="24" <a-col :span="24"><span class="title">批阅作业</span> - <span class="title2">作业详情页</span>
><span class="title">批阅作业</span> - <span class="title2">作业详情页</span> <a-button type="primary" preIcon="ant-design:arrow-left-outlined" @click="reloadZy"
<a-button type="primary" preIcon="ant-design:arrow-left-outlined" @click="reloadZy" style="float: right; margin-right: 8px"> 返回</a-button> style="float: right; margin-right: 8px"> 返回</a-button>
<a-popover title="温馨提示"> <a-popover title="温馨提示">
<template #content> <template #content>
<p>1非高峰期预计30分钟内返回检测结果高峰期预计时间会更长请您耐心等待</p> <p>1非高峰期预计30分钟内返回检测结果高峰期预计时间会更长请您耐心等待</p>
@ -346,14 +275,15 @@
<p>3点击最高查重率可分别查看学生维普作业库查重学校作业库查重本次作业查重AIGC查重相似率</p> <p>3点击最高查重率可分别查看学生维普作业库查重学校作业库查重本次作业查重AIGC查重相似率</p>
<p>4学生上传的课程作业全部存档</p> <p>4学生上传的课程作业全部存档</p>
</template> </template>
<Icon icon="ant-design:question-circle-outlined" :size="30" style="float: right; margin-right: 8px; color: #029c88" /> <Icon icon="ant-design:question-circle-outlined" :size="30"
style="float: right; margin-right: 8px; color: #029c88" />
</a-popover> </a-popover>
<a-divider <a-divider /></a-col>
/></a-col>
<a-col :span="24" style="overflow: hidden"> <a-col :span="24" style="overflow: hidden">
<!--查询区域--> <!--查询区域-->
<div class="sear-distance"> <div class="sear-distance">
<a-form @keyup.enter.native="searchQueryZyxq" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form @keyup.enter.native="searchQueryZyxq" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="12"> <a-col :lg="12">
<a-form-item label="学生姓名"> <a-form-item label="学生姓名">
@ -382,21 +312,25 @@
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px">发布成绩</a-button> --> <a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px">发布成绩</a-button> -->
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleKhcl" style="margin-left: 8px">上传考核材料</a-button> --> <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleKhcl" style="margin-left: 8px">上传考核材料</a-button> -->
<!-- <span class="tishi" style="margin-left: 20px; padding: 10px">温馨提示作业完成后请及时发布评分</span> <!-- <span class="tishi" style="margin-left: 20px; padding: 10px">温馨提示作业完成后请及时发布评分</span>
</a-col> --> </a-col> -->
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24" :lg="{ span: 16 }"> <a-col :span="24" :lg="{ span: 16 }">
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:search-outlined'" @click="searchQueryZyxq">查询</a-button> <a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:search-outlined'"
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:reload-outlined'" @click="searchReset" style="margin-left: 8px">重置</a-button> @click="searchQueryZyxq">查询</a-button>
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:export-outlined'" @click="onExportXls" style="margin-left: 8px">导出</a-button> <a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:reload-outlined'"
<a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:export-outlined'" @click="batchHandleFabu" style="margin-left: 8px">发布成绩</a-button> @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col> <a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:export-outlined'"
<a-col :span="24" :lg="{ span: 8 }"> @click="onExportXls" style="margin-left: 8px">导出</a-button>
<span class="tishi" style="padding: 10px">温馨提示作业完成后请及时发布评分</span> <a-button type="primary" :preIcon="isSmallScreen ? '' : 'ant-design:export-outlined'"
</a-col> @click="batchHandleFabu" style="margin-left: 8px">发布成绩</a-button>
</a-row> </a-col>
<a-col :span="24" :lg="{ span: 8 }">
<span class="tishi" style="padding: 10px">温馨提示作业完成后请及时发布评分</span>
</a-col>
</a-row>
</a-form> </a-form>
</div> </div>
<!--引用表格--> <!--引用表格-->
@ -408,10 +342,12 @@
<div v-if="record.alltgl"> <div v-if="record.alltgl">
<span v-if="record.filePath"> <span v-if="record.filePath">
<template v-if="record.zgccl && record.zgccl != '0'"> <template v-if="record.zgccl && record.zgccl != '0'">
<span v-if="parseFloat(record.zgccl) <= parseFloat(record.alltgl)" title="通过" style="color: #36b395; cursor: pointer" @click="handleViewInfo(record)"> <span v-if="parseFloat(record.zgccl) <= parseFloat(record.alltgl)" title="通过"
style="color: #36b395; cursor: pointer" @click="handleViewInfo(record)">
{{ record.zgccl }} {{ record.zgccl }}
</span> </span>
<span v-else title="未通过" style="color: red" @click="handleViewInfo(record)">{{ record.zgccl }}</span> <span v-else title="未通过" style="color: red" @click="handleViewInfo(record)">{{ record.zgccl
}}</span>
</template> </template>
<template v-else>查重中</template> <template v-else>查重中</template>
</span> </span>
@ -444,13 +380,12 @@
</div> </div>
<div v-if="showType == 4"> <div v-if="showType == 4">
<a-row> <a-row>
<a-col :span="24" <a-col :span="24"><span class="title">批阅作业</span> - <span class="title2">作业详情页</span> - <span
><span class="title">批阅作业</span> - <span class="title2">作业详情页</span> - <span class="title2">查重相似度详情</span> class="title2">查重相似度详情</span>
<a-button type="primary" @click="handleShowType(3)" style="float: right; margin-right: 8px" <a-button type="primary" @click="handleShowType(3)" style="float: right; margin-right: 8px">
><Icon icon="ant-design:arrow-left-outlined" />返回</a-button <Icon icon="ant-design:arrow-left-outlined" />返回
> </a-button>
<a-divider <a-divider /></a-col>
/></a-col>
<a-col :span="24"> <a-col :span="24">
<a-table :columns="columnsCcjg" :data-source="tableCcjgData" :pagination="false"> <a-table :columns="columnsCcjg" :data-source="tableCcjgData" :pagination="false">
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
@ -466,13 +401,12 @@
</div> </div>
<div v-if="showType == 5"> <div v-if="showType == 5">
<a-row> <a-row>
<a-col :span="24" <a-col :span="24"><span class="title">批阅作业</span> - <span class="title2">作业详情页</span> - <span
><span class="title">批阅作业</span> - <span class="title2">作业详情页</span> - <span class="title2">学生互评详情</span> class="title2">学生互评详情</span>
<a-button type="primary" @click="handleShowType(3)" style="float: right; margin-right: 8px" <a-button type="primary" @click="handleShowType(3)" style="float: right; margin-right: 8px">
><Icon icon="ant-design:arrow-left-outlined" />返回</a-button <Icon icon="ant-design:arrow-left-outlined" />返回
> </a-button>
<a-divider <a-divider /></a-col>
/></a-col>
<a-col :span="24"> <a-col :span="24">
<a-table :columns="columnsXshp" :data-source="tableXshpData" :pagination="false"> </a-table> <a-table :columns="columnsXshp" :data-source="tableXshpData" :pagination="false"> </a-table>
</a-col> </a-col>
@ -483,27 +417,34 @@
<a-row> <a-row>
<a-col :span="24"><span class="title">布置作业</span><a-divider /></a-col> <a-col :span="24"><span class="title">布置作业</span><a-divider /></a-col>
<a-col :span="24" style="text-align: right; margin-top: 5px"> <a-col :span="24" style="text-align: right; margin-top: 5px">
<a-button type="primary" @click="handleSzzycs(1)"><Icon icon="ant-design:edit-outlined" />修改课程作业次数</a-button> <a-button type="primary" @click="handleSzzycs(1)">
<Icon icon="ant-design:edit-outlined" />修改课程作业次数
</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button type="primary" @click="handleAddOne" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增作业</a-button> <a-button type="primary" @click="handleAddOne" class="mar-right20">
<Icon icon="ant-design:file-add-outlined" />新增作业
</a-button>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-row style="padding: 10px"> <a-row style="padding: 10px">
<a-col :lg="24" v-for="(item, index) in tableData" style="padding: 0 5px 12px 5px; border-radius: 5px" :key="index"> <a-col :lg="24" v-for="(item, index) in tableData" style="padding: 0 5px 12px 5px; border-radius: 5px"
<a-card :title="'第' + item.sort + '次作业(占比' + item.score + '%)'" v-if="!item.endTime" class="cardClass module-bg"> :key="index">
<a-card :title="'第' + item.sort + '次作业(占比' + item.score + '%)'" v-if="!item.endTime"
class="cardClass module-bg">
<template #extra><span class="card-label3"> 待设置</span> </template> <template #extra><span class="card-label3"> 待设置</span> </template>
<p class="sznrClass">尚未布置作业题目及具体要求</p> <p class="sznrClass">尚未布置作业题目及具体要求</p>
<div style="text-align: right"> <div style="text-align: right">
<a @click="handleEdit(item, false)" class="home-status"><Icon icon="ant-design:file-text-outlined" />设置作业内容及要求</a> <a @click="handleEdit(item, false)" class="home-status">
<Icon icon="ant-design:file-text-outlined" />设置作业内容及要求
</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(item)" class="home-status"><Icon icon="ant-design:delete-outlined" />删除</a> <a @click="handleDelete(item)" class="home-status">
<Icon icon="ant-design:delete-outlined" />删除
</a>
</div> </div>
</a-card> </a-card>
<a-card <a-card :title="'第' + item.sort + '次作业(占比' + item.score + '%)'"
:title="'第' + item.sort + '次作业(占比' + item.score + '%)'" v-if="item.endTime && (item.zyStatus == '1' || item.zyStatus == '2')" class="cardClass module-bg">
v-if="item.endTime && (item.zyStatus == '1' || item.zyStatus == '2')"
class="cardClass module-bg"
>
<template #extra><span class="card-label">已发布</span> </template> <template #extra><span class="card-label">已发布</span> </template>
<div class="ellip-title"> <div class="ellip-title">
<span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span> <span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span>
@ -511,69 +452,78 @@
</div> </div>
<div style="width: 100%; display: flex"> <div style="width: 100%; display: flex">
<div class="data-suggest zuanqu" @click="handleZyxx(item, '1')" <div class="data-suggest zuanqu" @click="handleZyxx(item, '1')"><span>{{ item.wtjnum
><span>{{ item.wtjnum }}</span><span>待提交</span></div }}</span><span>待提交</span></div>
>
<!-- <div class="data-suggest zuanqu" @click="handleZyxx(item, '2')" <!-- <div class="data-suggest zuanqu" @click="handleZyxx(item, '2')"
><span>{{ item.ytjnum }}</span><span>已提交</span></div ><span>{{ item.ytjnum }}</span><span>已提交</span></div
> --> > -->
<div class="data-suggest zuanqu" @click="handleZyxx(item, '5')" <div class="data-suggest zuanqu" @click="handleZyxx(item, '5')"><span>{{ item.dpynum
><span>{{ item.dpynum }}</span><span>待评阅</span></div }}</span><span>待评阅</span></div>
> <div class="data-suggest zuanqu" @click="handleZyxx(item, '4')"><span>{{ item.ypynum
<div class="data-suggest zuanqu" @click="handleZyxx(item, '4')" }}</span><span>已评阅</span></div>
><span>{{ item.ypynum }}</span><span>已评阅</span></div
>
</div> </div>
<div> <div>
<div style="width: 100%; display: flex; margin-top: 20px"> <div style="width: 100%; display: flex; margin-top: 20px">
<div class="ellip-word" <div class="ellip-word flex"><span class="ellip-word2">作业发布时间</span>{{ item.startTime ?
><span class="ellip-word2">作业发布时间</span dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div>
>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div <div class="ellip-word flex"><span class="ellip-word2">作业截止时间</span>{{
> dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
</div> </div>
<div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%"> <div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%">
<!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a> <!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a>
<a-divider type="vertical" /> --> <a-divider type="vertical" /> -->
<a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a> <a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status">
<a-divider type="vertical" v-if="item.ytjnum > 0"/> <Icon icon="ant-design:form-outlined" />编辑作业
<a @click="handleFenxiang(item)" class="home-status"><Icon icon="ant-design:share-alt-outlined" />分享</a> </a>
<a-divider type="vertical" v-if="item.ytjnum > 0" />
<a @click="handleFenxiang(item)" class="home-status">
<Icon icon="ant-design:share-alt-outlined" />分享
</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleChehui(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status"><Icon icon="ant-design:import-outlined" />撤回作业</a> <a @click="handleChehui(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status">
<a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0"/> <Icon icon="ant-design:import-outlined" />撤回作业
<a @click="handleZyxx(item, '')" class="home-status"><Icon icon="ant-design:file-done-outlined" />批阅作业</a> </a>
<a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0"/> <a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0" />
<a @click="handleDelete(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status"><Icon icon="ant-design:delete-outlined" />删除</a> <a @click="handleZyxx(item, '')" class="home-status">
<Icon icon="ant-design:file-done-outlined" />批阅作业
</a>
<a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0" />
<a @click="handleDelete(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status">
<Icon icon="ant-design:delete-outlined" />删除
</a>
</div> </div>
</div> </div>
</a-card> </a-card>
<a-card <a-card :title="'第' + item.sort + '次作业(占比' + item.score + '%)'"
:title="'第' + item.sort + '次作业(占比' + item.score + '%)'" v-if="item.endTime && item.zyStatus == '0'" class="cardClass" bodyStyle="background: #fff;">
v-if="item.endTime && item.zyStatus == '0'"
class="cardClass"
bodyStyle="background: #fff;"
>
<template #extra><span class="card-label2">待发布</span> </template> <template #extra><span class="card-label2">待发布</span> </template>
<div class="ellip-title"> <div class="ellip-title">
<span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span> <span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span>
<a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a> <a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a>
</div> </div>
<div style="width: 100%"> <div style="width: 100%">
<div class="ellip-word" <div class="ellip-word flex"><span class="ellip-word2">作业发布时间</span>{{ item.startTime ?
><span class="ellip-word2">作业发布时间</span dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div>
>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div <div class="ellip-word flex"><span class="ellip-word2">作业截止时间</span>{{
> dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
</div> </div>
<div style="height: 45px">&nbsp;</div> <div style="height: 45px">&nbsp;</div>
<div style="text-align: right; margin-top: 30px"> <div style="text-align: right; margin-top: 30px">
<a @click="handleEdit(item, false)" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a> <a @click="handleEdit(item, false)" class="home-status">
<Icon icon="ant-design:form-outlined" />编辑作业
</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleFenxiang(item)" class="home-status"><Icon icon="ant-design:share-alt-outlined" />分享</a> <a @click="handleFenxiang(item)" class="home-status">
<Icon icon="ant-design:share-alt-outlined" />分享
</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleFabu(item)" class="home-status"><Icon icon="ant-design:upload-outlined" />发布作业</a> <a @click="handleFabu(item)" class="home-status">
<Icon icon="ant-design:upload-outlined" />发布作业
</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(item)" class="home-status"><Icon icon="ant-design:delete-outlined" />删除</a> <a @click="handleDelete(item)" class="home-status">
<Icon icon="ant-design:delete-outlined" />删除
</a>
</div> </div>
</a-card> </a-card>
</a-col> </a-col>
@ -585,7 +535,8 @@
<SzybStudentModal ref="SzybStudentModalpage" @success="handleSuccess"></SzybStudentModal> <SzybStudentModal ref="SzybStudentModalpage" @success="handleSuccess"></SzybStudentModal>
<ZyInfoStudentScoreModal ref="registerScoreModal" @success="handleSuccess"></ZyInfoStudentScoreModal> <ZyInfoStudentScoreModal ref="registerScoreModal" @success="handleSuccess"></ZyInfoStudentScoreModal>
<ZyInfoStudentPiyueModal ref="registerPiyueModal" @success="handleSuccess"></ZyInfoStudentPiyueModal> <ZyInfoStudentPiyueModal ref="registerPiyueModal" @success="handleSuccess"></ZyInfoStudentPiyueModal>
<KcTeachingUnitContentOneListModal ref="registerZcjcModal" @success="handleCheckZcjcSuccess"></KcTeachingUnitContentOneListModal> <KcTeachingUnitContentOneListModal ref="registerZcjcModal" @success="handleCheckZcjcSuccess">
</KcTeachingUnitContentOneListModal>
<ZyInfoDetailModal ref="registerDetialModal" @success="handleSuccess"></ZyInfoDetailModal> <ZyInfoDetailModal ref="registerDetialModal" @success="handleSuccess"></ZyInfoDetailModal>
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal> <ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
@ -596,7 +547,8 @@
<YyzyListModal ref="YyzyListModalPage" @success="handleCallYinyong"></YyzyListModal> <YyzyListModal ref="YyzyListModalPage" @success="handleCallYinyong"></YyzyListModal>
<ZyCyFenxiangListModal ref="ZyCyFenxiangListModalpage"></ZyCyFenxiangListModal> <ZyCyFenxiangListModal ref="ZyCyFenxiangListModalpage"></ZyCyFenxiangListModal>
<a-modal v-model:visible="imgvisible" title="图片预览" width="800px" :cancelText="`关闭`" :okButtonProps="{ class: { 'jee-hidden': true } }"> <a-modal v-model:visible="imgvisible" title="图片预览" width="800px" :cancelText="`关闭`"
:okButtonProps="{ class: { 'jee-hidden': true } }">
<div style="padding: 10px 20px"> <div style="padding: 10px 20px">
<a-button type="primary" @click="rotateImage">顺时针旋转</a-button> <a-button type="primary" @click="rotateImage">顺时针旋转</a-button>
<a-button type="primary" @click="rotateImage2" style="margin-left: 20px">逆时针旋转</a-button> <a-button type="primary" @click="rotateImage2" style="margin-left: 20px">逆时针旋转</a-button>
@ -1894,6 +1846,12 @@ watchEffect(() => {
<style lang="less" scoped> <style lang="less" scoped>
// //
@media (max-width: 768px) { @media (max-width: 768px) {
.jbxx-zyfbsj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 5px
}
.ccsz-bdksz{} .ccsz-bdksz{}
.ccsz-jctgl{} .ccsz-jctgl{}
@ -1913,6 +1871,13 @@ watchEffect(() => {
// PC // PC
@media (min-width: 769px) { @media (min-width: 769px) {
.jbxx-zyfbsj-ico{
float: right;
margin-top: 5px;
color: #029c88;
margin-right: 19px
}
.ccsz-bdksz{ .ccsz-bdksz{
margin-left: -10px; margin-left: -10px;
} }

View File

@ -517,11 +517,11 @@
</div> </div>
<div > <div >
<div style="width: 100%; display: flex; margin-top: 20px"> <div style="width: 100%; display: flex; margin-top: 20px">
<div class="ellip-word" <div class="ellip-word flex"
><span class="ellip-word2">作业发布时间</span ><span class="ellip-word2">作业发布时间</span
>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div >{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div
> >
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div> <div class="ellip-word flex"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
</div> </div>
<div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%"> <div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%">
<!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a> <!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a>
@ -550,11 +550,11 @@
<a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a> <a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a>
</div> </div>
<div style="width: 100%"> <div style="width: 100%">
<div class="ellip-word" <div class="ellip-word flex"
><span class="ellip-word2">作业发布时间</span ><span class="ellip-word2">作业发布时间</span
>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div >{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div
> >
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div> <div class="ellip-word flex"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
</div> </div>
<div style="height: 45px">&nbsp;</div> <div style="height: 45px">&nbsp;</div>
<div style="text-align: right; margin-top: 30px"> <div style="text-align: right; margin-top: 30px">

View File

@ -1,8 +1,8 @@
<template> <template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row> <a-row :gutter="[16, 16]">
<a-col :span="12"> <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div v-if="showType=='1'"> <div v-if="showType=='1'">
<iframe id="pdfPreviewIframe" :src="ylurl" frameborder="0" width="100%" height="550px" scrolling="auto"></iframe> <iframe id="pdfPreviewIframe" :src="ylurl" frameborder="0" width="100%" height="550px" scrolling="auto"></iframe>
</div> </div>
@ -33,7 +33,7 @@
<a-button type="primary">下载文件</a-button> <a-button type="primary">下载文件</a-button>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="作业名称"> <a-form-item label="作业名称">