feature: 20240403演示版本合并 #89

Merged
yaoshuli merged 265 commits from test into main 2 years ago

4
components.d.ts vendored

@ -21,21 +21,23 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider'] NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown'] NDropdown: typeof import('naive-ui')['NDropdown']
NEllipsis: typeof import('naive-ui')['NEllipsis']
NEmpty: typeof import('naive-ui')['NEmpty'] NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm'] NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem'] NFormItem: typeof import('naive-ui')['NFormItem']
NGi: typeof import('naive-ui')['NGi'] NGi: typeof import('naive-ui')['NGi']
NGrid: typeof import('naive-ui')['NGrid'] NGrid: typeof import('naive-ui')['NGrid']
NGridItem: typeof import('naive-ui')['NGridItem'] NGridItem: typeof import('naive-ui')['NGridItem']
NIcon: typeof import('naive-ui')['NIcon']
NImage: typeof import('naive-ui')['NImage'] NImage: typeof import('naive-ui')['NImage']
NInput: typeof import('naive-ui')['NInput'] NInput: typeof import('naive-ui')['NInput']
NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NMessageProvider: typeof import('naive-ui')['NMessageProvider']
NModal: typeof import('naive-ui')['NModal'] NModal: typeof import('naive-ui')['NModal']
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
NotPassed: typeof import('./src/components/NotPassed.vue')['default'] NotPassed: typeof import('./src/components/NotPassed.vue')['default']
NPopconfirm: typeof import('naive-ui')['NPopconfirm']
NPopover: typeof import('naive-ui')['NPopover'] NPopover: typeof import('naive-ui')['NPopover']
NPopselect: typeof import('naive-ui')['NPopselect'] NPopselect: typeof import('naive-ui')['NPopselect']
NProgress: typeof import('naive-ui')['NProgress']
NScrollbar: typeof import('naive-ui')['NScrollbar'] NScrollbar: typeof import('naive-ui')['NScrollbar']
NSelect: typeof import('naive-ui')['NSelect'] NSelect: typeof import('naive-ui')['NSelect']
NSlider: typeof import('naive-ui')['NSlider'] NSlider: typeof import('naive-ui')['NSlider']

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

@ -15,6 +15,9 @@
"postinstall": "patch-package" "postinstall": "patch-package"
}, },
"dependencies": { "dependencies": {
"@vicons/ionicons5": "^0.12.0",
"@vicons/tabler": "^0.12.0",
"@vicons/utils": "^0.1.4",
"@vueup/vue-quill": "^1.2.0", "@vueup/vue-quill": "^1.2.0",
"@vueuse/core": "10.9.0", "@vueuse/core": "10.9.0",
"axios": "^1.4.0", "axios": "^1.4.0",

@ -27,6 +27,29 @@ index 3aacec9..a63ab54 100644
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`
}, feedbackNodes) : h("div", { }, feedbackNodes) : h("div", {
diff --git a/node_modules/naive-ui/es/modal/src/Modal.mjs b/node_modules/naive-ui/es/modal/src/Modal.mjs
index 9508b72..63f417b 100644
--- a/node_modules/naive-ui/es/modal/src/Modal.mjs
+++ b/node_modules/naive-ui/es/modal/src/Modal.mjs
@@ -13,6 +13,10 @@ import { modalInjectionKey, modalProviderInjectionKey } from "./interface.mjs";
import style from "./styles/index.cssr.mjs";
export const modalProps = Object.assign(Object.assign(Object.assign(Object.assign({}, useTheme.props), {
show: Boolean,
+ showMask: {
+ type: Boolean,
+ default: true
+ },
unstableShowMask: {
type: Boolean,
default: true
@@ -309,6 +313,7 @@ export default defineComponent({
"aria-hidden": true,
ref: "containerRef",
class: `${mergedClsPrefix}-modal-mask`,
+ style: this.showMask ? '' : {background:'none'},
onClick: this.handleClickoutside
}) : null;
}
diff --git a/node_modules/naive-ui/es/pagination/src/Pagination.mjs b/node_modules/naive-ui/es/pagination/src/Pagination.mjs diff --git a/node_modules/naive-ui/es/pagination/src/Pagination.mjs b/node_modules/naive-ui/es/pagination/src/Pagination.mjs
index 5bd975b..e1c6ebc 100644 index 5bd975b..e1c6ebc 100644
--- a/node_modules/naive-ui/es/pagination/src/Pagination.mjs --- a/node_modules/naive-ui/es/pagination/src/Pagination.mjs
@ -161,3 +184,71 @@ index 4f47aad..6dae078 100644
}); });
} }
}))) : null)); }))) : null));
diff --git a/node_modules/naive-ui/lib/modal/src/Modal.js b/node_modules/naive-ui/lib/modal/src/Modal.js
index 47f6ac2..801e8e7 100644
--- a/node_modules/naive-ui/lib/modal/src/Modal.js
+++ b/node_modules/naive-ui/lib/modal/src/Modal.js
@@ -17,7 +17,11 @@ const presetProps_1 = require("./presetProps");
const BodyWrapper_1 = __importDefault(require("./BodyWrapper"));
const interface_1 = require("./interface");
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
-exports.modalProps = Object.assign(Object.assign(Object.assign(Object.assign({}, _mixins_1.useTheme.props), { show: Boolean, unstableShowMask: {
+exports.modalProps = Object.assign(Object.assign(Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
+ show: Boolean, showMask: {
+ type: Boolean,
+ default: true,
+ }, unstableShowMask: {
type: Boolean,
default: true
}, maskClosable: {
@@ -38,7 +42,8 @@ exports.modalProps = Object.assign(Object.assign(Object.assign(Object.assign({},
}, closeOnEsc: {
type: Boolean,
default: true
- }, blockScroll: { type: Boolean, default: true } }), presetProps_1.presetProps), {
+ }, blockScroll: { type: Boolean, default: true }
+}), presetProps_1.presetProps), {
// events
onEsc: Function, 'onUpdate:show': [Function, Array], onUpdateShow: [Function, Array], onAfterEnter: Function, onBeforeLeave: Function, onAfterLeave: Function, onClose: Function, onPositiveClick: Function, onNegativeClick: Function, onMaskClick: Function,
// private
@@ -47,7 +52,8 @@ exports.modalProps = Object.assign(Object.assign(Object.assign(Object.assign({},
default: undefined
},
// deprecated
- overlayStyle: [String, Object], onBeforeHide: Function, onAfterHide: Function, onHide: Function });
+ overlayStyle: [String, Object], onBeforeHide: Function, onAfterHide: Function, onHide: Function
+});
exports.default = (0, vue_1.defineComponent)({
name: 'Modal',
inheritAttrs: false,
@@ -226,21 +232,25 @@ exports.default = (0, vue_1.defineComponent)({
var _a;
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
const { unstableShowMask } = this;
- return (0, vue_1.withDirectives)((0, vue_1.h)("div", { role: "none", ref: "containerRef", class: [
+ return (0, vue_1.withDirectives)((0, vue_1.h)("div", {
+ role: "none", ref: "containerRef", class: [
`${mergedClsPrefix}-modal-container`,
this.themeClass,
this.namespace
- ], style: this.cssVars },
- (0, vue_1.h)(BodyWrapper_1.default, Object.assign({ style: this.overlayStyle }, this.$attrs, { ref: "bodyWrapper", displayDirective: this.displayDirective, show: this.show, preset: this.preset, autoFocus: this.autoFocus, trapFocus: this.trapFocus, blockScroll: this.blockScroll }, this.presetProps, { onEsc: this.handleEsc, onClose: this.handleCloseClick, onNegativeClick: this.handleNegativeClick, onPositiveClick: this.handlePositiveClick, onBeforeLeave: this.handleBeforeLeave, onAfterEnter: this.onAfterEnter, onAfterLeave: this.handleAfterLeave, onClickoutside: unstableShowMask ? undefined : this.handleClickoutside, renderMask: unstableShowMask
+ ], style: this.cssVars
+ },
+ (0, vue_1.h)(BodyWrapper_1.default, Object.assign({ style: this.overlayStyle }, this.$attrs, { ref: "bodyWrapper", displayDirective: this.displayDirective, show: this.show, preset: this.preset, autoFocus: this.autoFocus, trapFocus: this.trapFocus, blockScroll: this.blockScroll }, this.presetProps, {
+ onEsc: this.handleEsc, onClose: this.handleCloseClick, onNegativeClick: this.handleNegativeClick, onPositiveClick: this.handlePositiveClick, onBeforeLeave: this.handleBeforeLeave, onAfterEnter: this.onAfterEnter, onAfterLeave: this.handleAfterLeave, onClickoutside: unstableShowMask ? undefined : this.handleClickoutside, renderMask: unstableShowMask
? () => {
var _a;
return ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-transition", key: "mask", appear: (_a = this.internalAppear) !== null && _a !== void 0 ? _a : this.isMounted }, {
default: () => {
- return this.show ? ((0, vue_1.h)("div", { "aria-hidden": true, ref: "containerRef", class: `${mergedClsPrefix}-modal-mask`, onClick: this.handleClickoutside })) : null;
+ return this.show ? ((0, vue_1.h)("div", { "aria-hidden": true, ref: "containerRef", class: `${mergedClsPrefix}-modal-mask` ,style:this.showMask ? '' : {background:'none'}, onClick: this.handleClickoutside })) : null;
}
}));
}
- : undefined }), this.$slots)), [
+ : undefined
+ }), this.$slots)), [
[
vdirs_1.zindexable,
{

@ -5,6 +5,15 @@ settings:
excludeLinksFromLockfile: false excludeLinksFromLockfile: false
dependencies: dependencies:
'@vicons/ionicons5':
specifier: ^0.12.0
version: 0.12.0
'@vicons/tabler':
specifier: ^0.12.0
version: 0.12.0
'@vicons/utils':
specifier: ^0.1.4
version: 0.1.4(vue@3.3.10)
'@vueup/vue-quill': '@vueup/vue-quill':
specifier: ^1.2.0 specifier: ^1.2.0
version: 1.2.0(vue@3.3.10) version: 1.2.0(vue@3.3.10)
@ -17,6 +26,9 @@ dependencies:
date-fns: date-fns:
specifier: ^2.30.0 specifier: ^2.30.0
version: 2.30.0 version: 2.30.0
dayjs:
specifier: ^1.11.10
version: 1.11.10
esno: esno:
specifier: ^0.16.3 specifier: ^0.16.3
version: 0.16.3 version: 0.16.3
@ -41,6 +53,9 @@ dependencies:
naive-ui: naive-ui:
specifier: ^2.38.1 specifier: ^2.38.1
version: 2.38.1(vue@3.3.10) version: 2.38.1(vue@3.3.10)
patch-package:
specifier: ^8.0.0
version: 8.0.0
pinia: pinia:
specifier: ^2.0.33 specifier: ^2.0.33
version: 2.1.7(typescript@4.9.5)(vue@3.3.10) version: 2.1.7(typescript@4.9.5)(vue@3.3.10)
@ -1333,6 +1348,10 @@ packages:
resolution: {integrity: sha512-SXgrhajHG7boLv6oU93CcmdDm0HYRiceuz6b+7z+/2lCJPTWDv0V5YiwFHT2ejE4bQqgSXQiVPQYPWv7LGsK1g==} resolution: {integrity: sha512-SXgrhajHG7boLv6oU93CcmdDm0HYRiceuz6b+7z+/2lCJPTWDv0V5YiwFHT2ejE4bQqgSXQiVPQYPWv7LGsK1g==}
dev: true dev: true
/@types/node@14.14.45:
resolution: {integrity: sha512-DssMqTV9UnnoxDWu959sDLZzfvqCF0qDNRjaWeYSui9xkFe61kKo4l1TWNTQONpuXEm+gLMRvdlzvNHBamzmEw==}
dev: false
/@types/node@18.19.2: /@types/node@18.19.2:
resolution: {integrity: sha512-6wzfBdbWpe8QykUkXBjtmO3zITA0A3FIjoy+in0Y2K4KrCiRhNYJIdwAPDffZ3G6GnaKaSLSEa9ZuORLfEoiwg==} resolution: {integrity: sha512-6wzfBdbWpe8QykUkXBjtmO3zITA0A3FIjoy+in0Y2K4KrCiRhNYJIdwAPDffZ3G6GnaKaSLSEa9ZuORLfEoiwg==}
dependencies: dependencies:
@ -1503,6 +1522,23 @@ packages:
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
dev: true dev: true
/@vicons/ionicons5@0.12.0:
resolution: {integrity: sha512-Iy1EUVRpX0WWxeu1VIReR1zsZLMc4fqpt223czR+Rpnrwu7pt46nbnC2ycO7ItI/uqDLJxnbcMC7FujKs9IfFA==}
dev: false
/@vicons/tabler@0.12.0:
resolution: {integrity: sha512-3+wUFuxb7e8OzZ8Wryct1pzfA2vyoF4lwW98O9s27ZrfCGaJGNmqG+q8A7vQ92Mf+COCgxpK+rhNPTtTvaU6qw==}
dev: false
/@vicons/utils@0.1.4(vue@3.3.10):
resolution: {integrity: sha512-OHI19qVNN6i+uPQ+Y3f2s0dUxwsYnOCcKBW7XOU4yXXO1aU3ZoKpblCc3+4N0qmgoJs5rWKRAaMisipqEXJwAg==}
peerDependencies:
vue: ^3.0.6
dependencies:
'@xicons/utils': 0.1.4
vue: 3.3.10(typescript@4.9.5)
dev: false
/@vitejs/plugin-vue@4.5.1(vite@5.0.5)(vue@3.3.10): /@vitejs/plugin-vue@4.5.1(vite@5.0.5)(vue@3.3.10):
resolution: {integrity: sha512-DaUzYFr+2UGDG7VSSdShKa9sIWYBa1LL8KC0MNOf2H5LjcTPjob0x8LbkqXWmAtbANJCkpiQTj66UVcQkN2s3g==} resolution: {integrity: sha512-DaUzYFr+2UGDG7VSSdShKa9sIWYBa1LL8KC0MNOf2H5LjcTPjob0x8LbkqXWmAtbANJCkpiQTj66UVcQkN2s3g==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
@ -1771,6 +1807,12 @@ packages:
'@xtuc/long': 4.2.2 '@xtuc/long': 4.2.2
dev: true dev: true
/@xicons/utils@0.1.4:
resolution: {integrity: sha512-uXxKDLz9abr80yJC05XSTq6wlyFcdW+N/1IYJkeHjzzXVc4VQ0sEYMoMMTjAH7HQBOyOkzOB4pf5NGF72lwa8Q==}
dependencies:
css-render: 0.13.9
dev: false
/@xtuc/ieee754@1.2.0: /@xtuc/ieee754@1.2.0:
resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==}
dev: true dev: true
@ -1779,6 +1821,10 @@ packages:
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
dev: true dev: true
/@yarnpkg/lockfile@1.1.0:
resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==}
dev: false
/JSONStream@1.3.5: /JSONStream@1.3.5:
resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==}
hasBin: true hasBin: true
@ -1987,6 +2033,11 @@ packages:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
dev: false dev: false
/at-least-node@1.0.0:
resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==}
engines: {node: '>= 4.0.0'}
dev: false
/atob@2.1.2: /atob@2.1.2:
resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==}
engines: {node: '>= 4.5.0'} engines: {node: '>= 4.5.0'}
@ -2087,7 +2138,6 @@ packages:
engines: {node: '>=8'} engines: {node: '>=8'}
dependencies: dependencies:
fill-range: 7.0.1 fill-range: 7.0.1
dev: true
/browserslist@4.22.2: /browserslist@4.22.2:
resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==}
@ -2270,7 +2320,6 @@ packages:
/ci-info@3.9.0: /ci-info@3.9.0:
resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==}
engines: {node: '>=8'} engines: {node: '>=8'}
dev: true
/class-utils@0.3.6: /class-utils@0.3.6:
resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==}
@ -2537,6 +2586,14 @@ packages:
shebang-command: 2.0.0 shebang-command: 2.0.0
which: 2.0.2 which: 2.0.2
/css-render@0.13.9:
resolution: {integrity: sha512-n3C4ZH59rveBrUlAD7n0Ze9/gUMKa4dlH1C9CWKpGcIHR/xRcIVXzBGy1iw8WWq2ySmn2/ZqOpySQNAK5Pb6sw==}
dependencies:
'@emotion/hash': 0.8.0
'@types/node': 14.14.45
csstype: 3.0.11
dev: false
/css-render@0.15.12: /css-render@0.15.12:
resolution: {integrity: sha512-eWzS66patiGkTTik+ipO9qNGZ+uNuGyTmnz6/+EJIiFg8+3yZRpnMwgFo8YdXhQRsiePzehnusrxVvugNjXzbw==} resolution: {integrity: sha512-eWzS66patiGkTTik+ipO9qNGZ+uNuGyTmnz6/+EJIiFg8+3yZRpnMwgFo8YdXhQRsiePzehnusrxVvugNjXzbw==}
dependencies: dependencies:
@ -2611,6 +2668,10 @@ packages:
'@babel/runtime': 7.23.5 '@babel/runtime': 7.23.5
dev: false dev: false
/dayjs@1.11.10:
resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}
dev: false
/de-indent@1.0.2: /de-indent@1.0.2:
resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==}
dev: true dev: true
@ -3887,7 +3948,6 @@ packages:
engines: {node: '>=8'} engines: {node: '>=8'}
dependencies: dependencies:
to-regex-range: 5.0.1 to-regex-range: 5.0.1
dev: true
/finalhandler@1.1.2: /finalhandler@1.1.2:
resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==}
@ -3920,6 +3980,12 @@ packages:
path-exists: 4.0.0 path-exists: 4.0.0
dev: true dev: true
/find-yarn-workspace-root@2.0.0:
resolution: {integrity: sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==}
dependencies:
micromatch: 4.0.5
dev: false
/fizzy-ui-utils@2.0.7: /fizzy-ui-utils@2.0.7:
resolution: {integrity: sha512-CZXDVXQ1If3/r8s0T+v+qVeMshhfcuq0rqIFgJnrtd+Bu8GmDmqMjntjUePypVtjHXKJ6V4sw9zeyox34n9aCg==} resolution: {integrity: sha512-CZXDVXQ1If3/r8s0T+v+qVeMshhfcuq0rqIFgJnrtd+Bu8GmDmqMjntjUePypVtjHXKJ6V4sw9zeyox34n9aCg==}
dependencies: dependencies:
@ -3995,6 +4061,16 @@ packages:
universalify: 2.0.1 universalify: 2.0.1
dev: true dev: true
/fs-extra@9.1.0:
resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==}
engines: {node: '>=10'}
dependencies:
at-least-node: 1.0.0
graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.1
dev: false
/fs.realpath@1.0.0: /fs.realpath@1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
@ -4147,7 +4223,6 @@ packages:
/graceful-fs@4.2.11: /graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
dev: true
/graphemer@1.4.0: /graphemer@1.4.0:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
@ -4465,6 +4540,12 @@ packages:
is-data-descriptor: 1.0.1 is-data-descriptor: 1.0.1
dev: true dev: true
/is-docker@2.2.1:
resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}
engines: {node: '>=8'}
hasBin: true
dev: false
/is-extendable@0.1.1: /is-extendable@0.1.1:
resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@ -4510,7 +4591,6 @@ packages:
/is-number@7.0.0: /is-number@7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'} engines: {node: '>=0.12.0'}
dev: true
/is-obj@2.0.0: /is-obj@2.0.0:
resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==}
@ -4573,10 +4653,21 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/is-wsl@2.2.0:
resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
engines: {node: '>=8'}
dependencies:
is-docker: 2.2.1
dev: false
/isarray@1.0.0: /isarray@1.0.0:
resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
dev: true dev: true
/isarray@2.0.5:
resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
dev: false
/isexe@2.0.0: /isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
@ -4671,6 +4762,16 @@ packages:
/json-stable-stringify-without-jsonify@1.0.1: /json-stable-stringify-without-jsonify@1.0.1:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
/json-stable-stringify@1.1.1:
resolution: {integrity: sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.5
isarray: 2.0.5
jsonify: 0.0.1
object-keys: 1.1.1
dev: false
/json5@1.0.2: /json5@1.0.2:
resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==}
hasBin: true hasBin: true
@ -4698,7 +4799,10 @@ packages:
universalify: 2.0.1 universalify: 2.0.1
optionalDependencies: optionalDependencies:
graceful-fs: 4.2.11 graceful-fs: 4.2.11
dev: true
/jsonify@0.0.1:
resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==}
dev: false
/jsonparse@1.3.1: /jsonparse@1.3.1:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
@ -4734,6 +4838,12 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/klaw-sync@6.0.0:
resolution: {integrity: sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==}
dependencies:
graceful-fs: 4.2.11
dev: false
/kleur@3.0.3: /kleur@3.0.3:
resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
engines: {node: '>=6'} engines: {node: '>=6'}
@ -5100,7 +5210,6 @@ packages:
dependencies: dependencies:
braces: 3.0.2 braces: 3.0.2
picomatch: 2.3.1 picomatch: 2.3.1
dev: true
/mime-db@1.52.0: /mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
@ -5172,7 +5281,6 @@ packages:
/minimist@1.2.8: /minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
dev: true
/minipass@4.2.8: /minipass@4.2.8:
resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==} resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==}
@ -5453,6 +5561,14 @@ packages:
mimic-fn: 4.0.0 mimic-fn: 4.0.0
dev: true dev: true
/open@7.4.2:
resolution: {integrity: sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==}
engines: {node: '>=8'}
dependencies:
is-docker: 2.2.1
is-wsl: 2.2.0
dev: false
/optionator@0.9.3: /optionator@0.9.3:
resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==}
engines: {node: '>= 0.8.0'} engines: {node: '>= 0.8.0'}
@ -5464,6 +5580,11 @@ packages:
prelude-ls: 1.2.1 prelude-ls: 1.2.1
type-check: 0.4.0 type-check: 0.4.0
/os-tmpdir@1.0.2:
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
engines: {node: '>=0.10.0'}
dev: false
/outlayer@2.1.1: /outlayer@2.1.1:
resolution: {integrity: sha512-+GplXsCQ3VrbGujAeHEzP9SXsBmJxzn/YdDSQZL0xqBmAWBmortu2Y9Gwdp9J0bgDQ8/YNIPMoBM13nTwZfAhw==} resolution: {integrity: sha512-+GplXsCQ3VrbGujAeHEzP9SXsBmJxzn/YdDSQZL0xqBmAWBmortu2Y9Gwdp9J0bgDQ8/YNIPMoBM13nTwZfAhw==}
dependencies: dependencies:
@ -5570,6 +5691,28 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/patch-package@8.0.0:
resolution: {integrity: sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==}
engines: {node: '>=14', npm: '>5'}
hasBin: true
dependencies:
'@yarnpkg/lockfile': 1.1.0
chalk: 4.1.2
ci-info: 3.9.0
cross-spawn: 7.0.3
find-yarn-workspace-root: 2.0.0
fs-extra: 9.1.0
json-stable-stringify: 1.1.1
klaw-sync: 6.0.0
minimist: 1.2.8
open: 7.4.2
rimraf: 2.7.1
semver: 7.5.4
slash: 2.0.0
tmp: 0.0.33
yaml: 2.3.4
dev: false
/path-browserify@1.0.1: /path-browserify@1.0.1:
resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
dev: true dev: true
@ -5634,7 +5777,6 @@ packages:
/picomatch@2.3.1: /picomatch@2.3.1:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'} engines: {node: '>=8.6'}
dev: true
/pidtree@0.6.0: /pidtree@0.6.0:
resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==}
@ -6072,6 +6214,13 @@ packages:
resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==}
dev: true dev: true
/rimraf@2.7.1:
resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==}
hasBin: true
dependencies:
glob: 7.2.3
dev: false
/rimraf@3.0.2: /rimraf@3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
hasBin: true hasBin: true
@ -6243,6 +6392,11 @@ packages:
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
dev: true dev: true
/slash@2.0.0:
resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==}
engines: {node: '>=6'}
dev: false
/slash@3.0.0: /slash@3.0.0:
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -6688,6 +6842,13 @@ packages:
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
dev: true dev: true
/tmp@0.0.33:
resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
engines: {node: '>=0.6.0'}
dependencies:
os-tmpdir: 1.0.2
dev: false
/to-fast-properties@2.0.0: /to-fast-properties@2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'} engines: {node: '>=4'}
@ -6712,7 +6873,6 @@ packages:
engines: {node: '>=8.0'} engines: {node: '>=8.0'}
dependencies: dependencies:
is-number: 7.0.0 is-number: 7.0.0
dev: true
/to-regex@3.0.2: /to-regex@3.0.2:
resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==}
@ -6827,7 +6987,6 @@ packages:
/universalify@2.0.1: /universalify@2.0.1:
resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
engines: {node: '>= 10.0.0'} engines: {node: '>= 10.0.0'}
dev: true
/unpipe@1.0.0: /unpipe@1.0.0:
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
@ -7377,7 +7536,6 @@ packages:
/yaml@2.3.4: /yaml@2.3.4:
resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==}
engines: {node: '>= 14'} engines: {node: '>= 14'}
dev: true
/yargs-parser@20.2.9: /yargs-parser@20.2.9:
resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==}

@ -377,6 +377,17 @@ 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[0].distionaryList
}
/**
* ()
* @returns
*/
export async function getizApprovalStatusList() {
const res = await http.request({
url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`,
method: 'get',
})
return res.data[0].distionaryList return res.data[0].distionaryList
} }

@ -34,7 +34,7 @@ export async function getFinalList(params: FinalParam) {
return { return {
pageCount: totalPage, pageCount: totalPage,
data: list, data: list,
totalCount totalCount,
} }
} }
@ -62,3 +62,22 @@ export async function repetitionTask() {
method: 'get', method: 'get',
}) })
} }
/**
*
* @returns
*/
export async function getRepeatList(params: FinalParam) {
const res = await http.request({
url: `/flow/task/repetitionTaskList`,
method: 'get',
params,
})
const { data: { records, total, pages } } = res
return {
pageCount: pages,
data: records,
totalCount: total,
}
}

@ -180,6 +180,19 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
params params
}) })
} }
/**
*
* @param
* @returns
*/
export async function deletePackage(params) {
return http.request({
url: `/ocr/ocrTaskPackage/deletePackage`,
method: 'get',
params
})
}
/** /**
* *
* @param * @param
@ -250,3 +263,17 @@ export async function getPictureList(params: any): Promise<any> {
total, total,
} }
} }
/**
*
* @param
* @returns
*/
export async function getFilterList(params) {
return http.request({
url: `/ocr/ocrUsersearch/querySearchCondition`,
method: 'get',
params
})
}

@ -7,11 +7,15 @@ import { ContentTypeEnum } from '@/enums/httpEnum'
* *
* @returns * @returns
*/ */
export async function getApprovalList(page: PageParam) { export async function getApprovalList(page: any) {
const res = await http.request({ const res = await http.request({
url: `/flow/task/listalldata`, url: `/flow/task/listalldata`,
method: 'get', method: 'get',
params: { pageSize: page.pageSize, currPage: page.pageNo }, params: {
pageSize: page.pageSize,
currPage: page.pageNo,
keyword: page.keyword,
},
}) })
const { data: { list, totalCount } } = res const { data: { list, totalCount } } = res
@ -25,12 +29,11 @@ export async function getApprovalList(page: PageParam) {
* *
* @param param * @param param
*/ */
export async function audit(params: ApprovalParam) { export async function audit(params) {
return http.request({ return http.request({
url: `/flow/task/completeBatchFlow?`, url: `/flow/task/completeBatchFlow?`,
method: 'post', method: 'post',
params: qs.stringify(params, { indices: false }), params,
headers: { 'Content-Type': ContentTypeEnum.FORM_DATA },
}) })
} }

@ -7,11 +7,11 @@ import { ContentTypeEnum } from '@/enums/httpEnum'
* *
* @returns * @returns
*/ */
export async function getPackageList(params: PageParam, packagename: string) { export async function getPackageList(params: PageParam, packageName: string) {
const res = await http.request({ const res = await http.request({
url: `/ocr/ocrTaskPackage/getPackageList`, url: `/ocr/ocrTaskPackage/getPackageList`,
method: 'get', method: 'get',
params: { ...params, packagename }, params: { ...params, packageName },
}) })
const { data: { records, pages } } = res const { data: { records, pages } } = res
@ -83,7 +83,7 @@ export async function getTaskDetailInfo(checkDuplicateId: string) {
* @param params * @param params
* @returns * @returns
*/ */
export async function getTaskDetailPictureList(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`,
@ -95,11 +95,11 @@ export async function getTaskDetailPictureList(params: PageParam & PictureSortPa
// 精简一下数据 // 精简一下数据
const list = records.map((item,index) => { const list = records.map((item,index) => {
return { return {
id: item.id, id: item.id,
checkDuplicateId: item.checkDuplicateId,
taskId: item.taskId, taskId: item.taskId,
taskname: item.fromtaskname, taskname: item.fromTaskName,
assignee: item.assignee, assignee: item.assignee,
pictureid: item.pictureid, pictureid: item.pictureid,
imgurl: item.serverThumbnailUrl, imgurl: item.serverThumbnailUrl,
@ -113,7 +113,6 @@ export async function getTaskDetailPictureList(params: PageParam & PictureSortPa
photoDateTimestamp:item.photoDateTimestamp, photoDateTimestamp:item.photoDateTimestamp,
} }
}) })
return { return {
pageCount: pages, pageCount: pages,
data: list, data: list,

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="65px" height="65px" viewBox="0 0 65 65" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 11</title>
<g id="图审审批" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="3.0生成成功提示" transform="translate(-599.000000, -429.000000)" fill="#507AFD">
<g id="编组-28" transform="translate(518.000000, 322.000000)">
<g id="编组-19" transform="translate(80.000000, 107.000000)">
<g id="编组-11" transform="translate(1.000000, 0.000000)">
<circle id="椭圆形" fill-opacity="0.1" cx="32.5" cy="32.5" r="32.5"></circle>
<g id="图文详情" transform="translate(18.000000, 18.000000)" fill-rule="nonzero">
<rect id="矩形" opacity="0" x="0" y="0" width="28" height="28"></rect>
<path d="M7.084,8.288 C7.644,8.288 8.12466667,8.48866667 8.526,8.89 C8.92733333,9.29133333 9.128,9.78133333 9.128,10.36 C9.128,10.92 8.92733333,11.4006667 8.526,11.802 C8.12466667,12.2033333 7.644,12.404 7.084,12.404 C6.50533333,12.404 6.02,12.2033333 5.628,11.802 C5.236,11.4006667 5.04,10.92 5.04,10.36 C5.04,9.78133333 5.236,9.29133333 5.628,8.89 C6.02,8.48866667 6.50533333,8.288 7.084,8.288 Z M23.632,1.568 C24.416,1.568 25.046,1.82933333 25.522,2.352 C25.998,2.87466667 26.236,3.472 26.236,4.144 L26.236,19.208 C26.236,19.6373333 26.082,20.0013333 25.774,20.3 C25.466,20.5986667 25.0973333,20.748 24.668,20.748 L22.736,20.748 L22.736,17.36 L23.94,17.36 C24.1453333,17.36 24.3226667,17.2853333 24.472,17.136 C24.6213333,16.9866667 24.696,16.8 24.696,16.576 C24.696,16.3706667 24.6213333,16.1933333 24.472,16.044 C24.3226667,15.8946667 24.1453333,15.82 23.94,15.82 L22.736,15.82 L22.736,13.636 L23.94,13.636 C24.1453333,13.636 24.3226667,13.5613333 24.472,13.412 C24.6213333,13.2626667 24.696,13.0853333 24.696,12.88 C24.696,12.6746667 24.6213333,12.4926667 24.472,12.334 C24.3226667,12.1753333 24.1453333,12.096 23.94,12.096 L22.736,12.096 L22.736,10.108 L23.94,10.108 C24.1453333,10.108 24.3226667,10.0333333 24.472,9.884 C24.6213333,9.73466667 24.696,9.548 24.696,9.324 C24.696,9.11866667 24.6213333,8.94133333 24.472,8.792 C24.3226667,8.64266667 24.1453333,8.568 23.94,8.568 L22.736,8.568 L22.736,6.216 C22.736,5.17066667 22.4933333,4.43333333 22.008,4.004 C21.5226667,3.57466667 20.7013333,3.36 19.544,3.36 L8.764,3.36 L8.764,3.108 C8.764,2.67866667 8.918,2.31466667 9.226,2.016 C9.534,1.71733333 9.90266667,1.568 10.332,1.568 L23.632,1.568 Z M18.928,5.04 C19.656,5.04 20.1833333,5.25 20.51,5.67 C20.8366667,6.09 21,6.636 21,7.308 L21,22.764 C21,23.1933333 20.8226667,23.59 20.468,23.954 C20.1133333,24.318 19.6746667,24.5 19.152,24.5 L3.5,24.5 C3.052,24.5 2.65066667,24.3133333 2.296,23.94 C1.94133333,23.5666667 1.764,23.128 1.764,22.624 L1.764,6.888 C1.764,6.34666667 1.91333333,5.90333333 2.212,5.558 C2.51066667,5.21266667 2.90266667,5.04 3.388,5.04 L18.928,5.04 L18.928,5.04 Z M19.236,7.98 C19.236,7.66266667 19.138,7.38733333 18.942,7.154 C18.746,6.92066667 18.4333333,6.804 18.004,6.804 L4.648,6.804 C4.57333333,6.804 4.47066667,6.818 4.34,6.846 C4.20933333,6.874 4.07866667,6.92066667 3.948,6.986 C3.81733333,7.05133333 3.70533333,7.14 3.612,7.252 C3.51866667,7.364 3.472,7.504 3.472,7.672 L3.472,15.176 C3.62133333,15.344 3.83133333,15.5446667 4.102,15.778 C4.37266667,16.0113333 4.69,16.226 5.054,16.422 C5.418,16.618 5.824,16.786 6.272,16.926 C6.72,17.066 7.20533333,17.136 7.728,17.136 C8.512,17.136 9.198,17.01 9.786,16.758 C10.374,16.506 10.92,16.1886667 11.424,15.806 C11.928,15.4233333 12.4226667,15.0126667 12.908,14.574 C13.3933333,14.1353333 13.93,13.72 14.518,13.328 C15.106,12.936 15.778,12.6046667 16.534,12.334 C17.29,12.0633333 18.1906667,11.9093333 19.236,11.872 L19.236,7.98 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="65px" height="65px" viewBox="0 0 65 65" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 33</title>
<g id="图审审批" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="3.0生成成功提示" transform="translate(-788.000000, -429.000000)">
<g id="编组-28" transform="translate(518.000000, 322.000000)">
<g id="编组-30" transform="translate(269.000000, 107.000000)">
<g id="编组-33" transform="translate(1.000000, 0.000000)">
<circle id="椭圆形备份" fill="#EDF1FE" cx="32.5" cy="32.5" r="32.5"></circle>
<g id="审批" transform="translate(17.000000, 18.000000)" fill="#507AFD" fill-rule="nonzero">
<rect id="矩形" opacity="0" x="0" y="0" width="30" height="30"></rect>
<path d="M15.7625,22.2125 L16.775,20.95 C16.1125,20.15 15.7125,19.125 15.7125,18.025 C15.7125,15.5 17.775,13.4375 20.3125,13.4375 C21.675,13.4375 22.9125,14.0375 23.75,14.975 L23.75,3.96249999 C23.75,3.13749999 23.075,2.46249999 22.25,2.46249999 L6,2.46249999 C5.175,2.46249999 4.5,3.13749999 4.5,3.96249999 L4.5,23.4625 C4.5,24.2875 5.175,24.9625 6,24.9625 L13.2125,24.9625 C13.525,23.65 14.5,22.6 15.7625,22.2125 Z M9.8875,6 L18.3875,6 C18.9375,6 19.3875,6.45 19.3875,7 C19.3875,7.54999998 18.9375,8 18.3875,8 L9.8875,8 C9.3375,8 8.8875,7.55000001 8.8875,7 C8.8875,6.44999997 9.32499999,6 9.8875,6 Z M9.8875,10.5 L18.3875,10.5 C18.9375,10.5 19.3875,10.95 19.3875,11.5 C19.3875,12.05 18.9375,12.5 18.3875,12.5 L9.8875,12.5 C9.3375,12.5 8.8875,12.05 8.8875,11.5 C8.8875,10.95 9.32499999,10.5 9.8875,10.5 Z M8.8875,16 C8.8875,15.45 9.3375,15 9.8875,15 L13.3875,15 C13.9375,15 14.3875,15.45 14.3875,16 C14.3875,16.55 13.9375,17 13.3875,17 L9.8875,17 C9.32499999,17 8.8875,16.55 8.8875,16 Z" id="形状"></path>
<path d="M23.7625,27.5 L16.85,27.5 C15.9,27.5 15.125,26.725 15.125,25.775 C15.125,24.825 15.9,24.05 16.85,24.05 L19.6875,20.525 C18.55,20.25 17.7125,19.2375 17.7125,18.025 C17.7125,16.6 18.875,15.4375 20.3125,15.4375 C21.75,15.4375 22.9125,16.6 22.9125,18.025 C22.9125,19.2375 22.075,20.25 20.9375,20.525 L23.775,24.05 C24.725,24.05 25.5,24.825 25.5,25.775 C25.5,26.725 24.725,27.5 23.7625,27.5 L23.7625,27.5 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>自定义列</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1986.000000, -6758.000000)">
<g id="自定义列" transform="translate(1986.000000, 6758.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<path d="M36.9854854,42.6064492 C37.5377701,42.6064492 37.9854854,43.0541645 37.9854854,43.6064492 L37.9854854,56 C37.9854854,56.5522847 37.5377701,57 36.9854854,57 L33.9854854,57 C33.4332006,57 32.9854854,56.5522847 32.9854854,56 L32.985,52.303 L7,52.3032246 C6.44771525,52.3032246 6,51.8555094 6,51.3032246 L6,48.3032246 C6,47.7509399 6.44771525,47.3032246 7,47.3032246 L32.985,47.303 L32.9854854,43.6064492 C32.9854854,43.0541645 33.4332006,42.6064492 33.9854854,42.6064492 L36.9854854,42.6064492 Z M54.4637884,47.3032246 C55.0160731,47.3032246 55.4637884,47.7509399 55.4637884,48.3032246 L55.4637884,51.3032246 C55.4637884,51.8555094 55.0160731,52.3032246 54.4637884,52.3032246 L44.6371044,52.3032246 C44.0848196,52.3032246 43.6371044,51.8555094 43.6371044,51.3032246 L43.6371044,48.3032246 C43.6371044,47.7509399 44.0848196,47.3032246 44.6371044,47.3032246 L54.4637884,47.3032246 Z M29.8824782,24.8032246 C30.4347629,24.8032246 30.8824782,25.2509399 30.8824782,25.8032246 L30.882,29.5 L57,29.5 C57.5522847,29.5 58,29.9477153 58,30.5 L58,33.5 C58,34.0522847 57.5522847,34.5 57,34.5 L30.882,34.5 L30.8824782,38.1967754 C30.8824782,38.7490601 30.4347629,39.1967754 29.8824782,39.1967754 L26.8824782,39.1967754 C26.3301934,39.1967754 25.8824782,38.7490601 25.8824782,38.1967754 L25.8824782,25.8032246 C25.8824782,25.2509399 26.3301934,24.8032246 26.8824782,24.8032246 L29.8824782,24.8032246 Z M19.2308592,29.5 C19.7831439,29.5 20.2308592,29.9477153 20.2308592,30.5 L20.2308592,33.5 C20.2308592,34.0522847 19.7831439,34.5 19.2308592,34.5 L7,34.5 C6.44771525,34.5 6,34.0522847 6,33.5 L6,30.5 C6,29.9477153 6.44771525,29.5 7,29.5 L19.2308592,29.5 Z M36.9854854,7 C37.5377701,7 37.9854854,7.44771525 37.9854854,8 L37.9854854,20.3935508 C37.9854854,20.9458355 37.5377701,21.3935508 36.9854854,21.3935508 L33.9854854,21.3935508 C33.4332006,21.3935508 32.9854854,20.9458355 32.9854854,20.3935508 L32.985,16.696 L7,16.6967754 C6.44771525,16.6967754 6,16.2490601 6,15.6967754 L6,12.6967754 C6,12.1444906 6.44771525,11.6967754 7,11.6967754 L32.985,11.696 L32.9854854,8 C32.9854854,7.44771525 33.4332006,7 33.9854854,7 L36.9854854,7 Z M54.4637884,11.6967754 C55.0160731,11.6967754 55.4637884,12.1444906 55.4637884,12.6967754 L55.4637884,15.6967754 C55.4637884,16.2490601 55.0160731,16.6967754 54.4637884,16.6967754 L44.6371044,16.6967754 C44.0848196,16.6967754 43.6371044,16.2490601 43.6371044,15.6967754 L43.6371044,12.6967754 C43.6371044,12.1444906 44.0848196,11.6967754 44.6371044,11.6967754 L54.4637884,11.6967754 Z" id="形状结合" fill="#666666" fill-rule="nonzero" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 13</title>
<defs>
<rect id="path-1" x="0" y="0" width="15.7538462" height="15.7538462"></rect>
</defs>
<g id="index" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="异步查重" transform="translate(-1352.000000, -938.000000)">
<g id="编组-25" transform="translate(1064.000000, 919.000000)">
<g id="编组-14" transform="translate(256.000000, 19.000000)">
<g id="收起" transform="translate(40.000000, 8.000000) scale(-1, 1) rotate(-90.000000) translate(-40.000000, -8.000000) translate(32.000000, 0.000000)">
<g id="编组-13" transform="translate(0.123077, 0.123077)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g id="编组-11" mask="url(#mask-2)">
<g transform="translate(1.741980, 1.461539)">
<rect id="矩形" fill="#666666" transform="translate(0.729021, 6.415385) rotate(-270.000000) translate(-0.729021, -6.415385) " x="-5.68636353" y="5.68636353" width="12.830769" height="1.45804193" rx="0.291608386"></rect>
<g id="编组" stroke-width="1" fill="none" transform="translate(8.478978, 6.415385) scale(-1, 1) translate(-8.478978, -6.415385) translate(4.688069, 0.000000)">
<rect id="矩形" transform="translate(3.790909, 6.415384) scale(-1, -1) rotate(-180.000000) translate(-3.790909, -6.415384) " x="0" y="0" width="7.58181805" height="12.830769"></rect>
<path d="M0.201793759,6.3610837 C0.213041182,6.22879799 0.269278297,6.09961817 0.370505105,5.99839136 L0.370505105,5.99839136 L0.563544402,5.80535207 C0.57979068,5.78910579 0.596756979,5.77401837 0.61434058,5.7600898 L6.09088579,0.287203877 C6.20476595,0.173323719 6.38940217,0.173323719 6.50328233,0.287203877 L7.10871816,0.89263971 C7.22259832,1.00651987 7.22259832,1.19115609 7.10871816,1.30503624 L1.99779376,6.41479376 L7.10871816,11.5257328 C7.20632972,11.6233443 7.22027423,11.7729399 7.15055169,11.8854041 L7.10871816,11.9381293 L6.50328233,12.5435651 C6.38940217,12.6574453 6.20476595,12.6574453 6.09088579,12.5435651 L6.09088579,12.5435651 L0.618409245,7.07387291 C0.599371439,7.05906492 0.581040393,7.04291292 0.563544402,7.02541693 L0.370505105,6.83237764 C0.269278297,6.73115083 0.213041182,6.60197101 0.201793759,6.4696853 Z" id="形状结合" fill="#666666" transform="translate(3.697961, 6.415384) scale(1, -1) rotate(-180.000000) translate(-3.697961, -6.415384) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>形状</title>
<g id="登录" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="登录_1.2未输入密码提示" transform="translate(-537.000000, -488.000000)" fill="#FF4E4F">
<g id="编组-11" transform="translate(510.000000, 165.000000)">
<g id="登录" transform="translate(0.000000, 44.000000)">
<g id="Group-10" transform="translate(27.000000, 276.000000)">
<g id="警示" transform="translate(0.000000, 3.000000)">
<path d="M7,0.875 C3.61757813,0.875 0.875,3.61757813 0.875,7 C0.875,10.3824219 3.61757813,13.125 7,13.125 C10.3824219,13.125 13.125,10.3824219 13.125,7 C13.125,3.61757813 10.3824219,0.875 7,0.875 Z M6.5625,4.046875 C6.5625,3.98671875 6.61171875,3.9375 6.671875,3.9375 L7.328125,3.9375 C7.38828125,3.9375 7.4375,3.98671875 7.4375,4.046875 L7.4375,7.765625 C7.4375,7.82578125 7.38828125,7.875 7.328125,7.875 L6.671875,7.875 C6.61171875,7.875 6.5625,7.82578125 6.5625,7.765625 L6.5625,4.046875 Z M7,10.0625 C6.63769531,10.0625 6.34375,9.76855469 6.34375,9.40625 C6.34375,9.04394531 6.63769531,8.75 7,8.75 C7.36230469,8.75 7.65625,9.04394531 7.65625,9.40625 C7.65625,9.76855469 7.36230469,10.0625 7,10.0625 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">
<path fill="#f6c042" d="M2.93 17.07A10 10 0 1 1 17.07 2.93A10 10 0 0 1 2.93 17.07M9 5v6h2V5zm0 8v2h2v-2z" />
</svg>

After

Width:  |  Height:  |  Size: 203 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711952592553" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5038" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M178.016 592a16 16 0 0 1 16 16l-0.016 224h635.872V608a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v272a32 32 0 0 1-29.6 31.92l-2.4 0.08H146.016a32 32 0 0 1-32-32V608a16 16 0 0 1 16-16h48zM514.368 129.024c7.76 0.32 15.424 3.424 21.344 9.344l200.72 200.736a16 16 0 0 1 0 22.624l-33.936 33.936a16 16 0 0 1-22.624 0L552 267.792v394.688a16 16 0 0 1-16 16h-48a16 16 0 0 1-16-16V267.68l-127.984 128a16 16 0 0 1-22.624 0l-33.936-33.952a16 16 0 0 1 0-22.624L488.16 138.368c5.92-5.92 13.584-9.04 21.328-9.344z" p-id="5039" fill="#666666"></path></svg>

After

Width:  |  Height:  |  Size: 866 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712133750226" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5038" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M725.328 682.672V640h85.344v42.672h42.656V768h-42.656v42.672h-85.344V768h-42.656v-85.328h42.656zM170.672 256h682.656v85.328H170.672V256z m0 426.672h426.656V768H170.672v-85.328z m0-213.344h682.656v85.344H170.672v-85.344z" p-id="5039" fill="#444444"></path></svg>

After

Width:  |  Height:  |  Size: 592 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711952656753" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5379" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M184.224 514.112c80.672 145.056 199.472 227.936 327.744 227.936 128.288 0 247.088-82.88 327.808-227.936-80.72-145.056-199.536-227.872-327.792-227.872-128.288 0-247.088 82.816-327.76 227.872z m327.744 300.24c-159.28 0-310.432-106.8-404.368-285.648-4.8-9.12-4.8-20.048 0-29.184 93.92-178.848 245.12-285.632 404.368-285.632 159.28 0 310.464 106.784 404.432 285.632 4.8 9.136 4.8 20.048 0 29.184-93.968 178.848-245.152 285.648-404.432 285.648zM512 418.992c-51.696 0-93.728 42.656-93.728 95.136s42.032 95.12 93.728 95.12 93.728-42.656 93.728-95.136S563.68 418.976 512 418.976m0 255.616c-87.136 0-158.08-72-158.08-160.48 0-88.512 70.928-160.464 158.08-160.464 87.168 0 158.128 71.952 158.128 160.48 0 88.448-70.96 160.464-158.128 160.464" p-id="5380"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>沉浸模式-开启</title>
<g id="图审审批" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="沉浸模式1.1" transform="translate(-1375.000000, -32.000000)" fill-rule="nonzero">
<g id="更多操作" transform="translate(1370.000000, 27.000000)">
<g id="沉浸模式-开启" transform="translate(5.000000, 5.000000)">
<polygon id="路径" fill-opacity="0" fill="#FFFFFF" points="0 0 20 0 20 20 0 20"></polygon>
<g id="编组" transform="translate(2.000000, 2.000000)" fill="#507AFD">
<path d="M8,16 C3.59999999,16 0,12.4444444 0,8.09876544 C0,6.22222223 0.700000007,4.34567902 2,2.86419753 C2.40000001,2.4691358 3,2.37037037 3.4,2.76543209 C3.8,3.16049383 3.89999999,3.75308642 3.5,4.14814814 C2.5,5.23456791 2,6.61728395 2,8.09876544 C2,11.3580247 4.70000001,14.0246914 8,14.0246914 C11.3,14.0246914 14,11.3580247 14,8.09876544 C14,6.61728395 13.5,5.23456791 12.5,4.14814816 C12.1,3.75308642 12.2,3.16049383 12.6,2.76543211 C13,2.37037037 13.6,2.46913581 14,2.86419755 C15.3,4.34567903 16,6.12345681 16,8.09876545 C16,12.4444444 12.4,16 8,16 Z" id="路径"></path>
<path d="M8.99999999,5.92592592 C8.99999999,6.41975308 8.6,6.91358025 7.99999999,6.91358025 L7.99999999,6.91358025 C7.4,6.91358025 6.99999999,6.51851852 6.99999999,5.92592592 L6.99999999,0.987654328 C6.99999999,0.493827172 7.4,0 7.99999999,0 L7.99999999,0 C8.49999999,0 8.99999999,0.395061734 8.99999999,0.987654328 L8.99999999,5.92592592 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>右箭头</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-2504.000000, -8416.000000)">
<g id="右箭头" transform="translate(2536.000000, 8448.000000) scale(-1, 1) translate(-2536.000000, -8448.000000) translate(2504.000000, 8416.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<path d="M28.2032063,13.8205721 C28.5937306,13.4300478 29.2268955,13.4300478 29.6174198,13.8205721 L29.6174198,13.8205721 L31.7387402,15.9418924 C32.1292645,16.3324167 32.1292645,16.9655817 31.7387402,17.356106 L31.7387402,17.356106 L20.0942055,28.9996789 L52.663654,29 C53.2159388,29 53.663654,29.4477153 53.663654,30 L53.663654,33 C53.663654,33.5522847 53.2159388,34 52.663654,34 L20.0952055,33.9996789 L31.7387402,45.643894 C32.1292645,46.0344183 32.1292645,46.6675833 31.7387402,47.0581076 L29.6174198,49.1794279 C29.2268955,49.5699522 28.5937306,49.5699522 28.2032063,49.1794279 L11.9379919,32.9142136 C11.1569433,32.133165 11.1569433,30.866835 11.9379919,30.0857864 L13.3522055,28.6715729 L13.3592055,28.6636789 Z" id="形状结合" fill="#FFFFFF" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 500 KiB

@ -0,0 +1,26 @@
<?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>chazhongjiansuo</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
<linearGradient x1="12.4444444%" y1="0%" x2="87.5555556%" y2="100%" id="linearGradient-3">
<stop stop-color="#5B85F8" offset="0%"></stop>
<stop stop-color="#3C6CF0" offset="100%"></stop>
</linearGradient>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-2250.000000, -6758.000000)">
<g id="chazhongjiansuo" transform="translate(2250.000000, 6758.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g mask="url(#mask-2)" fill="url(#linearGradient-3)" fill-rule="nonzero" id="形状结合">
<g transform="translate(6.000000, 2.000000)">
<path d="M31.4511232,24.8747904 L31.7607141,24.8786253 L32.4504148,24.8786253 C39.5888163,25.0499657 45.2098765,30.9440752 45.0374513,38.0375676 C44.9632519,41.0900989 43.8225861,43.8634128 41.9782017,46.0188901 L51.6240923,56.6794025 C52.1413678,57.2619598 52.1413678,57.8102491 51.5206372,58.3585383 L50.106751,59.6264573 C49.5205054,60.1404784 48.9687449,60.1404784 48.4169844,59.523653 L38.6877524,48.7707922 C36.6723213,49.9523783 34.3085739,50.605744 31.7951992,50.5454164 L31.7951992,50.5454164 L31.1054985,50.5454164 C23.967097,50.374076 18.3460368,44.4799664 18.518462,37.3864741 C18.6908871,30.2929817 24.6223126,24.7072849 31.7607141,24.8786253 Z M23.6222467,0.61682542 C24.5188575,-0.205608473 25.8982588,-0.205608473 26.7948696,0.61682542 C29.3467619,2.94705478 35.2781874,6.95642001 46.3478825,7.77885391 C48.6928647,7.9501943 50.4516013,9.9034748 50.4176147,12.1994361 L50.4176147,12.1994361 L50.4176147,38.1061037 L48.5894096,38.1061037 C49.106685,28.682382 41.8303434,20.6293835 32.3469597,20.1153623 C22.8290909,19.6013411 14.6906235,26.7976377 14.173348,36.2556275 C13.6560725,45.7136172 20.9324142,53.8008838 30.4157979,54.314905 C31.5538039,54.3834412 32.69181,54.314905 33.795331,54.1435646 L33.795331,54.1435646 L34.5540017,55.2744112 C32.5193848,56.5423302 30.553738,57.775981 28.6915463,58.8382914 C26.5534744,60.1747465 23.8291569,60.1747465 21.6910849,58.8382914 C14.7595935,54.4177093 0,44.1715537 0,37.5235464 L0,37.5235464 L0,12.1994361 C0,9.9034748 1.75873661,8.01873046 4.06923373,7.81312199 C15.0009888,6.99068809 21.0013843,2.94705478 23.6222467,0.61682542 Z M31.7951992,30.2244456 C27.6225103,30.1216413 24.1395221,33.3771088 24.0705521,37.5235464 C23.967097,41.6699839 27.243175,45.0967918 31.4158638,45.199596 L31.4158638,45.199596 L31.8296842,45.199596 C36.002373,45.3024003 39.4508762,42.0469328 39.5543313,37.9004952 C39.6577864,33.7540577 36.3817084,30.3272498 32.2090195,30.2244456 L32.2090195,30.2244456 Z"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 13</title>
<defs>
<rect id="path-1" x="0" y="3.06460325e-13" width="15.7538462" height="15.7538462"></rect>
</defs>
<g id="index" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="异步查重-折叠" transform="translate(-1352.000000, -1041.000000)">
<g id="编组-36" transform="translate(1064.000000, 1022.000000)">
<g id="编组-19" transform="translate(256.000000, 19.000000)">
<g id="展开" transform="translate(40.000000, 8.000000) scale(1, -1) rotate(-90.000000) translate(-40.000000, -8.000000) translate(32.000000, 0.000000)">
<g id="编组-13" transform="translate(0.123077, 0.123077)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g id="编组-11" mask="url(#mask-2)">
<g transform="translate(1.741980, 1.461539)">
<rect id="矩形" fill="#666666" transform="translate(0.729021, 6.415385) rotate(-270.000000) translate(-0.729021, -6.415385) " x="-5.68636353" y="5.68636353" width="12.830769" height="1.45804193" rx="0.291608386"></rect>
<g id="编组" stroke-width="1" fill="none" transform="translate(8.478978, 6.415385) scale(-1, 1) translate(-8.478978, -6.415385) translate(4.688069, 0.000000)">
<rect id="矩形" transform="translate(3.790909, 6.415385) scale(-1, -1) rotate(-180.000000) translate(-3.790909, -6.415385) " x="0" y="3.05602346e-13" width="7.58181805" height="12.830769"></rect>
<path d="M0.201793759,6.3610837 C0.213041182,6.22879799 0.269278297,6.09961817 0.370505105,5.99839136 L0.370505105,5.99839136 L0.563544402,5.80535207 C0.57979068,5.78910579 0.596756979,5.77401837 0.61434058,5.7600898 L6.09088579,0.287203877 C6.20476595,0.173323719 6.38940217,0.173323719 6.50328233,0.287203877 L7.10871816,0.89263971 C7.22259832,1.00651987 7.22259832,1.19115609 7.10871816,1.30503624 L1.99779376,6.41479376 L7.10871816,11.5257328 C7.20632972,11.6233443 7.22027423,11.7729399 7.15055169,11.8854041 L7.10871816,11.9381293 L6.50328233,12.5435651 C6.38940217,12.6574453 6.20476595,12.6574453 6.09088579,12.5435651 L6.09088579,12.5435651 L0.618409245,7.07387291 C0.599371439,7.05906492 0.581040393,7.04291292 0.563544402,7.02541693 L0.370505105,6.83237764 C0.269278297,6.73115083 0.213041182,6.60197101 0.201793759,6.4696853 Z" id="形状结合" fill="#666666" transform="translate(3.697961, 6.415385) scale(1, -1) rotate(-180.000000) translate(-3.697961, -6.415385) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -1,19 +1,18 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onBeforeMount, reactive, ref, toRefs, unref } from 'vue' import { computed, onBeforeMount, reactive, ref } from 'vue'
import { useDialog, 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<{ const emit = defineEmits(['success'])
(e: 'commit', rejectId: any, backId: any, isOther: boolean)
}>()
const message = useMessage() const message = useMessage()
const loading = ref(false)
const dictonaryStore = useDictionary() const dictonaryStore = useDictionary()
const state: any = reactive({ const state: any = reactive({
detail: {}, idItemList: [],
}) })
const { detail } = toRefs(state) const formRef = ref()
const show = ref(false) const show = ref(false)
const cardStyle = { const cardStyle = {
'width': '520px', 'width': '520px',
@ -21,9 +20,23 @@ const cardStyle = {
'--n-padding-left': '0px', '--n-padding-left': '0px',
} }
const rules = {
disposeTypeId: [
{ required: true, message: '请选择处理方式', trigger: 'blur' },
],
failCauseId: [
{ required: true, message: '请选择不通过原因', trigger: 'blur' },
],
}
const formData = reactive({
disposeTypeId: '262403670085013522',
failCauseId: '260402999231251188',
comment: '',
})
function showModal(value) { function showModal(value) {
console.log(value) state.idItemList = value
state.detail = value
show.value = true show.value = true
} }
@ -35,60 +48,75 @@ defineExpose({
showModal, showModal,
}) })
const backOptions = ref<any[]>([]) const disposeOptions = ref<any[]>([]) //
const reasonOptions = ref<any[]>([]) const failCauseOptions = ref<any[]>([]) //
const selectBackId = ref(null)
const selectRejectId = ref(null)
const selectItem = ref(null) const selectItem = ref(null)
const otherValue = ref(null)
const showOther = computed(() => {
return (selectItem.value as any)?.label === '其他'
})
const comomitValue = computed(() => { onBeforeMount(async () => {
return (selectItem.value as any)?.label === '其他' ? otherValue.value : selectRejectId.value const rejectList = await dictonaryStore.fetchTFList()
const backList = await dictonaryStore.fetchBackList()
failCauseOptions.value = rejectList
disposeOptions.value = backList
}) })
const showOther = computed(() => {
const failCauseItem = failCauseOptions.value.find(item => item.value === formData.failCauseId)
return failCauseItem?.label === '其他'
})
/*
* 需要的参数字段结构
* [{
* id: ''
* taskId:''
* fromTaskName: ''
* }]
*/
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
e.preventDefault() e.preventDefault()
formRef.value.validate(async (errors) => {
if (!errors) {
try {
const list: any = []
state.idItemList.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
})
})
const disposeTypeItem = disposeOptions.value.find(item => item.value === formData.disposeTypeId)
const failCauseItem = failCauseOptions.value.find(item => item.value === formData.failCauseId)
// selectRejectId.value === 'other'
// emit('commit', unref(comomitValue), unref(selectBackId), showOther.value)
console.log(state.detail)
console.log(comomitValue)
const param = { const param = {
formid: [state.detail.id], result: false,
taskId: ['66b06dda-e673-11ee-a934-0242bc74e4f3'], comment: showOther.value ? formData.comment : '',
approvd: false, disposeType: disposeTypeItem.label,
taskComment: comomitValue.value, disposeTypeId: formData.disposeTypeId,
taskname: showOther.value ? state.detail.detail.tasks : ['其他'], failCauseId: formData.failCauseId,
failCauseName: failCauseItem.label,
flowTaskInfoList: list,
} }
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res const { code } = res
if (code === 'OK') if (code === 'OK') {
message.success(res.message)
emit('success', param)
closeModal() closeModal()
else message.error(res.message) }
else { message.error(res.message) }
}) })
} }
finally {
onBeforeMount(async () => { loading.value = false
const rejectList = await dictonaryStore.fetchTFList() }
const backList = await dictonaryStore.fetchBackList() }
reasonOptions.value = rejectList
backOptions.value = backList
// TODO name=
//
// reasonOptions.value.push({
// label: '',
// value: 'other',
// })
}) })
}
async function selectChange(id) { async function selectChange(id) {
console.log(id, 'selectChange') selectItem.value = failCauseOptions.value.find(v => v.id === id)
selectItem.value = reasonOptions.value.find(v => v.id == id)
} }
</script> </script>
@ -98,34 +126,40 @@ async function selectChange(id) {
<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"> <SvgIcon
<div class="wrapper-right-close" @pointerdown="closeModal"> size="22"
<div class="wrapper-right-icon" /> class="icon"
</div> name="close-none-border"
</div> @click="closeModal"
</div> />
<div class="wrapper-content">
<span>处理方式</span>
<n-select v-model:value="selectBackId" filterable style="margin-top: 10px;" :options="backOptions" />
</div> </div>
<n-form
ref="formRef"
size="large"
:model="formData"
:rules="rules"
require-mark-placement="left"
>
<div class="wrapper-content"> <div class="wrapper-content">
<span>不通过原因</span> <n-form-item class="form-item" label="处理方式" path="disposeTypeId">
<n-select v-model:value="selectRejectId" filterable style="margin-top: 10px;" :options="reasonOptions" @change="selectChange" /> <n-select v-model:value="formData.disposeTypeId" filterable :options="disposeOptions" />
<n-input v-show="showOther" v-model:value="otherValue" type="textarea" placeholder="备注内容" style="margin-top: 10px;" /> </n-form-item>
<n-form-item class="form-item" label="不通过原因" path="failCauseId">
<n-select v-model:value="formData.failCauseId" filterable :options="failCauseOptions" @change="selectChange" />
</n-form-item>
<n-form-item v-show="showOther" class="form-item-area" label="" path="">
<n-input v-model:value="formData.comment" placeholder-class="pl" type="textarea" placeholder="备注内容" />
</n-form-item>
</div> </div>
</n-form>
<!-- <div class="wrapper-content">
<n-input
type="textarea"
placeholder="备注内容" v-model="showOther"></n-input>
</div> -->
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> <n-button type="info" @click="handleSumbit">
确定
</n-button> </n-button>
<n-button secondary style="margin-left:15px" @click="closeModal"> <n-button secondary class="btn" style="margin-left:15px" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
@ -140,49 +174,33 @@ async function selectChange(id) {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 10px; height: 56px;
border-bottom: 0.5px solid #d9d9d9;
padding: 0 24px
} }
&-left { &-left {
font-weight: bold; font-size: 18px;
font-size: 16px; font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #333333;
} }
&-right { .icon{
&-close {
width: 18px;
height: 18px;
cursor: pointer; cursor: pointer;
} }
&-icon {
background: #000;
display: inline-block;
width: 18px;
height: 1px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
margin-bottom: 8px;
&:after {
content: '';
display: block;
width: 18px;
height: 1px;
background: #000;
transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
}
}
}
&-content { &-content {
padding: 18px 10px; padding: 24px;
} }
&-footer { &-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
padding-right: 24px;
padding-bottom: 10px;
border-top: 0.5px solid #d9d9d9;
padding-top: 15px;
} }
&-info { &-info {
@ -199,10 +217,15 @@ async function selectChange(id) {
position: absolute; position: absolute;
} }
} }
.form-item-area{
margin-top: -30px;
}
} }
::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) { ::v-deep(.n-card__content) {
border: 0px; padding: 0!important;
} }
::v-deep(.n-card > .n-card-header) { ::v-deep(.n-card > .n-card-header) {
@ -214,4 +237,17 @@ async function selectChange(id) {
margin-top: 0px; margin-top: 0px;
margin-bottom: 0px; margin-bottom: 0px;
} }
::v-deep(.n-form-item-label__text) {
color: #666666;
}
::v-deep(.n-input__placeholder) {
color: #333333!important;
}
.btn{
border: 1px solid #cad2dd;
background-color: #fff;
}
</style> </style>

@ -31,7 +31,7 @@ async function handlerSearch(value) {
if (res.code === 'OK') { if (res.code === 'OK') {
state.resultList = [ state.resultList = [
{ {
title: 'AI工单管理', title: '图检审批',
path: 'worksheet', path: 'worksheet',
data: res.data.ai, data: res.data.ai,
}, },
@ -115,7 +115,7 @@ function highlightText(text, query) {
<div class="list_title"> <div class="list_title">
历史搜索 历史搜索
</div> </div>
<div class="history-list flex"> <div class="flex history-list">
<div class="tag-wrap"> <div class="tag-wrap">
<div v-for="(item, index) of historyList" :key="index" class="tag" @click="handlerHistory(item.historyname)"> <div v-for="(item, index) of historyList" :key="index" class="tag" @click="handlerHistory(item.historyname)">
{{ item.historyname }} {{ item.historyname }}

@ -8,7 +8,7 @@ export interface AsideEntity {
inFilterList?: boolean// 是否出现在过滤配置选项中(这个名字不好为false代表只用于客户端的显示配置不作为参数传递给服务器端) inFilterList?: boolean// 是否出现在过滤配置选项中(这个名字不好为false代表只用于客户端的显示配置不作为参数传递给服务器端)
render?: boolean// 是否作为单独组件渲染 render?: boolean// 是否作为单独组件渲染
key: string key: string
component: Component component?: Component
} }
// 客户端配置 // 客户端配置

@ -1,5 +1,5 @@
import type { AsideEntity } from './aside' import type { AsideEntity } from './aside'
import { IzProjectVue, IzStatus, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue } from '@/views/home/aside/comp/items' 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
@ -129,3 +129,99 @@ export const asideMap: Recordable<AsideEntity> = {
inFilterList: false, inFilterList: false,
}, },
} }
// 审批添加筛选配置 (左侧)
export const asideTaskMap: Recordable<AsideEntity> = {
izstatus: {
label: '审批状态',
defaultValue: null,
isDefaultFilter: true,
key: 'izApprovalStatus',
component: IzApprovalStatus, // todo
},
izuptime: {
label: '提报时间',
defaultValue: null,
isDefaultFilter: true,
key: 'izuptime',
component: TimeVue,
},
izupuser: {
label: '提报人',
defaultValue: null,
isDefaultFilter: true,
key: 'izupuser',
component: ReportUserVue,
},
iztaskrrom: {
label: '任务来源',
defaultValue: null,
isDefaultFilter: true,
key: 'iztaskrrom',
component: IztaskrromVue,
},
izcustomname: {
label: '拜访客户',
defaultValue: null,
isDefaultFilter: true,
key: 'izcustomname',
component: IzCustomname,
},
izcustomtype: {
label: '客户类型',
defaultValue: null,
isDefaultFilter: true,
key: 'izcustomtype',
component: IzCustomtype,
},
izproject: {
label: '所属项目',
defaultValue: null,
isDefaultFilter: true,
key: 'izproject',
component: IzProjectVue,
},
izvisitpro: {
label: '拜访省份/直辖市',
defaultValue: null,
isDefaultFilter: true,
key: 'izvisitpro',
component: IzVisitcity,
},
izcustomlevel: {
label: '客户级别',
defaultValue: null,
isDefaultFilter: true,
key: 'izcustomlevel',
component: IzCustomlevel
},
izprojecttype: {
label: '项目类别',
defaultValue: null,
isDefaultFilter: true,
key: 'izprojecttype',
component: IzProjecttype,
},
izproductname: {
label: '产品名称',
defaultValue: null,
isDefaultFilter: true,
key: 'izproductname',
component: IzProductVue,
},
izvisitcity: {
label: '拜访城市',
defaultValue: null,
isDefaultFilter: true,
key: 'izvisitcity',
component: IzvisitproVue,
},
izfirm: {
label: '厂商',
defaultValue: null,
isDefaultFilter: true,
key: 'izfirm',
component: IzfirmVue,
}
}

@ -0,0 +1,114 @@
<script lang="ts" setup>
import { onBeforeMount, ref } from 'vue';
const emit = defineEmits<{
(e: 'commit')
}>()
const props = defineProps({
selectedTotal: {
type: Number,
default: () => 0,
}
})
const show = ref(false)
const cardStyle = {
'width': '450px',
'--n-padding-top': '20px',
'--n-padding-bottom': '20px',
'--n-padding-left': '20px',
'--n-padding-right': '20px',
}
function showModal() {
show.value = true
}
function closeModal() {
show.value = false
}
defineExpose({
showModal,
})
async function handleSumbit(e: MouseEvent) {
e.preventDefault()
closeModal()
emit('commit')
}
onBeforeMount(async () => { })
</script>
<template>
<n-modal v-model:show="show" transform-origin="center">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div class="wrapper">
<div class="wrapper-header">
<SvgIcon name="exclamation-solid" size="16" />
<span class="wrapper-left">确认提示</span>
</div>
<div class="wrapper-content">
已选<span class="highlighted-text">{{ props.selectedTotal }}</span>张图片确认将所选照片移除可疑夹吗
</div>
</div>
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="handleSumbit">
确定
</n-button>
<n-button secondary style="margin-left:15px" @click="closeModal">
取消
</n-button>
</div>
</template>
</n-card>
</n-modal>
</template>
<style lang="less" scoped>
.wrapper {
&-header {
display: flex;
justify-content: flex-start;
align-items: center;
padding: 10px;
}
&-left {
font-weight: 600;
font-size: 16px;
margin-left: 15px;
}
&-content {
margin-left: 15px;
color: #8e8e8e;
.highlighted-text {
color: #5b85f8;
margin: 0 5px;
}
}
&-footer {
display: flex;
justify-content: flex-end;
}
}
::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) {
border: 0px;
}
::v-deep(.n-card > .n-card-header) {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
::v-deep(.n-divider:not(.n-divider--vertical)) {
margin-top: 0px;
margin-bottom: 0px;
}
</style>

@ -1,21 +1,19 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onBeforeMount, onMounted, onUpdated, reactive, ref, watch } from 'vue'
import Masonry from 'masonry-layout' import Masonry from 'masonry-layout'
import { useDialog, useMessage } from 'naive-ui' import { useDialog, useMessage } from 'naive-ui'
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 { debounce, throttle } from 'lodash-es'
import imagesloaded from 'imagesloaded' import imagesloaded from 'imagesloaded'
import { randomInt } from '@/utils/index' import { debounce } from 'lodash-es'
import { viewOptions } from '@/config/home'
import { dubiousfilelist, removeFiles } from '@/api/task/task'
import { audit } from '@/api/task/task'
import NotPassed from '@/components/Approval/NotPassed.vue'
import { formatToDateHMS } from '@/utils/dateUtil'
import { off, on } from '@/utils/domUtils' import { off, on } from '@/utils/domUtils'
import img1 from '@/assets/images/1.jpg' import ConfrimModal from "./ConfrimModal.vue"
import img2 from '@/assets/images/2.jpg'
import img3 from '@/assets/images/3.jpg'
import img4 from '@/assets/images/4.jpg'
import img5 from '@/assets/images/5.jpg'
const cardStyle = { const cardStyle = {
'--n-padding-bottom': '40px', '--n-padding-bottom': '40px',
@ -24,7 +22,7 @@ const cardStyle = {
const message = useMessage() const message = useMessage()
const timeRange = ref('') const timeRange = ref('')
const check = ref(false) const batch = ref(false)
const timeOptions = [{ const timeOptions = [{
label: '升序', label: '升序',
value: 'asc', value: 'asc',
@ -40,7 +38,7 @@ const timeLabel = computed(() => {
return item?.label return item?.label
}) })
const viewMode = ref('masonry') const viewMode = ref('horizontalVersion')
const viewLabel = computed(() => { const viewLabel = computed(() => {
const item = viewOptions.find((option) => { const item = viewOptions.find((option) => {
@ -60,8 +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 urls = [img1, img2, img3, img4, img5] const dialog = useDialog();
let processItems: any[] = [];
const confrimModalRef = ref<any>();
const layout = debounce(() => { const layout = debounce(() => {
if (!show.value) if (!show.value)
@ -101,11 +101,6 @@ useInfiniteScroll(
{ distance: 10, canLoadMore: () => canloadMore }, { distance: 10, canLoadMore: () => canloadMore },
) )
function randomUrl() {
const index = randomInt(0, urls.length)
return urls[index]
}
async function featchList() { async function featchList() {
loading = true loading = true
try { try {
@ -140,6 +135,7 @@ async function loadMore() {
} }
onUpdated(() => { onUpdated(() => {
console.log('onUpdated', onUpdated)
layout() layout()
}) })
@ -177,15 +173,14 @@ function imUpdateSelectIds(x: number, y: number, w: number, h: number) {
items.forEach((item: HTMLDivElement) => { items.forEach((item: HTMLDivElement) => {
const rect = item.getBoundingClientRect() const rect = item.getBoundingClientRect()
const index = selectIds.value.indexOf(item.dataset.id!) const index = selectIds.value.indexOf(item.dataset.id!)
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)
}) })
} }
function isSelected(id: number) { function isSelected(pictureId: number) {
return selectIds.value.includes(String(id)) return selectIds.value.includes(String(pictureId))
} }
function moveHandler(e: MouseEvent) { function moveHandler(e: MouseEvent) {
@ -245,9 +240,11 @@ onMounted(() => {
async function showModal() { async function showModal() {
show.value = true show.value = true
reset()
pagination.pageNo = 1 pagination.pageNo = 1
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
layout()
} }
async function onChange() { async function onChange() {
@ -257,64 +254,155 @@ async function onChange() {
} }
function closeModal(event: MouseEvent) { function closeModal(event: MouseEvent) {
selectedApproveItems.value = []
show.value = false show.value = false
} }
async function commit() {
async function remove() { const ids = selectIds.value.join(',')
const arr = listData.value.filter((item) => {
return item.checked
})
if (arr.length === 0) {
message.error('至少选中一个')
return
}
const ids = arr.map(item => item.id).join(',')
const res = await removeFiles({ pictureid: ids }) const res = await removeFiles({ pictureid: ids })
if (res.code === 'OK') { if (res.code === 'OK') {
message.success('移除成功') message.success('移除成功')
pagination.pageNo = 1 pagination.pageNo = 1
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
layout()
} }
} }
function remove() {
function getPercent(pictureid: string, item) { if (!selectIds.value || selectIds.value.length === 0) {
console.log(item) message.error('至少选中一个')
const { ocpictureid, pictureresult } = item return
const splitId = ocpictureid || '' }
const index = splitId.split(',').indexOf(String(pictureid)) confrimModalRef?.value?.showModal()
const results = (pictureresult || '').split(',')
const percent = results[index] || '0'
const val = Number.parseFloat(percent)
return `${val}%`
} }
function showCheck() {
check.value = true function setBatch(value) {
if (value && batch.value) {
batch.value = !value;
} else {
batch.value = value;
}
if (value === false) {
selectIds.value = []
selectedApproveItems.value.forEach((item) => (item.checked = false));
selectedApproveItems.value.length = 0;
}
} }
defineExpose({ defineExpose({
showModal, showModal,
}) })
const checked = ref(false) const notPassModalRef = ref(null)
function onCheckChange(val: any, item: any) { const showActions = computed(() => {
checked.value = val return selectedApproveItems.value.length > 0 && batch;
});
function onCheckChange(checked: any, item: any) {
item.checked = checked
const index = selectedApproveItems.value.indexOf(item);
if (index === -1 && checked) selectedApproveItems.value.push(item);
else selectedApproveItems.value.splice(index, 1);
}
function rejectHandler() {
const modal = unref(notPassModalRef)! as any
modal.showModal(selectedApproveItems.value)
}
function reset() {
batch.value = false;
pagination.pageNo = 1;
pagination.pageSize = 20;
selectIds.value = [];
selectedApproveItems.value.length = 0;
loading = false;
canloadMore = true;
}
function validate(items: any[]) {
if (items.length === 0) return "至少选中一个任务";
return null;
}
function approvalHandler(items?: any) {
if (batch.value) {
processItems = selectedApproveItems.value
}
// => => /
if (items !== undefined && !(items instanceof PointerEvent))
processItems = [items]
const msg = validate(processItems)
if (msg !== null) {
message.error(msg)
return
}
const list: any = []
processItems.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
})
})
const param = {
result: true,
comment: '',
disposeType: '',
disposeTypeId: '',
failCauseId: '',
failCauseName: '',
flowTaskInfoList: list,
}
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
doAudit(param)
},
onNegativeClick: () => { },
})
}
function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res
setBatch(false)
if (code === 'OK') {
message.info(res.message)
// emitter.emit('refresh')
refreshHandler()
} }
else message.error(res.message)
})
}
function reloadList() {
refreshHandler()
}
async function refreshHandler() {
reset()
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
: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" />
@ -329,13 +417,13 @@ function onCheckChange(val: any, item: any) {
<div> <div>
<n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click" @change="onChange"> <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>{{ timeLabel || '时间排序' }}</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="viewMode" :options="viewOptions" trigger="click"> <n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
<div class="wrapper-form-dropdown"> <div class="wrapper-form-dropdown">
<span>{{ viewLabel || '视图模式' }}</span> <span>视图模式</span>
<SvgIcon class="wrapper-content-form-gap" name="arrow-botton" size="14" /> <SvgIcon class="wrapper-content-form-gap" name="arrow-botton" size="14" />
</div> </div>
</n-popselect> </n-popselect>
@ -344,38 +432,63 @@ function onCheckChange(val: any, item: any) {
<div class="remove" @click="remove"> <div class="remove" @click="remove">
移除可疑文件夹 移除可疑文件夹
</div> </div>
<div class="wrapper-content-form-button" @click="showCheck"> <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>
<div v-show="showActions" class="batch">
<n-button text @click="setBatch(false)">
<template #icon>
<SvgIcon name="revoke" />
</template>
返回
</n-button>
<div style="cursor: pointer; margin-left: 16px" @click.stop="rejectHandler">
<SvgIcon width="64" height="28" name="a1" />
</div>
<SvgIcon size="24" name="vs" />
<div style="cursor: pointer" @click.stop="approvalHandler">
<SvgIcon width="64" height="28" name="a2" />
</div>
</div>
</div> </div>
</div> </div>
<div ref="el" class="scroll"> <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, index) in listData" :key="item.id" :data-id="item.id" :class="{ 'grid-item-selected': isSelected(item.pictureId) }" :style="{ height: gridHeight }"
:class="{ 'grid-item-selected': isSelected(item.id) }" :style="{ height: gridHeight }" class="grid-item" class="grid-item">
> <n-image :src="item.imgUrl" class="img "
<!-- <img :class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }" />
class="wrapper-content-item-img" <n-checkbox v-if="batch && item.historyStates === 1" v-model:checked="item.checked"
:class="{ 'wrapper-content-item-img-fit': viewMode !== 'masonry' }" :src="item.imgUrl"
> -->
<n-image
:src="item.imgurl"
class="img "
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
/>
<n-checkbox
v-if="check"
v-model:checked="item.checked"
style="position:absolute;left:20px;top:20px" @click.prevent style="position:absolute;left:20px;top:20px" @click.prevent
@update:checked="onCheckChange($event, item)" @update:checked="onCheckChange($event, item)" />
/> <img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt="">
<!-- <div class="percent"> <img v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png"
{{ getPercent(item.pictureid, item) }} alt="">
<div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent">
{{ item.similarityScore }}<span class="percent-unit">%</span>
</div>
<div class="time" style="left: 25px;bottom: 15px;">
<!-- <div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<span>{{ item?.photoDateTimestamp ?
formatToDateHMS(Number(item.photoDateTimestamp)) : '-' }}</span>
</div>
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<span>{{ item.submitDateTimestamp ?
formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
</div> --> </div> -->
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="time" />
<span>{{ item.submitDateTimestamp ?
formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
</div>
</div>
</div> </div>
</div> </div>
<!-- </n-scrollbar> --> <!-- </n-scrollbar> -->
@ -388,6 +501,9 @@ function onCheckChange(val: any, item: any) {
</div> </div>
</n-card> </n-card>
</n-modal> </n-modal>
<NotPassed ref="notPassModalRef" @success="reloadList" />
<ConfrimModal ref="confrimModalRef" @commit="commit" :selectedTotal="selectIds.length" />
</div> </div>
</template> </template>
@ -398,8 +514,6 @@ function onCheckChange(val: any, item: any) {
user-select: none; user-select: none;
border-top-left-radius: 10px; border-top-left-radius: 10px;
border-top-right-radius: 10px; border-top-right-radius: 10px;
/* Standard syntax */
} }
.remove { .remove {
@ -505,29 +619,75 @@ function onCheckChange(val: any, item: any) {
width: 214px; width: 214px;
padding: 16px; padding: 16px;
position: relative; position: relative;
.tag-status {
width: 46px;
height: 22px;
position: absolute;
left: 16px;
top: 20px;
}
}
.grid-item-selected {
background-color: #dae3ff;
} }
.percent { .percent {
position: absolute; position: absolute;
text-align: center; display: flex;
align-items: center;
justify-content: center;
width: 35px; width: 35px;
height: 18px; height: 18px;
opacity: 0.9; opacity: 0.9;
background: #6f92fd; background: #6f92fd;
border-radius: 6px 0px 6px 0px; border-radius: 6px 0px 6px 0px;
z-index: 5; z-index: 5;
right: 22px; right: 28px;
top: 22px; top: 20px;
color: #fff; color: #fff;
font-size: 14px;
.percent-unit {
font-size: 8px;
margin-top: 4px;
}
} }
.grid-item-selected { .percent-red {
background-color: #dae3ff; background: #ff4e4f;
} }
.time {
position: absolute;
z-index: 3;
left: 32px;
bottom: 32px;
.time-item {
display: flex;
align-items: center;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #ffffff;
margin-bottom: 4px;
}
.time-item2 {
margin-bottom: 0;
}
.svg-time {
margin-right: 5px;
}
}
.scroll { .scroll {
overflow-y: auto; overflow-y: auto;
height: calc(100vh - 282px); height: calc(100vh - 282px);
margin-left: 20px;
} }
} }
} }
@ -540,13 +700,14 @@ function onCheckChange(val: any, item: any) {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
} }
.img-full { .img-full {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
::v-deep(img) { ::v-deep(img) {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
} }</style>
</style>

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

@ -9,6 +9,7 @@ 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'
} }
function showModal() { function showModal() {
@ -130,9 +131,9 @@ defineExpose({
</table> </table>
</div> </div>
</div> </div>
<n-divider /> <!-- <n-divider /> -->
<template #footer> <!-- <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="closeModal"> <n-button type="info" @click="closeModal">
确认 确认
@ -141,7 +142,7 @@ defineExpose({
取消 取消
</n-button> </n-button>
</div> </div>
</template> </template> -->
</n-card> </n-card>
</n-modal> </n-modal>
</div> </div>
@ -253,6 +254,11 @@ defineExpose({
tr td:first-child{ tr td:first-child{
text-align: right; text-align: right;
padding-right: 10px; padding-right: 10px;
color: #515457;
}
tr td{
color: #333333;
} }
tr span{ tr span{
padding: 0 10px; padding: 0 10px;

@ -3,6 +3,7 @@ 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';
const emit = defineEmits<{ const emit = defineEmits<{
(e: "logout"): void; (e: "logout"): void;
@ -107,7 +108,7 @@ const options = computed(() => {
<div class="container"> <div class="container">
<div class="header"> <div class="header">
<n-avatar <n-avatar
:src="getImgUrl(useInfo.usericon)" :src="(useInfo.usericon && getImgUrl(useInfo.usericon)) || defaultAvatar"
round round
style="width: 53px; height: 53px" style="width: 53px; height: 53px"
/> />

@ -11,10 +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';
const taskStore = useTaskStore() const taskStore = useTaskStore();
export default defineComponent({ export default defineComponent({
name: 'PageHeader', name: "PageHeader",
components: { components: {
UserSettings, UserSettings,
QuillModal, QuillModal,
@ -30,139 +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(() => {
mousetrap.bind('n r', quillHandler) getMessage();
mousetrap.bind('n t', quillHandler) mousetrap.bind("n r", quillHandler);
mousetrap.bind('n n', recycleHandler) mousetrap.bind("n t", quillHandler);
mousetrap.bind('m m', searchHandler) mousetrap.bind("n n", recycleHandler);
}) mousetrap.bind("m m", searchHandler);
});
const defaultAvatarSrc = ref(defaultAvatar);
return { return {
...toRefs(state), ...toRefs(state),
@ -183,9 +184,10 @@ export default defineComponent({
getMessage, getMessage,
handleDragOver, handleDragOver,
handleDragLeave, handleDragLeave,
defaultAvatarSrc,
} }
}, },
}) });
</script> </script>
<template> <template>
@ -207,8 +209,16 @@ export default defineComponent({
v-for="item in iconList" v-for="item in iconList"
:key="item.icon" :key="item.icon"
class="layout-header-trigger layout-header-trigger-min" class="layout-header-trigger layout-header-trigger-min"
@dragover.prevent="(e) => { handleDragOver(e, item) }" @dragover.prevent="
@dragleave.prevent="(e) => { handleDragLeave(e, item) }" (e) => {
handleDragOver(e, item);
}
"
@dragleave.prevent="
(e) => {
handleDragLeave(e, item);
}
"
> >
<div class="back" @click="item.handle"> <div class="back" @click="item.handle">
<SvgIcon :name="item.icon" size="18" /> <SvgIcon :name="item.icon" size="18" />
@ -216,7 +226,8 @@ export default defineComponent({
</div> </div>
<!-- 个人中心 --> <!-- 个人中心 -->
<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 :src="(useInfo.usericon && getImgUrl(useInfo.usericon)) || defaultAvatarSrc" round/>
</div> </div>
<!-- 设置 --> <!-- 设置 -->
<UserSettings @logout="doLogout" /> <UserSettings @logout="doLogout" />
@ -326,9 +337,7 @@ export default defineComponent({
} }
.layout-header-left { .layout-header-left {
::v-deep( ::v-deep(.n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link) {
.n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link
) {
color: #515a6e; color: #515a6e;
} }
} }

@ -54,16 +54,16 @@ export default defineComponent({
: "", : "",
icon: undefined, icon: undefined,
key: item.resKey, key: item.resKey,
label: item.name, label: item.description,
meta: { meta: {
title: item.name, title: item.description,
permissions: [item.resKey], permissions: [item.resKey],
}, },
path: item.resUrl, path: item.resUrl,
name: item.resKey, name: item.resKey,
svgname: item.icon, svgname: item.icon,
svgsize: 32, svgsize: item.resUrl == "/home" ? 60 : 22,
title: item.name, title: item.description,
}; };
return v; return v;
}); });

@ -38,7 +38,7 @@ const routes: Array<RouteRecordRaw> = [
path: 'final-detail', path: 'final-detail',
name: 'final-detail', name: 'final-detail',
meta: { meta: {
title: '任务终审详情', title: '任务详情',
}, },
component: () => import('@/views/task/content/Content.vue'), component: () => import('@/views/task/content/Content.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: 'AI工单', 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: 'AI工单', title: '图审审批管理',
}, },
component: () => import('@/views/worksheet/index.vue'), component: () => import('@/views/worksheet/index.vue'),
}, },

@ -9,6 +9,10 @@ export interface ConfigState {
systemConfig: AsideConfig | null systemConfig: AsideConfig | null
customConfig: string[] | null customConfig: string[] | null
asideValue: any asideValue: any
searchValue: string
isAllowDownload: boolean
timeNum: number
filterConfig: string[] // 过滤筛选条件
} }
export const useAsideConfigStore = defineStore({ export const useAsideConfigStore = defineStore({
@ -17,6 +21,10 @@ export const useAsideConfigStore = defineStore({
systemConfig: null, systemConfig: null,
customConfig: null, customConfig: null,
asideValue: null, asideValue: null,
searchValue: "",
isAllowDownload: true,
timeNum: 0,
filterConfig: [],
}), }),
getters: { getters: {
getConfig(): AsideConfig | null { getConfig(): AsideConfig | null {
@ -26,7 +34,19 @@ export const useAsideConfigStore = defineStore({
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: {
@ -36,6 +56,22 @@ export const useAsideConfigStore = defineStore({
setAsideValue(value) { setAsideValue(value) {
this.asideValue = value this.asideValue = value
}, },
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() { async fetchConfig() {
const response = await getConfig() const response = await getConfig()

@ -1,6 +1,6 @@
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { store } from '@/store' import { store } from '@/store'
import { getBackList, getBusinessList, getIzShowList, getIztaskstatusList, getPictureTypeList, getRegionList, getRejectList, getRelationTypeList, getTFList, getizstatusList } from '@/api/dictionary' import { getBackList, getBusinessList, getIzShowList, getIztaskstatusList, getPictureTypeList, getRegionList, getRejectList, getRelationTypeList, getTFList, getizstatusList, getizApprovalStatusList } from '@/api/dictionary'
export interface DictionaryState { export interface DictionaryState {
regionList: any regionList: any
@ -24,6 +24,7 @@ export interface DictionaryState {
backList: any backList: any
relationTypeList: any relationTypeList: any
izstatusList: any izstatusList: any
izApprovalStatusList: any
} }
export const useDictionaryStore = defineStore({ export const useDictionaryStore = defineStore({
@ -50,6 +51,7 @@ export const useDictionaryStore = defineStore({
backList: null, backList: null,
relationTypeList: null, relationTypeList: null,
izstatusList: null, izstatusList: null,
izApprovalStatusList: null,
}), }),
getters: { getters: {
getRegionList: (state) => { getRegionList: (state) => {
@ -100,8 +102,35 @@ export const useDictionaryStore = defineStore({
getizstatus: (state) => { getizstatus: (state) => {
return state.izstatusList return state.izstatusList
}, },
getizApprovalStatus: (state) => {
return state.izApprovalStatusList
}
}, },
actions: { actions: {
initData(){
// this.fetchRegionList(); //废弃
this.fetchPictureTypeList();
this.fetchPersionList();
this.fetchPlanList();
this.fetchTFList();
// this.fetchIzShowList(); //废弃
this.fetchIzProjectList();
this.fetchIztaskrromList();
this.fetchIztaskstatusList();
this.fetchIzvisitproList();
this.fetchIzfirmList();
this.fetchIzproductnameList();
this.fetchizcustomnameList();
this.fetchIzCustomtypeList();
this.fetchIzcustomlevelList();
this.fetchizizprojecttypeList();
this.fetchizvisitcityList();
this.fetchRejectList();
this.fetchBackList();
this.fetchRelationTypeList();
this.fetchizstatusListt();
this.fetchizApprovalStatusList();
},
settfList(config) { settfList(config) {
this.tfList = config this.tfList = config
}, },
@ -216,7 +245,7 @@ export const useDictionaryStore = defineStore({
// 退回方式 // 退回方式
async fetchBackList() { async fetchBackList() {
const list = await getBackList() const list = await getBackList()
this.backList = generateOptions(list, 'codeno', 'name') this.backList = generateOptions2(list)
return this.backList return this.backList
}, },
// 退回方式 // 退回方式
@ -231,6 +260,12 @@ export const useDictionaryStore = defineStore({
this.izstatusList = generateOptions2(list, 'codeno', 'name') this.izstatusList = generateOptions2(list, 'codeno', 'name')
return this.izstatusList return this.izstatusList
}, },
// 审核状态(任务审核模块)
async fetchizApprovalStatusList() {
const list = await getizApprovalStatusList()
this.izApprovalStatusList = generateOptions2(list, 'codeno', 'name')
return this.izApprovalStatusList
},
}, },
}) })

@ -124,6 +124,11 @@ export const useUserStore = defineStore({
// 默认设置为第一个租户 // 默认设置为第一个租户
const firstTenant = data.tenantList.length > 0 ? data.tenantList[0] : null const firstTenant = data.tenantList.length > 0 ? data.tenantList[0] : null
const tenantId = firstTenant ? firstTenant.id : '' const tenantId = firstTenant ? firstTenant.id : ''
data.frontmenuTList.forEach(ele=>{
if(ele.description === 'AI工单'){
ele.description = '图审审批管理'
}
})
storage.set(CURRENT_USER, data, ex) storage.set(CURRENT_USER, data, ex)
storage.set(TENANT_ID, tenantId) storage.set(TENANT_ID, tenantId)
this.setUserInfo(data) this.setUserInfo(data)

@ -11,7 +11,9 @@ export const useWorkOrderStore = defineStore({
activeId: '', activeId: '',
packageList: [], packageList: [],
immersion: false, immersion: false,
name: '' name: '',
dataId: '',
approvalList: [],
}), }),
getters: { getters: {
getActiveId: (state: OrderState) => state.activeId, getActiveId: (state: OrderState) => state.activeId,
@ -22,10 +24,11 @@ export const useWorkOrderStore = defineStore({
setOrderList(list: PackageListItem[]) { setOrderList(list: PackageListItem[]) {
this.packageList = list this.packageList = list
}, },
setActive(index: number, orderId?: string) { setActive(index: number, orderId?: string, dataId?: string) {
this.currentIndex = index this.currentIndex = index
const order = this.packageList[index] const order = this.packageList[index]
this.activeId = orderId || order?.checkDuplicateId this.activeId = orderId || order?.checkDuplicateId
this.dataId = dataId || order.id;
}, },
forward() { forward() {
const len = this.packageList.length const len = this.packageList.length

@ -1,158 +1,180 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, inject, nextTick, onBeforeMount, onMounted, reactive, ref, shallowRef, unref, watch } from 'vue' import {
import { CustomFilterModalVue, FilterModal, NewFilterModal } from '@/views/final/comp' computed,
import Search from '@/views/home/aside/comp/Search.vue' inject,
import AdvanceFilter from '@/views/home/aside/comp/AdvanceFilter.vue' nextTick,
import { getViewportOffset } from '@/utils/domUtils' onBeforeMount,
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn' onMounted,
import { useFinal } from '@/store/modules/final' reactive,
import type { Filter } from '/#/home' ref,
import type { AsideEntity } from '@/config/aside' shallowRef,
import { asideMap } from '@/config/final' unref,
import type { AsideConfig } from '/#/api' watch,
import emitter from '@/utils/mitt' } from "vue";
import { CustomFilterModalVue, FilterModal, NewFilterModal } from "@/views/final/comp";
const finalStore = useFinal() import Search from "@/views/home/aside/comp/Search.vue";
import AdvanceFilter from "@/views/home/aside/comp/AdvanceFilter.vue";
import { getViewportOffset } from "@/utils/domUtils";
import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { useFinal } from "@/store/modules/final";
import type { Filter } from "/#/home";
import type { AsideEntity } from "@/config/aside";
import { asideMap } from "@/config/final";
import type { AsideConfig } from "/#/api";
import emitter from "@/utils/mitt";
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 }[]>([]);
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 = ref(null) const filterModalRef = ref(null);
const newFilterModalRef = ref(null) const newFilterModalRef = ref(null);
const customModalRef = ref(null) const customModalRef = 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();
} }
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();
}) });
finalStore.$subscribe(() => { finalStore.$subscribe(() => {
const customConfig = finalStore.getCustomConfig const customConfig = finalStore.getCustomConfig;
if (customConfig === null) if (customConfig === null) return;
return
const showKeys: string[] = [...customConfig] const showKeys: string[] = [...customConfig];
const defaultKeys = Object.keys(asideMap).filter(key => asideMap[key].isDefaultFilter) const defaultKeys = Object.keys(asideMap).filter(
showKeys.unshift(...defaultKeys) (key) => asideMap[key].isDefaultFilter
);
showKeys.unshift(...defaultKeys);
Object.keys(asideMap).forEach((key) => { Object.keys(asideMap).forEach((key) => {
// //
if (key.startsWith('iz')) if (key.startsWith("iz"))
asideVisible[key] = asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter) asideVisible[key] =
}) asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter);
});
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
if (asideMap[key]) { if (asideMap[key]) {
const config = { const config = {
key, key,
config: asideMap[key], config: asideMap[key],
};
return [...acc, config];
} else {
return acc;
} }
return [...acc, config] }, []);
}
else {
return acc
}
}, [])
showItems.value = items showItems.value = items;
}) });
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){
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);
} }
function filterHandler(searchId: string) { function filterHandler(searchId: string) {
emitter.emit('filter-final', searchId) emitter.emit("filter-final", searchId);
} }
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);
}) });
const inputChange = (keyword) => {
emit("inputChange", keyword);
};
</script> </script>
<template> <template>
<div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false"> <div
class="aside"
:style="asideStyle"
@mouseenter="asideEnter = true"
@mouseleave="asideEnter = false"
>
<div v-show="showCollapse" class="aside-collapse"> <div v-show="showCollapse" class="aside-collapse">
<div class="aside-collapse-btn" @click="collapseHandler"> <div class="aside-collapse-btn" @click="collapseHandler">
<SvgIcon :name="collapseIcon" size="40" /> <SvgIcon :name="collapseIcon" size="40" />
@ -161,23 +183,40 @@ watch(asideValue, (newVal) => {
<n-scrollbar trigger="none"> <n-scrollbar trigger="none">
<div class="aside-header"> <div class="aside-header">
<!-- 搜索跳转模块 --> <!-- 搜索跳转模块 -->
<Search v-show="showSearch" @select="scrollHandler" @close="setShowSearch(false)" /> <Search
v-show="showSearch"
@select="scrollHandler"
@close="setShowSearch(false)"
@inputChange="inputChange"
/>
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" :type="1" @select="filterHandler" @update:search="setShowSearch(true)" v-show="!showSearch"
@show-custom="showModal(customModalRef)" @show-filter="showModal(filterModalRef)" :type="1"
@select="filterHandler"
@update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)"
@show-filter="showModal(filterModalRef)"
/> />
</div> </div>
<component <component
:is="item.config.component" v-for="(item, index) in showItems" :id="item.key" :key="index" :is="item.config.component"
v-model:value="asideValue[item.key]" :label="item.config.label" v-for="(item, index) in showItems"
:id="item.key"
:key="index"
v-model:value="asideValue[item.key]"
:label="item.config.label"
/> />
<!-- 筛选 --> <!-- 筛选 -->
<CustomFilterModalVue ref="customModalRef" /> <CustomFilterModalVue ref="customModalRef" />
<!-- 过滤列表 --> <!-- 过滤列表 -->
<FilterModal ref="filterModalRef" @edit-filter="editFilter" @show-new-filter="showModal(newFilterModalRef)" /> <FilterModal
ref="filterModalRef"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
/>
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModal ref="newFilterModalRef" /> <NewFilterModal ref="newFilterModalRef" />
</n-scrollbar> </n-scrollbar>
@ -189,7 +228,7 @@ watch(asideValue, (newVal) => {
display: flex; display: flex;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
background: #FFF; background: #fff;
border: 1px solid #efeff5; border: 1px solid #efeff5;
border-radius: 3px; border-radius: 3px;
box-sizing: border-box; box-sizing: border-box;
@ -226,11 +265,17 @@ watch(asideValue, (newVal) => {
right: -20px; right: -20px;
} }
::v-deep(.n-collapse .n-collapse-item.n-collapse-item--right-arrow-placement .n-collapse-item__header .n-collapse-item-arrow) { ::v-deep(.n-collapse
.n-collapse-item.n-collapse-item--right-arrow-placement
.n-collapse-item__header
.n-collapse-item-arrow) {
margin-left: 8px; margin-left: 8px;
} }
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__header .n-collapse-item__header-main) { ::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__header
.n-collapse-item__header-main) {
font-weight: bold; font-weight: bold;
justify-content: space-between; justify-content: space-between;
} }
@ -243,11 +288,18 @@ watch(asideValue, (newVal) => {
border-top: 0px; border-top: 0px;
} }
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__content-wrapper .n-collapse-item__content-inner) { ::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__content-wrapper
.n-collapse-item__content-inner) {
padding-top: 10px; padding-top: 10px;
} }
::v-deep(.n-scrollbar > .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar, .n-scrollbar + .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar) { ::v-deep(.n-scrollbar
> .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar, .n-scrollbar
+ .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar) {
width: 0px; width: 0px;
} }
} }

@ -1,239 +1,250 @@
<script lang="ts" setup> <script lang="ts" setup>
import { setFilter } from "@/api/home/filter"; import { debounce, difference } from 'lodash-es'
import { asideMap } from "@/config/final"; import { computed, ref, watch } from 'vue'
import { useFinal } from "@/store/modules/final"; import { VueDraggable } from 'vue-draggable-plus'
import { debounce, difference } from "lodash-es"; import { setFilter } from '@/api/home/filter'
import { computed, ref, watch } from "vue"; import { asideMap } from '@/config/final'
import { VueDraggable } from "vue-draggable-plus"; import { useFinal } from '@/store/modules/final'
const show = ref(false); const show = ref(false)
const checkAll = ref(false); const checkAll = ref(false)
const selectIds = ref<string[]>([]); const selectIds = ref<string[]>([])
const finalStore = useFinal(); const finalStore = useFinal()
function showModal() { function showModal() {
show.value = true; show.value = true
} }
function closeModal() { function closeModal() {
show.value = false; show.value = false
} }
// //
const offList = ref<any[]>([]); const offList = ref<any[]>([])
// //
const onList = ref<any[]>([]); const onList = ref<any[]>([])
const allCount = computed(() => { const allCount = computed(() => {
return `全部筛选(共${offList.value.length}个)`; return `全部筛选(共${offList.value.length}个)`
}); })
const selectCount = computed(() => { const selectCount = computed(() => {
return `已选筛选(共${onList.value.length}个)`; return `已选筛选(共${onList.value.length}个)`
}); })
defineExpose({ defineExpose({
showModal, showModal,
}); })
function generateDefaultList() { 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) { if (isDefaultFilter) {
const config = { const config = {
id: key, id: key,
name: label || "未配置", name: label || '未配置',
fix: isDefaultFilter, fix: isDefaultFilter,
checked: true, checked: true,
};
return [...acc, config];
} else {
return acc;
} }
}, []); return [...acc, config]
}
else {
return acc
}
}, [])
} }
function generatList(customConfig) { function generatList(customConfig) {
const keys = Object.keys(asideMap); const keys = Object.keys(asideMap)
let onList: object[] = []; let onList: object[] = []
const offList: object[] = []; const offList: object[] = []
const showKeys = customConfig.map((key: string) => key.toLowerCase()); const showKeys = customConfig.map((key: string) => key.toLowerCase())
for (const key of keys) { for (const key of keys) {
if (!key.startsWith("iz") || asideMap[key] === undefined) continue; if (!key.startsWith('iz') || asideMap[key] === undefined)
continue
const name = asideMap[key]?.label; const name = asideMap[key]?.label
const isDefaultFilter = asideMap[key]?.isDefaultFilter; const isDefaultFilter = asideMap[key]?.isDefaultFilter
// //
const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key); const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key)
offList.push({ offList.push({
id: key, id: key,
name: name || "未配置", name: name || '未配置',
fix: isDefaultFilter, fix: isDefaultFilter,
checked: isChecked, checked: isChecked,
}); })
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 (isDefaultFilter === false) { if (isDefaultFilter === false) {
const config = { const config = {
id: key, id: key,
name: asideMap[key].label || "未配置", name: asideMap[key].label || '未配置',
fix: asideMap[key].isDefaultFilter, fix: asideMap[key].isDefaultFilter,
};
return [...acc, config];
} else {
return acc;
} }
}, []); return [...acc, config]
}
else {
return acc
}
}, [])
const fixedList = generateDefaultList(); const fixedList = generateDefaultList()
onList.unshift(...fixedList); onList.unshift(...fixedList)
return { showList: onList, hideList: offList }; return { showList: onList, hideList: offList }
} }
finalStore.$subscribe(() => { finalStore.$subscribe(() => {
const customConfig = finalStore.getCustomConfig; const customConfig = finalStore.getCustomConfig
if (customConfig === null) return; if (customConfig === null)
return
const { showList, hideList } = generatList(customConfig); const { showList, hideList } = generatList(customConfig)
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) .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 })
finalStore.fetchCustomConfig(); finalStore.fetchCustomConfig()
closeModal(); closeModal()
} }
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)
} }
} }
selectIds.value = value ? ids : []; selectIds.value = value ? ids : []
} }
function onCheckChange(checked: any, item: any) { 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
let currentIndex = offList.value.findIndex((v) => v.id == item.id); const currentIndex = offList.value.findIndex(v => v.id == item.id)
offList.value[currentIndex].checked = item.checked; offList.value[currentIndex].checked = item.checked
if (index === -1 && checked) selectIds.value.push(item.id); if (index === -1 && checked)
else selectIds.value.splice(index, 1); selectIds.value.push(item.id)
else selectIds.value.splice(index, 1)
} }
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) return; if (newVal === oldVal)
return
const action = newVal > oldVal ? "add" : "remove"; const action = newVal > oldVal ? 'add' : 'remove'
const diff = const diff
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) return; if (diff.length === 0)
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({
id: item.id, id: item.id,
name: item.name || "未配置", name: item.name || '未配置',
fix: item.fix || false, fix: item.fix || false,
}); })
} }
} }
} else { }
const list = onList.value; else {
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)
index--; index--
}
} }
} }
} }
); },
)
watch( watch(
() => showIds.value.length, () => showIds.value.length,
(newVal, oldVal) => { (newVal, oldVal) => {
if (newVal === oldVal) return; if (newVal === oldVal)
return
const diff = difference(selectIds.value, showIds.value); const diff = difference(selectIds.value, showIds.value)
if (diff.length === 0) return; if (diff.length === 0)
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) { function removeHandler(id: string) {
const index = onList.value.findIndex((item) => { const index = onList.value.findIndex((item) => {
return item.id === id; return item.id === id
}); })
if (index !== -1) onList.value.splice(index, 1); if (index !== -1)
onList.value.splice(index, 1)
} }
const offKeyword = ref(""); const offKeyword = ref('')
const onKeyword = ref(""); const onKeyword = ref('')
const leftInputHandler = debounce((keyword) => { const leftInputHandler = debounce((keyword) => {
offKeyword.value = keyword; offKeyword.value = keyword
}, 300); }, 300)
const rightInputHandler = debounce((keyword) => { const rightInputHandler = debounce((keyword) => {
onKeyword.value = keyword; onKeyword.value = keyword
}, 300); }, 300)
</script> </script>
<template> <template>
@ -246,10 +257,10 @@ const rightInputHandler = debounce((keyword) => {
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>
@ -263,7 +274,7 @@ const rightInputHandler = debounce((keyword) => {
:bordered="false" :bordered="false"
> >
<div> <div>
<n-input placeholder="搜索关键" @input="leftInputHandler"> <n-input placeholder="搜索关键" @input="leftInputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" color="#999999" /> <SvgIcon size="14px" name="magnifying-1" color="#999999" />
</template> </template>
@ -313,7 +324,8 @@ const rightInputHandler = debounce((keyword) => {
<span class="textbtnStyle" @click="clearDragSource"></span> <span class="textbtnStyle" @click="clearDragSource"></span>
</template> </template>
<div> <div>
<n-input placeholder="搜索关键字" @input="rightInputHandler"> <!-- j -->
<n-input placeholder="搜索关键词" @input="rightInputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" color="#999999" /> <SvgIcon size="14px" name="magnifying-1" color="#999999" />
</template> </template>
@ -357,7 +369,9 @@ const rightInputHandler = debounce((keyword) => {
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> </n-button> <n-button type="info" @click="handleSumbit">
确定
</n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal"> <n-button secondary style="margin-left: 15px" @click="closeModal">
取消 取消
</n-button> </n-button>
@ -414,7 +428,7 @@ const rightInputHandler = debounce((keyword) => {
.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;
--n-padding-right: 24px; --n-padding-right: 24px;
--n-padding-top: 20px; --n-padding-top: 20px;
@ -455,6 +469,7 @@ const rightInputHandler = debounce((keyword) => {
::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: #666666;
} }
::v-deep(.n-scrollbar) { ::v-deep(.n-scrollbar) {
border-top: none !important; border-top: none !important;

@ -433,13 +433,13 @@ const indeterminate = computed(() => {
> >
<SvgIcon name="drag" size="14" color="#666666" /> <SvgIcon name="drag" size="14" color="#666666" />
<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" size="16px"
style="display: block; margin-left: auto; cursor: pointer" style="display: block; margin-left: auto; cursor: pointer"
name="clear" name="clear"
@click="removeHandler(item.id, 'fix')" @click="removeHandler(item.id, 'fix')"
/> /> -->
</div> </div>
</VueDraggable> </VueDraggable>
<div>不固定</div> <div>不固定</div>

@ -8,6 +8,7 @@ import {
reactive, reactive,
ref, ref,
unref, unref,
computed,
} from "vue"; } from "vue";
import { NDataTable } from "naive-ui"; import { NDataTable } from "naive-ui";
import type { DataTableColumns, DataTableRowKey } from "naive-ui"; import type { DataTableColumns, DataTableRowKey } from "naive-ui";
@ -26,6 +27,7 @@ const emit = defineEmits<{
}>(); }>();
const show = ref(false); const show = ref(false);
const checkedRowKeys = ref([]);
const cardStyle = { const cardStyle = {
width: "800px", width: "800px",
@ -72,6 +74,7 @@ const columns: DataTableColumns<RowData> = [
{ {
title: "创建时间", title: "创建时间",
key: "createtime", key: "createtime",
sorter: (row1, row2) => new Date(row1?.createtime).getTime() - new Date(row2?.createtime).getTime()
}, },
{ {
title: "更新者", title: "更新者",
@ -109,7 +112,7 @@ const pagination = reactive({
}, },
], ],
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("");
@ -119,8 +122,8 @@ async function query(page: number, pageSize: number) {
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 } = result; const { data, pageCount, total: totalCount } = result;
total.value = total; total.value = totalCount;
tableData.value = data; tableData.value = data;
pagination.page = page; pagination.page = page;
pagination.pageCount = pageCount; pagination.pageCount = pageCount;
@ -147,29 +150,28 @@ function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys; selectionIds.value = rowKeys;
} }
function select(key: number) { function select(key: number, id: string) {
switch (key) { switch (key) {
case 1: case 1:
editSelection(); editSelection(id);
break; break;
case 2: case 2:
deleteSelection(); deleteSelection(id);
break; break;
default: default:
break; break;
} }
} }
function editSelection() { function editSelection(id = "") {
// eslint-disable-next-line dot-notation // eslint-disable-next-line dot-notation
const $message = window["$message"]; // const $message = window["$message"];
// if (selectionIds.value.length === 0 || selectionIds.value.length > 1) {
// $message.error("");
// return;
// }
if (selectionIds.value.length === 0 || selectionIds.value.length > 1) { const selectedId = id;
$message.error("请选中一条过滤");
return;
}
const selectedId = selectionIds.value[0];
const selectedFilter = tableData.value.find((item: any) => { const selectedFilter = tableData.value.find((item: any) => {
return item.id === selectedId; return item.id === selectedId;
}); });
@ -178,23 +180,24 @@ function editSelection() {
closeModal(); closeModal();
} }
function deleteSelection() { function deleteSelection(id = "") {
// eslint-disable-next-line dot-notation // eslint-disable-next-line dot-notation
const $message = window["$message"];
if (selectionIds.value.length === 0) { if (selectionIds.value.length === 0) {
$message.error("至少选中一条过滤"); deleteCondition({ ids: id }).then(() => {
query(pagination.page, pagination.pageSize);
});
return; return;
} }
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => { deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize); query(pagination.page, pagination.pageSize);
}); });
} }
async function handlePageChange(currentPage) { async function handlePageChange(currentPage) {
if (loading.value) return; if (loading.value) return;
pagination.page = currentPage;
const { pageSize } = pagination; const { pageSize } = pagination;
await query(currentPage, pageSize); await query(currentPage, pageSize);
} }
@ -209,7 +212,7 @@ async function handlePageSizeChange(currentPageSize) {
function handleClick() { function handleClick() {
emit("showNewFilter"); emit("showNewFilter");
show.value = false; // show.value = false;
} }
let sortTable: Sortable | null = null; let sortTable: Sortable | null = null;
@ -283,6 +286,10 @@ const inputHandler = debounce((word) => {
keyword.value = word; keyword.value = word;
query(1, 5); query(1, 5);
}, 300); }, 300);
const showSearch = computed(() => {
return selectionIds.value.length > 0;
});
</script> </script>
<template> <template>
@ -292,6 +299,7 @@ const inputHandler = debounce((word) => {
transform-origin="center" transform-origin="center"
display-directive="if" display-directive="if"
@after-leave="afterLeave" @after-leave="afterLeave"
:mask-closable="false"
> >
<n-card <n-card
:style="cardStyle" :style="cardStyle"
@ -307,7 +315,7 @@ const inputHandler = debounce((word) => {
<span :style="{ 'margin-left': '18px' }">基本信息</span> <span :style="{ 'margin-left': '18px' }">基本信息</span>
</div> </div>
</div> </div>
<div 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="请输入过滤条件名称搜索"
@ -324,6 +332,28 @@ const inputHandler = debounce((word) => {
</template> </template>
</n-button> </n-button>
</div> </div>
<div class="wrapper-form" v-else>
<div class="del_btn">
<n-button icon-placement="left" size="medium">
<template #icon>
<SvgIcon name="delete-history" size="16" />
</template>
删除</n-button
>
</div>
<div class="msg">
<span
>已选中
<span style="color: #507afd; font-size: 16px">{{
selectionIds.length
}}</span>
</span
>
<a @click="selectionIds = []">清空</a>
</div>
</div>
<div class="wrapper-table"> <div class="wrapper-table">
<NDataTable <NDataTable
ref="tableRef" ref="tableRef"
@ -337,6 +367,7 @@ const inputHandler = debounce((word) => {
@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>
@ -378,6 +409,15 @@ const inputHandler = debounce((word) => {
width: 300px; width: 300px;
border: 1px solid gray; border: 1px solid gray;
} }
.del_btn {
}
.msg {
a {
margin-left: 30px;
cursor: pointer;
color: #507afd;
}
}
} }
&-table { &-table {

@ -28,19 +28,25 @@ const actions = computed(() => {
</script> </script>
<template> <template>
<div :data-id="id"> <div :data-id="id" class="wrap">
<n-button <div
v-for="(action, index) in actions" :key="index" class="normal" v-for="(action, index) in actions" :key="index"
:class="{ gap: index !== 0, reject: index === 1 }" text @click="(trigger(action) as any)" class="normal"
:class="{ gap: index !== 0, reject: action.key === 'reject' }" text @click="(trigger(action) as any)"
> >
{{ action.label }} {{ action.label }}
</n-button> </div>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.wrap{
display: flex;
align-items: center;
}
.normal { .normal {
color: #507AFD color: #507AFD;
cursor: pointer;
} }
.gap { .gap {

@ -84,10 +84,10 @@ const formRef = ref<FormInst | null>(null)
const formValue = reactive<FormType>({ const formValue = reactive<FormType>({
name: null, name: null,
logic: null, logic: 'and',
conditions: [{ conditions: [{
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}], }],
}) })
@ -150,7 +150,7 @@ function unformatValue(searchfield: string, searchvalue: any) {
function createCondition() { function createCondition() {
formValue.conditions.push({ formValue.conditions.push({
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}) })
} }
@ -227,7 +227,7 @@ function leaveHandler() {
formValue.conditions = [ formValue.conditions = [
{ {
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}, },
] ]
@ -255,7 +255,7 @@ defineExpose({
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler"> <n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler" :mask-closable="false">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true"> <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>
@ -269,7 +269,7 @@ defineExpose({
<n-form-item path="name" label="标题"> <n-form-item path="name" label="标题">
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent /> <n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
</n-form-item> </n-form-item>
<n-form-item path="logic" label="逻辑关系"> <n-form-item path="logic" label="逻辑关系" v-show="false">
<n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" /> <n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" />
</n-form-item> </n-form-item>
<n-form-item <n-form-item
@ -278,6 +278,7 @@ defineExpose({
> >
<n-select filterable <n-select filterable
v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions" v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions"
@change="item.result = ''"
/> />
<n-select filterable <n-select filterable
v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择" v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择"
@ -308,7 +309,7 @@ defineExpose({
<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">
取消 取消

@ -1,7 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, ref, toRefs } from 'vue' import { reactive, ref, toRefs } from 'vue'
import { repetitionTask } from '@/api/final/index' import listDark from 'naive-ui/lib/mention/styles/dark'
import { getRepeatList, repetitionTask } from '@/api/final/index'
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'reject', params: any) (e: 'reject', params: any)
@ -22,6 +23,7 @@ const { detail, total } = toRefs(state)
const show = ref(false) const show = ref(false)
function showModal(id) { function showModal(id) {
state.total = 0
getDetail(id) getDetail(id)
} }
@ -44,11 +46,30 @@ function closeModal() {
show.value = false show.value = false
} }
async function reject() { async function query() {
emit('reject', { a: 'todo' }) const result = await getRepeatList({
sortorder: 'asc',
pageSize: 300,
pageNo: 1,
sortname: '',
})
const { data } = result
// console.log(data)
// // const list = []
// // data.forEach((items) => {
// // items.repeatedTaskList.forEach((item) => {
// // list.push(item)
// // })
// // })
// console.log(data)
emit('reject', data)
closeModal() closeModal()
} }
async function reject() {
query()
}
async function viewRepeat(e: MouseEvent) { async function viewRepeat(e: MouseEvent) {
emit('viewrepeat') emit('viewrepeat')
e.preventDefault() e.preventDefault()
@ -157,7 +178,7 @@ defineExpose({
border-radius: 8px; border-radius: 8px;
padding: 16px; padding: 16px;
padding-top: 0; padding-top: 0;
margin: 45px 12px 35px 38px; margin: 25px 12px 35px 38px;
.imgwrapper { .imgwrapper {
width: 160px; width: 160px;

@ -1,101 +1,153 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, h, reactive, ref, unref } from "vue"; import {
import { NDataTable, useDialog } from "naive-ui"; computed,
import type { DataTableColumns, DataTableRowKey } from "naive-ui"; defineEmits,
import Action from "../comp/Action.vue"; h,
import { RejectModal } from "./index"; nextTick,
import type { RowData } from "@/config/final"; onBeforeMount,
import { getFinalList } from "@/api/final"; onMounted,
import type { ApprovalParam } from "/#/api"; onUnmounted,
import { audit } from "@/api/task/task"; reactive,
ref,
unref,
watch,
} from 'vue'
import { NDataTable, useDialog, useMessage } from 'naive-ui'
import type { DataTableColumns, DataTableRowKey } from 'naive-ui'
import { useRouter } from 'vue-router'
import {
ListAction,
StatusItem,
} from '../comp'
import { RejectModal } from './index'
import { useDictionary } from '@/store/modules/dictonary'
import type { RowData } from '@/config/final'
import { getRepeatList } from '@/api/final'
import { formatToDateHMS } from '@/utils/dateUtil'
import { audit } from '@/api/task/task'
import NotPassed from '@/components/Approval/NotPassed.vue'
const emit = defineEmits<{ const emit = defineEmits<{
(e: "commit", columns: any[]); (e: 'commit', columns: any[])
}>(); }>()
const dicStore = useDictionary()
const show = ref(false); const message = useMessage()
const show = ref(false)
function showModal() { const izstatusList = ref([])
show.value = true; const dialog = useDialog()
} const checkedRowKeys = ref([])
const router = useRouter()
onBeforeMount(() => {
dicStore.fetchizstatusListt()
})
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()
} }
defineExpose({
showModal,
});
const columns: DataTableColumns<RowData> = [ const columns: DataTableColumns<RowData> = [
{ {
type: "selection", type: 'selection',
fixed: "left", fixed: 'left',
width: 50, width: 50,
disabled(row: any) {
return row.states !== 2
}, },
{
title: "任务Id",
key: "id",
fixed: "left",
width: 100,
}, },
{ {
title: "任务名称", title: '任务ID',
key: "fromtaskname", key: 'id',
fixed: "left", fixed: 'left',
width: 200, width: 200,
ellipsis: {
tooltip: true,
},
render(row: any) {
return row.fromtaskid
},
}, },
{ {
title: "审批节点", title: '任务名称',
key: "approvalnode", key: 'fromtaskname',
width: 100, fixed: 'left',
width: 150,
ellipsis: {
tooltip: true,
},
}, },
{ {
title: "审批状态", title: '审批节点',
key: "states", key: 'approvalnode',
width: 100, width: 100,
}, },
{ {
title: "图片相似度", title: '审批状态',
key: "similarity", key: 'states',
width: 120,
render(row) {
const item: any = izstatusList.value.find(
(item: any) => item.value == row.states,
)
return h(StatusItem, {
id: row.id,
status: row.states,
label: item ? item.label : '',
})
},
},
{
title: '图片相似度',
key: 'similarityscore',
width: 100, width: 100,
render(row: any) {
return h('div', {
id: row.id,
style: { color: row.similarityscore === 100 ? '#FF4E4F' : '' },
}, { default: () => row.similarityscore ? `${row.similarityscore}%` : '' })
},
}, },
{ {
title: "提报时间", title: '提报时间',
key: "fromuptime", key: 'fromuptime',
width: 200, width: 200,
render(row: any) {
return formatToDateHMS(row.createdate || 0)
},
}, },
{ {
title: "更新时间", title: '更新时间',
key: "updatetime", key: 'updatetime',
width: 200, width: 200,
}, },
{ {
title: "操作", title: '操作',
key: "actions", key: 'actions',
width: 200, width: 200,
fixed: "right", fixed: 'right',
render(row) { render(row) {
return h(Action, { return h(ListAction, {
id: row.id, id: row.id,
status: row.states, status: row.states,
trigger: actionHandler, trigger: (action) => {
}); actionHandler(action, row)
}, },
})
}, },
]; },
]
const rejectModalRef = ref(null); const notPassModalRef = ref(null) //
const columnsRef = ref(columns); const rejectModalRef = ref(null)
const tableRef = ref<InstanceType<typeof NDataTable>>(); const columnsRef = ref(columns)
const rowKey = (row: RowData) => row.id; const tableRef = ref<InstanceType<typeof NDataTable>>()
const loading = ref(true); const rowKey = (row: RowData) => row.id
const total = ref(0); const loading = ref(true)
const total = ref(0)
const pagination = reactive({ const pagination = reactive({
page: 1, page: 1,
pageCount: 1, pageCount: 1,
@ -103,136 +155,235 @@ 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 selectionIds = ref<DataTableRowKey[]>([]); const selectionIds = ref<DataTableRowKey[]>([])
const deviceHeight = ref(600); const deviceHeight = ref(500)
const maxHeight = computed(() => { const maxHeight = computed(() => {
return tableData.value.length ? `${unref(deviceHeight)}px` : "auto"; return tableData.value.length ? `${unref(deviceHeight)}px` : 'auto'
}); })
async function query(page: number, pageSize: number) { async function query(page: number, pageSize: number) {
const result = await getFinalList({ const result = await getRepeatList({
sortorder: "asc", sortorder: 'asc',
pageSize: 10, pageSize: pagination.pageSize,
currPage: 1, pageNo: pagination.page,
sortname: "", sortname: '',
}); })
const { data, pageCount,totalCount } = result; console.log(666666)
total.value = totalCount; console.log(result)
tableData.value = data;
pagination.page = page; const { data, pageCount, totalCount } = result
pagination.pageCount = pageCount; total.value = totalCount
loading.value = false; tableData.value = data
pagination.page = page
pagination.pageCount = pageCount
loading.value = false
} }
async function handlePageChange(currentPage) { watch(
if (loading.value) return; () => dicStore.izstatusList,
(newval) => {
izstatusList.value = newval
},
)
const { pageSize } = pagination; async function handlePageChange(currentPage) {
await query(currentPage, pageSize); if (loading.value)
return
pagination.page = currentPage
const { pageSize } = pagination
await query(currentPage, pageSize)
} }
async function handlePageSizeChange(currentPageSize) { async function handlePageSizeChange(currentPageSize) {
if (loading.value) return; if (loading.value)
return
const { page } = pagination; const { page } = pagination
pagination.pageSize = currentPageSize; pagination.pageSize = currentPageSize
await query(page, currentPageSize); await query(page, currentPageSize)
} }
function handleCheck(rowKeys: DataTableRowKey[]) { function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys; selectionIds.value = rowKeys
}
function validate(items: any[]) {
if (items.length === 0)
return '至少选中一个任务'
return null
} }
function actionHandler(action: any) { function actionHandler(action: any, row: any) {
const { key } = action; const { key } = action
switch (key) { switch (key) {
case "view": case 'view':
break; goDetail(row)
case "reset": break
resetHandler(); case 'reset':
break; // resetHandler()
case "approval": break
approvalHandler(); case 'approval':
break; singleApproval(row)
case "reject": break
(rejectModalRef.value as any).showModal(); case 'reject':
break; rejectHandler([row])
break
default: default:
break; break
} }
} }
const dialog = useDialog(); function getSelectItems() {
return tableData.value.filter(item => selectionIds.value.includes(item.id))
}
function resetHandler() { //
dialog.info({ function singleApproval(row) {
title: "确认提示", const param = {
content: "确认重置当前选中的任务的审批吗?", result: true,
positiveText: "确定", comment: '',
negativeText: "取消", disposeType: '',
onPositiveClick: async () => { disposeTypeId: '',
// TODO failCauseId: '',
// const result = await resetApproval() failCauseName: '',
flowTaskInfoList: [
{
formId: row.id,
taskId: row.taskId,
taskName: row.fromTaskName,
}, },
onNegativeClick: () => {}, ],
}); }
doAudit(param)
} }
function approvalHandler() { //
function batchApproval() {
const items: any = getSelectItems()
const msg = validate(items)
if (msg !== null) {
message.error(msg)
return
}
console.log(items)
const list: any = []
items.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromtaskname,
})
})
const param = {
result: true,
comment: '',
disposeType: '',
disposeTypeId: '',
failCauseId: '',
failCauseName: '',
flowTaskInfoList: list,
}
doAudit(param)
}
//
function batchReject() {
const items: any = getSelectItems()
rejectHandler(items)
}
//
function doAudit(param: any) {
dialog.info({ dialog.info({
title: "确认提示", title: '确认提示',
content: "确认给该任务审批为【通过】吗?", content: '确认给该任务审批为【通过】吗?',
positiveText: "确定", positiveText: '确定',
negativeText: "取消", negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
// TODO audit(param).then((res) => {
const { code } = res
if (code === 'OK') {
message.success(res.message)
reload()
}
else { message.error(res.message) }
})
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}); })
} }
function rejectHandler(idOrDesc: string, isOther: boolean) { //
// TODO: function rejectHandler(list) {
// const param: ApprovalParam = { const msg = validate(list)
// formid: '', if (msg !== null) {
// taskId: '', message.error(msg)
// approvd: false, return
// taskComment: '',
// }
// if (isOther)
// param.taskComment = idOrDesc
// else
// param.taskComment = idOrDesc
// audit(param)
} }
query(pagination.page, pagination.pageSize); const modal = unref(notPassModalRef)! as any
modal.showModal(list)
}
// query(pagination.page, pagination.pageSize)
function showModal() {
query(pagination.page, pagination.pageSize)
show.value = true
}
function reload() {
selectionIds.value = []
checkedRowKeys.value = []
query(pagination.page, pagination.pageSize)
}
function goDetail(row) {
router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } })
}
const showActions = computed(() => {
return selectionIds.value.length
})
function switchBatch() {
selectionIds.value = []
checkedRowKeys.value = []
}
defineExpose({
showModal,
})
</script> </script>
<template> <template>
<div> <div>
<NotPassed ref="notPassModalRef" @success="reload" />
<n-modal v-model:show="show" transform-origin="center"> <n-modal v-model:show="show" transform-origin="center">
<n-card <n-card
class="cardstyle" class="cardstyle"
@ -242,15 +393,34 @@ query(pagination.page, pagination.pageSize);
aria-modal="true" aria-modal="true"
> >
<div class="wrapper"> <div class="wrapper">
<div class="card-top">
<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 :style="{ 'margin-left': '18px' }">任务信息</span> <span>任务信息</span>
</div>
</div>
<div v-show="showActions" class="batch">
<div style="display: flex; align-items: center">
<img class="btn-approval btn-left" style="margin-left: 16px" src="@/assets/images/task/btn-not-pass.png" alt="" @click.stop="batchReject">
<SvgIcon size="24" name="vs" />
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="batchApproval">
</div>
<div class="batch-right">
<div class="select">
已选中 <span class="num">{{ selectionIds.length }}</span>
</div>
<div class="line" />
<div class="clear" @click="switchBatch">
清空
</div>
</div> </div>
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<NDataTable <NDataTable
ref="tableRef" ref="tableRef"
v-model:checked-row-keys="checkedRowKeys"
remote remote
:columns="columnsRef" :columns="columnsRef"
:scroll-x="1250" :scroll-x="1250"
@ -265,14 +435,15 @@ query(pagination.page, pagination.pageSize);
/> />
</div> </div>
</div> </div>
<template #footer> </div>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> </n-button> <n-button class="btn1" type="info" @click="handleSumbit">
<n-button secondary style="margin-left: 15px" @click="closeModal"> 确定
</n-button>
<n-button secondary class="btn" style="margin-left: 15px" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
</template>
</n-card> </n-card>
</n-modal> </n-modal>
<RejectModal ref="rejectModalRef" @commit="rejectHandler" /> <RejectModal ref="rejectModalRef" @commit="rejectHandler" />
@ -280,13 +451,60 @@ query(pagination.page, pagination.pageSize);
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.batch {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 27px;
.btn-approval{
width: 68px;
height: 28px;
cursor: pointer;
}
.batch-right {
display: flex;
align-items: center;
.select{
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 500;
text-align: center;
color: #666666;
}
.num{
color: #507AFD;
}
.line{
width: 1px;
height: 14px;
background: #d8d8d8;
margin: 0 16px;
}
.clear{
color: #507AFD;
cursor: pointer;
}
}
}
.wrapper { .wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.card-top{
padding: 24px;
}
&-title { &-title {
font-weight: bold; font-size: 18px;
font-size: 16px; font-family: PingFang SC, PingFang SC-Medium;
font-weight: 600;
color: #333333;
} }
&-bar { &-bar {
@ -304,19 +522,31 @@ query(pagination.page, pagination.pageSize);
&-footer { &-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
border-top: 0.5px solid #d9d9d9;
padding: 15px 24px;
} }
&-info { &-info {
font-weight: bold; font-weight: bold;
position: relative; position: relative;
height: 29px;
background: #f8f8f8;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 600;
color: #333333;
display: flex;
align-items: center;
padding-left: 14px;
&:before { &:before {
background-color: #1980ff; background-color: #507AFD;
content: ""; content: "";
width: 5px; height: 18px;
border-radius: 2px; width: 4px;
top: 0; border-radius: 3px;
bottom: 0; top: 5px;
left: 0;
position: absolute; position: absolute;
} }
} }
@ -337,4 +567,35 @@ query(pagination.page, pagination.pageSize);
--n-padding-top: 0px; --n-padding-top: 0px;
--n-padding-bottom: 12px; --n-padding-bottom: 12px;
} }
::v-deep(.n-card__content) {
padding: 0!important;
}
::v-deep(.n-data-table .n-data-table-td) {
padding: 10px 12px!important;
}
.btn1{
background: #507AFD;
}
.btn{
border: 1px solid #cad2dd;
background-color: #fff;
}
.btn-batch {
width: 118px;
height: 36px;
background: linear-gradient(135deg, #5b85f8, #3c6cf0);
border-radius: 17px;
box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
margin-right: 6px;
cursor: pointer;
}
</style> </style>

File diff suppressed because it is too large Load Diff

@ -5,17 +5,21 @@ import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue' import ListContent from './content/ListContent.vue'
const showList = ref(false); const showList = ref(false);
const contentRef:any = ref(null);
const inputChange = (keyword)=>{
contentRef.value.filterTableData(keyword)
}
</script> </script>
<template> <template>
<div class="main"> <div class="main">
<!-- 侧边 --> <!-- 侧边 -->
<Aside /> <Aside @inputChange="inputChange" />
<!-- 内容 --> <!-- 内容 -->
<Content @changeShow="showList=true" /> <Content @changeShow="showList=true" ref="contentRef" />
<!-- 任务管理 --> <!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 --> <!-- TODO:本地演示即可 上传注释注释 -->
<!-- <ListContent /> --> <!-- <ListContent /> -->

@ -1,157 +1,283 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, inject, nextTick, onBeforeMount, onMounted, reactive, ref, shallowRef, unref, watch } from 'vue' import {
import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from './comp/modals' computed,
import Search from './comp/Search.vue' inject,
import AdvanceFilter from './comp/AdvanceFilter.vue' nextTick,
import { getViewportOffset } from '@/utils/domUtils' onBeforeMount,
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn' onMounted,
import { useConfig } from '@/store/modules/asideConfig' reactive,
import type { Filter } from '/#/home' ref,
import type { AsideEntity } from '@/config/aside' shallowRef,
import { asideMap } from '@/config/aside' unref,
import type { AsideConfig } from '/#/api' watch,
import emitter from '@/utils/mitt' } from "vue";
import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from "./comp/modals";
const configStore = useConfig() import Search from "./comp/Search.vue";
import AdvanceFilter from "./comp/AdvanceFilter.vue";
import { getViewportOffset } from "@/utils/domUtils";
import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { useConfig } from "@/store/modules/asideConfig";
import type { Filter } from "/#/home";
import type { AsideEntity } from "@/config/aside";
import { asideMap } from "@/config/aside";
import type { AsideConfig } from "/#/api";
import emitter from "@/utils/mitt";
import { getFilterList } from "@/api/home/main";
import dayjs from "dayjs";
import { cloneDeep, isEqual } from "lodash-es";
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 = 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 customTempObjRef = ref<any>(null); // ()
const configFilterRef = ref<any>([]); //
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();
}) let tempAsideValue = cloneDeep(asideValue);
}) // configStore.setAsideValue(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();
}) });
configStore.$subscribe(() => { configStore.$subscribe(() => {
const config = configStore.getConfig const config = configStore.getConfig;
const customConfig = configStore.getCustomConfig const customConfig = configStore.getCustomConfig;
if (
if (config == null || customConfig == null) configFilterRef.value.length > 0 &&
return isEqual(configFilterRef.value, configStore.getFilterConfig) &&
customObjRef.value &&
const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter) isEqual(customObjRef.value, customTempObjRef.value)
const defaultKeys = Object.keys(asideMap).filter(key => asideMap[key].isDefaultFilter) ) {
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) showKeys.unshift(...defaultKeys)
*/
Object.keys(config).forEach((key) => { let sortKeyList: any = [];
if (key.startsWith('iz') && asideMap[key] !== undefined) configStore.getFilterConfig.map((item: any) => {
asideVisible[key] = (showKeys.includes(key) || asideMap[key].isDefaultFilter) && config[key] === 'Y' 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).map((key) => {
if (asideMap.hasOwnProperty(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") {
let 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 (str != "izsimilarity" && str != "izyear" && customObjRef.value[str]) {
console.log("customObjRef.value[str]222222", customObjRef.value[str]);
// let list = customObjRef.value[str].split(',');
// console.log("list222222", list);
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);
let tempobj = cloneDeep(asideValue);
console.log("tempObj", tempobj);
configStore.setAsideValue(tempobj);
}
// console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
const { render } = asideMap[key] const { render } = asideMap[key];
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;
} });
}, [])
showItems.value = items
})
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;
} }
const newFilterOk = () => {
filterModalRef.value.query(
filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize
);
};
// 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);
} }
// // ->
function filterHandler(searchId: string) { async function filterHandler(searchId: string) {
emitter.emit('filter', searchId) // emitter.emit('filter', searchId)
const res = await getFilterList({ userSearchId: searchId });
// console.log("", res);
if (res.code == "OK") {
let obj = res.data;
customObjRef.value = res.data;
let showKeys: any[] = [];
Object.keys(obj).map((key) => {
if (asideMap.hasOwnProperty(key)) {
showKeys.push(key);
}
});
// console.log(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);
} }
watch(asideValue, (newVal) => { function updateComponent(key, e) {
configStore.setAsideValue(newVal) console.log("跟新值", key, e);
}, { deep: true }) console.log("tempAsideValue跟新值", configStore.getAsideValue, asideValue);
// let tempAsideValue = configStore.getAsideValue || asideValue;
let 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);
configStore.setAsideValue(tempobj);
}
const handleOk = (item: any) => {
console.log("handleOk", item);
if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname);
filterHandler(item.id);
} else {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced("高级筛选");
filterHandler("");
}
};
// watch(asideValue, (newVal) => {
// console.log("asideValue", newVal);
// configStore.setAsideValue(newVal)
// }, { deep: true })
</script> </script>
<template> <template>
<div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false"> <div
class="aside"
:style="asideStyle"
@mouseenter="asideEnter = true"
@mouseleave="asideEnter = false"
>
<div v-show="showCollapse" class="aside-collapse"> <div v-show="showCollapse" class="aside-collapse">
<div class="aside-collapse-btn" @click="collapseHandler"> <div class="aside-collapse-btn" @click="collapseHandler">
<SvgIcon :name="collapseIcon" size="40" /> <SvgIcon :name="collapseIcon" size="40" />
@ -160,23 +286,42 @@ watch(asideValue, (newVal) => {
<n-scrollbar trigger="none"> <n-scrollbar trigger="none">
<div class="aside-header"> <div class="aside-header">
<!-- 搜索跳转模块 --> <!-- 搜索跳转模块 -->
<Search v-show="showSearch" @select="scrollHandler" @close="setShowSearch(false)" /> <Search
v-show="showSearch"
@select="scrollHandler"
@close="setShowSearch(false)"
/>
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" :type="0" @select="filterHandler" @update:search="setShowSearch(true)" v-show="!showSearch"
@show-custom="showModal(customModalRef)" @show-filter="showModal(filterModalRef)" :type="0"
@select="filterHandler"
@update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)"
@show-filter="showModal(filterModalRef)"
ref="AdvanceFilterRef"
/> />
</div> </div>
<component <component
:is="item.config.component" v-for="(item, index) in showItems" :id="item.key" :key="index" v-model:value="asideValue[item.key]" :is="item.config.component"
v-for="(item, index) in showItems"
:id="item.key"
:key="item.key"
v-model:value="asideValue[item.key]"
:label="item.config.label" :label="item.config.label"
@update:value="(e) => updateComponent(item.key, e)"
/> />
<!-- 过滤列表 --> <!-- 过滤列表 -->
<FilterModalVue ref="filterModalRef" @edit-filter="editFilter" @show-new-filter="showModal(newFilterModalRef)" /> <FilterModalVue
ref="filterModalRef"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
@handleOk="handleOk"
/>
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" /> <NewFilterModalVue ref="newFilterModalRef" @onOk="newFilterOk" />
<!-- 筛选 --> <!-- 筛选 -->
<CustomFilterModalVue ref="customModalRef" /> <CustomFilterModalVue ref="customModalRef" />
</n-scrollbar> </n-scrollbar>
@ -188,7 +333,7 @@ watch(asideValue, (newVal) => {
display: flex; display: flex;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
background: #FFF; background: #fff;
border: 1px solid #efeff5; border: 1px solid #efeff5;
border-radius: 3px; border-radius: 3px;
box-sizing: border-box; box-sizing: border-box;
@ -225,11 +370,17 @@ watch(asideValue, (newVal) => {
right: -20px; right: -20px;
} }
::v-deep(.n-collapse .n-collapse-item.n-collapse-item--right-arrow-placement .n-collapse-item__header .n-collapse-item-arrow) { ::v-deep(.n-collapse
.n-collapse-item.n-collapse-item--right-arrow-placement
.n-collapse-item__header
.n-collapse-item-arrow) {
margin-left: 8px; margin-left: 8px;
} }
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__header .n-collapse-item__header-main) { ::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__header
.n-collapse-item__header-main) {
font-weight: bold; font-weight: bold;
justify-content: space-between; justify-content: space-between;
} }
@ -242,11 +393,18 @@ watch(asideValue, (newVal) => {
border-top: 0px; border-top: 0px;
} }
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__content-wrapper .n-collapse-item__content-inner) { ::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__content-wrapper
.n-collapse-item__content-inner) {
padding-top: 10px; padding-top: 10px;
} }
::v-deep(.n-scrollbar > .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar, .n-scrollbar + .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar) { ::v-deep(.n-scrollbar
> .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar, .n-scrollbar
+ .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar) {
width: 0px; width: 0px;
} }
} }

@ -1,10 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DropdownMixedOption } from 'naive-ui/es/dropdown/src/interface' import type { DropdownMixedOption } from "naive-ui/es/dropdown/src/interface";
import type { PropType } from 'vue' import type { PropType } from "vue";
defineOptions({ name: 'Action' }) defineOptions({ name: "Action" });
defineProps({ const props = defineProps({
options: { options: {
type: Array as PropType<DropdownMixedOption[]>, type: Array as PropType<DropdownMixedOption[]>,
default: null, default: null,
@ -16,14 +16,17 @@ defineProps({
}, },
id: { id: {
type: String, type: String,
default: '', default: "",
}, },
}) });
const fun = (key) => {
props.select(key, props.id);
};
</script> </script>
<template> <template>
<div :data-id="id"> <div :data-id="id">
<n-dropdown trigger="hover" :options="options" @select="(select as any)"> <n-dropdown trigger="hover" :options="options" @select="fun">
<SvgIcon name="more-hor" size="20" /> <SvgIcon name="more-hor" size="20" />
</n-dropdown> </n-dropdown>
</div> </div>

@ -17,7 +17,10 @@ const props = defineProps({
required: true, required: true,
}, },
}); });
const ruleForm = reactive({
keyword: "",
});
const ruleformRef = ref();
const emit = defineEmits<{ const emit = defineEmits<{
(e: "show-filter"): void; (e: "show-filter"): void;
(e: "show-custom"): void; (e: "show-custom"): void;
@ -75,7 +78,7 @@ useInfiniteScroll(
{ distance: 10, interval: 300, canLoadMore: () => false } { distance: 10, interval: 300, canLoadMore: () => false }
); );
const showClick = async () => { const showClick = async () => {
getSearchedList('') getSearchedList("");
}; };
async function loadMore() { async function loadMore() {
@ -92,7 +95,7 @@ async function featchList() {
loading.value = true; loading.value = true;
try { try {
const searchParam: FilterSearchParam = { const searchParam: FilterSearchParam = {
search_searchname: { value: keyword.value, 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;
@ -121,11 +124,8 @@ function generateFilterEntityList(data) {
}; };
}); });
const reg = new RegExp(keyword.value, "gi"); const reg = new RegExp(ruleForm.keyword, "gi");
const hilightText = searchname.replace( const hilightText = searchname.replace(reg, `<span>${ruleForm.keyword}</span>`);
reg,
`<span>${keyword.value}</span>`
);
return { return {
id, id,
@ -134,7 +134,7 @@ function generateFilterEntityList(data) {
isDefaultFilter: false, isDefaultFilter: false,
filterList: list, filterList: list,
reorder, reorder,
searchname searchname,
}; };
}); });
@ -143,21 +143,30 @@ function generateFilterEntityList(data) {
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) => {
getSearchedList(word) ruleForm.keyword = word;
ruleformRef.value.validate();
if (word.length < 2 && word) {
return;
}
getSearchedList(word);
}, 300); }, 300);
function getSearchedList(word) { function getSearchedList(word, isScroll = false) {
if (word) { if (word) {
pagination.pageSize = 300; pagination.pageSize = 300;
} else { }
if (!word) {
pagination.pageSize = 10; pagination.pageSize = 10;
} }
keyword.value = word; if (isScroll) {
pagination.pageSize = 300;
}
ruleForm.keyword = word;
featchList().then((list) => { featchList().then((list) => {
let dataArr: FilterEntity[] = []; let dataArr: FilterEntity[] = [];
let unDataArr: FilterEntity[] = []; let unDataArr: FilterEntity[] = [];
@ -195,10 +204,26 @@ function favoriteHandler(event: MouseEvent, item: any) {
} }
}); });
inputHandler(keyword.value); inputHandler(ruleForm.keyword);
} }
} }
const rules = {
keyword: [
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (value.length >= 2) {
return true;
} else {
return new Error("搜索关键字最少为两个");
}
},
},
],
};
function unFavoriteHandler(event: MouseEvent, item) { function unFavoriteHandler(event: MouseEvent, item) {
event.stopImmediatePropagation(); event.stopImmediatePropagation();
event.stopPropagation(); event.stopPropagation();
@ -208,15 +233,34 @@ function unFavoriteHandler(event: MouseEvent, item) {
if (!isDefaultFilter) { if (!isDefaultFilter) {
item.favorite = false; item.favorite = false;
unfavorite(id); unfavorite(id);
inputHandler(keyword.value); inputHandler(ruleForm.keyword);
}
} }
const handleScroll = (event) => {
let timer;
if (timer) {
clearTimeout(timer);
} else {
timer = setTimeout(() => {
getSearchedList("", true);
}, 2000);
} }
};
const moveEnd = () => { const moveEnd = () => {
unData.value.map((v, index) => { unData.value.map((v, index) => {
sort(v.id, index); sort(v.id, index);
}); });
}; };
const setCurrentlySelectedAdvanced = (value:string)=>{
currentlySelectedAdvanced.value = value;
}
defineExpose({
setCurrentlySelectedAdvanced
})
</script> </script>
<template> <template>
@ -233,16 +277,27 @@ const moveEnd = () => {
> >
<template #trigger> <template #trigger>
<div class="wrapper-left-dropdown" @click="showClick"> <div class="wrapper-left-dropdown" @click="showClick">
<span style="font-size: 20px;color: #333333;font-weight: Medium;">{{currentlySelectedAdvanced}}</span> <span style="font-size: 20px; color: #333333; font-weight: Medium">{{
<SvgIcon :style="{ marginLeft: '5px' }" name="down" size="14" /> currentlySelectedAdvanced
}}</span>
<SvgIcon
:style="{ marginLeft: '5px' }"
name="down"
size="14"
color="#999999"
/>
</div> </div>
</template> </template>
<n-spin :show="loading"> <n-spin :show="loading">
<div class="wrapper-left-popover"> <div class="wrapper-left-popover">
<n-form :rules="rules" ref="ruleformRef" :model="ruleForm">
<n-form-item path="keyword">
<n-input <n-input
:style="{ '--n-border': '0px' }" :style="{ '--n-border': '0px', '--n-display': 'block' }"
placeholder="请输入关键词" placeholder="请输入关键"
@input="inputHandler" @input="inputHandler"
:value="ruleForm.keyword"
:minlength="2"
> >
<template #prefix> <template #prefix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1" />
@ -256,31 +311,40 @@ const moveEnd = () => {
/> />
</template> </template>
</n-input> </n-input>
</n-form-item>
</n-form>
<ul ref="el" class="wrapper-left-list"> <ul ref="el" class="wrapper-left-list" @scroll="handleScroll">
<li <li
v-for="(item, index) in data" v-for="(item, index) in data"
:key="index" :key="index"
style="display: flex; align-items: center" style="display: flex; align-items: center"
@click="selectHandler(item)" @click="selectHandler(item)"
> >
<SvgIcon name="drag" size="18" color="#333333" style="margin-right:3px"/> <SvgIcon
name="drag"
size="18"
color="#333333"
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"
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 v-html="item.name" style="color: #333333;"/> <div v-html="item.name" style="color: #333333" />
</li> </li>
<!-- filter=".draggable-li[draggable='false']" --> <!-- filter=".draggable-li[draggable='false']" -->
<VueDraggable <VueDraggable
@ -303,20 +367,22 @@ const moveEnd = () => {
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)"
/> />
<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 v-html="item.name" style="color: #333333;"/> <div v-html="item.name" style="color: #333333" />
</li> </li>
</VueDraggable> </VueDraggable>
</ul> </ul>
@ -395,4 +461,7 @@ const moveEnd = () => {
align-items: center; align-items: center;
} }
} }
::v-deep(.wrapper-left-popover .n-form-item) {
display: block !important;
}
</style> </style>

@ -10,6 +10,7 @@ defineOptions({ name: 'Search' })
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'close'): void (e: 'close'): void
(e: 'select', key: string): void (e: 'select', key: string): void
(e: 'inputChange', value: string): void
}>() }>()
const data = ref<SearchEntity[]>([]) const data = ref<SearchEntity[]>([])
@ -18,7 +19,8 @@ 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)
}, 300) }, 300)
configStore.$subscribe(() => { configStore.$subscribe(() => {
@ -48,6 +50,19 @@ function selectHandler(item: SearchEntity) {
(popover.value as any).setShow(false) (popover.value as any).setShow(false)
emit('select', item.key) emit('select', item.key)
} }
//
const searchName = () => {
configStore.setSearchValue(searchKeyword.value);
emit('inputChange',searchKeyword.value);
}
const close = () => {
searchKeyword.value = "";
configStore.setSearchValue(searchKeyword.value);
emit('close');
}
</script> </script>
<template> <template>
@ -57,22 +72,22 @@ function selectHandler(item: SearchEntity) {
trigger="focus" trigger="focus"
> >
<template #trigger> <template #trigger>
<n-input style="width: 260px;height: 32px;" placeholder="请输入你需要搜索的内容" @input="inputHandler"> <n-input v-model:value="searchKeyword" style="width: 260px;height: 32px;" placeholder="请输入你需要搜索的内容" @input="inputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1" @click="searchName" style="cursor: pointer;" />
</template> </template>
</n-input> </n-input>
</template> </template>
<div class="wrapper-popover"> <!-- <div class="wrapper-popover">
<ul class="wrapper-list"> <ul class="wrapper-list">
<li v-for="(item, index) in data" v-show="item.label.includes(searchKeyword)" :key="index" @click="selectHandler(item)"> <li v-for="(item, index) in data" v-show="item.label.includes(searchKeyword)" :key="index" @click="selectHandler(item)">
{{ item.label }} {{ item.label }}
</li> </li>
</ul> </ul>
</div> </div> -->
</n-popover> </n-popover>
<SvgIcon size="16px" style="margin-left: 6px;cursor: pointer;" name="clear" @click="$emit('close')" /> <SvgIcon size="16px" style="margin-left: 6px;cursor: pointer;" name="clear" @click="close" />
</div> </div>
</template> </template>

@ -16,7 +16,11 @@ const emit = defineEmits<{
}>() }>()
const figureUrl = ref(props.value) let figureUrl = ref(props.value)
if(figureUrl.value && figureUrl.value.indexOf('http') == -1) {
figureUrl.value = getImgUrl(figureUrl.value);
}
const uploadRef = ref(null); const uploadRef = ref(null);
async function customRequest(data: UploadCustomRequestOptions) { async function customRequest(data: UploadCustomRequestOptions) {
@ -83,6 +87,7 @@ const handleDrop = async (e) => {
emit('update:value', result.data) emit('update:value', result.data)
} }
}; };
</script> </script>
<template> <template>

@ -0,0 +1,77 @@
<script lang="ts" setup>
import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izApprovalStatus'] && typeof asideValue['izApprovalStatus'] == "string") {
let list = asideValue['izApprovalStatus'].split(',');
formValue.value.plans = list;
console.log("formValue.value.izApprovalStatus", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{
value: string[] | null
label: string
}>()
const emit = defineEmits<{
(e: 'update:value', value: string[]): void
}>()
const formValue = ref({
plans: props.value,
})
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = {
plans: [
{
required: false,
type: 'array',
trigger: ['blur', 'change'],
},
],
}
const options = ref([])
const configStore = useDictionary()
const labStyle = {
fontWeight: 'bold',
}
onBeforeMount(async () => {
const list = await configStore.fetchizApprovalStatusList()
options.value = list
})
const isLoadValue = ref(false)
function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value)
}
</script>
<template>
<n-form :model="formValue" style="padding: 0px 10px;" :rules="rules">
<n-form-item :label="label" path="plans" :label-style="labStyle">
<n-select filterable
v-model:value="formValue.plans" :max-tag-count="2" placeholder="请选择审核状态" multiple
:options="options" @update:value="onChange"
/>
</n-form-item>
</n-form>
</template>
<style lang="less" scoped></style>

@ -1,7 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izcustomlevel']) {
if(typeof asideValue['izcustomlevel'] == "string") {
let list = asideValue['izcustomlevel'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izcustomlevel'];
}
console.log("formValue.value.izcustomlevel", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
@ -16,6 +38,12 @@ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
console.log("formValue.value.izcustomlevel22222", formValue.value.plans);
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +64,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzcustomlevelList() const list = await configStore.fetchIzcustomlevelList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izcustomname']) {
if(typeof asideValue['izcustomname'] == "string") {
let list = asideValue['izcustomname'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izcustomname'];
}
console.log("formValue.value.izcustomname", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -37,7 +61,9 @@ onBeforeMount(async () => {
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izcustomtype']) {
if(typeof asideValue['izcustomtype'] == "string") {
let list = asideValue['izcustomtype'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izcustomtype'];
}
console.log("formValue.value.izcustomtype", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzCustomtypeList() const list = await configStore.fetchIzCustomtypeList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izcustomtypes']) {
if(typeof asideValue['izcustomtypes'] == "string") {
let list = asideValue['izcustomtypes'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izcustomtypes'];
}
console.log("formValue.value.izcustomtypes", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -42,8 +66,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzCustomtypeList() const list = await configStore.fetchIzCustomtypeList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izproductname']) {
if(typeof asideValue['izproductname'] == "string") {
let list = asideValue['izproductname'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izproductname'];
}
console.log("formValue.value.izproductname", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzproductnameList() const list = await configStore.fetchIzproductnameList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(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
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -37,8 +61,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzProjectList() const list = await configStore.fetchIzProjectList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,30 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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 { onUpdated } from 'vue';
import { useConfig } from '@/store/modules/asideConfig'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izprojecttype']) {
if(typeof asideValue['izprojecttype'] == "string") {
let list = asideValue['izprojecttype'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izprojecttype'];
}
console.log("formValue.value.izprojecttype", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +37,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +61,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchizizprojecttypeList() const list = await configStore.fetchizizprojecttypeList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izsearch']) {
if(typeof asideValue['izsearch'] == "string") {
let list = asideValue['izsearch'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izsearch'];
}
console.log("formValue.value.izsearch", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -42,8 +66,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzSearchList() const list = await configStore.fetchIzSearchList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izsearchmanager']) {
if(typeof asideValue['izsearchmanager'] == "string") {
let list = asideValue['izsearchmanager'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izsearchmanager'];
}
console.log("formValue.value.izsearchmanager", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -42,8 +66,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzsSearchManagerList() const list = await configStore.fetchIzsSearchManagerList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izshow']) {
if(typeof asideValue['izshow'] == "string") {
let list = asideValue['izshow'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izshow'];
}
console.log("formValue.value.izshow", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzShowList() const list = await configStore.fetchIzShowList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(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
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchizstatusListt() const list = await configStore.fetchizstatusListt()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izvisitcity']) {
if(typeof asideValue['izvisitcity'] == "string") {
let list = asideValue['izvisitcity'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izvisitcity'];
}
console.log("formValue.value.izvisitcity", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchizvisitcityList() const list = await configStore.fetchizvisitcityList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izfiled17']) {
if(typeof asideValue['izfiled17'] == "string") {
let list = asideValue['izfiled17'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izfiled17'];
}
console.log("formValue.value.izfiled17", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -42,8 +66,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzfiled17List() const list = await configStore.fetchIzfiled17List()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izfiled2']) {
if(typeof asideValue['izfiled2'] == "string") {
let list = asideValue['izfiled2'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izfiled2'];
}
console.log("formValue.value.izfiled2", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -42,8 +66,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzfiled2List() const list = await configStore.fetchIzfiled2List()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izfiled3']) {
if(typeof asideValue['izfiled3'] == "string") {
let list = asideValue['izfiled3'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izfiled3'];
}
console.log("formValue.value.izfiled3", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -42,8 +66,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzfiled2List() const list = await configStore.fetchIzfiled2List()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izfiled6']) {
if(typeof asideValue['izfiled6'] == "string") {
let list = asideValue['izfiled6'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izfiled6'];
}
console.log("formValue.value.izfiled6", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -42,8 +66,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzfiled6List() const list = await configStore.fetchIzfiled6List()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izfirm']) {
if(typeof asideValue['izfirm'] == "string") {
let list = asideValue['izfirm'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izfirm'];
}
console.log("formValue.value.izfirm", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzfirmList() const list = await configStore.fetchIzfirmList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,31 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
console.log("isLoadValue.value", isLoadValue.value,
"configUseStore.getAsideValue", configUseStore.getAsideValue);
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(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
@ -15,7 +38,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +62,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIztaskrromList() const list = await configStore.fetchIztaskrromList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['iztaskstatus']) {
if(typeof asideValue['iztaskstatus'] == "string") {
let list = asideValue['iztaskstatus'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['iztaskstatus'];
}
console.log("formValue.value.iztaskstatus", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIztaskstatusList() const list = await configStore.fetchIztaskstatusList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izvisitpro']) {
if(typeof asideValue['izvisitpro'] == "string") {
let list = asideValue['izvisitpro'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izvisitpro'];
}
console.log("formValue.value.izvisitpro", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
label: string label: string
@ -15,7 +36,10 @@ const emit = defineEmits<{
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value,
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzvisitproList() const list = await configStore.fetchIzvisitproList()
options.value = list options.value = list
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,5 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from 'vue'
import { useConfig } from '@/store/modules/asideConfig'
const configStore = useConfig()
const props = defineProps({ const props = defineProps({
value: { value: {
@ -20,6 +23,7 @@ const download = ref(props.value)
function onChange(value: boolean) { function onChange(value: boolean) {
emit('update:value', value) emit('update:value', value)
configStore.setIsAllowDownload(value);
} }
</script> </script>

@ -1,8 +1,29 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(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
@ -13,9 +34,12 @@ const emit = defineEmits<{
}>() }>()
const formValue = ref({ const formValue = ref({
plans: props.value, plans: props.value || [],
}) })
if(typeof formValue.value.plans == "string") {
let list = formValue.value.plans.split(',');
formValue.value.plans = list;
}
const rules: FormRules = { const rules: FormRules = {
plans: [ plans: [
{ {
@ -36,8 +60,9 @@ onBeforeMount(async () => {
const planList = await configStore.fetchPlanList() const planList = await configStore.fetchPlanList()
planOptons.value = planList planOptons.value = planList
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,7 +1,30 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeMount, ref } from 'vue' 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'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
let asideValue = configUseStore.getAsideValue;
console.log("asideValue接受到的", asideValue);
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
if(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.users1111111111", formValue.value.users);
}else {
formValue.value.users = [];
}
});
const props = defineProps<{ const props = defineProps<{
value: string[] | null value: string[] | null
@ -13,9 +36,13 @@ const emit = defineEmits<{
}>() }>()
const formValue = ref({ const formValue = ref({
users: props.value, users: props.value || [],
}) })
if(typeof formValue.value.users == "string") {
let list = formValue.value.users.split(',');
formValue.value.users = list;
}
console.log("formValue.value.users2222222222222", formValue.value.users);
const rules: FormRules = { const rules: FormRules = {
users: [ users: [
{ {
@ -37,7 +64,10 @@ onBeforeMount(async () => {
personOptions.value = personList personOptions.value = personList
}) })
const isLoadValue = ref(false)
function onChange(value: Array<string>) { function onChange(value: Array<string>) {
console.log("user选中 ", value);
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
</script> </script>

@ -1,25 +1,47 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from "vue";
import { useConfig } from "@/store/modules/asideConfig";
const configUseStore = useConfig();
configUseStore.$subscribe(() => {
if (isLoadValue.value) {
isLoadValue.value = false;
return;
}
let asideValue = configUseStore.getAsideValue;
if(asideValue['izsimilarity']) {
range.value = asideValue['izsimilarity']
}else {
range.value = [0, 100];
}
console.log(range.value, 'range.value')
// else {
// range.value = [0, 100];
// }
});
const props = defineProps<{ const props = defineProps<{
value: [number, number] value: [number, number];
label: string label: string;
}>() }>();
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'update:value', value: number[]): void (e: "update:value", value: string): void;
}>() }>();
const range = ref<[number, number]>(props.value) const range = ref<[number, number]>(props.value || []);
const marks = { const marks = {
0: '0', 0: "0",
50: '50', 50: "50",
100: '100', 100: "100",
} };
const isLoadValue = ref(false);
function onChange(value: number & number[]) { function onChange(value: number & number[]) {
emit('update:value', value) range.value = value as any;
isLoadValue.value = true;
let valueStr = value.join("-");
emit("update:value", valueStr);
} }
</script> </script>
@ -28,7 +50,13 @@ function onChange(value: number & number[]) {
<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 vertical> <n-space vertical>
<n-slider v-model:value="range" range :marks="marks" :step="10" @update-value="onChange" /> <n-slider
v-model:value="range"
range
:marks="marks"
:step="10"
@update-value="onChange"
/>
</n-space> </n-space>
</n-collapse-item> </n-collapse-item>
</n-collapse> </n-collapse>
@ -40,6 +68,6 @@ function onChange(value: number & number[]) {
padding: 10px; padding: 10px;
} }
::v-deep(.n-collapse-item-arrow) { ::v-deep(.n-collapse-item-arrow) {
color: #999999 !important;; color: #999999 !important;
} }
</style> </style>

@ -1,7 +1,23 @@
<script lang="ts" setup> <script lang="ts" setup>
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { onUpdated, watch } from 'vue';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { useConfig } from '@/store/modules/asideConfig'
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = configUseStore.getAsideValue;
if(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
@ -12,11 +28,13 @@ const emit = defineEmits<{
}>() }>()
const time = ref<[number, number] | null>(props.value) const time = ref<[number, number] | null>(props.value)
const isLoadValue = ref(false)
function onChange(value: [number, number]) { function onChange(value: [number, number]) {
isLoadValue.value = true;
emit('update:value', value) emit('update:value', value)
} }
onMounted(() => { onMounted(() => {
if(!props.value) {
// //
const currentDate = dayjs(); const currentDate = dayjs();
// //
@ -24,10 +42,13 @@ onMounted(() => {
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());
setTimeout(() => { setTimeout(() => {
onChange([startDate.getTime(), endDate.getTime()]) emit('update:value', [startDate.getTime(), endDate.getTime()])
},300) },300)
}
}) })
</script> </script>
<template> <template>

@ -19,6 +19,7 @@ import RegionVue from './Region.vue'
import ReportUserVue from './ReportUser.vue' 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'
export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue } export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus }

@ -1,12 +1,11 @@
<script lang="ts" setup> <script lang="ts" setup>
import { cloneDeep, debounce, difference, isEqual } from 'lodash-es'
import { computed, defineOptions, onMounted, ref, watch } from 'vue'
import { VueDraggable } from 'vue-draggable-plus'
import { getAllfieldList, getfieldList, setFilter } from '@/api/home/filter' import { getAllfieldList, getfieldList, setFilter } from '@/api/home/filter'
import { asideMap } from '@/config/aside' import { asideMap } from '@/config/aside'
import { useConfig } from '@/store/modules/asideConfig' import { useConfig } from '@/store/modules/asideConfig'
import { useUser } from "@/store/modules/user" import { useUser } from '@/store/modules/user'
import { debounce, difference } from 'lodash-es'
import { computed, defineOptions, onMounted, ref, watch } from 'vue'
import { VueDraggable } from 'vue-draggable-plus'
defineOptions({ name: 'CustomFilterModal' }) defineOptions({ name: 'CustomFilterModal' })
@ -14,6 +13,7 @@ const show = ref(false)
const configStore = useConfig() const configStore = useConfig()
const checkAll = ref(false) const checkAll = ref(false)
const selectIds = ref<string[]>([]) const selectIds = ref<string[]>([])
const tempList = ref<string[]>([])
function showModal() { function showModal() {
show.value = true show.value = true
@ -24,11 +24,19 @@ function showModal() {
if (config == null || customConfig == null) if (config == null || customConfig == null)
return return
if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig))
return
console.log('开启了啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦筛选条件----------------', customConfig)
const { showList, hideList } = generatList(config, customConfig) const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
if (tempList.value.length > 0)
configStore.setFilterConfig(tempList.value)
onList.value = showList onList.value = showList
offList.value = hideList offList.value = hideList
// //
checkAll.value = hideList.every(item => item.checked); checkAll.value = hideList.every(item => item.checked)
// //
offKeyword.value = '' offKeyword.value = ''
onKeyword.value = '' onKeyword.value = ''
@ -48,7 +56,7 @@ const allCount = computed(() => {
}) })
const selectCount = computed(() => { const selectCount = computed(() => {
return `全部筛选(共${onList.value.length}个)` return `已选筛选(共${onList.value.length}个)`
}) })
defineExpose({ defineExpose({
@ -98,11 +106,10 @@ function generatList(config, customConfig) {
fix: isDefaultFilter, fix: isDefaultFilter,
checked: isChecked, checked: isChecked,
}) })
if (isChecked && selectIds.value.indexOf(key) === -1) { 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
@ -124,7 +131,33 @@ function generatList(config, customConfig) {
const fixedList = generateDefaultList(config) const fixedList = generateDefaultList(config)
offList.unshift(...fixedList) offList.unshift(...fixedList)
onList.unshift(...fixedList) onList.unshift(...fixedList)
return { showList: onList, hideList: offList } console.log('原始筛选条件customConfig', customConfig)
// onListcustomConfig
const tempOnList = cloneDeep(onList)
console.log('原始筛选条件tempOnList', tempOnList)
const sortKeyList: any = []
configStore.getFilterConfig.map((item: any) => {
sortKeyList.push(item.id)
})
console.log('原始筛选条件sortKeyList', sortKeyList)
const sortList: any = []
if (sortKeyList.length > 0) {
sortKeyList.map((key) => {
const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem)
})
}
else {
customConfig.map((key) => {
const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem)
})
}
console.log('原始筛选条件sortList', sortList)
console.log('原始筛选条件configStore.getFilterConfig', configStore.getFilterConfig)
// return { showList: onList, hideList: offList }
return { showList: sortList, hideList: offList }
} }
configStore.$subscribe(() => { configStore.$subscribe(() => {
@ -133,8 +166,19 @@ 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))
return
const { showList, hideList } = generatList(config, customConfig) const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
console.log('克隆条件', tempList.value)
if (tempList.value.length > 0)
configStore.setFilterConfig(tempList.value)
// setTimeout(() => {
// }, 500);
onList.value = showList onList.value = showList
offList.value = hideList offList.value = hideList
}) })
@ -146,7 +190,21 @@ async function handleSumbit(e: MouseEvent) {
}).join(',') }).join(',')
await setFilter({ searchcount: param, type: 0 }) await setFilter({ searchcount: param, type: 0 })
configStore.fetchCustomConfig() const obj = await configStore.fetchCustomConfig()
console.log('obj-------------------------------', obj)
const tempOnList = cloneDeep(onList.value)
console.log('原始筛选条件tempOnList', tempOnList)
const sortList: any = []
obj.map((key) => {
const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem)
})
console.log('configStore.sortList---------------', sortList)
// setTimeout(() => {
if (sortList.length > 0)
configStore.setFilterConfig(sortList)
// }, 500);
closeModal() closeModal()
} }
@ -173,7 +231,7 @@ function onCheckChange(checked: any, item: any) {
else else
index !== -1 && selectIds.value.splice(index, 1) 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(() => {
@ -268,23 +326,21 @@ const rightInputHandler = debounce((keyword) => {
}, 300) }, 300)
async function getfield() { async function getfield() {
let res; let res
res = await getAllfieldList(3) res = await getAllfieldList(3)
const userStore = useUser(); const userStore = useUser()
const userInfo = userStore.getUserInfo; const userInfo = userStore.getUserInfo
res = await getfieldList(3, userInfo.id) res = await getfieldList(3, userInfo.id)
} }
function onMove(e) { function onMove(e) {
// e // e
if (e?.related?.className?.indexOf('fix') !== -1) { if (e?.related?.className?.indexOf('fix') !== -1)
return false; return false
}
} }
onMounted(() => { onMounted(() => {
getfield(); getfield()
}) })
</script> </script>
<template> <template>
@ -305,7 +361,7 @@ onMounted(() => {
:bordered="false" :bordered="false"
> >
<div class="input_wrap"> <div class="input_wrap">
<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-color999" />
</template> </template>
@ -313,7 +369,7 @@ onMounted(() => {
<n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;"> <n-scrollbar 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 v-model:checked="checkAll" label="全" @update:checked="onCheckAllChange" /> <n-checkbox v-model:checked="checkAll" label="全选" :indeterminate="!checkAll" @update:checked="onCheckAllChange" />
</div> </div>
<div <div
v-for="item in offList" v-show="item.name.includes(offKeyword)" :key="item.id" :class="{ 'disable-check': item.fix }" v-for="item in offList" v-show="item.name.includes(offKeyword)" :key="item.id" :class="{ 'disable-check': item.fix }"
@ -341,7 +397,7 @@ onMounted(() => {
<span class="textbtnStyle" @click="clearDragSource"></span> <span class="textbtnStyle" @click="clearDragSource"></span>
</template> </template>
<div class="input_wrap"> <div class="input_wrap">
<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-color999" />
</template> </template>
@ -351,8 +407,10 @@ onMounted(() => {
<div v-for="item in onList" v-show="item.name.includes(onKeyword)" :key="item.id" :draggable="true" class="cursor-move draggable-li"> <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 size="16px" style="display:block;margin-left: auto;cursor: pointer;" <SvgIcon
name="clear" @click="removeHandler(item.id)" /> v-if="!item.fix" size="16px" style="display:block;margin-left: auto;cursor: pointer;"
name="clear" @click="removeHandler(item.id)"
/>
</div> </div>
</VueDraggable> </VueDraggable>
</n-scrollbar> </n-scrollbar>
@ -364,9 +422,9 @@ onMounted(() => {
<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; border: 1px solid #CAD2DD;" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
@ -386,7 +444,7 @@ onMounted(() => {
} }
&-bar { &-bar {
background-color: #f8f8f8; background-color: #f8f8f8 !important;
width: calc(100% + 12px); width: calc(100% + 12px);
margin-top: 20px; margin-top: 20px;
color: #333333; color: #333333;
@ -424,6 +482,10 @@ 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 {
@ -431,6 +493,7 @@ onMounted(() => {
height: 800px; height: 800px;
--n-padding-bottom: 20px; --n-padding-bottom: 20px;
--n-padding-left: 24px; --n-padding-left: 24px;
// background-color: #f8f8f8 !important;
} }
.textbtnStyle { .textbtnStyle {
@ -471,6 +534,7 @@ 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;
} }
::v-deep(.n-scrollbar){ ::v-deep(.n-scrollbar){
border-left: 1px solid #cad2dd !important; border-left: 1px solid #cad2dd !important;

@ -1,5 +1,14 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineOptions, h, nextTick, onUnmounted, reactive, ref, unref } from "vue"; import {
computed,
defineOptions,
h,
nextTick,
onUnmounted,
reactive,
ref,
unref,
} from "vue";
import { NDataTable } from "naive-ui"; import { NDataTable } from "naive-ui";
import type { DataTableColumns, DataTableRowKey } from "naive-ui"; import type { DataTableColumns, DataTableRowKey } from "naive-ui";
import type { SortableEvent } from "sortablejs"; import type { SortableEvent } from "sortablejs";
@ -8,12 +17,22 @@ import { debounce } from "lodash-es";
import Action from "../Action.vue"; import Action from "../Action.vue";
import { deleteCondition, getConditionList, sort } from "@/api/home/filter"; import { deleteCondition, getConditionList, sort } from "@/api/home/filter";
import type { FilterSearchParam } from "/#/api"; import type { FilterSearchParam } from "/#/api";
import selection from "naive-ui/es/_internal/selection";
defineOptions({ name: "FilterModal" }); defineOptions({ name: "FilterModal" });
const $message = window["$message"];
const props = defineProps({
type: {
type: Number,
default: () => 0,
},
});
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 show = ref(false); const show = ref(false);
@ -34,6 +53,25 @@ interface RowData {
updatetime: string; updatetime: string;
} }
function sortData(row) {
console.log("sortData", row);
if (row.order == "descend") {
tableData.value.sort(
(a, b) =>
new Date(a[row.columnKey]).getTime() - new Date(b[row.columnKey]).getTime()
);
} else if (row.order == "ascend") {
tableData.value.sort(
(a, b) =>
new Date(b[row.columnKey]).getTime() - new Date(a[row.columnKey]).getTime()
);
} else {
tableData.value.sort(
(a, b) => Number((a as any).reorder) - Number((b as any).reorder)
);
}
}
const columns: DataTableColumns<RowData> = [ const columns: DataTableColumns<RowData> = [
{ {
type: "selection", type: "selection",
@ -52,9 +90,13 @@ const columns: DataTableColumns<RowData> = [
}); });
}, },
}, },
// j
{ {
title: "名称", title: "名称",
key: "searchname", key: "searchname",
ellipsis: {
tooltip: true,
},
}, },
{ {
title: "创建者", title: "创建者",
@ -64,6 +106,12 @@ const columns: DataTableColumns<RowData> = [
title: "创建时间", title: "创建时间",
key: "createtime", key: "createtime",
width: 180, width: 180,
sorter: (row1, row2) => {
// tableData.value.sort(
// (a, b) => new Date(a?.createtime).getTime() - new Date(b?.createtime).getTime()
// );
return new Date(row1?.createtime).getTime() - new Date(row2?.createtime).getTime();
},
}, },
{ {
title: "更新者", title: "更新者",
@ -110,11 +158,15 @@ 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, 0); const result = await getConditionList(
const { data, pageCount, total } = result; { pageNo: page, pageSize },
searchParam,
props.type
);
const { data, pageCount, total: totalCount } = result;
tableData.value = data; tableData.value = data;
pagination.page = page; pagination.page = page;
total.value = total; total.value = totalCount;
pagination.pageCount = pageCount; pagination.pageCount = pageCount;
loading.value = false; loading.value = false;
} }
@ -139,54 +191,51 @@ function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys; selectionIds.value = rowKeys;
} }
function select(key: number) { function select(key: number, id: string) {
switch (key) { switch (key) {
case 1: case 1:
editSelection(); editSelection(id);
break; break;
case 2: case 2:
deleteSelection(); deleteSelection(id);
break; break;
default: default:
break; break;
} }
} }
function editSelection() { 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) {
// $message.error("");
if (selectionIds.value.length === 0 || selectionIds.value.length > 1) { // return;
$message.error("请选中一条过滤"); // }
return; const selectedId = id;
}
const selectedId = selectionIds.value[0];
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() { function deleteSelection(id = "") {
// eslint-disable-next-line dot-notation
const $message = window["$message"];
if (selectionIds.value.length === 0) { if (selectionIds.value.length === 0) {
$message.error("至少选中一条过滤"); deleteCondition({ ids: id }).then(() => {
query(pagination.page, pagination.pageSize);
});
return; return;
} }
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => { deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize); query(pagination.page, pagination.pageSize);
}); });
} }
async function handlePageChange(currentPage) { async function handlePageChange(currentPage) {
if (loading.value) return; if (loading.value) return;
pagination.page = currentPage;
const { pageSize } = pagination; const { pageSize } = pagination;
await query(currentPage, pageSize); await query(currentPage, pageSize);
} }
@ -201,7 +250,7 @@ async function handlePageSizeChange(currentPageSize) {
function handleClick() { function handleClick() {
emit("showNewFilter"); emit("showNewFilter");
show.value = false; // show.value = false;
} }
let sortTable: Sortable | null = null; let sortTable: Sortable | null = null;
@ -258,17 +307,40 @@ onUnmounted(() => {
}); });
function closeModal() { function closeModal() {
selectionIds.value = [];
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(() => {
return selectionIds.value.length > 0;
});
const handleOk = () => {
if (selectionIds.value.length > 1) {
$message.error("只能选择一条筛选条件");
return;
}
if (selectionIds.value.length == 1) {
const selectedId = selectionIds.value[0];
let item = tableData.value.find(v=>v.id == selectedId);
emit("handleOk", item);
}
if (selectionIds.value.length == 0) {
emit("handleOk", "");
}
closeModal();
};
</script> </script>
<template> <template>
@ -278,6 +350,7 @@ const inputHandler = debounce((word) => {
transform-origin="center" transform-origin="center"
display-directive="if" display-directive="if"
@after-leave="afterLeave" @after-leave="afterLeave"
:mask-closable="false"
> >
<n-card <n-card
:style="cardStyle" :style="cardStyle"
@ -297,46 +370,71 @@ const inputHandler = debounce((word) => {
> >
</div> </div>
</div> </div>
<div class="wrapper-form">
<div v-if="!showSearch" class="wrapper-form">
<n-input <n-input
:style="{ width: '360px', border: '1px solid #cad2dd' }" :style="{ width: '360px', border: '1px solid #cad2dd' }"
placeholder="请输入过滤条件名称搜索" placeholder="请输入过滤条件名称搜索"
@input="inputHandler" @input="inputHandler"
> >
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" color="#fff" /> <SvgIcon size="14px" name="magnifying-1" />
</template> </template>
</n-input> </n-input>
<n-button type="info" style="background: #507afd" @click="handleClick"> <n-button type="info" @click="handleClick">
创建 创建
<template #icon> <template #icon>
<img <SvgIcon size="14px" name="magnifying-1" />
src="../../../../../assets/images/addIcon.png" </template>
style="width: 16px; height: 16px" </n-button>
/> </div>
<div v-else class="wrapper-form">
<div class="del_btn">
<n-button icon-placement="left" size="medium" @click="deleteSelection">
<template #icon>
<SvgIcon name="delete-history" size="16" />
</template> </template>
删除
</n-button> </n-button>
</div> </div>
<div class="msg">
<span
>已选中
<span style="color: #507afd; font-size: 16px">{{
selectionIds.length
}}</span>
</span
>
<a @click="selectionIds = []">清空</a>
</div>
</div>
<div class="wrapper-table"> <div class="wrapper-table">
<NDataTable <NDataTable
ref="tableRef" ref="tableRef"
:max-height="480" :max-height="480"
remote remote
:bordered="false"
:row-props="rowProps as any" :row-props="rowProps as any"
:columns="columns" :columns="columns"
:data="tableData" :data="tableData"
: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"
@update:sorter="sortData"
/> />
</div> </div>
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="closeModal"> </n-button> <n-button style="background-color: #507afd" type="info" @click="handleOk">
确定
</n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal"> <n-button secondary style="margin-left: 15px" @click="closeModal">
取消 取消
</n-button> </n-button>
@ -408,4 +506,14 @@ const inputHandler = debounce((word) => {
} }
} }
} }
::v-deep(.n-data-table .n-data-table-th) {
font-weight: bold !important;
}
::v-deep(table thead tr th) {
background-color: #fafafa !important;
}
::v-deep(.n-button--secondary) {
background-color: #fff;
border: 1px solid #cad2dd !important;
}
</style> </style>

@ -10,12 +10,12 @@ 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()
const dicStore = useDictionary() const dicStore = useDictionary()
const currentStatus = ref<Status>('new') const currentStatus = ref<Status>('new')
let currentEditId: string | null = null let currentEditId: string | null = null
const modalTitle = computed(() => { const modalTitle = computed(() => {
return currentStatus.value === 'new' ? '新建过滤条件' : '编辑过滤条件' return currentStatus.value === 'new' ? '新建过滤条件' : '编辑过滤条件'
}) })
@ -84,12 +84,14 @@ const formRef = ref<FormInst | null>(null)
const formValue = reactive<FormType>({ const formValue = reactive<FormType>({
name: null, name: null,
logic: null, logic: 'and',
conditions: [{ conditions: [
{
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}], },
],
}) })
function handleSumbit(e: MouseEvent) { function handleSumbit(e: MouseEvent) {
@ -118,9 +120,11 @@ function handleSumbit(e: MouseEvent) {
if (currentStatus.value === 'new') if (currentStatus.value === 'new')
addCondition(param) addCondition(param)
else else updateCondition({ id: currentEditId!, ...param })
updateCondition({ id: currentEditId!, ...param }) emit('onOk')
setTimeout(() => {
closeModal() closeModal()
}, 300)
}) })
} }
@ -149,8 +153,7 @@ function unformatValue(searchfield: string, searchvalue: any) {
} }
// 80,90 // 80,90
if (searchfield === 'izsimilarity') // if (searchfield === "izsimilarity") return searchvalue.split(",");
return searchvalue.split(',')
return searchvalue return searchvalue
} }
@ -158,7 +161,7 @@ function unformatValue(searchfield: string, searchvalue: any) {
function createCondition() { function createCondition() {
formValue.conditions.push({ formValue.conditions.push({
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}) })
} }
@ -188,16 +191,16 @@ const logicOptions = ref([])
const similarityOptions = [ const similarityOptions = [
{ {
label: '80%-90%', label: "80%-90%",
value: [80, 90], value: '80,90',
}, },
{ {
label: '95%-100%', label: "95%-100%",
value: [95, 100], value: '95,100',
}, },
{ {
label: '100%-100%', label: "100%-100%",
value: [100, 100], value: '100,100',
}, },
] ]
@ -205,11 +208,16 @@ onBeforeMount(() => {
dicStore.fetchRelationTypeList() dicStore.fetchRelationTypeList()
}) })
watch(() => dicStore.relationTypeList, (newval) => { watch(
() => dicStore.relationTypeList,
(newval) => {
logicOptions.value = newval logicOptions.value = newval
}) },
)
function showModal() { function showModal() {
const list = generateAllData(configStore.systemConfig)
typeOptions.value = list
show.value = true show.value = true
} }
@ -224,7 +232,8 @@ function generateAllData(config): 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 && acc.push({ name
&& acc.push({
value, value,
label: name || '未配置', label: name || '未配置',
}) })
@ -235,21 +244,22 @@ function generateAllData(config): Option[] {
return list return list
} }
watch(() => configStore.systemConfig, (newVal) => { watch(
() => configStore.systemConfig,
(newVal) => {
if (!newVal) if (!newVal)
return return
const list = generateAllData(newVal) const list = generateAllData(newVal)
typeOptions.value = list typeOptions.value = list
}) },
)
function getOptions(key: string) { function getOptions(key: string) {
if (key === 'izsimilarity') if (key === "izsimilarity") return similarityOptions;
return similarityOptions const getterName = `get${key}`;
const options = unref(dicStore[getterName]);
const getterName = `get${key}` return options || [];
const options = unref(dicStore[getterName])
return options || []
} }
function leaveHandler() { function leaveHandler() {
@ -260,18 +270,18 @@ function leaveHandler() {
formValue.conditions = [ formValue.conditions = [
{ {
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}, },
] ]
} }
function edit(editFilter: any) { function edit(editFilter: any) {
currentStatus.value = 'edit' currentStatus.value = "edit";
console.log(editFilter,'editFilter')
const { searchname, ocrUsersearchchildList, id } = editFilter const { searchname, ocrUsersearchchildList, id } = editFilter;
currentEditId = id currentEditId = id;
formValue.name = searchname formValue.name = searchname;
formValue.conditions = ocrUsersearchchildList.map((item) => { formValue.conditions = ocrUsersearchchildList.map((item) => {
return { return {
type: item.searchfield, type: item.searchfield,
@ -288,8 +298,14 @@ defineExpose({
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler"> <n-modal v-model:show="show" transform-origin="center" @after-leave="leaveHandler" :mask-closable="false">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true"> <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">
@ -300,34 +316,78 @@ defineExpose({
<div class="wrapper-form"> <div class="wrapper-form">
<n-form ref="formRef" :model="formValue" :rules="rules"> <n-form ref="formRef" :model="formValue" :rules="rules">
<n-form-item path="name" label="标题"> <n-form-item path="name" label="标题">
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent /> <!-- j -->
<n-input
v-model:value="formValue.name"
:style="{ width: '780px' }"
maxlength="15"
@keydown.enter.prevent
/>
</n-form-item> </n-form-item>
<n-form-item path="logic" label="逻辑关系"> <n-form-item v-show="false" path="logic" label="逻辑关系">
<n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" /> <n-select
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" :key="index" :style="formItemStyle" v-for="(item, index) in formValue.conditions"
path="conditions" :label="formLabel(index)" :key="index"
:style="formItemStyle"
path="conditions"
:label="formLabel(index)"
> >
<n-select filterable <n-select
v-model:value="item.type" placeholder="请选择筛选项名称" :options="typeOptions" v-model:value="item.type"
filterable
placeholder="请选择筛选项名称"
:options="typeOptions"
@change="item.result = ''"
/> />
<n-select filterable <n-select
v-model:value="item.operator" style="margin-left: 8px;" placeholder="请选择" v-model:value="item.operator"
filterable
style="margin-left: 8px"
placeholder="请选择"
:options="operatorOptions" :options="operatorOptions"
/> />
<n-space v-if="item.type === 'izyear'"> <n-space v-if="item.type === 'izyear'">
<n-date-picker <n-date-picker
v-model:value="item.result" style="margin-left: 8px;width: 240px;" type="daterange" v-model:value="item.result"
style="margin-left: 8px; width: 240px"
type="daterange"
clearable clearable
/> />
</n-space> </n-space>
<n-select filterable <n-select
v-else v-model:value="item.result" style="margin-left: 8px;" placeholder="请选择" :options="getOptions(item.type!)" v-else
v-model:value="item.result"
filterable
style="margin-left: 8px"
placeholder="请选择"
:options="getOptions(item.type!)"
/> />
<n-button :style="noBorderInput" icon-placement="right" @click="removeCondition(index)"> <n-button
:style="noBorderInput"
icon-placement="right"
@click="removeCondition(index)"
>
<template #icon> <template #icon>
<SvgIcon size="24" name="close" /> <!-- <SvgIcon size="24" name="close" color="#F00"/>
-->
<svg width="24px" height="24px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>清除</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-3040.000000, -3118.000000)" fill-rule="nonzero">
<g id="清除" transform="translate(3040.000000, 3118.000000)">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="64" height="64"></rect>
<path d="M32,4 C16.5619675,4 4,16.5600322 4,32 C4,47.4399678 16.5600322,60 32,60 C47.4380325,60 60,47.4399678 60,32 C60,16.5600322 47.4399678,4 32,4 Z M43.4220132,40.6240021 C44.2020159,41.4079827 44.1999731,42.6720064 43.4180353,43.4520091 C43.0280877,43.8400215 42.5180487,44.0360166 42.0060745,44.0360166 C41.4920576,44.0360166 40.9800834,43.8400214 40.5900283,43.4480311 L31.9900014,34.8219862 L23.3620213,43.3580432 C22.9720737,43.7420776 22.4639699,43.9360301 21.9559737,43.9360301 C21.4400215,43.9360301 20.9260046,43.7379922 20.5340143,43.3420239 C19.7579895,42.5560005 19.7640102,41.2919768 20.5500336,40.5140169 L29.1680151,31.9900013 L20.5819648,23.3759978 C19.8019621,22.5939524 19.8040049,21.3279935 20.5859428,20.5479908 C21.3679882,19.7659454 22.6319043,19.7700309 23.4139498,20.5519687 L32.0119339,29.1759709 L40.639914,20.6400214 C41.4238946,19.8620614 42.6918962,19.8700173 43.467921,20.6560407 C44.2458809,21.4420641 44.2379251,22.708023 43.4519016,23.4840477 L34.8340277,32.0079559 L43.4220132,40.6240021 Z" id="形状" fill="#DDDDDD"></path>
</g>
</g>
</g>
</svg>
</template> </template>
</n-button> </n-button>
</n-form-item> </n-form-item>
@ -340,10 +400,10 @@ defineExpose({
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> <n-button style="background-color: #507AFD;" type="info" @click="handleSumbit">
</n-button> </n-button>
<n-button secondary style="margin-left:15px" @click="closeModal"> <n-button secondary style="margin-left: 15px;background-color: #ffffff;border: 1px solid #cad2dd;color: #333333;" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
@ -400,7 +460,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;
@ -410,4 +470,11 @@ defineExpose({
} }
} }
} }
/*j */
// ::v-deep(.n-input .n-input-wrapper) {
// padding-left: 0;
// }
::v-deep(.n-input__suffix){
margin-right: -8px;
}
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineOptions, ref } from 'vue'; import { defineOptions, onMounted, ref, onBeforeUnmount } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
defineOptions({ name: 'ShortcutModal' }) defineOptions({ name: 'ShortcutModal' })
@ -36,7 +36,17 @@ function cancel() {
closeModal() closeModal()
emit('cancel', true) emit('cancel', true)
} }
const time = ref();
onMounted(() => {
time.value = setInterval(() => {
// console.log("00000000-----------");
show.value && refresh();
}, 5000);
});
onBeforeUnmount(() => {
clearInterval(time.value);
time.value = null;
});
defineExpose({ defineExpose({
showModal, showModal,
closeModal closeModal
@ -44,14 +54,16 @@ defineExpose({
</script> </script>
<template> <template>
<div> <div class="removeMask">
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;"> <!-- <n-modal v-model:show="show" :show-mask="false" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;"> -->
<div v-if="show" style="position: fixed;right: 0;bottom: 0; float: left; z-index: 999;" >
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true" style="padding: 8px 8px 0 8px;"> <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true" style="padding: 8px 8px 0 8px;">
<div class="wrapper"> <div class="wrapper">
<div class="title">查重进度</div> <div class="title">查重进度</div>
<div class="icon-list"> <div class="icon-list">
<svg-icon size="20" name="refresh" @click="refresh" style="margin-right: 16px;cursor: pointer;" /> <svg-icon size="20" name="refresh" @click="refresh" style="margin-right: 16px;cursor: pointer;" />
<svg-icon size="20" name="fold" style="margin-right: 16px;cursor: pointer;" @click="toggle"/> <svg-icon v-show="!isFold" size="20" name="down-line" style="margin-right: 16px;cursor: pointer;" @click="toggle"/>
<svg-icon v-show="isFold" size="20" name="top-line" style="margin-right: 16px;cursor: pointer;" @click="toggle"/>
<svg-icon size="20" name="close-none-border" @click="cancel" style="margin-right: 16px;cursor: pointer;"/> <svg-icon size="20" name="close-none-border" @click="cancel" style="margin-right: 16px;cursor: pointer;"/>
</div> </div>
</div> </div>
@ -62,7 +74,8 @@ defineExpose({
</div> </div>
</div> </div>
</n-card> </n-card>
</n-modal> </div>
<!-- </n-modal> -->
</div> </div>
</template> </template>
@ -89,4 +102,9 @@ defineExpose({
font-size: 14px; font-size: 14px;
line-height: 54px; line-height: 54px;
} }
.removeMask {
::v-deep(.n-modal-mask) {
display: none !important;
}
}
</style> </style>

@ -4,6 +4,13 @@ import { useRouter } from 'vue-router';
defineOptions({ name: 'ShortcutModal' }) defineOptions({ name: 'ShortcutModal' })
const props = defineProps({
id: {
type: String,
default: '',
},
});
const show = ref(false) const show = ref(false)
const router = useRouter() const router = useRouter()
@ -19,8 +26,16 @@ function showModal() {
function closeModal(path) { function closeModal(path) {
show.value = false show.value = false
if(props.id) {
router.push(path + '?id=' + props.id)
}else {
router.push(path) router.push(path)
} }
}
function closeIconModal() {
show.value = false
}
defineExpose({ defineExpose({
showModal, showModal,
@ -28,8 +43,8 @@ defineExpose({
</script> </script>
<template> <template>
<div> <div class="finish-package-modal" v-if="show">
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center" style="padding: 8px;"> <!-- <n-modal v-model:show="show" :mask-closable="false" transform-origin="center" style="padding: 8px;">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true"> <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div style="display: flex;"> <div style="display: flex;">
<div><svg-icon size="80" name="robot2" /></div> <div><svg-icon size="80" name="robot2" /></div>
@ -50,14 +65,56 @@ defineExpose({
</div> </div>
</template> </template>
</n-card> </n-card>
</n-modal> </n-modal> -->
<div class="header-box">
<div class="robot-box"><svg-icon size="80" name="robot-two" /></div>
<div class="text-box">
<div class="msg-title">生成成功提示</div>
<div class="msg-text">AI助手已根据您的配置要求生成任务包</div>
</div>
<div class="close-box" @click="closeIconModal">
<svg-icon size="30" name="close-none-border" />
</div>
</div>
<div class="wrapper-footer">
<div @click="closeModal('/worksheet')">
<svg-icon size="65" name="ai-approve" />
<div class="footer-text">
图审审批
</div>
</div>
<div @click="closeModal('/task')">
<svg-icon size="65" name="ai-order" />
<div class="footer-text">
任务审批
</div>
</div>
</div>
</div> </div>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.finish-package-modal {
position: fixed;
width: 424px;
height: 250px;
top: 50%;
left: 50%;
margin-left: -200px;
margin-top: -150px;
background: linear-gradient(to right, #fff, #f0f3ff, #e4e9ff);
opacity: 0.95;
border-radius: 5px;
z-index: 99999;
}
.wrapper-footer { .wrapper-footer {
margin-top: -20px; margin-top: 10px;
text-align: right; display: flex;
justify-content: space-around;
>div {
cursor: pointer;
}
} }
.msg-title { .msg-title {
@ -79,4 +136,37 @@ defineExpose({
line-height: 22px; line-height: 22px;
} }
.header-box {
margin-top: 20px;
display: flex;
justify-content: space-between;
}
.robot-box {
margin-left: 10px;
margin-right: 20px;
}
.msg-title {
color: #333333;
font-weight: bold;
}
.msg-text {
color: #666666;
}
.close-box {
margin-right: 20px;
cursor: pointer;
}
.text-box {
margin-right: auto;
}
.footer-text {
font-size: 18px;
color: #507AFD;
}
</style> </style>

@ -0,0 +1,82 @@
<script lang="ts" setup>
import { defineOptions, ref } from 'vue';
import { useRouter } from 'vue-router';
defineOptions({ name: 'ShortcutModal' })
const show = ref(false)
const router = useRouter()
const cardStyle = {
'width': '29vw',
'--n-padding-bottom': '10px',
'--n-padding-left': '10px',
}
function showModal() {
show.value = true
}
function closeModal(path) {
show.value = false
router.push(path)
}
defineExpose({
showModal,
})
</script>
<template>
<div>
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center" style="padding: 8px;">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div style="display: flex;">
<div><svg-icon size="80" name="robot2" /></div>
<div style="height: 130px;text-align: center;margin-left: 20px;">
<div class="msg-title">生成任务提示</div>
<div class="msg-text">AI已根据您的配置要求生成任务包</div>
</div>
</div>
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="closeModal('/worksheet')">
进入AI工单
</n-button>
<n-button style="margin-left:10px;color: #666666;" @click="closeModal('/task')">
进入任务审批
</n-button>
</div>
</template>
</n-card>
</n-modal>
</div>
</template>
<style lang="less" scoped>
.wrapper-footer {
margin-top: -20px;
text-align: right;
}
.msg-title {
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: Medium;
text-align: left;
color: #333333;
line-height: 24px;
margin: 12px 0;
}
.msg-text {
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
text-align: left;
color: #666666;
line-height: 22px;
}
</style>

@ -13,7 +13,7 @@ const toolsData = ref({} as any);
async function getData(){ async function getData(){
const res=await getToolsCount(); const res=await getToolsCount();
toolsData.value=res.data || {}; toolsData.value=res.data || {};
if(!JSON.parse(res.message)){ if(res.code == 'OK'){
showModal(); showModal();
} }
} }
@ -58,7 +58,7 @@ defineExpose({
<div class="flex_box" style="height: 100px"> <div class="flex_box" style="height: 100px">
<div class="item"> <div class="item">
<SvgIcon name="task_count" width="80" height="96" /> <SvgIcon name="task_count" width="80" height="96" />
<div class="num_box">{{ toolsData?.taskTotal || 0 }}</div> <div class="num_box">{{ toolsData?.total || 0 }}</div>
<div class="title_box">任务总数</div> <div class="title_box">任务总数</div>
</div> </div>
<div class="item"> <div class="item">
@ -68,7 +68,7 @@ defineExpose({
</div> </div>
<div class="item"> <div class="item">
<SvgIcon name="task_over" width="80" height="96" /> <SvgIcon name="task_over" width="80" height="96" />
<div class="num_box">{{ toolsData?.approved || 0 }}</div> <div class="num_box">{{ toolsData?.approvedCount || 0 }}</div>
<div class="title_box">已审批</div> <div class="title_box">已审批</div>
</div> </div>
</div> </div>

@ -80,23 +80,23 @@ function afterLeave() {
<span :style="{ 'margin-left': '18px' }">基本信息</span> <span :style="{ 'margin-left': '18px' }">基本信息</span>
</div> </div>
</div> </div>
<n-form ref="formRef" :model="model" style="margin-top: 8px;" :rules="rules"> <n-form ref="formRef" :model="model" require-mark-placement="left" style="margin-top: 8px;" :rules="rules">
<n-form-item path="packagename" label="任务包名称"> <n-form-item class="wrapper-task-package-name" path="packagename" label="任务包名称">
<n-input v-model:value="model.packagename" max="12" @keydown.enter.prevent /> <n-input v-model:value="model.packagename" maxlength="12" @keydown.enter.prevent />
</n-form-item> </n-form-item>
<n-form-item path="mark" :style="formItemStyle"> <!-- <n-form-item path="mark" :style="formItemStyle">
<n-checkbox v-model:checked="model.mark" > <n-checkbox v-model:checked="model.mark" >
是否给重复图片加重复标识 是否给重复图片加重复标识
</n-checkbox> </n-checkbox>
</n-form-item> </n-form-item> -->
</n-form> </n-form>
</div> </div>
<template #footer> <template #footer>
<div class="wrapper-footer"> <div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> <n-button style="background-color: #507AFD !important;" type="info" @click="handleSumbit">
生成任务包 生成任务包
</n-button> </n-button>
<n-button secondary style="margin-left:15px" @click="closeModal"> <n-button secondary style="margin-left:15px;color: #333;background-color: #fff;border: 1px solid #CAD2DD;" @click="closeModal">
取消 取消
</n-button> </n-button>
</div> </div>
@ -113,12 +113,16 @@ function afterLeave() {
&-title { &-title {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
color: #333;
} }
&-bar { &-bar {
background-color: #e8e8e8; background-color: #f8f8f8;
width: 100%; width: 100%;
margin-top: 20px; margin-top: 20px;
span {
color: #333;
}
} }
&-form { &-form {
@ -127,6 +131,12 @@ function afterLeave() {
margin-top: 20px; margin-top: 20px;
} }
&-task-package-name {
::v-deep(.n-form-item-label) {
color: #666;
}
}
&-new { &-new {
display: flex; display: flex;
width: 110px; width: 110px;

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from 'vue';
import { useConfig } from '@/store/modules/asideConfig'
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'closeCallback', value: any), (e: 'closeCallback', value: any),
@ -11,8 +11,8 @@ const show = ref(false)
const stys = { const stys = {
'width': '424px', 'width': '424px',
'height': '192px', 'height': '232px',
'--n-padding-bottom': '0px', '--n-padding-bottom': '20px',
'--n-padding-left': '0px', '--n-padding-left': '0px',
'background': 'linear-gradient(132deg, rgba(255, 255, 255, 0.32) 21%, rgba(152, 172, 255, 0.14) 100%)', 'background': 'linear-gradient(132deg, rgba(255, 255, 255, 0.32) 21%, rgba(152, 172, 255, 0.14) 100%)',
'border-radius': '4px', 'border-radius': '4px',
@ -29,23 +29,36 @@ function closeModal() {
emit('closeCallback', true) emit('closeCallback', true)
} }
function closeOnlyModal() {
show.value = false
}
defineExpose({ defineExpose({
showModal, showModal,
closeModal, closeModal,
closeOnlyModal,
}) })
const configStore = useConfig()
const percent = ref(0);
configStore.$subscribe(() => {
percent.value = configStore.getTimeNum;
});
</script> </script>
<template> <template>
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center"> <n-modal v-model:show="show" :mask-closable="false" :show-mask="false" transform-origin="center">
<n-card :style="stys" :bordered="false" role="dialog" aria-modal="true"> <n-card :style="stys" :bordered="false" role="dialog" aria-modal="true">
<svg-icon size="15" name="close" @click="closeModal" style="position:absolute; right:6px;top:6px;cursor: pointer;"/> <svg-icon size="15" name="close" @click="closeModal" style="position:absolute; right:6px;top:6px;cursor: pointer;"/>
<div class="wrapper"> <div class="wrapper">
<svg-icon size="90" name="robot2" /> <svg-icon size="90" name="robot2" />
<span style="margin-top: 24px;">正在查重中</span> <span style="margin-top: 24px;">正在查重中</span>
</div> </div>
<div style="padding: 0 20px;">
<n-progress type="line" :percentage="percent" :show-indicator="false"/>
</div>
</n-card> </n-card>
</n-modal> </n-modal>
</template> </template>

@ -50,14 +50,86 @@ const formSure: FormSure = reactive({
loginname: "13311111111", loginname: "13311111111",
}); });
const tab = ref(0); const tab = ref(0);
const loginSuccess = ref(true);
const loginRejectMessge = ref("");
const countTime = ref("获取验证码"); const countTime = ref("获取验证码");
const rules = { const rules = {
enterprisecode: { required: true, message: "请输入企业编码", trigger: "blur" }, enterprisecode: [
agentcode: { required: true, message: "请输入企业编码", trigger: "blur" }, { required: true, message: "请输入企业编码", trigger: "blur" },
loginname: { required: true, message: "请输入用户名", trigger: "blur" }, {
phone: { required: true, message: "请输入手机号", trigger: "blur" }, trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value || !value) {
return true;
}
if (loginRejectMessge.value.indexOf("企业") > -1) {
return new Error(loginRejectMessge.value);
}
},
},
],
agentcode: [
{ required: true, message: "请输入企业编码", trigger: "blur" },
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value || !value) {
return true;
}
if (loginRejectMessge.value.indexOf("企业") > -1) {
return new Error(loginRejectMessge.value);
}
},
},
],
loginname: [
{ required: true, message: "请输入用户名", trigger: "blur" },
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value || !value) {
return true;
}
if (loginRejectMessge.value.indexOf("用户名") > -1||loginRejectMessge.value.indexOf("账号") > -1) {
return new Error(loginRejectMessge.value);
}
},
},
],
phone: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value || !value) {
return true;
}
if (loginRejectMessge.value.indexOf("手机号") > -1) {
return new Error(loginRejectMessge.value);
}
},
},
],
password: { required: true, message: "请输入密码", trigger: "blur" }, password: { required: true, message: "请输入密码", trigger: "blur" },
phonecode: { required: true, message: "请输入验证码", trigger: "blur" }, phonecode: [
{ required: true, message: "请输入验证码", trigger: "blur" },
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value || !value) {
return true;
}
if (loginRejectMessge.value.indexOf("验证码") > -1) {
return new Error(loginRejectMessge.value);
}
},
},
],
newPassword: { required: true, message: "请输入新密码", trigger: "blur" }, newPassword: { required: true, message: "请输入新密码", trigger: "blur" },
rePasswrod: [ rePasswrod: [
{ {
@ -74,30 +146,41 @@ const rules = {
}; };
function validatePasswordSame(rule: any, value: string): boolean { function validatePasswordSame(rule: any, value: string): boolean {
return value === formSure.newPassword; if (Boolean(formSure.rePasswrod)) {
if (value == formSure.newPassword) {
return true;
} else {
return false;
}
} else {
return true;
}
} }
function handleSubmit(e) { function handleSubmit(e) {
e.preventDefault(); e.preventDefault();
loginSuccess.value = true;
formRef.value.validate(async (errors) => { formRef.value.validate(async (errors) => {
if (!errors) { if (!errors) {
const { loginname, phone, phonecode, agentcode } = formForget; const { loginname, phone, phonecode, agentcode } = formForget;
loading.value = true; loading.value = true;
const params = { const params = {
loginname, loginname,
phone, phone,
phonecode, phonecode,
agentcode, agentcode,
}; };
try { try {
const res = await forgetPassword(params); const res = await forgetPassword(params);
if (res.code === "OK") { if (res.code === "OK") {
loginSuccess.value = true;
formSure.loginname = res.data?.loginname; formSure.loginname = res.data?.loginname;
tab.value = 1; tab.value = 1;
} else { } else {
loginSuccess.value = false;
message.error(res.message); message.error(res.message);
loginRejectMessge.value = res.message;
formRef.value.validate();
} }
} finally { } finally {
loading.value = false; loading.value = false;
@ -145,7 +228,7 @@ function switchTab(type: number) {
} }
function computedForm() { function computedForm() {
return !formInline.enterprisecode || !formInline.username || !formInline.password; return !formForget.phonecode || !formForget.phone || !formForget.loginname || !formForget.agentcode;
} }
function computedFormSure() { function computedFormSure() {
@ -154,6 +237,9 @@ function computedFormSure() {
async function sendCode(value) { async function sendCode(value) {
if (!flag.value) return; if (!flag.value) return;
flag.value = false; flag.value = false;
if(!(formForget.phone.length == 11)){
return
}
const res = await getCode({ const res = await getCode({
phone: formForget.phone, phone: formForget.phone,
agentcode: formForget.agentcode, agentcode: formForget.agentcode,

@ -152,7 +152,6 @@ const rules = {
function handleSubmit(e) { function handleSubmit(e) {
e.preventDefault(); e.preventDefault();
console.log(formRef.value,'formRef')
loginSuccess.value = true; loginSuccess.value = true;
formRef.value.validate(async (errors) => { formRef.value.validate(async (errors) => {
if (!errors) { if (!errors) {
@ -165,7 +164,6 @@ function handleSubmit(e) {
codetoken: userStore.getCapToken, codetoken: userStore.getCapToken,
agentcode: enterprisecode, agentcode: enterprisecode,
}; };
try { try {
const { code, message: msg } = await userStore.login(params); const { code, message: msg } = await userStore.login(params);
loginRejectMessge.value = msg; loginRejectMessge.value = msg;
@ -177,11 +175,18 @@ function handleSubmit(e) {
localStorage.removeItem("LOGIN_FORM_PASS"); localStorage.removeItem("LOGIN_FORM_PASS");
} }
loginSuccess.value = true; loginSuccess.value = true;
await userStore.getInformation(); const { data: userInfo } = await userStore.getInformation();
message.destroyAll(); message.destroyAll();
const toPath = decodeURIComponent((route.query?.redirect || "/") as string); const toPath = decodeURIComponent((route.query?.redirect || "/") as string);
if (route.name === LOGIN_NAME)
if (userInfo.frontmenuTList && userInfo.frontmenuTList.length) {
message.success("登录成功,即将进入系统"); message.success("登录成功,即将进入系统");
if (route.name === LOGIN_NAME) router.replace("/"); router.replace(
userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/"
);
} else {
message.error("用户无菜单权限,请联系管理员");
}
else router.replace(toPath); else router.replace(toPath);
} else { } else {
loginSuccess.value = false; loginSuccess.value = false;
@ -245,12 +250,21 @@ function handleSmsSubmit(e) {
loginSuccess.value = true; loginSuccess.value = true;
// const { code, message: msg } = await userStore.login(params) // const { code, message: msg } = await userStore.login(params)
await userStore.setStorageToken(res.data); await userStore.setStorageToken(res.data);
await userStore.getInformation(); const { data: userInfo } = await userStore.getInformation();
message.destroyAll(); message.destroyAll();
const toPath = decodeURIComponent((route.query?.redirect || "/") as string); const toPath = decodeURIComponent((route.query?.redirect || "/") as string);
if (route.name === LOGIN_NAME) {
if (userInfo.frontmenuTList && userInfo.frontmenuTList.length) {
message.success("登录成功,即将进入系统"); message.success("登录成功,即将进入系统");
if (route.name === LOGIN_NAME) router.replace("/"); router.replace(
else router.replace(toPath); userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/"
);
} else {
message.error("用户无菜单权限,请联系管理员");
}
} else {
router.replace(toPath);
}
} else { } else {
message.destroyAll(); message.destroyAll();
message.info(msg || "登录失败"); message.info(msg || "登录失败");
@ -296,7 +310,11 @@ async function sendCode(value) {
phone: formSms.phone, phone: formSms.phone,
agentcode: formSms.agentcode, agentcode: formSms.agentcode,
}); });
if (res.code == "OK") {
startCount(); startCount();
} else {
message.error(res.message);
}
} }
function startCount() { function startCount() {

@ -62,7 +62,7 @@ function close() {
</div> </div>
<div class="text">企业级 SaaS 智能审批解决方案</div> <div class="text">企业级 SaaS 智能审批解决方案</div>
<img class="img-icon-2" src="../../assets/images/login/img-icon-2.png" alt="" /> <img class="img-icon-2" src="../../assets/images/login/img-icon-2.png" alt="" />
<div class="btn-login-2 f-c-c" @click="showLogin"> -></div> <div class="flex btn-login-2 f-c-c" @click="showLogin"> <SvgIcon name="right_arrow" class="right_arrow"/></div>
<div class="item-wrap f-c"> <div class="item-wrap f-c">
<div class="item"> <div class="item">
<img class="item-img" src="../../assets/images/login/item-1.png" alt="" /> <img class="item-img" src="../../assets/images/login/item-1.png" alt="" />
@ -300,5 +300,9 @@ function close() {
color: #FF4E4F !important; color: #FF4E4F !important;
font-size: .75rem !important; font-size: .75rem !important;
} }
.right_arrow{
height: 1.25rem !important;
width: 1.25rem !important;
margin-top: .2rem;
}
</style> </style>

@ -40,12 +40,32 @@ const { list, tabList } = toRefs(state)
const tab = ref(1) const tab = ref(1)
async function getList() { async function getList(type = '') {
const res = await getMessageList({ let res = await getMessageList({
pageNo: state.pageNo, pageNo: state.pageNo,
pageSize: '7', pageSize: '7',
msgCategory: tab.value, msgCategory: tab.value,
}) })
if (type == 'more') {
while (res.data.endRow > 0) {
if (res.code == 'OK') {
if (tab.value === 1) {
res.data.list.forEach((item) => {
item.tag = JSON.parse(item.busJson)
})
}
state.list = state.list.concat(res.data.list)
state.pageNo++
res = await getMessageList({
pageNo: state.pageNo,
pageSize: '7',
msgCategory: tab.value,
})
}
}
hasNextPage.value = res.data.hasNextPage
}
else {
if (res.code === 'OK') { if (res.code === 'OK') {
hasNextPage.value = res.data.hasNextPage hasNextPage.value = res.data.hasNextPage
if (tab.value === 1) { if (tab.value === 1) {
@ -53,10 +73,10 @@ async function getList() {
item.tag = JSON.parse(item.busJson) item.tag = JSON.parse(item.busJson)
}) })
} }
console.log(res.data.list)
state.list = state.list.concat(res.data.list) state.list = state.list.concat(res.data.list)
} }
} }
}
getList() getList()
@ -78,7 +98,10 @@ function switchTab(type: number) {
function goFinalDetail(row) { function goFinalDetail(row) {
console.log(row) console.log(row)
router.push({ name: 'final-detail', query: { id: row.tag.taskId, packageid: row.packageid } }) router.push({
name: 'final-detail',
query: { id: row.tag.fromId, packageid: row.packageid },
})
} }
function goDetail(item) { function goDetail(item) {
@ -86,9 +109,10 @@ function goDetail(item) {
clearMsgOne(item.id) clearMsgOne(item.id)
goFinalDetail(item) goFinalDetail(item)
} }
else
// emit('goDetail', item.id) // emit('goDetail', item.id)
{ router.push({ name: 'message-detail', query: { id: item.id } }) } else {
router.push({ name: 'message-detail', query: { id: item.id } })
}
} }
async function clearMsgOne(id) { async function clearMsgOne(id) {
@ -97,7 +121,7 @@ async function clearMsgOne(id) {
function getMore() { function getMore() {
state.pageNo += 1 state.pageNo += 1
getList() getList('more')
} }
</script> </script>
@ -115,31 +139,45 @@ function getMore() {
<div class="content"> <div class="content">
<div class="slider"> <div class="slider">
<div <div
v-for="(item) in tabList" v-for="item in tabList"
:key="item.value" :key="item.value"
:class="{ 'item-active': tab === item.value }" :class="{ 'item-active': tab === item.value }"
class="flex item" class="flex item"
@click="switchTab(item.value)" @click="switchTab(item.value)"
> >
<div class="flex item-left align-center"> <div class="flex item-left align-center">
<img class="icon" :src="tab === item.value ? item.activeIcon : item.icon" alt=""> <img
class="icon"
:src="tab === item.value ? item.activeIcon : item.icon"
alt=""
>
<div :class="{ 'text-active': tab === item.value }" class="text"> <div :class="{ 'text-active': tab === item.value }" class="text">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
<img class="icon-arrow" :src="tab === item.value ? iconArrowActive : iconArrow" alt=""> <img
class="icon-arrow"
:src="tab === item.value ? iconArrowActive : iconArrow"
alt=""
>
<div v-if="tab === item.value" class="line" /> <div v-if="tab === item.value" class="line" />
</div> </div>
</div> </div>
<div class="list"> <div class="list">
<div v-for="(item, index) in list" :key="item.id" :class="{ 'pt0': index === 0, 'item-disabled': item.readFlag }" class="item" @click="goDetail(item)"> <div
v-for="(item, index) in list"
:key="item.id"
:class="{ 'pt0': index === 0, 'item-disabled': item.readFlag }"
class="item"
@click="goDetail(item)"
>
<div class="left"> <div class="left">
<div class="num"> <div class="num">
{{ format(item.sendTime, 'dd') }} {{ format(item.sendTime, "dd") }}
<div v-if="!item.readFlag" class="point" /> <div v-if="!item.readFlag" class="point" />
</div> </div>
<div class="date"> <div class="date">
{{ format(item.sendTime, 'yyyy-MM') }} {{ format(item.sendTime, "yyyy-MM") }}
</div> </div>
</div> </div>
<div class="middle"> <div class="middle">
@ -159,11 +197,11 @@ function getMore() {
</div> </div>
<div v-if="tab === 1" class="subtitle"> <div v-if="tab === 1" class="subtitle">
<span class="name">{{ item.tag.sendUserName }}</span> <span class="name">{{ item.tag.sendUserName }}</span>
<span class="time">{{ format(item.sendTime, 'yyyy-MM-dd HH:mm:ss') }}</span> <span class="time">{{ format(item.sendTime, "yyyy-MM-dd HH:mm:ss") }}</span>
</div> </div>
<div v-else class="subtitle"> <div v-else class="subtitle">
<span class="name">{{ item.userName }}</span> <span class="name">{{ item.userName }}</span>
<span class="time">{{ format(item.sendTime, 'yyyy-MM-dd HH:mm:ss') }}</span> <span class="time">{{ format(item.sendTime, "yyyy-MM-dd HH:mm:ss") }}</span>
</div> </div>
</div> </div>
<div class="look"> <div class="look">
@ -185,7 +223,7 @@ function getMore() {
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
background: #FFF; background: #fff;
border-radius: 3px; border-radius: 3px;
height: calc(100vh - 88px); height: calc(100vh - 88px);
position: relative; position: relative;
@ -241,7 +279,7 @@ function getMore() {
justify-content: space-between; justify-content: space-between;
cursor: pointer; cursor: pointer;
&-active { &-active {
background: rgba(80,122,253,.1); background: rgba(80, 122, 253, 0.1);
} }
} }
@ -256,7 +294,7 @@ function getMore() {
color: #333333; color: #333333;
margin-left: 12px; margin-left: 12px;
&-active { &-active {
color: #507AFD; color: #507afd;
} }
} }
@ -385,18 +423,18 @@ function getMore() {
} }
.tag-blue { .tag-blue {
background: rgba(80,122,253,0.10); background: rgba(80, 122, 253, 0.1);
color: #507afd; color: #507afd;
} }
.tag-red { .tag-red {
color: #ff4e4f; color: #ff4e4f;
background: rgba(255,78,79,0.10); background: rgba(255, 78, 79, 0.1);
} }
.tag-green { .tag-green {
color: #3EE199; color: #3ee199;
background: rgba(62,225,153,0.10); background: rgba(62, 225, 153, 0.1);
} }
.title { .title {
@ -430,7 +468,6 @@ function getMore() {
cursor: pointer; cursor: pointer;
} }
} }
} }
} }

@ -1,29 +1,34 @@
<script lang="ts" setup> <script lang="ts" setup>
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import { computed, inject, onMounted, ref, shallowRef, unref, watch } from 'vue' import {
computed,
inject,
onBeforeMount,
onMounted,
ref,
shallowRef,
unref,
watch,
} from 'vue'
import CustomFieldModal from '../modal/CustomFieldModal.vue' import CustomFieldModal from '../modal/CustomFieldModal.vue'
import AdvanceFilter from '../../home/aside/comp/AdvanceFilter.vue' import AdvanceFilter from '../../home/aside/comp/AdvanceFilter.vue'
import { import { FilterModalVue } from '../../home/aside/comp/modals'
FilterModalVue, import NewFilterModalVue from '../modal/NewFilterModal.vue'
NewFilterModalVue,
} from '../../home/aside/comp/modals'
import TaskList from './TaskList.vue' import TaskList from './TaskList.vue'
import type { AsideEntity } from '@/config/aside' import type { AsideEntity } from '@/config/aside'
import { useUser } from '@/store/modules/user' import { useUser } from '@/store/modules/user'
import { getAllfieldList, getfieldList } from '@/api/home/filter' import { getAllfieldList, getfieldList } from '@/api/home/filter'
import { useTaskStore } from '@/store/modules/task' import { useTaskStore } from '@/store/modules/task'
import emitter from '@/utils/mitt' import emitter from '@/utils/mitt'
import { useConfig } from '@/store/modules/asideConfig'
const CustomFieldModalRef = ref(null) const CustomFieldModalRef = ref(null)
const collapse = ref(false) const collapse = ref(false)
const taskStore = useTaskStore() const taskStore = useTaskStore()
const taskListRef = ref<HTMLDivElement | null>(null) const taskListRef: any = ref(null)
// //
const showFieldList = ref<any[]>([]) const showFieldList = ref<any[]>([])
const search = ref('')
function collapseHandler() { function collapseHandler() {
collapse.value = !collapse.value collapse.value = !collapse.value
} }
@ -64,6 +69,10 @@ function showFilter() {
const showSearch = ref(false) const showSearch = ref(false)
function setShowSearch(value: boolean) { function setShowSearch(value: boolean) {
if (!value) {
search.value = ''
taskListRef.value.search('')
}
showSearch.value = value showSearch.value = value
} }
@ -87,8 +96,8 @@ async function getshowFieldList() {
* fix 是否默认 * fix 是否默认
* checked 是否选中 * checked 是否选中
*/ */
if (useList.userFieldFixed) { if (useList?.userFieldFixed) {
useList.userFieldFixed?.split(',').map((v) => { useList?.userFieldFixed?.split(',').map((v) => {
let item = allList.find(v2 => v2.name == v) let item = allList.find(v2 => v2.name == v)
if (item) { if (item) {
item = { item = {
@ -103,7 +112,7 @@ async function getshowFieldList() {
} }
else { else {
// //
allList.map((v) => { allList?.map((v) => {
if (v.isrequired == 2) { if (v.isrequired == 2) {
const item = { const item = {
name: v.fieldDesc, name: v.fieldDesc,
@ -136,7 +145,7 @@ function showModal(modalRef: any) {
} }
// //
const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([]) const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([])
const filterModalRef = ref(null) const filterModalRef: any = ref(null)
const newFilterModalRef = ref(null) const newFilterModalRef = ref(null)
const customModalRef = ref(null) const customModalRef = ref(null)
function editFilter(filter: any) { function editFilter(filter: any) {
@ -144,6 +153,24 @@ function editFilter(filter: any) {
modal.showModal() modal.showModal()
modal.edit(filter) modal.edit(filter)
} }
const configStore = useConfig()
function newFilterOk() {
filterModalRef.value.query(
filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize,
)
}
onBeforeMount(async () => {
configStore.fetchConfig()
configStore.fetchCustomConfig()
})
function setAsideItemName(text) {
taskListRef.value.setStatusName(text)
}
defineExpose({
setAsideItemName,
})
</script> </script>
<template> <template>
@ -158,7 +185,8 @@ function editFilter(filter: any) {
<SvgIcon :name="collapseIcon" size="40" /> <SvgIcon :name="collapseIcon" size="40" />
</div> </div>
</div> </div>
<div class="aside-header">
<div class="aside-header" :style="`display:${asideWidth == 0?'none':''}`" >
<!-- <div v-show="!showSearch" class="warpper"> <!-- <div v-show="!showSearch" class="warpper">
<div class="left"> <div class="left">
<svg-icon name="all-worksheet" size="32" /> <svg-icon name="all-worksheet" size="32" />
@ -191,6 +219,7 @@ function editFilter(filter: any) {
<div v-show="showSearch" class="warpper"> <div v-show="showSearch" class="warpper">
<n-input <n-input
v-model:value="search"
style="flex: 1; height: 32px" style="flex: 1; height: 32px"
placeholder="请输入你需要搜索的内容" placeholder="请输入你需要搜索的内容"
@input="inputHandler" @input="inputHandler"
@ -221,11 +250,12 @@ function editFilter(filter: any) {
<!-- 过滤列表 --> <!-- 过滤列表 -->
<FilterModalVue <FilterModalVue
ref="filterModalRef" ref="filterModalRef"
:type="2"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" /> <NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" />
</div> </div>
</template> </template>

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

Loading…
Cancel
Save