Merge pull request 'feat:卡片模式及表格模式连动,卡片模式及高级筛选联动' (#210) from fix/change_task into test

Reviewed-on: #210
pull/208/head^2
赵辉 1 year ago
commit 7d01f2f255

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { onMounted, ref, reactive, unref, computed } from "vue";
import { onMounted, ref, reactive, unref, computed,watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import testImg from "@/assets/images/test.png";
import { chunk } from "lodash-es";
@ -100,7 +100,7 @@ async function initData(
currPage: page,
sortname: sortname.value,
taskName,
isFail: true,
...params,
});
const { data, pageCount, totalCount } = result;
@ -114,8 +114,8 @@ async function initData(
loading.value = false;
tableData.value.map((item) => {
item.showcheck = false;
if (isValidTimestamp(item.createdate)) {
item.createdate = formatToDateHMS(item.createdate);
if (isValidTimestamp(item.fromuptime)) {
item.fromuptime = formatToDateHMS(item.fromuptime);
}
});
@ -176,8 +176,8 @@ async function query(
pagination.pageCount = Math.ceil(totalCount / pageSize);
loading.value = false;
tableData.value.map((item) => {
if (isValidTimestamp(item.createdate)) {
item.createdate = formatToDateHMS(item.createdate);
if (isValidTimestamp(item.fromuptime)) {
item.fromuptime = formatToDateHMS(item.fromuptime);
}
});
@ -415,6 +415,17 @@ function changesort(sortnamex) {
initData(1, 20);
num=1
}
watch(
() => finalStore.asideValue,
(newVal, oldVal) => {
initData(1, 20);
},
{ deep: true }
);
defineExpose({
initData,
});
</script>
<template>
@ -538,7 +549,7 @@ num=1
/>
</div>
</div>
<div class="cotnet_wrapeer" @scroll="checkBottom" ref="scrollContainer">
<div :class="tableData.length>16?'cotnet_wrapeer':'cotnet_wrapeertwo'" @scroll="checkBottom" ref="scrollContainer">
<div
class="data_wrapper"
v-for="(sitem, sindex) in tableData"
@ -593,7 +604,7 @@ num=1
</div>
<div class="date">
<n-ellipsis style="max-width: 100%"
>{{ item.createdate }}
>{{ item.fromuptime }}
</n-ellipsis>
</div>
<div class="tag_box">
@ -924,6 +935,11 @@ num=1
height: 67vh;
//padding-right: 10px; /* */
overflow: hidden; /* 默认隐藏滚动条 */
} .cotnet_wrapeertwo {
width: 100%;
height: 67vh;
//padding-right: 10px; /* */
overflow: hidden; /* 默认隐藏滚动条 */
}
.cotnet_wrapeer:hover {
overflow: auto;

@ -11,8 +11,11 @@ defineOptions({
})
const showList = ref(true)
const contentRef: any = ref(null)
const ListRef: any = ref(null)
function inputChange(keyword) {
contentRef.value.filterTableData(keyword)
ListRef.value.initData(keyword)
}
</script>
@ -23,10 +26,10 @@ function inputChange(keyword) {
<!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-show="showList" @change-show="showList = false" />
<ListContent v-if="showList" ref="ListRef" @change-show="showList = false" />
<!-- 内容 -->
<Content v-show="!showList" ref="contentRef" @change-show="showList = true" />
<Content v-if="!showList" ref="contentRef" @change-show="showList = true" />
<!-- 机器人 -->
<Robot />

Loading…
Cancel
Save