master
parent
9918fe441f
commit
3bf173d9c0
|
@ -295,20 +295,20 @@ 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: [
|
||||
{
|
||||
content: "",
|
||||
createTime: "",
|
||||
|
||||
|
||||
libraryType: "",
|
||||
optionIndex: 0,
|
||||
optionIndexEn: "",
|
||||
|
@ -368,6 +368,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.projectData = JSON.parse(localStorage.topicData);
|
||||
this.getProject();
|
||||
},
|
||||
methods: {
|
||||
options(num) {
|
||||
|
@ -375,24 +376,25 @@ export default {
|
|||
},
|
||||
topicTypes(num) {
|
||||
this.topicType = num;
|
||||
if (this.topicType == 1) {
|
||||
this.TopicPageData.libraryType="topic_type_1";
|
||||
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.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;
|
||||
|
@ -437,7 +439,7 @@ export default {
|
|||
} else if (this.topicType == 4) {
|
||||
param.append("code", "topic_type_4");
|
||||
}
|
||||
|
||||
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
params: param,
|
||||
|
@ -451,23 +453,25 @@ export default {
|
|||
});
|
||||
},
|
||||
// 获取列表数据
|
||||
getProject(){
|
||||
let param = new URLSearchParams();
|
||||
let that = this;
|
||||
|
||||
param.append("code", "topic_type_4");
|
||||
this.axios
|
||||
.get("/hysc/system/dict/dictionary", {
|
||||
getProject() {
|
||||
let param = new URLSearchParams();
|
||||
// let that = this;
|
||||
|
||||
param.append("current", this.TopicPageData.current);
|
||||
param.append("libraryType", this.TopicPageData.libraryType);
|
||||
param.append("size", this.TopicPageData.size);
|
||||
this.axios
|
||||
.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>
|
||||
|
|
Loading…
Reference in New Issue