Compare commits

..

No commits in common. '31b02e2c6894cb34ba4f3d21b126e0a23ef64d43' and 'b43e9beb2ec59dc59e00cea447eae0c3b2f56347' have entirely different histories.

@ -39,10 +39,5 @@
"jsonc", "jsonc",
"yaml" "yaml"
], ],
"vue3snippets.enable-compile-vue-file-on-did-save-code": true, "vue3snippets.enable-compile-vue-file-on-did-save-code": true
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"[vue]": {
"editor.defaultFormatter": "Wscats.vue"
},
"editor.formatOnSaveMode": "modifications"
} }

@ -15,7 +15,7 @@ export async function getApprovalList(page: any) {
pageSize: page.pageSize, pageSize: page.pageSize,
currPage: page.pageNo, currPage: page.pageNo,
keyword: page.keyword, keyword: page.keyword,
userSearchId: page.userSearchId, userSearchId:page.userSearchId
}, },
}) })
@ -28,7 +28,7 @@ export async function getApprovalList(page: any) {
/** /**
* *
* @param params * @param param
*/ */
export async function audit(params) { export async function audit(params) {
return http.request({ return http.request({
@ -82,6 +82,8 @@ export async function removeFiles(params) {
/** /**
* () * ()
* @param packageid id
* @param taskchildpictureid id
* @param params * @param params
* @returns * @returns
*/ */
@ -92,36 +94,26 @@ export async function getSimilarityList(params: any) {
params, params,
}) })
const { data } = res const { data: { records, pages, total } } = res
if (data) { // 精简一下数据
const { records, pages, total } = data const list = records.map((item) => {
// 精简一下数据
const list = records.map((item) => {
return {
id: item.id,
taskId: item.taskId,
taskname: item.fromtaskname,
assignee: item.assignee,
pictureid: item.pictureid,
imgurl: item.imgUrl,
thumburl: item.imgUrl,
iztrueorfalse: item.iztrueorfalse,
states: item.states,
}
})
return { return {
pageCount: pages, id: item.id,
data: records, taskId: item.taskId,
total, taskname: item.fromtaskname,
} assignee: item.assignee,
} pictureid: item.pictureid,
else { imgurl: item.imgUrl,
return { thumburl: item.imgUrl,
pageCount: 0, iztrueorfalse: item.iztrueorfalse,
data: [], states: item.states,
total: 0,
} }
})
return {
pageCount: pages,
data: records,
total,
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

@ -54,7 +54,6 @@ const saveHandler = debounce(() => {
</div> </div>
<SvgIcon <SvgIcon
size="20" size="20"
color="#000000"
name="close-none-border" name="close-none-border"
class="close_box" class="close_box"
@click="emit('close')" @click="emit('close')"

@ -74,9 +74,7 @@ function goPath(item, id) {
const desiredObject = item.data.find((item) => { const desiredObject = item.data.find((item) => {
return item.id === id return item.id === id
}) })
if (!storage.get('isSearch')) storage.set('isSearch', true)
storage.set('isSearch', true, Date.now() + 30 * 60 * 1000)
router.push({ name: item.path, query: { id, searchContent: desiredObject.name } }) router.push({ name: item.path, query: { id, searchContent: desiredObject.name } })
emit('close') emit('close')
} }

@ -13,14 +13,12 @@ import { viewOptions } from '@/config/home'
import NotPassed from '@/components/Approval/NotPassed.vue' import NotPassed from '@/components/Approval/NotPassed.vue'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { off, on } from '@/utils/domUtils' import { off, on } from '@/utils/domUtils'
import bgLoading from '@/assets/images/bg-loading.png'
const cardStyle = { const cardStyle = {
'--n-padding-bottom': '40px', '--n-padding-bottom': '40px',
'--n-padding-left': '120px', '--n-padding-left': '120px',
} }
const bgLoadingImg = ref(bgLoading)
let startTime = 0 let startTime = 0
let endTime = 0 let endTime = 0
let startCalTime = false let startCalTime = false
@ -734,7 +732,6 @@ watch(() => pagination.pageNo, (newVal, oldVal) => {
ref="imageRef" ref="imageRef"
:src="item.imgUrl" :src="item.imgUrl"
:preview-src="item.imgUrl" :preview-src="item.imgUrl"
:fallback-src="bgLoadingImg"
class="img " class="img "
:class="{ :class="{
'img-fit': viewMode === 'horizontalVersion', 'img-fit': viewMode === 'horizontalVersion',

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onBeforeMount, onMounted, unref } from 'vue' import { computed, onBeforeMount, unref } from 'vue'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { Logo } from './components/Logo' import { Logo } from './components/Logo'
import { MainView } from './components/Main' import { MainView } from './components/Main'
@ -10,7 +10,7 @@ import { storage } from '@/utils/Storage'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
onMounted(() => { onBeforeMount(() => {
/** /**
* 如果刷新则去掉筛选条件 * 如果刷新则去掉筛选条件
* 1. 如果当前页面路由与上一个页面路由相同时则为刷新 * 1. 如果当前页面路由与上一个页面路由相同时则为刷新
@ -20,13 +20,14 @@ onMounted(() => {
* 4. 搜索点击->存storage->跳转页面->onMounted * 4. 搜索点击->存storage->跳转页面->onMounted
* ->如果storage为true则不replace 并将storage置false * ->如果storage为true则不replace 并将storage置false
*/ */
if (storage.get('isSearch')) { if (
storage.remove('isSearch') history.state.back == route.path
&& JSON.stringify(route.query).trim() != '{}'
&& storage.get('isSearch')
) {
storage.set('isSearch', false)
router.replace(route.path) router.replace(route.path)
return
} }
if (history.state.back == route.path && JSON.stringify(route.query).trim() != '{}')
router.replace(route.path)
}) })
const { menuSetting } = useProjectSetting() const { menuSetting } = useProjectSetting()

@ -33,25 +33,13 @@ Object.keys(asideMap).forEach((key) => {
extraCustomConfig.push(key) extraCustomConfig.push(key)
}) })
function showModal(type: boolean = true) { function showModal() {
show.value = type show.value = true
// //
const config = finalStore.getSystemConfig const config = finalStore.getSystemConfig
const customConfig = finalStore.getCustomConfig const customConfig = finalStore.getCustomConfig
if (config == null || customConfig == null) if (config == null || customConfig == null)
return return
//
if (!type) {
const { showList, hideList } = generatList(config, customConfig)
onList.value = showList
offList.value = hideList
//
checkAll.value = hideList.every(item => item.checked)
//
offKeyword.value = ''
onKeyword.value = ''
return
}
if (tempList.value.length > 0 && isEqual(tempList.value, finalStore.getFilterConfig)) if (tempList.value.length > 0 && isEqual(tempList.value, finalStore.getFilterConfig))
return return
const { showList, hideList } = generatList(config, customConfig) const { showList, hideList } = generatList(config, customConfig)
@ -233,19 +221,6 @@ async function handleSumbit(e: MouseEvent) {
function onCheckAllChange(value) { function onCheckAllChange(value) {
const ids: string[] = [] const ids: string[] = []
if (value) {
offList.value.forEach((v) => {
if (!v.checked)
onList.value.push(v)
})
}
else {
onList.value = offList.value.filter(v => v.fix)
offList.value.map(v => ({
...v,
checked: v.fix,
}))
}
for (const item of offList.value) { for (const item of offList.value) {
if (!item.fix) { if (!item.fix) {
@ -253,6 +228,7 @@ function onCheckAllChange(value) {
ids.push(item.id) ids.push(item.id)
} }
} }
selectIds.value = value ? ids : [] selectIds.value = value ? ids : []
} }
@ -502,7 +478,7 @@ onMounted(() => {
<n-button <n-button
secondary secondary
style="margin-left: 15px; border: 1px solid #cad2dd" style="margin-left: 15px; border: 1px solid #cad2dd"
@click="showModal(false)" @click="closeModal"
> >
取消 取消
</n-button> </n-button>

@ -3,6 +3,7 @@ import { difference } from 'lodash-es'
import { computed, onMounted, ref, watch } from 'vue' import { computed, onMounted, ref, watch } from 'vue'
import { VueDraggable } from 'vue-draggable-plus' import { VueDraggable } from 'vue-draggable-plus'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter' import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import { ColumnsMap } from '@/config/final'
import { useUser } from '@/store/modules/user' import { useUser } from '@/store/modules/user'
const props = defineProps({ const props = defineProps({
@ -38,8 +39,8 @@ onMounted(async () => {
*/ */
const userFieldFixed = useList.userFieldFixed?.split(',') const userFieldFixed = useList.userFieldFixed?.split(',')
const userFieldUnFixed = useList.userFieldUnFixed?.split(',') const userFieldUnFixed = useList.userFieldUnFixed?.split(',')
const mustList: any[] = [] const mustList = []
allList?.forEach((v) => { allList?.map((v) => {
const item = { const item = {
name: v.fieldDesc, name: v.fieldDesc,
id: v.name, id: v.name,
@ -72,6 +73,67 @@ const selectCount = computed(() => {
return `显示字段(共${onList.value.length}个)` return `显示字段(共${onList.value.length}个)`
}) })
function generatList() {
const keys = Object.keys(ColumnsMap)
// const showStr = 'name'
// const showKeys = showStr.split(',').map((key: string) => key.toLowerCase())
for (const key of keys) {
const { title, fixed, fixLeft, width } = ColumnsMap[key]
const item = {
id: key,
title,
fix: fixed,
checked: ColumnsMap[key].fixed,
width,
}
if (!fixed)
offList.value.push(item)
if (fixLeft)
fixLeftList.value.push(item)
}
// showList = showKeys.reduce((acc, key) => {
// const config = {
// id: key,
// title: ColumnsMap[key].name || '',
// fix: ColumnsMap[key].fixed,
// }
// return [...acc, config]
// }, [])
const fixedList = generateDefaultList()
const filterList = fixedList.filter((item) => {
return !item.fixLeft
})
onList.value.unshift(...filterList)
offList.value.unshift(...fixedList)
}
function generateDefaultList() {
return Object.keys(ColumnsMap).reduce((acc, key) => {
const { title, fixed, fixLeft, width } = ColumnsMap[key]
if (fixed) {
const config = {
id: key,
title,
fix: true,
checked: true,
fixLeft,
width,
}
return [...acc, config]
}
else {
return acc
}
}, [])
}
const show = ref(false) const show = ref(false)
const checkAll = ref(false) const checkAll = ref(false)
@ -90,10 +152,10 @@ async function handleSumbit(e: MouseEvent) {
const userInfo = userStore.getUserInfo const userInfo = userStore.getUserInfo
let userFieldFixed = '' let userFieldFixed = ''
let userFieldUnFixed = '' let userFieldUnFixed = ''
fixLeftList.value.forEach((v) => { fixLeftList.value.map((v) => {
userFieldFixed += `${v.id},` userFieldFixed += `${v.id},`
}) })
onList.value.forEach((v) => { onList.value.map((v) => {
userFieldUnFixed += `${v.id},` userFieldUnFixed += `${v.id},`
}) })
userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1) userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1)
@ -145,7 +207,7 @@ function onCheckAllChange(value) {
} }
} }
if (value) { if (value) {
offList.value.forEach((v) => { offList.value.map((v) => {
if (!v.checked) if (!v.checked)
onList.value.push(v) onList.value.push(v)
}) })
@ -153,7 +215,7 @@ function onCheckAllChange(value) {
else { else {
onList.value = [] onList.value = []
fixLeftList.value = [] fixLeftList.value = []
offList.value.forEach((v) => { offList.value.map((v) => {
if (v.fix) if (v.fix)
fixLeftList.value.push(v) fixLeftList.value.push(v)
}) })
@ -268,21 +330,21 @@ function removeHandler(id: string, type: 'fix' | 'unfix') {
offList.value[index].checked = false offList.value[index].checked = false
} }
else { else {
index = fixLeftList.value.findIndex(v => v.id == id) index == fixLeftList.value.findIndex(v => v.id == id)
fixLeftList.value[index].checked = false fixLeftList.value[index].checked = false
} }
} }
const indeterminate = computed(() => { const indeterminate = computed(() => {
let baseNum = 0
offList.value.map((v) => {
if (v.fix)
baseNum += 1
})
return ( return (
onList.value.length onList.value.length + fixLeftList.value.length - baseNum > 0
+ fixLeftList.value.length && offList.value.length - baseNum
- offList.value.filter(v => v.fix).length > onList.value.length + fixLeftList.value.length - baseNum
> 0
&& offList.value.length - offList.value.filter(v => v.fix).length
> onList.value.length
+ fixLeftList.value.length
- offList.value.filter(v => v.fix).length
) )
}) })
</script> </script>
@ -491,7 +553,8 @@ const indeterminate = computed(() => {
.textbtnStyle { .textbtnStyle {
cursor: pointer; cursor: pointer;
color: #507afd; color: #507AFD;
} }
.drag-wrapper { .drag-wrapper {
@ -552,7 +615,7 @@ const indeterminate = computed(() => {
::v-deep(.n-button--info-type) { ::v-deep(.n-button--info-type) {
background: #507afd !important; background: #507afd !important;
} }
::v-deep(.n-button--default-type) { ::v-deep(.n-button--default-type){
border: 1px solid #cad2dd !important; border: 1px solid #cad2dd !important;
} }
// ::v-deep(.n-card__content){ // ::v-deep(.n-card__content){

@ -166,20 +166,20 @@ function handleCheck(rowKeys: DataTableRowKey[]) {
} }
function select(key: number, id: string) { function select(key: number, id: string) {
if (key == 1) if (key == 1) {
editSelection(id) editSelection(id)
}
else else {
deleteSelection(id) const modalInst = modal.create({
// const modalInst = modal.create({ title: '确认提示',
// title: "", content: '确认删除该条过滤条件吗?',
// content: "?", positiveText: '确定',
// positiveText: "", negativeText: '取消',
// negativeText: "", preset: 'dialog',
// preset: "dialog", onPositiveClick: () => deleteSelection(id),
// onPositiveClick: () => deleteSelection(id), onNegativeClick: () => modalInst.destroy(),
// onNegativeClick: () => modalInst.destroy(), })
// }); }
} }
function editSelection(id = '') { function editSelection(id = '') {

@ -302,7 +302,6 @@ defineExpose({
v-model:value="formValue.name" v-model:value="formValue.name"
:style="{ width: '780px' }" :style="{ width: '780px' }"
placeholder="请输入过滤名称" placeholder="请输入过滤名称"
maxlength="15"
@keydown.enter.prevent @keydown.enter.prevent
/> />
</n-form-item> </n-form-item>

@ -1,9 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui'
DataTableColumns,
DataTableRowKey,
PaginationProps,
} from 'naive-ui'
import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui' import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui'
import { import {
computed, computed,
@ -372,10 +368,7 @@ async function formatColumns() {
id: row.id, id: row.id,
style: { color: row.similarityscore === 100 ? '#FF4E4F' : '' }, style: { color: row.similarityscore === 100 ? '#FF4E4F' : '' },
}, },
{ { default: () => (row.similarityscore ? `${row.similarityscore}%` : '') },
default: () =>
row.similarityscore ? `${row.similarityscore}%` : '',
},
) )
}, },
} }
@ -430,6 +423,16 @@ async function formatColumns() {
const deviceHeight = ref(600) const deviceHeight = ref(600)
onMounted(() => {
// query(pagination.page, pagination.pageSize);
emitter.on('filter-final', refreshHandler)
getColumns()
nextTick(() => {
computeListHeight()
})
})
onBeforeMount(() => { onBeforeMount(() => {
dicStore.fetchizstatusListt() dicStore.fetchizstatusListt()
}) })
@ -481,37 +484,22 @@ const dialog = useDialog()
const message = useMessage() const message = useMessage()
const finalStore = useFinal() const finalStore = useFinal()
async function query( async function query(page: number, pageSize: number, filterId?: any, taskName?: string) {
page: number,
pageSize: number,
filterId?: any,
taskName?: string,
) {
console.log('query', taskName) console.log('query', taskName)
const asideParmas = cloneDeep(unref(finalStore.getAsideValue)) const asideParmas = cloneDeep(unref(finalStore.getAsideValue))
// console.log(asideParmas);
if (asideParmas.izyear) { if (asideParmas.izyear) {
asideParmas.izuptime = cloneDeep(asideParmas.izyear) asideParmas.izuptime = cloneDeep(asideParmas.izyear)
if (typeof asideParmas.izuptime == 'object') { if (typeof asideParmas.izuptime == 'object') {
asideParmas.izuptime[0] = dayjs(asideParmas.izuptime[0]).format( asideParmas.izuptime[0] = dayjs(asideParmas.izuptime[0]).format('YYYY/MM/DD')
'YYYY/MM/DD', asideParmas.izuptime[1] = dayjs(asideParmas.izuptime[1]).format('YYYY/MM/DD')
)
asideParmas.izuptime[1] = dayjs(asideParmas.izuptime[1]).format(
'YYYY/MM/DD',
)
asideParmas.izuptime = asideParmas.izuptime.join('-') asideParmas.izuptime = asideParmas.izuptime.join('-')
delete asideParmas.izyear delete asideParmas.izyear
} }
} }
// 使使 // 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas // let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas let params = asideParmas
if (params?.izshowall == false) params = params?.izshowall ? {} : params
params.isFail = false
params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
@ -718,10 +706,7 @@ function validate(items: any[]) {
} }
function goDetail(row) { function goDetail(row) {
router.push({ router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } })
name: 'final-detail',
query: { id: row.id, packageid: row.packageid },
})
} }
function resetHandler() { function resetHandler() {
@ -854,9 +839,7 @@ function reload() {
selectionIds.value = [] selectionIds.value = []
checkedRowKeys.value = [] checkedRowKeys.value = []
const { page, pageSize } = unref( const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
tableRef.value?.pagination,
) as PaginationProps
query(page!, pageSize!) query(page!, pageSize!)
} }
@ -897,40 +880,10 @@ function filterTableData(keyword) {
pagination.pageSize = 10 pagination.pageSize = 10
if (keyword) if (keyword)
query(pagination.page, pagination.pageSize, '', keyword) query(pagination.page, pagination.pageSize, '', keyword)
else query(pagination.page, pagination.pageSize) else
} query(pagination.page, pagination.pageSize)
async function initData(pageSize, page) {
const result = await getFinalList({
sortorder: sortorder.value,
pageSize,
currPage: page,
sortname: sortname.value,
})
const { data, pageCount, totalCount } = result
tableData.value = data
total.value = totalCount
pagination.page = page
pagination.pageCount = Math.ceil(totalCount / pageSize)
loading.value = false
} }
onMounted(() => {
// query(pagination.page, pagination.pageSize);
const asideParmas = cloneDeep(unref(finalStore.getAsideValue))
console.log(asideParmas)
emitter.on('filter-final', refreshHandler)
getColumns()
if (asideParmas == null) {
initData(10, 1)
}
else {
reset()
filterTableData()
}
// alert(1)
nextTick(() => {
computeListHeight()
})
})
defineExpose({ defineExpose({
filterTableData, filterTableData,
}) })
@ -1006,14 +959,10 @@ defineExpose({
<SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span> <SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span>
</li> </li>
<li @click="exportHandler"> <li @click="exportHandler">
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出待审数据</span>
style="margin-left: 5px"
>导出待审数据</span>
</li> </li>
<li> <li>
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span>
style="margin-left: 5px"
>导出全部数据</span>
</li> </li>
<li> <li>
<SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span> <SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span>

@ -1,103 +1,98 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onMounted, reactive, ref, unref, watch } from 'vue' import { onMounted, ref, reactive, unref, computed } 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 dialog = useDialog();
const emit = defineEmits(['changeShow']) const message = useMessage();
const dialog = useDialog() const router = useRouter();
const message = useMessage() const notPassModalRef = ref(null); //
const router = useRouter() const sortorder = ref("asc");
const notPassModalRef = ref(null) // const sortname = ref("states");
const sortorder = ref('asc') const loading = ref(true);
const sortname = ref('states') const total = ref(0);
const loading = ref(true) const scrollContainer = ref(null);
const total = ref(0) const tableData = ref<any>([]);
const scrollContainer = ref(null) const finalStore = useFinal();
const tableData = ref<any>([])
const finalStore = useFinal() let num = 1;
let num = 1
const pagination = reactive({ const pagination = reactive({
page: 1, page: 1,
pageCount: 20, pageCount: 20,
pageSize: 20, pageSize: 20,
}) });
const repeatModalRef = ref(null) const repeatModalRef = ref(null);
const repeatTaskTableModalRef = ref(null) const repeatTaskTableModalRef = ref(null);
const selectionIds = ref([]) const selectionIds = ref([]);
const showActions = computed(() => { const showActions = computed(() => {
return selectionIds.value.length return selectionIds.value.length;
}) });
const emit = defineEmits(["changeShow"]);
function handleCheck(row: any, showcheck: any) { function handleCheck(row: any, showcheck: any) {
if (showcheck == false) { if (showcheck == false) {
console.log(tableData.value) console.log(tableData.value);
tableData.value.forEach((item) => { tableData.value.map((item) => {
if (item.length > 0) { if (item.length > 0) {
item.forEach((itemx, index) => { item.map((itemx, index) => {
if (row.id == itemx.id) if (row.id == itemx.id) {
itemx.showcheck = true itemx.showcheck = true;
}
// newlistx.push(itemx) //newlistx.push(itemx)
}) });
} }
}) });
selectionIds.value.push(row) selectionIds.value.push(row);
} } else {
else { tableData.value.map((item) => {
tableData.value.forEach((item) => {
if (item.length > 0) { if (item.length > 0) {
item.forEach((itemx, index) => { item.map((itemx, index) => {
if (row.id == itemx.id) if (row.id == itemx.id) {
itemx.showcheck = false itemx.showcheck = false;
}
// newlistx.push(itemx) //newlistx.push(itemx)
}) });
} }
}) });
selectionIds.value.pop(row) selectionIds.value.pop(row);
} }
} }
function switchBatch() { function switchBatch() {
tableData.value.forEach((item) => { tableData.value.map((item) => {
item.forEach((itemx, index) => { item.map((itemx, index) => {
itemx.showcheck = false itemx.showcheck = false;
}) });
}) });
selectionIds.value = [] selectionIds.value = [];
} }
function changeContent() { function changeContent() {
emit('changeShow') emit("changeShow");
}
function initRem() {
const designWidth = 1440
const rempPx = 16
const scale = window.innerWidth / designWidth
document.documentElement.style.fontSize = `${scale * rempPx}px`
} }
const initRem = () => {
const designWidth = 1440;
const rempPx = 16;
const scale = window.innerWidth / designWidth;
document.documentElement.style.fontSize = scale * rempPx + "px";
};
async function initData( async function initData(
page: number, page: number,
pageSize: number, pageSize: number,
filterId?: any, filterId?: any,
taskName?: string, taskName?: string
) { ) {
const asideParmas = unref(finalStore.getAsideValue) const asideParmas = unref(finalStore.getAsideValue);
// 使使 // 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas // let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas let params = asideParmas;
if (params?.izshowall == false) params = params?.izshowall ? {} : params;
params.isFail = false
params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
@ -105,39 +100,40 @@ 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.map((item) => {
item.showcheck = false item.showcheck = false;
if (isValidTimestamp(item.fromuptime)) if (isValidTimestamp(item.createdate)) {
item.fromuptime = formatToDateHMS(item.fromuptime) item.createdate = formatToDateHMS(item.createdate);
}) }
});
tableData.value = chunk(tableData.value, 4)
tableData.value = chunk(tableData.value, 4);
} }
async function query( async function query(
page: number, page: number,
pageSize: number, pageSize: number,
filterId?: any, filterId?: any,
taskName?: string, taskName?: string
) { ) {
console.log('query', taskName) console.log("query", taskName);
const asideParmas = unref(finalStore.getAsideValue) const asideParmas = unref(finalStore.getAsideValue);
// 使使 // 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas // let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas let params = asideParmas;
params = params?.izshowall ? {} : params params = params?.izshowall ? {} : params;
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
@ -147,153 +143,151 @@ async function query(
taskName, taskName,
isFail: true, isFail: true,
...params, ...params,
}) });
const { data, pageCount, totalCount } = result const { data, pageCount, totalCount } = result;
// console.log(data, pageCount, totalCount); //console.log(data, pageCount, totalCount);
const newlist = [] let newlist = [];
const oldlist = tableData.value let oldlist = tableData.value;
if (oldlist.length > 0) { if (oldlist.length > 0) {
oldlist.forEach((item) => { oldlist.map((item) => {
// console.log(item); // console.log(item);
if (item.length > 0) { if (item.length > 0) {
item.forEach((itemx: any) => { item.map((itemx: any) => {
itemx.showcheck = false itemx.showcheck = false;
newlist.push(itemx) newlist.push(itemx);
}) });
} }
}) });
data.forEach((item) => { data.map((item) => {
item.showcheck = false item.showcheck = false;
newlist.push(item) newlist.push(item);
}) });
} } else {
else { data.map((item) => {
data.forEach((item) => { item.showcheck = false;
item.showcheck = false newlist.push(item);
newlist.push(item) });
})
} }
// 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.map((item) => {
if (isValidTimestamp(item.fromuptime)) if (isValidTimestamp(item.createdate)) {
item.fromuptime = formatToDateHMS(item.fromuptime) item.createdate = formatToDateHMS(item.createdate);
}) }
});
tableData.value = chunk(tableData.value, 4)
tableData.value = chunk(tableData.value, 4);
} }
function isValidTimestamp(value) { function isValidTimestamp(value) {
if (typeof value !== 'number' || !Number.isInteger(value)) if (typeof value !== "number" || !Number.isInteger(value)) {
return false // return false; //
}
const date = new Date(value) const date = new Date(value);
return !Number.isNaN(date.getTime()) // return !isNaN(date.getTime()); //
} }
// //
function goDetail(row) { function goDetail(row) {
router.push({ router.push({
name: 'final-detail', name: "final-detail",
query: { id: row.id, packageid: row.packageid }, query: { id: row.id, packageid: row.packageid },
}) });
} }
// //
function repeatBatchReject(items) { function repeatBatchReject(items) {
console.log(items) console.log(items);
rejectHandler(items) rejectHandler(items);
} }
// //
function rejectHandler(list) { function rejectHandler(list) {
console.log(list) console.log(list);
const msg = validate(list) const msg = validate(list);
if (msg !== null) { if (msg !== null) {
message.error(msg) message.error(msg);
return return;
} }
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) if (items.length === 0) return "至少选中一个任务";
return '至少选中一个任务' return null;
return null
} }
console.log(notPassModalRef) console.log(notPassModalRef);
const modal = unref(notPassModalRef)! as any const modal = unref(notPassModalRef)! as any;
modal.showModal(list) modal.showModal(list);
} }
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any const modal = unref(modalRef)! as any;
modal.showModal() modal.showModal();
} }
onMounted(() => { onMounted(() => {
initRem() initRem();
initData(1, 20) initData(1, 20);
}) });
const item = { const item = {
img: testImg, img: testImg,
checked: false, checked: false,
title: 'YP45678', title: "YP45678",
date: '2023-12-19 12:09:18', date: "2023-12-19 12:09:18",
} };
const data = ref<any[]>([]) const data = ref<any[]>([]);
function actionHandler(action: any, row: any) { function actionHandler(action: any, row: any) {
const { key } = action const { key } = action;
switch (key) { switch (key) {
case 'view': case "view":
goDetail(row) goDetail(row);
break break;
case 'reset': case "reset":
// resetHandler() // resetHandler()
break break;
case 'approval': case "approval":
singleApproval(row) singleApproval(row);
break break;
case 'reject': case "reject":
rejectHandler(row) rejectHandler(row);
break break;
default: default:
break break;
} }
} }
// //
function doAudit(param: any, row: any) { function doAudit(param: any, row: any) {
dialog.info({ dialog.info({
title: '确认提示', title: "确认提示",
content: '确认给该任务审批为【通过】吗?', content: "确认给该任务审批为【通过】吗?",
positiveText: '确定', positiveText: "确定",
negativeText: '取消', negativeText: "取消",
onPositiveClick: () => { onPositiveClick: () => {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res const { code } = res;
if (code === 'OK') { if (code === "OK") {
message.success(res.message) message.success(res.message);
// changecardstatus(3, row); //changecardstatus(3, row);
initData(1, 20) initData(1, 20);
num = 1 num = 1;
reload() reload();
} } else {
else { message.error(res.message);
message.error(res.message)
} }
}) });
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}) });
} }
// //
function singleApproval(row) { function singleApproval(row) {
console.log(row) console.log(row);
const param = { const param = {
result: true, result: true,
comment: '', comment: "",
disposeType: '', disposeType: "",
disposeTypeId: '', disposeTypeId: "",
failCauseId: '', failCauseId: "",
failCauseName: '', failCauseName: "",
flowTaskInfoList: [ flowTaskInfoList: [
{ {
formId: row.id, formId: row.id,
@ -301,144 +295,126 @@ function singleApproval(row) {
taskName: row.fromTaskName, taskName: row.fromTaskName,
}, },
], ],
} };
doAudit(param, row) doAudit(param, row);
} }
// //
function batchApproval() { function batchApproval() {
const items: any = selectionIds.value const items: any = selectionIds.value;
const msg = validate(items) const msg = validate(items);
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) if (items.length === 0) return "至少选中一个任务";
return '至少选中一个任务' return null;
return null
} }
if (msg !== null) { if (msg !== null) {
message.error(msg) message.error(msg);
return return;
} }
console.log(items) console.log(items);
const list: any = [] const list: any = [];
items.forEach((item) => { items.forEach((item) => {
list.push({ list.push({
formId: item.id, formId: item.id,
taskId: item.taskId, taskId: item.taskId,
taskName: item.fromtaskname, taskName: item.fromtaskname,
}) });
}) });
const param = { const param = {
result: true, result: true,
comment: '', comment: "",
disposeType: '', disposeType: "",
disposeTypeId: '', disposeTypeId: "",
failCauseId: '', failCauseId: "",
failCauseName: '', failCauseName: "",
flowTaskInfoList: list, flowTaskInfoList: list,
} };
doAudit(param, {}) doAudit(param, {});
selectionIds.value = [] selectionIds.value = [];
num = 1 num = 1;
} }
// //
function batchReject() { function batchReject() {
const items: any = selectionIds.value const items: any = selectionIds.value;
rejectHandler(items) rejectHandler(items);
selectionIds.value = [] selectionIds.value = [];
num = 1 num = 1;
} }
// //
function changecardstatus(states, item) { function changecardstatus(states, item) {
// let index = tableData.value.findIndex(itemx => itemx.id === item.id); //let index = tableData.value.findIndex(itemx => itemx.id === item.id);
const newlist = [] let newlist = [];
tableData.value.forEach((itemarr, indexarr) => { tableData.value.map((itemarr, indexarr) => {
itemarr.forEach((itemobj, indexobj) => { itemarr.map((itemobj, indexobj) => {
if (item.id == itemobj.id) if (item.id == itemobj.id) {
itemobj.states = states itemobj.states = states;
}
newlist.push(itemobj) newlist.push(itemobj);
}) });
}) });
tableData.value = chunk(newlist, 4) tableData.value = chunk(newlist, 4);
} }
function reload() { function reload() {
// query(1, 20) //query(1, 20)
// num=1 //num=1
// selectionIds.value = [] //selectionIds.value = []
// checkedRowKeys.value = [] //checkedRowKeys.value = []
// const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps // const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
// query(page!, pageSize!) // query(page!, pageSize!)
} }
let debounceTimer let debounceTimer;
// //
function checkBottom() { function checkBottom() {
const container = scrollContainer.value const container = scrollContainer.value;
// console.log(1) // console.log(1)
if (!container) if (!container) return;
return
// const { scrollTop, clientHeight, scrollHeight } = container; // const { scrollTop, clientHeight, scrollHeight } = container;
const scrollTop = window.pageYOffset || document.documentElement.scrollTop const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
// //
const clientHeight const clientHeight =
= window.innerHeight || document.documentElement.clientHeight window.innerHeight || document.documentElement.clientHeight;
// //
const scrollHeight = document.documentElement.scrollHeight const scrollHeight = document.documentElement.scrollHeight;
clearTimeout(debounceTimer) clearTimeout(debounceTimer);
debounceTimer = setTimeout(() => { debounceTimer = setTimeout(() => {
if (scrollTop + clientHeight >= scrollHeight - 10) { if (scrollTop + clientHeight >= scrollHeight - 10) {
num = num + 1 num = num + 1;
console.log(num) console.log(num);
query(num, 20) query(num, 20);
// fetchData(); // // fetchData(); //
} }
}, 500) }, 500);
} }
function changesort(sortnamex) { function changesort(sortnamex) {
if (sortorder.value == 'asc' && sortnamex == 'submit_date_timestamp') { if (sortorder.value == "asc" && sortnamex == "submit_date_timestamp") {
sortorder.value = 'desc' sortorder.value = "desc";
sortname.value = 'submit_date_timestamp' sortname.value = "submit_date_timestamp";
} }else if (sortorder.value == "desc" && sortnamex == "submit_date_timestamp") {
else if (sortorder.value == 'desc' && sortnamex == 'submit_date_timestamp') { sortorder.value = "asc";
sortorder.value = 'asc' sortname.value = "submit_date_timestamp";
sortname.value = 'submit_date_timestamp' } else if (sortorder.value == "desc" && sortnamex == "similarity_score") {
} sortorder.value = "asc";
else if (sortorder.value == 'desc' && sortnamex == 'similarity_score') { sortname.value = "similarity_score";
sortorder.value = 'asc' } else if (sortorder.value == "asc" && sortnamex == "similarity_score") {
sortname.value = 'similarity_score' sortorder.value = "desc";
} sortname.value = "similarity_score";
else if (sortorder.value == 'asc' && sortnamex == 'similarity_score') { } else if (sortorder.value == "asc" && sortnamex == "field1") {
sortorder.value = 'desc' sortorder.value = "desc";
sortname.value = 'similarity_score' sortname.value = "field1";
} } else if (sortorder.value == "desc" && sortnamex == "field1") {
else if (sortorder.value == 'asc' && sortnamex == 'field1') { sortorder.value = "asc";
sortorder.value = 'desc' sortname.value = "field1";
sortname.value = 'field1' }
} initData(1, 20);
else if (sortorder.value == 'desc' && sortnamex == 'field1') { num=1
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>
@ -483,17 +459,18 @@ defineExpose({
src="@/assets/images/task/btn-not-pass.png" src="@/assets/images/task/btn-not-pass.png"
alt="" alt=""
@click.stop="batchReject" @click.stop="batchReject"
> />
<SvgIcon size="24" name="vs" /> <SvgIcon size="24" name="vs" />
<img <img
class="btn-approval" class="btn-approval"
src="@/assets/images/task/btn-pass.png" src="@/assets/images/task/btn-pass.png"
alt="" alt=""
@click.stop="batchApproval" @click.stop="batchApproval"
> />
</div> </div>
<n-popover <n-popover
ref="popover"
:style="{ padding: '0px' }" :style="{ padding: '0px' }"
style="width: 148px" style="width: 148px"
:show-arrow="false" :show-arrow="false"
@ -507,20 +484,26 @@ defineExpose({
</template> </template>
<ul class="wrapper-header-action"> <ul class="wrapper-header-action">
<li @click="importHandler"> <li @click="importHandler">
<SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span> <SvgIcon size="20" name="import" /><span style="margin-left: 5px"
>批量导入数据</span
>
</li> </li>
<li @click="exportHandler"> <li @click="exportHandler">
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span
style="margin-left: 5px" style="margin-left: 5px"
>导出待审数据</span> >导出待审数据</span
>
</li> </li>
<li> <li>
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span
style="margin-left: 5px" style="margin-left: 5px"
>导出全部数据</span> >导出全部数据</span
>
</li> </li>
<li> <li>
<SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span> <SvgIcon size="20" name="look" /><span style="margin-left: 5px"
>查看导入记录</span
>
</li> </li>
</ul> </ul>
</n-popover> </n-popover>
@ -528,18 +511,21 @@ defineExpose({
</div> </div>
<div class="header_data"> <div class="header_data">
<DataHeader :has-color="true" /> <DataHeader :hasColor="true" />
</div> </div>
<div class="wrapper-settings"> <div class="wrapper-settings">
<div> <div>
<div @click="changesort('submit_date_timestamp')"> <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 @click="changesort('similarity_score')"> <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 @click="changesort('field1')"> <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">
@ -552,58 +538,51 @@ defineExpose({
/> />
</div> </div>
</div> </div>
<div ref="scrollContainer" :class="tableData.length > 4 ? 'cotnet_wrapeer' : 'cotnet_wrapeertwo'" @scroll="checkBottom"> <div class="cotnet_wrapeer" @scroll="checkBottom" ref="scrollContainer">
<div <div
class="data_wrapper"
v-for="(sitem, sindex) in tableData" v-for="(sitem, sindex) in tableData"
:key="sindex" :key="sindex"
class="data_wrapper"
:style=" :style="
sitem.length == 1 sitem.length == 1
? { width: '25%' } ? { width: '25%' }
: sitem.length == 2 : sitem.length == 2
? { width: '50%' } ? { width: '50%' }
: sitem.length == 3 : sitem.length == 3
? { width: '75%' } ? { width: '75%' }
: {} : {}
" "
> >
<div <div
class="item"
v-for="(item, index) in sitem" v-for="(item, index) in sitem"
:key="index" :key="index"
class="item"
:style=" :style="
sitem.length == 1 sitem.length == 1
? { margin: '0 4% 0 4%' } ? { margin: '0 4% 0 4%' }
: sitem.length == 2 : sitem.length == 2
? { margin: '0 2% 0 2%' } ? { margin: '0 2% 0 2%' }
: sitem.length == 3 : sitem.length == 3
? { margin: '0 1.2% 0 1.2%' } ? { margin: '0 1.2% 0 1.2%' }
: {} : {}
" "
> >
<div class="top"> <div class="top">
<div <div
@click="goDetail(item)"
class="img" class="img"
:style=" :style="
item.serverThumbnailUrl != null item.serverThumbnailUrl != null
? `background:url(${item.serverThumbnailUrl});background-size:100% 100%;background-repeat: no-repeat;` ? `background:url(${item.serverThumbnailUrl});background-size:100% 100%;background-repeat: no-repeat;`
: `background:url(${item.imgUrl});background-size:100% 100%;background-repeat: no-repeat;` : `background:url(${item.imgUrl});background-size:100% 100%;background-repeat: no-repeat;`
" "
@click="goDetail(item)" ></div>
> <div class="check_box" v-show="item.states == 2">
<div v-if="item.similarityscore != -1" class="percent">
<SvgIcon size="30" :name="item.similarityscore == 100 ? 'error_tag' : 'tag'" />
<div class="val">
{{ `${item.similarityscore}%` }}
</div>
</div>
</div>
<div v-show="item.states == 2" class="check_box">
<n-checkbox <n-checkbox
size="medium" size="medium"
label=" " label=" "
:checked="item.showcheck"
@click="handleCheck(item, item.showcheck)" @click="handleCheck(item, item.showcheck)"
:checked="item.showcheck"
/> />
</div> </div>
<div class="content" @click="goDetail(item)"> <div class="content" @click="goDetail(item)">
@ -613,23 +592,23 @@ defineExpose({
</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.fromuptime }} >{{ item.createdate }}
</n-ellipsis> </n-ellipsis>
</div> </div>
<div class="tag_box"> <div class="tag_box">
<div <div
class="tag_item"
v-for="index in 2" v-for="index in 2"
:key="index" :key="index"
class="tag_item"
:style=" :style="
index == 2 || item.states == 3 index == 2 || item.states == 3
? 'color:#02C984' ? 'color:#02C984'
: item.states == 2 : item.states == 2
? 'color: #fe9800;background:#f7eac075' ? 'color: #fe9800;background:#f7eac075'
: item.states == 5 : item.states == 5
? 'color:#FF4E4F;background:#f7c0c06b' ? 'color:#FF4E4F;background:#f7c0c06b'
: 'color:#02C984' : 'color:#02C984'
" "
> >
{{ {{
@ -637,10 +616,10 @@ defineExpose({
? item.states == 3 ? item.states == 3
? "通过" ? "通过"
: item.states == 2 : item.states == 2
? "待审核" ? "待审核"
: item.states == 5 : item.states == 5
? "未通过" ? "未通过"
: "" : ""
: item.fromusername : item.fromusername
}} }}
</div> </div>
@ -648,24 +627,24 @@ defineExpose({
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<!-- <div class="reset_action">重置审批</div> --> <!-- <div class="reset_action">重置审批</div>-->
<div <div
v-show="item.states != 2"
class="resovle_action" class="resovle_action"
v-show="item.states != 2"
@click="goDetail(item)" @click="goDetail(item)"
> >
查看 查看
</div> </div>
<div <div
v-show="item.states == 2"
class="resovle_action" class="resovle_action"
v-show="item.states == 2"
@click="actionHandler({ key: 'approval' }, item)" @click="actionHandler({ key: 'approval' }, item)"
> >
通过 通过
</div> </div>
<div <div
v-show="item.states == 2"
class="reject_action" class="reject_action"
v-show="item.states == 2"
@click="actionHandler({ key: 'reject' }, [item])" @click="actionHandler({ key: 'reject' }, [item])"
> >
不通过 不通过
@ -863,7 +842,6 @@ defineExpose({
// height: auto; // height: auto;
object-fit: cover; object-fit: cover;
border-radius: 0.18rem; border-radius: 0.18rem;
position: relative;
} }
.check_box { .check_box {
position: absolute; position: absolute;
@ -946,42 +924,11 @@ defineExpose({
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;
width: calc(100% + 5px); width: calc(100% + 5px);
} }
.percent {
position: absolute;
text-align: center;
z-index: 3;
right: 0px;
top: -4px;
color: #fff;
.val {
position: absolute;
left: 0;
top: 0;
display: block;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
font-family: PingFang SC, PingFang SC-Semibold;
font-weight: Semibold;
text-align: left;
color: #ffffff;
line-height: 24px;
}
}
/* 定义滚动条的宽度及背景颜色 */ /* 定义滚动条的宽度及背景颜色 */
::-webkit-scrollbar { ::-webkit-scrollbar {
position: fixed; position: fixed;

@ -5,15 +5,14 @@ import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue' import ListContent from './content/ListContent.vue'
import Robot from '@/components/Robot/index.vue' import Robot from '@/components/Robot/index.vue'
defineOptions({ defineOptions({
name: 'FinalMain', name: 'FinalMain',
}) })
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>
@ -24,10 +23,10 @@ function inputChange(keyword) {
<!-- 任务管理 --> <!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 --> <!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-if="showList" ref="ListRef" @change-show="showList = false" /> <ListContent v-show="showList" @change-show="showList = false" />
<!-- 内容 --> <!-- 内容 -->
<Content v-if="!showList" ref="contentRef" @change-show="showList = true" /> <Content v-show="!showList" ref="contentRef" @change-show="showList = true" />
<!-- 机器人 --> <!-- 机器人 -->
<Robot /> <Robot />

@ -275,20 +275,14 @@ defineExpose({
> >
<template #trigger> <template #trigger>
<div class="wrapper-left-dropdown" @click="showClick"> <div class="wrapper-left-dropdown" @click="showClick">
<n-tooltip trigger="hover"> <span
<template #trigger> style="
<span color: #333333;
style=" font-weight: Medium;
color: #333333; font-size: 17px;
font-weight: Medium; font-weight: 600;
font-size: 17px; "
font-weight: 600; >{{ currentlySelectedAdvanced }}</span>
"
>{{ currentlySelectedAdvanced }}</span>
</template>
{{ currentlySelectedAdvanced }}
</n-tooltip>
<SvgIcon <SvgIcon
:style="{ marginLeft: '5px' }" :style="{ marginLeft: '5px' }"
name="down" name="down"

@ -48,8 +48,6 @@ function showModal() {
} }
function closeModal() { function closeModal() {
offKeyword.value = ''
onKeyword.value = ''
show.value = false show.value = false
} }

@ -14,6 +14,7 @@ import type { DataTableColumns, DataTableRowKey } from 'naive-ui'
import type { SortableEvent } from 'sortablejs' import type { SortableEvent } from 'sortablejs'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import selection from 'naive-ui/es/_internal/selection'
import Action from '../Action.vue' import Action from '../Action.vue'
import { deleteCondition, getConditionList, sort } from '@/api/home/filter' import { deleteCondition, getConditionList, sort } from '@/api/home/filter'
import type { FilterSearchParam } from '/#/api' import type { FilterSearchParam } from '/#/api'
@ -34,11 +35,10 @@ const emit = defineEmits<{
const modal = useModal() const modal = useModal()
const tableData = ref<Array<RowData>>([]) const tableData = ref<Array<RowData>>([])
const keyword = ref('') const keyword = ref('')
const $message = window.$message
const show = ref(false) const show = ref(false)
const $message = window.$message
const cardStyle = { const cardStyle = {
'width': '808px', 'width': '808px',
'height': '840px', 'height': '840px',

@ -1,4 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
/** eslint-disable */
import { EllipsisHorizontal, EyeOutline as EyeOutlineIcon } from '@vicons/ionicons5' import { EllipsisHorizontal, EyeOutline as EyeOutlineIcon } from '@vicons/ionicons5'
import { Download as DownloadIcon, Upload as UploadIcon } from '@vicons/tabler' import { Download as DownloadIcon, Upload as UploadIcon } from '@vicons/tabler'
import { Icon } from '@vicons/utils' import { Icon } from '@vicons/utils'
@ -21,6 +22,7 @@ import {
unref, unref,
watch, watch,
} from 'vue' } from 'vue'
import axios from 'axios'
import CheckingTaskModal from './modal/CheckingTaskModal.vue' import CheckingTaskModal from './modal/CheckingTaskModal.vue'
import FinishPackageModal from './modal/FinishPackageModal.vue' import FinishPackageModal from './modal/FinishPackageModal.vue'
import GeneratePackageModal from './modal/GeneratePackageModal.vue' import GeneratePackageModal from './modal/GeneratePackageModal.vue'
@ -48,8 +50,6 @@ import {
removeCheckDuplicate, removeCheckDuplicate,
} from '@/api/home/main' } from '@/api/home/main'
import bgLoading from '@/assets/images/bg-loading.png'
const listData = ref<any[]>([]) const listData = ref<any[]>([])
const timer = ref() const timer = ref()
const showClose = ref(false) const showClose = ref(false)
@ -81,7 +81,6 @@ const imageRef = ref<ComponentElRef | null>()
const checkDuplicateNo = ref('') const checkDuplicateNo = ref('')
const checkTaskStatus = ref(null) // 1. 2. 3. const checkTaskStatus = ref(null) // 1. 2. 3.
const isRefresh = ref(true) // const isRefresh = ref(true) //
const bgLoadingImg = ref(bgLoading)
let canloadMore = true let canloadMore = true
let filterId = null let filterId = null
@ -250,13 +249,12 @@ async function featchList(userSearchId?: string) {
const list = data.map((item) => { const list = data.map((item) => {
return { return {
imgUrl: item.imgurl, imgUrl: item.imgurl,
thumburl: item.serverThumbnailUrl || item.imgurl || '', thumburl: item.serverThumbnailUrl || item.imgurl,
upname: item.upname, upname: item.upname,
ocrPictureclass: item.ocrPictureclass, ocrPictureclass: item.ocrPictureclass,
uphead: item.uphead, uphead: item.uphead,
similar: item.similarityscore || -1, similar: item.similarityscore || -1,
imgName: item.imgname, imgName: item.imgname,
states: item.states,
loadOver: false, loadOver: false,
} }
}) })
@ -275,8 +273,8 @@ async function loadMore() {
const more = await featchList() const more = await featchList()
// if(isInitSeaerch.value) { // if(isInitSeaerch.value) {
// listData.value = [] // listData.value = [];
// isInitSeaerch.value = false // isInitSeaerch.value = false;
// } // }
listData.value.push(...more) listData.value.push(...more)
} }
@ -298,6 +296,7 @@ const gridHeight = computed(() => {
async function oneCheck() { async function oneCheck() {
const asideVal = cloneDeep(configStore.getAsideValue) const asideVal = cloneDeep(configStore.getAsideValue)
asideVal.upUserName = searchValue.value asideVal.upUserName = searchValue.value
console.log('searchValue', asideVal, searchValue.value)
if (asideVal.izyear && asideVal.izyear.length == 2) { if (asideVal.izyear && asideVal.izyear.length == 2) {
asideVal.izyear = `${dayjs(asideVal.izyear[0]).format('YYYY/MM/DD')}-${dayjs( asideVal.izyear = `${dayjs(asideVal.izyear[0]).format('YYYY/MM/DD')}-${dayjs(
@ -315,6 +314,7 @@ async function oneCheck() {
clearInterval(timer.value) clearInterval(timer.value)
timer.value = setInterval(() => { timer.value = setInterval(() => {
console.log('calNum.value2222222222222', calNum.value, checkTaskStatus.value)
if (checkDuplicateNo.value) { if (checkDuplicateNo.value) {
getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => { getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => {
if (res.code === 'OK') { if (res.code === 'OK') {
@ -420,9 +420,9 @@ onMounted(() => {
emitter.on('filter', refreshHandler) emitter.on('filter', refreshHandler)
// emitter.on("filter", (searchId)=>{ // emitter.on("filter", (searchId)=>{
// console.log("emitter on filter" + searchId) // console.log("emitter on filter" + searchId)
// reset() // reset();
// featchList(searchId) // featchList(searchId);
// }) // });
// //
getLastCheckNo().then((res) => { getLastCheckNo().then((res) => {
if (res.code === 'OK') if (res.code === 'OK')
@ -535,7 +535,7 @@ function previewHandler(index: number, event: MouseEvent) {
event.stopImmediatePropagation() event.stopImmediatePropagation()
event.stopPropagation() event.stopPropagation()
if (imageRef.value?.[index] && (imageRef.value[index] as any).src) if (imageRef.value?.[index] && (imageRef.value[index] as any).src)
// (imageRef.value?.[index] as any).mergedOnClick() // (imageRef.value?.[index] as any).mergedOnClick();
(imageRef.value?.[index] as any).click() (imageRef.value?.[index] as any).click()
} }
@ -573,9 +573,8 @@ function refresh(val?: any) {
loadMore() loadMore()
configStore.setTimeNum(0) configStore.setTimeNum(0)
} }
// else if (checkTaskStatus.value === 1) { else if (checkTaskStatus.value === 1) {
// return; }
// }
} }
}) })
} }
@ -723,20 +722,7 @@ defineExpose({
}" }"
:preview-src="item.imgUrl" :preview-src="item.imgUrl"
:src="item.thumburl" :src="item.thumburl"
:fallback-src="bgLoadingImg"
/> />
<img
v-if="item.states == 3"
class="tag-status"
src="@/assets/images/task/tag-pass.png"
alt=""
>
<img
v-if="item.states == 5"
class="tag-status"
src="@/assets/images/task/tag-not-pass.png"
alt=""
>
<!-- @load="loadImgOver(item)" --> <!-- @load="loadImgOver(item)" -->
<!-- <n-image <!-- <n-image
class="img" class="img"
@ -775,15 +761,7 @@ defineExpose({
>{{ item.imgName }}</span> >{{ item.imgName }}</span>
</n-tooltip> </n-tooltip>
</div> </div>
<div <div class="icon-wrap" @click="previewHandler(index, $event)">
class="icon-wrap"
@click="
($event) => {
previewHandler(index, $event);
hideDownload($event);
}
"
>
<SvgIcon <SvgIcon
size="13" size="13"
name="magnifying-2" name="magnifying-2"
@ -946,14 +924,6 @@ defineExpose({
transition: 0.5s; transition: 0.5s;
margin: 0 6px 10px 6px; margin: 0 6px 10px 6px;
.tag-status {
width: 46px;
height: 22px;
position: absolute;
left: -1px;
top: 10px;
}
.glass { .glass {
position: absolute; position: absolute;
display: none !important; display: none !important;
@ -1045,34 +1015,6 @@ defineExpose({
.scroll { .scroll {
overflow-y: scroll; overflow-y: scroll;
//
&::-webkit-scrollbar {
width: 6px;
height: 6px;
background: #f1f1f1;
display: none;
}
&:hover {
&::-webkit-scrollbar {
display: block;
}
}
/* 定义滚动条轨道的样式 */
&::-webkit-scrollbar-track {
background-color: #e1e1e1;
border-radius: 10px; /* 圆角 */
}
/* 定义滚动条滑块的样式 */
&::-webkit-scrollbar-thumb {
background-color: #888;
border-radius: 10px; /* 圆角 */
}
/* 滑块hover时的样式 */
&::-webkit-scrollbar-thumb:hover {
background-color: #555;
}
} }
} }
.flex-btn-icon { .flex-btn-icon {

@ -33,7 +33,6 @@ import { useUser } from '@/store/modules/user'
import { isEmpty } from '@/utils' import { isEmpty } from '@/utils'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image' import { hideDownload } from '@/utils/image'
import bgLoading from '@/assets/images/bg-loading.png'
const emit = defineEmits(['setAsideItemName']) const emit = defineEmits(['setAsideItemName'])
@ -60,8 +59,6 @@ const sortBy: any = {
orderName: 'similarityScore', orderName: 'similarityScore',
} }
const el = ref<HTMLDivElement | null>(null) const el = ref<HTMLDivElement | null>(null)
const bgLoadingImg = ref(bgLoading)
const pagination = reactive({ const pagination = reactive({
pageNo: 0, pageNo: 0,
pageSize: 30, pageSize: 30,
@ -414,7 +411,7 @@ async function getTableData() {
'拜访项目类别', '拜访项目类别',
] ]
fieldList.forEach((v) => { fieldList.map((v) => {
if (userFieldList.includes(v.name)) { if (userFieldList.includes(v.name)) {
let locationobj = { address: '' } let locationobj = { address: '' }
if (v.name == 'location') { if (v.name == 'location') {
@ -445,7 +442,6 @@ async function getImgList() {
const { data, total } = await getSimilarityList({ const { data, total } = await getSimilarityList({
...taskpagination, ...taskpagination,
...sortBy, ...sortBy,
taskNode: taskDetailInfo.value.taskNode,
pictureId: taskDetailInfo.value.ocrPicture.id, pictureId: taskDetailInfo.value.ocrPicture.id,
}) })
taskDetailPictureList.value = data taskDetailPictureList.value = data
@ -638,7 +634,6 @@ async function fetchList() {
const { data, pageCount, total } = await getSimilarityList({ const { data, pageCount, total } = await getSimilarityList({
...pagination, ...pagination,
...sortBy, ...sortBy,
taskNode: taskDetailInfo.value.taskNode,
pictureId: taskDetailInfo.value.ocrPicture.id, pictureId: taskDetailInfo.value.ocrPicture.id,
}) })
canloadMore = pageCount >= pagination.pageNo && pageCount > 0 canloadMore = pageCount >= pagination.pageNo && pageCount > 0
@ -808,23 +803,20 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
isFullScreen isFullScreen
? imgbigshow ? imgbigshow
? { ? {
position: 'relative', 'position': 'relative',
//width: '70vw', //width: '70vw',
flex: 1, 'flex': 1,
// flex: 0.75, // flex: 0.75,
// 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`,
} }
: { : {
height: '92vh', 'height': '92vh',
flex: 1, 'flex': 1,
// 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`,
} }
: { : {
// 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`,
} }
" "
@mouseover="overTaskHandle" @mouseover="overTaskHandle"
@ -1001,10 +993,7 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
<div <div
class="img-wrapper" class="img-wrapper"
:style="{ :style="{
// 'background-image': `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl})`, 'background-image': `url(${item.serverThumbnailUrl})`,
background: `url(${
item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl
}), url(${bgLoadingImg})`,
}" }"
/> />
<div class="small-mark" /> <div class="small-mark" />
@ -1229,10 +1218,7 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
<div <div
class="img-wrapper" class="img-wrapper"
:style="{ :style="{
// 'background-image': `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl})`, 'background-image': `url(${item.serverThumbnailUrl})`,
background: `url(${
item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl
}), url(${bgLoadingImg})`,
}" }"
@mouseover="overTaskHandelr(item)" @mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler" @mouseleave="leaveTaskHandler"

@ -144,7 +144,6 @@ async function fetchList() {
{ {
...pagination, ...pagination,
...sortBy, ...sortBy,
taskNode: taskDetailInfo.value.taskNode,
pictureId: taskDetailInfo.value.ocrPicture.id, pictureId: taskDetailInfo.value.ocrPicture.id,
}, },
) )
@ -255,15 +254,18 @@ function afterLeave() {
onMounted(() => { onMounted(() => {
show.value && addListeners() show.value && addListeners()
window.addEventListener('keydown', handleKeydown) window.addEventListener("keydown", handleKeydown);
}) })
// //
function handleKeydown(event) { function handleKeydown(event) {
// //
if (event.keyCode === 67) if (event.keyCode === 67) {
show.value = false show.value=false
// batchModalRef.value.closeModal() // batchModalRef.value.closeModal()
}
} }
function showModal(value) { function showModal(value) {
taskId.value = value taskId.value = value
@ -406,8 +408,7 @@ const gridHeight = computed(() => {
defineExpose({ defineExpose({
showModal, showModal,
reload, reload,closeModal
closeModal,
}) })
</script> </script>
@ -543,39 +544,40 @@ defineExpose({
:style="{ height: gridHeight }" :style="{ height: gridHeight }"
class="grid-item" class="grid-item"
> >
<n-image <n-image
class="img" ref="imageRef"
class="img"
:class="{ :class="{
'img-fit': viewMode === 'horizontalVersion', 'img-fit': viewMode === 'horizontalVersion',
'img-full': viewMode === '3:4' || viewMode === 'verticalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion',
}" }"
:src="item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl" :src="item.serverThumbnailUrl"
/> />
<div class="small-mark" /> <div class="small-mark" />
<div class="time"> <div class="time">
<div v-if="item.photoDateTimestamp" class="time-item"> <div v-if="item.photoDateTimestamp" class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="14" name="camera-time" /> <SvgIcon class="svg-time" color="#FFF" size="14" name="camera-time" />
<span>{{ formatToDateHMS(Number(item.photoDateTimestamp) || 0) }}</span> <span>{{ formatToDateHMS(Number(item.photoDateTimestamp) || 0) }}</span>
</div>
<div v-if="item.submitDateTimestamp" class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="14" name="submit-time" />
<span>{{ formatToDateHMS(Number(item.submitDateTimestamp) || 0) }}</span>
</div>
</div> </div>
<div v-if="item.submitDateTimestamp" class="time-item time-item2"> <img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt="">
<SvgIcon class="svg-time" color="#FFF" size="14" name="submit-time" /> <img v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png" alt="">
<span>{{ formatToDateHMS(Number(item.submitDateTimestamp) || 0) }}</span> <div class="check">
<n-checkbox
v-show="batch && item.historyStates === 1"
v-model:checked="item.checked" @click.prevent
@update:checked="onCheckChange($event, item)"
/>
</div> </div>
</div> <div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent">
<img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt=""> {{ item.similarityScore }}<span class="percent-unit">%</span>
<img v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png" alt=""> </div>
<div class="check">
<n-checkbox
v-show="batch && item.historyStates === 1"
v-model:checked="item.checked" @click.prevent
@update:checked="onCheckChange($event, item)"
/>
</div>
<div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent">
{{ item.similarityScore }}<span class="percent-unit">%</span>
</div>
</div> </div>
</div> </div>
<!-- </n-scrollbar> --> <!-- </n-scrollbar> -->

@ -459,15 +459,7 @@ const moreThanSix = computed(() => {
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button <n-button type="info" @click="handleSumbit">
type="info"
@click="
($event) => {
handleSumbit($event);
getData();
}
"
>
确定 确定
</n-button> </n-button>
<n-button <n-button

@ -305,7 +305,6 @@ defineExpose({
v-model:value="formValue.name" v-model:value="formValue.name"
:style="{ width: '780px' }" :style="{ width: '780px' }"
placeholder="请输入过滤名称" placeholder="请输入过滤名称"
maxlength="15"
@keydown.enter.prevent @keydown.enter.prevent
/> />
</n-form-item> </n-form-item>

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref } from 'vue'
import bgLoading from '@/assets/images/bg-loading.png'
const props = defineProps({ const props = defineProps({
imgurl: String, imgurl: String,
@ -13,7 +12,6 @@ const props = defineProps({
const imageRef = ref<ComponentElRef | null>() const imageRef = ref<ComponentElRef | null>()
const overTask = ref<any>(null) const overTask = ref<any>(null)
const overTasktwo = ref<any>(null) const overTasktwo = ref<any>(null)
const bgLoadingImg = ref(bgLoading)
function overTaskHandle() { function overTaskHandle() {
const item = props.taskDetailInfo const item = props.taskDetailInfo
@ -67,20 +65,17 @@ function previewHandler(event: MouseEvent) {
isFullScreen isFullScreen
? imgbigshow ? imgbigshow
? { ? {
position: 'relative', 'position': 'relative',
flex: 2, 'flex': 2,
// 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`,
} }
: { : {
height: '92vh', 'height': '92vh',
flex: 2, 'flex': 2,
// 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`,
} }
: { : {
// 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`,
} }
" "
@mouseover="overTaskHandle" @mouseover="overTaskHandle"
@ -108,16 +103,11 @@ function previewHandler(event: MouseEvent) {
/> />
</div> </div>
<div class="check"> <div class="check">
<!-- <n-checkbox
v-show="batch && taskDetailInfo?.userapprove?.statshis === 1"
:checked="taskDetailInfo?.checked"
@click.stop
@update:checked="onCheckChange($event, taskDetailInfo)"
/> -->
<n-checkbox <n-checkbox
v-show="batch && taskDetailInfo?.userapprove?.statshis === 1" v-show="batch && taskDetailInfo?.userapprove?.statshis === 1"
:checked="taskDetailInfo?.checked" v-model:checked="taskDetailInfo?.checked"
@click.stop @click.stop
@update:checked="onCheckChange($event, taskDetailInfo)"
/> />
</div> </div>

@ -1,4 +1,16 @@
<script lang="ts" setup> <script lang="ts" setup>
import { audit, dubiousfileyd } from '@/api/task/task'
import {
getPictureSimilarityList,
getTaskDetailInfo,
} from '@/api/work/work'
import NotPassed from '@/components/Approval/NotPassed.vue'
import { TASK_STATUS_OBJ } from '@/enums/index'
import { useWorkOrder } from '@/store/modules/workOrder'
import { isEmpty } from '@/utils'
import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image'
import emitter from '@/utils/mitt'
import { useInfiniteScroll } from '@vueuse/core' import { useInfiniteScroll } from '@vueuse/core'
import { format } from 'date-fns' import { format } from 'date-fns'
import imagesloaded from 'imagesloaded' import imagesloaded from 'imagesloaded'
@ -16,17 +28,7 @@ import {
} from 'vue' } from 'vue'
import PictureInfo from '../components/PictureInfo.vue' import PictureInfo from '../components/PictureInfo.vue'
import ConfrimModal from '../modal/ConfrimModal.vue' import ConfrimModal from '../modal/ConfrimModal.vue'
import { audit, dubiousfileyd } from '@/api/task/task'
import { getPictureSimilarityList, getTaskDetailInfo } from '@/api/work/work'
import NotPassed from '@/components/Approval/NotPassed.vue'
import { TASK_STATUS_OBJ } from '@/enums/index'
import { useWorkOrder } from '@/store/modules/workOrder'
import { isEmpty } from '@/utils'
import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image'
import emitter from '@/utils/mitt'
import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api' import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api'
import bgLoading from '@/assets/images/bg-loading.png'
const batch = ref(false) // const batch = ref(false) //
const selectItems = ref<any[]>([]) const selectItems = ref<any[]>([])
@ -34,12 +36,7 @@ const message = useMessage()
const dialog = useDialog() const dialog = useDialog()
const totalCount = ref(0) const totalCount = ref(0)
let _imagesload: any let _imagesload: any
const bgLoadingImg = ref(bgLoading)
const imgbigshow = ref(true)
function changeimgbigshow() {
imgbigshow.value = !imgbigshow.value
}
function setBatch(value: boolean) { function setBatch(value: boolean) {
if (value && batch.value) if (value && batch.value)
batch.value = !value batch.value = !value
@ -334,7 +331,9 @@ function onEsc(event: KeyboardEvent) {
const currentKTime = Date.now() const currentKTime = Date.now()
if (currentKTime - keyXLastTime < 500) if (currentKTime - keyXLastTime < 500)
handleRejectMainImage() handleRejectMainImage()
else keyXLastTime = currentKTime
else
keyXLastTime = currentKTime
} }
} }
@ -623,10 +622,7 @@ defineExpose({
<!-- 左侧大图 图片信息 --> <!-- 左侧大图 图片信息 -->
<div <div
class="left" class="left"
:style="{ :style="{ 'background-image': `url(${taskDetailInfo?.imgurl})` }"
'background-image': `url(${taskDetailInfo?.imgurl})`,
'flex': imgbigshow ? '0.6' : '1',
}"
@click="previewHandler" @click="previewHandler"
@mouseover="showAction" @mouseover="showAction"
@mouseleave="leaveTaskHandler" @mouseleave="leaveTaskHandler"
@ -731,39 +727,7 @@ defineExpose({
/> />
</div> </div>
</div> </div>
<PictureInfo :task-detail-info="taskDetailInfo" />
<!-- 缩放线 -->
<div
v-show="isFullScreen"
:style="{
position: 'fixed',
zIndex: 169,
background: 'rgb(80, 122, 253)',
right: imgbigshow ? '46%' : '16px',
marginTop: '5px',
width: '2px',
height: '350px',
}"
/>
<div
v-show="isFullScreen"
class="aside-collapse-btn"
:style="{
position: 'fixed',
right: imgbigshow ? '45%' : '0px',
top: '155px',
cursor: 'pointer',
zIndex: 170,
}"
>
<SvgIcon
:name="false ? 'expand-cir' : 'collapse-cir'"
size="40"
@click="changeimgbigshow"
/>
</div>
<PictureInfo v-show="imgbigshow" :task-detail-info="taskDetailInfo" />
</div> </div>
<div <div
style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0" style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0"
@ -834,11 +798,7 @@ defineExpose({
> >
<div <div
class="img-wrapper" class="img-wrapper"
:style="{ :style="{ 'background-image': `url(${item.imgurl})` }"
background: `url(${
item?.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgurl
}), url(${bgLoadingImg})`,
}"
/> />
<div class="time-wrapper"> <div class="time-wrapper">
<div class="time"> <div class="time">

Loading…
Cancel
Save