Merge branch 'master' of https://git-fy.cn/WxxyDeveloper/JSL_OrganizeInternalOAWeb
This commit is contained in:
commit
64e16185bd
@ -168,7 +168,7 @@ const showDrawer = () => {
|
||||
function exitLogin(){
|
||||
requests.logout(token).then((res) => {
|
||||
if(res.data.code === 200){
|
||||
router.push("/")
|
||||
router.push("/login")
|
||||
console.log(res)
|
||||
user.isLoggedIn = false; //头像展示
|
||||
message.success("退出成功!")
|
||||
|
@ -522,7 +522,7 @@ const projectGetCustom = (data) =>{
|
||||
return axios({
|
||||
url:api+ "/project/get/custom",
|
||||
method: "get",
|
||||
params: data,
|
||||
data: data,
|
||||
headers:{
|
||||
'Timestamp': getCurrentTimestamp()
|
||||
}
|
||||
@ -551,8 +551,7 @@ const messageGet = (token) => {
|
||||
* 得到tag列表
|
||||
* @param token
|
||||
*/
|
||||
const getTagsProjectList
|
||||
= (token) =>{
|
||||
const getTagsProjectList = (token) =>{
|
||||
return axios({
|
||||
url:api+ "/tags/project/list",
|
||||
method: "get",
|
||||
|
@ -51,25 +51,26 @@ import router from "@/router/index.js";
|
||||
const showButton = reactive([]);
|
||||
const projects = ref([]);
|
||||
const id =ref(1)
|
||||
const pageSize = ref(20);
|
||||
const current1 = ref(3);
|
||||
// const pageSize = ref(20);
|
||||
// const current1 = ref(3);
|
||||
|
||||
watch(pageSize, () => {
|
||||
console.log('pageSize', pageSize.value);
|
||||
});
|
||||
watch(current1, () => {
|
||||
console.log('current', current1.value);
|
||||
});
|
||||
// watch(pageSize, () => {
|
||||
// console.log('pageSize', pageSize.value);
|
||||
// });
|
||||
// watch(current1, () => {
|
||||
// console.log('current', current1.value);
|
||||
// });
|
||||
onMounted(() =>{
|
||||
request.getTagsProjectList(token).then(res=>{
|
||||
console.log(res.data.data)
|
||||
console.log("tagsData:",res)
|
||||
tagsData.value=res.data.data
|
||||
})
|
||||
getAllProject()
|
||||
})
|
||||
function getAllProject(){
|
||||
request.projectGetCustom(id).then((res)=>{
|
||||
console.log(res)
|
||||
request.projectGetCustom(data).then((res)=>{
|
||||
console.log("project-res:",res)
|
||||
console.log("data:",data)
|
||||
// Project.data= res.data.data.data
|
||||
projects.value = res.data.data;
|
||||
// console.log(projects.value)
|
||||
@ -93,16 +94,22 @@ const handleClickAll=(checked)=>{
|
||||
selectTags.value.forEach((item,index)=>{
|
||||
selectTags.value[index]=false
|
||||
})
|
||||
selectedTags.value = []
|
||||
// data.tags = []
|
||||
// getAllProject()
|
||||
// 发送获取全部数据的请求
|
||||
request.projectGetCustom(selectedTagNames.value).then(res=>{
|
||||
projects.value=res.data.data
|
||||
console.log(res.data.data)
|
||||
})
|
||||
// request.projectGetCustom(selectedTagNames.value).then(res=>{
|
||||
// projects.value=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) => {
|
||||
tag.checked = checked; // 更新checkbox的选中状态
|
||||
@ -126,11 +133,13 @@ const handleChange = (tag, checked) => {
|
||||
tagAll.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("selectedTags:", selectedTags.value)
|
||||
// data.tags = selectedTags.value
|
||||
// getAllProject()
|
||||
// 在这里触发向后端请求数据的操作,将selectedTags作为参数发送到后端
|
||||
request.projectGetCustom(selectedTags).then((res) =>{
|
||||
projects.value = res.data.data;
|
||||
})
|
||||
// request.projectGetCustom(selectedTags).then((res) =>{
|
||||
// projects.value = res.data.data;
|
||||
// })
|
||||
};
|
||||
|
||||
|
||||
@ -146,57 +155,19 @@ console.log(project.id)
|
||||
|
||||
// @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({
|
||||
tags:[],
|
||||
id:1,
|
||||
tags:['web','ai'],
|
||||
isFinish:[]
|
||||
})
|
||||
const clickedButton= ref(null)
|
||||
// 根据选择的完成进度过滤项目列表
|
||||
watch(() => selectedButtons.value, (clickedButton) => {
|
||||
if (selectedButtons.value === 1){
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
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 = []
|
||||
watch(() => selectedTags.value.length, async (newValue, oldValue) =>{
|
||||
data.tags = []
|
||||
selectedTags.value.forEach((item,index)=>{
|
||||
data.tags.push(item)
|
||||
})
|
||||
getAllProject()
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user