From 9918fe441f43ef2570b921ad411e2f9ee86bdbc0 Mon Sep 17 00:00:00 2001 From: tangyi <275503107@qq.com> Date: Wed, 12 Jan 2022 18:35:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 25 -- src/view/consumer.vue | 565 +++++++++++++++++++++++++++----------- src/view/projectTopic.vue | 515 ++++++++++++++++++++++++++++++++-- 3 files changed, 890 insertions(+), 215 deletions(-) diff --git a/src/App.vue b/src/App.vue index 90b8d09..0b3284c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,30 +7,6 @@ diff --git a/src/view/consumer.vue b/src/view/consumer.vue index 6b442a8..6e40f6a 100644 --- a/src/view/consumer.vue +++ b/src/view/consumer.vue @@ -1,181 +1,416 @@ diff --git a/src/view/projectTopic.vue b/src/view/projectTopic.vue index d725f02..874d056 100644 --- a/src/view/projectTopic.vue +++ b/src/view/projectTopic.vue @@ -10,15 +10,15 @@

项目名称:

-

内容

+

{{ projectData.name }}

-

项目名称:

-

内容

+

发起单位

+

{{ projectData.companyName }}

-

项目名称:

-

内容

+

项目描述:

+

{{ projectData.note }}

@@ -33,14 +33,34 @@
-

题型一题库

-

题型二题库

-

题型三题库

-

题型四题库

+

+ 题型一题库 +

+

+ 题型二题库 +

+

+ 题型三题库 +

+

+ 题型四题库 +

-
+
- + + + + + +
+ +
+ + + + + + + + + + + + + + +
+ // 题型1 + +
+
+

问题

+ +
+
+

答案

+
+

+ 选项01 +

+

+ 选项02 +

+

+ 选项03 +

+

+ 选项04 +

+
+ + + + + +
+

选择对应类型

+ + + + +
+
+

选择对应类型

+ + + + +
+
+

选择对应类型

+ + + + +
+
+

选择对应类型

+ + + + +
+
+ 新建项目 + 取消新建 +
+
+
+
@@ -68,18 +292,223 @@ export default { msg: String, }, data() { - return {}; + return { + drawer: false, + topicType: 1, + TopicPageData:{ + current:1, + libraryType:"topic_type_1", + size:"" + }, + topicData: { + createTime: "", + projectId:"", + libraryType: "topic_type_1", + options: [ + { + content: "", + createTime: "", + + libraryType: "", + optionIndex: 0, + optionIndexEn: "", + score: 0, + topicId: 0, + topicType: "", + topicTypeValue: "", + }, + { + content: "", + createTime: "", + id: 0, + libraryType: "", + optionIndex: 0, + optionIndexEn: "", + score: 0, + topicId: 0, + topicType: "", + topicTypeValue: "", + }, + { + content: "", + createTime: "", + id: 0, + libraryType: "", + optionIndex: 0, + optionIndexEn: "", + score: 0, + topicId: 0, + topicType: "", + topicTypeValue: "", + }, + { + content: "", + createTime: "", + id: 0, + libraryType: "", + optionIndex: 0, + optionIndexEn: "", + score: 0, + topicId: 0, + topicType: "", + topicTypeValue: "", + }, + ], + topic: "", + topicType: "", + }, + projectData: {}, + labelPosition: "top", + tableData: [], + direction: "rtl", + projectTopicData: {}, + optionsIf: 1, + selectClassData: [], + }; }, mounted() { - // 初始化获取数据 - this.getProject(); + this.projectData = JSON.parse(localStorage.topicData); + }, + methods: { + options(num) { + this.optionsIf = num; + }, + topicTypes(num) { + this.topicType = num; + if (this.topicType == 1) { + this.TopicPageData.libraryType="topic_type_1"; + this.topicData.libraryType = "topic_type_1"; + } else if (this.topicType == 2) { + this.TopicPageData.libraryType="topic_type_2"; + this.topicData.libraryType = "topic_type_2"; + } else if (this.topicType == 3) { + this.TopicPageData.libraryType="topic_type_3"; + this.topicData.libraryType = "topic_type_3"; + } else if (this.topicType == 4) { + this.TopicPageData.libraryType="topic_type_4"; + this.topicData.libraryType = "topic_type_4"; + } + }, + + addprojectTopic() { + this.axios + .psot("/hysc/library/addTopic", this.topicData) + .then(function (response) { + console.log(response.data.data); + }) + .catch(function (error) { + console.log(error); + }); + }, + addProject() { + this.drawer = true; + this.addCation(); + this.topicData.projectId=this.projectData.id + }, + handleClose() { + this.drawer = false; + }, + + addClassification() { + let param = new URLSearchParams(); + let that = this; + this.axios + .get("/hysc/system/dict/dictionary", { + params: param, + }) + .then(function (response) { + console.log(response.data.data); + that.selectClassData = response.data.data; + }) + .catch(function (error) { + console.log(error); + }); + }, + // 获取类型 + addCation() { + let param = new URLSearchParams(); + let that = this; + if (this.topicType == 1) { + param.append("code", "topic_type_1"); + } else if (this.topicType == 2) { + param.append("code", "topic_type_2"); + } else if (this.topicType == 3) { + param.append("code", "topic_type_3"); + } else if (this.topicType == 4) { + param.append("code", "topic_type_4"); + } + + this.axios + .get("/hysc/system/dict/dictionary", { + params: param, + }) + .then(function (response) { + console.log(response.data.data); + that.selectClassData = response.data.data; + }) + .catch(function (error) { + console.log(error); + }); + }, + // 获取列表数据 + getProject(){ + let param = new URLSearchParams(); + let that = this; + + param.append("code", "topic_type_4"); + this.axios + .get("/hysc/system/dict/dictionary", { + params: param, + }) + .then(function (response) { + console.log(response.data.data); + that.selectClassData = response.data.data; + }) + .catch(function (error) { + console.log(error); + }); + } }, - methods: {}, };