diff --git a/danger-manage-web/src/views/educationPlanExam/lessonsProgram/index.vue b/danger-manage-web/src/views/educationPlanExam/lessonsProgram/index.vue index ceb7f0f8489ea393f5b44f8220a600b8eaf8b45b..10569ff3ee507a879d265f2800a015b9165d0274 100644 --- a/danger-manage-web/src/views/educationPlanExam/lessonsProgram/index.vue +++ b/danger-manage-web/src/views/educationPlanExam/lessonsProgram/index.vue @@ -74,7 +74,9 @@ <template v-slot="scope"> <div> {{ - courseOptions.filter( + scope.row.courseType && courseOptions.filter( + (item) => item.planId == scope.row.courseType + )[0] && courseOptions.filter( (item) => item.planId == scope.row.courseType )[0].planName }} @@ -88,7 +90,7 @@ </el-table-column> <el-table-column label="附件" align="center" prop="enclosure"> <template v-slot="{ row: { enclosure } }"> - <a v-if="enclosure.indexOf('.txt')>=0" @click="downloadText(enclosure)" class="down-load">下载附件</a> + <a v-if="enclosure && enclosure.indexOf('.txt')>=0" @click="downloadText(enclosure)" class="down-load">下载附件</a> <a v-else :href="enclosure" class="down-load">下载附件</a> </template> </el-table-column> diff --git a/danger-manage-web/src/views/educationPlanExam/questionBank/components/AddQuestion.vue b/danger-manage-web/src/views/educationPlanExam/questionBank/components/AddQuestion.vue new file mode 100644 index 0000000000000000000000000000000000000000..1cbe4e90166b486e6ef4840c382dbd8db783b21d --- /dev/null +++ b/danger-manage-web/src/views/educationPlanExam/questionBank/components/AddQuestion.vue @@ -0,0 +1,333 @@ +<template> + <div ref="myBody" class="add-question flex"> + <div class="text flex"> + <div class="left"> + ç›®å‰å½•å…¥é¢˜ç›®æ˜¯ç¬¬<span>{{ questionNextNum }}</span + >é“题 + </div> + <div class="right">{{ courseName }}</div> + </div> + + <el-form class="form flex" ref="form" :model="form" label-width="auto"> + <!-- <div class="top flex"> --> + <div> + <el-form-item + label="题目内容" + prop="topicTitle" + :rules="{ + required: true, + message: '必须输入题目内容', + trigger: 'blur', + }" + > + <el-input + type="textarea" + placeholder="多行输入" + resize="none" + rows="4" + v-model="form.topicTitle" + > + </el-input> + </el-form-item> + </div> + + <div class="bottom"> + <!-- <el-form-item label="选项1" prop="title"> + <el-input v-model="form.title" placeholder="请输入"></el-input> + </el-form-item> --> + <el-form-item + v-for="(question, index) in form.questions" + :label="'选项' + (index + 1)" + :key="question.key" + :prop="'questions.' + index + '.value'" + :rules=" + index === 0 + ? { + required: true, + message: '第一项ä¸èƒ½ä¸ºç©ºä¸èƒ½ä¸ºç©º', + trigger: 'blur', + } + : {} + " + > + <div class="add-select flex"> + <el-input + type="textarea" + placeholder="多行输入" + style="flex: 1; margin-right: 10px" + rows="2" + v-model="question.value" + ></el-input> + <div class="flex algin-items"> + <div + @click="rightAnswerClick(index)" + class="right" + :class="{ active: answerNum === index }" + > + 设为æ£ç¡®ç”案 + </div> + <el-button + size="mini" + type="danger" + v-if="index > 0" + @click.prevent="removeDomain(question)" + >åˆ é™¤</el-button + > + </div> + </div> + </el-form-item> + + <el-form-item + class="noAttr" + :label="`选项${form.questions.length + 1}`" + prop="" + > + <div class="add-select flex"> + <el-input + type="textarea" + placeholder="多行输入" + resize="none" + rows="2" + v-model="addValue" + style="flex: 1; margin-right: 10px" + > + </el-input> + <div class="flex algin-items"> + <div + @click="rightAnswerClick(form.questions.length)" + class="right" + :class="{ active: answerNum === form.questions.length }" + > + 设为æ£ç¡®ç”案 + </div> + + <el-button + size="mini" + type="primary" + @click.prevent="add(addValue)" + >新增</el-button + > + </div> + </div> + </el-form-item> + </div> + </el-form> + </div> +</template> + +<script> +import { + addQuestion, + checkQuestion, + changeQuestion, + getQuestion, + getLessonById, +} from "@/api/educationPlanExam/lessonsProgram.js"; + +export default { + name: "AnswerLesson", + props: { + // visible: { + // type: Boolean, + // default: false, + // }, + courseId: { + type: Number, + }, + topicId: { + type: Number, + }, + }, + components: {}, + data() { + return { + form: { + topicTitle: "", + questions: [{ value: "" }, { value: "" }, { value: "" }], + }, + answerNum: null, + addValue: "", + // å½•å…¥çš„æ˜¯ç¬¬å‡ é“题 + questionNextNum: 1, + courseName: "", + }; + }, + + created() { + // 如果å˜åœ¨å°±æ˜¯ä¿®æ”¹ + if (this.topicId) { + checkQuestion(this.topicId).then((res) => { + console.log(res.data); + const data = res.data; + this.form = { + topicTitle: data.topicTitle, + questions: JSON.parse(data.topicOption), + }; + this.answerNum = data.answer; + }); + } + + // æŸ¥è¯¢æ˜¯ç¬¬å‡ é“题 + this.getQuestion(); + // 获å–è¯¾ç¨‹æ ‡é¢˜ + this.getLessonById(this.courseId); + }, + methods: { + getQuestion() { + getQuestion({ courseId: this.courseId }).then((res) => { + this.questionNextNum = res.total + 1; + }); + }, + getLessonById(courseId) { + getLessonById(courseId).then((res) => { + console.log(res); + this.courseName = res.data.courseName; + }); + }, + addQuestion(data) { + // 如果是修改,就用修改的方法,如果是新增,就用新增的方法 + if (this.topicId) { + return changeQuestion({ topicId: this.topicId, ...data }); + } else { + return addQuestion({ courseId: this.courseId, ...data }); + } + }, + rightAnswerClick(index) { + this.answerNum = index; + console.log(index); + }, + // åˆ é™¤é€‰é¡¹ + removeDomain(question) { + const index = this.form.questions.indexOf(question); + // 如果是æ£ç¡®ç”案,就让æ£ç¡®ç”案清空 + if (this.answerNum === index) { + this.answerNum = null; + } + if (index >= 0) { + this.form.questions.splice(index, 1); + } + }, + // 新增选项 + add(addValue) { + this.form.questions.push({ value: addValue }); + console.log(); + }, + save(num = 2) { + return new Promise((resove) => { + if (!this.answerNum && this.answerNum !== 0) { + this.$message({ + message: "è¦å‘Šï¼Œè¯·è®¾ç½®ä¸€ä¸ªæ£ç¡®ç”案", + type: "warning", + }); + return resove(false); + } + this.$refs.form.validate((valid) => { + if (valid) { + const data = {}; + data.topicTitle = this.form.topicTitle; + data.topicOption = JSON.stringify(this.form.questions); + data.answer = this.answerNum; + this.addQuestion(data).then((res) => { + if (res.code == 200) { + // 把修改的这个归ä½ï¼Œå˜æˆæ£å¸¸æ·»åŠ + this.$emit("update:topicId", null); + this.$message({ + message: "æ·»åŠ é¢˜ç›®æˆåŠŸ", + type: "success", + }); + this.$parent.$parent.componentsNumChange(num); + this.$parent.$parent.$parent.getList(); + resove(true); + } + }); + } + }); + }); + }, + + saveAndNext() { + this.save(3).then((res) => { + if (res) { + this.reset(); + this.questionNextNum++; + } + }); + }, + reset() { + this.form = { + topicTitle: "", + questions: [{ value: "" }, { value: "" }, { value: "" }], + }; + this.answerNum = null; + this.addValue = ""; + }, + }, +}; +</script> +<style lang="scss" scoped> +.add-question { + width: 100%; + height: 550px; + // overflow: hidden; + flex-direction: column; + padding-bottom: 7px; + margin-bottom: 20px; + border-bottom: 1px solid #bbbbbb; + .form { + flex: 1; + flex-direction: column; + height: 100%; + .bottom { + overflow-y: auto; + height: 330px; + box-sizing: border-box; + + .algin-items { + align-items: center; + width: 200px; + } + .right { + display: inline-block; + width: 133px; + margin-right: 10px; + line-height: initial; + padding: 4px 0; + border: 1px solid #bbbbbb; + color: #101010; + font-size: 12px; + text-align: center; + border-radius: 4px; + box-sizing: border-box; + cursor: pointer; + &.active { + background-color: #0bab0c; + color: #ffffff; + } + &:hover { + background-color: rgba(11, 171, 12, 0.5); + color: #ffffff; + } + } + } + } + .text { + margin-top: 13px; + margin-bottom: 34px; + justify-content: space-between; + height: 28px; + .left { + line-height: 28px; + color: #101010; + font-size: 14px; + } + .right { + width: 411px; + line-height: 28px; + background: #1d84ff; + padding-right: 5px; + color: #fff; + text-align: right; + } + } +} +</style> diff --git a/danger-manage-web/src/views/educationPlanExam/questionBank/components/Dia.vue b/danger-manage-web/src/views/educationPlanExam/questionBank/components/Dia.vue new file mode 100644 index 0000000000000000000000000000000000000000..c0b88372aaf59a5d347701b130a195e6b3b4561c --- /dev/null +++ b/danger-manage-web/src/views/educationPlanExam/questionBank/components/Dia.vue @@ -0,0 +1,173 @@ +<!-- + * @Author: 纪泽龙 jizelong@qq.com + * @Date: 2022-09-22 10:38:49 + * @LastEditors: 纪泽龙 jizelong@qq.com + * @LastEditTime: 2022-09-28 17:48:07 + * @FilePath: /danger-manage-web/src/views/lessonsProgram/components/addLesson.vue + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看é…ç½® 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE +--> +<template> + <el-dialog + class="add-lession" + :title="title" + :visible.sync="visible" + width="1000px" + :close-on-click-modal="false" + :close-on-press-escape="false" + :before-close="dialogCancel" + @closed="closeFinished" + destroy-on-close + > + <div v-if="visible" ref="myBody" class="body"> + <transition name="fade" mode="out-in"> + <component + :is="currentComponent" + :courseId.sync="courseId" + :topicId.sync="topicId" + ref="current" + ></component> + </transition> + <!-- <Lesson ref='lesson'/> --> + <!-- <AddQuestion /> + <QuestionList/> --> + </div> + + <div slot="footer" class="dialog-footer"> + <el-button + type="primary" + v-if="this.componentsNum == 1 || this.componentsNum == 3" + @click="save" + >ä¿å˜</el-button + > + + <el-button type="primary" @click="saveAndNext">{{ + saveNextText + }}</el-button> + <el-button + v-if="this.componentsNum == 2" + type="primary" + @click="dialogCancel" + >{{ "确认" }}</el-button + > + <el-button @click="dialogCancel">å–消</el-button> + </div> + </el-dialog> +</template> + +<script> +import Lesson from "./Lesson"; +import AddQuestion from "./AddQuestion"; +import QuestionList from "./QuestionList"; + +export default { + name: "AnswerLesson", + props: { + visible: { + type: Boolean, + default: false, + }, + componentsNum: { + type: Number, + default: 1, + }, + courseId: { + type: Number, + }, + }, + // components: { + // Lesson, + // AddQuestion, + // QuestionList, + // }, + + data() { + return { + title: "录入课程", + currentComponent: Lesson, + // 当å‰é¢˜ç›®æŸ¥çœ‹ + topicId: null, + }; + }, + watch: { + componentsNum: { + handler(num) { + if (num === 1) { + this.currentComponent = Lesson; + if (this.courseId) { + this.title = "修改课程"; + } else { + this.title = "新增课程"; + } + } else if (num === 2) { + this.currentComponent = QuestionList; + + this.title = "题目列表"; + } else { + this.currentComponent = AddQuestion; + if (this.topicId) { + this.title = "修改题目"; + } else { + this.title = "新增题目"; + } + } + }, + deep: true, + }, + }, + computed: { + saveNextText() { + let text; + if (this.componentsNum == 1) { + text = "ä¿å˜å¹¶å½•å…¥é¢˜ç›®"; + } else if (this.componentsNum == 2) { + text = "录入考题"; + } else { + text = "ä¿å˜å¹¶å½•å…¥ä¸‹ä¸€é¢˜"; + } + return text; + }, + }, + methods: { + saveBody() { + this.startHeight = this.$refs.myBody.offsetHeight - 55 + "px"; + }, + + closeFinished() {}, + // å…³é—ä¹‹åŽ + // åªä¿å˜ + save() { + // this.answerClear(); + this.$refs.current.save(); + }, + // ä¿å˜å¹¶å½•å…¥ + saveAndNext() { + this.$refs.current.saveAndNext(); + }, + // éšè—与显示dialog + dialogCancel() { + this.$emit("update:visible", false); + }, + // 把ID改å˜äº† + changeCourseId(courseId) { + this.$emit("update:courseId", courseId); + }, + // 改å˜å½“å‰ç»„件 + componentsNumChange(num) { + this.$emit("update:componentsNum", num); + }, + + answerClear() { + this.answerArr = []; + this.changeCourseId(null); + }, + }, +}; +</script> +<style lang="scss" scoped> +.body { + width: 100%; + height: 100%; + padding-right: 40px; + padding-left: 36px; +} +</style> diff --git a/danger-manage-web/src/views/educationPlanExam/questionBank/components/Editor.vue b/danger-manage-web/src/views/educationPlanExam/questionBank/components/Editor.vue new file mode 100644 index 0000000000000000000000000000000000000000..10d09938d510894924327afe0d2cc9291093c961 --- /dev/null +++ b/danger-manage-web/src/views/educationPlanExam/questionBank/components/Editor.vue @@ -0,0 +1,262 @@ +<template> + <div> + <el-upload + :action="uploadUrl" + :on-success="handleUploadSuccess" + :on-error="handleUploadError" + name="file" + :show-file-list="false" + :headers="headers" + style="display: none" + ref="upload" + v-if="this.uploadUrl" + > + </el-upload> + <div class="editor" ref="editor" :style="styles"></div> + </div> +</template> + +<script> +import Quill from "quill"; +import "quill/dist/quill.core.css"; +import "quill/dist/quill.snow.css"; +import "quill/dist/quill.bubble.css"; +import { getToken } from "@/utils/auth"; + +export default { + name: "Editor", + props: { + /* 编辑器的内容 */ + value: { + type: String, + default: "", + }, + /* 高度 */ + height: { + type: Number, + default: null, + }, + /* 最å°é«˜åº¦ */ + minHeight: { + type: Number, + default: null, + }, + /* åªè¯» */ + readOnly: { + type: Boolean, + default: false, + }, + /* ä¸Šä¼ åœ°å€ */ + uploadUrl: { + type: String, + default: "", + } + }, + data() { + return { + headers: { + Authorization: "Bearer " + getToken() + }, + Quill: null, + currentValue: "", + options: { + theme: "snow", + bounds: document.body, + debug: "warn", + modules: { + // 工具æ é…ç½® + toolbar: [ + ["bold", "italic", "underline", "strike"], // åŠ ç²— 斜体 下划线 åˆ é™¤çº¿ + ["blockquote", "code-block"], // 引用 代ç å— + [{ list: "ordered" }, { list: "bullet" }], // 有åºã€æ— åºåˆ—表 + [{ indent: "-1" }, { indent: "+1" }], // 缩进 + [{ size: ["small", false, "large", "huge"] }], // å—ä½“å¤§å° + [{ header: [1, 2, 3, 4, 5, 6, false] }], // æ ‡é¢˜ + [{ color: [] }, { background: [] }], // å—体颜色ã€å—体背景颜色 + [{ align: [] }], // 对é½æ–¹å¼ + ["clean"], // æ¸…é™¤æ–‡æœ¬æ ¼å¼ + ["link", "image"] // 链接ã€å›¾ç‰‡ã€è§†é¢‘"video" + ], + }, + placeholder: "请输入内容", + readOnly: this.readOnly, + }, + }; + }, + computed: { + styles() { + let style = {}; + if (this.minHeight) { + style.minHeight = `${this.minHeight}px`; + } + if (this.height) { + style.height = `${this.height}px`; + } + return style; + }, + }, + watch: { + value: { + handler(val) { + if (val !== this.currentValue) { + this.currentValue = val === null ? "" : val; + if (this.Quill) { + this.Quill.pasteHTML(this.currentValue); + } + } + + }, + immediate: true, + }, + }, + mounted() { + this.init(); + }, + beforeDestroy() { + this.Quill = null; + }, + methods: { + init() { + const editor = this.$refs.editor; + this.Quill = new Quill(editor, this.options); + // å¦‚æžœè®¾ç½®äº†ä¸Šä¼ åœ°å€åˆ™è‡ªå®šä¹‰å›¾ç‰‡ä¸Šä¼ 事件 + if (this.uploadUrl) { + let toolbar = this.Quill.getModule("toolbar"); + toolbar.addHandler("image", (value) => { + this.uploadType = "image"; + if (value) { + this.$refs.upload.$children[0].$refs.input.click(); + } else { + this.quill.format("image", false); + } + }); + toolbar.addHandler("video", (value) => { + this.uploadType = "video"; + if (value) { + this.$refs.upload.$children[0].$refs.input.click(); + } else { + this.quill.format("video", false); + } + }); + } + this.Quill.pasteHTML(this.currentValue); + this.Quill.on("text-change", (delta, oldDelta, source) => { + const html = this.$refs.editor.children[0].innerHTML; + const text = this.Quill.getText(); + const quill = this.Quill; + this.currentValue = html; + this.$emit("input", html); + this.$emit("on-change", { html, text, quill }); + }); + this.Quill.on("text-change", (delta, oldDelta, source) => { + this.$emit("on-text-change", delta, oldDelta, source); + }); + this.Quill.on("selection-change", (range, oldRange, source) => { + this.$emit("on-selection-change", range, oldRange, source); + }); + this.Quill.on("editor-change", (eventName, ...args) => { + this.$emit("on-editor-change", eventName, ...args); + }); + }, + handleUploadSuccess(res, file) { + // 获å–富文本组件实例 + let quill = this.Quill; + // å¦‚æžœä¸Šä¼ æˆåŠŸ + if (res.code == 200) { + // 获å–å…‰æ ‡æ‰€åœ¨ä½ç½® + let length = quill.getSelection().index; + // æ’入图片 res.url为æœåŠ¡å™¨è¿”å›žçš„å›¾ç‰‡åœ°å€ + quill.insertEmbed(length, "image", res.url); + // è°ƒæ•´å…‰æ ‡åˆ°æœ€åŽ + quill.setSelection(length + 1); + } else { + this.$message.error("图片æ’入失败"); + } + }, + handleUploadError() { + this.$message.error("图片æ’入失败"); + }, + }, +}; +</script> + +<style> +.editor, .ql-toolbar { + white-space: pre-wrap !important; + line-height: normal !important; +} +.quill-img { + display: none; +} +.ql-snow .ql-tooltip[data-mode="link"]::before { + content: "请输入链接地å€:"; +} +.ql-snow .ql-tooltip.ql-editing a.ql-action::after { + border-right: 0px; + content: "ä¿å˜"; + padding-right: 0px; +} + +.ql-snow .ql-tooltip[data-mode="video"]::before { + content: "请输入视频地å€:"; +} + +.ql-snow .ql-picker.ql-size .ql-picker-label::before, +.ql-snow .ql-picker.ql-size .ql-picker-item::before { + content: "14px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { + content: "10px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { + content: "18px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { + content: "32px"; +} + +.ql-snow .ql-picker.ql-header .ql-picker-label::before, +.ql-snow .ql-picker.ql-header .ql-picker-item::before { + content: "文本"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + content: "æ ‡é¢˜1"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + content: "æ ‡é¢˜2"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + content: "æ ‡é¢˜3"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + content: "æ ‡é¢˜4"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + content: "æ ‡é¢˜5"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + content: "æ ‡é¢˜6"; +} + +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: "æ ‡å‡†å—体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { + content: "衬线å—体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { + content: "ç‰å®½å—体"; +} +</style> diff --git a/danger-manage-web/src/views/educationPlanExam/questionBank/components/Lesson.vue b/danger-manage-web/src/views/educationPlanExam/questionBank/components/Lesson.vue new file mode 100644 index 0000000000000000000000000000000000000000..fb3d5b8073f6db00826c8e82c4d1c25d11b683b0 --- /dev/null +++ b/danger-manage-web/src/views/educationPlanExam/questionBank/components/Lesson.vue @@ -0,0 +1,264 @@ +<!-- + * @Author: 纪泽龙 jizelong@qq.com + * @Date: 2022-09-22 10:59:44 + * @LastEditors: 纪泽龙 jizelong@qq.com + * @LastEditTime: 2022-09-28 17:52:32 + * @FilePath: /danger-manage-web/src/views/lessonsProgram/components/Lession.vue + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看é…ç½® 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE +--> +<template> + <div class="form-wrapper"> + <el-form + class="form" + ref="form" + :model="form" + label-width="auto" + :rules="rules" + > + <div class="top flex"> + <el-form-item label="è¯¾ç¨‹æ ‡é¢˜" prop="courseName"> + <el-input style="width: 500px" v-model="form.courseName"></el-input> + </el-form-item> + + <el-form-item label="课程类型" prop="courseType"> + <el-select + v-model="form.courseType" + placeholder="请选择éšæ‚£ç‰çº§" + clearable + size="small" + > + <el-option + v-for="course in courseOptions" + :key="course.planId" + :label="course.planName" + :value="course.planId" + /> + </el-select> + </el-form-item> + </div> + + <!-- </div> --> + <el-form-item label="课程内容" prop="courseConent"> + <Editor v-model="form.courseConent" :min-height="192" /> + <el-input + v-show="false" + disabled + v-model="form.courseConent" + ></el-input> + </el-form-item> + + <div class="flex"> + <el-form-item label="è§†é¢‘ä¸Šä¼ " v-if="!readOnly" prop="video"> + <FileUpload + listType="picture" + @resFun="getFileInfoVideo" + @remove="listRemoveVideo" + :fileArr="fileListVideo" + :fileSize="500" + :fileType="['mp4']" + /> + <el-input v-show="false" disabled v-model="form.video"></el-input> + </el-form-item> + <el-form-item label="é™„ä»¶ä¸Šä¼ " v-if="!readOnly" prop="enclosure"> + <FileUpload + listType="picture" + @resFun="getFileInfoFile" + @remove="listRemoveFile" + :fileArr="fileListFile" + /> + <el-input v-show="false" disabled v-model="form.enclosure"></el-input> + </el-form-item> + </div> + </el-form> + </div> +</template> + +<script> +import Editor from "./Editor"; +import FileUpload from "@/components/FileUpload"; +import uploadfile from "@/assets/uploadfile.png"; +import { mapGetters } from "vuex"; +import { + addLessons, + getLessonById, + changeLesson, +} from "@/api/educationPlanExam/lessonsProgram"; + +export default { + name: "", + props: { + courseId: { + type: Number, + }, + }, + components: { + Editor, + FileUpload, + }, + data() { + return { + form: { + courseName: "", + courseType: "", + courseConent: "", + video: "", + enclosure: "", + }, + fileListVideo: [], + fileListFile: [], + readOnly: false, + rules: { + courseName: [ + { required: true, trigger: "blur", message: "课程å称ä¸èƒ½ä¸ºç©º" }, + ], + courseType: [ + { required: true, trigger: "change", message: "课程类型ä¸èƒ½ä¸ºç©º" }, + ], + courseConent: [ + { required: true, trigger: "blur", message: "课程内容ä¸èƒ½ä¸ºç©º" }, + ], + video: [{ required: true, trigger: "blue", message: "视频ä¸èƒ½ä¸ºç©º" }], + enclosure: [ + { required: true, trigger: "blur", message: "附件ä¸èƒ½ä¸ºç©º" }, + ], + }, + }; + }, + computed: { + // 获å–课程类型 + ...mapGetters(["courseOptions"]), + }, + created() { + if (this.courseId) { + this.getLessonById(); + } + }, + mounted() {}, + methods: { + // æ·»åŠ è¯¾ç¨‹ + addLessons(data) { + console.log("this.courseId", this.courseId); + if (!this.courseId) { + console.log("æ·»åŠ "); + return addLessons(data); + } else { + console.log("修改"); + return changeLesson({ courseId: this.courseId, ...data }); + } + }, + // å¤çŽ° + getLessonById() { + getLessonById(this.courseId).then((res) => { + if (res.code == 200) { + const data = res.data; + const { courseName, courseType, courseConent, video, enclosure } = + data; + this.form = { + courseName, + courseType, + courseConent, + video, + enclosure, + }; + this.fileListVideo = [ + { + name: courseName + "视频", + url: uploadfile, + }, + ]; + this.fileListFile = [ + { + name: courseName + "附件", + url: uploadfile, + }, + ]; + } + }); + }, + getFileInfoVideo(res) { + this.form.video = res.url; + // this.form.videoName = res.fileName; + this.fileListVideo = [ + { + name: res.fileName, + url: uploadfile, + }, + ]; + }, + listRemoveVideo(e) { + this.fileListVideo = []; + this.form.video = ""; + // this.form.videoName = null; + }, + getFileInfoFile(res) { + this.form.enclosure = res.url; + // this.form.enclosureName = res.fileName; + this.fileListFile = [ + { + name: res.fileName, + url: uploadfile, + }, + ]; + }, + listRemoveFile(e) { + this.fileListFild = []; + this.form.enclosure = ""; + // this.form.fileName = null; + }, + save(num = 2) { + // å› ä¸ºå¯Œæ–‡æœ¬ç¼–è¾‘å™¨ä¼šæ®‹ç•™<p><br></p>,所以è¦æ¸…空 + if (this.form.courseConent === "<p><br></p>") { + this.form.courseConent = ""; + } + this.$refs.form.validate((valid) => { + if (valid) { + // console.log(this.form); + this.addLessons({ ...this.form }).then((res) => { + // å¦‚æžœæ·»åŠ ä¼šä¼ å›žæ¥ï¼Œå°±ç”¨ä¼ 回æ¥çš„,如果是修改本身就有,就用本身的 + const courseId = res.data || this.courseId; + if (res.code == 200) { + // è¿™æ ·è°ƒæ¯”è¾ƒçº¯å‡½æ•°ä¸€ç‚¹ + if (num == 2) { + this.$message({ + message: "ä¿å˜è¯¾ç¨‹æˆåŠŸ", + type: "success", + }); + } else if (num == 3) { + this.$message({ + message: "ä¿å˜è¯¾ç¨‹æˆåŠŸ,请开始录入题目", + type: "success", + }); + } + this.$parent.$parent.componentsNumChange(num); + this.$parent.$parent.changeCourseId(courseId); + this.$parent.$parent.$parent.getList(); + + return true; + } + }); + } + }); + }, + // ä¿å˜å¹¶è¿›å…¥é¢˜ç›® + saveAndNext() { + this.save(3); + }, + }, +}; +</script> +<style lang="scss" scoped> +.form-wrapper { + padding-top: 22px; + width: 100%; + height: 550px; + overflow: hidden; + // padding-bottom: 10px; + margin-bottom: 20px; + + border-bottom: 1px solid #bbbbbb; + .top { + width: 100%; + justify-content: space-between; + } +} +</style> diff --git a/danger-manage-web/src/views/educationPlanExam/questionBank/components/QuestionList.vue b/danger-manage-web/src/views/educationPlanExam/questionBank/components/QuestionList.vue new file mode 100644 index 0000000000000000000000000000000000000000..1402105ce0945177002fb0bf3c4281e54a84ebac --- /dev/null +++ b/danger-manage-web/src/views/educationPlanExam/questionBank/components/QuestionList.vue @@ -0,0 +1,327 @@ +<!-- + * @Author: 纪泽龙 jizelong@qq.com + * @Date: 2022-09-22 17:56:05 + * @LastEditors: 纪泽龙 jizelong@qq.com + * @LastEditTime: 2022-09-28 17:54:16 + * @FilePath: /danger-manage-web/src/views/lessonsProgram/components/QuestionList.vue + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看é…ç½® 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE +--> +<template> + <div ref="myBody" class="add-question flex"> + <div class="text flex"> + <div class="left"> + ç›®å‰æœ‰<span>{{ questionNum }}</span + >é“题 + <span class="warn">温馨æ示:å‘布课程å‰éœ€è¦è¿›è¡Œè€ƒè¯•è®¾ç½®</span> + </div> + <div class="right">{{courseName}}</div> + </div> + <div class="table flex" v-loading="loading"> + <div class="th flex"> + <div class="left">åºå·</div> + <div class="middle">题目å称</div> + <div class="right">æ“作</div> + </div> + <div class="td-wrapper"> + <div + v-for="(item, index) in questionList" + :key="item.topicId" + class="td flex" + > + <div class="left">{{ index + 1 }}</div> + <div class="middle zzz"> + {{ item.topicTitle }} + </div> + <div class="right"> + <div> + <el-button + @click="edit(item.topicId)" + icon="el-icon-edit" + type="text" + >修改</el-button + > + <el-button + @click="deleteLesson(item.topicId)" + icon="el-icon-delete" + type="text" + >åˆ é™¤</el-button + > + </div> + </div> + </div> + </div> + </div> + <div class="rightNum flex"> + <div class="left">考试设置</div> + <div class="middle flex"> + <div class="left-text">ç”对题目大于</div> + <div> + <el-input + v-model="rightNum" + style="width: 60px" + size="mini" + ></el-input> + </div> + <div>为åˆæ ¼</div> + </div> + <div class="right"> + <el-button + @click="saveRightNum" + icon="el-icon-check" + size="mini" + type="success" + >ä¿å˜</el-button + > + </div> + </div> + </div> +</template> + +<script> +import { + getQuestion, + deleteQuestion, + changeLesson, + getLessonById, +} from "@/api/educationPlanExam/lessonsProgram"; +export default { + name: "AnswerLesson", + props: { + courseId: { + type: Number, + }, + }, + components: {}, + data() { + return { + // 当å‰è¯¾ç¨‹çš„ç¬¬å‡ é¢˜ï¼Œè°ƒä¸€éæŽ¥å£ + questionNum: null, + // ç”å¯¹å‡ é“题 + rightNum: 0, + questionList: [], + loading: false, + courseName:'', + }; + }, + // watch: { + // visible(newValue) { + // if (newValue) { + // this.$nextTick(() => { + // this.saveBody(); + // }); + // } + // }, + // }, + + created() { + console.log("this.courseId", this.courseId); + if (this.courseId) { + this.getQuestion({ courseId: this.courseId }); + // 获å–åªé¢˜ç›®æ£ç¡®å‡ 题算过关 + this.getLessonById(this.courseId); + } + }, + methods: { + save() { + console.log("QuestionList"); + }, + saveAndNext() { + this.$parent.$parent.componentsNumChange(3); + }, + getQuestion(courseId) { + return getQuestion(courseId).then((res) => { + console.log(res); + + this.questionList = res.rows.map((item) => { + return { + topicId: item.topicId, + topicTitle: item.topicTitle, + }; + }); + this.questionNum = res.total; + return true; + }); + }, + getLessonById(courseId) { + getLessonById(courseId).then((res) => { + console.log(res); + this.rightNum = res.data.qualifiedNum; + this.courseName = res.data.courseName; + }); + }, + edit(topicId) { + this.$emit("update:topicId", topicId); + this.$parent.$parent.componentsNumChange(3); + }, + deleteLesson(topicId) { + this.$confirm("è¯·ç¡®å®šåˆ é™¤è¯¥é¢˜", { + confirmButtonText: "确定", + cancelButtonText: "å–消", + type: "warning", + }) + .then(() => { + this.loading = true; + return deleteQuestion(topicId); + }) + .then((res) => { + if (res.code == 200) { + this.$message({ + message: "åˆ é™¤æˆåŠŸ", + type: "success", + }); + } + return this.getQuestion({ courseId: this.courseId }); + }) + .finally(() => { + this.loading = false; + // 课程列表é‡ç½®ä¸€ä¸‹ + this.$parent.$parent.$parent.getList(); + }); + }, + saveRightNum() { + if (this.rightNum > this.questionList.length) { + this.$message({ + message: "ç”对题目数应å°äºŽç‰äºŽè€ƒè¯•é¢˜ç›®æ€»æ•°", + type: "warning", + }); + return; + } + changeLesson({ courseId: this.courseId, qualifiedNum: this.rightNum }).then( + (res) => { + if (res.code == 200) { + this.$message({ + message: "ç”题åˆæ ¼æ•°ä¿®æ”¹æˆåŠŸ", + type: "success", + }); + } + } + ); + }, + }, +}; +</script> +<style lang="scss" scoped> +.add-question { + width: 100%; + height: 550px; + // overflow: hidden; + flex-direction: column; + padding-bottom: 7px; + margin-bottom: 20px; + border-bottom: 1px solid #bbbbbb00; + + .text { + margin-top: 13px; + margin-bottom: 32px; + justify-content: space-between; + height: 28px; + .left { + line-height: 28px; + color: #101010; + font-size: 14px; + .warn { + display: inline-flex; + font-size: 12px; + color: red; + margin-left: 10px; + } + } + + .right { + width: 411px; + line-height: 28px; + background: #1d84ff; + padding-right: 5px; + color: #fff; + text-align: right; + } + } + .table { + flex: 1; + height: 0; + + flex-direction: column; + .th { + width: 100%; + height: 70px; + line-height: 70px; + background: #f5f5f5; + color: #606266; + + > div { + height: 100%; + } + .left { + width: 15%; + text-align: center; + } + .middle { + width: 60%; + padding-left: 100px; + } + .right { + width: 25%; + text-align: center; + } + } + .td-wrapper { + flex: 1; + overflow-y: auto; + // è¿™æ ·åå…ƒç´ æ‰èƒ½æœ‰æ»šåŠ¨æ¡ + .td { + height: 68px; + line-height: 68px; + box-sizing: border-box; + border-bottom: 1px solid #bbbbbb; + &:last-child { + border-bottom: none; + } + > div { + height: 100%; + } + .left { + width: 15%; + text-align: center; + } + .middle { + width: 60%; + padding-left: 10px; + } + .right { + width: 25%; + text-align: center; + } + } + } + } + .rightNum { + margin-top: 5px; + height: 55px; + box-sizing: border-box; + border: 1px solid #bbbbbb; + line-height: 55px; + > .left { + width: 140px; + background: #0bab0c; + font-size: 14px; + color: #fff; + text-align: center; + } + > .middle { + > div { + margin-right: 5px; + } + .left-text { + margin-left: 10px; + } + .middle { + margin-right: 20px; + } + } + .right { + margin-left: 20px; + } + // background: black; + } +} +</style> diff --git a/danger-manage-web/src/views/educationPlanExam/questionBank/index.vue b/danger-manage-web/src/views/educationPlanExam/questionBank/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..43b9c72f68caf58fa731b2be4f38505628158b30 --- /dev/null +++ b/danger-manage-web/src/views/educationPlanExam/questionBank/index.vue @@ -0,0 +1,449 @@ +<template> + <div class="app-container"> + <el-form + :model="queryParams" + ref="queryForm" + :inline="true" + label-width="68px" + > + <el-form-item label="课件类别" prop="courseType"> + <el-select + v-model="queryParams.courseType" + placeholder="请选择课程类型" + clearable + size="small" + > + <el-option + v-for="course in courseOptions" + :key="course.planId" + :label="course.planName" + :value="course.planId" + /> + </el-select> + </el-form-item> + <el-form-item label="å称" prop="courseName"> + <el-input + v-model="queryParams.courseName" + placeholder="请输入课程å称" + clearable + size="small" + /> + </el-form-item> + <el-form-item label="å‘布时间" prop="releaseTime"> + <el-date-picker + v-model="queryParams.releaseTime" + value-format="yyyy-MM-dd HH:mm:ss" + type="datetime" + placeholder="选择日期时间" + default-time="12:00:00" + > + </el-date-picker> + </el-form-item> + + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="mini" + @click="search" + >æœç´¢</el-button + > + <el-button icon="el-icon-refresh" size="mini" @click="resetClick" + >é‡ç½®</el-button + > + </el-form-item> + </el-form> + + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-plus" + size="mini" + @click="handleAdd" + v-hasPermi="['system:book:add']" + >新增</el-button + > + </el-col> + </el-row> + + <el-table v-loading="loading" :data="lessonsList"> + <el-table-column label="è¯¾ç¨‹æ ‡é¢˜" align="center" prop="courseName" /> + <el-table-column label="课程类别" align="center" prop="courseType"> + <template v-slot="scope"> + <div> + {{ + scope.row.courseType && courseOptions.filter( + (item) => item.planId == scope.row.courseType + )[0] && courseOptions.filter( + (item) => item.planId == scope.row.courseType + )[0].planName + }} + </div> + </template> + </el-table-column> + <el-table-column label="课程状æ€" align="center" prop="status"> + <template v-slot="scope"> + <div>{{ ["未å‘布", "å·²å‘布"][scope.row.status] }}</div> + </template> + </el-table-column> + <el-table-column label="附件" align="center" prop="enclosure"> + <template v-slot="{ row: { enclosure } }"> + <a v-if="enclosure && enclosure.indexOf('.txt')>=0" @click="downloadText(enclosure)" class="down-load">下载附件</a> + <a v-else :href="enclosure" class="down-load">下载附件</a> + </template> + </el-table-column> + <el-table-column label="视频" align="center" prop="video"> + <template v-slot="{ row: { courseName, video } }"> + <a @click="downLoadVideo(video, courseName)" class="down-load" + >下载视频</a + > + </template> + </el-table-column> + <el-table-column + label="å‘布时间" + align="center" + prop="releaseTime" + :formatter="formatter" + /> + <el-table-column + label="考试题" + align="center" + prop="topicNum" + width="180" + > + <template v-slot="{ row: { topicNum, courseId } }"> + <div @click="checkQuestion(courseId)" class="timuNum"> + <div v-if="topicNum > 0">{{ `已录入${topicNum}题` }}</div> + <div v-else>未录入</div> + </div> + </template> + </el-table-column> + <el-table-column + label="æ“作" + align="center" + class-name="small-padding fixed-width" + > + <template v-slot="{ row: { status, courseId } }"> + <!-- <div>{{status}}</div> --> + <el-button + v-if="status == 0" + size="mini" + type="text" + icon="el-icon-edit" + @click="changeLesson(courseId)" + >修改</el-button + > + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="deletLesson(courseId)" + >åˆ é™¤</el-button + > + <el-button + v-if="status == 0" + size="mini" + type="text" + icon="el-icon-delete" + @click="issueLesson(courseId)" + >å‘布</el-button + > + </template> + </el-table-column> + </el-table> + + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + <Dia + ref="Dia" + :componentsNum.sync="componentsNum" + :courseId.sync="courseId" + :visible.sync="dilogFlag" + /> + </div> +</template> + +<script> +import { + getLessons, + getLessonById, + issue, + deleteLesson, +} from "@/api/educationPlanExam/lessonsProgram.js"; +// 获å–课程类型 +import { getPlanList } from "@/api/educationPlanExam/trainingProgram"; +import { mapGetters, mapMutations } from "vuex"; + +import Dia from "./components/Dia"; + +export default { + name: "", + components: { + Dia, + }, + data() { + return { + // é®ç½©å±‚ + loading: false, + // 总æ¡æ•° + total: 0, + // courseOptions: [], + lessonsList: [], + // 查询å‚æ•° + queryParams: { + pageNum: 1, + pageSize: 10, + courseType: null, + courseName: null, + releaseTime: "", + }, + // 表å•å‚æ•° + form: {}, + // 表å•æ ¡éªŒ + + dilogFlag: false, + componentsNum: 1, + // 点击的id,如果是新增为空 + courseId: null, + }; + }, + computed: { + ...mapGetters(["courseOptions"]), + }, + created() { + this.getPlanList(); + this.getList(); + }, + + methods: { + ...mapMutations({ setOptions: "SET_COURSE_OPTIONS" }), + // 获å–课程类别,也就是计划å称 + getPlanList() { + getPlanList().then((res) => { + const courseOptions = res.data.map((item) => { + return { + planId: item.planId, + planName: item.planName, + }; + }); + // this.$store.commit("SET_COURSE_OPTIONS"); + this.setOptions(courseOptions); + }); + }, + + /** 查询课程列表 */ + getList() { + this.loading = true; + getLessons(this.queryParams) + .then((res) => { + // console.log(res); + this.lessonsList = res.rows; + this.total = res.total; + }) + .finally(() => { + this.loading = false; + }); + }, + search() { + // console.log(this.queryParams); + this.getList(); + }, + /** 新增按钮æ“作 */ + handleAdd() { + this.$refs.Dia.title = "新增课程"; + this.componentsNum = 1; + this.courseId = null; + this.dilogFlag = true; + }, + changeLesson(courseId) { + this.$refs.Dia.title = "修改课程"; + this.componentsNum = 1; + this.courseId = courseId; + this.dilogFlag = true; + }, + + // 直接查看考题 + checkQuestion(courseId) { + // è¦æŸ¥çœ‹è€ƒé¢˜çš„id + this.courseId = courseId; + console.log(this.courseId); + // 2代表列表组件 + this.componentsNum = 2; + this.dilogFlag = true; + }, + // é‡ç½® + resetClick() { + this.reset(); + this.getList(); + }, + // å¤ä½ + reset() { + this.queryParams = { + pageNum: 1, + pageSize: 10, + courseType: null, + courseName: null, + releaseTime: "", + }; + }, + deletLesson(courseId) { + this.$confirm("è¯·ç¡®å®šåˆ é™¤", { + confirmButtonText: "确定", + cancelButtonText: "å–消", + type: "warning", + }) + .then(() => { + return deleteLesson(courseId); + }) + .then((res) => { + if (res.code == 200) { + this.$message({ + message: "åˆ é™¤æˆåŠŸ", + type: "success", + }); + } + this.getList(); + }) + .catch(() => {}); + }, + // å‘布 + issueLesson(courseId) { + this.$confirm("请确定å‘布", { + confirmButtonText: "确定", + cancelButtonText: "å–消", + type: "warning", + }) + .then(() => { + // 判æ–是å¦å½•å…¥ç”题åˆæ ¼æ•° + return getLessonById(courseId); + }) + .then((res) => { + if (res.data.qualifiedNum > 0) { + return true; + } + }) + .then((res) => { + if (res) { + // æˆåŠŸå°±å‘布 + return issue({ courseId }); + } else { + this.$message({ + message: "请先录入ç”题åˆæ ¼æ•°", + type: "warning", + }); + } + }) + .then((res) => { + if (res.code == 200) { + this.$message({ + message: "å‘布æˆåŠŸ", + type: "success", + }); + this.getList(); + } + }) + .catch(() => {}); + }, + formatter(row, column, cellValue, index) { + // console.log(row, column, cellValue, index); + if (!cellValue) return "-"; + else return cellValue; + }, + downloadText(url) { + // url = url.replace(/\\/g, "/"); + const xhr = new XMLHttpRequest(); + xhr.open("GET", url, true); + xhr.responseType = "blob"; + //xhr.setRequestHeader('Authorization', 'Basic a2VybWl0Omtlcm1pdA=='); + xhr.onload = function () { + if (xhr.readyState === 4 && xhr.status === 200) { + let blob = this.response; + console.log(blob); + // 转æ¢ä¸€ä¸ªblob链接 + // 注: URL.createObjectURL() é™æ€æ–¹æ³•ä¼šåˆ›å»ºä¸€ä¸ª DOMString(DOMString 是一个UTF-16å—符串), + // å…¶ä¸åŒ…å«ä¸€ä¸ªè¡¨ç¤ºå‚æ•°ä¸ç»™å‡ºçš„对象的URL。这个URL的生命周期和创建它的窗å£ä¸çš„document绑定 + let downLoadUrl = window.URL.createObjectURL( + new Blob([blob], { + type: "txt", + }) + ); + // 视频的type是video/mp4,图片是image/jpeg + // 01.创建aæ ‡ç¾ + let a = document.createElement("a"); + // 02.ç»™aæ ‡ç¾çš„属性download设定å称 + a.download = name; + // 03.设置下载的文件å + a.href = downLoadUrl; + // 04.对aæ ‡ç¾åšä¸€ä¸ªéšè—å¤„ç† + a.style.display = "none"; + // 05.å‘文档ä¸æ·»åŠ aæ ‡ç¾ + document.body.appendChild(a); + // 06.å¯åŠ¨ç‚¹å‡»äº‹ä»¶ + a.click(); + // 07.ä¸‹è½½å®Œæ¯•åˆ é™¤æ¤æ ‡ç¾ + a.remove(); + } + }; + + xhr.send(); + }, + downLoadVideo(url, name) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, true); + xhr.responseType = "arraybuffer"; // 返回类型blob + xhr.onload = function () { + if (xhr.readyState === 4 && xhr.status === 200) { + let blob = this.response; + console.log(blob); + // 转æ¢ä¸€ä¸ªblob链接 + // 注: URL.createObjectURL() é™æ€æ–¹æ³•ä¼šåˆ›å»ºä¸€ä¸ª DOMString(DOMString 是一个UTF-16å—符串), + // å…¶ä¸åŒ…å«ä¸€ä¸ªè¡¨ç¤ºå‚æ•°ä¸ç»™å‡ºçš„对象的URL。这个URL的生命周期和创建它的窗å£ä¸çš„document绑定 + let downLoadUrl = window.URL.createObjectURL( + new Blob([blob], { + type: "video/mp4", + }) + ); + // 视频的type是video/mp4,图片是image/jpeg + // 01.创建aæ ‡ç¾ + let a = document.createElement("a"); + // 02.ç»™aæ ‡ç¾çš„属性download设定å称 + a.download = name; + // 03.设置下载的文件å + a.href = downLoadUrl; + // 04.对aæ ‡ç¾åšä¸€ä¸ªéšè—å¤„ç† + a.style.display = "none"; + // 05.å‘文档ä¸æ·»åŠ aæ ‡ç¾ + document.body.appendChild(a); + // 06.å¯åŠ¨ç‚¹å‡»äº‹ä»¶ + a.click(); + // 07.ä¸‹è½½å®Œæ¯•åˆ é™¤æ¤æ ‡ç¾ + a.remove(); + } + }; + xhr.send(); + }, + }, +}; +</script> +<style lang="scss" scoped> +.down-load { + color: #0bab0c; +} +.timuNum { + color: #1d84ff; + cursor: pointer; +} +::v-deep .el-select { + width: 100%; +} +::v-deep .el-dialog { + margin-top: 15vh !important; +} +</style>