master
tangyi 2022-01-12 18:44:24 +08:00
parent 9918fe441f
commit 3bf173d9c0
1 changed files with 29 additions and 25 deletions

View File

@ -295,14 +295,14 @@ export default {
return {
drawer: false,
topicType: 1,
TopicPageData:{
current:1,
libraryType:"topic_type_1",
size:""
TopicPageData: {
current: 1,
libraryType: "topic_type_1",
size: 5,
},
topicData: {
createTime: "",
projectId:"",
projectId: "",
libraryType: "topic_type_1",
options: [
{
@ -368,6 +368,7 @@ export default {
},
mounted() {
this.projectData = JSON.parse(localStorage.topicData);
this.getProject();
},
methods: {
options(num) {
@ -376,23 +377,24 @@ export default {
topicTypes(num) {
this.topicType = num;
if (this.topicType == 1) {
this.TopicPageData.libraryType="topic_type_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.TopicPageData.libraryType = "topic_type_2";
this.topicData.libraryType = "topic_type_2";
} else if (this.topicType == 3) {
this.TopicPageData.libraryType="topic_type_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.TopicPageData.libraryType = "topic_type_4";
this.topicData.libraryType = "topic_type_4";
}
},
addprojectTopic() {
console.log(123);
this.axios
.psot("/hysc/library/addTopic", this.topicData)
.post("/hysc/library/addTopic", this.topicData)
.then(function (response) {
console.log(response.data.data);
})
@ -403,7 +405,7 @@ export default {
addProject() {
this.drawer = true;
this.addCation();
this.topicData.projectId=this.projectData.id
this.topicData.projectId = this.projectData.id;
},
handleClose() {
this.drawer = false;
@ -451,23 +453,25 @@ export default {
});
},
//
getProject(){
getProject() {
let param = new URLSearchParams();
let that = this;
// let that = this;
param.append("code", "topic_type_4");
param.append("current", this.TopicPageData.current);
param.append("libraryType", this.TopicPageData.libraryType);
param.append("size", this.TopicPageData.size);
this.axios
.get("/hysc/system/dict/dictionary", {
.get("/hysc/library/getTopicPage", {
params: param,
})
.then(function (response) {
console.log(response.data.data);
that.selectClassData = response.data.data;
// that.selectClassData = response.data.data;
})
.catch(function (error) {
console.log(error);
});
}
},
},
};
</script>