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