整合文件

This commit is contained in:
妖姐 2024-03-20 19:00:00 +08:00
parent 1db678cb87
commit 06f7c7b005

View File

@ -25,16 +25,13 @@
</a-checkable-tag>
</div>
<div>
<a-checkbox-group
v-model:value="projCheckbox"
:options="checkboxOptions" />
<a-checkbox-group v-model:value="data.isFinish" :options="options" class="mr-3" />
</div>
</div>
<div class="flex flex-wrap justify-start ">
<ProjectCard
class=""
v-for="proj in projList" v-bind="proj" @click=" console.log('routePath',routePath)
"></ProjectCard>
v-for="proj in projList" v-bind="proj" @click="handleCardClick"></ProjectCard>
</div>
<a-float-button-group v-show="routePath === '/WorkLoad/I_Responsible'" trigger="hover" type="primary" :style="{ right: '94px' }">
@ -71,7 +68,7 @@
<!-- </div>-->
<!-- &lt;!&ndash; <a-button @click="setupProj">999</a-button> &ndash;&gt;-->
<a-modal v-model:open="addModalOpen" title="添加项目" @ok="handleOk">
<a-modal v-model:open="addModalOpen" title="添加项目" @ok="">
<a-form
:label-col="labelCol"
:wrapper-col="wrapperCol"
@ -128,7 +125,7 @@
<!-- </a-tooltip>-->
</template>
<script setup>
import {onMounted, reactive, ref} from 'vue';
import {onMounted, reactive, ref, watch} from 'vue';
import {CommentOutlined, MinusOutlined, PlusOutlined} from '@ant-design/icons-vue';
import {useRoute, useRouter} from "vue-router";
@ -144,8 +141,28 @@ const data = reactive({
isFinish: [0, 1, 2, -1],
})
const options = [
{
label: '未开始',
value: 0,
},
{
label: '进行中',
value: 2,
},
{
label: '已完成',
value: 1,
},
{
label: '已暂停',
value: -1,
},
]
///WorkLoad/I_Responsible
const routePath = route.path
const selectedTags =ref([])
//
const tagsData = ref([]);
@ -198,21 +215,28 @@ const handleClickAll=(checked)=>{
}
//
const handleChange = (tag, checked) => {
if(checked){
tagAll.value=false
}
else{
let flag=true
selectTags.value.forEach((item,index)=>{
if(item){
flag=false
}
})
if(flag){
tagAll.value=true
tag.checked = checked; // checkbox
if (checked) {
tagAll.value = false;
selectedTags.value.push(tag.name); // tag.name
} else {
const index = selectedTags.value.indexOf(tag.name);
if (index !== -1) {
selectedTags.value.splice(index, 1); // tag.name
}
let flag = true;
selectTags.value.forEach((item, index) => {
if (item) {
flag = false;
}
});
if (flag) {
tagAll.value = true;
}
}
}
};
@ -250,7 +274,18 @@ const handleCardClick=(id)=>{
console.log(id)
router.push('/WorkLoad/I_Responsible/'+id)
}
watch(() => selectedTags.value.length, async (newValue, oldValue) =>{
data.tags = []
selectedTags.value.forEach((item,index)=>{
data.tags.push(item)
})
console.log(selectedTags)
flush()
})
watch(() =>data.isFinish, async (newValue, oldValue) =>{
// console.log("data.isFinish", data.isFinish)
flush()
})
const setupProj=()=>{