From 288164f0f4cf0901ef4b55c1840a6af2ca5bd7a9 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 4 Sep 2023 17:51:18 +0800 Subject: [PATCH] =?UTF-8?q?markdown=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/quill/index.vue | 31 +++++++++++++++++++++++-------- src/pages/product/list/index.vue | 21 ++++----------------- src/pages/project/add/index.vue | 11 ++++++++++- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/src/components/quill/index.vue b/src/components/quill/index.vue index 160d334..af06dd8 100644 --- a/src/components/quill/index.vue +++ b/src/components/quill/index.vue @@ -2,12 +2,12 @@
- 富文本 - markdown + 富文本 + markdown -
@@ -26,10 +26,13 @@
@@ -87,6 +90,11 @@ export default { type: Number, default: 0 }, + // 编辑器切换 + type: { + type: String, + default: '0' + }, }, data () { const that = this @@ -94,7 +102,7 @@ export default { headers: { token: util.local.get(Setting.tokenKey) }, - type: 0, + editorType: '0', mdVal: '', Quill: null, currentValue: "", @@ -144,17 +152,23 @@ export default { }, watch: { + type: { + handler (val) { + this.editorType = val + }, + immediate: true + }, value: { handler (val) { - if (!this.type) { + if (this.type == 0) { if (val !== this.currentValue) { this.currentValue = val; if (this.Quill) { this.Quill.pasteHTML(this.value); } } - if (!this.mdVal) this.mdVal = val } + if (!this.mdVal) this.mdVal = val }, immediate: true } @@ -179,6 +193,7 @@ export default { methods: { // 富文本切换 typeChange (val) { + this.$emit('update:type', val) if (!this.mdVal) this.mdVal = this.value }, diff --git a/src/pages/product/list/index.vue b/src/pages/product/list/index.vue index 4decce4..733d2af 100644 --- a/src/pages/product/list/index.vue +++ b/src/pages/product/list/index.vue @@ -47,19 +47,14 @@
-
学科类别
+
学科专业
全部
不限
-
{{ item.label }}
- - - + @change="id => categoryChange(id, item, i)"> +
@@ -430,14 +425,6 @@ export default { e.val = [] }) }, - categoryClick (item, i) { - this.clearCategory() - item.val = val - this[i === 1 ? 'categoryId' : i === 2 ? 'professionalCategoryId' : 'professionalId'] = item.disciplineId - this.professionalCategoryId = val[0] || '' - this.professionalId = val[1] || '' - this.initData() - }, categoryChange (val, item, i) { const name = this.$refs['category' + i][0].getCheckedNodes()[0].pathLabels console.log("🚀 ~ file: index.vue:431 ~ categoryChange ~ val, item:", val, item, name) diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue index 0aac8e1..84e019e 100644 --- a/src/pages/project/add/index.vue +++ b/src/pages/project/add/index.vue @@ -73,6 +73,7 @@ @@ -89,6 +90,7 @@ @@ -213,6 +215,7 @@ @@ -311,7 +314,10 @@ export default { experimentDescription: "", // 项目背景 state: 0, // 状态(0、草稿箱 1、已发布) isOpen: 0, // 是否开启(0开启 1未开启 默认0) - isDel: 0 // 是否删除(0、未删除 1、已删除 默认0) + isDel: 0, // 是否删除(0、未删除 1、已删除 默认0) + experimentTargetType: '0', + experimentDescriptionType: '0', + experimentHintType: '0', }, projectJudgmentData: [], //实验任务(项目判分点) selectedProjectJudgment: [], // 选中的项目判分点 @@ -426,6 +432,9 @@ export default { this.mallIds = [mallId] systemId && this.mallIds.push(systemId) } + if (!projectManage.experimentDescriptionType) projectManage.experimentDescriptionType = '0' + if (!projectManage.experimentHintType) projectManage.experimentHintType = '0' + if (!projectManage.experimentTargetType) projectManage.experimentTargetType = '0' this.projectManage = projectManage; this.originName = projectManage.projectName this.projectJudgmentData = projectJudgmentVos;