Compare commits

...

20 Commits

Author SHA1 Message Date
刘释隆 31b02e2c68 Merge branch 'test' into fix/ui_error
1 year ago
刘释隆 8df512b429 Merge pull request 'feat: api请求数据处理及bug修复' (#216) from fix/allseach_bug into test
1 year ago
刘释隆 2246792839 Merge pull request 'fix: 修复问题' (#215) from fix/bug into test
1 year ago
刘释隆 45cf403746 Merge branch 'test' into fix/bug
1 year ago
刘释隆 2ebbd52929 fix: 解决冲突
1 year ago
刘释隆 f9bd200593 feat: api请求数据处理及bug修复
1 year ago
刘释隆 417ece83b9 feat: bug修复
1 year ago
刘释隆 3b0b8c5579 Merge pull request 'feat:任务审批图片相似度接口增加参数' (#213) from feat/20240417similarite into test
1 year ago
zhouxiaoan 6d676b1ea3 feat:任务审批图片相似度接口增加参数
1 year ago
刘释隆 17dc01afa7 Merge pull request 'feat:修改冲突' (#211) from fix/updatesyspic into test
1 year ago
赵辉 b1904b3236 Merge pull request 'feat:添加阈值标签,全部展示功能的联动' (#212) from fix/change_task into test
1 year ago
lihui_ocr 9783d5f0ab feat:添加阈值标签,全部展示功能的联动
1 year ago
raofuzi 259d846d86 feat:修改冲突
1 year ago
刘释隆 c9282047ec Merge pull request 'fix/updatesyspic' (#208) from fix/updatesyspic into test
1 year ago
raofuzi e8c7b3cfeb feat:修改冲突
1 year ago
raofuzi e73a59932b feat:修改冲突
1 year ago
赵辉 7d01f2f255 Merge pull request 'feat:卡片模式及表格模式连动,卡片模式及高级筛选联动' (#210) from fix/change_task into test
1 year ago
lihui_ocr 3e26b67957 feat:卡片模式及表格模式连动,卡片模式及高级筛选联动
1 year ago
raofuzi 9a5700ae00 feat: 修改图片相关bug
1 year ago
raofuzi 2c3d200d75 feat: 修改图片相关bug
1 year ago

@ -39,5 +39,10 @@
"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 param * @param params
*/ */
export async function audit(params) { export async function audit(params) {
return http.request({ return http.request({
@ -82,8 +82,6 @@ export async function removeFiles(params) {
/** /**
* () * ()
* @param packageid id
* @param taskchildpictureid id
* @param params * @param params
* @returns * @returns
*/ */
@ -94,26 +92,36 @@ export async function getSimilarityList(params: any) {
params, params,
}) })
const { data: { records, pages, total } } = res const { data } = res
// 精简一下数据 if (data) {
const list = records.map((item) => { const { records, pages, total } = data
// 精简一下数据
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 {
id: item.id, pageCount: pages,
taskId: item.taskId, data: records,
taskname: item.fromtaskname, total,
assignee: item.assignee, }
pictureid: item.pictureid, }
imgurl: item.imgUrl, else {
thumburl: item.imgUrl, return {
iztrueorfalse: item.iztrueorfalse, pageCount: 0,
states: item.states, data: [],
total: 0,
} }
})
return {
pageCount: pages,
data: records,
total,
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -54,6 +54,7 @@ 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,7 +74,9 @@ function goPath(item, id) {
const desiredObject = item.data.find((item) => { const desiredObject = item.data.find((item) => {
return item.id === id return item.id === id
}) })
storage.set('isSearch', true) if (!storage.get('isSearch'))
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,12 +13,14 @@ 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
@ -732,6 +734,7 @@ 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, unref } from 'vue' import { computed, onBeforeMount, onMounted, 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()
onBeforeMount(() => { onMounted(() => {
/** /**
* 如果刷新则去掉筛选条件 * 如果刷新则去掉筛选条件
* 1. 如果当前页面路由与上一个页面路由相同时则为刷新 * 1. 如果当前页面路由与上一个页面路由相同时则为刷新
@ -20,14 +20,13 @@ onBeforeMount(() => {
* 4. 搜索点击->存storage->跳转页面->onMounted * 4. 搜索点击->存storage->跳转页面->onMounted
* ->如果storage为true则不replace 并将storage置false * ->如果storage为true则不replace 并将storage置false
*/ */
if ( if (storage.get('isSearch')) {
history.state.back == route.path storage.remove('isSearch')
&& 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,13 +33,25 @@ Object.keys(asideMap).forEach((key) => {
extraCustomConfig.push(key) extraCustomConfig.push(key)
}) })
function showModal() { function showModal(type: boolean = true) {
show.value = true show.value = type
// //
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)
@ -221,6 +233,19 @@ 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) {
@ -228,7 +253,6 @@ function onCheckAllChange(value) {
ids.push(item.id) ids.push(item.id)
} }
} }
selectIds.value = value ? ids : [] selectIds.value = value ? ids : []
} }
@ -478,7 +502,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="closeModal" @click="showModal(false)"
> >
取消 取消
</n-button> </n-button>

@ -3,7 +3,6 @@ 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({
@ -39,8 +38,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 = [] const mustList: any[] = []
allList?.map((v) => { allList?.forEach((v) => {
const item = { const item = {
name: v.fieldDesc, name: v.fieldDesc,
id: v.name, id: v.name,
@ -73,67 +72,6 @@ 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)
@ -152,10 +90,10 @@ async function handleSumbit(e: MouseEvent) {
const userInfo = userStore.getUserInfo const userInfo = userStore.getUserInfo
let userFieldFixed = '' let userFieldFixed = ''
let userFieldUnFixed = '' let userFieldUnFixed = ''
fixLeftList.value.map((v) => { fixLeftList.value.forEach((v) => {
userFieldFixed += `${v.id},` userFieldFixed += `${v.id},`
}) })
onList.value.map((v) => { onList.value.forEach((v) => {
userFieldUnFixed += `${v.id},` userFieldUnFixed += `${v.id},`
}) })
userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1) userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1)
@ -207,7 +145,7 @@ function onCheckAllChange(value) {
} }
} }
if (value) { if (value) {
offList.value.map((v) => { offList.value.forEach((v) => {
if (!v.checked) if (!v.checked)
onList.value.push(v) onList.value.push(v)
}) })
@ -215,7 +153,7 @@ function onCheckAllChange(value) {
else { else {
onList.value = [] onList.value = []
fixLeftList.value = [] fixLeftList.value = []
offList.value.map((v) => { offList.value.forEach((v) => {
if (v.fix) if (v.fix)
fixLeftList.value.push(v) fixLeftList.value.push(v)
}) })
@ -330,21 +268,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 + fixLeftList.value.length - baseNum > 0 onList.value.length
&& offList.value.length - baseNum + fixLeftList.value.length
> onList.value.length + fixLeftList.value.length - baseNum - offList.value.filter(v => v.fix).length
> 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>
@ -553,8 +491,7 @@ const indeterminate = computed(() => {
.textbtnStyle { .textbtnStyle {
cursor: pointer; cursor: pointer;
color: #507AFD; color: #507afd;
} }
.drag-wrapper { .drag-wrapper {
@ -615,7 +552,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
const modalInst = modal.create({ deleteSelection(id)
title: '确认提示', // const modalInst = modal.create({
content: '确认删除该条过滤条件吗?', // title: "",
positiveText: '确定', // content: "?",
negativeText: '取消', // positiveText: "",
preset: 'dialog', // negativeText: "",
onPositiveClick: () => deleteSelection(id), // preset: "dialog",
onNegativeClick: () => modalInst.destroy(), // onPositiveClick: () => deleteSelection(id),
}) // onNegativeClick: () => modalInst.destroy(),
} // });
} }
function editSelection(id = '') { function editSelection(id = '') {

@ -302,6 +302,7 @@ 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,5 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui' import type {
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,
@ -368,7 +372,10 @@ 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}%` : '',
},
) )
}, },
} }
@ -423,16 +430,6 @@ 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()
}) })
@ -484,22 +481,37 @@ const dialog = useDialog()
const message = useMessage() const message = useMessage()
const finalStore = useFinal() const finalStore = useFinal()
async function query(page: number, pageSize: number, filterId?: any, taskName?: string) { async function query(
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('YYYY/MM/DD') asideParmas.izuptime[0] = dayjs(asideParmas.izuptime[0]).format(
asideParmas.izuptime[1] = dayjs(asideParmas.izuptime[1]).format('YYYY/MM/DD') '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
params = params?.izshowall ? {} : params if (params?.izshowall == false)
params.isFail = false
params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
@ -706,7 +718,10 @@ function validate(items: any[]) {
} }
function goDetail(row) { function goDetail(row) {
router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } }) router.push({
name: 'final-detail',
query: { id: row.id, packageid: row.packageid },
})
} }
function resetHandler() { function resetHandler() {
@ -839,7 +854,9 @@ function reload() {
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!)
} }
@ -880,10 +897,40 @@ 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 else query(pagination.page, pagination.pageSize)
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,
}) })
@ -959,10 +1006,14 @@ 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 style="margin-left: 5px">导出待审数据</span> <SvgIcon size="20" name="download" /><span
style="margin-left: 5px"
>导出待审数据</span>
</li> </li>
<li> <li>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span> <SvgIcon size="20" name="download" /><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,98 +1,103 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref, reactive, unref, computed } from "vue"; import { computed, onMounted, reactive, ref, unref, watch } from 'vue'
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from 'vue-router'
import testImg from "@/assets/images/test.png"; import { chunk } from 'lodash-es'
import { chunk } from "lodash-es"; import { useDialog, useMessage } from 'naive-ui'
import type { RowData } from "@/config/final"; import { RepeatModal, RepeatTaskTableModal } from '../comp'
import { getFinalList } from "@/api/final"; import testImg from '@/assets/images/test.png'
import { useFinal } from "@/store/modules/final"; import type { RowData } from '@/config/final'
import { formatToDateHMS } from "@/utils/dateUtil"; import { getFinalList } from '@/api/final'
import { useMessage, useDialog } from "naive-ui"; import { useFinal } from '@/store/modules/final'
import { audit } from "@/api/task/task"; import { formatToDateHMS } from '@/utils/dateUtil'
import NotPassed from "@/components/Approval/NotPassed.vue"; import { audit } from '@/api/task/task'
import { RepeatModal, RepeatTaskTableModal } from "../comp"; import NotPassed from '@/components/Approval/NotPassed.vue'
const dialog = useDialog();
const message = useMessage(); const emit = defineEmits(['changeShow'])
const router = useRouter(); const dialog = useDialog()
const notPassModalRef = ref(null); // const message = useMessage()
const sortorder = ref("asc"); const router = useRouter()
const sortname = ref("states"); const notPassModalRef = ref(null) //
const loading = ref(true); const sortorder = ref('asc')
const total = ref(0); const sortname = ref('states')
const scrollContainer = ref(null); const loading = ref(true)
const tableData = ref<any>([]); const total = ref(0)
const finalStore = useFinal(); const scrollContainer = ref(null)
const tableData = ref<any>([])
let num = 1; const finalStore = useFinal()
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.map((item) => { tableData.value.forEach((item) => {
if (item.length > 0) { if (item.length > 0) {
item.map((itemx, index) => { item.forEach((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 { }
tableData.value.map((item) => { else {
tableData.value.forEach((item) => {
if (item.length > 0) { if (item.length > 0) {
item.map((itemx, index) => { item.forEach((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.map((item) => { tableData.value.forEach((item) => {
item.map((itemx, index) => { item.forEach((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
params = params?.izshowall ? {} : params; if (params?.izshowall == false)
params.isFail = false
params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
@ -100,40 +105,39 @@ async function initData(
currPage: page, currPage: page,
sortname: sortname.value, sortname: sortname.value,
taskName, taskName,
isFail: true,
...params,
});
const { data, pageCount, totalCount } = result;
console.log(data, pageCount, totalCount);
//tableData.value = tableData.value.concat(data);
tableData.value = data;
console.log(tableData.value);
total.value = totalCount;
pagination.page = page;
pagination.pageCount = Math.ceil(totalCount / pageSize);
loading.value = false;
tableData.value.map((item) => {
item.showcheck = false;
if (isValidTimestamp(item.createdate)) {
item.createdate = formatToDateHMS(item.createdate);
}
});
tableData.value = chunk(tableData.value, 4); ...params,
})
const { data, pageCount, totalCount } = result
console.log(data, pageCount, totalCount)
// tableData.value = tableData.value.concat(data);
tableData.value = data
console.log(tableData.value)
total.value = totalCount
pagination.page = page
pagination.pageCount = Math.ceil(totalCount / pageSize)
loading.value = false
tableData.value.forEach((item) => {
item.showcheck = false
if (isValidTimestamp(item.fromuptime))
item.fromuptime = formatToDateHMS(item.fromuptime)
})
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,
@ -143,151 +147,153 @@ 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);
let newlist = []; const newlist = []
let oldlist = tableData.value; const oldlist = tableData.value
if (oldlist.length > 0) { if (oldlist.length > 0) {
oldlist.map((item) => { oldlist.forEach((item) => {
// console.log(item); // console.log(item);
if (item.length > 0) { if (item.length > 0) {
item.map((itemx: any) => { item.forEach((itemx: any) => {
itemx.showcheck = false; itemx.showcheck = false
newlist.push(itemx); newlist.push(itemx)
}); })
} }
}); })
data.map((item) => { data.forEach((item) => {
item.showcheck = false; item.showcheck = false
newlist.push(item); newlist.push(item)
}); })
} else { }
data.map((item) => { else {
item.showcheck = false; data.forEach((item) => {
newlist.push(item); item.showcheck = false
}); 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.map((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);
} }
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 !isNaN(date.getTime()); // return !Number.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) return "至少选中一个任务"; if (items.length === 0)
return null; return '至少选中一个任务'
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 { }
message.error(res.message); else {
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,
@ -295,126 +301,144 @@ 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) return "至少选中一个任务"; if (items.length === 0)
return null; return '至少选中一个任务'
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);
let newlist = []; const newlist = []
tableData.value.map((itemarr, indexarr) => { tableData.value.forEach((itemarr, indexarr) => {
itemarr.map((itemobj, indexobj) => { itemarr.forEach((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) return; if (!container)
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") { }
sortorder.value = "asc"; else if (sortorder.value == 'desc' && sortnamex == 'submit_date_timestamp') {
sortname.value = "submit_date_timestamp"; sortorder.value = 'asc'
} else if (sortorder.value == "desc" && sortnamex == "similarity_score") { sortname.value = 'submit_date_timestamp'
sortorder.value = "asc"; }
sortname.value = "similarity_score"; else if (sortorder.value == 'desc' && sortnamex == 'similarity_score') {
} else if (sortorder.value == "asc" && sortnamex == "similarity_score") { sortorder.value = 'asc'
sortorder.value = "desc"; sortname.value = 'similarity_score'
sortname.value = "similarity_score"; }
} else if (sortorder.value == "asc" && sortnamex == "field1") { else if (sortorder.value == 'asc' && sortnamex == 'similarity_score') {
sortorder.value = "desc"; sortorder.value = 'desc'
sortname.value = "field1"; sortname.value = 'similarity_score'
} else if (sortorder.value == "desc" && sortnamex == "field1") {
sortorder.value = "asc";
sortname.value = "field1";
} }
initData(1, 20); else if (sortorder.value == 'asc' && sortnamex == 'field1') {
num=1 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>
@ -459,18 +483,17 @@ num=1
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"
@ -484,26 +507,20 @@ num=1
</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" <SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span>
>批量导入数据</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" <SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span>
>查看导入记录</span
>
</li> </li>
</ul> </ul>
</n-popover> </n-popover>
@ -511,21 +528,18 @@ num=1
</div> </div>
<div class="header_data"> <div class="header_data">
<DataHeader :hasColor="true" /> <DataHeader :has-color="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 <span>提报时间排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div> </div>
<div @click="changesort('similarity_score')"> <div @click="changesort('similarity_score')">
<span>相似度排序</span <span>相似度排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div> </div>
<div @click="changesort('field1')"> <div @click="changesort('field1')">
<span>提报人排序</span <span>提报人排序</span><SvgIcon style="margin-left: 6px" name="sort" size="13" />
><SvgIcon style="margin-left: 6px" name="sort" size="13" />
</div> </div>
</div> </div>
<div style="width: 3vw"> <div style="width: 3vw">
@ -538,51 +552,58 @@ num=1
/> />
</div> </div>
</div> </div>
<div class="cotnet_wrapeer" @scroll="checkBottom" ref="scrollContainer"> <div ref="scrollContainer" :class="tableData.length > 4 ? 'cotnet_wrapeer' : 'cotnet_wrapeertwo'" @scroll="checkBottom">
<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;`
" "
></div> @click="goDetail(item)"
<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=" "
@click="handleCheck(item, item.showcheck)"
:checked="item.showcheck" :checked="item.showcheck"
@click="handleCheck(item, item.showcheck)"
/> />
</div> </div>
<div class="content" @click="goDetail(item)"> <div class="content" @click="goDetail(item)">
@ -592,23 +613,23 @@ num=1
</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">
<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'
" "
> >
{{ {{
@ -616,10 +637,10 @@ num=1
? item.states == 3 ? item.states == 3
? "通过" ? "通过"
: item.states == 2 : item.states == 2
? "待审核" ? "待审核"
: item.states == 5 : item.states == 5
? "未通过" ? "未通过"
: "" : ""
: item.fromusername : item.fromusername
}} }}
</div> </div>
@ -627,24 +648,24 @@ num=1
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<!-- <div class="reset_action">重置审批</div>--> <!-- <div class="reset_action">重置审批</div> -->
<div <div
class="resovle_action"
v-show="item.states != 2" v-show="item.states != 2"
class="resovle_action"
@click="goDetail(item)" @click="goDetail(item)"
> >
查看 查看
</div> </div>
<div <div
class="resovle_action"
v-show="item.states == 2" v-show="item.states == 2"
class="resovle_action"
@click="actionHandler({ key: 'approval' }, item)" @click="actionHandler({ key: 'approval' }, item)"
> >
通过 通过
</div> </div>
<div <div
class="reject_action"
v-show="item.states == 2" v-show="item.states == 2"
class="reject_action"
@click="actionHandler({ key: 'reject' }, [item])" @click="actionHandler({ key: 'reject' }, [item])"
> >
不通过 不通过
@ -842,6 +863,7 @@ num=1
// 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;
@ -924,11 +946,42 @@ num=1
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,14 +5,15 @@ 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>
@ -23,10 +24,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 />

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

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

@ -14,7 +14,6 @@ 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'
@ -35,10 +34,11 @@ 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,5 +1,4 @@
<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'
@ -22,7 +21,6 @@ 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'
@ -50,6 +48,8 @@ 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,6 +81,7 @@ 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
@ -249,12 +250,13 @@ 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,
} }
}) })
@ -273,8 +275,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)
} }
@ -296,7 +298,6 @@ 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(
@ -314,7 +315,6 @@ 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,8 +573,9 @@ function refresh(val?: any) {
loadMore() loadMore()
configStore.setTimeNum(0) configStore.setTimeNum(0)
} }
else if (checkTaskStatus.value === 1) { // else if (checkTaskStatus.value === 1) {
} // return;
// }
} }
}) })
} }
@ -722,7 +723,20 @@ 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"
@ -761,7 +775,15 @@ defineExpose({
>{{ item.imgName }}</span> >{{ item.imgName }}</span>
</n-tooltip> </n-tooltip>
</div> </div>
<div class="icon-wrap" @click="previewHandler(index, $event)"> <div
class="icon-wrap"
@click="
($event) => {
previewHandler(index, $event);
hideDownload($event);
}
"
>
<SvgIcon <SvgIcon
size="13" size="13"
name="magnifying-2" name="magnifying-2"
@ -924,6 +946,14 @@ 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;
@ -1015,6 +1045,34 @@ 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,6 +33,7 @@ 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'])
@ -59,6 +60,8 @@ 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,
@ -411,7 +414,7 @@ async function getTableData() {
'拜访项目类别', '拜访项目类别',
] ]
fieldList.map((v) => { fieldList.forEach((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') {
@ -442,6 +445,7 @@ 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
@ -634,6 +638,7 @@ 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
@ -803,20 +808,23 @@ 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"
@ -993,7 +1001,10 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
<div <div
class="img-wrapper" class="img-wrapper"
:style="{ :style="{
'background-image': `url(${item.serverThumbnailUrl})`, // 'background-image': `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl})`,
background: `url(${
item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl
}), url(${bgLoadingImg})`,
}" }"
/> />
<div class="small-mark" /> <div class="small-mark" />
@ -1218,7 +1229,10 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
<div <div
class="img-wrapper" class="img-wrapper"
:style="{ :style="{
'background-image': `url(${item.serverThumbnailUrl})`, // 'background-image': `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl})`,
background: `url(${
item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl
}), url(${bgLoadingImg})`,
}" }"
@mouseover="overTaskHandelr(item)" @mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler" @mouseleave="leaveTaskHandler"

@ -144,6 +144,7 @@ async function fetchList() {
{ {
...pagination, ...pagination,
...sortBy, ...sortBy,
taskNode: taskDetailInfo.value.taskNode,
pictureId: taskDetailInfo.value.ocrPicture.id, pictureId: taskDetailInfo.value.ocrPicture.id,
}, },
) )
@ -254,18 +255,15 @@ 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
@ -408,7 +406,8 @@ const gridHeight = computed(() => {
defineExpose({ defineExpose({
showModal, showModal,
reload,closeModal reload,
closeModal,
}) })
</script> </script>
@ -544,40 +543,39 @@ defineExpose({
:style="{ height: gridHeight }" :style="{ height: gridHeight }"
class="grid-item" class="grid-item"
> >
<n-image <n-image
ref="imageRef" class="img"
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" :src="item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl"
/> />
<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>
<img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt=""> <div v-if="item.submitDateTimestamp" class="time-item time-item2">
<img v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png" alt=""> <SvgIcon class="svg-time" color="#FFF" size="14" name="submit-time" />
<div class="check"> <span>{{ formatToDateHMS(Number(item.submitDateTimestamp) || 0) }}</span>
<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>
<img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt="">
<img v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png" alt="">
<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,7 +459,15 @@ const moreThanSix = computed(() => {
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> <n-button
type="info"
@click="
($event) => {
handleSumbit($event);
getData();
}
"
>
确定 确定
</n-button> </n-button>
<n-button <n-button

@ -305,6 +305,7 @@ 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,5 +1,6 @@
<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,
@ -12,6 +13,7 @@ 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
@ -65,17 +67,20 @@ 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"
@ -103,11 +108,16 @@ function previewHandler(event: MouseEvent) {
/> />
</div> </div>
<div class="check"> <div class="check">
<n-checkbox <!-- <n-checkbox
v-show="batch && taskDetailInfo?.userapprove?.statshis === 1" v-show="batch && taskDetailInfo?.userapprove?.statshis === 1"
v-model:checked="taskDetailInfo?.checked" :checked="taskDetailInfo?.checked"
@click.stop @click.stop
@update:checked="onCheckChange($event, taskDetailInfo)" @update:checked="onCheckChange($event, taskDetailInfo)"
/> -->
<n-checkbox
v-show="batch && taskDetailInfo?.userapprove?.statshis === 1"
:checked="taskDetailInfo?.checked"
@click.stop
/> />
</div> </div>

@ -1,16 +1,4 @@
<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'
@ -28,7 +16,17 @@ 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[]>([])
@ -36,7 +34,12 @@ 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
@ -331,9 +334,7 @@ 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
} }
} }
@ -622,7 +623,10 @@ defineExpose({
<!-- 左侧大图 图片信息 --> <!-- 左侧大图 图片信息 -->
<div <div
class="left" class="left"
:style="{ 'background-image': `url(${taskDetailInfo?.imgurl})` }" :style="{
'background-image': `url(${taskDetailInfo?.imgurl})`,
'flex': imgbigshow ? '0.6' : '1',
}"
@click="previewHandler" @click="previewHandler"
@mouseover="showAction" @mouseover="showAction"
@mouseleave="leaveTaskHandler" @mouseleave="leaveTaskHandler"
@ -727,7 +731,39 @@ 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"
@ -798,7 +834,11 @@ defineExpose({
> >
<div <div
class="img-wrapper" class="img-wrapper"
:style="{ 'background-image': `url(${item.imgurl})` }" :style="{
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