Merge branch 'test' of https://git.mcnetmart.com/guoxiangbin/ocr-web into fix/suspiciousSort

pull/137/head
raofuzi 1 year ago
commit b25e87f558

@ -119,5 +119,6 @@
<div class="selection-box" style="border: 1px dotted black;position: absolute;display: none;"></div>
<script>var globalThis = window;</script>
<script src="/src/main.ts" type="module"></script>
<script src="https://map.qq.com/api/js?v=2.exp&key=GIABZ-YUQKX-JOI4L-ZAGIS-673KS-NKBMC"></script>
</body>
</html>

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { dateZhCN, zhCN } from "naive-ui";
import { dateZhCN, zhCN,NModalProvider } from "naive-ui";
import { computed, onMounted, nextTick,inject } from "vue";
import { AppProvider } from "@/components/Application";
import { lighten } from "@/utils/index";
@ -59,9 +59,11 @@ const getThemeOverrides = computed(() => {
:date-locale="dateZhCN"
:theme-overrides="getThemeOverrides"
>
<NModalProvider>
<AppProvider>
<RouterView />
</AppProvider>
</NModalProvider>
</NConfigProvider>
</template>
@ -81,4 +83,11 @@ const getThemeOverrides = computed(() => {
::v-deep(.n-base-clear > .n-base-clear__clear){
color: #c9c9c9 !important;
}
.n-form-item.n-form-item--top-labelled .n-form-item-label{
flex-direction: row-reverse !important;
justify-content: flex-end !important;
}
.n-form-item .n-form-item-label .n-form-item-label__asterisk{
transform:rotate(-90deg) !important;
}
</style>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="37px" viewBox="0 0 48 37" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>形状 2</title>
<g id="index" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="index_图片加载中" transform="translate(-893.000000, -298.000000)" fill="#F0F0F0" fill-rule="nonzero">
<g id="编组-24" transform="translate(410.000000, 62.000000)">
<g id="编组-27" transform="translate(16.000000, 132.000000)">
<g id="编组-18备份-2" transform="translate(400.000000, 0.000000)">
<g id="形状-3" transform="translate(67.000000, 104.000000)">
<g id="形状-2" transform="translate(0.000000, 0.462637)">
<path d="M12.8421882,20.0575479 C12.1281936,19.0374348 10.9742024,19.0374348 10.2622078,20.0575479 L0.346282996,34.2309071 C-0.367711589,35.249016 0.0582851799,36.0747264 1.29427581,36.0747264 L46.7139313,36.0747264 C47.9519219,36.0747264 48.3659188,35.2510201 47.6479242,34.2349153 L31.9400434,12.0389379 C31.2160489,11.0168206 30.0540576,11.0208289 29.3340631,12.0389379 L18.2181474,27.7454729 L12.8401882,20.0575479 L12.8421882,20.0575479 Z M6.54623594,4.5093408 C6.54623594,7.00050109 8.50022111,9.0186816 10.9102029,9.0186816 C13.3201846,9.0186816 15.2721698,7.00050109 15.2721698,4.5093408 C15.2721698,2.01818051 13.3221846,0 10.9122029,0 C8.50222115,0 6.54823594,2.01818051 6.54823594,4.5093408 L6.54623594,4.5093408 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>新建</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-664.000000, -3118.000000)">
<g id="新建" transform="translate(664.000000, 3118.000000)">
<g transform="translate(0.000000, 0.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<use id="蒙版" fill="#FFFFFF" fill-rule="nonzero" opacity="0" xlink:href="#path-1"></use>
<g id="编组" mask="url(#mask-2)" fill="#FFFFFF">
<g transform="translate(7.000000, 7.000000)" id="形状结合">
<path d="M48,0 C49.1045695,-2.02906125e-16 50,0.8954305 50,2 L50,22 C50,22.5522847 49.5522847,23 49,23 L46,23 C45.4477153,23 45,22.5522847 45,22 L45,5 L5,5 L5,45 L22,45 C22.5522847,45 23,45.4477153 23,46 L23,49 C23,49.5522847 22.5522847,50 22,50 L2,50 C0.8954305,50 1.3527075e-16,49.1045695 0,48 L0,2 C-1.3527075e-16,0.8954305 0.8954305,2.02906125e-16 2,0 L48,0 Z M40.8724299,28.8483283 C41.4247147,28.8483283 41.8724299,29.2960436 41.8724299,29.8483283 L41.8724299,36.8483283 L48.8724299,36.8483283 C49.4247147,36.8483283 49.8724299,37.2960436 49.8724299,37.8483283 L49.8724299,40.8483283 C49.8724299,41.4006131 49.4247147,41.8483283 48.8724299,41.8483283 L41.8724299,41.8483283 L41.8724299,48.8483283 C41.8724299,49.4006131 41.4247147,49.8483283 40.8724299,49.8483283 L37.8724299,49.8483283 C37.3201452,49.8483283 36.8724299,49.4006131 36.8724299,48.8483283 L36.8724299,41.8483283 L29.8724299,41.8483283 C29.3201452,41.8483283 28.8724299,41.4006131 28.8724299,40.8483283 L28.8724299,37.8483283 C28.8724299,37.2960436 29.3201452,36.8483283 29.8724299,36.8483283 L36.8724299,36.8483283 L36.8724299,29.8483283 C36.8724299,29.2960436 37.3201452,28.8483283 37.8724299,28.8483283 L40.8724299,28.8483283 Z"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>删除</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1984.000000, -3431.000000)">
<g id="删除" transform="translate(1984.000000, 3431.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<use id="蒙版" fill="#000000" fill-rule="nonzero" opacity="0" xlink:href="#path-1"></use>
<path d="M52.9231991,16 C53.4754839,16 53.9231991,16.4477153 53.9231991,17 L53.9231991,20 C53.9231991,20.5522847 53.4754839,21 52.9231991,21 L49.862,21 L46.8906837,54.9640327 C46.8414748,55.5264927 46.5639593,56.0141255 46.1574353,56.3436103 C45.7935798,56.7212522 45.2824394,56.9564221 44.7163722,56.9564221 L19.2763722,56.9564221 C18.8012585,56.9564221 18.3648389,56.7907533 18.0217296,56.5140319 C17.5531495,56.1861769 17.2269494,55.6610416 17.1731938,55.0466129 L14.194,21 L11,21 C10.4477153,21 10,20.5522847 10,20 L10,17 C10,16.4477153 10.4477153,16 11,16 L52.9231991,16 Z M42.134,51.956 L44.843,21 L19.213,21 L21.922,51.956 L42.134,51.956 Z M39,7 C39.5522847,7 40,7.44771525 40,8 L40,11 C40,11.5522847 39.5522847,12 39,12 L25,12 C24.4477153,12 24,11.5522847 24,11 L24,8 C24,7.44771525 24.4477153,7 25,7 L39,7 Z" id="形状结合" fill="#FFFFFF" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,13 +1,13 @@
<template>
<div class="header_wrap">
<div v-for="(item, index) in data" :key="index" class="header_item">
<SvgIcon :name="item.link" />
<SvgIcon :name="item.link"/>
<div class="data_wrap">
<div class="data_title" :style="hasColor?`color:${item.color || ''}`:''">{{ item.count }}</div>
<div class="data_content">{{ item.title }}</div>
</div>
</div>
<SvgIcon size="14px" style="cursor: pointer" name="setting"></SvgIcon>
<SvgIcon size="14px" style="cursor: pointer" name="setting" class="settingSvg"></SvgIcon>
</div>
</template>
@ -77,7 +77,7 @@ const data = [
flex-flow: row nowrap;
align-items: center;
justify-content: space-between;
padding: 1rem 3.125rem;
padding: 1rem 1rem 1rem 3.125rem;
background: #fff;
margin-bottom: 1rem;
@ -93,9 +93,9 @@ const data = [
}
.data_wrap {
.data_title {
font-size: 1.25rem;
font-size: 1.125rem;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
font-weight: Bold;
font-weight: 900;
text-align: left;
color: #202020;
line-height: 1.4375rem;
@ -104,9 +104,9 @@ const data = [
}
.data_content {
opacity: 0.6;
font-size: .875rem;
font-size: .75rem;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
font-weight: 500;
text-align: center;
color: #202020;
line-height: 1rem;
@ -116,4 +116,8 @@ const data = [
}
}
}
.settingSvg{
width: 1rem !important;
height: 1rem !important;
}
</style>

@ -132,7 +132,7 @@ export const asideMap: Recordable<AsideEntity> = {
// 审批添加筛选配置 (左侧)
export const asideTaskMap: Recordable<AsideEntity> = {
izstatus: {
izApprovalStatus: {
label: '审批状态',
defaultValue: null,
isDefaultFilter: true,

@ -0,0 +1,44 @@
import { Layout } from '@/router/constant'
import type { RouteRecordRaw } from 'vue-router'
/**
* @param name , ,
* @param meta
* @param redirect , 访,
* @param meta.disabled
* @param meta.title
* @param meta.icon
* @param meta.keepAlive
* @param meta.sort
*
*/
const routes: Array<RouteRecordRaw> = [
{
path: '/',
name: 'map',
redirect: '/map',
component: Layout,
meta: {
title: '地理位置',
permissions: ['task-main'],
svgname: 'task-approval',
svgsize: 22,
sort: 5,
disabled: true,
hidden: true,
},
children: [
{
path: 'map',
name: 'map-main',
meta: {
title: '地理位置',
},
component: () => import('@/views/map/index.vue'),
},
],
},
]
export default routes

@ -37,7 +37,7 @@ Object.keys(asideMap).forEach((key) => {
if (inFilterList !== false) asideValue[key] = defaultValue;
});
const filterModalRef = ref(null);
const filterModalRef:any = ref(null);
const newFilterModalRef = ref(null);
const customModalRef = ref(null);
const AdvanceFilterRef: any = ref(null);
@ -46,6 +46,15 @@ function showModal(modalRef: any) {
const modal = unref(modalRef)! as any;
modal.showModal();
}
const newFilterOk = () => {
filterModalRef.value.query(
filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize
);
filterModalRef.value.showModal();
};
const mousetrap = inject("mousetrap") as any;
mousetrap.bind("[", collapseHandler);
@ -231,7 +240,7 @@ const handleOk = (item: any) => {
@handleOk="handleOk"
/>
<!-- 新增过滤 -->
<NewFilterModal ref="newFilterModalRef" />
<NewFilterModal ref="newFilterModalRef" @onOk="newFilterOk" />
</n-scrollbar>
</div>
</template>

@ -19,6 +19,11 @@ import Action from "@/views/home/aside/comp/Action.vue";
import { deleteCondition, getConditionList, sort } from "@/api/home/filter";
import type { FilterSearchParam } from "/#/api";
import SvgIcon from "@/components/Icon/SvgIcon.vue";
import { useModal, NButton } from "naive-ui";
const modal = useModal();
defineOptions({ name: "FilterModal" });
const emit = defineEmits<{
@ -74,7 +79,13 @@ const columns: DataTableColumns<RowData> = [
{
title: "创建时间",
key: "createtime",
sorter: (row1, row2) => new Date(row1?.createtime).getTime() - new Date(row2?.createtime).getTime()
renderSorterIcon: ({ order }) => {
if (order === false) return h(SvgIcon, { name: "sort-2" });
if (order === "ascend") return h(SvgIcon, { name: "sort-1" });
if (order === "descend") return h(SvgIcon, { name: "sort-3" });
},
sorter: (row1, row2) =>
new Date(row1?.createtime).getTime() - new Date(row2?.createtime).getTime(),
},
{
title: "更新者",
@ -156,7 +167,16 @@ function select(key: number, id: string) {
editSelection(id);
break;
case 2:
deleteSelection(id);
const modalInst = modal.create({
title: "确认提示",
content: "确认删除该条过滤条件吗?",
positiveText: "确定",
negativeText: "取消",
preset: "dialog",
onPositiveClick: () => deleteSelection(id),
onNegativeClick: () => modalInst.destroy(),
});
break;
default:
break;
@ -188,10 +208,18 @@ function deleteSelection(id = "") {
});
return;
}
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize);
const modalInst = modal.create({
title: "确认提示",
content: "确认删除所选过滤条件吗?",
positiveText: "确定",
negativeText: "取消",
preset: "dialog",
onPositiveClick: () =>
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize);
}),
onNegativeClick: () => modalInst.destroy(),
});
}
@ -213,6 +241,7 @@ async function handlePageSizeChange(currentPageSize) {
function handleClick() {
emit("showNewFilter");
// show.value = false;
closeModal();
}
let sortTable: Sortable | null = null;
@ -280,8 +309,9 @@ function closeModal() {
defineExpose({
showModal,
query,
pagination,
});
const inputHandler = debounce((word) => {
keyword.value = word;
query(1, 5);
@ -294,12 +324,16 @@ const showSearch = computed(() => {
<template>
<div>
<!-- <n-modal v-model:show="delShow" >
</n-modal> -->
<n-modal
v-model:show="show"
transform-origin="center"
display-directive="if"
@after-leave="afterLeave"
:mask-closable="false"
class="modal_wrapper"
>
<n-card
:style="cardStyle"
@ -312,7 +346,14 @@ const showSearch = computed(() => {
<span class="wrapper-title">全部筛选值</span>
<div class="wrapper-bar">
<div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span>
<span
:style="{
'margin-left': '18px',
'font-size': '16px',
'font-weight': '600',
}"
>基本信息</span
>
</div>
</div>
<div class="wrapper-form" v-if="!showSearch">
@ -328,14 +369,14 @@ const showSearch = computed(() => {
<n-button type="info" @click="handleClick">
创建
<template #icon>
<SvgIcon size="14px" name="magnifying-1" />
<SvgIcon size="14px" name="creatFilter" />
</template>
</n-button>
</div>
<div class="wrapper-form" v-else>
<div class="del_btn">
<n-button icon-placement="left" size="medium">
<n-button icon-placement="left" size="medium" @click="deleteSelection">
<template #icon>
<SvgIcon name="delete-history" size="16" />
</template>
@ -409,13 +450,15 @@ const showSearch = computed(() => {
width: 300px;
border: 1px solid gray;
}
.del_btn {
}
.msg {
span {
padding-right: 16px;
}
a {
margin-left: 30px;
padding-left: 17px;
cursor: pointer;
color: #507afd;
border-left: 1px solid #d8d8d8;
}
}
}
@ -444,4 +487,29 @@ const showSearch = computed(() => {
}
}
}
.del_btn {
margin-left: 12px;
color: #333333;
font-weight: 500;
}
::v-deep(.n-button--info-type) {
background: #507afd !important;
}
::v-deep(.n-data-table
.n-data-table-th
.n-data-table-th__title-wrapper
.n-data-table-th__title) {
font-size: 14px !important;
color: #000000 !important;
}
::v-deep(.n-data-table
.n-data-table-tr:not(.n-data-table-tr--summary):hover
> .n-data-table-td) {
color: #666666 !important;
font-size: 14px !important;
}
::v-deep(.n-data-table .n-data-table-th .n-data-table-sorter) {
position: relative;
left: -80px;
}
</style>

@ -1,105 +1,108 @@
<script lang="ts" setup>
import type { FormInst, FormItemRule, FormRules } from 'naive-ui'
import { computed, onBeforeMount, reactive, ref, unref, watch } from 'vue'
import { asideMap } from '@/config/final'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import type { FilterCondition } from '/#/api'
import { addCondition, updateCondition } from '@/api/home/filter'
import { formatToDate2, formatToDate3 } from '@/utils/dateUtil'
type Status = 'edit' | 'new'
const show = ref(false)
const configStore = useConfig()
const dicStore = useDictionary()
const currentStatus = ref<Status>('new')
let currentEditId: string | null = null
import type { FormInst, FormItemRule, FormRules } from "naive-ui";
import { computed, onBeforeMount, reactive, ref, unref, watch, defineEmits } from "vue";
import { asideMap } from "@/config/final";
import { useDictionary } from "@/store/modules/dictonary";
import { useConfig } from "@/store/modules/asideConfig";
import type { FilterCondition } from "/#/api";
import { addCondition, updateCondition } from "@/api/home/filter";
import { formatToDate2, formatToDate3 } from "@/utils/dateUtil";
type Status = "edit" | "new";
const emit = defineEmits(["onOk"]);
const show = ref(false);
const configStore = useConfig();
const dicStore = useDictionary();
const currentStatus = ref<Status>("new");
let currentEditId: string | null = null;
const modalTitle = computed(() => {
return currentStatus.value === 'new' ? '新建过滤条件' : '编辑过滤条件'
})
return currentStatus.value === "new" ? "新建过滤条件" : "编辑过滤条件";
});
const cardStyle = {
'width': '800px',
'--n-padding-bottom': '10px',
'--n-padding-left': '10px',
}
width: "800px",
"--n-padding-bottom": "10px",
"--n-padding-left": "10px",
};
const noBorderInput = {
'--n-border': '0px',
'--n-border-hover': '0px',
'--n-border-pressed': '0px',
}
"--n-border": "0px",
"--n-border-hover": "0px",
"--n-border-pressed": "0px",
};
const formItemStyle = {
'--n-label-height': '0px',
'--n-feedback-height': '8px',
}
"--n-label-height": "0px",
"--n-feedback-height": "8px",
};
interface FormType {
name: string | null
logic: string | null
conditions: Condition[]
name: string | null;
logic: string | null;
conditions: Condition[];
}
interface Condition {
type: string | null
operator: string | null
result: any
type: string | null;
operator: string | null;
result: any;
}
interface Option {
label: string
value: string
label: string;
value: string;
}
const rules: FormRules = {
name: {
required: true,
message: '请输入过滤条件名称',
trigger: 'blur',
message: "请输入过滤条件名称",
trigger: "blur",
},
logic: {
required: true,
message: '请选择逻辑关系',
trigger: 'blur',
message: "请选择逻辑关系",
trigger: "blur",
},
conditions: {
required: true,
validator(rule: FormItemRule, value: Condition[]) {
for (const item of value) {
const { type, operator, result } = item
const { type, operator, result } = item;
if (type === null || operator === null || result === null)
return new Error('请选择过滤条件')
return new Error("请选择过滤条件");
}
return true
return true;
},
trigger: ['input', 'blur'],
trigger: ["input", "blur"],
},
}
};
const formRef = ref<FormInst | null>(null)
const formRef = ref<FormInst | null>(null);
const formValue = reactive<FormType>({
name: null,
logic: 'and',
conditions: [{
type: null,
operator: 'eq',
result: null,
}],
})
logic: "and",
conditions: [
{
type: null,
operator: "eq",
result: null,
},
],
});
function handleSumbit(e: MouseEvent) {
e.preventDefault()
e.preventDefault();
formRef.value?.validate((errors) => {
if (errors)
return
if (errors) return;
const list = formValue.conditions.map((item, index) => {
const { type, operator, result } = item
const { type, operator, result } = item;
return {
searchfield: type!,
@ -107,193 +110,246 @@ function handleSumbit(e: MouseEvent) {
searchvalue: formatValue(type!, result),
searchRelationType: formValue.logic!,
orderNum: index + 1,
}
})
};
});
const param: FilterCondition = {
searchname: formValue.name!,
type: 1,
ocrUsersearchchildList: list,
}
};
if (currentStatus.value === 'new')
addCondition(param)
else
updateCondition({ id: currentEditId!, ...param })
closeModal()
})
if (currentStatus.value === "new") addCondition(param);
else updateCondition({ id: currentEditId!, ...param });
closeModal();
});
}
function formatValue(searchfield: string, searchvalue: any) {
if (searchfield === 'izuptime') {
const start = formatToDate2(searchvalue[0])
const end = formatToDate2(searchvalue[1])
return `${start}-${end}`
if (searchfield === "izuptime") {
const start = formatToDate2(searchvalue[0]);
const end = formatToDate2(searchvalue[1]);
return `${start}-${end}`;
}
return searchvalue
return searchvalue;
}
//
function unformatValue(searchfield: string, searchvalue: any) {
// 2022/01/03-2023/02/04
if (searchfield === 'izuptime') {
const dataStrs = searchvalue.split('-')
const start = formatToDate3(dataStrs[0])
const end = formatToDate3(dataStrs[1])
return [start, end]
if (searchfield === "izuptime") {
const dataStrs = searchvalue.split("-");
const start = formatToDate3(dataStrs[0]);
const end = formatToDate3(dataStrs[1]);
return [start, end];
}
return searchvalue
return searchvalue;
}
function createCondition() {
formValue.conditions.push({
type: null,
operator: 'eq',
operator: "eq",
result: null,
})
});
}
function removeCondition(index: number) {
formValue.conditions.splice(index, 1)
formValue.conditions.splice(index, 1);
}
function formLabel(index: number) {
return index === 0 ? '筛选条件' : ''
return index === 0 ? "筛选条件" : "";
}
const typeOptions = ref<Option[]>([])
const typeOptions = ref<Option[]>([]);
const operatorOptions = [
{
label: '等于',
value: 'eq',
label: "等于",
value: "eq",
},
{
label: '不等于',
value: 'notEq',
label: "不等于",
value: "notEq",
},
]
];
const logicOptions = ref([])
const logicOptions = ref([]);
onBeforeMount(() => {
dicStore.fetchRelationTypeList()
})
dicStore.fetchRelationTypeList();
});
watch(() => dicStore.relationTypeList, (newval) => {
logicOptions.value = newval
})
watch(
() => dicStore.relationTypeList,
(newval) => {
logicOptions.value = newval;
}
);
function showModal() {
show.value = true
show.value = true;
}
function closeModal() {
show.value = false
emit("onOk");
setTimeout(() => {
show.value = false;
}, 300);
}
function generateAllData(): Option[] {
const initVal: Option[] = []
const initVal: Option[] = [];
const list = Object.keys(asideMap).reduce((acc, value) => {
if (value.startsWith('iz') && asideMap[value]?.inFilterList !== false) {
const name = asideMap[value]?.label
name && acc.push({
value,
label: name || '未配置',
})
if (value.startsWith("iz") && asideMap[value]?.inFilterList !== false) {
const name = asideMap[value]?.label;
name &&
acc.push({
value,
label: name || "未配置",
});
}
return acc
}, initVal)
return acc;
}, initVal);
return list
return list;
}
typeOptions.value = generateAllData()
typeOptions.value = generateAllData();
function getOptions(key: string) {
const getterName = `get${key}`
const options = unref(dicStore[getterName])
return options || []
const getterName = `get${key}`;
const options = unref(dicStore[getterName]);
return options || [];
}
function leaveHandler() {
currentStatus.value = 'new'
currentEditId = null
currentStatus.value = "new";
currentEditId = null;
formValue.name = null
formValue.name = null;
formValue.conditions = [
{
type: null,
operator: 'eq',
operator: "eq",
result: null,
},
]
];
}
function edit(editFilter: any) {
currentStatus.value = 'edit'
currentStatus.value = "edit";
const { searchname, ocrUsersearchchildList, id } = editFilter
currentEditId = id
formValue.name = searchname
const { searchname, ocrUsersearchchildList, id } = editFilter;
currentEditId = id;
formValue.name = searchname;
formValue.conditions = ocrUsersearchchildList.map((item) => {
return {
type: item.searchfield,
operator: item.searchtype,
result: unformatValue(item.searchfield, item.searchvalue),
}
})
};
});
}
defineExpose({
showModal,
edit,
})
});
</script>
<template>
<n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler" :mask-closable="false">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<n-modal
v-model:show="show"
transform-origin="center"
@after-leave="leaveHandler"
:mask-closable="false"
>
<n-card
:style="cardStyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<div class="wrapper">
<span class="wrapper-title">{{ modalTitle }}</span>
<div class="wrapper-bar">
<div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span>
<span
:style="{
'margin-left': '18px',
'font-size': '16px',
'font-weight': '600',
}"
>基本信息</span
>
</div>
</div>
<div class="wrapper-form">
<n-form ref="formRef" :model="formValue" :rules="rules">
<n-form-item path="name" label="标题">
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
<n-input
v-model:value="formValue.name"
:style="{ width: '780px' }"
@keydown.enter.prevent
placeholder="请输入过滤名称"
/>
</n-form-item>
<n-form-item path="logic" label="逻辑关系" v-show="false">
<n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" />
<n-select
filterable
v-model:value="formValue.logic"
placeholder="请选择逻辑关系"
:options="logicOptions"
/>
</n-form-item>
<n-form-item
v-for="(item, index) in formValue.conditions" :key="index" :style="formItemStyle"
path="conditions" :label="formLabel(index)"
v-for="(item, index) in formValue.conditions"
:key="index"
:style="formItemStyle"
path="conditions"
:label="formLabel(index)"
>
<n-select filterable
v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions"
<n-select
filterable
v-model:value="item.type"
placeholder="请选择筛选项名称"
:options="typeOptions"
@change="item.result = ''"
/>
<n-select filterable
v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择"
<n-select
filterable
v-model:value="item.operator"
style="margin-left: 8px"
placeholder="请选择"
:options="operatorOptions"
/>
<n-space v-if="item.type === 'izuptime'">
<n-date-picker
v-model:value="item.result" style="margin-left: 8px;width: 240px;" type="daterange"
v-model:value="item.result"
style="margin-left: 8px; width: 240px"
type="daterange"
clearable
/>
</n-space>
<n-select filterable
v-else v-model:value="item.result" style="margin-left: 8px;" placeholder="请选择" :options="getOptions(item.type!)"
<n-select
filterable
v-else
v-model:value="item.result"
style="margin-left: 8px"
placeholder="请选择"
:options="getOptions(item.type!)"
/>
<n-button :style="noBorderInput" icon-placement="right" @click="removeCondition(index)">
<n-button
:style="noBorderInput"
icon-placement="right"
@click="removeCondition(index)"
>
<template #icon>
<SvgIcon size="24" name="close" />
</template>
@ -302,16 +358,14 @@ defineExpose({
</n-form>
</div>
<div class="wrapper-new" @click="createCondition">
<span>+</span>
<span style="margin-left:8px">添加筛选条件</span>
<span style="font-size:16px;">+</span>
<span style="margin-left: 8px">添加筛选条件</span>
</div>
</div>
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="handleSumbit">
确定
</n-button>
<n-button secondary style="margin-left:15px" @click="closeModal">
<n-button type="info" @click="handleSumbit"> </n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal">
取消
</n-button>
</div>
@ -327,19 +381,22 @@ defineExpose({
&-title {
font-weight: bold;
font-size: 16px;
font-size: 18px;
color: #333333;
}
&-bar {
background-color: #e8e8e8;
width: 100%;
margin-top: 20px;
margin-top: 27px;
font-size: 16px;
color: #333333;
}
&-form {
display: flex;
justify-content: space-between;
margin-top: 20px;
margin-top: 24px;
}
&-new {
@ -348,6 +405,9 @@ defineExpose({
color: #507afd;
line-height: 22px;
cursor: pointer;
span{
font-size: 11px;
}
&:hover {
color: #507aac;
@ -361,6 +421,7 @@ defineExpose({
&-footer {
display: flex;
justify-content: flex-end;
margin-bottom:6px;
}
&-info {
@ -368,7 +429,7 @@ defineExpose({
position: relative;
&:before {
background-color: #1980FF;
background-color: #1980ff;
content: "";
width: 5px;
border-radius: 2px;
@ -378,4 +439,9 @@ defineExpose({
}
}
}
::v-deep(.n-form-item .n-form-item-label){
font-size:14px;
color: #666666;
font-weight: 500;
}
</style>

@ -489,7 +489,7 @@ async function query(page: number, pageSize: number, filterId?: any, taskName?:
const asideParmas = unref(finalStore.getAsideValue)
// 使使
let params = filterId ? { userSearchId: filterId } : asideParmas
params = params.izshowall ? {} : params
params = params?.izshowall ? {} : params
const result = await getFinalList({
sortorder: sortorder.value,
pageSize,

@ -207,6 +207,7 @@ const newFilterOk = () => {
filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize
);
filterModalRef.value.showModal();
};
// key

@ -277,7 +277,7 @@ defineExpose({
>
<template #trigger>
<div class="wrapper-left-dropdown" @click="showClick">
<span style="font-size: 20px; color: #333333; font-weight: Medium">{{
<span style="font-size: 20px; color: #333333; font-weight: Medium;font-size:17px;font-weight:600">{{
currentlySelectedAdvanced
}}</span>
<SvgIcon
@ -418,6 +418,8 @@ defineExpose({
width: 100%;
padding: 12px 16px;
border-bottom: 1px solid #e8e8e8;
z-index: 10;
background: #ffffff;
&-left {
display: flex;
@ -455,6 +457,8 @@ defineExpose({
line-height: 22px;
padding: 8px 12px;
&:hover {
background-color: #f3f8ff;
}

@ -106,7 +106,7 @@ const handleDrop = async (e) => {
<div v-show="figureHovered" class="wrapper-figure-tools">
<SvgIcon size="28" name="view" @click="previewHandler" />
<div class="wrapper-figure-line" />
<SvgIcon size="28" name="delete" @click="clearHandler" />
<SvgIcon size="28" name="white_delete" @click="clearHandler" />
</div>
</div>
</n-upload-dragger>

@ -56,7 +56,7 @@ onMounted(() => {
<n-collapse :default-expanded-names="['1']" arrow-placement="right">
<n-collapse-item :title="label" name="1">
<n-space>
<n-date-picker v-model:value="time" type="daterange" clearable @update:value="onChange">
<n-date-picker v-model:value="time" type="daterange" :clearable="false" @update:value="onChange">
<template #separator>
</template>
@ -78,5 +78,16 @@ onMounted(() => {
::v-deep(.n-input__separator) {
color: #999999 !important;
;
}</style>
}
::v-deep(.n-collapse .n-collapse-item:not(.n-collapse-item--disabled).n-collapse-item--trigger-area-main .n-collapse-item__header .n-collapse-item__header-main){
margin-left: 10px;
}
::v-deep(.n-collapse .n-collapse-item:not(.n-collapse-item--disabled).n-collapse-item--trigger-area-main .n-collapse-item__header .n-collapse-item__header-main::before){
content: '*';
position: absolute;
left: 0;
top: 2px;
color: red;
}
</style>

@ -18,6 +18,10 @@ import Action from "../Action.vue";
import { deleteCondition, getConditionList, sort } from "@/api/home/filter";
import type { FilterSearchParam } from "/#/api";
import selection from "naive-ui/es/_internal/selection";
import SvgIcon from "@/components/Icon/SvgIcon.vue";
import { useModal } from "naive-ui";
const modal = useModal();
defineOptions({ name: "FilterModal" });
const $message = window["$message"];
@ -106,6 +110,11 @@ const columns: DataTableColumns<RowData> = [
title: "创建时间",
key: "createtime",
width: 180,
renderSorterIcon: ({ order }) => {
if (order === false) return h(SvgIcon, { name: "sort-2" });
if (order === "ascend") return h(SvgIcon, { name: "sort-1" });
if (order === "descend") return h(SvgIcon, { name: "sort-3" });
},
sorter: (row1, row2) => {
// tableData.value.sort(
// (a, b) => new Date(a?.createtime).getTime() - new Date(b?.createtime).getTime()
@ -197,7 +206,15 @@ function select(key: number, id: string) {
editSelection(id);
break;
case 2:
deleteSelection(id);
const modalInst = modal.create({
title: "确认提示",
content: "确认删除该条过滤条件吗?",
positiveText: "确定",
negativeText: "取消",
preset: "dialog",
onPositiveClick: () => deleteSelection(id),
onNegativeClick: () => modalInst.destroy(),
});
break;
default:
break;
@ -216,7 +233,7 @@ function editSelection(id) {
});
emit("editFilter", selectedFilter);
// closeModal();
closeModal();
}
function deleteSelection(id = "") {
@ -226,10 +243,18 @@ function deleteSelection(id = "") {
});
return;
}
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize);
const modalInst = modal.create({
title: "确认提示",
content: "确认删除所选过滤条件吗?",
positiveText: "确定",
negativeText: "取消",
preset: "dialog",
onPositiveClick: () =>
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize);
}),
onNegativeClick: () => modalInst.destroy(),
});
}
@ -250,7 +275,7 @@ async function handlePageSizeChange(currentPageSize) {
function handleClick() {
emit("showNewFilter");
// show.value = false;
closeModal();
}
let sortTable: Sortable | null = null;
@ -333,7 +358,7 @@ const handleOk = () => {
}
if (selectionIds.value.length == 1) {
const selectedId = selectionIds.value[0];
let item = tableData.value.find(v=>v.id == selectedId);
let item = tableData.value.find((v) => v.id == selectedId);
emit("handleOk", item);
}
if (selectionIds.value.length == 0) {
@ -351,6 +376,7 @@ const handleOk = () => {
display-directive="if"
@after-leave="afterLeave"
:mask-closable="false"
class="modal_wrapper"
>
<n-card
:style="cardStyle"
@ -364,7 +390,11 @@ const handleOk = () => {
<div class="wrapper-bar">
<div class="wrapper-info">
<span
:style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }"
:style="{
'margin-left': '18px',
'font-size': '16px',
'font-weight': '600',
}"
class="wrapper-info-title"
>基本信息</span
>
@ -384,7 +414,7 @@ const handleOk = () => {
<n-button type="info" @click="handleClick">
创建
<template #icon>
<SvgIcon size="14px" name="magnifying-1" />
<SvgIcon size="14px" name="creatFilter" />
</template>
</n-button>
</div>
@ -471,6 +501,17 @@ const handleOk = () => {
width: 300px;
border: 1px solid gray;
}
.msg {
span {
padding-right: 16px;
}
a {
padding-left: 17px;
cursor: pointer;
color: #507afd;
border-left: 1px solid #d8d8d8;
}
}
}
&-table {
@ -506,6 +547,12 @@ const handleOk = () => {
}
}
}
.del_btn {
margin-left: 12px;
color: #333333;
font-weight: 500;
}
::v-deep(.n-data-table .n-data-table-th) {
font-weight: bold !important;
}
@ -516,4 +563,24 @@ const handleOk = () => {
background-color: #fff;
border: 1px solid #cad2dd !important;
}
::v-deep(.n-button--info-type) {
background: #507afd !important;
}
::v-deep(.n-data-table
.n-data-table-th
.n-data-table-th__title-wrapper
.n-data-table-th__title) {
font-size: 14px !important;
color: #000000 !important;
}
::v-deep(.n-data-table
.n-data-table-tr:not(.n-data-table-tr--summary):hover
> .n-data-table-td) {
color: #666666 !important;
font-size: 14px !important;
}
::v-deep(.n-data-table .n-data-table-th .n-data-table-sorter) {
position: relative;
left: -80px;
}
</style>

@ -1,107 +1,106 @@
<script lang="ts" setup>
import type { FormInst, FormItemRule, FormRules } from 'naive-ui'
import { computed, defineOptions, onBeforeMount, reactive, ref, unref, watch } from 'vue'
import { asideMap } from '@/config/aside'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import type { FilterCondition } from '/#/api'
import { addCondition, updateCondition } from '@/api/home/filter'
import { formatToDate2, formatToDate3 } from '@/utils/dateUtil'
type Status = 'edit' | 'new'
const emit = defineEmits(['onOk'])
const show = ref(false)
const configStore = useConfig()
const dicStore = useDictionary()
const currentStatus = ref<Status>('new')
let currentEditId: string | null = null
import type { FormInst, FormItemRule, FormRules } from "naive-ui";
import { computed, defineOptions, onBeforeMount, reactive, ref, unref, watch } from "vue";
import { asideMap } from "@/config/aside";
import { useDictionary } from "@/store/modules/dictonary";
import { useConfig } from "@/store/modules/asideConfig";
import type { FilterCondition } from "/#/api";
import { addCondition, updateCondition } from "@/api/home/filter";
import { formatToDate2, formatToDate3 } from "@/utils/dateUtil";
type Status = "edit" | "new";
const emit = defineEmits(["onOk"]);
const show = ref(false);
const configStore = useConfig();
const dicStore = useDictionary();
const currentStatus = ref<Status>("new");
let currentEditId: string | null = null;
const modalTitle = computed(() => {
return currentStatus.value === 'new' ? '新建过滤条件' : '编辑过滤条件'
})
return currentStatus.value === "new" ? "新建过滤条件" : "编辑过滤条件";
});
const cardStyle = {
'width': '800px',
'--n-padding-bottom': '10px',
'--n-padding-left': '10px',
}
width: "800px",
"--n-padding-bottom": "10px",
"--n-padding-left": "10px",
};
const noBorderInput = {
'--n-border': '0px',
'--n-border-hover': '0px',
'--n-border-pressed': '0px',
}
"--n-border": "0px",
"--n-border-hover": "0px",
"--n-border-pressed": "0px",
};
const formItemStyle = {
'--n-label-height': '0px',
'--n-feedback-height': '8px',
}
"--n-label-height": "0px",
"--n-feedback-height": "8px",
};
interface FormType {
name: string | null
logic: string | null
conditions: Condition[]
name: string | null;
logic: string | null;
conditions: Condition[];
}
interface Condition {
type: string | null
operator: string | null
result: any
type: string | null;
operator: string | null;
result: any;
}
interface Option {
label: string
value: string
label: string;
value: string;
}
const rules: FormRules = {
name: {
required: true,
message: '请输入过滤条件名称',
trigger: 'blur',
message: "请输入过滤条件名称",
trigger: "blur",
},
logic: {
required: true,
message: '请选择逻辑关系',
trigger: 'blur',
message: "请选择逻辑关系",
trigger: "blur",
},
conditions: {
required: true,
validator(rule: FormItemRule, value: Condition[]) {
for (const item of value) {
const { type, operator, result } = item
const { type, operator, result } = item;
if (type === null || operator === null || result === null)
return new Error('请选择过滤条件')
return new Error("请选择过滤条件");
}
return true
return true;
},
trigger: ['input', 'blur'],
trigger: ["input", "blur"],
},
}
};
const formRef = ref<FormInst | null>(null)
const formRef = ref<FormInst | null>(null);
const formValue = reactive<FormType>({
name: null,
logic: 'and',
logic: "and",
conditions: [
{
type: null,
operator: 'eq',
operator: "eq",
result: null,
},
],
})
});
function handleSumbit(e: MouseEvent) {
e.preventDefault()
e.preventDefault();
formRef.value?.validate((errors) => {
if (errors)
return
if (errors) return;
const list = formValue.conditions.map((item, index) => {
const { type, operator, result } = item
const { type, operator, result } = item;
return {
searchfield: type!,
@ -109,151 +108,149 @@ function handleSumbit(e: MouseEvent) {
searchvalue: formatValue(type!, result),
searchRelationType: formValue.logic!,
orderNum: index + 1,
}
})
};
});
const param: FilterCondition = {
searchname: formValue.name!,
type: 0,
ocrUsersearchchildList: list,
}
};
if (currentStatus.value === 'new')
addCondition(param)
else updateCondition({ id: currentEditId!, ...param })
emit('onOk')
setTimeout(() => {
closeModal()
}, 300)
})
if (currentStatus.value === "new") addCondition(param);
else updateCondition({ id: currentEditId!, ...param });
closeModal();
});
}
//
function formatValue(searchfield: string, searchvalue: any) {
if (searchfield === 'izyear') {
const start = formatToDate2(searchvalue[0])
const end = formatToDate2(searchvalue[1])
return `${start}-${end}`
if (searchfield === "izyear") {
const start = formatToDate2(searchvalue[0]);
const end = formatToDate2(searchvalue[1]);
return `${start}-${end}`;
}
if (searchfield === 'izsimilarity' && Array.isArray(searchvalue))
return searchvalue.join(',')
if (searchfield === "izsimilarity" && Array.isArray(searchvalue))
return searchvalue.join(",");
return searchvalue
return searchvalue;
}
//
function unformatValue(searchfield: string, searchvalue: any) {
// 2022/01/03-2023/02/04
if (searchfield === 'izyear') {
const dataStrs = searchvalue.split('-')
const start = formatToDate3(dataStrs[0])
const end = formatToDate3(dataStrs[1])
return [start, end]
if (searchfield === "izyear") {
const dataStrs = searchvalue.split("-");
const start = formatToDate3(dataStrs[0]);
const end = formatToDate3(dataStrs[1]);
return [start, end];
}
// 80,90
// if (searchfield === "izsimilarity") return searchvalue.split(",");
return searchvalue
return searchvalue;
}
function createCondition() {
formValue.conditions.push({
type: null,
operator: 'eq',
operator: "eq",
result: null,
})
});
}
function removeCondition(index: number) {
formValue.conditions.splice(index, 1)
formValue.conditions.splice(index, 1);
}
function formLabel(index: number) {
return index === 0 ? '筛选条件' : ''
return index === 0 ? "筛选条件" : "";
}
const typeOptions = ref<Option[]>([])
const typeOptions = ref<Option[]>([]);
const operatorOptions = [
{
label: '等于',
value: 'eq',
label: "等于",
value: "eq",
},
{
label: '不等于',
value: 'notEq',
label: "不等于",
value: "notEq",
},
]
];
const logicOptions = ref([])
const logicOptions = ref([]);
const similarityOptions = [
{
label: "80%-90%",
value: '80,90',
value: "80,90",
},
{
label: "95%-100%",
value: '95,100',
value: "95,100",
},
{
label: "100%-100%",
value: '100,100',
value: "100,100",
},
]
];
onBeforeMount(() => {
dicStore.fetchRelationTypeList()
})
dicStore.fetchRelationTypeList();
});
watch(
() => dicStore.relationTypeList,
(newval) => {
logicOptions.value = newval
},
)
logicOptions.value = newval;
}
);
function showModal() {
const list = generateAllData(configStore.systemConfig)
typeOptions.value = list
show.value = true
const list = generateAllData(configStore.systemConfig);
typeOptions.value = list;
show.value = true;
}
function closeModal() {
show.value = false
emit("onOk");
setTimeout(() => {
show.value = false;
}, 300);
}
function generateAllData(config): Option[] {
const initVal: Option[] = []
const initVal: Option[] = [];
const list = Object.keys(config).reduce((acc, value) => {
if (value.startsWith('iz') && asideMap[value]?.inFilterList !== false) {
const name = asideMap[value]?.label
name
&& acc.push({
value,
label: name || '未配置',
})
if (value.startsWith("iz") && asideMap[value]?.inFilterList !== false) {
const name = asideMap[value]?.label;
name &&
acc.push({
value,
label: name || "未配置",
});
}
return acc
}, initVal)
return acc;
}, initVal);
return list
return list;
}
watch(
() => configStore.systemConfig,
(newVal) => {
if (!newVal)
return
if (!newVal) return;
const list = generateAllData(newVal)
typeOptions.value = list
},
)
const list = generateAllData(newVal);
typeOptions.value = list;
}
);
function getOptions(key: string) {
if (key === "izsimilarity") return similarityOptions;
@ -263,22 +260,22 @@ function getOptions(key: string) {
}
function leaveHandler() {
currentStatus.value = 'new'
currentEditId = null
currentStatus.value = "new";
currentEditId = null;
formValue.name = null
formValue.name = null;
formValue.conditions = [
{
type: null,
operator: 'eq',
operator: "eq",
result: null,
},
]
];
}
function edit(editFilter: any) {
currentStatus.value = "edit";
console.log(editFilter,'editFilter')
console.log(editFilter, "editFilter");
const { searchname, ocrUsersearchchildList, id } = editFilter;
currentEditId = id;
formValue.name = searchname;
@ -287,18 +284,24 @@ function edit(editFilter: any) {
type: item.searchfield,
operator: item.searchtype,
result: unformatValue(item.searchfield, item.searchvalue),
}
})
};
});
}
defineExpose({
showModal,
edit,
})
});
</script>
<template>
<n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler" :mask-closable="false">
<n-modal
v-model:show="show"
transform-origin="center"
@after-leave="leaveHandler"
:mask-closable="false"
class="modal_wrapper"
>
<n-card
:style="cardStyle"
:bordered="false"
@ -310,18 +313,26 @@ defineExpose({
<span class="wrapper-title">{{ modalTitle }}</span>
<div class="wrapper-bar">
<div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span>
<span
:style="{
'margin-left': '18px',
'font-size': '16px',
'font-weight': '600',
}"
>基本信息</span
>
</div>
</div>
<div class="wrapper-form">
<n-form ref="formRef" :model="formValue" :rules="rules">
<n-form-item path="name" label="标题">
<n-form ref="formRef" :model="formValue" :rules="rules" >
<n-form-item path="name" label="标题" mergedRequireMarkPlacement="left">
<!-- j -->
<n-input
v-model:value="formValue.name"
:style="{ width: '780px' }"
maxlength="15"
@keydown.enter.prevent
placeholder="请输入过滤名称"
/>
</n-form-item>
<n-form-item v-show="false" path="logic" label="逻辑关系">
@ -377,33 +388,71 @@ defineExpose({
<template #icon>
<!-- <SvgIcon size="24" name="close" color="#F00"/>
-->
<svg width="24px" height="24px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>清除</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-3040.000000, -3118.000000)" fill-rule="nonzero">
<g id="清除" transform="translate(3040.000000, 3118.000000)">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="64" height="64"></rect>
<path d="M32,4 C16.5619675,4 4,16.5600322 4,32 C4,47.4399678 16.5600322,60 32,60 C47.4380325,60 60,47.4399678 60,32 C60,16.5600322 47.4399678,4 32,4 Z M43.4220132,40.6240021 C44.2020159,41.4079827 44.1999731,42.6720064 43.4180353,43.4520091 C43.0280877,43.8400215 42.5180487,44.0360166 42.0060745,44.0360166 C41.4920576,44.0360166 40.9800834,43.8400214 40.5900283,43.4480311 L31.9900014,34.8219862 L23.3620213,43.3580432 C22.9720737,43.7420776 22.4639699,43.9360301 21.9559737,43.9360301 C21.4400215,43.9360301 20.9260046,43.7379922 20.5340143,43.3420239 C19.7579895,42.5560005 19.7640102,41.2919768 20.5500336,40.5140169 L29.1680151,31.9900013 L20.5819648,23.3759978 C19.8019621,22.5939524 19.8040049,21.3279935 20.5859428,20.5479908 C21.3679882,19.7659454 22.6319043,19.7700309 23.4139498,20.5519687 L32.0119339,29.1759709 L40.639914,20.6400214 C41.4238946,19.8620614 42.6918962,19.8700173 43.467921,20.6560407 C44.2458809,21.4420641 44.2379251,22.708023 43.4519016,23.4840477 L34.8340277,32.0079559 L43.4220132,40.6240021 Z" id="形状" fill="#DDDDDD"></path>
</g>
</g>
</g>
</svg>
<svg
width="24px"
height="24px"
viewBox="0 0 64 64"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<title>清除</title>
<g
id="页面-1"
stroke="none"
stroke-width="1"
fill="none"
fill-rule="evenodd"
>
<g
id="PrevailCloud-Design-图标集"
transform="translate(-3040.000000, -3118.000000)"
fill-rule="nonzero"
>
<g id="清除" transform="translate(3040.000000, 3118.000000)">
<rect
id="矩形"
fill="#000000"
opacity="0"
x="0"
y="0"
width="64"
height="64"
></rect>
<path
d="M32,4 C16.5619675,4 4,16.5600322 4,32 C4,47.4399678 16.5600322,60 32,60 C47.4380325,60 60,47.4399678 60,32 C60,16.5600322 47.4399678,4 32,4 Z M43.4220132,40.6240021 C44.2020159,41.4079827 44.1999731,42.6720064 43.4180353,43.4520091 C43.0280877,43.8400215 42.5180487,44.0360166 42.0060745,44.0360166 C41.4920576,44.0360166 40.9800834,43.8400214 40.5900283,43.4480311 L31.9900014,34.8219862 L23.3620213,43.3580432 C22.9720737,43.7420776 22.4639699,43.9360301 21.9559737,43.9360301 C21.4400215,43.9360301 20.9260046,43.7379922 20.5340143,43.3420239 C19.7579895,42.5560005 19.7640102,41.2919768 20.5500336,40.5140169 L29.1680151,31.9900013 L20.5819648,23.3759978 C19.8019621,22.5939524 19.8040049,21.3279935 20.5859428,20.5479908 C21.3679882,19.7659454 22.6319043,19.7700309 23.4139498,20.5519687 L32.0119339,29.1759709 L40.639914,20.6400214 C41.4238946,19.8620614 42.6918962,19.8700173 43.467921,20.6560407 C44.2458809,21.4420641 44.2379251,22.708023 43.4519016,23.4840477 L34.8340277,32.0079559 L43.4220132,40.6240021 Z"
id="形状"
fill="#DDDDDD"
></path>
</g>
</g>
</g>
</svg>
</template>
</n-button>
</n-form-item>
</n-form>
</div>
<div class="wrapper-new" @click="createCondition">
<span>+</span>
<span style="font-size:16px;">+</span>
<span style="margin-left: 8px">添加筛选条件</span>
</div>
</div>
<template #footer>
<div class="wrapper-footer">
<n-button style="background-color: #507AFD;" type="info" @click="handleSumbit">
<n-button style="background-color: #507afd" type="info" @click="handleSumbit">
确定
</n-button>
<n-button secondary style="margin-left: 15px;background-color: #ffffff;border: 1px solid #cad2dd;color: #333333;" @click="closeModal">
<n-button
secondary
style="
margin-left: 15px;
background-color: #ffffff;
border: 1px solid #cad2dd;
color: #333333;
"
@click="closeModal"
>
取消
</n-button>
</div>
@ -419,19 +468,22 @@ defineExpose({
&-title {
font-weight: bold;
font-size: 16px;
font-size: 18px;
color: #333333;
}
&-bar {
background-color: #e8e8e8;
width: 100%;
margin-top: 20px;
margin-top: 27px;
font-size: 16px;
color: #333333;
}
&-form {
display: flex;
justify-content: space-between;
margin-top: 20px;
margin-top: 24px;
}
&-new {
@ -440,7 +492,9 @@ defineExpose({
color: #507afd;
line-height: 22px;
cursor: pointer;
span{
font-size: 11px;
}
&:hover {
color: #507aac;
}
@ -453,11 +507,13 @@ defineExpose({
&-footer {
display: flex;
justify-content: flex-end;
margin-bottom:6px;
}
&-info {
font-weight: bold;
position: relative;
background: #f8f8f8;
&:before {
background-color: #1980ff;
@ -474,7 +530,21 @@ defineExpose({
// ::v-deep(.n-input .n-input-wrapper) {
// padding-left: 0;
// }
::v-deep(.n-input__suffix){
::v-deep(.n-input__suffix) {
margin-right: -8px;
}
.modal_wrapper {
width: 808px !important;
height: 432px !important;
}
::v-deep(.n-card__content) {
}
.modal_wrapper {
padding: 14px 14px 0 14px !important;
}
::v-deep(.n-form-item .n-form-item-label){
font-size:14px;
color: #666666;
font-weight: 500;
}
</style>

@ -46,6 +46,8 @@ import PackageSettingsModal from "./modal/PackageSettingsModal.vue";
import QueryRepeatedTasksModal from "./modal/QueryRepeatedTasksModal.vue";
import type { PictureSortParam } from "/#/api";
import defaultAvatar from "@/assets/icons/avatar.svg";
import baseImg from "@/assets/images/baseImg.png";
import axios from "axios";
const deviceHeight = ref(600);
let _masonry: null | Masonry = null;
@ -186,13 +188,13 @@ watch(
const listData = ref<any[]>([]);
async function featchList(userSearchId?:string) {
async function featchList(userSearchId?: string) {
loading.value = true;
try {
const contentParams = {
search_month: timeRange.value,
search_history: 0,
userSearchId
userSearchId,
};
pagination.pageNo += 1;
@ -246,6 +248,7 @@ async function featchList(userSearchId?:string) {
uphead: item.uphead,
similar: item.similarityscore || -1,
imgName: item.imgname,
loadOver: false,
};
});
@ -284,8 +287,8 @@ const gridHeight = computed(() => {
async function oneCheck() {
const asideVal = cloneDeep(configStore.getAsideValue);
asideVal.upUserName = searchValue.value;
console.log('searchValue', asideVal, 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") +
@ -613,6 +616,11 @@ const dropdownOptions = ref([
icon: renderIcon(EyeOutlineIcon),
},
]);
const loadImgOver = (item) => {
console.log("loadImgOver", item);
setTimeout(() => (item.loadOver = true), 2000);
};
</script>
<template>
@ -708,8 +716,19 @@ const dropdownOptions = ref([
:src="item.thumburl"
ref="imageRef"
/>
<!-- @load="loadImgOver(item)" -->
<!-- <n-image
class="img"
:class="{
'img-fit': viewMode === 'horizontalVersion',
'img-full': viewMode === '3:4' || viewMode === 'verticalVersion',
}"
:src="baseImg"
v-show="!item.loadOver"
/> -->
<div class="percent" v-if="item.similar != -1">
<SvgIcon size="42" :name="item.similar==100?'error_tag':'tag'" />
<SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" />
<div class="val">
{{ `${item.similar}%` }}
</div>

@ -93,12 +93,14 @@ defineExpose({
width: 510px;
height: 361px;
box-shadow: none !important;
margin-left: 30px !important;
}
.wrapper {
position: absolute;
left: calc(50% - 350px);
left: calc(50% - 286px);
.wrapper-hearder {
margin-top: 80px;
margin-left:18px;
.wrapper-title {
text-align: center;
font-size: 16px;

@ -0,0 +1,92 @@
<script>
import { reactive, toRefs, onMounted } from "vue";
export default {
setup() {
let state = reactive({});
let methods = {
init() {
function getQueryParamsNew() {
const params = new URLSearchParams(window.location.search);
let paramsObj = {};
for (const [key, value] of params.entries()) {
if (paramsObj.hasOwnProperty(key)) {
if (Array.isArray(paramsObj[key])) {
paramsObj[key].push(value);
} else {
paramsObj[key] = [paramsObj[key], value];
}
} else {
paramsObj[key] = value;
}
}
return paramsObj;
}
var queryParamsNew = getQueryParamsNew();
state.queryParamsNew = queryParamsNew;
const lng = queryParamsNew.lng; //
const lat = queryParamsNew.lat; //
//
const center = new qq.maps.LatLng(lat, lng);
const map = new qq.maps.Map(document.getElementById("map-container"), {
center,
zoom: 15,
});
//
const marker = new qq.maps.Marker({
position: center,
map: map,
});
//
const infoWin = new qq.maps.InfoWindow({
map: map,
position: center,
});
infoWin.setContent(
`<div class="detailshow" >${queryParamsNew.name}</div>`
);
infoWin.open();
qq.maps.event.addListener(marker, "click", function () {
infoWin.open();
infoWin.setContent(
`<div class="detailshow" >${queryParamsNew.name}</div>`
);
infoWin.setPosition(centerLatLng);
});
},
};
onMounted(() => {
methods.init();
});
return {
...toRefs(state),
...methods,
};
},
components: {},
};
</script>
<template>
<div class="mapmain">
<div id="map-container" style="width: 100%; height: 100%"></div>
</div>
</template>
<style >
.layout-sider {
display: none;
}
.layout-main-header {
display: none;
}
.mapmain {
height: 100%;
width: 100%;
}
.detailshow {
width: 100%;
}
</style>

@ -159,7 +159,8 @@ function newFilterOk() {
filterModalRef.value.query(
filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize,
)
);
filterModalRef.value.showModal();
}
onBeforeMount(async () => {
configStore.fetchConfig()

@ -271,17 +271,19 @@ async function getTableData() {
"拜访小结",
"拜访项目类别",
];
fieldList.map((v) => {
if (userFieldList.includes(v.name)) {
let locationobj = {address:""}
if(v.name=='location'){
locationobj=JSON.parse(taskDetailInfo.value.ocrPicture[v.name]);
}
let locationobj = { address: "" };
if (v.name == "location") {
locationobj = JSON.parse(taskDetailInfo.value.ocrPicture[v.name]);
}
const item = {
label: v.fieldDesc,
value: v.name=='location'?locationobj.address:taskDetailInfo.value.ocrPicture[v.name],
value:
v.name == "location"
? locationobj.address
: taskDetailInfo.value.ocrPicture[v.name],
key: v.name,
blue: blueList.includes(v.fieldDesc),
};
@ -389,6 +391,22 @@ function goBack() {
function switchBatch() {
setBatch(!batch.value);
}
function getrowValue(e) {
if (e.key == "location") {
let locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location);
let lat = locationobj.lat.$numberDecimal;
let lng = locationobj.lng.$numberDecimal;
let name = e.value;
const protocol = window.location.protocol;
const hostname = window.location.hostname;
const port = window.location.port;
const hostWithPort = protocol + "//" + hostname + ":" + port + "/";
window.open(
hostWithPort + "map" + "?name=" + name + "&lat=" + lat + "&lng=" + lng
);
}
}
</script>
<template>
@ -630,6 +648,7 @@ function switchBatch() {
:src="taskDetailInfo?.ocrPicture?.imgurl"
/>
</div>
<div class="leftback"></div>
</div>
<div class="right">
<n-scrollbar v-if="totalCount > 0" style="max-height: 100%">
@ -656,16 +675,10 @@ function switchBatch() {
"
>
<div
draggable="true"
class="img-wrapper"
:style="{
'background-image': `url(${item.serverThumbnailUrl})`,
}"
@dragend="
(event) => {
handleDragEnd(event, item);
}
"
/>
<div class="small-mark" />
<div class="check">
@ -737,6 +750,7 @@ function switchBatch() {
:data="taskDetailInfo"
:task-table-data="taskTableData"
@show-modal="showActionsModal"
@getrow-value="getrowValue"
/>
</n-tab-pane>
<n-tab-pane name="picture-info" tab="图片信息">
@ -962,7 +976,7 @@ function switchBatch() {
.big-mark {
width: 100%;
height: 151px;
height: 210px;
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 0%,
@ -1021,10 +1035,6 @@ function switchBatch() {
z-index: 3;
left: 16px;
bottom: 16px;
padding-left: 10px;
width: 195px;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item {
display: flex;
align-items: center;
@ -1074,6 +1084,18 @@ function switchBatch() {
height: 129px;
}
}
/* .leftback {
position: absolute;
width: 100%;
height: 151px;
bottom: 0;
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0) 29%,
rgba(3, 0, 0, 0.73)
);
}*/
}
.right {
@ -1140,10 +1162,7 @@ function switchBatch() {
z-index: 3;
left: 3px;
bottom: 3px;
width: 98%;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item {
display: flex;
align-items: center;

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { ref, watch } from "vue";
import * as XLSX from 'xlsx';
defineProps({
data: {
@ -11,10 +12,14 @@ defineProps({
default: () => [[]],
},
});
const emit = defineEmits(["showModal"]);
const emit = defineEmits(["showModal","getrowValue"]);
function showActionsModal() {
emit("showModal");
}
function getrowvalue(row){
emit("getrowValue",row);
}
</script>
<template>
@ -32,13 +37,13 @@ function showActionsModal() {
<th v-if="item && item[0]">
{{ item[0].label }}
</th>
<td v-if="item && item[0]" :class="item[0].blue ? 'blue' : ''">
<td v-if="item && item[0]" :class="item[0].blue ? 'blue' : ''" @click="getrowvalue(item[0])">
{{ item[0].value }}
</td>
<th v-if="item && item.length > 1">
{{ item[1].label }}
</th>
<td v-if="item && item.length > 1" :class="item[1].blue ? 'blue' : ''">
<td v-if="item && item.length > 1" :class="item[1].blue ? 'blue' : ''" @click="getrowvalue(item[1])">
{{ item[1].value }}
</td>
</tr>

@ -533,7 +533,6 @@ defineExpose({
:style="{ height: gridHeight }"
class="grid-item"
>
<div>
<n-image
ref="imageRef"
class="img"
@ -567,8 +566,7 @@ defineExpose({
</div>
<div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent">
{{ item.similarityScore }}<span class="percent-unit">%</span>
</div>
</div>
</div>
</div>
</div>
<!-- </n-scrollbar> -->
@ -612,9 +610,9 @@ defineExpose({
.small-mark{
width: 100%;
height: 36px;
height: 56px;
background: linear-gradient(180deg,rgba(0,0,0,0.01), rgba(0,0,0,0.44) 88%);
border-radius: 0px 8px 8px 8px;
//border-radius: 0px 8px 8px 8px;
position: absolute;
left: 0;
bottom: 0;

@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { FormInst, FormItemRule, FormRules } from "naive-ui";
import { computed, onBeforeMount, reactive, ref, unref, watch } from "vue";
import { asideTaskMap as asideMap } from "@/config/final";
import { asideTaskMap } from "@/config/final";
import { useDictionary } from "@/store/modules/dictonary";
import { useConfig } from "@/store/modules/asideConfig";
import type { FilterCondition } from "/#/api";
@ -120,10 +120,7 @@ function handleSumbit(e: MouseEvent) {
if (currentStatus.value === "new") addCondition(param);
else updateCondition({ id: currentEditId!, ...param });
emit("onOk");
setTimeout(() => {
closeModal();
}, 300);
closeModal();
});
}
@ -198,14 +195,18 @@ function showModal() {
}
function closeModal() {
show.value = false;
emit("onOk");
setTimeout(() => {
show.value = false;
}, 300);
}
function generateAllData(): Option[] {
const initVal: Option[] = [];
const list = Object.keys(asideMap).reduce((acc, value) => {
if (value.startsWith("iz") && asideMap[value]?.inFilterList !== false) {
const name = asideMap[value]?.label;
console.log(asideTaskMap,'asideTaskMap')
const list = Object.keys(asideTaskMap).reduce((acc, value) => {
if (value.startsWith("iz") && asideTaskMap[value]?.inFilterList !== false) {
const name = asideTaskMap[value]?.label;
name &&
acc.push({
@ -222,6 +223,8 @@ function generateAllData(): Option[] {
typeOptions.value = generateAllData();
function getOptions(key: string) {
console.log('key',key,'getOptions');
console.log(formValue.conditions,'formValue.conditions')
const getterName = `get${key}`;
const options = unref(dicStore[getterName]);
return options || [];
@ -263,7 +266,12 @@ defineExpose({
</script>
<template>
<n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler">
<n-modal
v-model:show="show"
transform-origin="center"
@after-leave="leaveHandler"
class="modal_wrapper"
>
<n-card
:style="cardStyle"
:bordered="false"
@ -275,7 +283,14 @@ defineExpose({
<span class="wrapper-title">{{ modalTitle }}</span>
<div class="wrapper-bar">
<div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span>
<span
:style="{
'margin-left': '18px',
'font-size': '16px',
'font-weight': '600',
}"
>基本信息</span
>
</div>
</div>
<div class="wrapper-form">
@ -285,6 +300,7 @@ defineExpose({
v-model:value="formValue.name"
:style="{ width: '780px' }"
@keydown.enter.prevent
placeholder="请输入过滤名称"
/>
</n-form-item>
<n-form-item path="logic" label="逻辑关系" v-show="false">
@ -307,7 +323,7 @@ defineExpose({
v-model:value="item.type"
placeholder="请选择筛选项名称"
:options="typeOptions"
@change="item.result = ''"
@update="item.result = ''"
/>
<n-select
filterable
@ -345,13 +361,13 @@ defineExpose({
</n-form>
</div>
<div class="wrapper-new" @click="createCondition">
<span>+</span>
<span style="font-size:16px;">+</span>
<span style="margin-left: 8px">添加筛选条件</span>
</div>
</div>
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> </n-button>
<n-button type="info" @click="handleSumbit"> </n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal">
取消
</n-button>
@ -368,19 +384,22 @@ defineExpose({
&-title {
font-weight: bold;
font-size: 16px;
font-size: 18px;
color: #333333;
}
&-bar {
background-color: #e8e8e8;
width: 100%;
margin-top: 20px;
margin-top: 27px;
font-size: 16px;
color: #333333;
}
&-form {
display: flex;
justify-content: space-between;
margin-top: 20px;
margin-top: 24px;
}
&-new {
@ -389,7 +408,9 @@ defineExpose({
color: #507afd;
line-height: 22px;
cursor: pointer;
span{
font-size: 11px;
}
&:hover {
color: #507aac;
}
@ -402,6 +423,7 @@ defineExpose({
&-footer {
display: flex;
justify-content: flex-end;
margin-bottom:6px;
}
&-info {
@ -419,4 +441,17 @@ defineExpose({
}
}
}
.modal_wrapper {
width: 808px !important;
height: 432px !important;
}
.modal_wrapper {
padding: 14px 14px 0 14px !important;
}
::v-deep(.n-form-item .n-form-item-label){
font-size:14px;
color: #666666;
font-weight: 500;
}
</style>

Loading…
Cancel
Save