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",
"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,
currPage: page.pageNo,
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) {
return http.request({
@ -82,8 +82,6 @@ export async function removeFiles(params) {
/**
* ()
* @param packageid id
* @param taskchildpictureid id
* @param params
* @returns
*/
@ -94,26 +92,36 @@ export async function getSimilarityList(params: any) {
params,
})
const { data: { records, pages, total } } = res
// 精简一下数据
const list = records.map((item) => {
const { data } = res
if (data) {
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 {
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,
pageCount: pages,
data: records,
total,
}
}
else {
return {
pageCount: 0,
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>
<SvgIcon
size="20"
color="#000000"
name="close-none-border"
class="close_box"
@click="emit('close')"

@ -74,7 +74,9 @@ function goPath(item, id) {
const desiredObject = item.data.find((item) => {
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 } })
emit('close')
}

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

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

@ -33,13 +33,25 @@ Object.keys(asideMap).forEach((key) => {
extraCustomConfig.push(key)
})
function showModal() {
show.value = true
function showModal(type: boolean = true) {
show.value = type
//
const config = finalStore.getSystemConfig
const customConfig = finalStore.getCustomConfig
if (config == null || customConfig == null)
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))
return
const { showList, hideList } = generatList(config, customConfig)
@ -221,6 +233,19 @@ async function handleSumbit(e: MouseEvent) {
function onCheckAllChange(value) {
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) {
if (!item.fix) {
@ -228,7 +253,6 @@ function onCheckAllChange(value) {
ids.push(item.id)
}
}
selectIds.value = value ? ids : []
}
@ -478,7 +502,7 @@ onMounted(() => {
<n-button
secondary
style="margin-left: 15px; border: 1px solid #cad2dd"
@click="closeModal"
@click="showModal(false)"
>
取消
</n-button>

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

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

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

@ -1,5 +1,9 @@
<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 {
computed,
@ -368,7 +372,10 @@ async function formatColumns() {
id: row.id,
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)
onMounted(() => {
// query(pagination.page, pagination.pageSize);
emitter.on('filter-final', refreshHandler)
getColumns()
nextTick(() => {
computeListHeight()
})
})
onBeforeMount(() => {
dicStore.fetchizstatusListt()
})
@ -484,22 +481,37 @@ const dialog = useDialog()
const message = useMessage()
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)
const asideParmas = cloneDeep(unref(finalStore.getAsideValue))
// console.log(asideParmas);
if (asideParmas.izyear) {
asideParmas.izuptime = cloneDeep(asideParmas.izyear)
if (typeof asideParmas.izuptime == 'object') {
asideParmas.izuptime[0] = dayjs(asideParmas.izuptime[0]).format('YYYY/MM/DD')
asideParmas.izuptime[1] = dayjs(asideParmas.izuptime[1]).format('YYYY/MM/DD')
asideParmas.izuptime[0] = dayjs(asideParmas.izuptime[0]).format(
'YYYY/MM/DD',
)
asideParmas.izuptime[1] = dayjs(asideParmas.izuptime[1]).format(
'YYYY/MM/DD',
)
asideParmas.izuptime = asideParmas.izuptime.join('-')
delete asideParmas.izyear
}
}
// 使使
// let params = filterId ? { userSearchId: filterId } : 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({
sortorder: sortorder.value,
@ -706,7 +718,10 @@ function validate(items: any[]) {
}
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() {
@ -839,7 +854,9 @@ function reload() {
selectionIds.value = []
checkedRowKeys.value = []
const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
const { page, pageSize } = unref(
tableRef.value?.pagination,
) as PaginationProps
query(page!, pageSize!)
}
@ -880,10 +897,40 @@ function filterTableData(keyword) {
pagination.pageSize = 10
if (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({
filterTableData,
})
@ -959,10 +1006,14 @@ defineExpose({
<SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span>
</li>
<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>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span>
<SvgIcon size="20" name="download" /><span
style="margin-left: 5px"
>导出全部数据</span>
</li>
<li>
<SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span>

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

@ -5,14 +5,15 @@ import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue'
import Robot from '@/components/Robot/index.vue'
defineOptions({
name: 'FinalMain',
})
const showList = ref(true)
const contentRef: any = ref(null)
const ListRef: any = ref(null)
function inputChange(keyword) {
contentRef.value.filterTableData(keyword)
ListRef.value.initData(keyword)
}
</script>
@ -23,10 +24,10 @@ function inputChange(keyword) {
<!-- 任务管理 -->
<!-- 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 />

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

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

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

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

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

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

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

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

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

@ -1,16 +1,4 @@
<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 { format } from 'date-fns'
import imagesloaded from 'imagesloaded'
@ -28,7 +16,17 @@ import {
} from 'vue'
import PictureInfo from '../components/PictureInfo.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 bgLoading from '@/assets/images/bg-loading.png'
const batch = ref(false) //
const selectItems = ref<any[]>([])
@ -36,7 +34,12 @@ const message = useMessage()
const dialog = useDialog()
const totalCount = ref(0)
let _imagesload: any
const bgLoadingImg = ref(bgLoading)
const imgbigshow = ref(true)
function changeimgbigshow() {
imgbigshow.value = !imgbigshow.value
}
function setBatch(value: boolean) {
if (value && batch.value)
batch.value = !value
@ -331,9 +334,7 @@ function onEsc(event: KeyboardEvent) {
const currentKTime = Date.now()
if (currentKTime - keyXLastTime < 500)
handleRejectMainImage()
else
keyXLastTime = currentKTime
else keyXLastTime = currentKTime
}
}
@ -622,7 +623,10 @@ defineExpose({
<!-- 左侧大图 图片信息 -->
<div
class="left"
:style="{ 'background-image': `url(${taskDetailInfo?.imgurl})` }"
:style="{
'background-image': `url(${taskDetailInfo?.imgurl})`,
'flex': imgbigshow ? '0.6' : '1',
}"
@click="previewHandler"
@mouseover="showAction"
@mouseleave="leaveTaskHandler"
@ -727,7 +731,39 @@ defineExpose({
/>
</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
style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0"
@ -798,7 +834,11 @@ defineExpose({
>
<div
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">

Loading…
Cancel
Save