Merge pull request 'fix:终审滚动展示问题修改' (#224) from fix/change_task into test

Reviewed-on: #224
pull/225/head
赵辉 1 year ago
commit e9ac871339

@ -25,7 +25,7 @@ import type { AsideConfig } from '/#/api'
import emitter from '@/utils/mitt'
import { getFilterList } from '@/api/home/main'
const emit = defineEmits(['inputChange'])
const emit = defineEmits(['inputChange',])
const finalStore = useFinal()
//
const asideValue: Record<keyof typeof asideMap, any> = reactive({})
@ -333,6 +333,9 @@ function updateComponent(key, e) {
console.log('asideValue跟新值', tempobj)
finalStore.setAsideValue(tempobj)
}
defineExpose({
showSearch,
});
</script>
<template>

@ -16,7 +16,7 @@ import {
reactive,
ref,
unref,
watch,
watch,defineProps
} from 'vue'
import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row'
import { useRoute, useRouter } from 'vue-router'
@ -47,7 +47,13 @@ import emitter from '@/utils/mitt'
import { formatToDateHMS } from '@/utils/dateUtil'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import DataHeader from '@/components/DataHeader/index.vue'
const props = defineProps({
taskvalue: {
type: String,
default: ""
}
});
const emit = defineEmits(['changeShow'])
function changeContent() {
emit('changeShow')
@ -78,6 +84,7 @@ const actionsColumns = {
},
}
const columnsRef = ref<DataTableColumns<RowData>>([])
// const columns: DataTableColumns<RowData> = [
// {
// type: "selection",
@ -899,12 +906,25 @@ function filterTableData(keyword) {
query(pagination.page, pagination.pageSize, '', keyword)
else query(pagination.page, pagination.pageSize)
}
async function initData(pageSize, page) {
async function initData(pageSize, page, filterId?: any,
taskName?: string) {
const asideParmas = unref(finalStore.getAsideValue)
// 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas
if (params?.izshowall == false)
params.isFail = false
params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({
sortorder: sortorder.value,
pageSize,
currPage: page,
sortname: sortname.value,
taskName,
...params,
})
const { data, pageCount, totalCount } = result
tableData.value = data
@ -920,11 +940,11 @@ onMounted(() => {
emitter.on('filter-final', refreshHandler)
getColumns()
if (asideParmas == null) {
initData(10, 1)
initData(1, 20,{},props.taskvalue)
}
else {
reset()
filterTableData()
filterTableData(props.taskvalue)
}
// alert(1)
nextTick(() => {

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, onMounted, reactive, ref, unref, watch } from 'vue'
import { computed, onMounted, reactive, ref, unref, watch,defineProps } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { chunk } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui'
@ -24,7 +24,13 @@ const total = ref(0)
const scrollContainer = ref(null)
const tableData = ref<any>([])
const finalStore = useFinal()
const props = defineProps({
taskvalue: {
type: String,
default: ""
}
});
let num = 1
const pagination = reactive({
page: 1,
@ -136,16 +142,19 @@ async function query(
const asideParmas = unref(finalStore.getAsideValue)
// 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas
params = params?.izshowall ? {} : params
let params = asideParmas;
if(params?.izshowall==false){
params.isFail=false
}
params = params?.izshowall ? {isFail:true} : params;
const result = await getFinalList({
sortorder: sortorder.value,
pageSize,
currPage: page,
sortname: sortname.value,
taskName,
isFail: true,
// isFail: true,
...params,
})
const { data, pageCount, totalCount } = result
@ -231,7 +240,8 @@ function showModal(modalRef: any) {
}
onMounted(() => {
initRem()
initData(1, 20)
initData(1, 20,{},props.taskvalue)
})
const item = {
img: testImg,
@ -432,6 +442,7 @@ watch(
() => finalStore.asideValue,
(newVal, oldVal) => {
initData(1, 20)
num=1
},
{ deep: true },
)
@ -543,13 +554,13 @@ defineExpose({
</div>
</div>
<div style="width: 3vw">
<SvgIcon name="magnifying-1" size="18" style="margin-right: 8px" />
<!--<SvgIcon name="magnifying-1" size="18" style="margin-right: 8px" />
<SvgIcon
style="cursor: pointer"
size="18"
name="column"
@click="showModal(customTabelRef)"
/>
/>-->
</div>
</div>
<div ref="scrollContainer" :class="tableData.length > 4 ? 'cotnet_wrapeer' : 'cotnet_wrapeertwo'" @scroll="checkBottom">
@ -960,8 +971,8 @@ defineExpose({
position: absolute;
text-align: center;
z-index: 3;
right: 0px;
top: -4px;
right: 2px;
top: -6px;
color: #fff;
.val {

@ -11,23 +11,34 @@ defineOptions({
const showList = ref(true)
const contentRef: any = ref(null)
const ListRef: any = ref(null)
const asideref=ref(null)
const taskvalue=ref("")
function inputChange(keyword) {
contentRef.value.filterTableData(keyword)
ListRef.value.initData(keyword)
if(asideref.value?.showSearch){
taskvalue.value=keyword
}else{
taskvalue.value=""
}
if (ListRef.value!=null) {
ListRef.value.initData(1,20,{},keyword);
} else {
contentRef.value.filterTableData(keyword);
}
}
</script>
<template>
<div class="main">
<!-- 侧边 -->
<Aside @input-change="inputChange" />
<Aside ref="asideref" @input-change="inputChange" />
<!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-if="showList" ref="ListRef" @change-show="showList = false" />
<ListContent v-if="showList" ref="ListRef" @change-show="showList = false" :taskvalue="taskvalue"/>
<!-- 内容 -->
<Content v-if="!showList" ref="contentRef" @change-show="showList = true" />
<Content v-if="!showList" ref="contentRef" @change-show="showList = true" :taskvalue="taskvalue"/>
<!-- 机器人 -->
<Robot />

Loading…
Cancel
Save