修复bug
This commit is contained in:
parent
347ae56dbd
commit
70ebec0537
@ -551,8 +551,7 @@ const messageGet = (token) => {
|
|||||||
* 得到tag列表
|
* 得到tag列表
|
||||||
* @param token
|
* @param token
|
||||||
*/
|
*/
|
||||||
const getTagsProjectList
|
const getTagsProjectList = (token) =>{
|
||||||
= (token) =>{
|
|
||||||
return axios({
|
return axios({
|
||||||
url:api+ "/tags/project/list",
|
url:api+ "/tags/project/list",
|
||||||
method: "get",
|
method: "get",
|
||||||
|
@ -51,25 +51,26 @@ import router from "@/router/index.js";
|
|||||||
const showButton = reactive([]);
|
const showButton = reactive([]);
|
||||||
const projects = ref([]);
|
const projects = ref([]);
|
||||||
const id =ref(1)
|
const id =ref(1)
|
||||||
const pageSize = ref(20);
|
// const pageSize = ref(20);
|
||||||
const current1 = ref(3);
|
// const current1 = ref(3);
|
||||||
|
|
||||||
watch(pageSize, () => {
|
// watch(pageSize, () => {
|
||||||
console.log('pageSize', pageSize.value);
|
// console.log('pageSize', pageSize.value);
|
||||||
});
|
// });
|
||||||
watch(current1, () => {
|
// watch(current1, () => {
|
||||||
console.log('current', current1.value);
|
// console.log('current', current1.value);
|
||||||
});
|
// });
|
||||||
onMounted(() =>{
|
onMounted(() =>{
|
||||||
request.getTagsProjectList(token).then(res=>{
|
request.getTagsProjectList(token).then(res=>{
|
||||||
console.log(res.data.data)
|
console.log("tagsData:",res)
|
||||||
tagsData.value=res.data.data
|
tagsData.value=res.data.data
|
||||||
})
|
})
|
||||||
getAllProject()
|
getAllProject()
|
||||||
})
|
})
|
||||||
function getAllProject(){
|
function getAllProject(){
|
||||||
request.projectGetCustom(id).then((res)=>{
|
request.projectGetCustom(data).then((res)=>{
|
||||||
console.log(res)
|
console.log("project-res:",res)
|
||||||
|
console.log("data:",data)
|
||||||
// Project.data= res.data.data.data
|
// Project.data= res.data.data.data
|
||||||
projects.value = res.data.data;
|
projects.value = res.data.data;
|
||||||
// console.log(projects.value)
|
// console.log(projects.value)
|
||||||
@ -93,16 +94,22 @@ const handleClickAll=(checked)=>{
|
|||||||
selectTags.value.forEach((item,index)=>{
|
selectTags.value.forEach((item,index)=>{
|
||||||
selectTags.value[index]=false
|
selectTags.value[index]=false
|
||||||
})
|
})
|
||||||
|
selectedTags.value = []
|
||||||
|
// data.tags = []
|
||||||
|
// getAllProject()
|
||||||
// 发送获取全部数据的请求
|
// 发送获取全部数据的请求
|
||||||
request.projectGetCustom(selectedTagNames.value).then(res=>{
|
// request.projectGetCustom(selectedTagNames.value).then(res=>{
|
||||||
projects.value=res.data.data
|
// projects.value=res.data.data
|
||||||
console.log(res.data.data)
|
// console.log(res.data.data)
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("selectedTags",selectedTags.value)
|
||||||
}
|
}
|
||||||
const selectedTagNames =ref([])
|
const selectedTags =ref([])
|
||||||
const selectedTags =ref([])
|
|
||||||
|
|
||||||
|
|
||||||
// 当选中其他的时候, 全部 不选中
|
// 当选中其他的时候, 全部 不选中
|
||||||
const handleChange = (tag, checked) => {
|
const handleChange = (tag, checked) => {
|
||||||
tag.checked = checked; // 更新checkbox的选中状态
|
tag.checked = checked; // 更新checkbox的选中状态
|
||||||
@ -126,11 +133,13 @@ const handleChange = (tag, checked) => {
|
|||||||
tagAll.value = true;
|
tagAll.value = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log("selectedTags:", selectedTags.value)
|
||||||
|
// data.tags = selectedTags.value
|
||||||
|
// getAllProject()
|
||||||
// 在这里触发向后端请求数据的操作,将selectedTags作为参数发送到后端
|
// 在这里触发向后端请求数据的操作,将selectedTags作为参数发送到后端
|
||||||
request.projectGetCustom(selectedTags).then((res) =>{
|
// request.projectGetCustom(selectedTags).then((res) =>{
|
||||||
projects.value = res.data.data;
|
// projects.value = res.data.data;
|
||||||
})
|
// })
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -146,57 +155,19 @@ console.log(project.id)
|
|||||||
|
|
||||||
// @click="selectedTags.web = !selectedTags.web"
|
// @click="selectedTags.web = !selectedTags.web"
|
||||||
|
|
||||||
// 根据选择的按钮过滤项目列表
|
|
||||||
const filteredProjects = ref([]);
|
|
||||||
// 根据选择的按钮过滤项目列表
|
|
||||||
const selectedButtons = ref(['web','ai','大数据']);
|
|
||||||
const selectionDisabled = ref('');
|
|
||||||
const selectedStatus = reactive({
|
|
||||||
weikaishi:true, //1
|
|
||||||
jinxingzhong:true, //2
|
|
||||||
yiwancheng:true, //0
|
|
||||||
stop:true //-1
|
|
||||||
}); // 选择的完成进度
|
|
||||||
const select = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
tags:[],
|
id:1,
|
||||||
|
tags:['web','ai'],
|
||||||
isFinish:[]
|
isFinish:[]
|
||||||
})
|
})
|
||||||
const clickedButton= ref(null)
|
watch(() => selectedTags.value.length, async (newValue, oldValue) =>{
|
||||||
// 根据选择的完成进度过滤项目列表
|
data.tags = []
|
||||||
watch(() => selectedButtons.value, (clickedButton) => {
|
selectedTags.value.forEach((item,index)=>{
|
||||||
if (selectedButtons.value === 1){
|
data.tags.push(item)
|
||||||
|
})
|
||||||
}
|
getAllProject()
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(selectedStatus, async (newValue, oldValue) => {
|
|
||||||
if (newValue.stop === true) {
|
|
||||||
data.isFinish.push(-1)
|
|
||||||
}
|
|
||||||
if (newValue.jinxingzhong === true) {
|
|
||||||
data.isFinish.push(2)
|
|
||||||
}
|
|
||||||
if (newValue.weikaishi === true ) {
|
|
||||||
data.isFinish.push(1)
|
|
||||||
}
|
|
||||||
if (newValue.yiwancheng === true) {
|
|
||||||
data.isFinish.push(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
request.projectGetCustom(data)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
data.isFinish = []
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user