|
|
|
@ -41,9 +41,6 @@ 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'
|
|
|
|
|
import console from 'console'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['changeShow'])
|
|
|
|
|
function changeContent() {
|
|
|
|
@ -57,6 +54,7 @@ const route = useRoute()
|
|
|
|
|
const reviewType = 0
|
|
|
|
|
const sortorder = ref('asc')
|
|
|
|
|
const sortname = ref('states')
|
|
|
|
|
const searchContent = route.query.searchContent as string
|
|
|
|
|
const actionsColumns = {
|
|
|
|
|
title: '操作',
|
|
|
|
|
key: 'actions',
|
|
|
|
@ -201,6 +199,7 @@ async function getColumns() {
|
|
|
|
|
width: 120,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return v
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
@ -212,6 +211,7 @@ async function getColumns() {
|
|
|
|
|
fixed: 'left',
|
|
|
|
|
width: 120,
|
|
|
|
|
})
|
|
|
|
|
return v
|
|
|
|
|
})
|
|
|
|
|
userFieldUnFixed.map((v) => {
|
|
|
|
|
const item = allList.find(v2 => v2.name == v)
|
|
|
|
@ -220,6 +220,7 @@ async function getColumns() {
|
|
|
|
|
key: item.name,
|
|
|
|
|
width: 120,
|
|
|
|
|
})
|
|
|
|
|
return v
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// TODO: 会导致排序问题 废弃
|
|
|
|
@ -421,6 +422,7 @@ async function formatColumns() {
|
|
|
|
|
const deviceHeight = ref(600)
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// query(pagination.page, pagination.pageSize);
|
|
|
|
|
emitter.on('filter-final', refreshHandler)
|
|
|
|
|
getColumns()
|
|
|
|
|
|
|
|
|
@ -481,6 +483,7 @@ const message = useMessage()
|
|
|
|
|
const finalStore = useFinal()
|
|
|
|
|
|
|
|
|
|
async function query(page: number, pageSize: number, filterId?: any, taskName?: string) {
|
|
|
|
|
console.log('query', taskName)
|
|
|
|
|
const asideParmas = unref(finalStore.getAsideValue)
|
|
|
|
|
// 有过滤配置的时候优先使用过滤配置,不要使用左侧参数
|
|
|
|
|
// let params = filterId ? { userSearchId: filterId } : asideParmas
|
|
|
|
@ -586,10 +589,6 @@ const scrollX = computed(() => {
|
|
|
|
|
|
|
|
|
|
return width
|
|
|
|
|
})
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
query(pagination.page, pagination.pageSize)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const customTabelRef = ref(null)
|
|
|
|
|
const importExcelRef = ref(null)
|
|
|
|
|
const notPassModalRef = ref(null) // 不通过弹窗
|
|
|
|
@ -709,7 +708,7 @@ function resetHandler() {
|
|
|
|
|
// TODO:需要支持重置
|
|
|
|
|
// const result = await resetApproval()
|
|
|
|
|
},
|
|
|
|
|
onNegativeClick: () => { },
|
|
|
|
|
onNegativeClick: () => {},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -816,7 +815,7 @@ function doAudit(param: any) {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onNegativeClick: () => { },
|
|
|
|
|
onNegativeClick: () => {},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -855,15 +854,23 @@ function reset() {
|
|
|
|
|
|
|
|
|
|
async function refreshHandler(searchId?: any) {
|
|
|
|
|
reset()
|
|
|
|
|
query(pagination.page, pagination.pageSize, searchId)
|
|
|
|
|
let searchKeyword = ''
|
|
|
|
|
if (searchContent) {
|
|
|
|
|
const id_param = searchContent.match(/-\d+-/)
|
|
|
|
|
if (id_param)
|
|
|
|
|
searchKeyword = id_param[0].slice(1, -1)
|
|
|
|
|
}
|
|
|
|
|
console.log('refreshHandler', searchKeyword)
|
|
|
|
|
query(pagination.page, pagination.pageSize, searchId, searchKeyword)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function filterTableData(keyword) {
|
|
|
|
|
pagination.page = 1
|
|
|
|
|
pagination.pageSize = 10
|
|
|
|
|
if (keyword) {
|
|
|
|
|
if (keyword)
|
|
|
|
|
query(pagination.page, pagination.pageSize, '', keyword)
|
|
|
|
|
} else { query(pagination.page, pagination.pageSize) }
|
|
|
|
|
else
|
|
|
|
|
query(pagination.page, pagination.pageSize)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
@ -876,10 +883,20 @@ defineExpose({
|
|
|
|
|
<div class="wrapper-header">
|
|
|
|
|
<div class="wrapper-header-left">
|
|
|
|
|
<span class="wrapper-header-font">任务管理列表</span>
|
|
|
|
|
<SvgIcon style="cursor: pointer" size="16" name="list-mode" @click="changeContent" />
|
|
|
|
|
<SvgIcon
|
|
|
|
|
style="cursor: pointer"
|
|
|
|
|
size="16"
|
|
|
|
|
name="list-mode"
|
|
|
|
|
@click="changeContent"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<SvgIcon style="margin-right: 6px" size="13" name="summary" @click="showModal(repeatModalRef)" />
|
|
|
|
|
<SvgIcon
|
|
|
|
|
style="margin-right: 6px"
|
|
|
|
|
size="13"
|
|
|
|
|
name="summary"
|
|
|
|
|
@click="showModal(repeatModalRef)"
|
|
|
|
|
/>
|
|
|
|
|
<NButton class="xjcc" text @click="showModal(repeatModalRef)">
|
|
|
|
|
小结查重
|
|
|
|
|
</NButton>
|
|
|
|
@ -898,14 +915,29 @@ defineExpose({
|
|
|
|
|
取消
|
|
|
|
|
</NButton>
|
|
|
|
|
|
|
|
|
|
<img class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt=""
|
|
|
|
|
@click.stop="batchReject">
|
|
|
|
|
<img
|
|
|
|
|
class="btn-approval btn-left"
|
|
|
|
|
src="@/assets/images/task/btn-not-pass.png"
|
|
|
|
|
alt=""
|
|
|
|
|
@click.stop="batchReject"
|
|
|
|
|
>
|
|
|
|
|
<SvgIcon size="24" name="vs" />
|
|
|
|
|
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="batchApproval">
|
|
|
|
|
<img
|
|
|
|
|
class="btn-approval"
|
|
|
|
|
src="@/assets/images/task/btn-pass.png"
|
|
|
|
|
alt=""
|
|
|
|
|
@click.stop="batchApproval"
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<n-popover ref="popover" :style="{ padding: '0px' }" style="width: 148px" :show-arrow="false"
|
|
|
|
|
placement="bottom-start" trigger="click">
|
|
|
|
|
<n-popover
|
|
|
|
|
ref="popover"
|
|
|
|
|
:style="{ padding: '0px' }"
|
|
|
|
|
style="width: 148px"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
placement="bottom-start"
|
|
|
|
|
trigger="click"
|
|
|
|
|
>
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<div class="icon-wrap">
|
|
|
|
|
<SvgIcon size="20" name="more-blue" />
|
|
|
|
@ -945,20 +977,46 @@ defineExpose({
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="wrapper-settings">
|
|
|
|
|
<SvgIcon style="cursor: pointer" size="18" name="column" @click="showModal(customTabelRef)" />
|
|
|
|
|
<SvgIcon
|
|
|
|
|
style="cursor: pointer"
|
|
|
|
|
size="18"
|
|
|
|
|
name="column"
|
|
|
|
|
@click="showModal(customTabelRef)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrapper-content">
|
|
|
|
|
<NDataTable id="table" ref="tableRef" v-model:checked-row-keys="checkedRowKeys" remote :columns="columnsRef"
|
|
|
|
|
:scroll-x="scrollX" :max-height="maxHeight" :data="tableData" :loading="loading" :pagination="pagination"
|
|
|
|
|
:row-key="rowKey" @update:page="handlePageChange" @update-page-size="handlePageSizeChange"
|
|
|
|
|
@update:checked-row-keys="handleCheck" @update:sorter="handleSorterChange" />
|
|
|
|
|
<NDataTable
|
|
|
|
|
id="table"
|
|
|
|
|
ref="tableRef"
|
|
|
|
|
v-model:checked-row-keys="checkedRowKeys"
|
|
|
|
|
remote
|
|
|
|
|
:columns="columnsRef"
|
|
|
|
|
:scroll-x="scrollX"
|
|
|
|
|
:max-height="maxHeight"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
:pagination="pagination"
|
|
|
|
|
:row-key="rowKey"
|
|
|
|
|
@update:page="handlePageChange"
|
|
|
|
|
@update-page-size="handlePageSizeChange"
|
|
|
|
|
@update:checked-row-keys="handleCheck"
|
|
|
|
|
@update:sorter="handleSorterChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<CustomTabelModal ref="customTabelRef" @commit="commitHandler" />
|
|
|
|
|
<ImportExcelModal ref="importExcelRef" :on-success="sucessHandler" :header-config="headRules" />
|
|
|
|
|
<ImportExcelModal
|
|
|
|
|
ref="importExcelRef"
|
|
|
|
|
:on-success="sucessHandler"
|
|
|
|
|
:header-config="headRules"
|
|
|
|
|
/>
|
|
|
|
|
<NotPassed ref="notPassModalRef" @success="reload" />
|
|
|
|
|
|
|
|
|
|
<RepeatModal ref="repeatModalRef" @reject="repeatBatchReject" @viewrepeat="showModal(repeatTaskTableModalRef)" />
|
|
|
|
|
<RepeatModal
|
|
|
|
|
ref="repeatModalRef"
|
|
|
|
|
@reject="repeatBatchReject"
|
|
|
|
|
@viewrepeat="showModal(repeatTaskTableModalRef)"
|
|
|
|
|
/>
|
|
|
|
|
<RepeatTaskTableModal ref="repeatTaskTableModalRef" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|