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

@ -11,8 +11,11 @@ defineOptions({
}) })
const showList = ref(true) const showList = ref(true)
const contentRef: any = ref(null) const contentRef: any = ref(null)
const ListRef: any = ref(null)
function inputChange(keyword) { function inputChange(keyword) {
contentRef.value.filterTableData(keyword) contentRef.value.filterTableData(keyword)
ListRef.value.initData(keyword)
} }
</script> </script>
@ -23,10 +26,10 @@ function inputChange(keyword) {
<!-- 任务管理 --> <!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 --> <!-- 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 /> <Robot />

Loading…
Cancel
Save