master
parent
9918fe441f
commit
3bf173d9c0
|
@ -295,20 +295,20 @@ export default {
|
||||||
return {
|
return {
|
||||||
drawer: false,
|
drawer: false,
|
||||||
topicType: 1,
|
topicType: 1,
|
||||||
TopicPageData:{
|
TopicPageData: {
|
||||||
current:1,
|
current: 1,
|
||||||
libraryType:"topic_type_1",
|
libraryType: "topic_type_1",
|
||||||
size:""
|
size: 5,
|
||||||
},
|
},
|
||||||
topicData: {
|
topicData: {
|
||||||
createTime: "",
|
createTime: "",
|
||||||
projectId:"",
|
projectId: "",
|
||||||
libraryType: "topic_type_1",
|
libraryType: "topic_type_1",
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
content: "",
|
content: "",
|
||||||
createTime: "",
|
createTime: "",
|
||||||
|
|
||||||
libraryType: "",
|
libraryType: "",
|
||||||
optionIndex: 0,
|
optionIndex: 0,
|
||||||
optionIndexEn: "",
|
optionIndexEn: "",
|
||||||
|
@ -368,6 +368,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.projectData = JSON.parse(localStorage.topicData);
|
this.projectData = JSON.parse(localStorage.topicData);
|
||||||
|
this.getProject();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
options(num) {
|
options(num) {
|
||||||
|
@ -375,24 +376,25 @@ export default {
|
||||||
},
|
},
|
||||||
topicTypes(num) {
|
topicTypes(num) {
|
||||||
this.topicType = num;
|
this.topicType = num;
|
||||||
if (this.topicType == 1) {
|
if (this.topicType == 1) {
|
||||||
this.TopicPageData.libraryType="topic_type_1";
|
this.TopicPageData.libraryType = "topic_type_1";
|
||||||
this.topicData.libraryType = "topic_type_1";
|
this.topicData.libraryType = "topic_type_1";
|
||||||
} else if (this.topicType == 2) {
|
} else if (this.topicType == 2) {
|
||||||
this.TopicPageData.libraryType="topic_type_2";
|
this.TopicPageData.libraryType = "topic_type_2";
|
||||||
this.topicData.libraryType = "topic_type_2";
|
this.topicData.libraryType = "topic_type_2";
|
||||||
} else if (this.topicType == 3) {
|
} else if (this.topicType == 3) {
|
||||||
this.TopicPageData.libraryType="topic_type_3";
|
this.TopicPageData.libraryType = "topic_type_3";
|
||||||
this.topicData.libraryType = "topic_type_3";
|
this.topicData.libraryType = "topic_type_3";
|
||||||
} else if (this.topicType == 4) {
|
} else if (this.topicType == 4) {
|
||||||
this.TopicPageData.libraryType="topic_type_4";
|
this.TopicPageData.libraryType = "topic_type_4";
|
||||||
this.topicData.libraryType = "topic_type_4";
|
this.topicData.libraryType = "topic_type_4";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addprojectTopic() {
|
addprojectTopic() {
|
||||||
|
console.log(123);
|
||||||
this.axios
|
this.axios
|
||||||
.psot("/hysc/library/addTopic", this.topicData)
|
.post("/hysc/library/addTopic", this.topicData)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response.data.data);
|
console.log(response.data.data);
|
||||||
})
|
})
|
||||||
|
@ -403,7 +405,7 @@ export default {
|
||||||
addProject() {
|
addProject() {
|
||||||
this.drawer = true;
|
this.drawer = true;
|
||||||
this.addCation();
|
this.addCation();
|
||||||
this.topicData.projectId=this.projectData.id
|
this.topicData.projectId = this.projectData.id;
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.drawer = false;
|
this.drawer = false;
|
||||||
|
@ -437,7 +439,7 @@ export default {
|
||||||
} else if (this.topicType == 4) {
|
} else if (this.topicType == 4) {
|
||||||
param.append("code", "topic_type_4");
|
param.append("code", "topic_type_4");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.axios
|
this.axios
|
||||||
.get("/hysc/system/dict/dictionary", {
|
.get("/hysc/system/dict/dictionary", {
|
||||||
params: param,
|
params: param,
|
||||||
|
@ -451,23 +453,25 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
getProject(){
|
getProject() {
|
||||||
let param = new URLSearchParams();
|
let param = new URLSearchParams();
|
||||||
let that = this;
|
// let that = this;
|
||||||
|
|
||||||
param.append("code", "topic_type_4");
|
param.append("current", this.TopicPageData.current);
|
||||||
this.axios
|
param.append("libraryType", this.TopicPageData.libraryType);
|
||||||
.get("/hysc/system/dict/dictionary", {
|
param.append("size", this.TopicPageData.size);
|
||||||
|
this.axios
|
||||||
|
.get("/hysc/library/getTopicPage", {
|
||||||
params: param,
|
params: param,
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response.data.data);
|
console.log(response.data.data);
|
||||||
that.selectClassData = response.data.data;
|
// that.selectClassData = response.data.data;
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue