Compare commits

..

1 Commits

@ -3,4 +3,3 @@
# node_modules/.bin/lint-staged # node_modules/.bin/lint-staged
date date
npx lint-staged

@ -38,11 +38,5 @@
"json", "json",
"jsonc", "jsonc",
"yaml" "yaml"
], ]
"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"
} }

2
components.d.ts vendored

@ -11,7 +11,6 @@ declare module 'vue' {
BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default'] BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default']
DataHeader: typeof import('./src/components/DataHeader/index.vue')['default'] DataHeader: typeof import('./src/components/DataHeader/index.vue')['default']
NAvatar: typeof import('naive-ui')['NAvatar'] NAvatar: typeof import('naive-ui')['NAvatar']
NBackTop: typeof import('naive-ui')['NBackTop']
NButton: typeof import('naive-ui')['NButton'] NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard'] NCard: typeof import('naive-ui')['NCard']
NCheckbox: typeof import('naive-ui')['NCheckbox'] NCheckbox: typeof import('naive-ui')['NCheckbox']
@ -54,7 +53,6 @@ declare module 'vue' {
NUpload: typeof import('naive-ui')['NUpload'] NUpload: typeof import('naive-ui')['NUpload']
NUploadDragger: typeof import('naive-ui')['NUploadDragger'] NUploadDragger: typeof import('naive-ui')['NUploadDragger']
Quill: typeof import('./src/components/RichEditor/Quill.vue')['default'] Quill: typeof import('./src/components/RichEditor/Quill.vue')['default']
Robot: typeof import('./src/components/Robot/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
Search: typeof import('./src/components/Search/Search.vue')['default'] Search: typeof import('./src/components/Search/Search.vue')['default']

@ -19,15 +19,10 @@ module.exports = antfu(
'unused-imports/no-unused-vars': 'off', 'unused-imports/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'off', 'unused-imports/no-unused-imports': 'off',
'jsdoc/require-returns-description': 'off', 'jsdoc/require-returns-description': 'off',
'eqeqeq': 'off',
'no-console': 'off',
'vue/custom-event-name-casing': 'off',
'vue/eqeqeq': 'off',
'no-restricted-syntax': [ 'no-restricted-syntax': [
// eslint-disable-next-line node/prefer-global/process // eslint-disable-next-line node/prefer-global/process
process.env.MODE === 'production' ? 2 : 0, process.env.MODE === 'production' ? 2 : 0,
], ],
'array-callback-return': ['error', { allowImplicit: true }],
}, },
}, },
) )

@ -119,6 +119,5 @@
<div class="selection-box" style="border: 1px dotted black;position: absolute;display: none;"></div> <div class="selection-box" style="border: 1px dotted black;position: absolute;display: none;"></div>
<script>var globalThis = window;</script> <script>var globalThis = window;</script>
<script src="/src/main.ts" type="module"></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> </body>
</html> </html>

@ -23,7 +23,7 @@ const adminInfo = {
value: 'task-main', value: 'task-main',
}, },
{ {
label: '图审审批', label: '图审审批管理',
value: 'worksheet-main', value: 'worksheet-main',
}, },
], ],

11225
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -37,7 +37,6 @@
"sortablejs": "^1.15.1", "sortablejs": "^1.15.1",
"vue": "^3.3.8", "vue": "^3.3.8",
"vue-draggable-plus": "^0.3.5", "vue-draggable-plus": "^0.3.5",
"vue-lazyload": "^3.0.0",
"vue-mousetrap": "^1.0.5", "vue-mousetrap": "^1.0.5",
"vue-router": "^4.1.6", "vue-router": "^4.1.6",
"vue-types": "^4.2.1", "vue-types": "^4.2.1",
@ -78,8 +77,8 @@
"vue-tsc": "^1.8.22" "vue-tsc": "^1.8.22"
}, },
"lint-staged": { "lint-staged": {
"*.{ts,tsx,vue,js}": [ "*.{ts,tsx,vue}": [
"eslint --fix" "pnpm lint:fix"
] ]
} }
} }

@ -22,7 +22,7 @@ index 3aacec9..a63ab54 100644
+ class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error flex` + class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error flex`
+ }, [h('img', { + }, [h('img', {
+ style: { width: '1rem', height: '1rem' }, + style: { width: '1rem', height: '1rem' },
+ src: 'notice.svg' + src: 'http://47.93.59.251/api/upload/ocr/1711419313955_c.png'
+ }), feedbackNodes]) : mergedValidationStatus === 'success' ? h("div", { + }), feedbackNodes]) : mergedValidationStatus === 'success' ? h("div", {
key: "controlled-success", key: "controlled-success",
class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success`
@ -179,7 +179,7 @@ index 4f47aad..6dae078 100644
const feedbackNodes = children || feedback ? ((0, vue_1.h)("div", { key: "__feedback__", class: `${mergedClsPrefix}-form-item-feedback__line` }, children || feedback)) : this.renderExplains.length ? ((_a = this.renderExplains) === null || _a === void 0 ? void 0 : _a.map(({ key, render }) => ((0, vue_1.h)("div", { key: key, class: `${mergedClsPrefix}-form-item-feedback__line` }, render())))) : null; const feedbackNodes = children || feedback ? ((0, vue_1.h)("div", { key: "__feedback__", class: `${mergedClsPrefix}-form-item-feedback__line` }, children || feedback)) : this.renderExplains.length ? ((_a = this.renderExplains) === null || _a === void 0 ? void 0 : _a.map(({ key, render }) => ((0, vue_1.h)("div", { key: key, class: `${mergedClsPrefix}-form-item-feedback__line` }, render())))) : null;
- return feedbackNodes ? (mergedValidationStatus === 'warning' ? ((0, vue_1.h)("div", { key: "controlled-warning", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning` }, feedbackNodes)) : mergedValidationStatus === 'error' ? ((0, vue_1.h)("div", { key: "controlled-error", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error` }, feedbackNodes)) : mergedValidationStatus === 'success' ? ((0, vue_1.h)("div", { key: "controlled-success", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` }, feedbackNodes)) : ((0, vue_1.h)("div", { key: "controlled-default", class: `${mergedClsPrefix}-form-item-feedback` }, feedbackNodes))) : null; - return feedbackNodes ? (mergedValidationStatus === 'warning' ? ((0, vue_1.h)("div", { key: "controlled-warning", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning` }, feedbackNodes)) : mergedValidationStatus === 'error' ? ((0, vue_1.h)("div", { key: "controlled-error", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error` }, feedbackNodes)) : mergedValidationStatus === 'success' ? ((0, vue_1.h)("div", { key: "controlled-success", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` }, feedbackNodes)) : ((0, vue_1.h)("div", { key: "controlled-default", class: `${mergedClsPrefix}-form-item-feedback` }, feedbackNodes))) : null;
+ return feedbackNodes ? (mergedValidationStatus === 'warning' ? ((0, vue_1.h)("div", { key: "controlled-warning", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning` }, feedbackNodes)) : mergedValidationStatus === 'error' ? ((0, vue_1.h)("div", { key: "controlled-error", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error flex` }, [h('img', { + return feedbackNodes ? (mergedValidationStatus === 'warning' ? ((0, vue_1.h)("div", { key: "controlled-warning", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning` }, feedbackNodes)) : mergedValidationStatus === 'error' ? ((0, vue_1.h)("div", { key: "controlled-error", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error flex` }, [h('img', {
+ style: { width: '1rem', height: '1rem' },src: 'notice.svg' + style: { width: '1rem', height: '1rem' },src: 'http://47.93.59.251/api/upload/ocr/1711419313955_c.png'
+ }), feedbackNodes])) : mergedValidationStatus === 'success' ? ((0, vue_1.h)("div", { key: "controlled-success", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` }, feedbackNodes)) : ((0, vue_1.h)("div", { key: "controlled-default", class: `${mergedClsPrefix}-form-item-feedback` }, feedbackNodes))) : null; + }), feedbackNodes])) : mergedValidationStatus === 'success' ? ((0, vue_1.h)("div", { key: "controlled-success", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` }, feedbackNodes)) : ((0, vue_1.h)("div", { key: "controlled-default", class: `${mergedClsPrefix}-form-item-feedback` }, feedbackNodes))) : null;
}); });
} }

@ -71,9 +71,6 @@ dependencies:
vue-draggable-plus: vue-draggable-plus:
specifier: ^0.3.5 specifier: ^0.3.5
version: 0.3.5(@types/sortablejs@1.15.7) version: 0.3.5(@types/sortablejs@1.15.7)
vue-lazyload:
specifier: ^3.0.0
version: 3.0.0
vue-mousetrap: vue-mousetrap:
specifier: ^1.0.5 specifier: ^1.0.5
version: 1.0.5 version: 1.0.5
@ -7323,10 +7320,6 @@ packages:
- supports-color - supports-color
dev: true dev: true
/vue-lazyload@3.0.0:
resolution: {integrity: sha512-h2keL/Rj550dLgesgOtXJS9qOiSMmuJNeVlfNAYV1/IYwOQYaWk5mFJlwRxmZDK9YC5gECcFLYYj7z1lKSf9ug==}
dev: false
/vue-mousetrap@1.0.5: /vue-mousetrap@1.0.5:
resolution: {integrity: sha512-mDyPBBTnOrpUNDZ4vjd7X8emYwKFG2/Rsi5coZKDmF+dM5XpENrnvdmef4xHq2gcZ1HVmHqeI5jQP17p9fFpzA==} resolution: {integrity: sha512-mDyPBBTnOrpUNDZ4vjd7X8emYwKFG2/Rsi5coZKDmF+dM5XpENrnvdmef4xHq2gcZ1HVmHqeI5jQP17p9fFpzA==}
dependencies: dependencies:

@ -1,19 +0,0 @@
<?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, -6389.000000)">
<g id="警示" transform="translate(664.000000, 6389.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<path d="M32,4 C47.463973,4 60,16.536027 60,32 C60,47.463973 47.463973,60 32,60 C16.536027,60 4,47.463973 4,32 C4,16.536027 16.536027,4 32,4 Z M32,9 C19.2974508,9 9,19.2974508 9,32 C9,44.7025492 19.2974508,55 32,55 C44.7025492,55 55,44.7025492 55,32 C55,19.2974508 44.7025492,9 32,9 Z" id="形状结合" fill="#FF4E4F" mask="url(#mask-2)"></path>
<path d="M32,41.8150625 C33.5403559,41.8150625 34.7890611,43.0637676 34.7890611,44.6041236 C34.7890611,46.1444795 33.5403559,47.3931847 32,47.3931847 C30.4596441,47.3931847 29.2109389,46.1444795 29.2109389,44.6041236 C29.2109389,43.0637676 30.4596441,41.8150625 32,41.8150625 Z M33,16.6068153 C33.5522847,16.6068153 34,17.0545306 34,17.6068153 L34,36.7882606 C34,37.3405453 33.5522847,37.7882606 33,37.7882606 L31,37.7882606 C30.4477153,37.7882606 30,37.3405453 30,36.7882606 L30,17.6068153 C30,17.0545306 30.4477153,16.6068153 31,16.6068153 L33,16.6068153 Z" id="形状结合备份" fill="#FF4E4F" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,18 +1,17 @@
<script lang="ts" setup> <script lang="ts" setup>
import { NModalProvider, dateZhCN, zhCN } from 'naive-ui' import { dateZhCN, zhCN } from "naive-ui";
import { computed, inject, nextTick, onMounted } from 'vue' import { computed, onMounted, nextTick,inject } from "vue";
import { AppProvider } from '@/components/Application' import { AppProvider } from "@/components/Application";
import { lighten } from '@/utils/index' import { lighten } from "@/utils/index";
import mouseTrapBind from '@/hooks/event/mouseTrapBind' import mouseTrapBind from '@/hooks/event/mouseTrapBind'
const mousetrap = inject('mousetrap') as any const mousetrap = inject('mousetrap') as any
onMounted(() => { onMounted(()=>{
mouseTrapBind(mousetrap) mouseTrapBind(mousetrap);
}) })
const getThemeOverrides = computed(() => { const getThemeOverrides = computed(() => {
const theme = '#1980FF' const theme = "#1980FF";
const lightenStr = lighten(theme, 6) const lightenStr = lighten(theme, 6);
return { return {
common: { common: {
@ -22,34 +21,36 @@ const getThemeOverrides = computed(() => {
primaryColorSuppl: theme, primaryColorSuppl: theme,
}, },
Switch: { Switch: {
railColorActive: '#07C984', railColorActive: "#07C984",
}, },
Input: { Input: {
borderHover: '0px', borderHover: "0px",
borderFocus: '0px', borderFocus: "0px",
boxShadowFocus: '#ff0000', boxShadowFocus: "#ff0000",
}, },
Tag: { Tag: {
colorCheckedHover: '#507afd', colorCheckedHover: "#507afd",
colorCheckedPressed: '#507afd', colorCheckedPressed: "#507afd",
}, },
Slider: { Slider: {
fillColor: '#1980FF', fillColor: "#1980FF",
dotBorderActive: '#1980FF', dotBorderActive: "#1980FF",
fillColorHover: '#1980FF', fillColorHover: "#1980FF",
}, },
Card: { Card: {
padding: '0px', padding: "0px",
}, },
Dropdown: { Dropdown: {
optionColorHover: '#e8f2ff', optionColorHover: "#e8f2ff",
}, },
Upload: { Upload: {
draggerBorder: '1px dashed #1980FF', draggerBorder: "1px dashed #1980FF",
draggerBorderHover: '1px dashed #1980FF', draggerBorderHover: "1px dashed #1980FF",
}, },
} };
}) });
</script> </script>
<template> <template>
@ -58,11 +59,9 @@ const getThemeOverrides = computed(() => {
:date-locale="dateZhCN" :date-locale="dateZhCN"
:theme-overrides="getThemeOverrides" :theme-overrides="getThemeOverrides"
> >
<NModalProvider>
<AppProvider> <AppProvider>
<RouterView /> <RouterView />
</AppProvider> </AppProvider>
</NModalProvider>
</NConfigProvider> </NConfigProvider>
</template> </template>
@ -79,31 +78,7 @@ const getThemeOverrides = computed(() => {
color: #666666 !important; color: #666666 !important;
font-size: 14px !important; font-size: 14px !important;
} }
::v-deep(.n-base-clear > .n-base-clear__clear) { ::v-deep(.n-base-clear > .n-base-clear__clear){
color: #c9c9c9 !important; 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;
// }
.n-scrollbar-content {
padding: 0 7.97px 16 16px;
}
.n-form-item .n-form-item-label {
font-size: 14px !important;
color: #333333 !important;
}
.n-slider-dots > .n-slider-dot {
display: none !important;
}
.n-collapse-item-arrow i svg {
width: 14px !important;
height: 14px !important;
}
.v-binder-follower-content {
//left: -60px;
}
</style> </style>

@ -26,7 +26,8 @@ export async function getPictureTypeList(): Promise<any> {
url: `/static/admin/web/distionary/bytypecode/izpicturetype`, url: `/static/admin/web/distionary/bytypecode/izpicturetype`,
method: 'get', method: 'get',
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[]
const list = res.data[0].distionaryList
return list return list
} }
@ -72,7 +73,7 @@ export async function getTFList() {
method: 'get', method: 'get',
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -144,7 +145,7 @@ export async function getIztaskrromList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -160,7 +161,7 @@ export async function getIztaskstatusList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -190,7 +191,7 @@ export async function getIzfirmList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -206,7 +207,7 @@ export async function getIzproductnameList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -222,7 +223,7 @@ export async function getizcustomnameList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -236,7 +237,7 @@ export async function getIzCustomtypeList(): Promise<any> {
method: 'get', method: 'get',
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -252,7 +253,7 @@ export async function getIzcustomlevel(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -268,7 +269,7 @@ export async function getIzprojecttypeList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -297,7 +298,8 @@ export async function getRejectList() {
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list
} }
/** /**
@ -310,14 +312,14 @@ export async function getBackList() {
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }
/** /**
* *
* @returns * @returns
*/ */
export async function getBusinessList(field: string, page: PageParam = { pageNo: 1, pageSize: 10000 }) { export async function getBusinessList(field: string, page: PageParam = { pageNo: 1, pageSize: 200 }) {
const res = await http.request({ const res = await http.request({
url: `/ocr/dictionary/getDictionaryByField`, url: `/ocr/dictionary/getDictionaryByField`,
method: 'get', method: 'get',
@ -363,7 +365,7 @@ export async function getRelationTypeList() {
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }
/** /**
@ -375,7 +377,7 @@ export async function getizstatusList() {
url: `/static/admin/web/distionary/bytypecode/izstatus`, url: `/static/admin/web/distionary/bytypecode/izstatus`,
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }
/** /**
@ -387,5 +389,5 @@ export async function getizApprovalStatusList() {
url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`, url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`,
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }

@ -14,7 +14,7 @@ export async function getFinalList(params: FinalParam) {
Object.keys(notEmptyParams).forEach((key) => { Object.keys(notEmptyParams).forEach((key) => {
const val = notEmptyParams[key] const val = notEmptyParams[key]
if (key === 'izyear') { if (key === 'izuptime') {
const start = formatToDate2(val[0]) const start = formatToDate2(val[0])
const end = formatToDate2(val[1]) const end = formatToDate2(val[1])
notEmptyParams[key] = `${start}-${end}` notEmptyParams[key] = `${start}-${end}`

@ -5,17 +5,6 @@ import { http } from '@/utils/http/axios'
import { pickBy } from 'lodash-es' import { pickBy } from 'lodash-es'
import type { CheckParam, PageParam, QueryPictureParam, UploadParam } from '/#/api' import type { CheckParam, PageParam, QueryPictureParam, UploadParam } from '/#/api'
/**
*
* @returns
*/
export async function gettaskToolsCount(): Promise<any> {
return await http.request({
url: `/ocr/aitools/toolsTaskApprovalCount`,
method: 'get',
})
}
/** /**
* *
* @param params * @param params
@ -90,6 +79,7 @@ export async function getToolsCount() {
}) })
} }
/** /**
* *
* @param note * @param note
@ -118,7 +108,7 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
* @param note * @param note
* @returns * @returns
*/ */
export async function oneClickCheckTaskPackage(params: Partial<CheckParam> = { search_history: '0' }) { export async function oneClickCheckTaskPackage(params: Partial<CheckParam> = { search_history: '0' }) {
const notEmptyParams = pickBy(params, notEmpty) const notEmptyParams = pickBy(params, notEmpty)
Object.keys(notEmptyParams).forEach((key) => { Object.keys(notEmptyParams).forEach((key) => {
@ -141,7 +131,8 @@ export async function oneClickCheckTaskPackage(params: Partial<CheckParam> = { s
* @param note * @param note
* @returns * @returns
*/ */
export async function getLastCheckNo() { export async function getLastCheckNo() {
return http.request({ return http.request({
url: `/ocr/checkDuplicate/getLastCheckNo`, url: `/ocr/checkDuplicate/getLastCheckNo`,
method: 'get', method: 'get',
@ -153,7 +144,8 @@ export async function getLastCheckNo() {
* @param note * @param note
* @returns * @returns
*/ */
export async function getCheckDuplicateStatus(checkDuplicateNo) { export async function getCheckDuplicateStatus(checkDuplicateNo) {
return http.request({ return http.request({
url: `/ocr/checkDuplicate/getCheckDuplicateStatus`, url: `/ocr/checkDuplicate/getCheckDuplicateStatus`,
method: 'get', method: 'get',
@ -166,7 +158,8 @@ export async function getCheckDuplicateStatus(checkDuplicateNo) {
* @param note * @param note
* @returns * @returns
*/ */
export async function removeCheckDuplicate(checkDuplicateNo) { export async function removeCheckDuplicate(checkDuplicateNo) {
return http.request({ return http.request({
url: `/ocr/checkDuplicate/removeCheckDuplicate`, url: `/ocr/checkDuplicate/removeCheckDuplicate`,
method: 'get', method: 'get',
@ -179,11 +172,12 @@ export async function removeCheckDuplicate(checkDuplicateNo) {
* @param * @param
* @returns * @returns
*/ */
export async function createPackage(params) { export async function createPackage(params) {
return http.request({ return http.request({
url: `/ocr/ocrTaskPackage/createPackage`, url: `/ocr/ocrTaskPackage/createPackage`,
method: 'post', method: 'post',
params, params
}) })
} }
/** /**
@ -191,11 +185,12 @@ export async function createPackage(params) {
* @param * @param
* @returns * @returns
*/ */
export async function deletePackage(params) { export async function deletePackage(params) {
return http.request({ return http.request({
url: `/ocr/ocrTaskPackage/deletePackage`, url: `/ocr/ocrTaskPackage/deletePackage`,
method: 'get', method: 'get',
params, params
}) })
} }
/** /**
@ -275,9 +270,10 @@ export async function getPictureList(params: any): Promise<any> {
* @returns * @returns
*/ */
export async function getFilterList(params) { export async function getFilterList(params) {
return http.request({ return http.request({
url: `/ocr/ocrUsersearch/querySearchCondition`, url: `/ocr/ocrUsersearch/querySearchCondition`,
method: 'get', method: 'get',
params, params
}) })
} }

@ -15,7 +15,6 @@ export async function getApprovalList(page: any) {
pageSize: page.pageSize, pageSize: page.pageSize,
currPage: page.pageNo, currPage: page.pageNo,
keyword: page.keyword, keyword: page.keyword,
userSearchId: page.userSearchId,
}, },
}) })
@ -28,7 +27,7 @@ export async function getApprovalList(page: any) {
/** /**
* *
* @param params * @param param
*/ */
export async function audit(params) { export async function audit(params) {
return http.request({ return http.request({
@ -82,6 +81,8 @@ export async function removeFiles(params) {
/** /**
* () * ()
* @param packageid id
* @param taskchildpictureid id
* @param params * @param params
* @returns * @returns
*/ */
@ -92,9 +93,7 @@ export async function getSimilarityList(params: any) {
params, params,
}) })
const { data } = res const { data: { records, pages, total } } = res
if (data) {
const { records, pages, total } = data
// 精简一下数据 // 精简一下数据
const list = records.map((item) => { const list = records.map((item) => {
return { return {
@ -115,14 +114,6 @@ export async function getSimilarityList(params: any) {
data: records, data: records,
total, total,
} }
}
else {
return {
pageCount: 0,
data: [],
total: 0,
}
}
} }
/** /**
@ -132,10 +123,10 @@ export async function getSimilarityList(params: any) {
* @returns * @returns
*/ */
export async function getTaskDetailInfo(taskId: string, packageid: string, taskNode: string) { export async function getTaskDetailInfo(taskId: string, packageid: string) {
const pid = packageid || 0 const pid = packageid || 0
const res = await http.request({ const res = await http.request({
url: `/backstage/jifen/ocrtaskchildpicture/getdata/${taskId}/${pid}/${taskNode}`, url: `/backstage/jifen/ocrtaskchildpicture/getdata/${taskId}/${pid}`,
method: 'get', method: 'get',
}) })

@ -67,6 +67,7 @@ export async function getPackageTaskList(packageid: string, params: PageParam) {
* @returns * @returns
*/ */
export async function getTaskDetailInfo(checkDuplicateId: string) { export async function getTaskDetailInfo(checkDuplicateId: string) {
const res = await http.request({ const res = await http.request({
url: `/ocr/ocrPicture/getPackagePicture?checkDuplicateId=${checkDuplicateId}`, url: `/ocr/ocrPicture/getPackagePicture?checkDuplicateId=${checkDuplicateId}`,
method: 'get', method: 'get',
@ -83,6 +84,7 @@ export async function getTaskDetailInfo(checkDuplicateId: string) {
* @returns * @returns
*/ */
export async function getPictureSimilarityList(params: PageParam & PictureSortParam & SimilarityPictureSortParam) { export async function getPictureSimilarityList(params: PageParam & PictureSortParam & SimilarityPictureSortParam) {
const res = await http.request({ const res = await http.request({
url: `/backstage/jifen/ocrtaskchildpicture/getPictureSimilarityList`, url: `/backstage/jifen/ocrtaskchildpicture/getPictureSimilarityList`,
method: 'get', method: 'get',
@ -92,25 +94,23 @@ export async function getPictureSimilarityList(params: PageParam & PictureSortPa
const { data: { records, pages, total } } = res const { data: { records, pages, total } } = res
// 精简一下数据 // 精简一下数据
const list = records.map((item, index) => { const list = records.map((item,index) => {
return { return {
id: item.id, id: item.id,
checkDuplicateId: item.checkDuplicateId, checkDuplicateId: item.checkDuplicateId,
taskId: item.taskId, taskId: item.taskId,
taskname: item.fromTaskName, taskname: item.fromTaskName,
assignee: item.assignee, assignee: item.assignee,
pictureid: item.pictureid || item.pictureId, pictureid: item.pictureid,
imgurl: item.imgUrl, imgurl: item.serverThumbnailUrl,
imgUrl: item.imgUrl,
serverThumbnailUrl: item.serverThumbnailUrl,
maxSimilarity: item.maxSimilarity, maxSimilarity: item.maxSimilarity,
thumburl: item.ocrPicture?.serverThumbnailUrl || item.ocrPicture?.imgurl, thumburl: item.ocrPicture?.serverThumbnailUrl || item.ocrPicture?.imgurl,
iztrueorfalse: item.iztrueorfalse, iztrueorfalse: item.iztrueorfalse,
states: item.states, states: item.states,
history: item.ocpictureid && item.picturecompare && hasHistory(item.ocpictureid, item.picturecompare), history: item.ocpictureid && item.picturecompare && hasHistory(item.ocpictureid, item.picturecompare),
historyStates: item.historyStates, historyStates:item.historyStates,
submitDateTimestamp: item.submitDateTimestamp, submitDateTimestamp:item.submitDateTimestamp,
photoDateTimestamp: item.photoDateTimestamp, photoDateTimestamp:item.photoDateTimestamp,
} }
}) })
return { return {

@ -1,19 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,12 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-2504.000000, -6389.000000)" fill="#507AFD" fill-rule="nonzero">
<g id="小结重复数" transform="translate(2504.000000, 6389.000000)">
<path d="M64,32 C64,49.6731274 49.6731274,64 32,64 C14.3268738,64 0,49.6731274 0,32 C0,14.3268738 14.3268738,0 32,0 C49.6731274,0 64,14.3268738 64,32 C64,32 64,32 64,32 Z" id="Ellipse-930" fill-opacity="0.1"></path>
<path d="M39.4637452,37.4192503 L42.4384908,40.9882633 L38.4168391,44.1717731 C38.238099,44.3210001 38.0082903,44.383178 37.7784816,44.3583068 L37.7784816,44.3583068 L35.4931621,44.1344663 C35.0463119,44.0971595 34.8292703,43.8360123 34.8803389,43.4007668 L34.8803389,43.4007668 L35.1229147,41.1872326 C35.148449,40.9633921 35.2633534,40.7519871 35.4420935,40.6151957 L35.4420935,40.6151957 L39.4637452,37.4192503 Z M36.3996296,40.9509565 C36.2847253,40.8141651 36.0804509,40.7892939 35.9400123,40.9012142 C35.7995736,41.0131344 35.7740393,41.2121038 35.8889437,41.3488952 L35.8889437,41.3488952 L37.7401802,43.574865 C37.8550845,43.7116564 38.0593589,43.7365276 38.1997975,43.6246073 C38.3402362,43.512687 38.3657705,43.3137177 38.2508661,43.1769262 L38.2508661,43.1769262 Z M34.7015988,24.1007387 C36.0676837,24.1877878 36.3613282,24.3743216 36.2847253,25.6924936 L36.2847253,38.0161584 L33.6546927,40.1302079 C33.2844454,41.0006988 33.1184724,41.8090119 33.1823082,42.5800182 L21.3982301,42.5800182 C19.840638,42.5800182 19.6363636,41.9582389 19.6363636,40.8887786 L19.6363636,26.0655611 C19.6363636,24.8344382 19.751268,24.1256099 21.2322572,24.1007387 L34.7015988,24.1007387 Z M40.8936659,36.3000477 C41.4809547,35.8523666 42.3235865,35.9394157 42.795971,36.499017 L42.795971,36.499017 L44.0599187,38.028594 C44.0726858,38.028594 44.0726858,38.0410296 44.085453,38.0534652 C44.5323032,38.6130665 44.430166,39.4338151 43.8556443,39.8690606 L43.8556443,39.8690606 L43.0002454,40.5530178 L40.0254998,36.9840049 Z M27.2300894,35.6641158 L23.5186803,35.6641158 C23.1851396,35.6441576 22.8663348,35.8038546 22.6825894,36.082934 C22.4997429,36.3503649 22.4997429,36.7025941 22.6825894,36.9700249 C22.864953,37.2412522 23.1786803,37.3896158 23.5186803,37.3896158 L23.5186803,37.3896158 L27.2300894,37.3896158 C27.5700894,37.3896158 27.8838166,37.2412522 28.066953,36.9700249 C28.2500894,36.6987977 28.2500894,36.3533886 28.066953,36.082934 C27.8838166,35.810934 27.5700894,35.6641158 27.2300894,35.6641158 L27.2300894,35.6641158 Z M36.093218,19.6363636 C39.182868,19.7109771 40.6383229,20.5814681 40.6766243,23.5287018 L40.6766243,34.6088081 L40.56172,34.5590658 L37.6252759,36.9218269 L37.6252759,24.1629166 C37.6252759,23.3670392 37.0762885,22.5711617 36.1570538,22.533855 L24.0665642,22.533855 C23.798454,22.533855 23.5175768,22.2851433 23.4920425,22.023996 L23.4920425,21.36491 C23.4920425,20.4819834 24.30914,19.6736704 25.2411418,19.6487992 L25.3049776,19.6487992 L36.093218,19.6363636 Z M32.8238621,31.2997522 L23.5186803,31.2997522 C23.1850199,31.2801224 22.8662573,31.4400929 22.6825894,31.7193431 C22.4997429,31.986774 22.4997429,32.3390032 22.6825894,32.606434 C22.864953,32.8776613 23.1786803,33.0260249 23.5186803,33.0260249 L23.5186803,33.0260249 L32.7983621,33.0260249 C33.1375894,33.0260249 33.4520894,32.8537067 33.6607257,32.606434 C33.8438621,32.3359795 33.8438621,31.9897977 33.6607257,31.7193431 C33.4775894,31.4481158 33.1638621,31.2997522 32.8238621,31.2997522 L32.8238621,31.2997522 Z M23.5186803,26.911434 C23.1786803,26.8867067 22.864953,27.0597977 22.6825894,27.3310249 C22.4997429,27.5984558 22.4997429,27.950685 22.6825894,28.2181158 C22.864953,28.4901158 23.1786803,28.636934 23.5186803,28.636934 L23.5186803,28.636934 L32.7983621,28.636934 C33.1375894,28.662434 33.4513166,28.4901158 33.634453,28.2428431 C33.7913166,27.9716158 33.7913166,27.6262067 33.634453,27.3557522 C33.4513166,27.0845249 33.1638621,26.911434 32.8238621,26.911434 L32.8238621,26.911434 Z" id="形状结合"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.2 KiB

@ -1,12 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-3040.000000, -6389.000000)" fill-rule="nonzero">
<g id="卡片模式" transform="translate(3040.000000, 6389.000000)">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="64" height="64"></rect>
<path d="M52.8,52.8 L52.8,38.95 L38.95,38.95 L38.95,52.8 L52.8,52.8 M25.05,52.8 L25.05,38.95 L11.2,38.95 L11.2,52.8 L25.05,52.8 M52.8,25.05 L52.8,11.2 L38.95,11.2 L38.95,25.05 L52.8,25.05 M25.05,25.05 L25.05,11.2 L11.2,11.2 L11.2,25.05 L25.05,25.05 M54.55,58 L37.2,58 C35.3,58 33.75,56.45 33.75,54.55 L33.75,37.2 C33.75,35.3 35.3,33.75 37.2,33.75 L54.55,33.75 C56.45,33.75 58,35.3 58,37.2 L58,54.55 C58,56.45 56.45,58 54.55,58 L54.55,58 Z M26.8,58 L9.45,58 C7.55,58 6,56.45 6,54.55 L6,37.2 C6,35.3 7.55,33.75 9.45,33.75 L26.8,33.75 C28.7,33.75 30.25,35.3 30.25,37.2 L30.25,54.55 C30.25,56.45 28.7,58 26.8,58 L26.8,58 Z M54.55,30.25 L37.2,30.25 C35.3,30.25 33.75,28.7 33.75,26.8 L33.75,9.45 C33.75,7.55 35.3,6 37.2,6 L54.55,6 C56.45,6 58,7.55 58,9.45 L58,26.8 C58,28.7 56.45,30.25 54.55,30.25 L54.55,30.25 Z M26.8,30.25 L9.45,30.25 C7.55,30.25 6,28.7 6,26.8 L6,9.45 C6,7.55 7.55,6 9.45,6 L26.8,6 C28.7,6 30.25,7.55 30.25,9.45 L30.25,26.8 C30.25,28.7 28.7,30.25 26.8,30.25 L26.8,30.25 Z" id="形状" fill="#333333"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

@ -1,12 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-930.000000, -6389.000000)" fill="#507AFD" fill-rule="nonzero">
<g id="任务总数" transform="translate(930.000000, 6389.000000)">
<path d="M64,32 C64,49.6731274 49.6731274,64 32,64 C14.3268738,64 0,49.6731274 0,32 C0,14.3268738 14.3268738,0 32,0 C49.6731274,0 64,14.3268738 64,32 C64,32 64,32 64,32 Z" id="Ellipse-930" fill-opacity="0.1"></path>
<path d="M42.8077595,20.3636364 L21.1922405,20.3636364 C20.9718752,20.364003 20.7607017,20.4519898 20.60527,20.6082013 C20.4498384,20.7644129 20.3629095,20.9760242 20.3636409,21.1963887 L20.3636409,27.0159562 L43.6363591,27.0159562 L43.6363591,21.1963887 C43.6370905,20.9760242 43.5501616,20.7644129 43.39473,20.6082013 C43.2392983,20.4519898 43.0281248,20.364003 42.8077595,20.3636364 L42.8077595,20.3636364 Z M23.6724827,24.7283119 C23.097779,24.7283119 22.6318895,24.2624221 22.6318895,23.6877179 C22.6318895,23.1130136 23.097779,22.6471238 23.6724827,22.6471238 C24.2468039,22.6471238 24.7123832,23.1127035 24.7123832,23.6870251 C24.7123832,24.2613467 24.2468039,24.7269264 23.6724827,24.7269264 L23.6724827,24.7283119 Z M20.3636456,42.8036113 C20.3636456,43.2664054 20.7349891,43.6363636 21.1922405,43.6363636 L42.8036027,43.6363636 C43.0239675,43.6363636 43.2352865,43.5487295 43.390978,43.3927781 C43.5466694,43.2368266 43.6339511,43.0253615 43.6335843,42.8049968 L43.6335843,36.9854294 L20.3636456,36.9854294 L20.3636456,42.8049968 L20.3636456,42.8036113 Z M23.6724827,39.2730736 C24.2464213,39.2730736 24.7116904,39.7383431 24.7116904,40.3122821 C24.7116904,40.8862211 24.2464213,41.3514906 23.6724827,41.3514906 C23.0985442,41.3514906 22.6332751,40.8862211 22.6332751,40.3122821 C22.6332751,39.7383431 23.0985442,39.2730736 23.6724827,39.2730736 L23.6724827,39.2730736 Z M20.3636456,35.3240815 L43.6363544,35.3240815 L43.6363544,28.6759185 L20.3636456,28.6759185 L20.3636456,35.3254671 L20.3636456,35.3240815 Z M23.6724827,30.9594059 C24.2468039,30.9594059 24.7123832,31.4249856 24.7123832,31.9993072 C24.7123832,32.5736288 24.2468039,33.0392084 23.6724827,33.0392084 C23.0985442,33.0392084 22.6332751,32.573939 22.6332751,32 C22.6332751,31.426061 23.0985442,30.9607916 23.6724827,30.9607916 L23.6724827,30.9594059 Z" id="形状"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

@ -1,24 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 2.3 KiB

@ -1,14 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1458.000000, -6389.000000)" fill="#507AFD" fill-rule="nonzero">
<g id="已审批" transform="translate(1458.000000, 6389.000000)">
<path d="M64,32 C64,49.6731274 49.6731274,64 32,64 C14.3268738,64 0,49.6731274 0,32 C0,14.3268738 14.3268738,0 32,0 C49.6731274,0 64,14.3268738 64,32 C64,32 64,32 64,32 Z" id="Ellipse-930" fill-opacity="0.1"></path>
<g id="编组" transform="translate(20.363636, 20.363636)">
<path d="M17.1722301,12.6691268 C20.5422747,12.6691268 23.2771277,15.3748997 23.272722,18.704746 C23.2638945,22.025864 20.5334526,24.7229086 17.1810522,24.7272727 C13.8110075,24.7272727 11.0761546,22.025864 11.0761546,18.6960177 C11.0761546,15.3705356 13.8065965,12.6691268 17.1722301,12.6691268 Z M10.5909387,21.9560376 C10.8291356,22.4971922 11.1290872,22.9990694 11.4907936,23.4616693 L0,23.4616693 L0,21.9560376 L10.5909387,21.9560376 Z M19.6159535,15.9160543 L16.4444063,19.258993 L14.596175,17.5133331 L13.4757675,18.5389083 L16.4929279,21.4847094 L20.8686926,17.1423804 L19.6159535,15.9160543 Z M10.0130907,0 C13.1317053,0 15.6636499,2.50502198 15.6636499,5.59047588 C15.6636499,6.55495299 15.4166309,7.46269615 14.9843477,8.25260726 L14.9799366,8.25697141 C14.8255498,8.536277 14.6402855,8.80249013 14.4417881,9.05561082 C13.5860438,10.4041331 12.8096985,11.4733498 13.2552148,12.760774 C11.2967072,14.0263774 9.99985758,16.2128165 9.99985758,18.6960177 C9.99985758,19.1629817 10.0483792,19.1760742 10.1321892,19.6168533 L0,19.6168533 L0,14.6286301 L5.58880439,14.6286301 C8.62802004,12.2588968 6.77096665,10.897282 5.56674913,9.03379007 C4.81687008,8.08240542 4.3625316,6.89099252 4.3625316,5.59047588 C4.3625316,2.50502198 6.89447614,0 10.0130907,0 Z" id="形状结合"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="44px" viewBox="0 0 64 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>标签</title>
<defs>
<polygon id="path-1" points="0 0 25.9047619 0 25.9047619 3.03448276 0 3.03448276"></polygon>
<polygon id="path-3" points="0 0 25.9047619 0 25.9047619 9.10344828 0 9.10344828"></polygon>
<linearGradient x1="6.6483347%" y1="5.51282194%" x2="77.9785156%" y2="89.1343284%" id="linearGradient-5">
<stop stop-color="#FFA0A0" offset="0%"></stop>
<stop stop-color="#FF4E4F" offset="100%"></stop>
</linearGradient>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="无法上传iconfont" transform="translate(-1335.000000, -540.000000)">
<g id="标签" transform="translate(1335.000000, 540.000000)">
<g id="编组">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Clip-2"></g>
<path d="M5.19743462,-3.10020716e-05 L2.80500448,-3.10020716e-05 C2.80500448,-3.10020716e-05 0.0824975911,0.592186069 0,7.32785113 L7.0949656,7.32785113 L13.942352,7.32785113 L25.9047619,5.84750222 L6.84747283,2.07245748 L5.19743462,-3.10020716e-05 Z" id="Fill-1" fill="#D44242" mask="url(#mask-2)"></path>
</g>
<g id="编组" transform="translate(38.095238, 0.000000)">
<mask id="mask-4" fill="white">
<use xlink:href="#path-3"></use>
</mask>
<g id="Clip-4"></g>
<path d="M23.0998499,-3.85141222e-05 L20.7074101,-3.85141222e-05 L19.0573653,1.06613433 L0,3.00817174 L11.9623713,3.76972377 L18.8098716,3.76972377 L25.9047792,3.76972377 C25.8222813,0.304622169 23.0998499,-3.85141222e-05 23.0998499,-3.85141222e-05" id="Fill-3" fill="#D44242" mask="url(#mask-4)"></path>
</g>
<path d="M3.04761905,0 C5.4656579,0.257580711 5.47255535,6.18211688 5.47255535,6.18211688 L5.47255535,6.18211688 L5.47255535,35.4136167 C5.47255535,40.1557989 9.20573842,44 13.810795,44 L13.810795,44 L13.8762772,44 L50.1236355,44 L50.1890304,44 C54.794087,44 58.52727,40.1557989 58.52727,35.4136167 L58.52727,35.4136167 L58.52727,6.18211688 C58.52727,6.18211688 58.5341675,0.257580711 60.952381,0 L60.952381,0 L3.04761905,0 Z" id="Fill-5" fill="url(#linearGradient-5)"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.2 MiB

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 33</title>
<defs>
<rect id="path-1" x="0" y="0" width="32" height="32"></rect>
<linearGradient x1="103.941749%" y1="-9.86447236%" x2="15.6759798%" y2="100%" id="linearGradient-3">
<stop stop-color="#94B3FF" offset="0%"></stop>
<stop stop-color="#3955FF" offset="100%"></stop>
</linearGradient>
<path d="M4.81965071,11.9835294 C4.81965071,18.6007843 10.107091,23.964183 16.6334651,23.964183 C23.1570041,23.964183 28.4444444,18.6007843 28.4444444,11.9835294 C28.4444444,5.36339869 23.1570041,0 16.6334651,0 C10.107091,0 4.81965071,5.36339869 4.81965071,11.9835294 Z" id="path-4"></path>
<filter x="0.0%" y="0.0%" width="100.0%" height="100.0%" filterUnits="objectBoundingBox" id="filter-5">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feColorMatrix values="0 0 0 0 0.328065454 0 0 0 0 0.41948512 0 0 0 0 1 0 0 0 1 0" type="matrix" in="shadowOffsetOuter1"></feColorMatrix>
</filter>
<rect id="path-6" x="0" y="0" width="28.3508865" height="28.7581699"></rect>
<path d="M2.26807092,15.4345098 C2.26807092,22.0517647 7.55551126,27.4151634 14.0818853,27.4151634 C20.6054243,27.4151634 25.8928647,22.0517647 25.8928647,15.4345098 C25.8928647,8.81437908 20.6054243,3.45098039 14.0818853,3.45098039 C7.55551126,3.45098039 2.26807092,8.81437908 2.26807092,15.4345098 Z" id="path-8"></path>
<linearGradient x1="50.4938081%" y1="35.9999974%" x2="0%" y2="114.811198%" id="linearGradient-9">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
<filter x="-338.5%" y="-333.7%" width="776.9%" height="767.3%" filterUnits="objectBoundingBox" id="filter-10">
<feGaussianBlur stdDeviation="5.75725631" in="SourceGraphic"></feGaussianBlur>
</filter>
</defs>
<g id="-index备份" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="index_1.0备份-21" transform="translate(-836.000000, -367.000000)">
<g id="编组-8备份-2" transform="translate(473.000000, 206.000000)">
<g id="画板-8" transform="translate(28.881832, 57.745953)">
<g id="画板-4" transform="translate(236.118168, 103.254047)">
<g id="编组-54备份" transform="translate(98.000000, 0.000000)">
<g id="编组-26" transform="translate(0.063866, 1.000000)">
<path d="M48,24 C48,37.2548455 37.2548455,48 24,48 C10.7451553,48 0,37.2548455 0,24 C0,10.7451553 10.7451553,0 24,0 C37.2548455,0 48,10.7451553 48,24 C48,24 48,24 48,24 Z" id="Ellipse-930" fill="#E9EEFF" fill-rule="nonzero"></path>
<g id="Group-1" transform="translate(7.936134, 8.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g transform="translate(0.888889, 1.777778)">
<g id="路径">
<use fill="black" fill-opacity="1" filter="url(#filter-5)" xlink:href="#path-4"></use>
<use fill="url(#linearGradient-3)" fill-rule="evenodd" xlink:href="#path-4"></use>
</g>
<g id="user-person-profile-block-account-circle-svgrepo-com-1" transform="translate(0.000000, 0.575163)">
<mask id="mask-7" fill="white">
<use xlink:href="#path-6"></use>
</mask>
<g id="路径"></g>
<path id="路径" d="M14.0818853,3.20098039 C20.7447477,3.20098039 26.1428647,8.67755358 26.1428647,15.4345098 C26.1428647,22.189044 20.7443,27.6651634 14.0818853,27.6651634 C7.41708336,27.6651634 2.01807092,22.1894977 2.01807092,15.4345098 C2.01807092,8.6770998 7.41663558,3.20098039 14.0818853,3.20098039 Z M14.0818853,3.70098039 C7.69438694,3.70098039 2.51807092,8.95165837 2.51807092,15.4345098 C2.51807092,21.9149209 7.69481587,27.1651634 14.0818853,27.1651634 C20.4665486,27.1651634 25.6428647,21.9144854 25.6428647,15.4345098 C25.6428647,8.9520939 20.4669775,3.70098039 14.0818853,3.70098039 Z" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M11.3638777,13.9269889 C11.5944007,13.9269889 11.7907721,14.0082723 11.9529919,14.1708392 C12.1152118,14.333406 12.1963217,14.5301975 12.1963217,14.7612135 C12.1963217,14.9836734 12.1152118,15.1783258 11.9529919,15.3451707 C11.7907721,15.5120157 11.5944007,15.5954381 11.3638777,15.5954381 C11.1333548,15.5954381 10.9369834,15.5120157 10.7747636,15.3451707 C10.6125437,15.1783258 10.5314338,14.9836734 10.5314338,14.7612135 C10.5314338,14.5301975 10.6125437,14.333406 10.7747636,14.1708392 C10.9369834,14.0082723 11.1333548,13.9269889 11.3638777,13.9269889 Z M17.8185202,9.13982315 C18.1941872,9.13982315 18.5271648,9.20613331 18.817453,9.33875363 C19.1077411,9.47137395 19.3532054,9.64249695 19.5538457,9.85212262 C19.7544861,10.0617483 19.908168,10.2991814 20.0148916,10.5644221 C20.1216152,10.8296627 20.174977,11.0906253 20.174977,11.3473098 L20.174977,17.9055986 C20.174977,18.10239 20.1301531,18.2949034 20.0405053,18.4831387 C19.9508575,18.671374 19.8313271,18.8424969 19.681914,18.9965076 C19.532501,19.1505183 19.3617433,19.2745825 19.1696408,19.3687002 C18.9775384,19.4628178 18.7790325,19.5098766 18.5741232,19.5098766 L18.5741232,12.3355451 C18.5741232,12.1130852 18.5314338,11.9055986 18.4460549,11.7130852 C18.360676,11.5205718 18.2454146,11.3515879 18.1002705,11.2061333 C17.9551264,11.0606788 17.7865031,10.9451707 17.5944007,10.8596092 C17.4022982,10.7740478 17.1952545,10.731267 16.9732694,10.731267 L9.77583079,10.731267 C9.77583079,10.5430317 9.81852022,10.3547964 9.90389909,10.1665611 C9.98927796,9.97832582 10.1045394,9.80720283 10.2496835,9.65319214 C10.3948276,9.49918144 10.5655853,9.37511727 10.7619567,9.28099962 C10.9583281,9.18688197 11.1675064,9.13982315 11.3894914,9.13982315 L17.8185202,9.13982315 L17.8185202,9.13982315 Z M16.704326,11.5398232 C17.0885309,11.5398232 17.3617433,11.644636 17.5239631,11.8542617 C17.686183,12.0638873 17.7672929,12.3441012 17.7672929,12.6949034 L17.7672929,20.2542617 C17.7672929,20.4681654 17.6776451,20.6692349 17.4983495,20.8574702 C17.3190538,21.0457055 17.0927998,21.1398232 16.8195875,21.1398232 L9.05864829,21.1398232 C8.82812535,21.1398232 8.62321606,21.0457055 8.44392044,20.8574702 C8.26462481,20.6692349 8.174977,20.4424969 8.174977,20.1772563 L8.174977,12.4767215 C8.174977,12.2029248 8.24968351,11.9783258 8.39909653,11.8029248 C8.54850955,11.6275237 8.74701542,11.5398232 8.99461414,11.5398232 L16.704326,11.5398232 Z M16.1792459,13.4906253 C16.1792459,13.3965076 16.1493633,13.3195023 16.0895981,13.2596092 C16.0298329,13.1997162 15.9529919,13.1697697 15.8590752,13.1697697 L10.0831947,13.1697697 C9.98927796,13.1697697 9.91243698,13.1997162 9.85267177,13.2596092 C9.79290656,13.3195023 9.76302396,13.3965076 9.76302396,13.4906253 L9.76302396,16.3526574 C9.83986494,16.446775 9.91030251,16.5515879 9.97433666,16.6670959 C10.0383708,16.7826039 10.1173463,16.8916948 10.211263,16.9943686 C10.3051798,17.0970424 10.4289791,17.1847429 10.5826611,17.2574702 C10.7363431,17.3301975 10.9497902,17.3665611 11.2230026,17.3665611 C11.6242833,17.3665611 11.9508575,17.30239 12.2027251,17.1740478 C12.4545928,17.0457055 12.6765779,16.8831387 12.8686803,16.6863472 C13.0607828,16.4895558 13.2400784,16.2777911 13.4065672,16.0510531 C13.573056,15.8243151 13.7715618,15.6104114 14.0020848,15.4093419 C14.2326077,15.2082723 14.5186269,15.0371494 14.8601424,14.8959729 C15.2016579,14.7547964 15.6413591,14.675652 16.1792459,14.6585397 L16.1792459,13.4906253 L16.1792459,13.4906253 Z" id="形状" fill="url(#linearGradient-9)" fill-rule="nonzero" mask="url(#mask-7)"></path>
</g>
<path d="M15.5929876,24.1568627 C14.1839485,24.1568627 13.0414078,25.315817 13.0414078,26.745098 C13.0414078,28.1743791 14.1839485,29.3333333 15.5929876,29.3333333 C17.0020266,29.3333333 18.1445674,28.1743791 18.1445674,26.745098 C18.1445674,25.315817 17.0020266,24.1568627 15.5929876,24.1568627 Z" id="路径" fill="#8B9CFF" filter="url(#filter-10)"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.9 KiB

@ -1,19 +0,0 @@
<?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, -6389.000000)">
<g id="警示" transform="translate(664.000000, 6389.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<path d="M32,4 C47.463973,4 60,16.536027 60,32 C60,47.463973 47.463973,60 32,60 C16.536027,60 4,47.463973 4,32 C4,16.536027 16.536027,4 32,4 Z M32,9 C19.2974508,9 9,19.2974508 9,32 C9,44.7025492 19.2974508,55 32,55 C44.7025492,55 55,44.7025492 55,32 C55,19.2974508 44.7025492,9 32,9 Z" id="形状结合" fill="#FF4E4F" mask="url(#mask-2)"></path>
<path d="M32,41.8150625 C33.5403559,41.8150625 34.7890611,43.0637676 34.7890611,44.6041236 C34.7890611,46.1444795 33.5403559,47.3931847 32,47.3931847 C30.4596441,47.3931847 29.2109389,46.1444795 29.2109389,44.6041236 C29.2109389,43.0637676 30.4596441,41.8150625 32,41.8150625 Z M33,16.6068153 C33.5522847,16.6068153 34,17.0545306 34,17.6068153 L34,36.7882606 C34,37.3405453 33.5522847,37.7882606 33,37.7882606 L31,37.7882606 C30.4477153,37.7882606 30,37.3405453 30,36.7882606 L30,17.6068153 C30,17.0545306 30.4477153,16.6068153 31,16.6068153 L33,16.6068153 Z" id="形状结合备份" fill="#FF4E4F" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,12 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-2250.000000, -6389.000000)" fill="#507AFD" fill-rule="nonzero">
<g id="图片重复数" transform="translate(2250.000000, 6389.000000)">
<path d="M64,32 C64,49.6731274 49.6731274,64 32,64 C14.3268738,64 0,49.6731274 0,32 C0,14.3268738 14.3268738,0 32,0 C49.6731274,0 64,14.3268738 64,32 C64,32 64,32 64,32 Z" id="Ellipse-930" fill-opacity="0.1"></path>
<path d="M26.2074318,29.5008264 C26.6824488,29.5008264 27.0870929,29.6683196 27.4213641,30.0033058 C27.7556353,30.338292 27.9227709,30.7438017 27.9227709,31.2198347 C27.9227709,31.6782369 27.7556353,32.0793388 27.4213641,32.4231405 C27.0870929,32.7669421 26.6824488,32.938843 26.2074318,32.938843 C25.7324149,32.938843 25.3277708,32.7669421 24.9934996,32.4231405 C24.6592284,32.0793388 24.4920928,31.6782369 24.4920928,31.2198347 C24.4920928,30.7438017 24.6592284,30.338292 24.9934996,30.0033058 C25.3277708,29.6683196 25.7324149,29.5008264 26.2074318,29.5008264 Z M39.5079072,19.6363636 C40.282009,19.6363636 40.9681446,19.7730028 41.5663142,20.046281 C42.1644837,20.3195592 42.6702888,20.6721763 43.0837295,21.1041322 C43.4971702,21.5360882 43.8138482,22.0253444 44.0337635,22.5719008 C44.2536787,23.1184573 44.3636364,23.6561983 44.3636364,24.185124 L44.3636364,37.6991736 C44.3636364,38.1046832 44.271272,38.5013774 44.0865431,38.8892562 C43.9018143,39.277135 43.6555092,39.6297521 43.3476278,39.9471074 C43.0397465,40.2644628 42.687882,40.5201102 42.2920345,40.7140496 C41.8961871,40.907989 41.4871447,41.0049587 41.0649073,41.0049587 L41.0649073,26.2214876 C41.0649073,25.7630854 40.9769412,25.3355372 40.801009,24.938843 C40.6250768,24.5421488 40.3875683,24.1939394 40.0884836,23.8942149 C39.7893988,23.5944904 39.4419327,23.3564738 39.0460852,23.1801653 C38.6502377,23.0038567 38.2236021,22.9157025 37.7661783,22.9157025 L22.9350927,22.9157025 C22.9350927,22.5278237 23.0230588,22.1399449 23.198991,21.7520661 C23.3749232,21.3641873 23.6124317,21.0115702 23.9115164,20.6942149 C24.2106012,20.3768595 24.5624656,20.1212121 24.9671097,19.9272727 C25.3717538,19.7333333 25.8027877,19.6363636 26.2602115,19.6363636 L39.5079072,19.6363636 L39.5079072,19.6363636 Z M37.2119919,24.5818182 C38.0036868,24.5818182 38.5666699,24.7977961 38.9009411,25.2297521 C39.2352123,25.661708 39.4023479,26.2391185 39.4023479,26.9619835 L39.4023479,42.538843 C39.4023479,42.9796143 39.2176191,43.3939394 38.8481614,43.7818182 C38.4787038,44.169697 38.0124834,44.3636364 37.4495003,44.3636364 L21.4572621,44.3636364 C20.9822451,44.3636364 20.5600078,44.169697 20.1905501,43.7818182 C19.8210925,43.3939394 19.6363636,42.9267218 19.6363636,42.3801653 L19.6363636,26.5123967 C19.6363636,25.9482094 19.7903043,25.4853994 20.0981857,25.1239669 C20.4060671,24.7625344 20.8151095,24.5818182 21.3253129,24.5818182 L37.2119919,24.5818182 Z M36.1300087,28.6016529 C36.1300087,28.4077135 36.0684325,28.2490358 35.9452799,28.1256198 C35.8221274,28.0022039 35.6637884,27.9404959 35.4702629,27.9404959 L23.5684486,27.9404959 C23.3749232,27.9404959 23.2165842,28.0022039 23.0934316,28.1256198 C22.9702791,28.2490358 22.9087028,28.4077135 22.9087028,28.6016529 L22.9087028,34.4991736 C23.0670418,34.6931129 23.2121859,34.9090909 23.3441351,35.1471074 C23.4760842,35.385124 23.6388215,35.6099174 23.8323469,35.8214876 C24.0258724,36.0330579 24.2809741,36.2137741 24.5976521,36.3636364 C24.9143301,36.5134986 25.3541606,36.5884298 25.9171437,36.5884298 C26.7440251,36.5884298 27.4169658,36.4561983 27.9359658,36.1917355 C28.4549659,35.9272727 28.9123896,35.5922865 29.3082371,35.1867769 C29.7040846,34.7812672 30.0735423,34.3449036 30.4166101,33.877686 C30.7596779,33.4104683 31.1687203,32.969697 31.6437373,32.5553719 C32.1187542,32.1410468 32.7081272,31.7884298 33.411856,31.4975207 C34.1155849,31.2066116 35.0216358,31.0435262 36.1300087,31.0082645 L36.1300087,28.6016529 L36.1300087,28.6016529 Z" id="形状"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.2 KiB

@ -1,12 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1986.000000, -6389.000000)" fill="#507AFD" fill-rule="nonzero">
<g id="不通过" transform="translate(1986.000000, 6389.000000)">
<path d="M64,32 C64,49.6731274 49.6731274,64 32,64 C14.3268738,64 0,49.6731274 0,32 C0,14.3268738 14.3268738,0 32,0 C49.6731274,0 64,14.3268738 64,32 C64,32 64,32 64,32 Z" id="Ellipse-930" fill-opacity="0.1"></path>
<path d="M39.7482333,33.8946117 C42.6991808,33.8946117 45.0909091,36.2863399 45.0909091,39.2372874 C45.0909091,42.188235 42.6991808,44.5799632 39.7482333,44.5799632 C36.7972858,44.5799632 34.4055575,42.188235 34.4055575,39.2372874 C34.4055575,36.2863399 36.7979127,33.8946117 39.7482333,33.8946117 Z M37.4198247,20.3636364 C38.6352542,20.3636364 39.6249811,21.3102054 39.7053482,22.4981668 L39.7106177,22.6544293 L39.7106177,32.0301294 C38.2617883,32.0301294 36.9145212,32.4608286 35.7891864,33.200603 C35.6989537,32.68191 35.2735706,32.2783575 34.7434337,32.2233535 L34.6193398,32.2169538 L25.7790357,32.2169538 C25.1226427,32.2169538 24.5903813,32.7492152 24.5903813,33.4062352 C24.5903813,34.0221914 25.0576381,34.5284965 25.657413,34.5893786 L25.7790357,34.5955165 L34.2256293,34.5955165 C33.8327226,35.0663736 33.5019239,35.5857486 33.2413532,36.1408927 L33.1838326,36.136661 L33.1838326,36.136661 L33.1253717,36.1352504 L25.8699402,36.1352504 C25.2135472,36.1352504 24.6812858,36.6675118 24.6812858,37.3245318 C24.6812858,37.940488 25.1485426,38.4467931 25.7483175,38.5076752 L25.8699402,38.5138131 L32.6006334,38.5138131 C32.5805717,38.73073 32.5699139,38.9501547 32.5699139,39.172087 C32.5699139,40.7766294 33.098884,42.2566435 33.9946204,43.4540581 L34.1786098,43.6897262 L22.6544293,43.6897262 C21.4389998,43.6897262 20.4492729,42.7431572 20.3689058,41.5551958 L20.3636364,41.3989333 L20.3636364,27.8083999 C20.3636364,27.1795133 20.8413624,26.6619308 21.4543271,26.5996896 L21.5786218,26.5934145 L25.2536705,26.5934145 C25.9184095,26.5934145 26.4652323,26.0881379 26.5309885,25.4407351 L26.537618,25.3094671 L26.537618,21.5786218 C26.537618,20.9497352 27.015344,20.4321527 27.6283087,20.3699115 L27.7526034,20.3636364 L37.4198247,20.3636364 Z M41.5917907,36.6918329 C41.4158995,36.691476 41.2470992,36.7611422 41.1226598,36.8854509 L39.7104097,38.2970645 L38.2981597,36.8854509 C38.0376994,36.6296854 37.6201068,36.6305359 37.3606905,36.8873602 C37.2358759,37.0112923 37.1655227,37.1798074 37.1651631,37.3556986 C37.1648063,37.5315897 37.2344724,37.7003901 37.3587811,37.8248295 L38.7703947,39.2370795 L37.3587811,40.6493295 C37.1030156,40.9097899 37.1038661,41.3273824 37.3606905,41.5867988 C37.6216289,41.8477373 38.039767,41.8477373 38.2981597,41.5887081 L39.7104097,40.1770945 L41.1226598,41.5887081 C41.3831201,41.8444736 41.8007126,41.8436231 42.060129,41.5867988 C42.3210675,41.3258603 42.3210675,40.9077223 42.0620383,40.6493295 L40.6504247,39.2370795 L42.0620383,37.8248295 C42.3178038,37.5643691 42.3169533,37.1467766 42.060129,36.8873602 C41.936197,36.7625457 41.7676818,36.6921925 41.5917907,36.6918329 Z M34.5735741,28.300538 L28.9036422,28.300538 C28.2472491,28.300538 27.7149877,28.8327994 27.7149877,29.4898193 C27.7149877,30.1057756 28.1822446,30.6120807 28.7820195,30.6729628 L28.9036422,30.6791007 L34.5735741,30.6791007 C35.2305941,30.6791007 35.7622285,30.1468393 35.7622285,29.4898193 C35.7622285,28.8327994 35.2305941,28.300538 34.5735741,28.300538 Z M25.4646994,21.1427154 L25.4668259,21.2131231 L25.2818823,24.0261466 C25.2372137,24.7049914 24.7274923,25.2543489 24.066794,25.3601429 L23.9327344,25.3752944 L21.1197109,25.560238 C20.8274662,25.5793352 20.6570162,25.2544162 20.8090505,25.0277874 L20.8538936,24.9734339 L24.8800218,20.9473058 C25.0877759,20.7401304 25.4296108,20.8721636 25.4646994,21.1427154 Z" id="形状结合"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

@ -1,12 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1720.000000, -6389.000000)" fill="#507AFD" fill-rule="nonzero">
<g id="通过" transform="translate(1720.000000, 6389.000000)">
<path d="M64,32 C64,49.6731274 49.6731274,64 32,64 C14.3268738,64 0,49.6731274 0,32 C0,14.3268738 14.3268738,0 32,0 C49.6731274,0 64,14.3268738 64,32 C64,32 64,32 64,32 Z" id="Ellipse-930" fill-opacity="0.1"></path>
<path d="M39.7482333,33.8946117 C42.6991808,33.8946117 45.0909091,36.2863399 45.0909091,39.2372874 C45.0909091,42.188235 42.6991808,44.5799632 39.7482333,44.5799632 C36.7972858,44.5799632 34.4055575,42.188235 34.4055575,39.2372874 C34.4055575,36.2863399 36.7979127,33.8946117 39.7482333,33.8946117 Z M37.4198247,20.3636364 C38.6352542,20.3636364 39.6249811,21.3102054 39.7053482,22.4981668 L39.7106177,22.6544293 L39.7106177,32.0301294 C38.2617883,32.0301294 36.9145212,32.4608286 35.7891864,33.200603 C35.6989537,32.68191 35.2735706,32.2783575 34.7434337,32.2233535 L34.6193398,32.2169538 L25.7790357,32.2169538 C25.1226427,32.2169538 24.5903813,32.7492152 24.5903813,33.4062352 C24.5903813,34.0221914 25.0576381,34.5284965 25.657413,34.5893786 L25.7790357,34.5955165 L34.2256293,34.5955165 C33.8327226,35.0663736 33.5019239,35.5857486 33.2413532,36.1408927 L33.1838326,36.136661 L33.1838326,36.136661 L33.1253717,36.1352504 L25.8699402,36.1352504 C25.2135472,36.1352504 24.6812858,36.6675118 24.6812858,37.3245318 C24.6812858,37.940488 25.1485426,38.4467931 25.7483175,38.5076752 L25.8699402,38.5138131 L32.6006334,38.5138131 C32.5805717,38.73073 32.5699139,38.9501547 32.5699139,39.172087 C32.5699139,40.7766294 33.098884,42.2566435 33.9946204,43.4540581 L34.1786098,43.6897262 L22.6544293,43.6897262 C21.4389998,43.6897262 20.4492729,42.7431572 20.3689058,41.5551958 L20.3636364,41.3989333 L20.3636364,27.8083999 C20.3636364,27.1795133 20.8413624,26.6619308 21.4543271,26.5996896 L21.5786218,26.5934145 L25.2536705,26.5934145 C25.9184095,26.5934145 26.4652323,26.0881379 26.5309885,25.4407351 L26.537618,25.3094671 L26.537618,21.5786218 C26.537618,20.9497352 27.015344,20.4321527 27.6283087,20.3699115 L27.7526034,20.3636364 L37.4198247,20.3636364 Z M41.4753711,37.4183387 L41.4127373,37.4748619 L39.4603946,39.3561686 L38.0870331,37.9835709 C37.8080077,37.7045508 37.3637172,37.6801971 37.0558662,37.9270477 L36.9924686,37.9835709 C36.7098525,38.266187 36.6915206,38.7107345 36.9359453,39.0147378 L36.9924686,39.0781355 L38.9127305,40.9976335 C39.1945827,41.2802496 39.6398941,41.2985815 39.9438973,41.0541567 L40.0065312,40.9976335 L42.506538,38.5686626 C42.7950286,38.2777623 42.80676,37.8124072 42.5332936,37.5073402 C42.2598271,37.2022731 41.7959628,37.1632489 41.4753711,37.4183387 Z M34.5735741,28.300538 L28.9036422,28.300538 C28.2472491,28.300538 27.7149877,28.8327994 27.7149877,29.4898193 C27.7149877,30.1057756 28.1822446,30.6120807 28.7820195,30.6729628 L28.9036422,30.6791007 L34.5735741,30.6791007 C35.2305941,30.6791007 35.7622285,30.1468393 35.7622285,29.4898193 C35.7622285,28.8327994 35.2305941,28.300538 34.5735741,28.300538 Z M25.4646994,21.1427154 L25.4668259,21.2131231 L25.2818823,24.0261466 C25.2372137,24.7049914 24.7274923,25.2543489 24.066794,25.3601429 L23.9327344,25.3752944 L21.1197109,25.560238 C20.8274662,25.5793352 20.6570162,25.2544162 20.8090505,25.0277874 L20.8538936,24.9734339 L24.8800218,20.9473058 C25.0877759,20.7401304 25.4296108,20.8721636 25.4646994,21.1427154 Z" id="形状结合"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="96px" height="96px" viewBox="0 0 96 96" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>可疑文件夹</title>
<defs>
<radialGradient cx="49.9999974%" cy="50.0000039%" fx="49.9999974%" fy="50.0000039%" r="110.414469%" gradientTransform="translate(0.500000,0.500000),rotate(75.075110),scale(1.000000,1.409640),translate(-0.500000,-0.500000)" id="radialGradient-1">
<stop stop-color="#FFFCFC" stop-opacity="0.1" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0.41" offset="100%"></stop>
</radialGradient>
<linearGradient x1="-0.00164029895%" y1="20.3389764%" x2="49.9999972%" y2="99.9999913%" id="linearGradient-2">
<stop stop-color="#3964EA" stop-opacity="0.18" offset="0%"></stop>
<stop stop-color="#A37D7D" stop-opacity="0" offset="100%"></stop>
</linearGradient>
<rect id="path-3" x="0" y="0" width="95.9411163" height="95.9411163" rx="15.9901861"></rect>
<rect id="path-4" x="0" y="0" width="95.9411163" height="95.9411163" rx="15.9901861"></rect>
<filter x="-1.6%" y="-1.6%" width="103.1%" height="103.1%" filterUnits="objectBoundingBox" id="filter-5">
<feOffset dx="3" dy="0" in="SourceAlpha" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.80541166 0 0 0 0 0.85265276 0 0 0 0 1 0 0 0 0.37 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-6">
<stop stop-color="#92C0FF" offset="0%"></stop>
<stop stop-color="#507AFD" offset="100%"></stop>
</linearGradient>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="无法上传iconfont" transform="translate(-392.000000, -80.000000)">
<g id="Frame-18" transform="translate(392.000000, 80.000000)">
<g id="路径">
<use fill="url(#radialGradient-1)" xlink:href="#path-3"></use>
<use fill="url(#linearGradient-2)" xlink:href="#path-3"></use>
</g>
<g id="路径" fill="black" fill-opacity="1">
<use filter="url(#filter-5)" xlink:href="#path-4"></use>
</g>
<g id="编组-50" transform="translate(24.930558, 27.327848)">
<g id="编组" fill="url(#linearGradient-6)">
<path d="M46.0573921,37.8007842 L46.0573921,8.94799551 C46.0573921,5.44326823 42.8673831,5.77157479 42.8673831,5.77157479 C42.8673831,5.77157479 23.8138175,5.79417887 24.8215345,5.77157479 C23.7282311,5.79417887 23.188438,5.20029046 23.188438,5.20029046 C23.188438,5.20029046 22.4280135,3.8954361 21.0648136,1.83035047 C19.6341878,-0.333523352 17.9784228,0.0217020285 17.9784228,0.0217020294 L3.93665198,0.0217020294 C0.0450149641,0.0217020294 0,3.76509234 0,3.76509234 L0,37.6073294 C0,41.7824512 3.15381664,41.2650045 3.15381664,41.2650045 L43.1554403,41.2650045 C46.5298238,41.2650045 46.0573921,37.8007842 46.0573921,37.8007842 Z" id="形状"></path>
</g>
<path d="M43.7347101,9.15040185 C43.7347101,9.30411916 43.6736461,9.4515406 43.5649516,9.56023515 C43.456257,9.6689297 43.3088356,9.72999366 43.1551183,9.72999366 L3.35648058,9.72999366 C3.20276327,9.72999366 3.05534183,9.6689297 2.94664728,9.56023515 C2.83795273,9.4515406 2.77688877,9.30411916 2.77688877,9.15040185 C2.77688877,8.83030213 3.03638086,8.57081004 3.35648058,8.57081004 L43.1551183,8.57081004 C43.3088356,8.57081004 43.456257,8.631874 43.5649516,8.74056855 C43.6736461,8.8492631 43.7347101,8.99668455 43.7347101,9.15040185 L43.7347101,9.15040185 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M33.616325,23.2641708 C33.616325,23.46252 33.5442625,23.6350452 33.3973681,23.7818751 L27.5087797,29.6731039 C27.3620142,29.819805 27.1892958,29.8920608 26.9909466,29.8920608 C26.7925974,29.8920608 26.6200079,29.819805 26.4732424,29.6731039 C26.3264768,29.5261452 26.2542855,29.3562604 26.2542855,29.1552708 L26.2542855,26.2057925 L23.6758103,26.2057925 C22.9236289,26.2057925 22.251238,26.2316165 21.6588308,26.2753435 C21.0637832,26.3217108 20.4738875,26.4041417 19.8865678,26.5227004 C19.3018241,26.6411947 18.7917833,26.803416 18.358957,27.0094287 C17.9261307,27.2181462 17.5217688,27.4835348 17.1456782,27.8080418 C16.772099,28.1351248 16.4655594,28.5215194 16.2261235,28.9698658 C15.9890061,29.4180191 15.8036011,29.9486032 15.6670106,30.5643229 C15.5330605,31.1774666 15.4661499,31.870272 15.4661499,32.6482131 C15.4661499,33.0680951 15.4867576,33.5395609 15.5227567,34.0624815 C15.5227567,34.1088488 15.5330605,34.1989431 15.5536682,34.3329576 C15.574276,34.4669078 15.5845798,34.5674347 15.5845798,34.6369857 C15.5845798,34.7528397 15.5510923,34.8481504 15.4892692,34.9254937 C15.4248701,35.0026438 15.3347113,35.0413476 15.2188574,35.0413476 C15.0952111,35.0413476 14.9895322,34.9769485 14.8968619,34.8455744 C14.8452783,34.7760234 14.7938234,34.691081 14.7449445,34.590554 C14.6985127,34.492603 14.6496338,34.3742375 14.5903867,34.2427989 C14.5336511,34.1114892 14.495076,34.0187545 14.469252,33.9671708 C13.4929618,31.7879056 13.0086806,30.0594984 13.0086806,28.784332 C13.0086806,27.259426 13.2121817,25.9816836 13.619184,24.9538742 C14.8633744,21.8678698 18.2146386,20.322356 23.6808978,20.322356 L26.2568614,20.322356 L26.2568614,17.3754536 C26.2568614,17.1771044 26.328924,17.0045149 26.4756895,16.8577494 C26.6225838,16.7107906 26.792533,16.6387924 26.9935226,16.6387924 C27.1918718,16.6387924 27.3644614,16.710855 27.5112269,16.8577494 L33.3999441,22.7463378 C33.5416221,22.8956792 33.616325,23.0658216 33.616325,23.2641708 L33.616325,23.2641708 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(23.312503, 25.840070) scale(-1, 1) translate(-23.312503, -25.840070) "></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.1 KiB

@ -1,16 +0,0 @@
<?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>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1194.000000, -6389.000000)" fill="#507AFD" fill-rule="nonzero">
<g id="待审批" transform="translate(1194.000000, 6389.000000)">
<path d="M64,32 C64,49.6731274 49.6731274,64 32,64 C14.3268738,64 0,49.6731274 0,32 C0,14.3268738 14.3268738,0 32,0 C49.6731274,0 64,14.3268738 64,32 C64,32 64,32 64,32 Z" id="Ellipse-930" fill-opacity="0.1"></path>
<g id="待提交" transform="translate(18.909091, 18.909091)">
<rect id="矩形" opacity="0" x="0" y="0" width="26.1818182" height="26.1818182"></rect>
<path d="M23.4605455,15.3130909 C22.6325455,15.9136364 20.1436364,18.4876364 19.2485455,18.6234545 C17.5823972,18.6788919 15.9145922,18.5885479 14.2641818,18.3534545 C12.3332727,18.1341818 13.086,17.1916364 13.392,17.0901818 C13.698,16.9903636 17.3929091,16.7465455 18.6267273,16.5763636 C19.7378182,16.4225455 19.5774545,15.0987273 18.3289091,15.048 C17.0787273,14.9989091 11.4054545,14.5325455 9.49909091,14.6863636 C7.59272727,14.8401818 4.79945455,17.9214545 4.79945455,17.9214545 L4.90254545,18.4107273 L8.96727273,22.7667273 L9.50890909,22.7127273 C10.0701391,22.3256833 10.68478,22.0224973 11.3334545,21.8127273 C12.1630909,21.6032727 16.74,22.212 18.3223636,21.9354545 C19.9047273,21.6589091 23.9776364,17.5418182 24.8727273,16.6385455 C25.308,16.2 25.6172727,15.5683636 25.5272727,15.4047273 C25.092,14.6061818 23.9956364,14.9236364 23.4605455,15.3130909 L23.4605455,15.3130909 Z M7.91509091,22.9876364 C7.58781818,22.6227273 4.35272727,19.1667273 3.97636364,18.7592727 C3.85570076,18.5959645 3.66899983,18.4943709 3.46634331,18.4817444 C3.26368679,18.4691178 3.06581911,18.5467507 2.92581818,18.6938182 C2.67054545,18.9392727 1.60527273,19.9374545 1.30090909,20.1910909 C0.831272727,20.5838182 1.24690909,21.2350909 1.51690909,21.5427273 C1.78690909,21.8503636 4.66690909,25.0772727 5.09563636,25.5845455 C5.52436364,26.0934545 5.96127273,26.0378182 6.28036364,25.7121818 C6.60109091,25.3849091 7.344,24.6158182 7.81854545,24.2132727 C8.01876568,24.0816036 8.14705882,23.8649412 8.16624482,23.6260755 C8.18543081,23.3872099 8.09336453,23.1528479 7.91672727,22.9909091 L7.91672727,22.9876364 L7.91509091,22.9876364 Z" id="形状"></path>
<path d="M4.90909091,14.6667273 L4.90909091,2.18618182 C4.90909091,1.11763636 5.77636364,0.252 6.84490909,0.250363636 L21.4036364,0.250363636 C22.4721818,0.250363636 23.3394545,1.11763636 23.3394545,2.18618182 L23.3394545,13.8109091 C23.3067273,13.8305455 23.2756364,13.8534545 23.2445455,13.8763636 L18.1963636,13.608 C17.892,13.5949091 17.3225455,13.5572727 16.6025455,13.5098182 C14.8336364,13.3936364 12.1614545,13.2169091 10.4809091,13.2169091 C10.0881818,13.2169091 9.76581818,13.2267273 9.522,13.2463636 C7.86574971,13.5382965 6.31867571,14.2708532 5.04327273,15.3670909 C4.95470166,15.1442097 4.90909091,14.9065623 4.90909091,14.6667273 Z M10.2567273,7.12636364 C9.83468131,7.12636364 9.49254545,7.46849949 9.49254545,7.89054545 C9.49254545,8.31259142 9.83468131,8.65472727 10.2567273,8.65472727 L17.8985455,8.65472727 C18.3205914,8.65472727 18.6627273,8.31259142 18.6627273,7.89054545 C18.6627273,7.46849949 18.3205914,7.12636364 17.8985455,7.12636364 L10.2567273,7.12636364 L10.2567273,7.12636364 Z M10.2567273,3.30545455 C9.83468131,3.30545455 9.49254545,3.6475904 9.49254545,4.06963636 C9.49254545,4.49168233 9.83468131,4.83381818 10.2567273,4.83381818 L17.8985455,4.83381818 C18.3205914,4.83381818 18.6627273,4.49168233 18.6627273,4.06963636 C18.6627273,3.6475904 18.3205914,3.30545455 17.8985455,3.30545455 L10.2567273,3.30545455 L10.2567273,3.30545455 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

@ -1,18 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

@ -1,10 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onBeforeMount, reactive, ref, watch } from 'vue' import { computed, onBeforeMount, reactive, ref } from 'vue'
import { useMessage } from 'naive-ui' import { useMessage } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { audit } from '@/api/task/task' import { audit } from '@/api/task/task'
const emit = defineEmits(['success', 'close', 'show']) const emit = defineEmits(['success'])
const message = useMessage() const message = useMessage()
const loading = ref(false) const loading = ref(false)
@ -21,8 +21,12 @@ const cardStyle = {
} }
const rules = { const rules = {
disposeTypeId: [{ required: true, message: '请选择处理方式', trigger: 'blur' }], disposeTypeId: [
failCauseId: [{ required: true, message: '请选择不通过原因', trigger: 'blur' }], { required: true, message: '请选择处理方式', trigger: 'blur' },
],
failCauseId: [
{ required: true, message: '请选择不通过原因', trigger: 'blur' },
],
} }
const formData = reactive({ const formData = reactive({
@ -38,21 +42,12 @@ function showModal(value) {
function closeModal() { function closeModal() {
show.value = false show.value = false
emit('close')
formData.disposeTypeId = '262403670085013522'
formData.failCauseId = '260402999231251188'
formData.comment = ''
} }
defineExpose({ defineExpose({
showModal, showModal,
closeModal,
})
watch(show, (value) => {
// console.log(value)
emit('show', value)
}) })
const disposeOptions = ref<any[]>([]) // const disposeOptions = ref<any[]>([]) //
const failCauseOptions = ref<any[]>([]) // const failCauseOptions = ref<any[]>([]) //
const selectItem = ref(null) const selectItem = ref(null)
@ -66,9 +61,7 @@ onBeforeMount(async () => {
}) })
const showOther = computed(() => { const showOther = computed(() => {
const failCauseItem = failCauseOptions.value.find( const failCauseItem = failCauseOptions.value.find(item => item.value === formData.failCauseId)
item => item.value === formData.failCauseId,
)
return failCauseItem?.label === '其他' return failCauseItem?.label === '其他'
}) })
/* /*
@ -77,8 +70,8 @@ const showOther = computed(() => {
* id: '' * id: ''
* taskId:'' * taskId:''
* fromTaskName: '' * fromTaskName: ''
* }] * }]
*/ */
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
e.preventDefault() e.preventDefault()
formRef.value.validate(async (errors) => { formRef.value.validate(async (errors) => {
@ -92,12 +85,8 @@ async function handleSumbit(e: MouseEvent) {
taskName: item.fromTaskName, taskName: item.fromTaskName,
}) })
}) })
const disposeTypeItem = disposeOptions.value.find( const disposeTypeItem = disposeOptions.value.find(item => item.value === formData.disposeTypeId)
item => item.value === formData.disposeTypeId, const failCauseItem = failCauseOptions.value.find(item => item.value === formData.failCauseId)
)
const failCauseItem = failCauseOptions.value.find(
item => item.value === formData.failCauseId,
)
const param = { const param = {
result: false, result: false,
@ -116,9 +105,7 @@ async function handleSumbit(e: MouseEvent) {
emit('success', param) emit('success', param)
closeModal() closeModal()
} }
else { else { message.error(res.message) }
message.error(res.message)
}
}) })
} }
finally { finally {
@ -126,9 +113,6 @@ async function handleSumbit(e: MouseEvent) {
} }
} }
}) })
formData.disposeTypeId = '262403670085013522'
formData.failCauseId = '260402999231251188'
formData.comment = ''
} }
async function selectChange(id) { async function selectChange(id) {
@ -138,17 +122,16 @@ async function selectChange(id) {
<template> <template>
<n-modal v-model:show="show" transform-origin="center"> <n-modal v-model:show="show" transform-origin="center">
<n-card <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
:style="cardStyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-header"> <div class="wrapper-header">
<span class="wrapper-left">选择不通过原因</span> <span class="wrapper-left">选择不通过原因</span>
<SvgIcon size="22" class="icon" name="close-none-border" @click="closeModal" /> <SvgIcon
size="22"
class="icon"
name="close-none-border"
@click="closeModal"
/>
</div> </div>
<n-form <n-form
ref="formRef" ref="formRef"
@ -159,28 +142,14 @@ async function selectChange(id) {
> >
<div class="wrapper-content"> <div class="wrapper-content">
<n-form-item class="form-item" label="处理方式" path="disposeTypeId"> <n-form-item class="form-item" label="处理方式" path="disposeTypeId">
<n-select <n-select v-model:value="formData.disposeTypeId" filterable :options="disposeOptions" />
v-model:value="formData.disposeTypeId"
filterable
:options="disposeOptions"
/>
</n-form-item> </n-form-item>
<n-form-item class="form-item" label="不通过原因" path="failCauseId"> <n-form-item class="form-item" label="不通过原因" path="failCauseId">
<n-select <n-select v-model:value="formData.failCauseId" filterable :options="failCauseOptions" @change="selectChange" />
v-model:value="formData.failCauseId"
filterable
:options="failCauseOptions"
@change="selectChange"
/>
</n-form-item> </n-form-item>
<n-form-item v-show="showOther" class="form-item-area" label="" path=""> <n-form-item v-show="showOther" class="form-item-area" label="" path="">
<n-input <n-input v-model:value="formData.comment" placeholder-class="pl" type="textarea" placeholder="备注内容" />
v-model:value="formData.comment"
placeholder-class="pl"
type="textarea"
placeholder="备注内容"
/>
</n-form-item> </n-form-item>
</div> </div>
</n-form> </n-form>
@ -190,7 +159,7 @@ async function selectChange(id) {
<n-button type="info" @click="handleSumbit"> <n-button type="info" @click="handleSumbit">
确定 确定
</n-button> </n-button>
<n-button secondary class="btn" style="margin-left: 15px" @click="closeModal"> <n-button secondary class="btn" style="margin-left:15px" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
@ -207,7 +176,7 @@ async function selectChange(id) {
align-items: center; align-items: center;
height: 56px; height: 56px;
border-bottom: 0.5px solid #d9d9d9; border-bottom: 0.5px solid #d9d9d9;
padding: 0 24px; padding: 0 24px
} }
&-left { &-left {
@ -217,7 +186,7 @@ async function selectChange(id) {
color: #333333; color: #333333;
} }
.icon { .icon{
cursor: pointer; cursor: pointer;
} }
@ -240,7 +209,7 @@ async function selectChange(id) {
&:before { &:before {
background-color: #1980ff; background-color: #1980ff;
content: ""; content: '';
width: 5px; width: 5px;
border-radius: 2px; border-radius: 2px;
top: 0; top: 0;
@ -249,13 +218,14 @@ async function selectChange(id) {
} }
} }
.form-item-area { .form-item-area{
margin-top: -30px; margin-top: -30px;
} }
} }
::v-deep(.n-card__content) { ::v-deep(.n-card__content) {
padding: 0 !important; padding: 0!important;
} }
::v-deep(.n-card > .n-card-header) { ::v-deep(.n-card > .n-card-header) {
@ -273,10 +243,10 @@ async function selectChange(id) {
} }
::v-deep(.n-input__placeholder) { ::v-deep(.n-input__placeholder) {
color: #333333 !important; color: #333333!important;
} }
.btn { .btn{
border: 1px solid #cad2dd; border: 1px solid #cad2dd;
background-color: #fff; background-color: #fff;
} }

@ -1,209 +1,98 @@
<script lang="ts" setup> <template>
import { defineProps, onMounted, ref } from "vue"; <div class="header_wrap">
import { gettaskToolsCount } from "@/api/home/main"; <div v-for="(item, index) in data" :key="index" class="header_item">
<img :src="item.link" />
defineProps({ <div class="data_wrap">
hasColor: { <div class="data_title">{{ item.count }}</div>
type: Boolean, <div class="data_content">{{ item.title }}</div>
default: () => false, </div>
}, </div>
}); <SvgIcon size="14px" style="cursor: pointer" name="setting"></SvgIcon>
</div>
</template>
const datalist = ref([ <script lang="ts" setup>
{
link: "count",
title: "任务总数",
count: 0,
},
{
link: "wait",
title: "待审批",
count: 0,
},
{
link: "done",
title: "已审批",
count: 0,
},
{
link: "resolve",
title: "通过",
count: 0,
color: "#03c984",
},
{
link: "reject",
title: "不通过",
count: 0,
color: "#ff8b8b",
},
{
link: "reimg",
title: "图片重复数",
count: 0,
},
{
link: "breakcount",
title: "小结重复数",
count: 0,
},
]);
function initRem() { const data = [
const designWidth = 1440;
const rempPx = 16;
const scale = window.innerWidth / designWidth;
document.documentElement.style.fontSize = `${scale * rempPx}px`;
}
onMounted(() => {
initRem();
getData();
});
async function getData() {
const { data } = await gettaskToolsCount();
if (data) {
const {
total,
treat,
alreadyApprove,
repeatedNodules,
repeat,
approvedCount,
notGoCount,
} = data;
let newdata=[
{ {
link: "count", link: "/src/assets/images/taskCount.png",
title: "任务总数", title: "任务包总数",
count: total, count: 6399,
}, },
{ {
link: "wait", link: "/src/assets/images/nocheck.png",
title: "待审批", title: "未标记",
count: treat, count: 6290,
}, },
{ {
link: "done", link: "/src/assets/images/check.png",
title: "已审批", title: "已标记",
count: alreadyApprove, count: 109,
}, },
{ {
link: "resolve", link: "/src/assets/images/status.png",
title: "通过", title: "真",
count: approvedCount, count: 3290,
color: "#03c984",
}, },
{ {
link: "reject", link: "/src/assets/images/status.png",
title: "不通过", title: "假",
count: notGoCount, count: 3000,
color: "#ff8b8b",
}, },
{ {
link: "reimg", link: "/src/assets/images/pic.png",
title: "片重复数", title: "相似度100%图",
count: repeat, count: 230,
}, },
{ {
link: "breakcount", link: "/src/assets/images/xiaojie.png",
title: "小结重复数", title: "小结重复数",
count: repeatedNodules, count: 365,
}, },
] ];
datalist.value =newdata ;
console.log(datalist.value)
}
}
</script> </script>
<template>
<div class="header_wrap" :style="hasColor ? '' : 'margin-top: 7.375rem;'">
<div v-for="(item, index) in datalist" :key="index" class="header_box">
<div class="header_item">
<SvgIcon :name="item.link" :style="index == 0 ? 'margin-left:0.5rem' : ''" />
<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>
<div
class="line"
:style="
hasColor
? 'margin-left:2.5rem;margin-right:2.0625rem'
: 'margin-left:1.25rem;margin-right:0.8125rem'
"
/>
</div>
<SvgIcon size="14px" style="cursor: pointer" name="setting" class="settingSvg" />
</div>
</template>
<style scoped lang="less"> <style scoped lang="less">
.header_wrap { .header_wrap {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 1rem 1rem 1rem 3.125rem; padding: 20px 30px;
background: #f5f7f9; background: #fff;
margin-bottom: 1rem;
// 180-62 header
padding-left: 2.125rem;
.header_box {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
min-width: 10%;
.header_item { .header_item {
width: 10%;
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
svg { img{
width: 2.75rem !important; width: 50px;
height: 2.75rem !important; height: 50px
} }
.data_wrap { .data_wrap {
margin-left: 0.75rem;
.data_title { .data_title {
font-size: 1.125rem; font-size: 20px;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold; font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
font-weight: 900; font-weight: Bold;
text-align: left; text-align: left;
color: #202020; color: #202020;
line-height: 1.4375rem; line-height: 23px;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }
.data_content { .data_content {
opacity: 0.6; opacity: 0.6;
font-size: 0.75rem; font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular; font-family: PingFang SC, PingFang SC-Regular;
font-weight: 500; font-weight: Regular;
text-align: center; text-align: center;
color: #202020; color: #202020;
line-height: 1rem; line-height: 16px;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }
} }
} }
}
}
.settingSvg {
width: 1rem !important;
height: 1rem !important;
} }
.line {
width: 0.0625rem;
height: 1.25rem;
background: #e8e8e8;
}//
</style> </style>

@ -33,7 +33,6 @@ function closeModal() {
defineExpose({ defineExpose({
showModal, showModal,
closeModal,
}) })
const backOptions = ref<any[]>([]) const backOptions = ref<any[]>([])
@ -47,9 +46,7 @@ const showOther = computed(() => {
}) })
const comomitValue = computed(() => { const comomitValue = computed(() => {
return (selectItem.value as any)?.label === '其他' return (selectItem.value as any)?.label === '其他' ? otherValue.value : selectRejectId.value
? otherValue.value
: selectRejectId.value
}) })
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
@ -97,13 +94,7 @@ async function selectChange(id) {
<template> <template>
<n-modal v-model:show="show" transform-origin="center"> <n-modal v-model:show="show" transform-origin="center">
<n-card <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
:style="cardStyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-header"> <div class="wrapper-header">
<span class="wrapper-left">选择不通过原因</span> <span class="wrapper-left">选择不通过原因</span>
@ -115,29 +106,12 @@ async function selectChange(id) {
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<span>处理方式</span> <span>处理方式</span>
<n-select <n-select v-model:value="selectBackId" filterable style="margin-top: 10px;" :options="backOptions" />
v-model:value="selectBackId"
filterable
style="margin-top: 10px"
:options="backOptions"
/>
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<span>不通过原因</span> <span>不通过原因</span>
<n-select <n-select v-model:value="selectRejectId" filterable style="margin-top: 10px;" :options="reasonOptions" @change="selectChange" />
v-model:value="selectRejectId" <n-input v-show="showOther" v-model:value="otherValue" type="textarea" placeholder="备注内容" style="margin-top: 10px;" />
filterable
style="margin-top: 10px"
:options="reasonOptions"
@change="selectChange"
/>
<n-input
v-show="showOther"
v-model:value="otherValue"
type="textarea"
placeholder="备注内容"
style="margin-top: 10px"
/>
</div> </div>
<!-- <div class="wrapper-content"> <!-- <div class="wrapper-content">
@ -151,7 +125,7 @@ async function selectChange(id) {
<n-button type="info" @click="handleSumbit"> <n-button type="info" @click="handleSumbit">
确认 确认
</n-button> </n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal"> <n-button secondary style="margin-left:15px" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
@ -191,7 +165,7 @@ async function selectChange(id) {
margin-bottom: 8px; margin-bottom: 8px;
&:after { &:after {
content: ""; content: '';
display: block; display: block;
width: 18px; width: 18px;
height: 1px; height: 1px;
@ -217,7 +191,7 @@ async function selectChange(id) {
&:before { &:before {
background-color: #1980ff; background-color: #1980ff;
content: ""; content: '';
width: 5px; width: 5px;
border-radius: 2px; border-radius: 2px;
top: 0; top: 0;

@ -1,12 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineEmits, reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { QuillEditor } from '@vueup/vue-quill' import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css' import '@vueup/vue-quill/dist/vue-quill.snow.css'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import { queryNote, saveNote } from '@/api/home/main' import { queryNote, saveNote } from '@/api/home/main'
const emit = defineEmits(['close'])
const quillEditor = ref() const quillEditor = ref()
const cardStyle = { const cardStyle = {
@ -29,14 +27,12 @@ const options = reactive({
}) })
function initHandler() { function initHandler() {
queryNote() queryNote().then((res) => {
.then((res) => {
if (res.data) if (res.data)
note.value = res.data.notecontent note.value = res.data.notecontent
console.log('note:', note.value) console.log('note:', note.value)
}) }).catch(e => console.log(e))
.catch(e => console.log(e))
} }
const saveHandler = debounce(() => { const saveHandler = debounce(() => {
@ -48,18 +44,9 @@ const saveHandler = debounce(() => {
<template> <template>
<div> <div>
<n-card :style="cardStyle" :bordered="false" class="mt-4 proCard"> <n-card :style="cardStyle" :bordered="false" class="mt-4 proCard">
<div class="top_box">
<div class="title"> <div class="title">
备注信息 备注信息
</div> </div>
<SvgIcon
size="20"
color="#000000"
name="close-none-border"
class="close_box"
@click="emit('close')"
/>
</div>
<QuillEditor <QuillEditor
ref="quillEditor" ref="quillEditor"
v-model:content="note" v-model:content="note"
@ -75,25 +62,15 @@ const saveHandler = debounce(() => {
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.top_box { .title{
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: space-between;
.close_box {
cursor: pointer;
margin-bottom: 25px;
}
}
.title {
font-size: 18px; font-size: 18px;
font-family: PingFang SC, PingFang SC-Medium; font-family: PingFang SC, PingFang SC-Medium;
font-weight: Medium;
color: #333333; color: #333333;
margin-bottom: 24px; margin-bottom: 24px;
font-weight: 500; }
}
.ql-toolbar.ql-snow { .ql-toolbar.ql-snow {
border-top: none; border-top: none;
border-left: none; border-left: none;
border-right: none; border-right: none;
@ -101,9 +78,9 @@ const saveHandler = debounce(() => {
margin-top: -10px; margin-top: -10px;
background: #f8f8f8; background: #f8f8f8;
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
} }
.ql-container.ql-snow { .ql-container.ql-snow {
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
} }
</style> </style>

@ -1,30 +0,0 @@
<template>
<div class="ip_box" :style="canClick?'cursor: pointer;':''">
<img :src="IPImg" />
</div>
</template>
<script setup>
import IPImg from "@/assets/images/IP.png";
import { defineProps } from "vue";
defineProps({
canClick: {
type: Boolean,
default: () => false,
},
});
</script>
<style scoped lang="less">
.ip_box {
position: fixed;
bottom: 80px;
right: 20px;
z-index: 1000;
img {
width: 80px;
height: auto;
}
}
</style>

@ -1,9 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { nextTick, onMounted, onUnmounted, reactive, ref, toRefs } from 'vue' import { reactive, ref, toRefs } from 'vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { deleteSearch, getSearchList, historySearch } from '@/api/search/search' import { deleteSearch, getSearchList, historySearch } from '@/api/search/search'
import { storage } from '@/utils/Storage'
const emit = defineEmits(['close']) const emit = defineEmits(['close'])
@ -26,8 +25,6 @@ const inputHandler = debounce((keyword) => {
// //
async function handlerSearch(value) { async function handlerSearch(value) {
//
if(value === '/') return
const res = await getSearchList({ const res = await getSearchList({
search: value, search: value,
}) })
@ -59,27 +56,23 @@ function handlerHistory(name) {
// //
async function deleteHistory() { async function deleteHistory() {
const res = await deleteSearch({}) const res = await deleteSearch({
})
if (res.code === 'OK') if (res.code === 'OK')
historyList.value = [] historyList.value = []
} }
// //
async function getHistory() { async function getHistory() {
const res = await historySearch({}) const res = await historySearch({
})
if (res.code === 'OK') if (res.code === 'OK')
historyList.value = res.data historyList.value = res.data
} }
getHistory() getHistory()
function goPath(item, id) { function goPath(item, id) {
const desiredObject = item.data.find((item) => { router.push({ name: item.path, query: { id } })
return item.id === id
})
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') emit('close')
} }
@ -93,11 +86,6 @@ function highlightText(text, query) {
return highlightedText return highlightedText
} }
onMounted(() => {
setTimeout(() => (value.value = ''))
handlerShowList()
handlerSearch('')
})
</script> </script>
<template> <template>
@ -109,66 +97,44 @@ onMounted(() => {
<n-input <n-input
v-model:value="value" v-model:value="value"
placeholder="搜索任务ID、任务名称、提报人、拜访终端" placeholder="搜索任务ID、任务名称、提报人、拜访终端"
placeholder-style="width:304px;height:22px;margin:17px 0 17px 12px;"
style="font-size: 16px; font-weight: 500; color: #333333"
type="text" type="text"
@input="inputHandler" @input="inputHandler"
@mousedown="handlerShowList" @mousedown="handlerShowList"
> >
<template #prefix> <template #prefix>
<SvgIcon <SvgIcon name="magnifying-1" size="18" />
name="magnifying-1"
width="21"
height="20"
style="margin: 10px 0 10px 4px"
/>
</template> </template>
</n-input> </n-input>
</div> </div>
<div v-show="showList && (historyList.length || resultList.length)" class="list_box"> <div v-show="showList && (historyList.length || resultList.length)" class="list_box">
<div <div
v-if="historyList.length && !value" v-if="historyList.length"
class="list_classfiy_item" class="list_classfiy_item"
style="border-bottom: 1px solid #e4e4e4" style="border-bottom:1px solid #e4e4e4"
> >
<div class="list_title"> <div class="list_title">
历史搜索 历史搜索
</div> </div>
<div class="flex history-list"> <div class="flex history-list">
<div class="tag-wrap"> <div class="tag-wrap">
<div <div v-for="(item, index) of historyList" :key="index" class="tag" @click="handlerHistory(item.historyname)">
v-for="(item, index) of historyList"
:key="index"
class="tag"
@click="handlerHistory(item.historyname)"
>
{{ item.historyname }} {{ item.historyname }}
</div> </div>
</div> </div>
<SvgIcon <SvgIcon class="icon-delete" name="delete-history" size="16" @click="deleteHistory" />
class="icon-delete"
name="delete-history"
size="16"
@click="deleteHistory"
/>
</div> </div>
</div> </div>
<div <div
v-for="(item, index) in resultList" v-for="(item, index) in resultList"
:key="index" :key="index"
class="list_classfiy_item" class="list_classfiy_item"
:style="index === resultList.length - 1 ? '' : 'border-bottom:1px solid #e4e4e4'" :style="(index === resultList.length - 1) ? '' : 'border-bottom:1px solid #e4e4e4'"
> >
<div class="list_title"> <div class="list_title">
{{ item.title }} {{ item.title }}
</div> </div>
<div <div v-for="(sitem, sindex) in item.data" :key="sindex" class="list_item" @click="goPath(item, sitem.id)">
v-for="(sitem, sindex) in item.data" <SvgIcon name="task-icon" size="16" />
:key="sindex"
class="list_item"
@click="goPath(item, sitem.id)"
>
<SvgIcon name="task-icon" size="16" style="margin-left: 16px" />
<span class="name" v-html="highlightText(sitem.name, value)" /> <span class="name" v-html="highlightText(sitem.name, value)" />
</div> </div>
</div> </div>
@ -178,20 +144,17 @@ onMounted(() => {
<style lang="less" scoped> <style lang="less" scoped>
.input_wrap { .input_wrap {
// width: 60%; width: 60%;
width: 808px;
position: absolute; position: absolute;
top: 20%; top: 20%;
left: 30%; left: 20%;
box-shadow: none !important; box-shadow: none!important;
.ip_box{
.ip_box {
z-index: 0; z-index: 0;
position: relative; position: relative;
left: calc(50% - 40px); left: calc(50% - 40px);
top: 30px; top: 30px;
img{
img {
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
@ -203,11 +166,9 @@ onMounted(() => {
border: 1px solid #507afd; border: 1px solid #507afd;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15), 0px 0px 0px 0.5px #d4e3fc; box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15),
// width: 808px; 0px 0px 0px 0.5px #d4e3fc;
// height: 56px;
} }
.list_box { .list_box {
background: #fefefe; background: #fefefe;
border: 1px dashed #f4f4f4; border: 1px dashed #f4f4f4;
@ -215,57 +176,46 @@ onMounted(() => {
box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15); box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15);
margin-top: 15px; margin-top: 15px;
padding: 8px 16px; padding: 8px 16px;
width: 802px;
height: 400px;
.list_classfiy_item { .list_classfiy_item {
margin-bottom: -2px;
.list_title { .list_title {
font-size: 12px; font-size: 12px;
font-family: PingFang SC, PingFang SC-Regular; font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular; font-weight: Regular;
color: #999999; color: #999999;
line-height: 17px; line-height: 17px;
margin: 6px 0 12px 0; margin: 10px 0 10px 5px;
font-weight: 500;
} }
.list_item { .list_item {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
margin: 16px 0; margin-bottom: 10px;
} }
} }
} }
} }
:deep(.n-input .n-input-wrapper) { :deep(.n-input .n-input-wrapper) {
margin: 8px; margin: 8px;
} }
.history-list { .history-list{
align-items: center; align-items: center;
// margin-bottom:12;12+26=38 padding-bottom: 9px;
padding: 26px 12px 12px 0;
} }
.name { .name{
margin-left: 8px; margin-left: 5px;
cursor: pointer; cursor: pointer;
font-weight: 500;
color: #333333;
} }
.tag-wrap { .tag-wrap{
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
overflow-y: hidden; overflow-y: hidden;
overflow-x: auto; overflow-x: auto;
margin: 9px 0 9px 29px;
.tag { .tag{
font-weight: 500;
padding: 0 12px; padding: 0 12px;
height: 22px; height: 22px;
border: 1px solid #e4e7ed; border: 1px solid #e4e7ed;
@ -280,11 +230,11 @@ onMounted(() => {
} }
} }
.icon-delete { .icon-delete{
cursor: pointer; cursor: pointer;
} }
.highlight { .highlight{
color: #507afd; color: #507AFD;
} }
</style> </style>

@ -27,11 +27,11 @@ export const asideMap: Recordable<AsideEntity> = {
key: 'izstatus', key: 'izstatus',
component: PlanVue, // todo component: PlanVue, // todo
}, },
izyear: { izuptime: {
label: '', label: '',
defaultValue: null, defaultValue: null,
isDefaultFilter: false, isDefaultFilter: false,
key: 'izyear', key: 'izuptime',
component: TimeVue, component: TimeVue,
}, },
iztaskrrom: { iztaskrrom: {

@ -107,7 +107,7 @@ export const asideMap: Recordable<AsideEntity> = {
component: IztaskrromVue, component: IztaskrromVue,
}, },
iztaskstatus: { iztaskstatus: {
label: '任务审批状态', label: '任务状态',
defaultValue: null, defaultValue: null,
isDefaultFilter: false, isDefaultFilter: false,
key: 'iztaskstatus', key: 'iztaskstatus',

@ -1,5 +1,5 @@
import { defineAsyncComponent } from "vue"
import type { AsideEntity } from './aside' import type { AsideEntity } from './aside'
import { IzApprovalStatus, IzProjectVue, IzStatus, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue, IzCustomname, IzCustomtype, IzVisitcity, IzCustomlevel, IzProjecttype, IzProductVue, IzvisitproVue, IzfirmVue } from '@/views/home/aside/comp/items'
export interface RowData { export interface RowData {
id: string id: string
@ -83,164 +83,145 @@ export const asideMap: Recordable<AsideEntity> = {
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izupuser', key: 'izupuser',
// component: ReportUserVue, component: ReportUserVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/ReportUser.vue")),
}, },
izproject: { izproject: {
label: '所属项目', label: '所属项目',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izproject', key: 'izproject',
// component: IzProjectVue, component: IzProjectVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProject.vue")),
}, },
izplan: { izplan: {
label: '所属计划', label: '所属计划',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izplan', key: 'izplan',
// component: PlanVue, component: PlanVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Plan.vue")),
}, },
izstatus: { izstatus: {
label: '审批状态', label: '审批状态',
defaultValue: null, defaultValue: null,
isDefaultFilter: false, isDefaultFilter: false,
key: 'izstatus', key: 'izstatus',
// component: IzStatus, // todo component: IzStatus, // todo
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzStatus.vue")),
}, },
izyear: { izuptime: {
label: '提报时间', label: '提报时间',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: false,
key: 'izyear', key: 'izuptime',
// component: TimeVue, component: TimeVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Time.vue")),
}, },
iztaskrrom: { iztaskrrom: {
label: '任务来源', label: '任务来源',
defaultValue: null, defaultValue: null,
isDefaultFilter: false, isDefaultFilter: false,
key: 'iztaskrrom', key: 'iztaskrrom',
// component: IztaskrromVue, component: IztaskrromVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Iztaskrrom.vue")),
}, },
izshowall: { izshowall: {
label: '显示全部任务数据', label: '显示全部任务数据',
defaultValue: false, defaultValue: true,
isDefaultFilter: false, isDefaultFilter: false,
key: 'izshowall', key: 'izshowall',
// component: IzShowAll, component: PictureDownloadVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzShowAll.vue")),
inFilterList: false, inFilterList: false,
}, },
} }
// 审批添加筛选配置 (左侧) // 审批添加筛选配置 (左侧)
export const asideTaskMap: Recordable<AsideEntity> = { export const asideTaskMap: Recordable<AsideEntity> = {
izApprovalStatus: { izstatus: {
label: '审批状态', label: '审批状态',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izApprovalStatus', key: 'izApprovalStatus',
// component: IzApprovalStatus, // todo component: IzApprovalStatus, // todo
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzApprovalStatus.vue")),
}, },
izuptime: { izuptime: {
label: '提报时间', label: '提报时间',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izuptime', key: 'izuptime',
// component: TimeVue, component: TimeVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Time.vue")),
}, },
izupuser: { izupuser: {
label: '提报人', label: '提报人',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izupuser', key: 'izupuser',
// component: ReportUserVue, component: ReportUserVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/ReportUser.vue")),
}, },
iztaskrrom: { iztaskrrom: {
label: '任务来源', label: '任务来源',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'iztaskrrom', key: 'iztaskrrom',
// component: IztaskrromVue, component: IztaskrromVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Iztaskrrom.vue")),
}, },
izcustomname: { izcustomname: {
label: '拜访客户', label: '拜访客户',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomname', key: 'izcustomname',
// component: IzCustomname, component: IzCustomname,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomname.vue")),
}, },
izcustomtype: { izcustomtype: {
label: '客户类型', label: '客户类型',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomtype', key: 'izcustomtype',
// component: IzCustomtype, component: IzCustomtype,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomtype.vue")),
}, },
izproject: { izproject: {
label: '所属项目', label: '所属项目',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izproject', key: 'izproject',
// component: IzProjectVue, component: IzProjectVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProject.vue")),
}, },
izvisitpro: { izvisitpro: {
label: '拜访省份/直辖市', label: '拜访省份/直辖市',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izvisitpro', key: 'izvisitpro',
// component: IzVisitcity, component: IzVisitcity,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzVisitcity.vue")),
}, },
izcustomlevel: { izcustomlevel: {
label: '客户级别', label: '客户级别',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomlevel', key: 'izcustomlevel',
// component: IzCustomlevel, component: IzCustomlevel
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomlevel.vue")),
}, },
izprojecttype: { izprojecttype: {
label: '项目类别', label: '项目类别',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izprojecttype', key: 'izprojecttype',
// component: IzProjecttype, component: IzProjecttype,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProjecttype.vue")),
}, },
izproductname: { izproductname: {
label: '产品名称', label: '产品名称',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izproductname', key: 'izproductname',
// component: IzProductVue, component: IzProductVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProduct.vue")),
}, },
izvisitcity: { izvisitcity: {
label: '拜访城市', label: '拜访城市',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izvisitcity', key: 'izvisitcity',
// component: IzvisitproVue, component: IzvisitproVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Izvisitpro.vue")),
}, },
izfirm: { izfirm: {
label: '厂商', label: '厂商',
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izfirm', key: 'izfirm',
// component: IzfirmVue, component: IzfirmVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Izfirm.vue")), }
},
} }

@ -37,7 +37,7 @@ export const workPackageMap: Recordable<PackageEntity> = {
key: 'upuser', key: 'upuser',
}, },
status: { status: {
label: '任务审批状态', label: '任务状态',
isDefault: false, isDefault: false,
key: 'upuser', key: 'upuser',
}, },
@ -168,6 +168,6 @@ export const fieldMap = {
field13: '病历号', field13: '病历号',
field14: '是否重复', field14: '是否重复',
field15: '任务类型', field15: '任务类型',
field16: '任务审批状态', field16: '任务状态',
field17: '项目类别', field17: '项目类别',
} }

@ -1,14 +0,0 @@
import { inject, onMounted, onUnmounted, ref } from "vue"
export const useKeydown = (key,handler) => {
const mousetrap = inject('mousetrap') as any
const event = ref()
onMounted(() => {
event.value = mousetrap.bind(key, handler)
})
onUnmounted(() => {
event.value.unbind(key, handler)
})
}

@ -1,36 +1,34 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineOptions, ref } from "vue"; import { defineOptions, ref } from 'vue'
import Quill from "@/components/RichEditor/Quill.vue"; import Quill from '@/components/RichEditor/Quill.vue'
defineOptions({ name: "FilterModal" }); defineOptions({ name: 'FilterModal' })
const emit = defineEmits(["showNewFilter"]); const emit = defineEmits(['showNewFilter'])
const show = ref(false); const show = ref(false)
function showModal() { function showModal() {
show.value = true; show.value = true
} }
function closeModal() { function closeModal() {
show.value = false; show.value = false
} }
defineExpose({ defineExpose({
showModal, showModal,
}); })
</script> </script>
<template> <template>
<div> <div>
<n-modal <n-modal v-model:show="show" transform-origin="center">
v-model:show="show" <Quill />
transform-origin="center"
style="margin: calc(13%-147px) auto 0 !important"
>
<Quill @close="show = false" />
</n-modal> </n-modal>
</div> </div>
</template> </template>
<style lang="less" scoped></style> <style lang="less" scoped>
</style>

@ -1,40 +1,28 @@
<script lang="ts" setup> <script lang="ts" setup>
import Masonry from 'masonry-layout' import Masonry from 'masonry-layout'
import { useDialog, useMessage } from 'naive-ui' import { useDialog, useMessage } from 'naive-ui'
import { computed, nextTick, onBeforeMount, onMounted, onUpdated, reactive, ref, unref, watch } from 'vue' import { computed, onBeforeMount, onMounted, onUpdated, reactive, ref, unref, watch } from 'vue'
import { dubiousfilelist, removeFiles } from '@/api/task/task'
import { viewOptions } from '@/config/home'
import { useInfiniteScroll } from '@vueuse/core' import { useInfiniteScroll } from '@vueuse/core'
import imagesloaded from 'imagesloaded' import imagesloaded from 'imagesloaded'
import { cloneDeep, debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import ConfrimModal from './ConfrimModal.vue'
import { audit, dubiousfilelist, removeFiles } from '@/api/task/task'
import { viewOptions } from '@/config/home'
import { audit } from '@/api/task/task'
import NotPassed from '@/components/Approval/NotPassed.vue' import NotPassed from '@/components/Approval/NotPassed.vue'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { off, on } from '@/utils/domUtils' import { off, on } from '@/utils/domUtils'
import bgLoading from '@/assets/images/bg-loading.png' import ConfrimModal from "./ConfrimModal.vue"
const cardStyle = { const cardStyle = {
'--n-padding-bottom': '40px', '--n-padding-bottom': '40px',
'--n-padding-left': '120px', '--n-padding-left': '120px',
} }
const bgLoadingImg = ref(bgLoading)
let startTime = 0
let endTime = 0
let startCalTime = false
const message = useMessage() const message = useMessage()
const timeRange = ref('desc') const timeRange = ref('')
const similarRange = ref('desc')
const batch = ref(false) const batch = ref(false)
const imageRef = ref<ComponentElRef | null>()
const filterId = null
const isTop = ref(false)
let sortObj: any = {
orderByUptime: 'desc',
}
const timeOptions = [{ const timeOptions = [{
label: '升序', label: '升序',
value: 'asc', value: 'asc',
@ -42,14 +30,6 @@ const timeOptions = [{
label: '降序', label: '降序',
value: 'desc', value: 'desc',
}] }]
// const similarOptions = [{
// label: '',
// value: 'asc',
// }, {
// label: '',
// value: 'desc',
// }]
const timeLabel = computed(() => { const timeLabel = computed(() => {
const item = timeOptions.find((option) => { const item = timeOptions.find((option) => {
return option.value === timeRange.value return option.value === timeRange.value
@ -68,18 +48,8 @@ const viewLabel = computed(() => {
return item?.label return item?.label
}) })
const maxHeight = computed(() => {
let height = '800'
const screenWidth = window.screen.width
if (screenWidth <= 1920)
height = '600'
return `${height}px`
})
const masonryRef = ref<ComponentRef>(null) const masonryRef = ref<ComponentRef>(null)
const el = ref<HTMLDivElement | null>(null) const el = ref<HTMLDivElement | null>(null)
const elwc = ref<HTMLDivElement | null>(null)
const listData = ref<any[]>([]) const listData = ref<any[]>([])
const pagination = reactive({ const pagination = reactive({
pageNo: 1, pageNo: 1,
@ -88,10 +58,10 @@ const pagination = reactive({
let loading = false let loading = false
let _masonry: null | Masonry = null let _masonry: null | Masonry = null
const show = ref(false) const show = ref(false)
const selectedApproveItems = ref<any[]>([]) // const selectedApproveItems = ref<any[]>([]); //
const dialog = useDialog() const dialog = useDialog();
let processItems: any[] = [] let processItems: any[] = [];
const confrimModalRef = ref<any>() const confrimModalRef = ref<any>();
const layout = debounce(() => { const layout = debounce(() => {
if (!show.value) if (!show.value)
@ -112,49 +82,20 @@ const layout = debounce(() => {
const scrollHeight = el.value!.scrollHeight const scrollHeight = el.value!.scrollHeight
const clientHeight = el.value!.clientHeight const clientHeight = el.value!.clientHeight
const top = scrollHeight - clientHeight - 20 const top = scrollHeight - clientHeight - 20
if (isTop.value)
el.value!.scrollTo({ top: 0, behavior: 'instant' })
else
el.value!.scrollTo({ top, behavior: 'instant' }) el.value!.scrollTo({ top, behavior: 'instant' })
// let height = 800 - 15;
// const screenWidth = window.screen.width;
// if(screenWidth <= 1920) {
// height = 600 - 15;
// }
// el.value!.scrollTo({ top: height, behavior: 'instant' })
loading = false loading = false
console.log('loading---------------', loading)
console.log('pagination.pageNo---------------', pagination.pageNo)
if (pagination.pageNo == 3) {
let timer
if (timer)
clearTimeout(timer)
timer = setTimeout(() => {
isTop.value = false
console.log('isTop.value---------------', isTop.value)
}, 1000)
}
}) })
}, 300) }, 300)
watch(viewMode, () => { watch(viewMode, () => {
isTop.value = true
layout() layout()
}) })
onBeforeMount(async () => {
})
let canloadMore = true let canloadMore = true
useInfiniteScroll( useInfiniteScroll(
el as any, el as any,
() => { () => {
loading = false
console.log('加载了000000000000000---------------------------')
loadMore() loadMore()
}, },
{ distance: 10, canLoadMore: () => canloadMore }, { distance: 10, canLoadMore: () => canloadMore },
@ -163,57 +104,45 @@ useInfiniteScroll(
async function featchList() { async function featchList() {
loading = true loading = true
try { try {
// const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value }) const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value })
console.log('pagination.pageNo------------', pagination.pageNo)
const result = await dubiousfilelist({ ...pagination, ...sortObj })
// TODO // TODO
// result.data = Array.from({ length: 30 }) // result.data = Array.from({ length: 30 })
result.pageCount = 1
const { data, pageCount } = result const { data, pageCount } = result
// canloadMore = pageCount >= pagination.pageNo && pageCount > 0; pagination.pageNo += 1
canloadMore = data.pages >= pagination.pageNo && data.pages > 0 canloadMore = pageCount >= pagination.pageNo
console.log('canloadMore------------', canloadMore)
return result.data.records return result.data.records
// const list = data.map((item) => { // const list = data.map((item) => {
// return { // return {
// imgUrl: randomUrl(), // imgUrl: randomUrl(),
// } // }
// }) // })
// console.log(list)
// return list // return list
} }
catch (error) { catch (error) {
canloadMore = false
return [] return []
} }
} }
async function loadMore() { async function loadMore() {
console.log('执行l------------------------', loading, el.value, pagination.pageNo)
if (loading || el.value == null) if (loading || el.value == null)
return return
// loading = true loading = true
pagination.pageNo = pagination.pageNo + 1
const more = await featchList() const more = await featchList()
console.log('more------------------------', more)
listData.value.push(...more) listData.value.push(...more)
layout()
} }
onUpdated(() => { onUpdated(() => {
if (startCalTime) { console.log('onUpdated', onUpdated)
endTime = new Date().getTime()
if (endTime - startTime > 300)
createDom()
}
else {
removeDom()
}
nextTick(() => {
setTimeout(() => {
layout() layout()
}, 50) })
})
onBeforeMount(async () => {
console.log(888)
// const list = await featchList()
// listData.value = list
}) })
let start: { x: number, y: number } | null = null let start: { x: number, y: number } | null = null
@ -221,8 +150,6 @@ let selectionBox: HTMLDivElement | null
const selectIds = ref<string[]>([]) const selectIds = ref<string[]>([])
function downHandler(event: MouseEvent) { function downHandler(event: MouseEvent) {
startTime = new Date().getTime()
startCalTime = true
if (!selectionBox) if (!selectionBox)
return return
@ -249,29 +176,6 @@ function imUpdateSelectIds(x: number, y: number, w: number, h: number) {
if (rect.right > x && rect.bottom > y && rect.left < x + w && rect.top < y + h) if (rect.right > x && rect.bottom > y && rect.left < x + w && rect.top < y + h)
index === -1 && selectIds.value.push(item.dataset.id!) index === -1 && selectIds.value.push(item.dataset.id!)
else index !== -1 && selectIds.value.splice(index, 1) else index !== -1 && selectIds.value.splice(index, 1)
// let tempApproveIndex = -1;
// selectedApproveItems.value.map((approveItem, approveIndex) => {
// console.log("approveItem and item", approveItem, item );
// if(approveItem.selfId == item.dataset.id) {
// tempApproveIndex = approveIndex;
// }
// })
// if (tempApproveIndex === -1 && item.className.indexOf('grid-item-selected') != -1) {
// let tempItem: any = cloneDeep(item);
// tempItem.selfId = item.dataset.id;
// selectedApproveItems.value.push(tempItem)
// } else {
// selectedApproveItems.value.splice(tempApproveIndex, 1);
// }
})
selectedApproveItems.value = []
//
listData.value.forEach((item) => {
if (selectIds.value.includes(String(item.pictureId))) {
item.checked = true
selectedApproveItems.value.push(item)
}
}) })
} }
@ -280,14 +184,6 @@ function isSelected(pictureId: number) {
} }
function moveHandler(e: MouseEvent) { function moveHandler(e: MouseEvent) {
if (startCalTime) {
endTime = new Date().getTime()
if (endTime - startTime > 300)
createDom()
}
else {
removeDom()
}
if (!selectionBox || !start) if (!selectionBox || !start)
return return
@ -304,79 +200,30 @@ function moveHandler(e: MouseEvent) {
imUpdateSelectIds(x, y, w, h) imUpdateSelectIds(x, y, w, h)
} }
function createDom() {
const dom = document.createElement('div')
dom.className = 'selection-box'
dom.style.width = '1px'
dom.style.border = '1px dotted black'
dom.style.position = 'absolute'
dom.style.display = 'block'
dom.style.zIndex = '9999'
document.body.appendChild(dom)
selectionBox = document.querySelector('.selection-box') as HTMLDivElement
}
function removeDom() {
const dom = document.getElementsByClassName('selection-box')[0]
if (dom)
document.body.removeChild(dom)
}
function upHandler(event: MouseEvent) { function upHandler(event: MouseEvent) {
endTime = new Date().getTime()
startCalTime = false
if (endTime - startTime > 300)
createDom()
else
removeDom()
if (!selectionBox) if (!selectionBox)
return return
selectionBox.style.display = 'none' selectionBox.style.display = 'none'
start = null start = null
if (selectionBox.style.width == '0px') {
removeDom()
if (event.target?.className.indexOf('n-checkbox-box__border') != -1)
return
selectIds.value = []
selectedApproveItems.value.forEach(item => (item.checked = false))
selectedApproveItems.value.length = 0
listData.value.forEach((item) => {
item.checked = false
})
// batch.value = false;
}
} }
const gridHeight = computed(() => { const gridHeight = computed(() => {
// return viewMode.value !== 'masonry' ? '157px' : '' return viewMode.value !== 'masonry' ? '157px' : ''
let height = ''
if (viewMode.value === 'masonry')
height = ''
else if (viewMode.value === 'horizontalVersion')
height = '145px'
else if (viewMode.value === 'verticalVersion')
height = '300px'
else if (viewMode.value === '3:4')
height = '240px'
return height
}) })
function addListeners() { function addListeners() {
// selectionBox.style['z-index'] = '-1' selectionBox = document.querySelector('.selection-box') as HTMLDivElement
on(el.value!, 'mousedown', downHandler) on(el.value!, 'mousedown', downHandler)
on(el.value!, 'mousemove', moveHandler) on(el.value!, 'mousemove', moveHandler)
on(document, 'mouseup', upHandler) on(document, 'mouseup', upHandler)
// on(elwc.value!, 'mouseup', upHandler)
} }
function removeListeners() { function removeListeners() {
off(el.value!, 'mousedown', downHandler) off(el.value!, 'mousedown', downHandler)
on(el.value!, 'mousemove', moveHandler) on(el.value!, 'mousemove', moveHandler)
on(document, 'mouseup', upHandler) on(document, 'mouseup', upHandler)
// on(elwc.value!, 'mouseup', upHandler)
} }
function afterEnter() { function afterEnter() {
@ -387,9 +234,8 @@ function afterLeave() {
removeListeners() removeListeners()
} }
onMounted(async () => { onMounted(() => {
show.value && addListeners() show.value && addListeners()
removeDom()
}) })
async function showModal() { async function showModal() {
@ -402,39 +248,9 @@ async function showModal() {
} }
async function onChange() { async function onChange() {
if (timeRange.value == 'desc')
timeRange.value = 'asc'
else
timeRange.value = 'desc'
sortObj = {
// orderbyname: val,
orderByUptime: timeRange.value,
}
pagination.pageNo = 1 pagination.pageNo = 1
canloadMore = true
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
isTop.value = true
layout()
}
async function onChangeView() {
if (similarRange.value == 'desc')
similarRange.value = 'asc'
else
similarRange.value = 'desc'
sortObj = {
// orderbyname: val,
orderBySimilarity: similarRange.value,
}
pagination.pageNo = 1
canloadMore = true
const list = await featchList()
listData.value = list
isTop.value = true
layout()
} }
function closeModal(event: MouseEvent) { function closeModal(event: MouseEvent) {
@ -450,11 +266,9 @@ async function commit() {
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
layout() layout()
setBatch(false)
} }
} }
function remove() { function remove() {
// console.log("finally-selectedApproveItems------------", selectedApproveItems.value);
if (!selectIds.value || selectIds.value.length === 0) { if (!selectIds.value || selectIds.value.length === 0) {
message.error('至少选中一个') message.error('至少选中一个')
return return
@ -462,16 +276,17 @@ function remove() {
confrimModalRef?.value?.showModal() confrimModalRef?.value?.showModal()
} }
function setBatch(value) {
if (value && batch.value)
batch.value = !value
else
batch.value = value
function setBatch(value) {
if (value && batch.value) {
batch.value = !value;
} else {
batch.value = value;
}
if (value === false) { if (value === false) {
selectIds.value = [] selectIds.value = []
selectedApproveItems.value.forEach(item => (item.checked = false)) selectedApproveItems.value.forEach((item) => (item.checked = false));
selectedApproveItems.value.length = 0 selectedApproveItems.value.length = 0;
} }
} }
@ -481,29 +296,16 @@ defineExpose({
const notPassModalRef = ref(null) const notPassModalRef = ref(null)
const showActions = computed(() => { const showActions = computed(() => {
return selectedApproveItems.value.length > 0 && batch return selectedApproveItems.value.length > 0 && batch;
}) });
function onCheckChange(checked: any, item: any) { function onCheckChange(checked: any, item: any) {
item.checked = checked item.checked = checked
const index = selectedApproveItems.value.indexOf(item) const index = selectedApproveItems.value.indexOf(item);
const picIndex = selectIds.value.indexOf(item.pictureId)
if (index === -1 && checked) selectedApproveItems.value.push(item);
if (index === -1 && checked) else selectedApproveItems.value.splice(index, 1);
selectedApproveItems.value.push(item)
else
selectedApproveItems.value.splice(index, 1)
if (picIndex === -1 && checked)
selectIds.value.push(item.pictureId)
else
selectIds.value.splice(picIndex, 1)
setTimeout(() => {
nextTick(() => {
batch.value = true
})
}, 100)
} }
function rejectHandler() { function rejectHandler() {
@ -512,29 +314,26 @@ function rejectHandler() {
} }
function reset() { function reset() {
batch.value = false batch.value = false;
// pagination.pageNo = 1; pagination.pageNo = 1;
pagination.pageNo = 1 pagination.pageSize = 20;
pagination.pageSize = 20 selectIds.value = [];
selectIds.value = [] selectedApproveItems.value.length = 0;
selectedApproveItems.value.length = 0 loading = false;
loading = false canloadMore = true;
canloadMore = true
layout()
} }
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) if (items.length === 0) return "至少选中一个任务";
return '至少选中一个任务' return null;
return null
} }
function approvalHandler(items?: any) { function approvalHandler(items?: any) {
// if (batch.value) { if (batch.value) {
processItems = selectedApproveItems.value processItems = selectedApproveItems.value
// } }
// => => / // => => /
if (items !== undefined && !(items instanceof PointerEvent)) if (items !== undefined && !(items instanceof PointerEvent))
processItems = [items] processItems = [items]
console.log('batch-------------', batch.value, selectedApproveItems.value, processItems)
const msg = validate(processItems) const msg = validate(processItems)
if (msg !== null) { if (msg !== null) {
@ -581,60 +380,29 @@ function doAudit(param: any) {
message.info(res.message) message.info(res.message)
// emitter.emit('refresh') // emitter.emit('refresh')
refreshHandler() refreshHandler()
} }
else { message.error(res.message) } else message.error(res.message)
}) })
} }
function reloadList() { function reloadList() {
refreshHandler() refreshHandler()
} }
async function refreshHandler(filtersearchId?: any) { async function refreshHandler() {
// rao start
reset() reset()
pagination.pageNo = 1
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
layout() layout()
// rao end
// reset();
// if (filtersearchId) {
// filterId = filtersearchId;
// }
nextTick(() => {
setTimeout(() => {
useInfiniteScroll(
el as any,
() => {
loadMore()
},
{ distance: 10, canLoadMore: () => canloadMore },
)
}, 300)
})
} }
watch(() => show.value, async (newVal) => {
if (show.value) {
pagination.pageNo = 1
const list = await featchList()
listData.value = list
layout()
}
})
</script> </script>
<template> <template>
<div> <div>
<n-modal <n-modal v-model:show="show" :mask-closable="false" style="position: relative;" transform-origin="center"
v-model:show="show" :mask-closable="false" style="position: relative;" transform-origin="center" @after-enter="afterEnter" @after-leave="afterLeave">
@after-enter="afterEnter" @after-leave="afterLeave" <n-card :style="cardStyle" class="card card-1" style="position: fixed;top:64px" :bordered="false" size="huge"
> role="dialog" aria-modal="true">
<n-card
ref="elwc" :style="cardStyle" class="card card-1" style="position: fixed;top:64px" :bordered="false" size="huge"
role="dialog" aria-modal="true"
>
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-m32"> <div class="wrapper-m32">
<SvgIcon name="recycle" size="16" /> <SvgIcon name="recycle" size="16" />
@ -647,44 +415,24 @@ watch(() => show.value, async (newVal) => {
<div class="wrapper-content"> <div class="wrapper-content">
<div class="wrapper-content-form wrapper-m32"> <div class="wrapper-content-form wrapper-m32">
<div> <div>
<n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click"> <n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click" @change="onChange">
<div class="wrapper-form-dropdown">
<span>视图模式</span>
<SvgIcon class="wrapper-content-form-gap" name="arrow-botton" size="14" />
</div>
</n-popselect>
<div
style="margin-left: 15px; cursor: pointer; color: #323233"
@click="onChange()"
>
<span>时间排序</span>
<SvgIcon style="margin-left: 8px" name="sort" size="12" />
</div>
<div
style="margin-left: 15px; cursor: pointer; color: #323233"
@click="onChangeView()"
>
<span>相似度排序</span>
<SvgIcon style="margin-left: 8px" name="sort" size="12" />
</div>
<!-- <n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click" @change="onChange">
<div class="wrapper-content-form-dropdown"> <div class="wrapper-content-form-dropdown">
<span>时间排序</span> <span>时间排序</span>
<SvgIcon class="wrapper-content-form-dropdown-gap" name="arrow-botton" size="14" /> <SvgIcon class="wrapper-content-form-dropdown-gap" name="arrow-botton" size="14" />
</div> </div>
</n-popselect> </n-popselect>
<n-popselect v-model:value="similarRange" :options="timeOptions" trigger="click" @change="onChangeView"> <n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
<div class="wrapper-content-form-dropdown"> <div class="wrapper-form-dropdown">
<span>相似度排序</span> <span>视图模式</span>
<SvgIcon class="wrapper-content-form-dropdown-gap" name="arrow-botton" size="14" /> <SvgIcon class="wrapper-content-form-gap" name="arrow-botton" size="14" />
</div> </div>
</n-popselect> --> </n-popselect>
</div> </div>
<div> <div>
<div class="remove" @click="remove"> <div class="remove" @click="remove">
移除可疑文件夹 移除可疑文件夹
</div> </div>
<div v-show="!showActions" class="wrapper-content-form-button" @click="setBatch(true)"> <div class="wrapper-content-form-button" @click="setBatch(true)" v-show="!showActions">
<SvgIcon style="margin-right: 6px;" size="14" name="tf" /> <SvgIcon style="margin-right: 6px;" size="14" name="tf" />
批量审批 批量审批
</div> </div>
@ -696,52 +444,35 @@ watch(() => show.value, async (newVal) => {
返回 返回
</n-button> </n-button>
<div style="cursor: pointer; margin-left: 16px" @click.stop="rejectHandler"> <div style="cursor: pointer; margin-left: 16px" @click.stop="rejectHandler">
<!--<SvgIcon width="64" height="28" name="a1" />--> <SvgIcon width="64" height="28" name="a1" />
<img class="btn-approval btn-left" style="margin-left: 16px" src="@/assets/images/task/btn-not-pass.png" alt="" >
</div> </div>
<SvgIcon size="24" name="vs" /> <SvgIcon size="24" name="vs" />
<div style="cursor: pointer" @click.stop="approvalHandler"> <div style="cursor: pointer" @click.stop="approvalHandler">
<!-- <SvgIcon width="64" height="28" name="a2" />--> <SvgIcon width="64" height="28" name="a2" />
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" >
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div ref="el" class="scroll" :style="{ height: maxHeight, marginTop: '16px' }"> <div ref="el" class="scroll">
<!-- <n-scrollbar :on-scroll="scrollHandler"> --> <!-- <n-scrollbar :on-scroll="scrollHandler"> -->
<div ref="masonryRef" class="grid"> <div ref="masonryRef" class="grid">
<div <div v-for="(item, index) in listData" :key="item.pictureId" :data-id="item.pictureId"
v-for="(item) in listData" :key="item.pictureId" :data-id="item.pictureId"
:class="{ 'grid-item-selected': isSelected(item.pictureId) }" :style="{ height: gridHeight }" :class="{ 'grid-item-selected': isSelected(item.pictureId) }" :style="{ height: gridHeight }"
class="grid-item" class="grid-item">
> <n-image :src="item.imgUrl" class="img "
<n-image :class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }" />
ref="imageRef" <n-checkbox v-if="batch && item.historyStates === 1" v-model:checked="item.checked"
:src="item?.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl" style="position:absolute;left:20px;top:20px" @click.prevent
:preview-src="item.imgUrl" @update:checked="onCheckChange($event, item)" />
:fallback-src="bgLoadingImg"
class="img "
:class="{
'img-fit': viewMode === 'horizontalVersion',
'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
:style="{ backgroundImage: `url(${loading ? bgLoadingImg : 'none'})` }"
/>
<n-checkbox
v-if="batch && item.historyStates === 1" v-model:checked="item.checked"
style="position:absolute;left:20px;top:20px" @click.prevent.stop
@update:checked="onCheckChange($event, item)"
/>
<img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt=""> <img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt="">
<img <img v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png"
v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png" alt="">
alt=""
>
<div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent"> <div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent">
{{ item.similarityScore }}<span class="percent-unit">%</span> {{ item.similarityScore }}<span class="percent-unit">%</span>
</div> </div>
<div class="time"> <div class="time" style="left: 25px;bottom: 15px;">
<!-- <div class="time-item"> <!-- <div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" /> <SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<span>{{ item?.photoDateTimestamp ? <span>{{ item?.photoDateTimestamp ?
@ -752,15 +483,10 @@ watch(() => show.value, async (newVal) => {
<span>{{ item.submitDateTimestamp ? <span>{{ item.submitDateTimestamp ?
formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span> formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
</div> --> </div> -->
<div class="time-item" style="margin-bottom: 4px;">
<SvgIcon color="#FFF" size="16" name="camera" style="margin-right: 4px;" />
<span class="time-value">{{ item?.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp)) : '- -' }} </span>
</div>
<div class="time-item"> <div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="time" /> <SvgIcon class="svg-time" color="#FFF" size="16" name="time" />
<span>{{ item.submitDateTimestamp <span>{{ item.submitDateTimestamp ?
? formatToDateHMS(Number(item.submitDateTimestamp)) : '- -' }}</span> formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -776,16 +502,12 @@ watch(() => show.value, async (newVal) => {
</n-card> </n-card>
</n-modal> </n-modal>
<NotPassed ref="notPassModalRef" @success="reloadList" /> <NotPassed ref="notPassModalRef" @success="reloadList" />
<ConfrimModal ref="confrimModalRef" :selected-total="selectIds.length" @commit="commit" /> <ConfrimModal ref="confrimModalRef" @commit="commit" :selectedTotal="selectIds.length" />
</div> </div>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.btn-approval{
width: 68px;
height: 28px;
cursor: pointer;
}
.card { .card {
width: 100vw; width: 100vw;
height: calc(100vh - 64px); height: calc(100vh - 64px);
@ -827,9 +549,7 @@ watch(() => show.value, async (newVal) => {
} }
.img { .img {
border-radius: 7px; border-radius: 8px;
display: block;
height: 100%;
} }
.wrapper { .wrapper {
@ -940,13 +660,10 @@ watch(() => show.value, async (newVal) => {
} }
.time { .time {
position: absolute; position: absolute;
width: 182px;
padding-left: 10px;
z-index: 3; z-index: 3;
left: 16px; left: 32px;
bottom: 16px; bottom: 32px;
background: linear-gradient(180deg,rgba(6,0,0,0.01),rgba(0, 0, 0, 0.44) 100%);
border-radius: 0 0 7px 7px;
.time-item { .time-item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -966,10 +683,10 @@ watch(() => show.value, async (newVal) => {
} }
} }
.scroll { .scroll {
overflow-y: auto; overflow-y: auto;
// height: calc(100vh - 282px); height: calc(100vh - 282px);
height: 800px;
margin-left: 20px; margin-left: 20px;
} }
} }
@ -993,5 +710,4 @@ watch(() => show.value, async (newVal) => {
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
} }</style>
</style>

@ -14,15 +14,11 @@ defineExpose({
<template> <template>
<div> <div>
<n-modal <n-modal v-model:show="show" :mask="false" :showMask="false" transform-origin="center">
v-model:show="show"
:mask="false"
:show-mask="false"
transform-origin="center"
>
<Search @close="show = false" /> <Search @close="show = false" />
</n-modal> </n-modal>
</div> </div>
</template> </template>
<style scoped lang="less"></style> <style scoped lang="less">
</style>

@ -1,71 +1,49 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineOptions, ref } from "vue"; import { defineOptions, ref } from 'vue'
defineOptions({ name: "ShortcutModal" }); defineOptions({ name: 'ShortcutModal' })
const show = ref(false); const show = ref(false)
const cardStyle = { const cardStyle = {
"width": "800px", 'width': '800px',
"--n-padding-bottom": "10px", '--n-padding-bottom': '10px',
"--n-padding-left": "10px", '--n-padding-left': '10px',
"padding-bottom": "100px", 'padding-bottom':'100px'
}; }
function showModal() { function showModal() {
show.value = true; show.value = true
} }
function closeModal() { function closeModal() {
show.value = false; show.value = false
} }
defineExpose({ defineExpose({
showModal, showModal,
}); })
</script> </script>
<template> <template>
<div> <div>
<n-modal <n-modal v-model:show="show" transform-origin="center">
v-model:show="show" <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
transform-origin="center"
style="width: 808px; height: 606px; margin: -27px auto 0 !important"
>
<n-card
:style="cardStyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-header"> <div class="wrapper-header">
<span class="wrapper-left">全局快捷键</span> <span class="wrapper-left">全局快捷键</span>
<div class="wrapper-right"> <div class="wrapper-right">
<img class="img-question" src="@/assets/images/question.png" alt="">查看快捷键的信息
<img
class="img-question"
src="@/assets/images/question.png"
alt=""
style="width: 18px; height: 18px"
>查看快捷键的信息
<img <img class="img-close" src="@/assets/images/close.png" alt="" @click="closeModal">
class="img-close"
src="@/assets/images/close.png"
alt=""
style="width: 20px; height: 20px"
@click="closeModal"
>
</div> </div>
</div> </div>
<n-divider style="margin-bottom: 32px" /> <n-divider />
<div class="title"> <div class="title">
全局快捷方式 全局快捷方式
</div> </div>
<div class="wrapper-global"> <div class="wrapper-global">
<table style="margin-left: 110px; width: 230px"> <table style="margin-left: 100px;">
<tr> <tr>
<td><div class="key" data-key="g h" /></td> <td><div class="key" data-key="g h" /></td>
<td>进入一键查看主页</td> <td>进入一键查看主页</td>
@ -76,7 +54,7 @@ defineExpose({
</tr> </tr>
<tr> <tr>
<td><div class="key" data-key="g a" /></td> <td><div class="key" data-key="g a" /></td>
<td>进入图检审批主页</td> <td>进入AI工单主页</td>
</tr> </tr>
<tr> <tr>
<td><div class="key" data-key="g e" /></td> <td><div class="key" data-key="g e" /></td>
@ -95,7 +73,7 @@ defineExpose({
<td>打开可疑文件夹</td> <td>打开可疑文件夹</td>
</tr> </tr>
</table> </table>
<table style="height: 30%; margin-left:115px"> <table style="height: 30%;margin-left: 180px;">
<tr> <tr>
<td><div class="key" data-key="[" /></td> <td><div class="key" data-key="[" /></td>
<td>隐藏/显示当前场景左侧筛选区</td> <td>隐藏/显示当前场景左侧筛选区</td>
@ -118,51 +96,37 @@ defineExpose({
</tr> </tr>
</table> </table>
</div> </div>
<n-divider style="margin: 24px 24px 32px 24px; color: #d9d9d9" /> <n-divider />
<div class="title" style="margin-top: -16.5px"> <div class="title">
任务审批/任务终审/AI工单明细动作 任务审批/任务终审/AI工单明细动作
</div> </div>
<div class="wrapper-request"> <div class="wrapper-request">
<table style="margin-left: 120px; width: 290px"> <table style="margin-left: 100px;">
<tr>
<td ><div class="key" style="float: left;
margin-left: 5px;" data-key="c" /></td>
<td><div style="float: left;
margin-left: -60px;">关闭关闭当前场景弹窗</div></td>
</tr>
<tr> <tr>
<td> <td><div class="key" data-key="c" /></td>
<div class="key" data-key="&larr;" /> <td>关闭关闭当前场景弹窗</td>
<span>/</span>
<div class="key" data-key="&rarr;" />
</td>
<td>打开上一条/下一条信息切换</td>
</tr> </tr>
</table>
<table style="margin-left: 50px">
<tr> <tr>
<td style="text-align: left; width: 53px"> <td><div class="key" data-key="p p" /></td>
<div class="key" data-key="p p" />
</td>
<td>通过</td> <td>通过</td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left"> <td><div class="key" data-key="x x" /></td>
<div class="key" data-key="x x" />
</td>
<td>不通过</td> <td>不通过</td>
</tr> </tr>
</table> </table>
<table style="margin-left: 155px;">
</div> <tr>
<div class="wrapper-request"> <td><div class="key" data-key="t t" /></td>
<table style="margin-left: 120px; width: 180px"> <td></td>
</tr>
<tr> <tr>
<td style="text-align: left; width: 53px"> <td><div class="key" data-key="f f" /></td>
<div class="key" data-key="k k" /> <td></td>
</td> </tr>
<td>开启沉浸模式</td> <tr>
<td><div class="key" data-key="&larr;" /><span>/</span><div class="key" data-key="&rarr;" /></td>
<td>打开上一条/下一条信息切换</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -185,56 +149,54 @@ defineExpose({
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.wrapper-footer { .wrapper-footer{
margin-top: -20px; margin-top: -20px;
} }
.wrapper { .wrapper {
.wrapper-header {
padding: 14px 0 14px 0; .wrapper-header{
padding: 14px;
padding-bottom: 0; padding-bottom: 0;
} }
.img-question { .img-question{
width: 16px; width: 16px;
height: 16px; height: 16px;
margin: 0 2px; margin: 0 2px;
} }
.img-close { .img-close{
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-left: 16px; margin-left: 16px;
cursor: pointer; cursor: pointer;
} }
.wrapper-right { .wrapper-right{
font-size: 16px; font-size: 16px;
font-family: PingFang SC, PingFang SC-Regular; font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400; font-weight: Regular;
text-align: left; text-align: left;
color: #666666; color: #666666;
line-height: 22px; line-height: 22px;
display: flex; display: flex;
align-items: center; align-items: center
} }
.wrapper-left { .wrapper-left{
font-size: 18px; font-size: 18px;
font-family: PingFang SC, PingFang SC-Medium; font-family: PingFang SC, PingFang SC-Medium;
font-weight: 600; font-weight: 600;
text-align: left; text-align: left;
color: #000000; color: #333333;
line-height: 25px; line-height: 25px;
} }
.title { .title{
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
margin-bottom: 10px; margin-bottom: 10px;
padding-left: 47px; padding-left: 30px;
color: #333333;
font-weight: 600;
// 线24px
} }
&-header { &-header {
display: flex; display: flex;
@ -265,7 +227,7 @@ defineExpose({
} }
&-icon { &-icon {
background: #fff; background: #FFF;
display: inline-block; display: inline-block;
width: 18px; width: 18px;
height: 1px; height: 1px;
@ -273,31 +235,32 @@ defineExpose({
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
&:after { &:after {
content: ""; content: '';
display: block; display: block;
width: 18px; width: 18px;
height: 1px; height: 1px;
background: #fff; background: #FFF;
transform: rotate(-90deg); transform: rotate(-90deg);
-webkit-transform: rotate(-90deg); -webkit-transform: rotate(-90deg);
} }
} }
} }
&-request, &-request,&-global{
&-global {
display: flex; display: flex;
table { table{
tr td:first-child { tr td:first-child{
text-align: right; text-align: right;
padding-right: 10px; padding-right: 10px;
color: #515457; color: #515457;
} }
tr td { tr td{
color: #333333; color: #333333;
} }
tr span { tr span{
padding: 0 10px; padding: 0 10px;
} }
} }
@ -313,14 +276,13 @@ defineExpose({
display: inline-block; display: inline-block;
box-sizing: content-box; box-sizing: content-box;
font-size: 16px; font-size: 16px;
font-weight: bold;
text-align: center; text-align: center;
padding: 2px 6px; padding: 2px 6px;
border: 1px solid #d6d6d6; border: 1px solid #d6d6d6;
border-left: 3px solid #d6d6d6; border-left: 3px solid #d6d6d6;
border-bottom: 3px solid #d6d6d6; border-bottom: 3px solid #d6d6d6;
background-color: #fdfdfd; background-color: #fdfdfd;
// color: #333333;
font-weight: bold;
} }
.key[data-key]::after { .key[data-key]::after {

@ -3,22 +3,10 @@ import { computed, inject, onMounted, ref } from "vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useUser } from "@/store/modules/user"; import { useUser } from "@/store/modules/user";
import { getImgUrl } from "@/utils/urlUtils"; import { getImgUrl } from "@/utils/urlUtils";
import defaultAvatar from "@/assets/icons/avatar.svg"; import defaultAvatar from '@/assets/icons/avatar.svg';
/**
* 用户权限菜单
*/
interface IUserMenu {
id: number,
name: string,
resKey: string,
resUrl: string
icon: string,
level: number,
parentId: number
}
const emit = defineEmits<{ const emit = defineEmits<{
(e: "logout"): void (e: "logout"): void;
}>(); }>();
const router = useRouter(); const router = useRouter();
@ -28,10 +16,7 @@ const userStore = useUser();
const useInfo = userStore.getUserInfo; const useInfo = userStore.getUserInfo;
const aiDisabled = ref(false); const aiDisabled = ref(false);
const userMenus = computed<IUserMenu[]>(() => {
return userStore.getUserInfo.frontmenuTList
})
function handleSelect(row) { function handleSelect(row) {
userStore.updateTenantId(row.key); userStore.updateTenantId(row.key);
location.reload(); location.reload();
@ -40,30 +25,24 @@ function handleSelect(row) {
function logIt(e) { function logIt(e) {
return false; return false;
} }
function hasPerm(resKey) {
return userMenus.value.some(i => i.resKey === resKey)
}
// //
function goHome(e) { function goHome(e) {
if (!hasPerm('home_main')) return
router.push({ name: "home" }); router.push({ name: "home" });
} }
// //
function goTask(e) { function goTask(e) {
if (!hasPerm('task-main')) return
router.push({ name: "task-main" }); router.push({ name: "task-main" });
} }
// AI // AI
function goWorksheet(e) { function goWorksheet(e) {
if (!hasPerm('worksheet-main')) return
router.push({ name: "worksheet-main" }); router.push({ name: "worksheet-main" });
} }
// //
function goFinal(e) { function goFinal(e) {
if (!hasPerm('final-main')) return
router.push({ name: "final-main" }); router.push({ name: "final-main" });
} }
@ -93,18 +72,18 @@ function logOut() {
} }
const currentCompanyName = computed(() => { const currentCompanyName = computed(() => {
const deptlist = useInfo.deptlist; const tenantList = useInfo.tenantList;
const currentId = userStore.getTenantId; const currentId = userStore.getTenantId;
const current = deptlist.find(item => item.deptno === currentId); const current = tenantList.find((item) => item.id === currentId);
return current?.departname || "name"; return current.name || "name";
}); });
const options = computed(() => { const options = computed(() => {
const deptlist = useInfo.deptlist; const tenantList = useInfo.tenantList;
return deptlist.map((item) => { return tenantList.map((item) => {
return { return {
label: item.departname, label: item.name,
key: item.deptno, key: item.id,
}; };
}); });
}); });
@ -122,8 +101,8 @@ const options = computed(() => {
> >
<template #trigger> <template #trigger>
<div class="setting"> <div class="setting">
<span style="color: #333333">{{ useInfo.username }}</span> <span>{{ useInfo.username }}</span>
<SvgIcon style="margin-left: 6px" :name="iconName" size="16" /> <SvgIcon style="margin-left: 6px" :name="iconName" size="14" />
</div> </div>
</template> </template>
<div class="container"> <div class="container">
@ -140,28 +119,24 @@ const options = computed(() => {
</div> </div>
<div class="trigger"> <div class="trigger">
<span>{{ currentCompanyName }}</span> <span>{{ currentCompanyName }}</span>
<span style="cursor: pointer" @click="changeFlag = !changeFlag"><SvgIcon name="switchCompany" size="24" /></span> <span @click="changeFlag = !changeFlag" style="cursor: pointer"><SvgIcon name="switchCompany" size="24" /></span>
</div> </div>
<div class="item"> <div class="item">
<span>AI设置开关</span> <span>AI设置开关</span>
<n-switch v-model:value="aiDisabled" /> <n-switch v-model:value="aiDisabled" />
</div> </div>
<div class="trigger"> <div class="trigger">联系我们</div>
联系我们
</div>
<n-divider style="margin-top: 0px; margin-bottom: 10px; padding: 0 22px" /> <n-divider style="margin-top: 0px; margin-bottom: 10px; padding: 0 22px" />
<div class="trigger" @click="logOut"> <div class="trigger" @click="logOut">退</div>
退出登录
</div>
<div <div
v-show="changeFlag"
class="container sub-container" class="container sub-container"
v-show="changeFlag"
style="position: absolute; right: 17vw; width: 11.5vw; padding: 24px 0" style="position: absolute; right: 17vw; width: 11.5vw; padding: 24px 0"
> >
<div <div
class="trigger"
v-for="option in options" v-for="option in options"
:key="option.key" :key="option.key"
class="trigger"
@click="handleSelect(option)" @click="handleSelect(option)"
> >
{{ option.label }} {{ option.label }}
@ -176,11 +151,9 @@ const options = computed(() => {
.header { .header {
.user-name { .user-name {
font-size: 16px; font-size: 16px;
font-weight: 600;
} }
.depart-name { .depart-name {
font-size: 12px; font-size: 12px;
font-weight: 600;
} }
} }
} }
@ -217,8 +190,6 @@ const options = computed(() => {
padding: 13px 20px; padding: 13px 20px;
cursor: pointer; cursor: pointer;
color: #333333; color: #333333;
font-size: 13px;
font-weight: 600;
} }
.trigger:hover { .trigger:hover {

@ -1,15 +1,6 @@
<script lang="ts"> <script lang="ts">
import { useDialog, useMessage } from 'naive-ui' import { useDialog, useMessage } from 'naive-ui'
import { import { defineComponent, inject, onMounted, reactive, ref, toRefs, unref, watch } from 'vue'
defineComponent,
inject,
onMounted,
reactive,
ref,
toRefs,
unref,
watch,
} from 'vue'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import QuillModal from './QuillModal.vue' import QuillModal from './QuillModal.vue'
import RecycleModal from './RecycleModal.vue' import RecycleModal from './RecycleModal.vue'
@ -20,11 +11,11 @@ import { msgPolling } from '@/api/message/message'
import { getImgUrl } from '@/utils/urlUtils' import { getImgUrl } from '@/utils/urlUtils'
import { useUser } from '@/store/modules/user' import { useUser } from '@/store/modules/user'
import { useTaskStore } from '@/store/modules/task' import { useTaskStore } from '@/store/modules/task'
import defaultAvatar from '@/assets/icons/avatar.svg' import defaultAvatar from '@/assets/icons/avatar.svg';
const taskStore = useTaskStore() const taskStore = useTaskStore();
export default defineComponent({ export default defineComponent({
name: 'PageHeader', name: "PageHeader",
components: { components: {
UserSettings, UserSettings,
QuillModal, QuillModal,
@ -40,140 +31,139 @@ export default defineComponent({
type: Boolean, type: Boolean,
}, },
}, },
emits: ['update:collapsed'], emits: ["update:collapsed"],
setup() { setup() {
const message = useMessage() const message = useMessage();
const dialog = useDialog() const dialog = useDialog();
const userStore = useUser() const userStore = useUser();
const useInfo = userStore.getUserInfo const useInfo = userStore.getUserInfo;
const name = '' const name = "";
const state = reactive({ const state = reactive({
username: name ?? '', username: name ?? "",
fullscreenIcon: 'FullscreenOutlined', fullscreenIcon: "FullscreenOutlined",
}) });
const router = useRouter() const router = useRouter();
const route = useRoute() const route = useRoute();
const routename = ref(route.meta.title) const routename = ref(route.meta.title);
// mm // mm
const iconList = ref([ const iconList = ref([
{ {
icon: 'magnifying-1', icon: "magnifying-1",
handle: searchHandler, handle: searchHandler,
}, },
{ {
icon: 'shortcut-keys', icon: "shortcut-keys",
handle: shortcutHandler, handle: shortcutHandler,
}, },
{ {
icon: 'suspicious-folder', icon: "suspicious-folder",
handle: recycleHandler, handle: recycleHandler,
}, },
{ {
icon: 'memo', icon: "memo",
handle: quillHandler, handle: quillHandler,
}, },
{ {
icon: 'nomessage', icon: "nomessage",
handle: goMessage, handle: goMessage,
}, },
]) ]);
watch( watch(
() => route.fullPath, () => route.fullPath,
() => { () => {
routename.value = route.meta.title routename.value = route.meta.title;
}, }
) );
const handleDragOver = (event, item) => { const handleDragOver = (event, item) => {
taskStore.setInFile(true) taskStore.setInFile(true);
} };
const handleDragLeave = (event, item) => { const handleDragLeave = (event, item) => {
taskStore.setInFile(false) taskStore.setInFile(false);
} };
const dropdownSelect = (key) => { const dropdownSelect = (key) => {
router.push({ name: key }) router.push({ name: key });
} };
// 退 // 退
const doLogout = () => { const doLogout = () => {
dialog.info({ dialog.info({
title: '提示', title: "提示",
content: '您确定要退出登录吗', content: "您确定要退出登录吗",
positiveText: '确定', positiveText: "确定",
negativeText: '取消', negativeText: "取消",
onPositiveClick: () => { onPositiveClick: () => {
userStore.logout().then(() => { userStore.logout().then(() => {
message.success('成功退出登录') message.success("成功退出登录");
router router
.replace({ .replace({
name: 'Login', name: "Login",
query: { query: {
// redirect: route.fullPath, // redirect: route.fullPath,
}, },
}) })
.finally(() => location.reload()) .finally(() => location.reload());
}) });
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}) });
} };
const quillModalRef = ref(null) const quillModalRef = ref(null);
const shortcutModal = ref(null) const shortcutModal = ref(null);
const recycleModalRef = ref(null) const recycleModalRef = ref(null);
const SearchModalRef = ref(null) const SearchModalRef = ref(null);
function quillHandler() { function quillHandler() {
const modal = unref(quillModalRef)! as any const modal = unref(quillModalRef)! as any;
modal.showModal() modal.showModal();
} }
function shortcutHandler() { function shortcutHandler() {
const modal = unref(shortcutModal)! as any const modal = unref(shortcutModal)! as any;
modal.showModal() modal.showModal();
} }
function recycleHandler() { function recycleHandler() {
const modal = unref(recycleModalRef)! as any const modal = unref(recycleModalRef)! as any;
modal.showModal() modal.showModal();
} }
function searchHandler() { function searchHandler() {
const modal = unref(SearchModalRef)! as any const modal = unref(SearchModalRef)! as any;
modal.showModal() modal.showModal();
} }
function goMessage() { function goMessage() {
router.push({ name: 'message-main' }) router.push({ name: "message-main" });
} }
async function getMessage() { async function getMessage() {
const res = await msgPolling() const res = await msgPolling();
if (res.data) if (res.data) iconList.value[4].icon = "hasmessage";
iconList.value[4].icon = 'hasmessage' else iconList.value[4].icon = "nomessage";
else iconList.value[4].icon = 'nomessage'
} }
setInterval(() => { setInterval(() => {
getMessage() getMessage();
}, 5000) }, 5000);
const mousetrap = inject('mousetrap') as any const mousetrap = inject("mousetrap") as any;
onMounted(() => { onMounted(() => {
getMessage() getMessage();
mousetrap.bind('n r', quillHandler) mousetrap.bind("n r", quillHandler);
mousetrap.bind('n t', quillHandler) mousetrap.bind("n t", quillHandler);
mousetrap.bind('n n', recycleHandler) mousetrap.bind("n n", recycleHandler);
mousetrap.bind('/', searchHandler) mousetrap.bind("m m", searchHandler);
}) });
const defaultAvatarSrc = ref(defaultAvatar) const defaultAvatarSrc = ref(defaultAvatar);
return { return {
...toRefs(state), ...toRefs(state),
@ -197,7 +187,7 @@ export default defineComponent({
defaultAvatarSrc, defaultAvatarSrc,
} }
}, },
}) });
</script> </script>
<template> <template>
@ -207,11 +197,11 @@ export default defineComponent({
<!-- 菜单收起 --> <!-- 菜单收起 -->
<div <div
class="ml-1 layout-header-trigger layout-header-trigger-min" class="ml-1 layout-header-trigger layout-header-trigger-min"
style="padding-left: 13px"
@click="() => $emit('update:collapsed', !collapsed)" @click="() => $emit('update:collapsed', !collapsed)"
> >
<SvgIcon name="homepage" size="16" /> <SvgIcon name="homepage" size="16" />
</div> </div>
<div>当前位置{{ routename }}</div> <div>当前位置{{ routename }}</div>
</div> </div>
<div class="layout-header-right"> <div class="layout-header-right">
@ -237,11 +227,7 @@ export default defineComponent({
<!-- 个人中心 --> <!-- 个人中心 -->
<div class="layout-header-trigger layout-header-trigger-min"> <div class="layout-header-trigger layout-header-trigger-min">
<!-- <n-avatar :src="getImgUrl(useInfo.usericon)" round /> --> <!-- <n-avatar :src="getImgUrl(useInfo.usericon)" round /> -->
<n-avatar <n-avatar :src="(useInfo.usericon && getImgUrl(useInfo.usericon)) || defaultAvatarSrc" round/>
style="width: 36px; height: 36px"
:src="(useInfo.usericon && getImgUrl(useInfo.usericon)) || defaultAvatarSrc"
round
/>
</div> </div>
<!-- 设置 --> <!-- 设置 -->
<UserSettings @logout="doLogout" /> <UserSettings @logout="doLogout" />
@ -259,7 +245,7 @@ export default defineComponent({
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0; padding: 0;
height: 62px; height: 64px;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
width: 100%; width: 100%;
z-index: 11; z-index: 11;
@ -267,7 +253,6 @@ export default defineComponent({
&-left { &-left {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start;
color: #666666; color: #666666;
.logo { .logo {
@ -282,7 +267,7 @@ export default defineComponent({
img { img {
width: auto; width: auto;
height: 34px; height: 32px;
margin-right: 10px; margin-right: 10px;
} }
@ -295,7 +280,7 @@ export default defineComponent({
&-right { &-right {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 24px; margin-right: 20px;
.back { .back {
width: 28px; width: 28px;

@ -1,19 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { websiteConfig } from '@/config/website.config' import { websiteConfig } from '@/config/website.config'
import { storage } from '@/utils/Storage'
import { CURRENT_USER } from '@/store/mutation-types'
defineOptions({ name: 'Index' }) defineOptions({ name: 'Index' })
const router = useRouter() const router = useRouter()
function clickHandler() { function clickHandler() {
const userInfo = storage.get(CURRENT_USER)
if (userInfo && userInfo.frontmenuTList) {
if (userInfo.frontmenuTList.find(item => item.resUrl == '/home'))
router.push({ path: '/home' }) router.push({ path: '/home' })
}
} }
</script> </script>
@ -24,7 +18,7 @@ function clickHandler() {
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.logo { .logo {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -42,5 +36,5 @@ function clickHandler() {
.title { .title {
margin: 0; margin: 0;
} }
} }
</style> </style>

@ -1,57 +1,57 @@
<script lang="ts"> <script lang="ts">
import { computed, defineComponent, onMounted, ref, unref, watch } from 'vue' import { computed, defineComponent, onMounted, ref, unref, watch } from "vue";
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from "vue-router";
import { IconGroup } from '../IconGroup' import { IconGroup } from "../IconGroup";
import { useAsyncRouteStore } from '@/store/modules/asyncRoute' import { useAsyncRouteStore } from "@/store/modules/asyncRoute";
import { generatorMenu } from '@/utils' import { generatorMenu } from "@/utils";
import { storage } from '@/utils/Storage' import { storage } from "@/utils/Storage";
import { CURRENT_USER } from '@/store/mutation-types' import { CURRENT_USER } from "@/store/mutation-types";
export default defineComponent({ export default defineComponent({
name: 'AppMenu', name: "AppMenu",
components: { IconGroup }, components: { IconGroup },
emits: ['clickMenuItem'], emits: ["clickMenuItem"],
setup(props, { emit }) { setup(props, { emit }) {
// //
const currentRoute = useRoute() const currentRoute = useRoute();
const router = useRouter() const router = useRouter();
const asyncRouteStore = useAsyncRouteStore() const asyncRouteStore = useAsyncRouteStore();
const menus = ref<any[]>([]) const menus = ref<any[]>([]);
const selectedSvg = ref<string>(currentRoute.meta.svgname as string) const selectedSvg = ref<string>(currentRoute.meta.svgname as string);
const getSelectedSvg = computed(() => { const getSelectedSvg = computed(() => {
return unref(selectedSvg) return unref(selectedSvg);
}) });
// //
watch( watch(
() => currentRoute.fullPath, () => currentRoute.fullPath,
() => { () => {
updateMenu() updateMenu();
}, }
) );
function updateSelectedKeys() { function updateSelectedKeys() {
const svgname: string = (currentRoute.meta?.svgname as string) || '' const svgname: string = (currentRoute.meta?.svgname as string) || "";
selectedSvg.value = svgname selectedSvg.value = svgname;
} }
function updateMenu() { function updateMenu() {
menus.value = generatorMenu(asyncRouteStore.getMenus) menus.value = generatorMenu(asyncRouteStore.getMenus);
const userInfo = storage.get(CURRENT_USER) const userInfo = storage.get(CURRENT_USER);
if (userInfo && userInfo.frontmenuTList) { if (userInfo && userInfo.frontmenuTList) {
menus.value = userInfo.frontmenuTList.map((item) => { menus.value = userInfo.frontmenuTList.map((item) => {
const v = { let v = {
component: () => component: () =>
item.resUrl == '/task' item.resUrl == "/task"
? import('@/views/task/index.vue') ? import("@/views/task/index.vue")
: item.resUrl == '/home' : item.resUrl == "/home"
? import('@/views/home/index.vue') ? import("@/views/home/index.vue")
: item.resUrl == '/worksheet' : item.resUrl == "/worksheet"
? import('@/views/worksheet/index.vue') ? import("@/views/worksheet/index.vue")
: item.resUrl == '/final' : item.resUrl == "/final"
? import('@/views/final/index.vue') ? import("@/views/final/index.vue")
: '', : "",
icon: undefined, icon: undefined,
key: item.resKey, key: item.resKey,
label: item.description, label: item.description,
@ -62,36 +62,35 @@ export default defineComponent({
path: item.resUrl, path: item.resUrl,
name: item.resKey, name: item.resKey,
svgname: item.icon, svgname: item.icon,
svgsize: item.resUrl == '/home' ? 60 : 22, svgsize: item.resUrl == "/home" ? 60 : 22,
title: item.description, title: item.description,
};
return v;
});
} }
return v updateSelectedKeys();
})
}
updateSelectedKeys()
} }
// //
function clickMenuItem(key: string) { function clickMenuItem(key: string) {
if (/http(s)?:/.test(key)) if (/http(s)?:/.test(key)) window.open(key);
window.open(key) else router.push({ name: key });
else router.push({ name: key })
emit('clickMenuItem' as any, key) emit("clickMenuItem" as any, key);
} }
onMounted(() => { onMounted(() => {
updateMenu() updateMenu();
}) });
return { return {
menus, menus,
selectedSvg, selectedSvg,
getSelectedSvg, getSelectedSvg,
clickMenuItem, clickMenuItem,
} };
}, },
}) });
</script> </script>
<template> <template>

@ -1,39 +1,21 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onBeforeMount, onMounted, unref } from 'vue' import { computed, unref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { Logo } from './components/Logo' import { Logo } from './components/Logo'
import { MainView } from './components/Main' import { MainView } from './components/Main'
import { AsideMenu } from './components/Menu' import { AsideMenu } from './components/Menu'
import { PageHeader } from './components/Header' import { PageHeader } from './components/Header'
import { useProjectSetting } from '@/hooks/setting/useProjectSetting' import { useProjectSetting } from '@/hooks/setting/useProjectSetting'
import { storage } from '@/utils/Storage'
const router = useRouter() const {
const route = useRoute() menuSetting,
onMounted(() => { } = useProjectSetting()
/**
* 如果刷新则去掉筛选条件
* 1. 如果当前页面路由与上一个页面路由相同时则为刷新
* 2. 防止一直刷新 另外一个判断条件为当前当前路由query不为{}
* 3. 当前页面下执行当前页面的搜索 1条件一定成立
*
* 4. 搜索点击->存storage->跳转页面->onMounted
* ->如果storage为true则不replace 并将storage置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()
const leftMenuWidth = computed(() => { const leftMenuWidth = computed(() => {
const { minMenuWidth } = unref(menuSetting) const { minMenuWidth } = unref(menuSetting)
return minMenuWidth return minMenuWidth
}) })
</script> </script>
<template> <template>
@ -63,13 +45,10 @@ const leftMenuWidth = computed(() => {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex: auto; flex: auto;
background-image: url("../assets/images/bg.png"); background-image: url('../assets/images/bg.png');
background-size: cover; background-size: cover;
// height: 1100px;
// width: 1440px;
height: 100%; height: 100%;
max-height: 1100px;
overflow: hidden;
.layout-sider { .layout-sider {
min-height: 100vh; min-height: 100vh;
border-right: 1px solid #dae4f3; border-right: 1px solid #dae4f3;
@ -94,7 +73,7 @@ const leftMenuWidth = computed(() => {
display: flex; display: flex;
flex: auto; flex: auto;
height: 100%; height: 100%;
// padding: 0px 16px 24px 16px; padding: 0px 16px 24px 16px;
overflow-x: hidden; overflow-x: hidden;
box-sizing: border-box; box-sizing: border-box;
} }

@ -5,9 +5,6 @@ import router, { setupRouter } from './router'
import { setupGlobalProperties, setupMousestrap, setupNaive, setupNaiveDiscreteApi, setupSvgIcon } from '@/plugins' import { setupGlobalProperties, setupMousestrap, setupNaive, setupNaiveDiscreteApi, setupSvgIcon } from '@/plugins'
import { setupStore } from '@/store' import { setupStore } from '@/store'
import 'virtual:svg-icons-register' import 'virtual:svg-icons-register'
import VueLazyload from 'vue-lazyload'
import bgPng from '@/assets/images/bg-loading.png'
import closePng from '@/assets/images/close.png'
async function bootstrap() { async function bootstrap() {
const app = createApp(App) const app = createApp(App)
@ -22,12 +19,6 @@ async function bootstrap() {
const meta = document.createElement('meta') const meta = document.createElement('meta')
meta.name = 'naive-ui-style' meta.name = 'naive-ui-style'
document.head.appendChild(meta) document.head.appendChild(meta)
app.use(VueLazyload, {
preLoad: 1.3,
error: closePng,
loading: bgPng,
attempt: 1
})
app.mount('#app', true) app.mount('#app', true)
} }

@ -31,7 +31,6 @@ const routes: Array<RouteRecordRaw> = [
name: 'final-main', name: 'final-main',
meta: { meta: {
title: '任务终审', title: '任务终审',
keepAlive: true,
}, },
component: () => import('@/views/final/index.vue'), component: () => import('@/views/final/index.vue'),
}, },

@ -1,44 +0,0 @@
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

@ -1,5 +1,5 @@
import { Layout } from '@/router/constant'
import type { RouteRecordRaw } from 'vue-router' import type { RouteRecordRaw } from 'vue-router'
import { Layout } from '@/router/constant'
/** /**
* @param name , , * @param name , ,
@ -40,7 +40,7 @@ const routes: Array<RouteRecordRaw> = [
path: 'message-detail', path: 'message-detail',
name: 'message-detail', name: 'message-detail',
meta: { meta: {
title: '消息公告', title: 'message',
}, },
component: () => import('@/views/message/content/Detail.vue'), component: () => import('@/views/message/content/Detail.vue'),
}, },

@ -1,5 +1,5 @@
import type { RouteRecordRaw } from 'vue-router'
import { Layout } from '@/router/constant' import { Layout } from '@/router/constant'
import type { RouteRecordRaw } from 'vue-router'
/** /**
* @param name , , * @param name , ,
@ -19,7 +19,7 @@ const routes: Array<RouteRecordRaw> = [
redirect: '/worksheet', redirect: '/worksheet',
component: Layout, component: Layout,
meta: { meta: {
title: '图检审批', title: '图审审批管理',
permissions: ['worksheet-main'], permissions: ['worksheet-main'],
svgname: 'worksheet', svgname: 'worksheet',
svgsize: 22, svgsize: 22,
@ -30,7 +30,7 @@ const routes: Array<RouteRecordRaw> = [
path: 'worksheet', path: 'worksheet',
name: 'worksheet-main', name: 'worksheet-main',
meta: { meta: {
title: '图检审批', title: '图审审批管理',
}, },
component: () => import('@/views/worksheet/index.vue'), component: () => import('@/views/worksheet/index.vue'),
}, },

@ -1,106 +1,35 @@
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { store } from '@/store' import { store } from '@/store'
import { getFilter } from '@/api/home/filter' import { getFilter } from '@/api/home/filter'
import { getConfig } from '@/api/system/user'
import { asideMap } from "@/config/final";
import { cloneDeep, isEqual } from "lodash-es";
import type { AsideConfig } from '/#/api'
export interface ConfigState { export interface ConfigState {
systemConfig: AsideConfig | null
customConfig: string[] | null customConfig: string[] | null
asideValue: any asideValue: any
listKey: number
searchValue: string
isAllowDownload: boolean
timeNum: number
filterConfig: string[] // 过滤筛选条件
} }
export const useFinalStore = defineStore({ export const useFinalStore = defineStore({
id: 'app-final', id: 'app-final',
state: (): ConfigState => ({ state: (): ConfigState => ({
systemConfig: null,
customConfig: null, customConfig: null,
asideValue: null, asideValue: null,
listKey: 0,
searchValue: "",
isAllowDownload: true,
timeNum: 0,
filterConfig: [],
}), }),
getters: { getters: {
getSystemConfig(): AsideConfig | null {
return this.systemConfig
},
getCustomConfig(): string[] | null { getCustomConfig(): string[] | null {
return this.customConfig return this.customConfig
}, },
getAsideValue(): any { getAsideValue(): any {
return this.asideValue return this.asideValue
}, },
getSearchValue(): any {
return this.searchValue
},
getIsAllowDownload(): any {
return this.isAllowDownload
},
getTimeNum(): any {
return this.timeNum
},
getFilterConfig(): any {
return this.filterConfig
},
}, },
actions: { actions: {
setSystemConfig(config: AsideConfig) {
this.systemConfig = config
console.log("systemConfig----------", config);
},
setAsideValue(value) { setAsideValue(value) {
this.asideValue = value this.asideValue = value
}, },
setListKey() { // 获取终审个性化配置
this.listKey = new Date().getTime()
},
setSearchValue(value) {
this.searchValue = value
},
setIsAllowDownload(value) {
this.isAllowDownload = value
},
setTimeNum(value) {
this.timeNum = value
},
// 设置个性化配置
setCustomConfig(value) {
this.customConfig = value
},
setFilterConfig(value) {
this.filterConfig = value
},
// 获取系统配置信息
async fetchConfig() {
// const response = await getConfig()
// console.log("response.data----------", response.data);
// this.setSystemConfig(response.data)
// return response.data
let list: any = {};
let tempAsideMap = cloneDeep(asideMap);
Object.keys(tempAsideMap).map(key => {
list[key] = "Y";
});
console.log("setSystemConfig---------------", list);
this.setSystemConfig(list);
return list
},
// // 获取终审个性化配置
async fetchCustomConfig() { async fetchCustomConfig() {
const res = await getFilter(1) const res = await getFilter(1)
const { data } = res const { data } = res
const list = data && data.searchcount ? data.searchcount.split(',') : []; const list = data && data.searchcount ? data.searchcount.split(',') : []
console.log("listkey---------------", list);
this.customConfig = list this.customConfig = list
return list return list
}, },

@ -1,10 +1,8 @@
import { getApprovalList } from '@/api/task/task'
import { store } from '@/store'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import type { TaskState } from '/#/task' import type { TaskState } from '/#/task'
import { createDiscreteApi } from 'naive-ui' import { getApprovalList } from '@/api/task/task'
import { store } from '@/store'
const {message} = createDiscreteApi(['message'])
export const useTaskStore = defineStore({ export const useTaskStore = defineStore({
id: 'task-store', id: 'task-store',
state: (): TaskState => ({ state: (): TaskState => ({
@ -14,7 +12,6 @@ export const useTaskStore = defineStore({
packageid: '', packageid: '',
immersion: false, immersion: false,
inFile: false, // 是否进入文件夹 inFile: false, // 是否进入文件夹
inFileId:"",
}), }),
getters: { getters: {
getActiveId: (state: TaskState) => state.activeId, getActiveId: (state: TaskState) => state.activeId,
@ -22,7 +19,6 @@ export const useTaskStore = defineStore({
getCurrentIndex: (state: TaskState) => state.currentIndex, getCurrentIndex: (state: TaskState) => state.currentIndex,
getApprovalList: (state: TaskState) => state.approvalList, getApprovalList: (state: TaskState) => state.approvalList,
getInFile: (state: TaskState) => state.inFile, getInFile: (state: TaskState) => state.inFile,
getInFileId: (state: TaskState) => state.inFileId,
}, },
actions: { actions: {
setApprovalList(list: any[]) { setApprovalList(list: any[]) {
@ -31,9 +27,6 @@ export const useTaskStore = defineStore({
setInFile(flag: any) { setInFile(flag: any) {
this.inFile = flag this.inFile = flag
}, },
setInFileId(id: any) {
this.inFileId = id
},
setActive(index: number, taskId?: string) { setActive(index: number, taskId?: string) {
this.currentIndex = index this.currentIndex = index
const task = this.approvalList[index] const task = this.approvalList[index]
@ -44,13 +37,13 @@ export const useTaskStore = defineStore({
const len = this.approvalList.length const len = this.approvalList.length
if (this.currentIndex === len - 1) if (this.currentIndex === len - 1)
return message.error('已经到达最后一个') return
this.setActive(++this.currentIndex) this.setActive(++this.currentIndex)
}, },
back() { back() {
if (this.currentIndex === 0) if (this.currentIndex === 0)
return message.error('已经到达第一个') return
this.setActive(--this.currentIndex) this.setActive(--this.currentIndex)
}, },

@ -15,7 +15,7 @@ const TOKEN_REFRESH_SECONDS = 20 * 60
export interface UserInfoType { export interface UserInfoType {
token: string token: string
deptlist: any[] tenantList: any[]
userInfo: any userInfo: any
} }
@ -122,11 +122,12 @@ export const useUserStore = defineStore({
if (code === ResultEnum.SUCCESS) { if (code === ResultEnum.SUCCESS) {
const ex = 7 * 24 * 60 * 60 const ex = 7 * 24 * 60 * 60
// 默认设置为第一个租户 // 默认设置为第一个租户
const firstTenant = data.deptlist.length > 0 ? data.deptlist[0] : null const firstTenant = data.tenantList.length > 0 ? data.tenantList[0] : null
const tenantId = firstTenant ? firstTenant.deptno : '' const tenantId = firstTenant ? firstTenant.id : ''
data.frontmenuTList.forEach((ele) => { data.frontmenuTList.forEach(ele=>{
if (ele.description === 'AI工单') if(ele.description === 'AI工单'){
ele.description = '图检审批' ele.description = '图审审批管理'
}
}) })
storage.set(CURRENT_USER, data, ex) storage.set(CURRENT_USER, data, ex)
storage.set(TENANT_ID, tenantId) storage.set(TENANT_ID, tenantId)
@ -175,7 +176,7 @@ export const useUserStore = defineStore({
// 登出 // 登出
async logout() { async logout() {
this.setPermissions([]) this.setPermissions([])
this.setUserInfo({ deptlist: [], userInfo: {}, token: '' }) this.setUserInfo({ tenantList: [], userInfo: {}, token: '' })
this.setTenantId('') this.setTenantId('')
storage.remove(USER_ACCESS_TOKEN) storage.remove(USER_ACCESS_TOKEN)
storage.remove(CURRENT_USER) storage.remove(CURRENT_USER)

@ -1,10 +1,9 @@
import { getPackageList } from '@/api/work/work' import { getPackageList } from '@/api/work/work'
import { store } from '@/store' import { store } from '@/store'
import { useMessage } from 'naive-ui'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { createDiscreteApi } from 'naive-ui'
import type { OrderState, PackageListItem } from '/#/workorder' import type { OrderState, PackageListItem } from '/#/workorder'
const { message } = createDiscreteApi(['message'])
export const useWorkOrderStore = defineStore({ export const useWorkOrderStore = defineStore({
id: 'work-order', id: 'work-order',
state: (): OrderState => ({ state: (): OrderState => ({
@ -33,14 +32,18 @@ export const useWorkOrderStore = defineStore({
}, },
forward() { forward() {
const len = this.packageList.length const len = this.packageList.length
const message = useMessage()
if (this.currentIndex === len - 1) if (this.currentIndex === len - 1)
return message.error('已经到达最后一个') message.error('已经到达最后一个')
this.setActive(++this.currentIndex) this.setActive(++this.currentIndex)
}, },
back() { back() {
const message = useMessage()
if (this.currentIndex === 0) if (this.currentIndex === 0)
return message.error('已经到达第一个') message.error('已经到达第一个')
this.setActive(--this.currentIndex) this.setActive(--this.currentIndex)
}, },

@ -9,9 +9,7 @@ export function hideDownload(e: MouseEvent) {
const downloadEle: any = document.querySelector('.n-image-preview-toolbar')?.children[5] const downloadEle: any = document.querySelector('.n-image-preview-toolbar')?.children[5]
const asideValue = unref(configStore.getAsideValue) const asideValue = unref(configStore.getAsideValue)
const download = asideValue?.izimgdownload const download = asideValue?.izimgdownload
// TODO 判断条件调整 if (downloadEle && downloadEle.innerHTML === downloadSvg && download === false)
// if (downloadEle && downloadEle.innerHTML === downloadSvg && download === false)
if (downloadEle && !download)
downloadEle.style.display = 'none' downloadEle.style.display = 'none'
else else
downloadEle.style.display = 'block' downloadEle.style.display = 'block'

@ -10,334 +10,162 @@ import {
shallowRef, shallowRef,
unref, unref,
watch, watch,
} from 'vue' } from "vue";
import { cloneDeep, isEqual } from 'lodash-es' import { CustomFilterModalVue, FilterModal, NewFilterModal } from "@/views/final/comp";
import { CustomFilterModalVue, FilterModal, NewFilterModal } from '@/views/final/comp' import Search from "@/views/home/aside/comp/Search.vue";
import Search from '@/views/home/aside/comp/Search.vue' import AdvanceFilter from "@/views/home/aside/comp/AdvanceFilter.vue";
import AdvanceFilter from '@/views/home/aside/comp/AdvanceFilter.vue' import { getViewportOffset } from "@/utils/domUtils";
import { getViewportOffset } from '@/utils/domUtils' import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn' import { useFinal } from "@/store/modules/final";
import { useFinal } from '@/store/modules/final' import type { Filter } from "/#/home";
import type { Filter } from '/#/home' import type { AsideEntity } from "@/config/aside";
import type { AsideEntity } from '@/config/aside' import { asideMap } from "@/config/final";
import { asideMap } from '@/config/final' import type { AsideConfig } from "/#/api";
import type { AsideConfig } from '/#/api' import emitter from "@/utils/mitt";
import emitter from '@/utils/mitt'
import { getFilterList } from '@/api/home/main' const emit = defineEmits(["inputChange"]);
import { useKeydown } from '@/hooks/event/useKeydown' const finalStore = useFinal();
const emit = defineEmits(['inputChange',])
const finalStore = useFinal()
// //
const asideValue: Record<keyof typeof asideMap, any> = reactive({}) const asideValue: Record<keyof typeof asideMap, any> = reactive({});
// : // :
const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({}) const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({});
// //
const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([]) const showItems = shallowRef<{ key: string; config: AsideEntity }[]>([]);
const initAsideValueRef = ref<any>(null) // ()
const customObjRef = ref<any>(null) //
const customTempObjRef = ref<any>(null) // ()
const configFilterRef = ref<any>([]) //
initAsideValueRef.value = cloneDeep(asideMap)
onBeforeMount(async () => {
finalStore.fetchConfig()
finalStore.fetchCustomConfig()
})
Object.keys(asideMap).forEach((key) => { Object.keys(asideMap).forEach((key) => {
const { defaultValue, inFilterList } = asideMap[key] const { defaultValue, inFilterList } = asideMap[key];
if (inFilterList !== false) if (inFilterList !== false) asideValue[key] = defaultValue;
asideValue[key] = defaultValue });
})
const filterModalRef: any = ref(null) const filterModalRef = ref(null);
const newFilterModalRef = ref(null) const newFilterModalRef = ref(null);
const customModalRef = ref(null) const customModalRef = ref(null);
const AdvanceFilterRef: any = ref(null)
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any const modal = unref(modalRef)! as any;
modal.showModal() modal.showModal();
}
function newFilterOk() {
filterModalRef.value.query(
filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize,
)
filterModalRef.value.showModal()
} }
const mousetrap = inject("mousetrap") as any;
const mousetrap = inject('mousetrap') as any mousetrap.bind("[", collapseHandler);
mousetrap.bind('[', collapseHandler)
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
computeSlideHeight() computeSlideHeight();
}) });
}) });
const collapse = ref(false) const collapse = ref(false);
function collapseHandler() { function collapseHandler() {
collapse.value = !collapse.value collapse.value = !collapse.value;
} }
const asideWidth = computed(() => { const asideWidth = computed(() => {
return collapse.value ? 0 : 308 return collapse.value ? 0 : 308;
}) });
const asideHeight = ref(500) const asideHeight = ref(500);
const asideStyle = computed(() => { const asideStyle = computed(() => {
return { return {
width: `${asideWidth.value}px`, width: `${asideWidth.value}px`,
height: `${asideHeight.value}px`, height: `${asideHeight.value}px`,
} };
}) });
const collapseIcon = computed(() => { const collapseIcon = computed(() => {
return collapse.value ? 'expand-cir' : 'collapse-cir' return collapse.value ? "expand-cir" : "collapse-cir";
}) });
function computeSlideHeight() { function computeSlideHeight() {
const headEl = document.querySelector('.aside-header')! const headEl = document.querySelector(".aside-header")!;
const { bottomIncludeBody } = getViewportOffset(headEl) const { bottomIncludeBody } = getViewportOffset(headEl);
const height = bottomIncludeBody const height = bottomIncludeBody;
asideHeight.value = height - 24 asideHeight.value = height - 24;
} }
useWindowSizeFn(computeSlideHeight, 280) useWindowSizeFn(computeSlideHeight, 280);
onBeforeMount(async () => { onBeforeMount(async () => {
finalStore.fetchCustomConfig() finalStore.fetchCustomConfig();
}) });
nextTick(() => { finalStore.$subscribe(() => {
finalStore.$subscribe(() => { const customConfig = finalStore.getCustomConfig;
// const customConfig = finalStore.getCustomConfig;
// console.log("customConfigaside---------------", customConfig); if (customConfig === null) return;
// if (customConfig === null) return;
const showKeys: string[] = [...customConfig];
// const showKeys: string[] = [...customConfig]; const defaultKeys = Object.keys(asideMap).filter(
// // const defaultKeys = Object.keys(asideMap).filter( (key) => asideMap[key].isDefaultFilter
// // (key) => asideMap[key].isDefaultFilter );
// // ); showKeys.unshift(...defaultKeys);
// // showKeys.unshift(...defaultKeys);
Object.keys(asideMap).forEach((key) => {
// Object.keys(asideMap).forEach((key) => { //
// // if (key.startsWith("iz"))
// if (key.startsWith("iz")) asideVisible[key] =
// asideVisible[key] = asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter);
// asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter); });
// });
// const items = showKeys.reduce((acc, key) => {
// if (asideMap[key]) {
// const config = {
// key,
// config: asideMap[key],
// };
// return [...acc, config];
// } else {
// return acc;
// }
// }, []);
// console.log("showItems111111111---------------", items);
// showItems.value = items;
const config = finalStore.getSystemConfig
const customConfig = finalStore.getCustomConfig
if (
configFilterRef.value.length > 0
&& isEqual(configFilterRef.value, finalStore.getFilterConfig)
&& customObjRef.value
&& isEqual(customObjRef.value, customTempObjRef.value)
)
return
if (config == null || customConfig == null)
return
// console.log("config", config, "customConfig", customConfig);
/* rao
const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter)// customConfig isDefaultFilter
const defaultKeys = Object.keys(asideMap).filter(key => asideMap[key].isDefaultFilter)// asideMap isDefaultFilter
showKeys.unshift(...defaultKeys)
*/
const sortKeyList: any = []
finalStore.getFilterConfig.forEach((item: any) => {
sortKeyList.push(item?.id)
})
const showKeys = [...sortKeyList]
Object.keys(config).forEach((key) => {
if (key.startsWith('iz') && asideMap[key] !== undefined) {
asideVisible[key]
= (showKeys.includes(key) || asideMap[key].isDefaultFilter)
&& config[key] === 'Y'
}
})
if (customObjRef.value) {
//
Object.keys(customObjRef.value).forEach((key) => {
// if (asideMap.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(asideMap, key)) {
const str = key.toLowerCase()
// console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]);
if (str == 'izsimilarity') {
if (typeof customObjRef.value[str] == 'string')
customObjRef.value[str] = customObjRef.value[str].split(',')
asideValue[key] = customObjRef.value[str] //
console.log('相似度2222222222', asideValue[key])
}
else if (str == 'izyear') {
if (typeof customObjRef.value[str] == 'string') {
const time = customObjRef.value[str].split('-')
time[0] = new Date(time[0]).getTime()
time[1] = new Date(time[1]).getTime()
customObjRef.value[str] = time
}
asideValue[key] = customObjRef.value[str] //
console.log('时间2222222222', asideValue[key])
}
else if (customObjRef.value[str]) {
console.log('customObjRef.value[str]222222', customObjRef.value[str])
// let list = customObjRef.value[str].split(',');
// console.log("list222222", list);
if (typeof customObjRef.value[str] == 'string') {
customObjRef.value[str] = customObjRef.value[str].split(',')
asideValue[key] = customObjRef.value[str] //
}
else {
asideValue[key] = customObjRef.value[str] //
}
}
else {
asideValue[key] = null
}
// asideMap[str].defaultValue = customObjRef.value[str];//
}
})
customTempObjRef.value = customObjRef.value
console.log('asideValue直接处理后的结果', asideValue)
console.log('customTempObjRef.value', customTempObjRef.value)
const tempobj = cloneDeep(asideValue)
console.log('tempObj', tempobj)
finalStore.setAsideValue(tempobj)
}
// console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
const currentData = asideMap[key] if (asideMap[key]) {
const render = currentData?.render const config = {
if (render !== false) { key,
const str = key?.toLowerCase() config: asideMap[key],
};
const o = { return [...acc, config];
key: str, } else {
config: asideMap[str], return acc;
}
return [...acc, o]
} }
else { }, []);
return acc
} showItems.value = items;
}, []) });
console.log('showItems=================================', items)
showItems.value = items
configFilterRef.value = finalStore.getFilterConfig
})
})
watch(asideVisible, (newVal) => { watch(asideVisible, (newVal) => {
Object.keys(asideValue).forEach((key) => { Object.keys(asideValue).forEach((key) => {
if (newVal[key] === false) if (newVal[key] === false) asideValue[key] = asideMap[key].defaultValue;
asideValue[key] = asideMap[key].defaultValue });
}) });
})
const asideEnter = ref(false) const asideEnter = ref(false);
const showCollapse = computed(() => { const showCollapse = computed(() => {
return collapse.value ? true : asideEnter.value return collapse.value ? true : asideEnter.value;
}) });
const showSearch = ref(false) const showSearch = ref(false);
function setShowSearch(value: boolean) { function setShowSearch(value: boolean) {
showSearch.value = value showSearch.value = value;
if (!value) if(!value){
inputChange('') inputChange('')
}
} }
// key // key
function scrollHandler(key: string) { function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`) const element = document.querySelector(`#${key}`);
element?.scrollIntoView(true) element?.scrollIntoView(true);
} }
async function filterHandler(searchId: string) { function filterHandler(searchId: string) {
// emitter.emit("filter-final", searchId); emitter.emit("filter-final", searchId);
const res = await getFilterList({ userSearchId: searchId })
// console.log("", res);
if (res.code == 'OK') {
const obj = res.data
customObjRef.value = res.data
const showKeys: any[] = []
Object.keys(obj).forEach((key) => {
// if (asideMap.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(asideMap, key))
showKeys.push(key)
})
console.log('showKeys1111111111111111', showKeys)
finalStore.setCustomConfig(showKeys)
}
} }
function editFilter(filter: any) { function editFilter(filter: any) {
const modal = unref(newFilterModalRef)! as any const modal = unref(newFilterModalRef)! as any;
modal.showModal() modal.showModal();
modal.edit(filter) modal.edit(filter);
} }
// watch(asideValue, (newVal) => { watch(asideValue, (newVal) => {
// finalStore.setAsideValue(newVal); finalStore.setAsideValue(newVal);
// });
function inputChange(keyword) {
emit('inputChange', keyword)
}
function handleOk(item: any) {
console.log('handleOk', item)
// .setCurrentlySelectedAdvanced(item.searchname)
if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname)
filterHandler(item.id)
}
else {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced('高级筛选')
filterHandler('')
}
}
function updateComponent(key, e) {
console.log('跟新值', key, e)
console.log('tempAsideValue跟新值', finalStore.getAsideValue, asideValue)
// let tempAsideValue = finalStore.getAsideValue || asideValue;
const tempobj = cloneDeep(asideValue)
console.log(tempobj, 'tempobj')
tempobj[key] = e
console.log(tempobj, 'tempobj After')
customObjRef.value = tempobj
// asideValue = Object.assign({}, asideValue, tempobj);
console.log('asideValue跟新值', tempobj)
finalStore.setAsideValue(tempobj)
}
defineExpose({
showSearch,
}); });
useKeydown('s', () => setShowSearch(true))
const inputChange = (keyword) => {
emit("inputChange", keyword);
};
</script> </script>
<template> <template>
@ -359,13 +187,11 @@ useKeydown('s', () => setShowSearch(true))
v-show="showSearch" v-show="showSearch"
@select="scrollHandler" @select="scrollHandler"
@close="setShowSearch(false)" @close="setShowSearch(false)"
@input-change="inputChange" @inputChange="inputChange"
@show-search="setShowSearch(true)"
/> />
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" v-show="!showSearch"
ref="AdvanceFilterRef"
:type="1" :type="1"
@select="filterHandler" @select="filterHandler"
@update:search="setShowSearch(true)" @update:search="setShowSearch(true)"
@ -381,7 +207,6 @@ useKeydown('s', () => setShowSearch(true))
:key="index" :key="index"
v-model:value="asideValue[item.key]" v-model:value="asideValue[item.key]"
:label="item.config.label" :label="item.config.label"
@update:value="(e) => updateComponent(item.key, e)"
/> />
<!-- 筛选 --> <!-- 筛选 -->
@ -391,10 +216,9 @@ useKeydown('s', () => setShowSearch(true))
ref="filterModalRef" ref="filterModalRef"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModal ref="newFilterModalRef" @on-ok="newFilterOk" /> <NewFilterModal ref="newFilterModalRef" />
</n-scrollbar> </n-scrollbar>
</div> </div>
</template> </template>
@ -408,13 +232,12 @@ useKeydown('s', () => setShowSearch(true))
border: 1px solid #efeff5; border: 1px solid #efeff5;
border-radius: 3px; border-radius: 3px;
box-sizing: border-box; box-sizing: border-box;
height: 100% !important;
&-header { &-header {
padding: 10px; padding: 10px;
width: 100%; width: 100%;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
margin-bottom: 15px; margin-bottom: 15px;
height: 58px;
} }
&-divider { &-divider {

@ -1,17 +1,24 @@
<script lang="ts" setup> <script lang="ts" setup>
import { cloneDeep, debounce, difference, isEqual } from 'lodash-es' import { debounce, difference } from 'lodash-es'
import { computed, onMounted, ref, watch } from 'vue' import { computed, ref, watch } from 'vue'
import { VueDraggable } from 'vue-draggable-plus' import { VueDraggable } from 'vue-draggable-plus'
import { setFilter } from '@/api/home/filter' import { setFilter } from '@/api/home/filter'
import { asideMap } from '@/config/final' import { asideMap } from '@/config/final'
import { useFinal } from '@/store/modules/final' import { useFinal } from '@/store/modules/final'
const show = ref(false) const show = ref(false)
const finalStore = useFinal()
const checkAll = ref(false) const checkAll = ref(false)
const selectIds = ref<string[]>([]) const selectIds = ref<string[]>([])
const tempList = ref<string[]>([]) const finalStore = useFinal()
const extraCustomConfig: any = []
function showModal() {
show.value = true
}
function closeModal() {
show.value = false
}
// //
const offList = ref<any[]>([]) const offList = ref<any[]>([])
// //
@ -24,69 +31,21 @@ const allCount = computed(() => {
const selectCount = computed(() => { const selectCount = computed(() => {
return `已选筛选(共${onList.value.length}个)` return `已选筛选(共${onList.value.length}个)`
}) })
const offKeyword = ref('')
const onKeyword = ref('')
Object.keys(asideMap).forEach((key) => {
const { isDefaultFilter } = asideMap[key]
if (isDefaultFilter)
extraCustomConfig.push(key)
})
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)
tempList.value = cloneDeep(showList)
if (tempList.value.length > 0)
finalStore.setFilterConfig(tempList.value)
onList.value = showList
offList.value = hideList
//
checkAll.value = hideList.every(item => item.checked)
//
offKeyword.value = ''
onKeyword.value = ''
}
function closeModal() {
offKeyword.value = ''
onKeyword.value = ''
show.value = false
}
defineExpose({ defineExpose({
showModal, showModal,
}) })
function generateDefaultList(config) { function generateDefaultList() {
return Object.keys(asideMap).reduce((acc, key) => { return Object.keys(asideMap).reduce((acc, key) => {
const { label, isDefaultFilter } = asideMap[key] const { label, isDefaultFilter } = asideMap[key]
// //
if (isDefaultFilter && config[key] === 'Y') { if (isDefaultFilter) {
const config = { const config = {
id: key, id: key,
name: label || '未配置', name: label || '未配置',
fix: true, fix: isDefaultFilter,
checked: true, checked: true,
} }
return [...acc, config] return [...acc, config]
@ -97,43 +56,20 @@ function generateDefaultList(config) {
}, []) }, [])
} }
function generatList(config, customConfig) { function generatList(customConfig) {
const keys = Object.keys(config) const keys = Object.keys(asideMap)
let onList: object[] = [] let onList: object[] = []
const offList: any = [] const offList: object[] = []
const showKeys = [] const showKeys = customConfig.map((key: string) => key.toLowerCase())
const tempShowKeys = [...customConfig, ...extraCustomConfig]
tempShowKeys.forEach((item) => { for (const key of keys) {
if (!showKeys.includes(item)) if (!key.startsWith('iz') || asideMap[key] === undefined)
showKeys.push(item) continue
})
// for (const key of keys) {
// if (!key.startsWith('iz') || config[key] === 'N' || asideMap[key] === undefined)
// continue
// const name = asideMap[key]?.label
// const isDefaultFilter = asideMap[key]?.isDefaultFilter
// // Y
// if (!isDefaultFilter) {
// const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key)
// offList.push({
// id: key,
// name: name || '',
// fix: isDefaultFilter,
// checked: isChecked,
// })
// if (isChecked && !selectIds.value.includes(key))
// isChecked && selectIds.value.push(key)
// }
// }
Object.keys(asideMap).forEach((key) => {
const name = asideMap[key]?.label const name = asideMap[key]?.label
const isDefaultFilter = asideMap[key]?.isDefaultFilter const isDefaultFilter = asideMap[key]?.isDefaultFilter
// Y //
// if (!isDefaultFilter) {
const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key) const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key)
offList.push({ offList.push({
@ -142,17 +78,15 @@ function generatList(config, customConfig) {
fix: isDefaultFilter, fix: isDefaultFilter,
checked: isChecked, checked: isChecked,
}) })
if (isChecked && !selectIds.value.includes(key))
isChecked && selectIds.value.push(key) isChecked && selectIds.value.push(key)
// } }
})
onList = showKeys.reduce((acc, key) => { onList = showKeys.reduce((acc, key) => {
const isDefaultFilter = asideMap[key]?.isDefaultFilter const isDefaultFilter = asideMap[key]?.isDefaultFilter
// && () // ()
if (config[key] === 'Y' && isDefaultFilter === false) { if (isDefaultFilter === false) {
// if (config[key] === 'Y') {
const config = { const config = {
id: key, id: key,
name: asideMap[key].label || '未配置', name: asideMap[key].label || '未配置',
@ -164,88 +98,40 @@ function generatList(config, customConfig) {
return acc return acc
} }
}, []) }, [])
const fixedList = generateDefaultList(config)
// offList.unshift(...fixedList) const fixedList = generateDefaultList()
onList.unshift(...fixedList) onList.unshift(...fixedList)
// onListcustomConfig return { showList: onList, hideList: offList }
const tempOnList = cloneDeep(onList)
const sortKeyList: any = []
finalStore.getFilterConfig.forEach((item: any) => {
sortKeyList.push(item.id)
})
const sortList: any = []
if (sortKeyList.length > 0) {
sortKeyList.forEach((key) => {
const tempItem = tempOnList.find(item => item.id == key)
if (tempItem)
sortList.push(tempItem)
})
}
else {
showKeys.forEach((key) => {
const tempItem = tempOnList.find(item => item.id == key)
if (tempItem)
sortList.push(tempItem)
})
}
// return { showList: onList, hideList: offList }
return { showList: sortList, hideList: offList }
} }
finalStore.$subscribe(() => { finalStore.$subscribe(() => {
const config = finalStore.getSystemConfig
const customConfig = finalStore.getCustomConfig const customConfig = finalStore.getCustomConfig
if (config == null || customConfig == null) if (customConfig === null)
return
if (tempList.value.length > 0 && isEqual(tempList.value, finalStore.getFilterConfig))
return return
const { showList, hideList } = generatList(config, customConfig) const { showList, hideList } = generatList(customConfig)
tempList.value = cloneDeep(showList)
if (tempList.value.length > 0)
finalStore.setFilterConfig(tempList.value)
onList.value = showList onList.value = showList
offList.value = hideList offList.value = hideList
}) })
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
e.preventDefault() e.preventDefault()
const param = onList.value const param = onList.value
.filter(item => !asideMap[item.id].isDefaultFilter)
.map((item) => { .map((item) => {
return item.id return item.id
}) })
.join(',') .join(',')
await setFilter({ searchcount: param, type: 1 }) await setFilter({ searchcount: param, type: 1 })
const obj = await finalStore.fetchCustomConfig() finalStore.fetchCustomConfig()
const tempOnList = cloneDeep(onList.value)
const sortList: any = []
obj.forEach((key) => {
const tempItem = tempOnList.find(item => item.id == key)
if (tempItem)
sortList.push(tempItem)
})
if (sortList.length > 0)
finalStore.setFilterConfig(sortList)
closeModal() closeModal()
} }
function onCheckAllChange(value) { function onCheckAllChange(value) {
const ids: string[] = [] const ids: string[] = []
if (value) {
offList.value.forEach((v) => {
if (!v.checked)
onList.value.push(v)
})
}
else {
onList.value = offList.value.filter(v => v.fix)
offList.value.map(v => ({
...v,
checked: v.fix,
}))
}
for (const item of offList.value) { for (const item of offList.value) {
if (!item.fix) { if (!item.fix) {
@ -253,6 +139,7 @@ function onCheckAllChange(value) {
ids.push(item.id) ids.push(item.id)
} }
} }
selectIds.value = value ? ids : [] selectIds.value = value ? ids : []
} }
@ -260,17 +147,16 @@ function onCheckChange(checked: any, item: any) {
const index = selectIds.value.indexOf(item.id) const index = selectIds.value.indexOf(item.id)
item.checked = checked item.checked = checked
const currentIndex = offList.value.findIndex(v => v.id == item.id)
offList.value[currentIndex].checked = item.checked
if (index === -1 && checked) if (index === -1 && checked)
selectIds.value.push(item.id) selectIds.value.push(item.id)
else index !== -1 && selectIds.value.splice(index, 1) else selectIds.value.splice(index, 1)
checkAll.value = offList.value.every(item => item.checked)
} }
const showIds = computed(() => { const showIds = computed(() => {
return onList.value.map((item) => { return onList.value.map((item) => {
return item?.id return item.id
}) })
}) })
@ -292,7 +178,6 @@ watch(
if (action === 'add') { if (action === 'add') {
for (const item of offList.value) { for (const item of offList.value) {
if (!item.fix && diff.includes(item.id)) { if (!item.fix && diff.includes(item.id)) {
if (item.checked) {
onList.value.push({ onList.value.push({
id: item.id, id: item.id,
name: item.name || '未配置', name: item.name || '未配置',
@ -301,7 +186,6 @@ watch(
} }
} }
} }
}
else { else {
const list = onList.value const list = onList.value
for (let index = 0; index < list.length; index++) { for (let index = 0; index < list.length; index++) {
@ -351,6 +235,9 @@ function removeHandler(id: string) {
onList.value.splice(index, 1) onList.value.splice(index, 1)
} }
const offKeyword = ref('')
const onKeyword = ref('')
const leftInputHandler = debounce((keyword) => { const leftInputHandler = debounce((keyword) => {
offKeyword.value = keyword offKeyword.value = keyword
}, 300) }, 300)
@ -358,23 +245,6 @@ const leftInputHandler = debounce((keyword) => {
const rightInputHandler = debounce((keyword) => { const rightInputHandler = debounce((keyword) => {
onKeyword.value = keyword onKeyword.value = keyword
}, 300) }, 300)
// async function getfield() {
// let res
// res = await getAllfieldList(3)
// const userStore = useUser()
// const userInfo = userStore.getUserInfo
// res = await getfieldList(3, userInfo.id)
// }
function onMove(e) {
// e
if (e?.related?.className?.indexOf('fix') !== -1)
return false
}
onMounted(() => {
// getfield()
})
</script> </script>
<template> <template>
@ -387,10 +257,10 @@ onMounted(() => {
aria-modal="true" aria-modal="true"
> >
<div class="wrapper"> <div class="wrapper">
<span class="wrapper-title">自定义筛选</span> <span class="wrapper-title" style="color: #333333;">自定义筛选</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info" style="background-color: #F8F8F8;">
<span :style="{ 'margin-left': '18px' }">筛选项信息</span> <span :style="{ 'margin-left': '18px' ,'color':'#333333'}">筛选项信息</span>
</div> </div>
</div> </div>
@ -403,21 +273,20 @@ onMounted(() => {
size="small" size="small"
:bordered="false" :bordered="false"
> >
<div class="input_wrap"> <div>
<n-input placeholder="搜索关键词" @input="leftInputHandler"> <n-input placeholder="搜索关键词" @input="leftInputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1-color999" /> <SvgIcon size="14px" name="magnifying-1" color="#999999" />
</template> </template>
</n-input> </n-input>
<n-scrollbar <n-scrollbar
style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px" style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px"
> >
<div class="draggable-ul"> <div class="draggable-ul">
<div class="draggable-li"> <div class="draggable-li" style="color:#666666">
<n-checkbox <n-checkbox
v-model:checked="checkAll" v-model:checked="checkAll"
label="全选" label="全选"
:indeterminate="!checkAll"
@update:checked="onCheckAllChange" @update:checked="onCheckAllChange"
/> />
</div> </div>
@ -454,10 +323,11 @@ onMounted(() => {
<template #header-extra> <template #header-extra>
<span class="textbtnStyle" @click="clearDragSource"></span> <span class="textbtnStyle" @click="clearDragSource"></span>
</template> </template>
<div class="input_wrap"> <div>
<!-- j -->
<n-input placeholder="搜索关键词" @input="rightInputHandler"> <n-input placeholder="搜索关键词" @input="rightInputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1-color999" /> <SvgIcon size="14px" name="magnifying-1" color="#999999" />
</template> </template>
</n-input> </n-input>
<n-scrollbar <n-scrollbar
@ -467,6 +337,7 @@ onMounted(() => {
<VueDraggable <VueDraggable
v-model="onList" v-model="onList"
class="draggable-ul" class="draggable-ul"
filter=".draggable-li[draggable='false']"
:animation="150" :animation="150"
group="shared" group="shared"
> >
@ -474,10 +345,12 @@ onMounted(() => {
v-for="item in onList" v-for="item in onList"
v-show="item.name.includes(onKeyword)" v-show="item.name.includes(onKeyword)"
:key="item.id" :key="item.id"
:draggable="true" :draggable="!item.fix"
:class="{ fix: item.fix }"
class="cursor-move draggable-li" class="cursor-move draggable-li"
> >
<SvgIcon name="drag" size="24" /> <!-- v-show="!item.fix" 判断是否为固定值 -->
<SvgIcon name="drag" size="14" />
<span class="ml-2">{{ item.name }}</span> <span class="ml-2">{{ item.name }}</span>
<SvgIcon <SvgIcon
v-if="!item.fix" v-if="!item.fix"
@ -499,11 +372,7 @@ onMounted(() => {
<n-button type="info" @click="handleSumbit"> <n-button type="info" @click="handleSumbit">
确定 确定
</n-button> </n-button>
<n-button <n-button secondary style="margin-left: 15px" @click="closeModal">
secondary
style="margin-left: 15px; border: 1px solid #cad2dd"
@click="showModal(false)"
>
取消 取消
</n-button> </n-button>
</div> </div>
@ -520,25 +389,18 @@ onMounted(() => {
&-title { &-title {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
color: #333333;
} }
&-bar { &-bar {
background-color: #f8f8f8 !important; background-color: #e8e8e8;
width: calc(100% + 12px); width: 100%;
margin-top: 20px; margin-top: 20px;
color: #333333;
} }
&-footer { &-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
.n-button--info-type {
background: #507afd !important;
}
.n-button--default-type {
background: #fff !important;
color: #333333;
}
} }
&-info { &-info {
@ -561,18 +423,15 @@ onMounted(() => {
.dragcardStyle { .dragcardStyle {
--n-padding-bottom: 0px !important; --n-padding-bottom: 0px !important;
--n-padding-left: 0px !important; --n-padding-left: 0px !important;
::v-deep(.n-card__content) {
padding-left: 0 !important;
padding-right: 0 !important;
}
} }
.cardstyle { .cardstyle {
width: 620px; width: 620px;
height: 800px; height: 800px;
--n-padding-bottom: 20px; --n-padding-bottom: 16px;
--n-padding-left: 24px; --n-padding-left: 24px;
// background-color: #f8f8f8 !important; --n-padding-right: 24px;
--n-padding-top: 20px;
} }
.textbtnStyle { .textbtnStyle {
@ -583,6 +442,7 @@ onMounted(() => {
.draggable-ul { .draggable-ul {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
background: #f8f8f8;
.draggable-li { .draggable-li {
width: 100%; width: 100%;
@ -593,10 +453,6 @@ onMounted(() => {
align-items: center; align-items: center;
} }
.fix {
cursor: default !important;
}
.disable-check { .disable-check {
color: gainsboro; color: gainsboro;
} }
@ -613,30 +469,20 @@ onMounted(() => {
::v-deep(.n-card > .n-card-header .n-card-header__main) { ::v-deep(.n-card > .n-card-header .n-card-header__main) {
font-weight: lighter !important; font-weight: lighter !important;
font-size: 14px; font-size: 14px;
color: #666; color: #666666;
} }
::v-deep(.n-scrollbar) { ::v-deep(.n-scrollbar) {
border-left: 1px solid #cad2dd !important; border-top: none !important;
border-right: 1px solid #cad2dd !important;
border-bottom: 1px solid #e8e8e8 !important;
border-top: 1px solid #e8e8e8 !important;
} }
::v-deep(.n-card__content) { ::v-deep(.n-button--info-type) {
padding: 20px 24px 0 24px !important; background: #507afd !important;
} }
::v-deep(.n-card__footer) { ::v-deep(.n-card__footer) {
padding: 0 24px 16px 24px !important; padding: 0 16px 16px 16px !important;
} }
::v-deep(.n-input .n-input-wrapper) { ::v-deep(.n-button--default-type) {
height: 44px !important;
border: 1px solid #cad2dd !important; border: 1px solid #cad2dd !important;
border-bottom: none !important; color: #333333;
// margin-bottom: -3px; background: #ffffff;
.n-input__input input {
height: 44px !important;
}
}
::v-deep(.n-button--info-type) {
background: #507afd !important;
} }
</style> </style>

@ -1,179 +1,238 @@
<script lang="ts" setup> <script lang="ts" setup>
import { difference } from 'lodash-es' import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter";
import { computed, onMounted, ref, watch } from 'vue' import { ColumnsMap } from "@/config/final";
import { VueDraggable } from 'vue-draggable-plus' import { useUser } from "@/store/modules/user";
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter' import { difference } from "lodash-es";
import { useUser } from '@/store/modules/user' import { computed, onMounted, ref, watch } from "vue";
import { VueDraggable } from "vue-draggable-plus";
const emit = defineEmits<{
(e: "commit", columns: any[]);
}>();
//
const offList = ref<any[]>([]);
//
const fixLeftList = ref<any[]>([]);
const onList = ref<any[]>([]);
const props = defineProps({ const props = defineProps({
reviewType: { reviewType: {
type: Number, type: Number,
default: () => 0, default: () => 0,
require: true, require: true,
}, },
}) });
const emit = defineEmits<{
(e: 'commit', columns: any[])
}>()
//
const offList = ref<any[]>([])
//
const fixLeftList = ref<any[]>([])
const onList = ref<any[]>([])
onMounted(async () => { onMounted(async () => {
const userStore = useUser() const userStore = useUser();
const userInfo = userStore.getUserInfo const userInfo = userStore.getUserInfo;
let res let res;
res = await getAllfieldList(props.reviewType) // res = await getAllfieldList(props.reviewType); //
const allList = res.data const allList = res.data;
res = await getfieldList(props.reviewType, userInfo.id) // res = await getfieldList(props.reviewType, userInfo.id); //
const useList = res.data const useList = res.data;
/** /**
* name 标题 * name 标题
* id 键值 * id 键值
* fix 是否默认 * fix 是否默认
* checked 是否选中 * checked 是否选中
*/ */
const userFieldFixed = useList.userFieldFixed?.split(',') const userFieldFixed = useList.userFieldFixed?.split(",");
const userFieldUnFixed = useList.userFieldUnFixed?.split(',') const userFieldUnFixed = useList.userFieldUnFixed?.split(",");
const mustList: any[] = [] let mustList = [];
allList?.forEach((v) => { allList?.map((v) => {
const item = { let item = {
name: v.fieldDesc, name: v.fieldDesc,
id: v.name, id: v.name,
fix: v.isrequired == 2, fix: v.isrequired == 2,
checked: checked:
v.isrequired == 2 v.isrequired == 2 ||
|| Boolean(userFieldFixed?.find(v2 => v2 == v.name)) Boolean(userFieldFixed?.find((v2) => v2 == v.name)) ||
|| Boolean(userFieldUnFixed?.find(v2 => v2 == v.name)), Boolean(userFieldUnFixed?.find((v2) => v2 == v.name)),
} };
if (item.fix) { if (item.fix) {
mustList.push(item) mustList.push(item);
if (!userFieldFixed?.length && !userFieldUnFixed?.length) if (!userFieldFixed?.length && !userFieldUnFixed?.length) {
fixLeftList.value.push(item) fixLeftList.value.push(item);
} }
if (userFieldFixed?.find(v2 => v2 == v.name)) }
fixLeftList.value.push(item) if (userFieldFixed?.find((v2) => v2 == v.name)) {
fixLeftList.value.push(item);
if (userFieldUnFixed?.find(v2 => v2 == v.name)) }
onList.value.push(item) if (userFieldUnFixed?.find((v2) => v2 == v.name)) {
onList.value.push(item);
offList.value.push(item) }
}) offList.value.push(item);
}) });
});
const allCount = computed(() => { const allCount = computed(() => {
return `全部字段(共${offList.value.length - 1}个)` return `全部字段(共${offList.value.length - 1}个)`;
}) });
const selectCount = computed(() => { const selectCount = computed(() => {
return `显示字段(共${onList.value.length}个)` return `显示字段(共${onList.value.length}个)`;
}) });
function generatList() {
const keys = Object.keys(ColumnsMap);
// const showStr = 'name'
// const showKeys = showStr.split(',').map((key: string) => key.toLowerCase())
for (const key of keys) {
const { title, fixed, fixLeft, width } = ColumnsMap[key];
const item = {
id: key,
title,
fix: fixed,
checked: ColumnsMap[key].fixed,
width,
};
if (!fixed) offList.value.push(item);
if (fixLeft) fixLeftList.value.push(item);
}
// showList = showKeys.reduce((acc, key) => {
// const config = {
// id: key,
// title: ColumnsMap[key].name || '',
// fix: ColumnsMap[key].fixed,
// }
// return [...acc, config]
// }, [])
const fixedList = generateDefaultList();
const filterList = fixedList.filter((item) => {
return !item.fixLeft;
});
onList.value.unshift(...filterList);
offList.value.unshift(...fixedList);
}
function generateDefaultList() {
return Object.keys(ColumnsMap).reduce((acc, key) => {
const { title, fixed, fixLeft, width } = ColumnsMap[key];
if (fixed) {
const config = {
id: key,
title,
fix: true,
checked: true,
fixLeft,
width,
};
return [...acc, config];
} else {
return acc;
}
}, []);
}
const show = ref(false) const show = ref(false);
const checkAll = ref(false) const checkAll = ref(false);
function showModal() { function showModal() {
show.value = true show.value = true;
} }
function closeModal() { function closeModal() {
show.value = false show.value = false;
} }
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
e.preventDefault() e.preventDefault();
closeModal() closeModal();
const userStore = useUser() const userStore = useUser();
const userInfo = userStore.getUserInfo const userInfo = userStore.getUserInfo;
let userFieldFixed = '' let userFieldFixed = "";
let userFieldUnFixed = '' let userFieldUnFixed = "";
fixLeftList.value.forEach((v) => { fixLeftList.value.map((v) => {
userFieldFixed += `${v.id},` userFieldFixed += `${v.id},`;
}) });
onList.value.forEach((v) => { onList.value.map((v) => {
userFieldUnFixed += `${v.id},` userFieldUnFixed += `${v.id},`;
}) });
userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1) userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1);
userFieldUnFixed = userFieldUnFixed.slice(0, userFieldUnFixed.length - 1) userFieldUnFixed = userFieldUnFixed.slice(0, userFieldUnFixed.length - 1);
savefield(props.reviewType, userInfo.id, userFieldFixed, userFieldUnFixed) savefield(props.reviewType, userInfo.id, userFieldFixed, userFieldUnFixed);
const columns: any[] = [ const columns: any[] = [
{ {
type: 'selection', type: "selection",
fixed: 'left', fixed: "left",
width: 50, width: 50,
}, },
] ];
const leftList = fixLeftList.value.map((item) => { const leftList = fixLeftList.value.map((item) => {
return { return {
title: item.name, title: item.name,
key: item.id, key: item.id,
fixed: 'left', fixed: "left",
width: 120, width: 120,
} };
}) });
const unfixList = onList.value.map((item) => { const unfixList = onList.value.map((item) => {
return { return {
title: item.name, title: item.name,
key: item.id, key: item.id,
width: 120, width: 120,
} };
}) });
columns.push(...leftList, ...unfixList) columns.push(...leftList, ...unfixList);
emit('commit', columns) emit("commit", columns);
} }
defineExpose({ defineExpose({
showModal, showModal,
}) });
// generatList() // generatList()
const selectIds = ref<string[]>([]) const selectIds = ref<string[]>([]);
function onCheckAllChange(value) { function onCheckAllChange(value) {
const ids: string[] = [] const ids: string[] = [];
for (const item of offList.value) { for (const item of offList.value) {
if (!item.fix) { if (!item.fix) {
item.checked = value item.checked = value;
ids.push(item.id) ids.push(item.id);
} }
} }
if (value) { if (value) {
offList.value.forEach((v) => { offList.value.map((v) => {
if (!v.checked) if (!v.checked) {
onList.value.push(v) onList.value.push(v);
}) }
} });
else { } else {
onList.value = [] onList.value = [];
fixLeftList.value = [] fixLeftList.value = [];
offList.value.forEach((v) => { offList.value.map((v) => {
if (v.fix) if (v.fix) {
fixLeftList.value.push(v) fixLeftList.value.push(v);
}) }
} });
selectIds.value = value ? ids : [] }
selectIds.value = value ? ids : [];
} }
function onCheckChange(checked: any, item: any) { function onCheckChange(checked: any, item: any) {
item.checked = checked item.checked = checked;
if (checked) { if (checked) {
onList.value.push(item) onList.value.push(item);
} } else {
else { let index = onList.value.findIndex((v) => v.id == item.id);
let index = onList.value.findIndex(v => v.id == item.id)
if (index > -1) { if (index > -1) {
onList.value.splice(index, 1) onList.value.splice(index, 1);
} } else {
else { index = fixLeftList.value.findIndex((v) => v.id == item.id);
index = fixLeftList.value.findIndex(v => v.id == item.id) fixLeftList.value.splice(index, 1);
fixLeftList.value.splice(index, 1)
} }
} }
// TODO // TODO
@ -183,26 +242,24 @@ function onCheckChange(checked: any, item: any) {
const showIds = computed(() => { const showIds = computed(() => {
return onList.value.map((item) => { return onList.value.map((item) => {
return item.id return item.id;
}) });
}) });
watch( watch(
() => selectIds.value.length, () => selectIds.value.length,
(newVal, oldVal) => { (newVal, oldVal) => {
if (newVal === oldVal) if (newVal === oldVal) return;
return
const action = newVal > oldVal ? 'add' : 'remove' const action = newVal > oldVal ? "add" : "remove";
const diff: string[] const diff: string[] =
= action === 'add' action === "add"
? difference(selectIds.value, showIds.value) ? difference(selectIds.value, showIds.value)
: difference(showIds.value, selectIds.value) : difference(showIds.value, selectIds.value);
if (diff.length === 0) if (diff.length === 0) return;
return
if (action === 'add') { if (action === "add") {
for (const item of offList.value) { for (const item of offList.value) {
if (!item.fix && diff.includes(item.id)) { if (!item.fix && diff.includes(item.id)) {
onList.value.push({ onList.value.push({
@ -210,81 +267,77 @@ watch(
name: item.name, name: item.name,
fix: item.fix || false, fix: item.fix || false,
width: 120, width: 120,
}) });
} }
} }
} } else {
else { const list = onList.value;
const list = onList.value
for (let index = 0; index < list.length; index++) { for (let index = 0; index < list.length; index++) {
const item = list[index] const item = list[index];
if (!item.fix && diff.includes(item.id)) { if (!item.fix && diff.includes(item.id)) {
list.splice(index, 1) list.splice(index, 1);
return return;
} }
} }
} }
}, }
) );
watch( watch(
() => showIds.value.length, () => showIds.value.length,
(newVal, oldVal) => { (newVal, oldVal) => {
if (newVal === oldVal) if (newVal === oldVal) return;
return
const diff = difference(selectIds.value, showIds.value) const diff = difference(selectIds.value, showIds.value);
if (diff.length === 0) if (diff.length === 0) return;
return
for (const item of offList.value) { for (const item of offList.value) {
if (!item.fix && diff.includes(item.id)) { if (!item.fix && diff.includes(item.id)) {
const index = selectIds.value.indexOf(item.id) const index = selectIds.value.indexOf(item.id);
item.checked = false item.checked = false;
selectIds.value.splice(index, 1) selectIds.value.splice(index, 1);
} }
} }
}, }
) );
function clearDragSource() { function clearDragSource() {
onList.value = onList.value.filter((item) => { onList.value = onList.value.filter((item) => {
return item.fix === true return item.fix === true;
}) });
} }
function removeHandler(id: string, type: 'fix' | 'unfix') { function removeHandler(id: string, type: "fix" | "unfix") {
const list = type === 'fix' ? fixLeftList.value : onList.value const list = type === "fix" ? fixLeftList.value : onList.value;
let index = list.findIndex((item) => { let index = list.findIndex((item) => {
return item.id === id return item.id === id;
}) });
if (index !== -1) if (index !== -1) list.splice(index, 1);
list.splice(index, 1) index = offList.value.findIndex((v) => v.id == id);
index = offList.value.findIndex(v => v.id == id)
if (index !== -1) { if (index !== -1) {
offList.value[index].checked = false offList.value[index].checked = false;
} } else {
else { index == fixLeftList.value.findIndex((v) => v.id == id);
index = fixLeftList.value.findIndex(v => v.id == id) fixLeftList.value[index].checked = false;
fixLeftList.value[index].checked = false
} }
} }
const indeterminate = computed(() => { const indeterminate = computed(() => {
let baseNum = 0;
offList.value.map((v) => {
if (v.fix) {
baseNum += 1;
}
});
return ( return (
onList.value.length onList.value.length + fixLeftList.value.length - baseNum > 0 &&
+ fixLeftList.value.length offList.value.length - baseNum >
- offList.value.filter(v => v.fix).length onList.value.length + fixLeftList.value.length - baseNum
> 0 );
&& offList.value.length - offList.value.filter(v => v.fix).length });
> onList.value.length
+ fixLeftList.value.length
- offList.value.filter(v => v.fix).length
)
})
</script> </script>
<template> <template>
@ -323,8 +376,8 @@ const indeterminate = computed(() => {
<n-checkbox <n-checkbox
v-model:checked="checkAll" v-model:checked="checkAll"
label="全部" label="全部"
:indeterminate="indeterminate"
@update:checked="onCheckAllChange" @update:checked="onCheckAllChange"
:indeterminate="indeterminate"
/> />
</div> </div>
<div class="content"> <div class="content">
@ -422,9 +475,7 @@ const indeterminate = computed(() => {
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> <n-button type="info" @click="handleSumbit"> </n-button>
确定
</n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal"> <n-button secondary style="margin-left: 15px" @click="closeModal">
取消 取消
</n-button> </n-button>
@ -491,7 +542,8 @@ const indeterminate = computed(() => {
.textbtnStyle { .textbtnStyle {
cursor: pointer; cursor: pointer;
color: #507afd; color: #507AFD;
} }
.drag-wrapper { .drag-wrapper {
@ -552,7 +604,7 @@ const indeterminate = computed(() => {
::v-deep(.n-button--info-type) { ::v-deep(.n-button--info-type) {
background: #507afd !important; background: #507afd !important;
} }
::v-deep(.n-button--default-type) { ::v-deep(.n-button--default-type){
border: 1px solid #cad2dd !important; border: 1px solid #cad2dd !important;
} }
// ::v-deep(.n-card__content){ // ::v-deep(.n-card__content){

@ -1,6 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { import {
computed,
defineOptions, defineOptions,
h, h,
nextTick, nextTick,
@ -9,101 +8,86 @@ import {
reactive, reactive,
ref, ref,
unref, unref,
} from 'vue' computed,
import { NButton, NDataTable, useModal } from 'naive-ui' } from "vue";
import type { DataTableColumns, DataTableRowKey } from 'naive-ui' import { NDataTable } from "naive-ui";
import type { SortableEvent } from 'sortablejs' import type { DataTableColumns, DataTableRowKey } from "naive-ui";
import Sortable from 'sortablejs' import type { SortableEvent } from "sortablejs";
import { debounce } from 'lodash-es' import Sortable from "sortablejs";
import Action from '@/views/home/aside/comp/Action.vue' import { debounce } from "lodash-es";
import { deleteCondition, getConditionList, sort } from '@/api/home/filter' import Action from "@/views/home/aside/comp/Action.vue";
import type { FilterSearchParam } from '/#/api' import { deleteCondition, getConditionList, sort } from "@/api/home/filter";
import type { FilterSearchParam } from "/#/api";
import SvgIcon from '@/components/Icon/SvgIcon.vue'
import { useKeydown } from '@/hooks/event/useKeydown' defineOptions({ name: "FilterModal" });
defineOptions({ name: 'FilterModal' })
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'showNewFilter'): void (e: "showNewFilter"): void;
(e: 'editFilter', filter: any): void (e: "editFilter", filter: any): void;
(e: 'handleOk', item: any): void }>();
}>()
const modal = useModal()
const show = ref(false) const show = ref(false);
const checkedRowKeys = ref([]) const checkedRowKeys = ref([]);
const $message = window.$message
const cardStyle = { const cardStyle = {
'width': '800px', width: "800px",
'height': '800px', height: "800px",
'--n-padding-bottom': '10px', "--n-padding-bottom": "10px",
'--n-padding-left': '10px', "--n-padding-left": "10px",
} };
interface RowData { interface RowData {
id: string id: string;
searchname: string searchname: string;
createby: string createby: string;
createtime: string createtime: string;
updateby: string updateby: string;
updatetime: string updatetime: string;
} }
const columns: DataTableColumns<RowData> = [ const columns: DataTableColumns<RowData> = [
{ {
type: 'selection', type: "selection",
}, },
{ {
title: '操作', title: "操作",
key: 'action', key: "action",
render(row) { render(row) {
return h(Action, { return h(Action, {
options: [ options: [
{ label: '编辑', key: 1 }, { label: "编辑", key: 1 },
{ label: '删除', key: 2 }, { label: "删除", key: 2 },
], ],
id: row.id, id: row.id,
select, select,
}) });
}, },
}, },
{ {
title: '名称', title: "名称",
key: 'searchname', key: "searchname",
}, },
{ {
title: '创建者', title: "创建者",
key: 'createby', key: "createby",
}, },
{ {
title: '创建时间', title: "创建时间",
key: 'createtime', key: "createtime",
renderSorterIcon: ({ order }) => { sorter: (row1, row2) => new Date(row1?.createtime).getTime() - new Date(row2?.createtime).getTime()
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: '更新者', title: "更新者",
key: 'updateby', key: "updateby",
}, },
{ {
title: '更新时间', title: "更新时间",
key: 'updatetime', key: "updatetime",
}, },
] ];
const loading = ref(true) const loading = ref(true);
const total = ref(0) const total = ref(0);
const pagination = reactive({ const pagination = reactive({
page: 1, page: 1,
pageCount: 1, pageCount: 1,
@ -111,246 +95,211 @@ const pagination = reactive({
showSizePicker: true, showSizePicker: true,
pageSizes: [ pageSizes: [
{ {
label: '10 每页', label: "10 每页",
value: 10, value: 10,
}, },
{ {
label: '15 每页', label: "15 每页",
value: 15, value: 15,
}, },
{ {
label: '30 每页', label: "30 每页",
value: 30, value: 30,
}, },
{ {
label: '50 每页', label: "50 每页",
value: 50, value: 50,
}, },
], ],
showQuickJumper: true, showQuickJumper: true,
prefix: () => `${total.value} 条数据`, prefix: () => `${total.value} 条数据`,
}) });
const tableData = ref<Array<RowData>>([]) const tableData = ref<Array<RowData>>([]);
const keyword = ref('') const keyword = ref("");
async function query(page: number, pageSize: number) { async function query(page: number, pageSize: number) {
const searchParam: FilterSearchParam = { const searchParam: FilterSearchParam = {
search_searchname: { value: keyword.value, op: 'like', type: 'string' }, search_searchname: { value: keyword.value, op: "like", type: "string" },
} };
const result = await getConditionList({ pageNo: page, pageSize }, searchParam, 1) const result = await getConditionList({ pageNo: page, pageSize }, searchParam, 1);
const { data, pageCount, total: totalCount } = result const { data, pageCount, total: totalCount } = result;
total.value = totalCount total.value = totalCount;
tableData.value = data tableData.value = data;
pagination.page = page pagination.page = page;
pagination.pageCount = pageCount pagination.pageCount = pageCount;
loading.value = false loading.value = false;
} }
function afterLeave() { function afterLeave() {
pagination.page = 1 pagination.page = 1;
pagination.pageCount = 1 pagination.pageCount = 1;
pagination.pageSize = 10 pagination.pageSize = 10;
} }
const selectionIds = ref<DataTableRowKey[]>([]) const selectionIds = ref<DataTableRowKey[]>([]);
const rowKey = (row: RowData) => row.id const rowKey = (row: RowData) => row.id;
function rowProps(row: RowData) { function rowProps(row: RowData) {
return { return {
'data-id': row.id, "data-id": row.id,
} };
} }
function handleCheck(rowKeys: DataTableRowKey[]) { function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys selectionIds.value = rowKeys;
} }
function select(key: number, id: string) { function select(key: number, id: string) {
if (key == 1) switch (key) {
editSelection(id) case 1:
editSelection(id);
else break;
deleteSelection(id) case 2:
// const modalInst = modal.create({ deleteSelection(id);
// title: "", break;
// content: "?", default:
// positiveText: "", break;
// negativeText: "", }
// preset: "dialog",
// onPositiveClick: () => deleteSelection(id),
// onNegativeClick: () => modalInst.destroy(),
// });
} }
function editSelection(id = '') { function editSelection(id = "") {
// eslint-disable-next-line dot-notation
// const $message = window["$message"]; // const $message = window["$message"];
// if (selectionIds.value.length === 0 || selectionIds.value.length > 1) { // if (selectionIds.value.length === 0 || selectionIds.value.length > 1) {
// $message.error(""); // $message.error("");
// return; // return;
// } // }
const selectedId = id const selectedId = id;
const selectedFilter = tableData.value.find((item: any) => { const selectedFilter = tableData.value.find((item: any) => {
return item.id === selectedId return item.id === selectedId;
}) });
emit('editFilter', selectedFilter) emit("editFilter", selectedFilter);
closeModal() closeModal();
} }
function deleteSelection(id = '') { function deleteSelection(id = "") {
if (id) { // eslint-disable-next-line dot-notation
if (selectionIds.value.length === 0) {
deleteCondition({ ids: id }).then(() => { deleteCondition({ ids: id }).then(() => {
query(pagination.page, pagination.pageSize) query(pagination.page, pagination.pageSize);
}) });
return return;
} }
const modalInst = modal.create({
title: '确认提示', deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
content: '确认删除所选过滤条件吗?', selectionIds.value = [];
positiveText: '确定', query(pagination.page, pagination.pageSize);
negativeText: '取消', });
preset: 'dialog',
onPositiveClick: () =>
deleteCondition({ ids: selectionIds.value.join(',') }).then(() => {
selectionIds.value = []
query(pagination.page, pagination.pageSize)
}),
onNegativeClick: () => modalInst.destroy(),
})
} }
async function handlePageChange(currentPage) { async function handlePageChange(currentPage) {
if (loading.value) if (loading.value) return;
return pagination.page = currentPage;
pagination.page = currentPage const { pageSize } = pagination;
const { pageSize } = pagination await query(currentPage, pageSize);
await query(currentPage, pageSize)
} }
async function handlePageSizeChange(currentPageSize) { async function handlePageSizeChange(currentPageSize) {
if (loading.value) if (loading.value) return;
return
const { page } = pagination const { page } = pagination;
pagination.pageSize = currentPageSize pagination.pageSize = currentPageSize;
await query(page, currentPageSize) await query(page, currentPageSize);
} }
function handleClick() { function handleClick() {
emit('showNewFilter') emit("showNewFilter");
// show.value = false; // show.value = false;
closeModal()
} }
useKeydown('n t', handleClick)
let sortTable: Sortable | null = null let sortTable: Sortable | null = null;
const tableRef = ref<InstanceType<typeof NDataTable>>() const tableRef = ref<InstanceType<typeof NDataTable>>();
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
console.log(tableRef.value, 'tableRef') console.log(tableRef.value, "tableRef");
}) });
}) });
async function showModal() { async function showModal() {
show.value = true show.value = true;
const { page, pageSize } = pagination const { page, pageSize } = pagination;
await query(page, pageSize) await query(page, pageSize);
nextTick(() => { nextTick(() => {
if (sortTable !== null) if (sortTable !== null) destory();
destory()
const el: HTMLDivElement = tableRef.value?.$el;
const el: HTMLDivElement = tableRef.value?.$el const tbody: HTMLElement | null = el.querySelector("tbody.n-data-table-tbody")!;
const tbody: HTMLElement | null = el.querySelector('tbody.n-data-table-tbody')! if (tbody) sortTable = Sortable.create(tbody, { onEnd, onMove });
if (tbody) });
sortTable = Sortable.create(tbody, { onEnd, onMove })
})
} }
let relatedId = '' let relatedId = "";
let insertafter = false let insertafter = false;
// TODO: bug // TODO: bug
function onEnd(event: SortableEvent) { function onEnd(event: SortableEvent) {
const data = unref(tableData) const data = unref(tableData);
const oldElem = data[event.oldIndex!] const oldElem = data[event.oldIndex!];
data.splice(event.oldIndex!, 1) data.splice(event.oldIndex!, 1);
data.splice(event.newIndex!, 0, oldElem) data.splice(event.newIndex!, 0, oldElem);
const dragId = oldElem.id const dragId = oldElem.id;
const index = data.findIndex((item) => { const index = data.findIndex((item) => {
return item.id === relatedId return item.id === relatedId;
}) });
// -1+1 // -1+1
const order = insertafter ? index - 1 : index + 1 const order = insertafter ? index - 1 : index + 1;
// console.log('dragid:', dragId, 'order:', order) // console.log('dragid:', dragId, 'order:', order)
sort(dragId, order) sort(dragId, order);
} }
function onMove(evt: any) { function onMove(evt: any) {
relatedId = evt.related?.dataset?.id relatedId = evt.related?.dataset?.id;
insertafter = evt.willInsertAfter insertafter = evt.willInsertAfter;
// console.log(`${evt.dragged.dataset.id},${evt.related}`, 'insertafter', evt.willInsertAfter) // console.log(`${evt.dragged.dataset.id},${evt.related}`, 'insertafter', evt.willInsertAfter)
} }
function destory() { function destory() {
sortTable && sortTable.destroy() sortTable && sortTable.destroy();
sortTable = null sortTable = null;
} }
onUnmounted(() => { onUnmounted(() => {
destory() destory();
}) });
function closeModal() { function closeModal() {
show.value = false show.value = false;
} }
defineExpose({ defineExpose({
showModal, showModal,
query, });
pagination,
})
const inputHandler = debounce((word) => { const inputHandler = debounce((word) => {
keyword.value = word keyword.value = word;
query(1, 5) query(1, 5);
}, 300) }, 300);
const showSearch = computed(() => { const showSearch = computed(() => {
return selectionIds.value.length > 0 return selectionIds.value.length > 0;
}) });
function handleOk() {
if (selectionIds.value.length > 1) {
$message.error('只能选择一条筛选条件')
return
}
if (selectionIds.value.length == 1) {
const selectedId = selectionIds.value[0]
const item = tableData.value.find(v => v.id == selectedId)
emit('handleOk', item)
}
if (selectionIds.value.length == 0)
emit('handleOk', '')
closeModal()
}
</script> </script>
<template> <template>
<div> <div>
<!-- <n-modal v-model:show="delShow" >
</n-modal> -->
<n-modal <n-modal
v-model:show="show" v-model:show="show"
transform-origin="center" transform-origin="center"
display-directive="if" display-directive="if"
:mask-closable="false"
class="modal_wrapper"
@after-leave="afterLeave" @after-leave="afterLeave"
:mask-closable="false"
> >
<n-card <n-card
:style="cardStyle" :style="cardStyle"
@ -363,16 +312,10 @@ function handleOk() {
<span class="wrapper-title">全部筛选值</span> <span class="wrapper-title">全部筛选值</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span <span :style="{ 'margin-left': '18px' }">基本信息</span>
:style="{
'margin-left': '18px',
'font-size': '16px',
'font-weight': '600',
}"
>基本信息</span>
</div> </div>
</div> </div>
<div v-if="!showSearch" class="wrapper-form"> <div class="wrapper-form" v-if="!showSearch">
<n-input <n-input
:style="{ width: '360px', border: '1px solid #cad2dd' }" :style="{ width: '360px', border: '1px solid #cad2dd' }"
placeholder="请输入过滤条件名称搜索" placeholder="请输入过滤条件名称搜索"
@ -382,29 +325,31 @@ function handleOk() {
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1" />
</template> </template>
</n-input> </n-input>
<NButton type="info" @click="handleClick"> <n-button type="info" @click="handleClick">
创建 创建
<template #icon> <template #icon>
<SvgIcon size="14px" name="creatFilter" /> <SvgIcon size="14px" name="magnifying-1" />
</template> </template>
</NButton> </n-button>
</div> </div>
<div v-else class="wrapper-form"> <div class="wrapper-form" v-else>
<div class="del_btn"> <div class="del_btn">
<NButton icon-placement="left" size="medium" @click="deleteSelection()"> <n-button icon-placement="left" size="medium">
<template #icon> <template #icon>
<SvgIcon name="delete-history" size="16" /> <SvgIcon name="delete-history" size="16" />
</template> </template>
删除 删除</n-button
</NButton> >
</div> </div>
<div class="msg"> <div class="msg">
<span>已选中 <span
>已选中
<span style="color: #507afd; font-size: 16px">{{ <span style="color: #507afd; font-size: 16px">{{
selectionIds.length selectionIds.length
}}</span> }}</span>
</span> </span
>
<a @click="selectionIds = []">清空</a> <a @click="selectionIds = []">清空</a>
</div> </div>
</div> </div>
@ -419,21 +364,19 @@ function handleOk() {
:loading="loading" :loading="loading"
:pagination="pagination" :pagination="pagination"
:row-key="rowKey" :row-key="rowKey"
:checked-row-keys="selectionIds"
@update:page="handlePageChange" @update:page="handlePageChange"
@update-page-size="handlePageSizeChange" @update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck" @update:checked-row-keys="handleCheck"
:checked-row-keys="selectionIds"
/> />
</div> </div>
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<NButton type="info" @click="handleOk"> <n-button type="info" @click="closeModal"> </n-button>
确认 <n-button secondary style="margin-left: 15px" @click="closeModal">
</NButton>
<NButton secondary style="margin-left: 15px" @click="closeModal">
取消 取消
</NButton> </n-button>
</div> </div>
</template> </template>
</n-card> </n-card>
@ -466,15 +409,13 @@ function handleOk() {
width: 300px; width: 300px;
border: 1px solid gray; border: 1px solid gray;
} }
.msg { .del_btn {
span {
padding-right: 16px;
} }
.msg {
a { a {
padding-left: 17px; margin-left: 30px;
cursor: pointer; cursor: pointer;
color: #507afd; color: #507afd;
border-left: 1px solid #d8d8d8;
} }
} }
} }
@ -503,29 +444,4 @@ function handleOk() {
} }
} }
} }
.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> </style>

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { FormInst, FormItemRule, FormRules } from 'naive-ui' import type { FormInst, FormItemRule, FormRules } from 'naive-ui'
import { computed, defineEmits, onBeforeMount, reactive, ref, unref, watch } from 'vue' import { computed, onBeforeMount, reactive, ref, unref, watch } from 'vue'
import { asideMap } from '@/config/final' import { asideMap } from '@/config/final'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
@ -9,7 +9,6 @@ import { addCondition, updateCondition } from '@/api/home/filter'
import { formatToDate2, formatToDate3 } from '@/utils/dateUtil' import { formatToDate2, formatToDate3 } from '@/utils/dateUtil'
type Status = 'edit' | 'new' type Status = 'edit' | 'new'
const emit = defineEmits(['onOk'])
const show = ref(false) const show = ref(false)
const configStore = useConfig() const configStore = useConfig()
@ -86,13 +85,11 @@ const formRef = ref<FormInst | null>(null)
const formValue = reactive<FormType>({ const formValue = reactive<FormType>({
name: null, name: null,
logic: 'and', logic: 'and',
conditions: [ conditions: [{
{
type: null, type: null,
operator: 'eq', operator: 'eq',
result: null, result: null,
}, }],
],
}) })
function handleSumbit(e: MouseEvent) { function handleSumbit(e: MouseEvent) {
@ -121,13 +118,14 @@ function handleSumbit(e: MouseEvent) {
if (currentStatus.value === 'new') if (currentStatus.value === 'new')
addCondition(param) addCondition(param)
else updateCondition({ id: currentEditId!, ...param }) else
updateCondition({ id: currentEditId!, ...param })
closeModal() closeModal()
}) })
} }
function formatValue(searchfield: string, searchvalue: any) { function formatValue(searchfield: string, searchvalue: any) {
if (searchfield === 'izyear') { if (searchfield === 'izuptime') {
const start = formatToDate2(searchvalue[0]) const start = formatToDate2(searchvalue[0])
const end = formatToDate2(searchvalue[1]) const end = formatToDate2(searchvalue[1])
return `${start}-${end}` return `${start}-${end}`
@ -139,7 +137,7 @@ function formatValue(searchfield: string, searchvalue: any) {
// //
function unformatValue(searchfield: string, searchvalue: any) { function unformatValue(searchfield: string, searchvalue: any) {
// 2022/01/03-2023/02/04 // 2022/01/03-2023/02/04
if (searchfield === 'izyear') { if (searchfield === 'izuptime') {
const dataStrs = searchvalue.split('-') const dataStrs = searchvalue.split('-')
const start = formatToDate3(dataStrs[0]) const start = formatToDate3(dataStrs[0])
const end = formatToDate3(dataStrs[1]) const end = formatToDate3(dataStrs[1])
@ -184,25 +182,16 @@ onBeforeMount(() => {
dicStore.fetchRelationTypeList() dicStore.fetchRelationTypeList()
}) })
watch( watch(() => dicStore.relationTypeList, (newval) => {
() => dicStore.relationTypeList,
(newval) => {
logicOptions.value = newval logicOptions.value = newval
}, })
)
function showModal() { function showModal() {
show.value = true show.value = true
setTimeout(() => {
formValue.name = ''
}, 300);
} }
function closeModal() { function closeModal() {
emit('onOk')
setTimeout(() => {
show.value = false show.value = false
}, 300)
} }
function generateAllData(): Option[] { function generateAllData(): Option[] {
@ -211,8 +200,7 @@ function generateAllData(): Option[] {
if (value.startsWith('iz') && asideMap[value]?.inFilterList !== false) { if (value.startsWith('iz') && asideMap[value]?.inFilterList !== false) {
const name = asideMap[value]?.label const name = asideMap[value]?.label
name name && acc.push({
&& acc.push({
value, value,
label: name || '未配置', label: name || '未配置',
}) })
@ -267,98 +255,45 @@ defineExpose({
</script> </script>
<template> <template>
<n-modal <n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler" :mask-closable="false">
v-model:show="show" <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
transform-origin="center"
:mask-closable="false"
@after-leave="leaveHandler"
>
<n-card
:style="cardStyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<div class="wrapper"> <div class="wrapper">
<span class="wrapper-title">{{ modalTitle }}</span> <span class="wrapper-title">{{ modalTitle }}</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span <span :style="{ 'margin-left': '18px' }">基本信息</span>
:style="{
'margin-left': '18px',
'font-size': '16px',
'font-weight': '600',
}"
>基本信息</span>
</div> </div>
</div> </div>
<div class="wrapper-form"> <div class="wrapper-form">
<n-form <n-form ref="formRef" :model="formValue" :rules="rules">
ref="formRef"
:model="formValue"
:rules="rules"
require-mark-placement="left"
>
<n-form-item path="name" label="标题"> <n-form-item path="name" label="标题">
<n-input <n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
v-model:value="formValue.name"
:style="{ width: '780px' }"
placeholder="请输入过滤名称"
maxlength="15"
@keydown.enter.prevent
/>
</n-form-item> </n-form-item>
<n-form-item v-show="false" path="logic" label="逻辑关系"> <n-form-item path="logic" label="逻辑关系" v-show="false">
<n-select <n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" />
v-model:value="formValue.logic"
filterable
placeholder="请选择逻辑关系"
:options="logicOptions"
/>
</n-form-item> </n-form-item>
<n-form-item <n-form-item
v-for="(item, index) in formValue.conditions" v-for="(item, index) in formValue.conditions" :key="index" :style="formItemStyle"
:key="index" path="conditions" :label="formLabel(index)"
:style="formItemStyle"
path="conditions"
:label="formLabel(index)"
> >
<n-select <n-select filterable
v-model:value="item.type" v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions"
filterable
placeholder="请选择筛选项名称"
:options="typeOptions"
@change="item.result = ''" @change="item.result = ''"
/> />
<n-select <n-select filterable
v-model:value="item.operator" v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择"
filterable
style="margin-left: 8px"
placeholder="请选择"
:options="operatorOptions" :options="operatorOptions"
/> />
<n-space v-if="item.type === 'izyear'"> <n-space v-if="item.type === 'izuptime'">
<n-date-picker <n-date-picker
v-model:value="item.result" v-model:value="item.result" style="margin-left: 8px;width: 240px;" type="daterange"
style="margin-left: 8px; width: 240px"
type="daterange"
clearable clearable
/> />
</n-space> </n-space>
<n-select <n-select filterable
v-else v-else v-model:value="item.result" style="margin-left: 8px;" placeholder="请选择" :options="getOptions(item.type!)"
v-model:value="item.result"
filterable
style="margin-left: 8px"
placeholder="请选择"
:options="getOptions(item.type!)"
/> />
<n-button <n-button :style="noBorderInput" icon-placement="right" @click="removeCondition(index)">
:style="noBorderInput"
icon-placement="right"
@click="removeCondition(index)"
>
<template #icon> <template #icon>
<SvgIcon size="24" name="close" /> <SvgIcon size="24" name="close" />
</template> </template>
@ -367,8 +302,8 @@ defineExpose({
</n-form> </n-form>
</div> </div>
<div class="wrapper-new" @click="createCondition"> <div class="wrapper-new" @click="createCondition">
<span style="font-size: 16px">+</span> <span>+</span>
<span style="margin-left: 8px">添加筛选条件</span> <span style="margin-left:8px">添加筛选条件</span>
</div> </div>
</div> </div>
<template #footer> <template #footer>
@ -376,7 +311,7 @@ defineExpose({
<n-button type="info" @click="handleSumbit"> <n-button type="info" @click="handleSumbit">
确定 确定
</n-button> </n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal"> <n-button secondary style="margin-left:15px" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
@ -392,22 +327,19 @@ defineExpose({
&-title { &-title {
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 16px;
color: #333333;
} }
&-bar { &-bar {
background-color: #e8e8e8; background-color: #e8e8e8;
width: 100%; width: 100%;
margin-top: 27px; margin-top: 20px;
font-size: 16px;
color: #333333;
} }
&-form { &-form {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 24px; margin-top: 20px;
} }
&-new { &-new {
@ -416,9 +348,6 @@ defineExpose({
color: #507afd; color: #507afd;
line-height: 22px; line-height: 22px;
cursor: pointer; cursor: pointer;
span {
font-size: 11px;
}
&:hover { &:hover {
color: #507aac; color: #507aac;
@ -432,7 +361,6 @@ defineExpose({
&-footer { &-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-bottom: 6px;
} }
&-info { &-info {
@ -440,7 +368,7 @@ defineExpose({
position: relative; position: relative;
&:before { &:before {
background-color: #1980ff; background-color: #1980FF;
content: ""; content: "";
width: 5px; width: 5px;
border-radius: 2px; border-radius: 2px;
@ -450,9 +378,4 @@ defineExpose({
} }
} }
} }
::v-deep(.n-form-item .n-form-item-label) {
font-size: 14px;
color: #666666;
font-weight: 500;
}
</style> </style>

@ -363,7 +363,7 @@ function reload() {
} }
function goDetail(row) { function goDetail(row) {
router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid, taskindex: row.taskIndex } }) router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } })
} }
const showActions = computed(() => { const showActions = computed(() => {

@ -1,9 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui'
DataTableColumns,
DataTableRowKey,
PaginationProps,
} from 'naive-ui'
import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui' import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui'
import { import {
computed, computed,
@ -16,12 +12,10 @@ import {
reactive, reactive,
ref, ref,
unref, unref,
watch,defineProps watch,
} from 'vue' } from 'vue'
import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row' import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import dayjs from 'dayjs'
import { cloneDeep } from 'lodash-es'
import { import {
CustomTabelModal, CustomTabelModal,
ImportExcelModal, ImportExcelModal,
@ -46,14 +40,7 @@ import type { ApprovalParam } from '/#/api'
import emitter from '@/utils/mitt' import emitter from '@/utils/mitt'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter' import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import DataHeader from '@/components/DataHeader/index.vue'
const props = defineProps({
taskvalue: {
type: String,
default: ""
}
});
const emit = defineEmits(['changeShow']) const emit = defineEmits(['changeShow'])
function changeContent() { function changeContent() {
emit('changeShow') emit('changeShow')
@ -66,12 +53,10 @@ const route = useRoute()
const reviewType = 0 const reviewType = 0
const sortorder = ref('asc') const sortorder = ref('asc')
const sortname = ref('states') const sortname = ref('states')
const searchContent = route.query.searchContent as string
const actionsColumns = { const actionsColumns = {
title: '操作', title: '操作',
key: 'actions', key: 'actions',
minWidth: 200, minWidth: 200,
width: 200,
fixed: 'right', fixed: 'right',
render(row) { render(row) {
return h(ListAction, { return h(ListAction, {
@ -84,7 +69,6 @@ const actionsColumns = {
}, },
} }
const columnsRef = ref<DataTableColumns<RowData>>([]) const columnsRef = ref<DataTableColumns<RowData>>([])
// const columns: DataTableColumns<RowData> = [ // const columns: DataTableColumns<RowData> = [
// { // {
// type: "selection", // type: "selection",
@ -212,7 +196,6 @@ async function getColumns() {
width: 120, width: 120,
}) })
} }
return v
}) })
} }
else { else {
@ -224,7 +207,6 @@ async function getColumns() {
fixed: 'left', fixed: 'left',
width: 120, width: 120,
}) })
return v
}) })
userFieldUnFixed.map((v) => { userFieldUnFixed.map((v) => {
const item = allList.find(v2 => v2.name == v) const item = allList.find(v2 => v2.name == v)
@ -233,7 +215,6 @@ async function getColumns() {
key: item.name, key: item.name,
width: 120, width: 120,
}) })
return v
}) })
} }
// TODO: // TODO:
@ -291,7 +272,7 @@ async function formatColumns() {
NButton, NButton,
{ {
'strong': true, 'strong': true,
// 'tertiary': true, 'tertiary': true,
'text': true, 'text': true,
'size': 'small', 'size': 'small',
'text-color': '#507AFD', 'text-color': '#507AFD',
@ -379,10 +360,7 @@ async function formatColumns() {
id: row.id, id: row.id,
style: { color: row.similarityscore === 100 ? '#FF4E4F' : '' }, style: { color: row.similarityscore === 100 ? '#FF4E4F' : '' },
}, },
{ { default: () => (row.similarityscore ? `${row.similarityscore}%` : '') },
default: () =>
row.similarityscore ? `${row.similarityscore}%` : '',
},
) )
}, },
} }
@ -404,7 +382,7 @@ async function formatColumns() {
return h(SvgIcon, { name: 'sort-3' }) return h(SvgIcon, { name: 'sort-3' })
}, },
render(row: any) { render(row: any) {
return formatToDateHMS(row.fromuptime || 0) return formatToDateHMS(row.createdate || 0)
}, },
} }
} }
@ -427,7 +405,6 @@ async function formatColumns() {
render(row: any) { render(row: any) {
return row.fromusername return row.fromusername
}, },
} }
} }
@ -447,6 +424,15 @@ async function formatColumns() {
const deviceHeight = ref(600) const deviceHeight = ref(600)
onMounted(() => {
emitter.on('filter-final', refreshHandler)
getColumns()
nextTick(() => {
computeListHeight()
})
})
onBeforeMount(() => { onBeforeMount(() => {
dicStore.fetchizstatusListt() dicStore.fetchizstatusListt()
}) })
@ -498,40 +484,10 @@ const dialog = useDialog()
const message = useMessage() const message = useMessage()
const finalStore = useFinal() const finalStore = useFinal()
async function query( async function query(page: number, pageSize: number, filterId?: any, taskName?: string) {
page: number, const asideParmas = unref(finalStore.getAsideValue)
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 = asideParmas.izuptime.join('-')
delete asideParmas.izyear
}
}
// 使使 // 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas const params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas
if (params?.izshowall == true)
{
params.isFail = true
delete params.izshowall;
}
// params = params?.izshowall ? { isFail: true } : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
pageSize, pageSize,
@ -549,13 +505,16 @@ async function query(
} }
async function handleSorterChange(value) { async function handleSorterChange(value) {
console.log(value)
let name = value.columnKey let name = value.columnKey
if (name === 'fromuptime') if (name === 'fromuptime')
name = 'submit_date_timestamp' name = 'field11'
else if (name === 'similarityscore') else if (name === 'similarityscore')
name = 'similarity_score' name = 'similarity_score'
else if (name === 'fromusername') else if (name === 'fromusername')
name = 'field1' name = 'fromuserid'
sortname.value = name sortname.value = name
sortorder.value = value.order === 'ascend' ? 'asc' : 'desc' sortorder.value = value.order === 'ascend' ? 'asc' : 'desc'
@ -567,7 +526,7 @@ async function handlePageChange(currentPage) {
return return
const { pageSize } = pagination const { pageSize } = pagination
pagination.page = currentPage pagination.page = currentPage
await query(currentPage, pageSize,{},props.taskvalue) await query(currentPage, pageSize)
} }
async function handlePageSizeChange(currentPageSize) { async function handlePageSizeChange(currentPageSize) {
if (loading.value) if (loading.value)
@ -576,7 +535,7 @@ async function handlePageSizeChange(currentPageSize) {
const { page } = pagination const { page } = pagination
pagination.pageSize = currentPageSize pagination.pageSize = currentPageSize
await query(page, currentPageSize,{},props.taskvalue) await query(page, currentPageSize)
} }
function handleCheck(rowKeys: DataTableRowKey[]) { function handleCheck(rowKeys: DataTableRowKey[]) {
@ -617,20 +576,8 @@ const maxHeight = computed(() => {
return tableData.value.length ? `${unref(deviceHeight)}px` : 'auto' return tableData.value.length ? `${unref(deviceHeight)}px` : 'auto'
}) })
const scrollX = computed(() => { query(pagination.page, pagination.pageSize)
const table = unref(tableRef)
if (!table)
return
const tableEl: any = table?.$el
const wrapper = tableEl.querySelector('.n-data-table-wrapper')
// const arr = columnsRef.value.filter(item => !item.fixed)
let width = 0
columnsRef.value.forEach((item) => {
width += Number(item.width) || 200
})
return width
})
const customTabelRef = ref(null) const customTabelRef = ref(null)
const importExcelRef = ref(null) const importExcelRef = ref(null)
const notPassModalRef = ref(null) // const notPassModalRef = ref(null) //
@ -737,10 +684,7 @@ function validate(items: any[]) {
} }
function goDetail(row) { function goDetail(row) {
router.push({ router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } })
name: 'final-detail',
query: { id: row.id, packageid: row.packageid, taskindex: row.taskIndex,type:'table' },
})
} }
function resetHandler() { function resetHandler() {
@ -873,10 +817,8 @@ function reload() {
selectionIds.value = [] selectionIds.value = []
checkedRowKeys.value = [] checkedRowKeys.value = []
const { page, pageSize } = unref( const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
tableRef.value?.pagination, query(page!, pageSize!)
) as PaginationProps
query(page!, pageSize!,{},props.taskvalue)
} }
watch( watch(
@ -887,13 +829,6 @@ watch(
{ deep: true }, { deep: true },
) )
watch(
() => finalStore.listKey,
(newVal, oldVal) => {
refreshHandler()
},
)
function reset() { function reset() {
pagination.page = 1 pagination.page = 1
pagination.pageCount = 1 pagination.pageCount = 1
@ -901,81 +836,18 @@ function reset() {
async function refreshHandler(searchId?: any) { async function refreshHandler(searchId?: any) {
reset() reset()
let searchKeyword = '' query(pagination.page, pagination.pageSize, searchId)
if (searchContent) {
const id_param = searchContent.match(/-\d+-/)
if (id_param)
searchKeyword = id_param[0].slice(1, -1)
}
console.log('refreshHandler', searchKeyword)
query(pagination.page, pagination.pageSize, searchId, searchKeyword)
} }
function filterTableData(keyword) { function filterTableData(keyword) {
pagination.page = 1 pagination.page = 1
pagination.pageSize = 10 pagination.pageSize = 10
if (keyword) if (keyword)
// tableData.value = tableData.value.filter(item => item.id.includes(keyword))
query(pagination.page, pagination.pageSize, '', keyword) query(pagination.page, pagination.pageSize, '', keyword)
else query(pagination.page, pagination.pageSize) else
} query(pagination.page, pagination.pageSize)
async function initData(pageSize, page, filterId?: any,
taskName?: string) {
const asideParmas = unref(finalStore.getAsideValue)
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 = asideParmas.izuptime.join('-')
delete asideParmas.izyear
}
}
// 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas
let params = asideParmas
if (params?.izshowall == true)
{
params.isFail = true
delete params.izshowall;
}
const result = await getFinalList({
sortorder: sortorder.value,
pageSize,
currPage: page,
sortname: sortname.value,
taskName,
...params,
})
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(1, 20,{},props.taskvalue)
}
else {
reset()
filterTableData(props.taskvalue)
}
// alert(1)
nextTick(() => {
computeListHeight()
})
})
defineExpose({ defineExpose({
filterTableData, filterTableData,
}) })
@ -986,12 +858,7 @@ defineExpose({
<div class="wrapper-header"> <div class="wrapper-header">
<div class="wrapper-header-left"> <div class="wrapper-header-left">
<span class="wrapper-header-font">任务管理列表</span> <span class="wrapper-header-font">任务管理列表</span>
<SvgIcon <SvgIcon size="16" name="list-mode" @click="changeContent" />
style="cursor: pointer"
size="16"
name="list-mode"
@click="changeContent"
/>
</div> </div>
<div> <div>
<SvgIcon <SvgIcon
@ -1051,14 +918,10 @@ defineExpose({
<SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span> <SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span>
</li> </li>
<li @click="exportHandler"> <li @click="exportHandler">
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出待审数据</span>
style="margin-left: 5px"
>导出待审数据</span>
</li> </li>
<li> <li>
<SvgIcon size="20" name="download" /><span <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span>
style="margin-left: 5px"
>导出全部数据</span>
</li> </li>
<li> <li>
<SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span> <SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span>
@ -1067,9 +930,6 @@ defineExpose({
</n-popover> </n-popover>
</div> </div>
</div> </div>
<div class="header_data">
<DataHeader :has-color="true" />
</div>
<!-- <div class="wrapper-statistic"> <!-- <div class="wrapper-statistic">
<div v-for="i in 7" :key="i" class="item"> <div v-for="i in 7" :key="i" class="item">
<div class="icon" /> <div class="icon" />
@ -1093,12 +953,11 @@ defineExpose({
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<NDataTable <NDataTable
id="table"
ref="tableRef" ref="tableRef"
v-model:checked-row-keys="checkedRowKeys" v-model:checked-row-keys="checkedRowKeys"
remote remote
:columns="columnsRef" :columns="columnsRef"
:scroll-x="scrollX" :scroll-x="1250"
:max-height="maxHeight" :max-height="maxHeight"
:data="tableData" :data="tableData"
:loading="loading" :loading="loading"
@ -1159,7 +1018,6 @@ defineExpose({
border-radius: 8px; border-radius: 8px;
cursor: pointer; cursor: pointer;
} }
.wrapper { .wrapper {
display: flex; display: flex;
flex: 1; flex: 1;
@ -1305,20 +1163,13 @@ defineExpose({
background: #fff; background: #fff;
} }
} }
:deep(.n-data-table .n-data-table-td.n-data-table-td--fixed-right) { :deep(.n-data-table .n-data-table-td.n-data-table-td--fixed-right) {
z-index: 100 !important; z-index: 100 !important;
} }
:deep(.n-data-table-th__title) { :deep(.n-data-table-th__title) {
color: #333; color: #333;
} }
:deep(.n-data-table .n-data-table-td) { :deep(.n-data-table .n-data-table-td) {
color: #666; color: #666;
} }
:deep(.n-data-table .n-data-table-base-table-header) {
overflow: hidden;
}
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1,56 +1,28 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref , onMounted} from 'vue' import { ref } from 'vue'
import Aside from './aside/Aside.vue' import Aside from './aside/Aside.vue'
import Content from './content/Content.vue' import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue' import ListContent from './content/ListContent.vue'
import Robot from '@/components/Robot/index.vue'
defineOptions({ const showList = ref(false);
name: 'FinalMain', const contentRef:any = ref(null);
}) const inputChange = (keyword)=>{
const showList = ref(true) contentRef.value.filterTableData(keyword)
const contentRef: any = ref(null)
const ListRef: any = ref(null)
const asideref=ref(null)
const taskvalue=ref("")
function inputChange(keyword) {
if(asideref.value?.showSearch){
taskvalue.value=keyword
}else{
taskvalue.value=""
}
if (ListRef.value!=null) {
ListRef.value.initData(1,20,{},keyword);
} else {
contentRef.value.filterTableData(keyword);
}
} }
onMounted(()=>{
const searchParams = new URLSearchParams(window.location.search);
const type = searchParams.get('type');
if(type=='table'){
showList.value=false
}else{
showList.value=true
}
})
</script> </script>
<template> <template>
<div class="main"> <div class="main">
<!-- 侧边 --> <!-- 侧边 -->
<Aside ref="asideref" @input-change="inputChange" /> <Aside @inputChange="inputChange" />
<!-- 内容 -->
<Content @changeShow="showList=true" ref="contentRef" />
<!-- 任务管理 --> <!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 --> <!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-if="showList" ref="ListRef" @change-show="showList = false" :taskvalue="taskvalue"/> <!-- <ListContent /> -->
<!-- 内容 -->
<Content v-if="!showList" ref="contentRef" @change-show="showList = true" :taskvalue="taskvalue"/>
<!-- 机器人 -->
<Robot />
</div> </div>
</template> </template>

@ -10,112 +10,109 @@ import {
shallowRef, shallowRef,
unref, unref,
watch, watch,
} from 'vue' } from "vue";
import dayjs from 'dayjs' import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from "./comp/modals";
import { cloneDeep, isEqual } from 'lodash-es' import Search from "./comp/Search.vue";
import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from './comp/modals' import AdvanceFilter from "./comp/AdvanceFilter.vue";
import Search from './comp/Search.vue' import { getViewportOffset } from "@/utils/domUtils";
import AdvanceFilter from './comp/AdvanceFilter.vue' import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { getViewportOffset } from '@/utils/domUtils' import { useConfig } from "@/store/modules/asideConfig";
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn' import type { Filter } from "/#/home";
import { useConfig } from '@/store/modules/asideConfig' import type { AsideEntity } from "@/config/aside";
import type { Filter } from '/#/home' import { asideMap } from "@/config/aside";
import type { AsideEntity } from '@/config/aside' import type { AsideConfig } from "/#/api";
import { asideMap } from '@/config/aside' import emitter from "@/utils/mitt";
import type { AsideConfig } from '/#/api' import { getFilterList } from "@/api/home/main";
import emitter from '@/utils/mitt' import dayjs from "dayjs";
import { getFilterList } from '@/api/home/main' import { cloneDeep, isEqual } from "lodash-es";
import { useKeydown } from '@/hooks/event/useKeydown'
const configStore = useConfig();
const configStore = useConfig()
// //
const asideValue: Record<keyof typeof asideMap, any> = reactive({}) let asideValue: Record<keyof typeof asideMap, any> = reactive({});
// : // :
const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({}) const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({});
// //
const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([]) const showItems = shallowRef<{ key: string; config: AsideEntity }[]>([]);
Object.keys(asideMap).forEach((key) => { Object.keys(asideMap).forEach((key) => {
const entity = asideMap[key] const entity = asideMap[key];
const { defaultValue } = entity const { defaultValue } = entity;
asideValue[key] = defaultValue asideValue[key] = defaultValue;
}) });
const filterModalRef: any = ref(null) const filterModalRef: any = ref(null);
const newFilterModalRef = ref(null) const newFilterModalRef = ref(null);
const customModalRef = ref(null) const customModalRef = ref(null);
const customObjRef = ref<any>(null) // const customObjRef = ref<any>(null); //
const customTempObjRef = ref<any>(null) // () const customTempObjRef = ref<any>(null); // ()
const configFilterRef = ref<any>([]) // const configFilterRef = ref<any>([]); //
const AdvanceFilterRef: any = ref(null) const AdvanceFilterRef: any = ref(null);
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any const modal = unref(modalRef)! as any;
modal.showModal() modal.showModal();
} }
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
computeSlideHeight() computeSlideHeight();
const tempAsideValue = cloneDeep(asideValue) let tempAsideValue = cloneDeep(asideValue);
// configStore.setAsideValue(tempAsideValue); // configStore.setAsideValue(tempAsideValue);
console.log('asideMap和asideValue', tempAsideValue) console.log("asideMap和asideValue", tempAsideValue);
}) });
}) });
const collapse = ref(false) const collapse = ref(false);
const mousetrap = inject('mousetrap') as any const mousetrap = inject("mousetrap") as any;
mousetrap.bind('[', collapseHandler) mousetrap.bind("[", collapseHandler);
function collapseHandler() { function collapseHandler() {
collapse.value = !collapse.value collapse.value = !collapse.value;
} }
const asideWidth = computed(() => { const asideWidth = computed(() => {
return collapse.value ? 0 : 308 return collapse.value ? 0 : 308;
}) });
const asideHeight = ref(500) const asideHeight = ref(500);
const asideStyle = computed(() => { const asideStyle = computed(() => {
return { return {
width: `${asideWidth.value}px`, width: `${asideWidth.value}px`,
height: `${asideHeight.value}px`, height: `${asideHeight.value}px`,
} };
}) });
const collapseIcon = computed(() => { const collapseIcon = computed(() => {
return collapse.value ? 'expand-cir' : 'collapse-cir' return collapse.value ? "expand-cir" : "collapse-cir";
}) });
function computeSlideHeight() { function computeSlideHeight() {
const headEl = document.querySelector('.aside-header')! const headEl = document.querySelector(".aside-header")!;
const { bottomIncludeBody } = getViewportOffset(headEl) const { bottomIncludeBody } = getViewportOffset(headEl);
const height = bottomIncludeBody const height = bottomIncludeBody;
asideHeight.value = height - 24 asideHeight.value = height - 24;
} }
useWindowSizeFn(computeSlideHeight, 280) useWindowSizeFn(computeSlideHeight, 280);
onBeforeMount(async () => { onBeforeMount(async () => {
configStore.fetchConfig() configStore.fetchConfig();
configStore.fetchCustomConfig() configStore.fetchCustomConfig();
}) });
nextTick(() => { configStore.$subscribe(() => {
configStore.$subscribe(() => { const config = configStore.getConfig;
const config = configStore.getConfig const customConfig = configStore.getCustomConfig;
const customConfig = configStore.getCustomConfig
if ( if (
configFilterRef.value.length > 0 configFilterRef.value.length > 0 &&
&& isEqual(configFilterRef.value, configStore.getFilterConfig) isEqual(configFilterRef.value, configStore.getFilterConfig) &&
&& customObjRef.value customObjRef.value &&
&& isEqual(customObjRef.value, customTempObjRef.value) isEqual(customObjRef.value, customTempObjRef.value)
) ) {
return return;
}
if (config == null || customConfig == null) if (config == null || customConfig == null) return;
return
// console.log("config", config, "customConfig", customConfig); // console.log("config", config, "customConfig", customConfig);
/* rao /* rao
const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter)// customConfig isDefaultFilter const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter)// customConfig isDefaultFilter
@ -123,170 +120,151 @@ nextTick(() => {
showKeys.unshift(...defaultKeys) showKeys.unshift(...defaultKeys)
*/ */
const sortKeyList: any = [] let sortKeyList: any = [];
configStore.getFilterConfig.map((item: any) => { configStore.getFilterConfig.map((item: any) => {
sortKeyList.push(item?.id) sortKeyList.push(item.id);
return item });
}) const showKeys = [...sortKeyList];
const showKeys = [...sortKeyList]
Object.keys(config).forEach((key) => { Object.keys(config).forEach((key) => {
if (key.startsWith('iz') && asideMap[key] !== undefined) { if (key.startsWith("iz") && asideMap[key] !== undefined)
asideVisible[key] asideVisible[key] =
= (showKeys.includes(key) || asideMap[key].isDefaultFilter) (showKeys.includes(key) || asideMap[key].isDefaultFilter) && config[key] === "Y";
&& config[key] === 'Y' });
}
})
if (customObjRef.value) { if (customObjRef.value) {
// //
Object.keys(customObjRef.value).map((key) => { Object.keys(customObjRef.value).map((key) => {
// TODO hasOwnProperty if (asideMap.hasOwnProperty(key)) {
// if (asideMap.hasOwnProperty(key)) { const str = key.toLowerCase();
if (Object.prototype.hasOwnProperty.call(customObjRef.value, key)) {
const str = key.toLowerCase()
// console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]); // console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]);
if (str == 'izsimilarity') { if (str == "izsimilarity") {
if (typeof customObjRef.value[str] == 'string') if (typeof customObjRef.value[str] == "string") {
customObjRef.value[str] = customObjRef.value[str].split(',') customObjRef.value[str] = customObjRef.value[str].split(",");
asideValue[key] = customObjRef.value[str] //
console.log('相似度2222222222', asideValue[key])
} }
else if (str == 'izyear') { asideValue[key] = customObjRef.value[str]; //
if (typeof customObjRef.value[str] == 'string') { console.log("相似度2222222222", asideValue[key]);
const time = customObjRef.value[str].split('-') } else if (str == "izyear") {
time[0] = new Date(time[0]).getTime() if (typeof customObjRef.value[str] == "string") {
time[1] = new Date(time[1]).getTime() let time = customObjRef.value[str].split("-");
customObjRef.value[str] = time time[0] = new Date(time[0]).getTime();
time[1] = new Date(time[1]).getTime();
customObjRef.value[str] = time;
} }
asideValue[key] = customObjRef.value[str] // asideValue[key] = customObjRef.value[str]; //
console.log('时间2222222222', asideValue[key]) console.log("时间2222222222", asideValue[key]);
} } else if (str != "izsimilarity" && str != "izyear" && customObjRef.value[str]) {
else if ( console.log("customObjRef.value[str]222222", customObjRef.value[str]);
str != 'izsimilarity'
&& str != 'izyear'
&& customObjRef.value[str]
) {
console.log('customObjRef.value[str]222222', customObjRef.value[str])
// let list = customObjRef.value[str].split(','); // let list = customObjRef.value[str].split(',');
// console.log("list222222", list); // console.log("list222222", list);
asideValue[key] = customObjRef.value[str] // asideValue[key] = customObjRef.value[str]; //
} } else {
else { asideValue[key] = null;
asideValue[key] = null
} }
// asideMap[str].defaultValue = customObjRef.value[str];// // asideMap[str].defaultValue = customObjRef.value[str];//
} }
return key });
}) customTempObjRef.value = customObjRef.value;
customTempObjRef.value = customObjRef.value console.log("asideValue直接处理后的结果", asideValue);
console.log('asideValue直接处理后的结果', asideValue) console.log("customTempObjRef.value", customTempObjRef.value);
console.log('customTempObjRef.value', customTempObjRef.value) let tempobj = cloneDeep(asideValue);
const tempobj = cloneDeep(asideValue) console.log("tempObj", tempobj);
console.log('tempObj', tempobj) configStore.setAsideValue(tempobj);
configStore.setAsideValue(tempobj)
} }
// console.log("showKeys", showKeys); // console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
const currentData = asideMap[key] const { render } = asideMap[key];
const render = currentData?.render
if (render !== false) { if (render !== false) {
const str = key?.toLowerCase() const str = key.toLowerCase();
const o = { const o = {
key: str, key: str,
config: asideMap[str], config: asideMap[str],
};
return [...acc, o];
} else {
return acc;
} }
return [...acc, o] }, []);
} console.log("showItems=================================", items);
else { showItems.value = items;
return acc configFilterRef.value = configStore.getFilterConfig;
} });
}, [])
console.log('showItems=================================', items) const asideEnter = ref(false);
showItems.value = items
configFilterRef.value = configStore.getFilterConfig
})
})
const asideEnter = ref(false)
const showCollapse = computed(() => { const showCollapse = computed(() => {
return collapse.value ? true : asideEnter.value return collapse.value ? true : asideEnter.value;
}) });
const showSearch = ref(false) const showSearch = ref(false);
function setShowSearch(value: boolean) { function setShowSearch(value: boolean) {
showSearch.value = value showSearch.value = value;
} }
function newFilterOk() { const newFilterOk = () => {
filterModalRef.value.query( filterModalRef.value.query(
filterModalRef.value.pagination.page, filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize, filterModalRef.value.pagination.pageSize
) );
filterModalRef.value.showModal() };
}
// key // key
function scrollHandler(key: string) { function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`) const element = document.querySelector(`#${key}`);
element?.scrollIntoView(true) element?.scrollIntoView(true);
} }
// -> // ->
async function filterHandler(searchId: string) { async function filterHandler(searchId: string) {
// emitter.emit('filter', searchId) // emitter.emit('filter', searchId)
const res = await getFilterList({ userSearchId: searchId }) const res = await getFilterList({ userSearchId: searchId });
// console.log("", res); // console.log("", res);
if (res.code == 'OK') { if (res.code == "OK") {
const obj = res.data let obj = res.data;
customObjRef.value = res.data customObjRef.value = res.data;
const showKeys: any[] = [] let showKeys: any[] = [];
Object.keys(obj).map((key) => { Object.keys(obj).map((key) => {
// TODO hasOwnProperty if (asideMap.hasOwnProperty(key)) {
// if (asideMap.hasOwnProperty(key)) { showKeys.push(key);
if (Object.prototype.hasOwnProperty.call(asideMap, key)) }
showKeys.push(key) });
return key
})
// console.log(showKeys); // console.log(showKeys);
configStore.setCustomConfig(showKeys) configStore.setCustomConfig(showKeys);
} }
} }
function editFilter(filter: any) { function editFilter(filter: any) {
const modal = unref(newFilterModalRef)! as any const modal = unref(newFilterModalRef)! as any;
modal.showModal() modal.showModal();
modal.edit(filter) modal.edit(filter);
} }
function updateComponent(key, e) { function updateComponent(key, e) {
console.log('跟新值', key, e) console.log("跟新值", key, e);
console.log('tempAsideValue跟新值', configStore.getAsideValue, asideValue) console.log("tempAsideValue跟新值", configStore.getAsideValue, asideValue);
// let tempAsideValue = configStore.getAsideValue || asideValue; // let tempAsideValue = configStore.getAsideValue || asideValue;
const tempobj = cloneDeep(asideValue) let tempobj = cloneDeep(asideValue);
console.log(tempobj, 'tempobj') console.log(tempobj, "tempobj");
tempobj[key] = e tempobj[key] = e;
console.log(tempobj, 'tempobj After') console.log(tempobj, "tempobj After");
customObjRef.value = tempobj customObjRef.value = tempobj;
// asideValue = Object.assign({}, asideValue, tempobj); // asideValue = Object.assign({}, asideValue, tempobj);
console.log('asideValue跟新值', tempobj) console.log("asideValue跟新值", tempobj);
configStore.setAsideValue(tempobj) configStore.setAsideValue(tempobj);
} }
function handleOk(item: any) { const handleOk = (item: any) => {
console.log('handleOk', item) console.log("handleOk", item);
if (item) { if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname) AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname);
filterHandler(item.id) filterHandler(item.id);
} else {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced("高级筛选");
filterHandler("");
} }
else { };
AdvanceFilterRef.value.setCurrentlySelectedAdvanced('高级筛选')
filterHandler('')
}
}
useKeydown('s', () => setShowSearch(true))
// watch(asideValue, (newVal) => { // watch(asideValue, (newVal) => {
// console.log("asideValue", newVal); // console.log("asideValue", newVal);
// configStore.setAsideValue(newVal) // configStore.setAsideValue(newVal)
@ -316,22 +294,22 @@ useKeydown('s', () => setShowSearch(true))
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" v-show="!showSearch"
ref="AdvanceFilterRef"
:type="0" :type="0"
@select="filterHandler" @select="filterHandler"
@update:search="setShowSearch(true)" @update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)" @show-custom="showModal(customModalRef)"
@show-filter="showModal(filterModalRef)" @show-filter="showModal(filterModalRef)"
ref="AdvanceFilterRef"
/> />
</div> </div>
<component <component
:is="item.config?.component" :is="item.config.component"
v-for="item in showItems" v-for="(item, index) in showItems"
:id="item.key" :id="item.key"
:key="item.key" :key="item.key"
v-model:value="asideValue[item.key]" v-model:value="asideValue[item.key]"
:label="item.config?.label" :label="item.config.label"
@update:value="(e) => updateComponent(item.key, e)" @update:value="(e) => updateComponent(item.key, e)"
/> />
@ -340,10 +318,10 @@ useKeydown('s', () => setShowSearch(true))
ref="filterModalRef" ref="filterModalRef"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk" @handleOk="handleOk"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" /> <NewFilterModalVue ref="newFilterModalRef" @onOk="newFilterOk" />
<!-- 筛选 --> <!-- 筛选 -->
<CustomFilterModalVue ref="customModalRef" /> <CustomFilterModalVue ref="customModalRef" />
</n-scrollbar> </n-scrollbar>
@ -365,7 +343,6 @@ useKeydown('s', () => setShowSearch(true))
width: 100%; width: 100%;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
margin-bottom: 15px; margin-bottom: 15px;
height: 58px;
} }
&-divider { &-divider {

@ -1,14 +1,14 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useInfiniteScroll } from '@vueuse/core' import { favorite, getConditionList, unfavorite, sort } from "@/api/home/filter";
import { debounce } from 'lodash-es' import { asideMap } from "@/config/aside";
import { onMounted, reactive, ref, watch } from 'vue' import { useInfiniteScroll } from "@vueuse/core";
import type { FilterSearchParam } from '/#/api' import { debounce } from "lodash-es";
import type { Filter, FilterEntity } from '/#/home' import { onMounted, reactive, ref, watch } from "vue";
import { VueDraggable } from 'vue-draggable-plus' import type { FilterSearchParam } from "/#/api";
import { asideMap } from '@/config/aside' import type { Filter, FilterEntity } from "/#/home";
import { favorite, getConditionList, sort, unfavorite } from '@/api/home/filter' import { VueDraggable } from "vue-draggable-plus";
defineOptions({ name: 'AdvanceFilter' }) defineOptions({ name: "AdvanceFilter" });
const props = defineProps({ const props = defineProps({
type: { type: {
@ -16,42 +16,43 @@ const props = defineProps({
default: 0, default: 0,
required: true, required: true,
}, },
}) });
const emit = defineEmits<{
(e: 'show-filter'): void
(e: 'show-custom'): void
(e: 'update:search'): void
(e: 'select', id: string)
}>()
const ruleForm = reactive({ const ruleForm = reactive({
keyword: '', keyword: "",
}) });
const ruleformRef = ref() const ruleformRef = ref();
const data = ref<FilterEntity[]>([]) const emit = defineEmits<{
const unData = ref<FilterEntity[]>([]) (e: "show-filter"): void;
const loading = ref(false) (e: "show-custom"): void;
const canloadMore = true (e: "update:search"): void;
const el = ref<HTMLDivElement | null>(null) (e: "select", id: string);
const popover = ref<ComponentRef | null>(null) }>();
const data = ref<FilterEntity[]>([]);
const unData = ref<FilterEntity[]>([]);
const loading = ref(false);
const canloadMore = true;
const el = ref<HTMLDivElement | null>(null);
const popover = ref<ComponentRef | null>(null);
const pagination = reactive({ const pagination = reactive({
pageNo: 1, pageNo: 1,
pageSize: 300, pageSize: 300,
}) });
const keyword = ref('') const keyword = ref("");
const currentlySelectedAdvanced = ref('高级筛选') const currentlySelectedAdvanced = ref("高级筛选");
onMounted(() => { onMounted(() => {
// data.value = generateDefaultConfig() // data.value = generateDefaultConfig()
}) });
// //
function generateDefaultConfig(): FilterEntity[] { function generateDefaultConfig(): FilterEntity[] {
return Object.keys(asideMap).reduce((acc, key) => { return Object.keys(asideMap).reduce((acc, key) => {
const { label, defaultValue, isDefaultFilter } = asideMap[key] const { label, defaultValue, isDefaultFilter } = asideMap[key];
if (isDefaultFilter === true) { if (isDefaultFilter === true) {
const config = { const config = {
id: '', id: "",
name: label, name: label,
favorite: false, favorite: false,
isDefaultFilter, isDefaultFilter,
@ -61,73 +62,70 @@ function generateDefaultConfig(): FilterEntity[] {
value: defaultValue, value: defaultValue,
}, },
], ],
};
return [...acc, config];
} else {
return acc;
} }
return [...acc, config] }, []);
}
else {
return acc
}
}, [])
} }
useInfiniteScroll( useInfiniteScroll(
el as any, el as any,
() => { () => {
loadMore() loadMore();
}, },
{ distance: 10, interval: 300, canLoadMore: () => false }, { distance: 10, interval: 300, canLoadMore: () => false }
) );
async function showClick() { const showClick = async () => {
getSearchedList('') getSearchedList("");
} };
async function loadMore() { async function loadMore() {
if (loading.value || el.value == null) if (loading.value || el.value == null) return;
return
const more = await featchList() const more = await featchList();
if (more.length === 0) if (more.length === 0) return;
return
data.value.push(...more) data.value.push(...more);
} }
async function featchList() { async function featchList() {
loading.value = true loading.value = true;
try { try {
const searchParam: FilterSearchParam = { const searchParam: FilterSearchParam = {
search_searchname: { value: ruleForm.keyword, op: 'like', type: 'string' }, search_searchname: { value: ruleForm.keyword, op: "like", type: "string" },
} };
const result = await getConditionList(pagination, searchParam, props.type) const result = await getConditionList(pagination, searchParam, props.type);
const { data } = result const { data } = result;
// pagination.pageNo += 1 // pagination.pageNo += 1
// canloadMore = pageCount >= pagination.pageNo // canloadMore = pageCount >= pagination.pageNo
const entityList = generateFilterEntityList(data) const entityList = generateFilterEntityList(data);
return entityList return entityList;
} } catch (error) {
catch (error) { return [];
return [] } finally {
} loading.value = false;
finally {
loading.value = false
} }
} }
// //
function generateFilterEntityList(data) { function generateFilterEntityList(data) {
const filterEntityList = data.map((item) => { const filterEntityList = data.map((item) => {
const { searchname, iztop, ocrUsersearchchildList, id, reorder } = item const { searchname, iztop, ocrUsersearchchildList, id, reorder } = item;
const list = ocrUsersearchchildList.map((item) => { const list = ocrUsersearchchildList.map((item) => {
const { searchfield, searchvalue } = item const { searchfield, searchvalue } = item;
return { return {
key: searchfield, key: searchfield,
value: searchvalue, value: searchvalue,
} };
}) });
const reg = new RegExp(ruleForm.keyword, 'gi') const reg = new RegExp(ruleForm.keyword, "gi");
const hilightText = searchname.replace(reg, `<span>${ruleForm.keyword}</span>`) const hilightText = searchname.replace(reg, `<span>${ruleForm.keyword}</span>`);
return { return {
id, id,
@ -137,127 +135,131 @@ function generateFilterEntityList(data) {
filterList: list, filterList: list,
reorder, reorder,
searchname, searchname,
} };
}) });
return filterEntityList return filterEntityList;
} }
function selectHandler(item: FilterEntity) { function selectHandler(item: FilterEntity) {
(popover.value as any).setShow(false) (popover.value as any).setShow(false);
currentlySelectedAdvanced.value = item.searchname currentlySelectedAdvanced.value = item.searchname;
emit('select', item.id) emit("select", item.id);
} }
const inputHandler = debounce((word) => { const inputHandler = debounce((word) => {
ruleForm.keyword = word ruleForm.keyword = word;
ruleformRef.value.validate() ruleformRef.value.validate();
if (word.length < 2 && word) if (word.length < 2 && word) {
return return;
}
getSearchedList(word) getSearchedList(word);
}, 300) }, 300);
function getSearchedList(word, isScroll = false) { function getSearchedList(word, isScroll = false) {
if (word) if (word) {
pagination.pageSize = 300 pagination.pageSize = 300;
}
if (!word) if (!word) {
pagination.pageSize = 10 pagination.pageSize = 10;
}
if (isScroll) if (isScroll) {
pagination.pageSize = 300 pagination.pageSize = 300;
}
ruleForm.keyword = word ruleForm.keyword = word;
featchList().then((list) => { featchList().then((list) => {
const dataArr: FilterEntity[] = [] let dataArr: FilterEntity[] = [];
const unDataArr: FilterEntity[] = [] let unDataArr: FilterEntity[] = [];
list.forEach((item) => { list.map((item) => {
if (item.favorite && !item.isDefaultFilter) if (item.favorite && !item.isDefaultFilter) {
dataArr.push(item) dataArr.push(item);
}
if (!item.favorite && !item.isDefaultFilter) if (!item.favorite && !item.isDefaultFilter) {
unDataArr.push(item) unDataArr.push(item);
}) }
});
data.value = dataArr.sort( data.value = dataArr.sort(
(a, b) => Number(new Date(a.createtime)) - Number(new Date(b.createtime)), (a, b) => Number(new Date(a.createtime)) - Number(new Date(b.createtime))
) );
unData.value = unDataArr.sort( unData.value = unDataArr.sort(
(a, b) => Number((a as any).reorder) - Number((b as any).reorder), (a, b) => Number((a as any).reorder) - Number((b as any).reorder)
) );
}) });
} }
function favoriteHandler(event: MouseEvent, item: any) { function favoriteHandler(event: MouseEvent, item: any) {
event.stopImmediatePropagation() event.stopImmediatePropagation();
event.stopPropagation() event.stopPropagation();
const { isDefaultFilter, id } = item const { isDefaultFilter, id } = item;
if (!isDefaultFilter) { if (!isDefaultFilter) {
item.favorite = true item.favorite = true;
favorite(id) favorite(id);
data.value.forEach((v, index) => { data.value.map((v, index) => {
if (v.id == id) if (v.id == id) {
sort(v.id, 0) sort(v.id, 0);
else sort(v.id, index + 1) } else {
}) sort(v.id, index + 1);
}
inputHandler(ruleForm.keyword) });
inputHandler(ruleForm.keyword);
} }
} }
const rules = { const rules = {
keyword: [ keyword: [
{ {
trigger: ['blur', 'input', 'change'], trigger: ["blur", "input", "change"],
level: 'error', level: "error",
validator(_rule, value) { validator(_rule, value) {
if (value.length >= 2) if (value.length >= 2) {
return true return true;
else return new Error('搜索关键字最少为两个') } else {
return new Error("搜索关键字最少为两个");
}
}, },
}, },
], ],
} };
function unFavoriteHandler(event: MouseEvent, item) { function unFavoriteHandler(event: MouseEvent, item) {
event.stopImmediatePropagation() event.stopImmediatePropagation();
event.stopPropagation() event.stopPropagation();
const { isDefaultFilter, id } = item const { isDefaultFilter, id } = item;
if (!isDefaultFilter) { if (!isDefaultFilter) {
item.favorite = false item.favorite = false;
unfavorite(id) unfavorite(id);
inputHandler(ruleForm.keyword) inputHandler(ruleForm.keyword);
} }
} }
function handleScroll(event) { const handleScroll = (event) => {
let timer let timer;
if (timer) { if (timer) {
clearTimeout(timer) clearTimeout(timer);
} } else {
else {
timer = setTimeout(() => { timer = setTimeout(() => {
getSearchedList('', true) getSearchedList("", true);
}, 2000) }, 2000);
} }
} };
function moveEnd() { const moveEnd = () => {
unData.value.forEach((v, index) => { unData.value.map((v, index) => {
sort(v.id, index) sort(v.id, index);
}) });
} };
function setCurrentlySelectedAdvanced(value: string) { const setCurrentlySelectedAdvanced = (value:string)=>{
currentlySelectedAdvanced.value = value currentlySelectedAdvanced.value = value;
} }
defineExpose({ defineExpose({
setCurrentlySelectedAdvanced, setCurrentlySelectedAdvanced
}) })
</script> </script>
@ -275,20 +277,9 @@ defineExpose({
> >
<template #trigger> <template #trigger>
<div class="wrapper-left-dropdown" @click="showClick"> <div class="wrapper-left-dropdown" @click="showClick">
<n-tooltip trigger="hover"> <span style="font-size: 20px; color: #333333; font-weight: Medium">{{
<template #trigger> currentlySelectedAdvanced
<span }}</span>
style="
color: #333333;
font-weight: Medium;
font-size: 17px;
font-weight: 600;
"
>{{ currentlySelectedAdvanced }}</span>
</template>
{{ currentlySelectedAdvanced }}
</n-tooltip>
<SvgIcon <SvgIcon
:style="{ marginLeft: '5px' }" :style="{ marginLeft: '5px' }"
name="down" name="down"
@ -299,25 +290,21 @@ defineExpose({
</template> </template>
<n-spin :show="loading"> <n-spin :show="loading">
<div class="wrapper-left-popover"> <div class="wrapper-left-popover">
<n-form ref="ruleformRef" :rules="rules" :model="ruleForm"> <n-form :rules="rules" ref="ruleformRef" :model="ruleForm">
<n-form-item path="keyword"> <n-form-item path="keyword">
<n-input <n-input
:style="{ :style="{ '--n-border': '0px', '--n-display': 'block' }"
'--n-border': '0px', placeholder="请输入关键字"
'--n-display': 'block', @input="inputHandler"
'--n-height': '40px',
}"
placeholder="请输入关键词"
:value="ruleForm.keyword" :value="ruleForm.keyword"
:minlength="2" :minlength="2"
@input="inputHandler"
> >
<template #prefix> <template #prefix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1" />
</template> </template>
<template #suffix> <template #suffix>
<SvgIcon <SvgIcon
size="16" size="14px"
style="cursor: pointer" style="cursor: pointer"
name="setting" name="setting"
@click="emit('show-filter')" @click="emit('show-filter')"
@ -336,7 +323,7 @@ defineExpose({
> >
<SvgIcon <SvgIcon
name="drag" name="drag"
size="13" size="18"
color="#333333" color="#333333"
style="margin-right: 3px" style="margin-right: 3px"
/> />
@ -344,44 +331,44 @@ defineExpose({
v-if="item.favorite && !item.isDefaultFilter" v-if="item.favorite && !item.isDefaultFilter"
name="favorite-fill" name="favorite-fill"
color="#fd9b0a" color="#fd9b0a"
size="18" width="13"
height="12"
style="margin-right: 3px" style="margin-right: 3px"
@click="unFavoriteHandler($event, item)" @click="unFavoriteHandler($event, item)"
/> />
<SvgIcon <SvgIcon
v-else-if="!item.favorite && !item.isDefaultFilter" v-else-if="!item.favorite && !item.isDefaultFilter"
name="favorite-unfill" name="favorite-unfill"
size="18" width="13"
height="12"
style="margin-right: 3px" style="margin-right: 3px"
@click="favoriteHandler($event, item)" @click="favoriteHandler($event, item)"
/> />
<div <div v-html="item.name" style="color: #333333" />
style="color: #333333; white-space: nowrap; overflow: hidden"
v-html="item.name"
/>
</li> </li>
<!-- filter=".draggable-li[draggable='false']" --> <!-- filter=".draggable-li[draggable='false']" -->
<VueDraggable <VueDraggable
@end="moveEnd"
v-model="unData" v-model="unData"
class="draggable-ul" class="draggable-ul"
:animation="150" :animation="150"
group="shared" group="shared"
@end="moveEnd"
> >
<li <li
v-for="(item, index) in unData" v-for="(item, index) in unData"
:key="index" :key="index"
style="display: flex; align-items: center" style="display: flex; align-items: center"
@click="selectHandler(item)"
class="cursor-move draggable-li fix" class="cursor-move draggable-li fix"
:draggable="true" :draggable="true"
@click="selectHandler(item)"
> >
<SvgIcon name="drag" size="13" style="margin-right: 3px" /> <SvgIcon name="drag" size="18" style="margin-right: 3px" />
<SvgIcon <SvgIcon
v-if="item.favorite && !item.isDefaultFilter" v-if="item.favorite && !item.isDefaultFilter"
name="favorite-fill" name="favorite-fill"
color="#fd9b0a" color="#fd9b0a"
size="18" width="13"
height="12"
fill="#666666" fill="#666666"
style="cursor: pointer !important; margin-right: 3px" style="cursor: pointer !important; margin-right: 3px"
@click="unFavoriteHandler($event, item)" @click="unFavoriteHandler($event, item)"
@ -389,15 +376,13 @@ defineExpose({
<SvgIcon <SvgIcon
v-else-if="!item.favorite && !item.isDefaultFilter" v-else-if="!item.favorite && !item.isDefaultFilter"
name="favorite-unfill" name="favorite-unfill"
size="18" width="13"
height="12"
fill="#666666" fill="#666666"
style="cursor: pointer !important; margin-right: 3px" style="cursor: pointer !important; margin-right: 3px"
@click="favoriteHandler($event, item)" @click="favoriteHandler($event, item)"
/> />
<div <div v-html="item.name" style="color: #333333" />
style="color: #333333; white-space: nowrap; overflow: hidden"
v-html="item.name"
/>
</li> </li>
</VueDraggable> </VueDraggable>
</ul> </ul>
@ -427,14 +412,7 @@ defineExpose({
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
position: absolute;
width: 100%;
padding: 17px 16px;
border-bottom: 1px solid #e8e8e8;
z-index: 10;
background: #ffffff;
left: 0;
top:0;
&-left { &-left {
display: flex; display: flex;
align-items: center; align-items: center;
@ -445,12 +423,6 @@ defineExpose({
align-items: center; align-items: center;
margin-left: 12px; margin-left: 12px;
cursor: pointer; cursor: pointer;
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 120px;
}
} }
&-popvoer { &-popvoer {
@ -489,16 +461,6 @@ defineExpose({
align-items: center; align-items: center;
} }
} }
.wrapper-left-popover {
width: 248px;
height: 288px;
position: absolute;
left: 0;
top: -10px;
border: 1px solid #f3f8ff;
z-index: 10000;
background: #fff;
}
::v-deep(.wrapper-left-popover .n-form-item) { ::v-deep(.wrapper-left-popover .n-form-item) {
display: block !important; display: block !important;
} }

@ -1,11 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { nextTick, onMounted, ref, watch } from 'vue' import { ref } from 'vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import { useRoute, useRouter } from 'vue-router'
import { asideMap } from '@/config/aside' import { asideMap } from '@/config/aside'
import type { SearchEntity } from '/#/home' import type { SearchEntity } from '/#/home'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
defineOptions({ name: 'Search' }) defineOptions({ name: 'Search' })
@ -13,22 +11,16 @@ const emit = defineEmits<{
(e: 'close'): void (e: 'close'): void
(e: 'select', key: string): void (e: 'select', key: string): void
(e: 'inputChange', value: string): void (e: 'inputChange', value: string): void
(e: 'showSearch'): void
}>() }>()
const finalStore = useFinal()
const router = useRouter()
const route = useRoute()
const searchContent = route.query.searchContent as string
const data = ref<SearchEntity[]>([]) const data = ref<SearchEntity[]>([])
const popover = ref<ComponentRef | null>(null) const popover = ref<ComponentRef | null>(null)
const configStore = useConfig() const configStore = useConfig()
const searchKeyword = ref('') const searchKeyword = ref('')
const inputHandler = debounce((keyword) => { const inputHandler = debounce((keyword) => {
searchKeyword.value = keyword searchKeyword.value = keyword;
emit('inputChange', keyword) emit('inputChange',keyword)
}, 300) }, 300)
configStore.$subscribe(() => { configStore.$subscribe(() => {
@ -43,7 +35,7 @@ configStore.$subscribe(() => {
return return
const list = keys.map((key) => { const list = keys.map((key) => {
const name = asideMap[key]?.label const name = asideMap[key].label
return { return {
key, key,
@ -60,60 +52,29 @@ function selectHandler(item: SearchEntity) {
} }
// //
function searchName() { const searchName = () => {
configStore.setSearchValue(searchKeyword.value) configStore.setSearchValue(searchKeyword.value);
finalStore.setSearchValue(searchKeyword.value) emit('inputChange',searchKeyword.value);
emit('inputChange', searchKeyword.value)
} }
function close() { const close = () => {
searchKeyword.value = '' searchKeyword.value = "";
configStore.setSearchValue(searchKeyword.value) configStore.setSearchValue(searchKeyword.value);
finalStore.setSearchValue(searchKeyword.value) emit('close');
if (searchContent)
router.replace(route.path)
emit('close')
} }
function initSerach() {
if (searchContent) {
emit('showSearch')
const id_param = searchContent.match(/-\d+-/)
if (id_param) {
searchKeyword.value = id_param[0].slice(1, -1)
emit('inputChange', searchKeyword.value)
}
}
}
onMounted(() => {
initSerach()
})
</script> </script>
<template> <template>
<div class="wrapper"> <div class="wrapper">
<n-popover <n-popover
ref="popover" ref="popover" :style="{ padding: '0px' }" style="width: 248px" :show-arrow="false" placement="bottom-start"
:style="{ padding: '0px' }"
style="width: 248px"
:show-arrow="false"
placement="bottom-start"
trigger="focus" trigger="focus"
> >
<template #trigger> <template #trigger>
<n-input <n-input v-model:value="searchKeyword" style="width: 260px;height: 32px;" placeholder="请输入你需要搜索的内容" @input="inputHandler">
v-model:value="searchKeyword"
style="width: 260px; height: 32px"
placeholder="请输入你需要搜索的内容"
@input="inputHandler"
>
<template #suffix> <template #suffix>
<SvgIcon <SvgIcon size="14px" name="magnifying-1" @click="searchName" style="cursor: pointer;" />
size="14px"
name="magnifying-1"
style="cursor: pointer"
@click="searchName"
/>
</template> </template>
</n-input> </n-input>
</template> </template>
@ -126,12 +87,7 @@ onMounted(() => {
</div> --> </div> -->
</n-popover> </n-popover>
<SvgIcon <SvgIcon size="16px" style="margin-left: 6px;cursor: pointer;" name="clear" @click="close" />
size="16px"
style="margin-left: 6px; cursor: pointer"
name="clear"
@click="close"
/>
</div> </div>
</template> </template>

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

@ -66,7 +66,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -74,7 +74,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户级别" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户级别" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -71,7 +71,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户名称" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户名称" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -70,7 +70,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户类型" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择拜访客户类型" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -70,7 +70,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择产品名称" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择产品名称" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -3,7 +3,6 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui' import type { FormItemRule, FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig() const configUseStore = useConfig()
@ -25,27 +24,6 @@ configUseStore.$subscribe(() => {
formValue.value.plans = []; formValue.value.plans = [];
} }
}); });
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['izproject']) {
if(typeof asideValue['izproject'] == "string") {
let list = asideValue['izproject'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izproject'];
}
console.log("formValue.value.izproject", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -93,7 +71,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择所属项目" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择所属项目" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -1,46 +0,0 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { useConfig } from '@/store/modules/asideConfig'
const props = defineProps({
value: {
type: Boolean,
default: false,
},
label: {
type: String,
default: '',
},
})
const emit = defineEmits<{
(e: 'update:value', value: boolean): void
}>()
const configStore = useConfig()
const download = ref(props.value)
function onChange(value: boolean) {
emit('update:value', value)
}
</script>
<template>
<div class="download">
<span class="download-title">{{ label }}</span>
<n-switch v-model:value="download" @update:value="onChange" />
</div>
</template>
<style lang="less" scoped>
.download {
display: flex;
padding: 10px;
justify-content: space-between;
&-title {
font-weight: bold;
}
}
</style>

@ -3,7 +3,6 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormRules } from 'naive-ui' import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig() const configUseStore = useConfig()
@ -25,27 +24,6 @@ configUseStore.$subscribe(() => {
formValue.value.plans = []; formValue.value.plans = [];
} }
}); });
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['izstatus']) {
if(typeof asideValue['izstatus'] == "string") {
let list = asideValue['izstatus'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izstatus'];
}
console.log("formValue.value.izstatus", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -92,7 +70,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -70,7 +70,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择发布地区" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择发布地区" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -70,7 +70,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择厂商" multiple v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择厂商" multiple
:options="options" @update:value="onChange" :options="options" @update:value="onChange"
/> />

@ -3,7 +3,6 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import { type FormItemRule, type FormRules, faIR } from 'naive-ui' import { type FormItemRule, type FormRules, faIR } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig() const configUseStore = useConfig()
@ -27,27 +26,6 @@ configUseStore.$subscribe(() => {
formValue.value.plans = []; formValue.value.plans = [];
} }
}); });
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['iztaskrrom']) {
if(typeof asideValue['iztaskrrom'] == "string") {
let list = asideValue['iztaskrrom'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['iztaskrrom'];
}
console.log("formValue.value.iztaskrrom", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -94,7 +72,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务来源" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务来源" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />

@ -57,7 +57,7 @@ const labStyle = {
} }
onBeforeMount(async () => { onBeforeMount(async () => {
const list = await configStore.fetchizstatusListt() const list = await configStore.fetchIztaskstatusList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false) const isLoadValue = ref(false)
@ -71,7 +71,7 @@ function onChange(value: Array<string>) {
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务审批状态" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择任务状态" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />
</n-form-item> </n-form-item>

@ -70,7 +70,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择省份" multiple :options="options" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择省份" multiple :options="options"
@update:value="onChange" @update:value="onChange"
/> />

@ -3,7 +3,6 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui' import type { FormItemRule, FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig() const configUseStore = useConfig()
@ -25,27 +24,6 @@ configUseStore.$subscribe(() => {
formValue.value.plans = []; formValue.value.plans = [];
} }
}); });
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['izplan']) {
if(typeof asideValue['izplan'] == "string") {
let list = asideValue['izplan'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izplan'];
}
console.log("formValue.value.izplan", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -92,7 +70,7 @@ function onChange(value: Array<string>) {
<template> <template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle"> <n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable clearable <n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择计划" multiple :options="planOptons" v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择计划" multiple :options="planOptons"
@update:value="onChange" @update:value="onChange"
/> />

@ -3,7 +3,6 @@ import { onBeforeMount, onMounted, onUpdated, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui' import type { FormItemRule, FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig() const configUseStore = useConfig()
@ -27,27 +26,6 @@ configUseStore.$subscribe(() => {
} }
}); });
const finalStore = useFinal()
finalStore.$subscribe(() => {
let asideValue = finalStore.getAsideValue;
console.log("asideValue接受到的", asideValue);
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
if(asideValue && asideValue['izupuser']) {
if(typeof asideValue['izupuser'] == "string") {
let list = asideValue['izupuser'].split(',');
formValue.value.users = list;
}else {
formValue.value.users = asideValue['izupuser'];
}
console.log("formValue.value.users222222222222222", formValue.value.users);
}else {
formValue.value.users = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -98,7 +76,7 @@ function onChange(value: Array<string>) {
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules"> <n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="users" :label-style="labStyle"> <n-form-item :label="label" path="users" :label-style="labStyle">
<n-select filterable <n-select filterable
clearable
v-model:value="formValue.users" :max-tag-count="2" multiple placeholder="请选择提报人(可多选)" v-model:value="formValue.users" :max-tag-count="2" multiple placeholder="请选择提报人(可多选)"
:options="personOptions" @update:value="onChange" :options="personOptions" @update:value="onChange"
/> />

@ -1,49 +1,47 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from "vue";
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from "@/store/modules/asideConfig";
const props = defineProps<{ const configUseStore = useConfig();
value: [number, number]
label: string
}>()
const emit = defineEmits<{
(e: 'update:value', value: string): void
}>()
const range = ref<[number, number]>(props.value || [])
const marks = {
0: '0',
50: '50',
100: '100',
}
const isLoadValue = ref(false)
const configUseStore = useConfig()
configUseStore.$subscribe(() => { configUseStore.$subscribe(() => {
if (isLoadValue.value) { if (isLoadValue.value) {
isLoadValue.value = false isLoadValue.value = false;
return return;
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izsimilarity']) {
range.value = asideValue['izsimilarity']
}else {
range.value = [0, 100];
} }
const asideValue = configUseStore.getAsideValue
if (asideValue.izsimilarity)
range.value = asideValue.izsimilarity
else
range.value = [0, 100]
console.log(range.value, 'range.value') console.log(range.value, 'range.value')
// else { // else {
// range.value = [0, 100]; // range.value = [0, 100];
// } // }
}) });
const props = defineProps<{
value: [number, number];
label: string;
}>();
const emit = defineEmits<{
(e: "update:value", value: string): void;
}>();
const range = ref<[number, number]>(props.value || []);
const marks = {
0: "0",
50: "50",
100: "100",
};
const isLoadValue = ref(false);
function onChange(value: number & number[]) { function onChange(value: number & number[]) {
value = value.sort((a, b) => a - b) range.value = value as any;
range.value = value as any isLoadValue.value = true;
isLoadValue.value = true let valueStr = value.join("-");
const valueStr = value.join('-') emit("update:value", valueStr);
emit('update:value', valueStr)
} }
</script> </script>

@ -1,71 +1,54 @@
<script lang="ts" setup> <script lang="ts" setup>
import dayjs from "dayjs"; import dayjs from 'dayjs';
import { onUpdated, watch } from "vue"; import { onUpdated, watch } from 'vue';
import { onMounted, ref } from "vue"; import { onMounted, ref } from 'vue';
import { useConfig } from "@/store/modules/asideConfig"; import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig(); const configUseStore = useConfig()
configUseStore.$subscribe(() => { configUseStore.$subscribe(() => {
if (isLoadValue.value) { if(isLoadValue.value) {
isLoadValue.value = false; isLoadValue.value = false;
return; return
} }
let asideValue = configUseStore.getAsideValue; let asideValue = configUseStore.getAsideValue;
if (asideValue["izyear"]) { if(asideValue['izyear']) {
time.value = asideValue["izyear"]; time.value = asideValue['izyear']
} else { }else {
time.value = null; time.value = null;
} }
}); });
const finalStore = useFinal()
finalStore.$subscribe(() => {
if (isLoadValue.value) {
isLoadValue.value = false;
return;
}
let asideValue = finalStore.getAsideValue;
console.log("asideValue izyear", asideValue);
if (asideValue && asideValue["izyear"]) {
time.value = asideValue["izyear"];
} else {
time.value = null;
}
});
const props = defineProps<{ const props = defineProps<{
value: [number, number] | null; value: [number, number] | null
label: string; label: string
}>(); }>()
const emit = defineEmits<{ const emit = defineEmits<{
(e: "update:value", value: number[]): void; (e: 'update:value', value: number[]): void
}>(); }>()
const time = ref<[number, number] | null>(props.value); const time = ref<[number, number] | null>(props.value)
const isLoadValue = ref(false); const isLoadValue = ref(false)
function onChange(value: [number, number]) { function onChange(value: [number, number]) {
isLoadValue.value = true; isLoadValue.value = true;
emit("update:value", value); emit('update:value', value)
} }
onMounted(() => { onMounted(() => {
if (!props.value) { if(!props.value) {
// //
const currentDate = dayjs(); const currentDate = dayjs();
// //
const endDate = currentDate.toDate(); const endDate = currentDate.toDate();
const startDate = currentDate.subtract(3, "month").toDate(); const startDate = currentDate.subtract(3, 'month').toDate();
// //
time.value = [startDate.getTime(), endDate.getTime()]; time.value = [startDate.getTime(), endDate.getTime()];
console.log("time init", startDate.getTime(), endDate.getTime()); console.log('time init', startDate.getTime(), endDate.getTime());
setTimeout(() => { setTimeout(() => {
emit("update:value", [startDate.getTime(), endDate.getTime()]); emit('update:value', [startDate.getTime(), endDate.getTime()])
}, 300); },300)
} }
}); })
</script> </script>
<template> <template>
@ -73,14 +56,10 @@ onMounted(() => {
<n-collapse :default-expanded-names="['1']" arrow-placement="right"> <n-collapse :default-expanded-names="['1']" arrow-placement="right">
<n-collapse-item :title="label" name="1"> <n-collapse-item :title="label" name="1">
<n-space> <n-space>
<n-date-picker <n-date-picker v-model:value="time" type="daterange" clearable @update:value="onChange">
v-model:value="time" <template #separator>
type="daterange"
:clearable="false" </template>
@update:value="onChange"
placeholder="请选择"
>
<template #separator> </template>
</n-date-picker> </n-date-picker>
</n-space> </n-space>
</n-collapse-item> </n-collapse-item>
@ -99,21 +78,5 @@ onMounted(() => {
::v-deep(.n-input__separator) { ::v-deep(.n-input__separator) {
color: #999999 !important; color: #999999 !important;
} ;
::v-deep(.n-collapse }</style>
.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>

@ -20,6 +20,6 @@ import ReportUserVue from './ReportUser.vue'
import SimilarityVue from './Similarity.vue' import SimilarityVue from './Similarity.vue'
import TimeVue from './Time.vue' import TimeVue from './Time.vue'
import IzApprovalStatus from './IzApprovalStatus.vue' import IzApprovalStatus from './IzApprovalStatus.vue'
import IzShowAll from './IzShowAll.vue'
export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus, IzShowAll } export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus }

@ -14,13 +14,6 @@ const configStore = useConfig()
const checkAll = ref(false) const checkAll = ref(false)
const selectIds = ref<string[]>([]) const selectIds = ref<string[]>([])
const tempList = ref<string[]>([]) const tempList = ref<string[]>([])
//
const offList = ref<any[]>([])
//
const onList = ref<any[]>([])
const offKeyword = ref('')
const onKeyword = ref('')
function showModal() { function showModal() {
show.value = true show.value = true
@ -33,6 +26,8 @@ function showModal() {
return return
if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig)) if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig))
return return
console.log('开启了啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦筛选条件----------------', customConfig)
const { showList, hideList } = generatList(config, customConfig) const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList) tempList.value = cloneDeep(showList)
if (tempList.value.length > 0) if (tempList.value.length > 0)
@ -48,11 +43,14 @@ function showModal() {
} }
function closeModal() { function closeModal() {
offKeyword.value = ''
onKeyword.value = ''
show.value = false show.value = false
} }
//
const offList = ref<any[]>([])
//
const onList = ref<any[]>([])
const allCount = computed(() => { const allCount = computed(() => {
return `全部筛选(共${offList.value.length}个)` return `全部筛选(共${offList.value.length}个)`
}) })
@ -133,28 +131,31 @@ function generatList(config, customConfig) {
const fixedList = generateDefaultList(config) const fixedList = generateDefaultList(config)
offList.unshift(...fixedList) offList.unshift(...fixedList)
onList.unshift(...fixedList) onList.unshift(...fixedList)
console.log('原始筛选条件customConfig', customConfig)
// onListcustomConfig // onListcustomConfig
const tempOnList = cloneDeep(onList) const tempOnList = cloneDeep(onList)
console.log('原始筛选条件tempOnList', tempOnList)
const sortKeyList: any = [] const sortKeyList: any = []
configStore.getFilterConfig.map((item: any) => { configStore.getFilterConfig.map((item: any) => {
sortKeyList.push(item?.id) sortKeyList.push(item.id)
return item
}) })
console.log('原始筛选条件sortKeyList', sortKeyList)
const sortList: any = [] const sortList: any = []
if (sortKeyList.length > 0) { if (sortKeyList.length > 0) {
sortKeyList.map((key) => { sortKeyList.map((key) => {
const tempItem = tempOnList.find(item => item.id == key) const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem) sortList.push(tempItem)
return key
}) })
} }
else { else {
customConfig.map((key) => { customConfig.map((key) => {
const tempItem = tempOnList.find(item => item.id == key) const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem) sortList.push(tempItem)
return key
}) })
} }
console.log('原始筛选条件sortList', sortList)
console.log('原始筛选条件configStore.getFilterConfig', configStore.getFilterConfig)
// return { showList: onList, hideList: offList } // return { showList: onList, hideList: offList }
return { showList: sortList, hideList: offList } return { showList: sortList, hideList: offList }
} }
@ -165,38 +166,45 @@ configStore.$subscribe(() => {
if (config == null || customConfig == null) if (config == null || customConfig == null)
return return
console.log('tempList.value-----------', tempList.value)
console.log('configStore.getFilterConfig-----------', configStore.getFilterConfig)
if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig)) if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig))
return return
const { showList, hideList } = generatList(config, customConfig) const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList) tempList.value = cloneDeep(showList)
console.log('克隆条件', tempList.value)
if (tempList.value.length > 0) if (tempList.value.length > 0)
configStore.setFilterConfig(tempList.value) configStore.setFilterConfig(tempList.value)
onList.value = hideList.filter(item => (item as any).checked)
// setTimeout(() => {
// }, 500);
onList.value = showList
offList.value = hideList offList.value = hideList
if (!showList.length)
handleSumbit()
}) })
async function handleSumbit(e?: MouseEvent) { async function handleSumbit(e: MouseEvent) {
e?.preventDefault() e.preventDefault()
const param = onList.value const param = onList.value.map((item) => {
.map((item) => {
return item.id return item.id
}) }).join(',')
.join(',')
await setFilter({ searchcount: param, type: 0 }) await setFilter({ searchcount: param, type: 0 })
const obj = await configStore.fetchCustomConfig() const obj = await configStore.fetchCustomConfig()
console.log('obj-------------------------------', obj)
const tempOnList = cloneDeep(onList.value) const tempOnList = cloneDeep(onList.value)
console.log('原始筛选条件tempOnList', tempOnList)
const sortList: any = [] const sortList: any = []
obj.map((key) => { obj.map((key) => {
const tempItem = tempOnList.find(item => item.id == key) const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem) sortList.push(tempItem)
return key
}) })
console.log('configStore.sortList---------------', sortList)
// setTimeout(() => {
if (sortList.length > 0) if (sortList.length > 0)
configStore.setFilterConfig(sortList) configStore.setFilterConfig(sortList)
// }, 500);
closeModal() closeModal()
} }
@ -220,14 +228,15 @@ function onCheckChange(checked: any, item: any) {
if (index === -1 && checked) if (index === -1 && checked)
selectIds.value.push(item.id) selectIds.value.push(item.id)
else index !== -1 && selectIds.value.splice(index, 1) else
index !== -1 && selectIds.value.splice(index, 1)
checkAll.value = offList.value.every(item => item.checked) checkAll.value = offList.value.every(item => item.checked)
} }
const showIds = computed(() => { const showIds = computed(() => {
return onList.value.map((item) => { return onList.value.map((item) => {
return item?.id return item.id
}) })
}) })
@ -238,10 +247,7 @@ watch(
return return
const action = newVal > oldVal ? 'add' : 'remove' const action = newVal > oldVal ? 'add' : 'remove'
const diff const diff = action === 'add' ? difference(selectIds.value, showIds.value) : difference(showIds.value, selectIds.value)
= action === 'add'
? difference(selectIds.value, showIds.value)
: difference(showIds.value, selectIds.value)
if (diff.length === 0) if (diff.length === 0)
return return
@ -308,6 +314,9 @@ function removeHandler(id: string) {
onList.value.splice(index, 1) onList.value.splice(index, 1)
} }
const offKeyword = ref('')
const onKeyword = ref('')
const leftInputHandler = debounce((keyword) => { const leftInputHandler = debounce((keyword) => {
offKeyword.value = keyword offKeyword.value = keyword
}, 300) }, 300)
@ -336,13 +345,7 @@ onMounted(() => {
<template> <template>
<n-modal v-model:show="show" transform-origin="center" :mask-closable="false"> <n-modal v-model:show="show" transform-origin="center" :mask-closable="false">
<n-card <n-card class="cardstyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
class="cardstyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<div class="wrapper"> <div class="wrapper">
<span class="wrapper-title">自定义筛选</span> <span class="wrapper-title">自定义筛选</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
@ -354,10 +357,7 @@ onMounted(() => {
<n-grid cols="24" class="mt-4 proCard" responsive="screen" :x-gap="24"> <n-grid cols="24" class="mt-4 proCard" responsive="screen" :x-gap="24">
<n-grid-item span="11"> <n-grid-item span="11">
<NCard <NCard
:title="allCount" :title="allCount" class="dragcardStyle" :segmented="{ content: true, footer: true }" size="small"
class="dragcardStyle"
:segmented="{ content: true, footer: true }"
size="small"
:bordered="false" :bordered="false"
> >
<div class="input_wrap"> <div class="input_wrap">
@ -366,29 +366,17 @@ onMounted(() => {
<SvgIcon size="14px" name="magnifying-1-color999" /> <SvgIcon size="14px" name="magnifying-1-color999" />
</template> </template>
</n-input> </n-input>
<n-scrollbar <n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;">
style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px"
>
<div class="draggable-ul"> <div class="draggable-ul">
<div class="draggable-li"> <div class="draggable-li">
<n-checkbox <n-checkbox v-model:checked="checkAll" label="全选" :indeterminate="!checkAll" @update:checked="onCheckAllChange" />
v-model:checked="checkAll"
label="全选"
:indeterminate="!checkAll"
@update:checked="onCheckAllChange"
/>
</div> </div>
<div <div
v-for="item in offList" v-for="item in offList" v-show="item.name.includes(offKeyword)" :key="item.id" :class="{ 'disable-check': item.fix }"
v-show="item.name.includes(offKeyword)"
:key="item.id"
:class="{ 'disable-check': item.fix }"
class="draggable-li" class="draggable-li"
> >
<n-checkbox <n-checkbox
v-model:checked="item.checked" v-model:checked="item.checked" :label="item.name" :disabled="item.fix"
:label="item.name"
:disabled="item.fix"
@update:checked="onCheckChange($event, item)" @update:checked="onCheckChange($event, item)"
/> />
</div> </div>
@ -397,15 +385,12 @@ onMounted(() => {
</div> </div>
</NCard> </NCard>
</n-grid-item> </n-grid-item>
<n-grid-item style="display: flex; align-items: center" span="2"> <n-grid-item style="display: flex;align-items: center;" span="2">
<SvgIcon size="20" name="switchsvg" /> <SvgIcon size="20" name="switchsvg" />
</n-grid-item> </n-grid-item>
<n-grid-item span="11"> <n-grid-item span="11">
<NCard <NCard
:title="selectCount" :title="selectCount" class="dragcardStyle" :segmented="{ content: true, footer: true }" size="small"
class="dragcardStyle"
:segmented="{ content: true, footer: true }"
size="small"
:bordered="false" :bordered="false"
> >
<template #header-extra> <template #header-extra>
@ -417,31 +402,14 @@ onMounted(() => {
<SvgIcon size="14px" name="magnifying-1-color999" /> <SvgIcon size="14px" name="magnifying-1-color999" />
</template> </template>
</n-input> </n-input>
<n-scrollbar <n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;" class="scroll">
style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px" <VueDraggable v-model="onList" class="draggable-ul" :animation="150" group="shared">
class="scroll" <div v-for="item in onList" v-show="item.name.includes(onKeyword)" :key="item.id" :draggable="true" class="cursor-move draggable-li">
>
<VueDraggable
v-model="onList"
class="draggable-ul"
:animation="150"
group="shared"
>
<div
v-for="item in onList"
v-show="item.name.includes(onKeyword)"
:key="item.id"
:draggable="true"
class="cursor-move draggable-li"
>
<SvgIcon name="drag" size="24" /> <SvgIcon name="drag" size="24" />
<span class="ml-2">{{ item.name }}</span> <span class="ml-2">{{ item.name }}</span>
<SvgIcon <SvgIcon
v-if="!item.fix" v-if="!item.fix" size="16px" style="display:block;margin-left: auto;cursor: pointer;"
size="16px" name="clear" @click="removeHandler(item.id)"
style="display: block; margin-left: auto; cursor: pointer"
name="clear"
@click="removeHandler(item.id)"
/> />
</div> </div>
</VueDraggable> </VueDraggable>
@ -456,11 +424,7 @@ onMounted(() => {
<n-button type="info" @click="handleSumbit"> <n-button type="info" @click="handleSumbit">
确定 确定
</n-button> </n-button>
<n-button <n-button secondary style="margin-left:15px; border: 1px solid #CAD2DD;" @click="closeModal">
secondary
style="margin-left: 15px; border: 1px solid #cad2dd"
@click="closeModal"
>
取消 取消
</n-button> </n-button>
</div> </div>
@ -489,10 +453,10 @@ onMounted(() => {
&-footer { &-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
.n-button--info-type { .n-button--info-type{
background: #507afd !important; background: #507AFD !important;
} }
.n-button--default-type { .n-button--default-type{
background: #fff !important; background: #fff !important;
color: #333333; color: #333333;
} }
@ -504,7 +468,7 @@ onMounted(() => {
font-size: 14px; font-size: 14px;
&:before { &:before {
background-color: #1980ff; background-color: #1980FF;
content: ""; content: "";
width: 5px; width: 5px;
border-radius: 2px; border-radius: 2px;
@ -534,7 +498,7 @@ onMounted(() => {
.textbtnStyle { .textbtnStyle {
cursor: pointer; cursor: pointer;
color: #1980ff; color: #1980FF;
} }
.draggable-ul { .draggable-ul {
@ -567,33 +531,33 @@ onMounted(() => {
--n-padding-top: 0px; --n-padding-top: 0px;
--n-padding-bottom: 12px; --n-padding-bottom: 12px;
} }
::v-deep(.n-card > .n-card-header .n-card-header__main) { ::v-deep(.n-card > .n-card-header .n-card-header__main){
font-weight: lighter !important; font-weight: lighter !important;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }
::v-deep(.n-scrollbar) { ::v-deep(.n-scrollbar){
border-left: 1px solid #cad2dd !important; border-left: 1px solid #cad2dd !important;
border-right: 1px solid #cad2dd !important; border-right: 1px solid #cad2dd !important;
border-bottom: 1px solid #e8e8e8 !important; border-bottom: 1px solid #E8E8E8 !important;
border-top: 1px solid #e8e8e8 !important; border-top: 1px solid #E8E8E8 !important;
} }
::v-deep(.n-card__content) { ::v-deep(.n-card__content){
padding: 20px 24px 0 24px !important; padding: 20px 24px 0 24px !important;
} }
::v-deep(.n-card__footer) { ::v-deep(.n-card__footer){
padding: 0 24px 16px 24px !important; padding: 0 24px 16px 24px !important;
} }
::v-deep(.n-input .n-input-wrapper) { ::v-deep(.n-input .n-input-wrapper){
height: 44px !important; height: 44px !important;
border: 1px solid #cad2dd !important; border: 1px solid #cad2dd !important;
border-bottom: none !important; border-bottom: none !important;
// margin-bottom: -3px; // margin-bottom: -3px;
.n-input__input input { .n-input__input input{
height: 44px !important; height: 44px !important;
} }
} }
::v-deep(.n-button--info-type) { ::v-deep(.n-button--info-type){
background: #507afd !important; background: #507AFD !important;
} }
</style> </style>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save