整合文件
This commit is contained in:
parent
1db678cb87
commit
06f7c7b005
@ -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>-->
|
||||
<!-- <!– <a-button @click="setupProj">999</a-button> –>-->
|
||||
<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=()=>{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user