整合文件

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