feat:修改冲突

pull/208/head
raofuzi 1 year ago
commit e8c7b3cfeb

File diff suppressed because it is too large Load Diff

@ -1,16 +1,16 @@
<script lang="ts" setup>
import { computed, onMounted, reactive, ref, unref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { chunk } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui'
import { RepeatModal, RepeatTaskTableModal } from '../comp'
import testImg from '@/assets/images/test.png'
import type { RowData } from '@/config/final'
import { getFinalList } from '@/api/final'
import { useFinal } from '@/store/modules/final'
import { formatToDateHMS } from '@/utils/dateUtil'
import { audit } from '@/api/task/task'
import NotPassed from '@/components/Approval/NotPassed.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";
import type { RowData } from "@/config/final";
import { getFinalList } from "@/api/final";
import { useFinal } from "@/store/modules/final";
import { formatToDateHMS } from "@/utils/dateUtil";
import { useMessage, useDialog } from "naive-ui";
import { audit } from "@/api/task/task";
import NotPassed from "@/components/Approval/NotPassed.vue";
import { RepeatModal, RepeatTaskTableModal } from "../comp";
const emit = defineEmits(['changeShow'])
const dialog = useDialog()
@ -102,23 +102,24 @@ async function initData(
currPage: page,
sortname: sortname.value,
taskName,
isFail: true,
...params,
})
const { data, pageCount, totalCount } = result
console.log(data, pageCount, totalCount)
// tableData.value = tableData.value.concat(data);
tableData.value = data
console.log(tableData.value)
total.value = totalCount
pagination.page = page
pagination.pageCount = Math.ceil(totalCount / pageSize)
loading.value = false
});
const { data, pageCount, totalCount } = result;
console.log(data, pageCount, totalCount);
//tableData.value = tableData.value.concat(data);
tableData.value = data;
console.log(tableData.value);
total.value = totalCount;
pagination.page = page;
pagination.pageCount = Math.ceil(totalCount / pageSize);
loading.value = false;
tableData.value.forEach((item) => {
item.showcheck = false
if (isValidTimestamp(item.createdate))
item.createdate = formatToDateHMS(item.createdate)
})
item.showcheck = false;
if (isValidTimestamp(item.fromuptime)) {
item.fromuptime = formatToDateHMS(item.fromuptime);
}
});
tableData.value = chunk(tableData.value, 4)
}
@ -173,14 +174,15 @@ async function query(
// tableData.value = tableData.value.concat(data);
tableData.value = newlist
// console.log(tableData.value);
total.value = totalCount
pagination.page = page
pagination.pageCount = Math.ceil(totalCount / pageSize)
loading.value = false
total.value = totalCount;
pagination.page = page;
pagination.pageCount = Math.ceil(totalCount / pageSize);
loading.value = false;
tableData.value.forEach((item) => {
if (isValidTimestamp(item.createdate))
item.createdate = formatToDateHMS(item.createdate)
})
if (isValidTimestamp(item.fromuptime)) {
item.fromuptime = formatToDateHMS(item.fromuptime);
}
});
tableData.value = chunk(tableData.value, 4)
}
@ -397,6 +399,40 @@ function checkBottom() {
}
}, 500)
}
function changesort(sortnamex) {
if (sortorder.value == "asc" && sortnamex == "submit_date_timestamp") {
sortorder.value = "desc";
sortname.value = "submit_date_timestamp";
}else if (sortorder.value == "desc" && sortnamex == "submit_date_timestamp") {
sortorder.value = "asc";
sortname.value = "submit_date_timestamp";
} else if (sortorder.value == "desc" && sortnamex == "similarity_score") {
sortorder.value = "asc";
sortname.value = "similarity_score";
} else if (sortorder.value == "asc" && sortnamex == "similarity_score") {
sortorder.value = "desc";
sortname.value = "similarity_score";
} else if (sortorder.value == "asc" && sortnamex == "field1") {
sortorder.value = "desc";
sortname.value = "field1";
} else if (sortorder.value == "desc" && sortnamex == "field1") {
sortorder.value = "asc";
sortname.value = "field1";
}
initData(1, 20);
num=1
}
watch(
() => finalStore.asideValue,
(newVal, oldVal) => {
initData(1, 20);
},
{ deep: true }
);
defineExpose({
initData,
});
</script>
<template>
@ -490,14 +526,17 @@ function checkBottom() {
</div>
<div class="wrapper-settings">
<div>
<div>
<span>提报时间排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
<div @click="changesort('submit_date_timestamp')">
<span>提报时间排序</span
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div>
<div>
<span>相似度排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
<div @click="changesort('similarity_score')">
<span>相似度排序</span
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div>
<div>
<span>提报人排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
<div @click="changesort('field1')">
<span>提报人排序</span
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div>
</div>
<div style="width: 3vw">
@ -510,7 +549,7 @@ function checkBottom() {
/>
</div>
</div>
<div ref="scrollContainer" class="cotnet_wrapeer" @scroll="checkBottom">
<div :class="tableData.length>16?'cotnet_wrapeer':'cotnet_wrapeertwo'" @scroll="checkBottom" ref="scrollContainer">
<div
v-for="(sitem, sindex) in tableData"
:key="sindex"
@ -564,8 +603,8 @@ function checkBottom() {
</n-ellipsis>
</div>
<div class="date">
<n-ellipsis style="max-width: 100%">
{{ item.createdate }}
<n-ellipsis style="max-width: 100%"
>{{ item.fromuptime }}
</n-ellipsis>
</div>
<div class="tag_box">
@ -825,7 +864,7 @@ function checkBottom() {
width: calc(100% - 6rem);
.title,
.date {
font-size: 0.68rem;
font-size: 11px;
font-weight: 500;
text-align: left;
color: #323233;
@ -867,13 +906,13 @@ function checkBottom() {
cursor: pointer;
}
.reset_action {
font-size: 0.75rem;
font-size: 12px;
font-weight: bolder;
text-align: left;
color: #666666;
}
.resovle_action {
font-size: 0.75rem;
font-size: 12px;
font-weight: bolder;
text-align: left;
color: #507afd;
@ -881,7 +920,7 @@ function checkBottom() {
margin-left: 0.9rem;
}
.reject_action {
font-size: 0.75rem;
font-size: 12px;
font-weight: bolder;
text-align: left;
color: #ff4e4f;
@ -896,6 +935,11 @@ function checkBottom() {
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