Merge branch 'main' into jie

pull/1/head
lizijiee 2 years ago
commit e31ff5a985

5
components.d.ts vendored

@ -21,6 +21,7 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']
NGi: typeof import('naive-ui')['NGi']
@ -40,7 +41,11 @@ declare module 'vue' {
NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
NTimeline: typeof import('naive-ui')['NTimeline']
NTimelineItem: typeof import('naive-ui')['NTimelineItem']
NTooltip: typeof import('naive-ui')['NTooltip']
NUpload: typeof import('naive-ui')['NUpload']
NUploadDragger: typeof import('naive-ui')['NUploadDragger']

@ -1,3 +1,32 @@
diff --git a/node_modules/naive-ui/es/form/src/FormItem.mjs b/node_modules/naive-ui/es/form/src/FormItem.mjs
index 3aacec9..a63ab54 100644
--- a/node_modules/naive-ui/es/form/src/FormItem.mjs
+++ b/node_modules/naive-ui/es/form/src/FormItem.mjs
@@ -73,8 +73,8 @@ function wrapValidator(validator, async) {
try {
const validateResult = validator(...args);
if (!async && (typeof validateResult === 'boolean' || validateResult instanceof Error || Array.isArray(validateResult)) || (
- // Error[]
- validateResult === null || validateResult === void 0 ? void 0 : validateResult.then)) {
+ // Error[]
+ validateResult === null || validateResult === void 0 ? void 0 : validateResult.then)) {
return validateResult;
} else if (validateResult === undefined) {
return true;
@@ -479,8 +479,11 @@ export default defineComponent({
class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning`
}, feedbackNodes) : mergedValidationStatus === 'error' ? h("div", {
key: "controlled-error",
- class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error`
- }, feedbackNodes) : mergedValidationStatus === 'success' ? h("div", {
+ class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error flex`
+ }, [h('img', {
+ style: { width: '1rem', height: '1rem' },
+ src: 'http://47.93.59.251/api/upload/ocr/1711419313955_c.png'
+ }), feedbackNodes]) : mergedValidationStatus === 'success' ? h("div", {
key: "controlled-success",
class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success`
}, feedbackNodes) : h("div", {
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
--- a/node_modules/naive-ui/es/pagination/src/Pagination.mjs
@ -11,3 +40,124 @@ index 5bd975b..e1c6ebc 100644
default:
return null;
}
diff --git a/node_modules/naive-ui/lib/form/src/FormItem.js b/node_modules/naive-ui/lib/form/src/FormItem.js
index 4f47aad..6dae078 100644
--- a/node_modules/naive-ui/lib/form/src/FormItem.js
+++ b/node_modules/naive-ui/lib/form/src/FormItem.js
@@ -24,7 +24,8 @@ const styles_1 = require("../styles");
const utils_1 = require("./utils");
const context_1 = require("./context");
const form_item_cssr_1 = __importDefault(require("./styles/form-item.cssr"));
-exports.formItemProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { label: String, labelWidth: [Number, String], labelStyle: [String, Object], labelAlign: String, labelPlacement: String, path: String, first: Boolean, rulePath: String, required: Boolean, showRequireMark: {
+exports.formItemProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
+ label: String, labelWidth: [Number, String], labelStyle: [String, Object], labelAlign: String, labelPlacement: String, path: String, first: Boolean, rulePath: String, required: Boolean, showRequireMark: {
type: Boolean,
default: undefined
}, requireMarkPlacement: String, showFeedback: {
@@ -33,7 +34,8 @@ exports.formItemProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props
}, rule: [Object, Array], size: String, ignorePathChange: Boolean, validationStatus: String, feedback: String, showLabel: {
type: Boolean,
default: undefined
- }, labelProps: Object });
+ }, labelProps: Object
+});
exports.formItemPropKeys = (0, _utils_1.keysOf)(exports.formItemProps);
// wrap sync validator
function wrapValidator(validator, async) {
@@ -175,22 +177,22 @@ exports.default = (0, vue_1.defineComponent)({
}))
.filter(shouldRuleBeApplied)
.map((rule, i) => {
- const shallowClonedRule = Object.assign({}, rule);
- if (shallowClonedRule.validator) {
- shallowClonedRule.validator = wrapValidator(shallowClonedRule.validator, false);
- }
- if (shallowClonedRule.asyncValidator) {
- shallowClonedRule.asyncValidator = wrapValidator(shallowClonedRule.asyncValidator, true);
- }
- if (shallowClonedRule.renderMessage) {
- const rendererKey = `__renderMessage__${i}`;
- originalMessageRendersMessage[rendererKey] =
- shallowClonedRule.message;
- shallowClonedRule.message = rendererKey;
- messageRenderers[rendererKey] = shallowClonedRule.renderMessage;
- }
- return shallowClonedRule;
- });
+ const shallowClonedRule = Object.assign({}, rule);
+ if (shallowClonedRule.validator) {
+ shallowClonedRule.validator = wrapValidator(shallowClonedRule.validator, false);
+ }
+ if (shallowClonedRule.asyncValidator) {
+ shallowClonedRule.asyncValidator = wrapValidator(shallowClonedRule.asyncValidator, true);
+ }
+ if (shallowClonedRule.renderMessage) {
+ const rendererKey = `__renderMessage__${i}`;
+ originalMessageRendersMessage[rendererKey] =
+ shallowClonedRule.message;
+ shallowClonedRule.message = rendererKey;
+ messageRenderers[rendererKey] = shallowClonedRule.renderMessage;
+ }
+ return shallowClonedRule;
+ });
const activeErrorRules = activeRules.filter((r) => r.level !== 'warning');
const activeWarningRules = activeRules.filter((r) => r.level === 'warning');
const mergedPath = path !== null && path !== void 0 ? path : '__n_no_path__';
@@ -353,31 +355,37 @@ exports.default = (0, vue_1.defineComponent)({
const textNode = ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-form-item-label__text` }, labelText));
const markNode = renderedShowRequireMark ? ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-form-item-label__asterisk` }, mergedRequireMarkPlacement !== 'left' ? '\u00A0*' : '*\u00A0')) : (mergedRequireMarkPlacement === 'right-hanging' && ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-form-item-label__asterisk-placeholder` }, '\u00A0*')));
const { labelProps } = this;
- return ((0, vue_1.h)("label", Object.assign({}, labelProps, { class: [
+ return ((0, vue_1.h)("label", Object.assign({}, labelProps, {
+ class: [
labelProps === null || labelProps === void 0 ? void 0 : labelProps.class,
`${mergedClsPrefix}-form-item-label`,
`${mergedClsPrefix}-form-item-label--${mergedRequireMarkPlacement}-mark`,
this.reverseColSpace &&
- `${mergedClsPrefix}-form-item-label--reverse-columns-space`
- ], style: this.mergedLabelStyle, ref: "labelElementRef" }), mergedRequireMarkPlacement === 'left'
+ `${mergedClsPrefix}-form-item-label--reverse-columns-space`
+ ], style: this.mergedLabelStyle, ref: "labelElementRef"
+ }), mergedRequireMarkPlacement === 'left'
? [markNode, textNode]
: [textNode, markNode]));
};
- return ((0, vue_1.h)("div", { class: [
+ return ((0, vue_1.h)("div", {
+ class: [
`${mergedClsPrefix}-form-item`,
this.themeClass,
`${mergedClsPrefix}-form-item--${this.mergedSize}-size`,
`${mergedClsPrefix}-form-item--${this.mergedLabelPlacement}-labelled`,
this.isAutoLabelWidth &&
- `${mergedClsPrefix}-form-item--auto-label-width`,
+ `${mergedClsPrefix}-form-item--auto-label-width`,
!mergedShowLabel && `${mergedClsPrefix}-form-item--no-label`
- ], style: this.cssVars },
+ ], style: this.cssVars
+ },
mergedShowLabel && renderLabel(),
- (0, vue_1.h)("div", { class: [
+ (0, vue_1.h)("div", {
+ class: [
`${mergedClsPrefix}-form-item-blank`,
this.mergedValidationStatus &&
- `${mergedClsPrefix}-form-item-blank--${this.mergedValidationStatus}`
- ] }, $slots),
+ `${mergedClsPrefix}-form-item-blank--${this.mergedValidationStatus}`
+ ]
+ }, $slots),
this.mergedShowFeedback ? ((0, vue_1.h)("div", { key: this.feedbackId, class: `${mergedClsPrefix}-form-item-feedback-wrapper` },
(0, vue_1.h)(vue_1.Transition, { name: "fade-down-transition", mode: "out-in" }, {
default: () => {
@@ -386,7 +394,9 @@ exports.default = (0, vue_1.defineComponent)({
var _a;
const { feedback } = this;
const feedbackNodes = children || feedback ? ((0, vue_1.h)("div", { key: "__feedback__", class: `${mergedClsPrefix}-form-item-feedback__line` }, children || feedback)) : this.renderExplains.length ? ((_a = this.renderExplains) === null || _a === void 0 ? void 0 : _a.map(({ key, render }) => ((0, vue_1.h)("div", { key: key, class: `${mergedClsPrefix}-form-item-feedback__line` }, render())))) : null;
- return feedbackNodes ? (mergedValidationStatus === 'warning' ? ((0, vue_1.h)("div", { key: "controlled-warning", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning` }, feedbackNodes)) : mergedValidationStatus === 'error' ? ((0, vue_1.h)("div", { key: "controlled-error", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error` }, feedbackNodes)) : mergedValidationStatus === 'success' ? ((0, vue_1.h)("div", { key: "controlled-success", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` }, feedbackNodes)) : ((0, vue_1.h)("div", { key: "controlled-default", class: `${mergedClsPrefix}-form-item-feedback` }, feedbackNodes))) : null;
+ return feedbackNodes ? (mergedValidationStatus === 'warning' ? ((0, vue_1.h)("div", { key: "controlled-warning", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning` }, feedbackNodes)) : mergedValidationStatus === 'error' ? ((0, vue_1.h)("div", { key: "controlled-error", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error flex` }, [h('img', {
+ style: { width: '1rem', height: '1rem' },src: 'http://47.93.59.251/api/upload/ocr/1711419313955_c.png'
+ }), feedbackNodes])) : mergedValidationStatus === 'success' ? ((0, vue_1.h)("div", { key: "controlled-success", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` }, feedbackNodes)) : ((0, vue_1.h)("div", { key: "controlled-default", class: `${mergedClsPrefix}-form-item-feedback` }, feedbackNodes))) : null;
});
}
}))) : null));

@ -1,8 +1,13 @@
<script lang="ts" setup>
import { dateZhCN, zhCN } from "naive-ui";
import { computed, onMounted, nextTick } from "vue";
import { computed, onMounted, nextTick,inject } from "vue";
import { AppProvider } from "@/components/Application";
import { lighten } from "@/utils/index";
import mouseTrapBind from '@/hooks/event/mouseTrapBind'
const mousetrap = inject('mousetrap') as any
onMounted(()=>{
mouseTrapBind(mousetrap);
})
const getThemeOverrides = computed(() => {
const theme = "#1980FF";

@ -23,12 +23,12 @@ export async function getRegionList(params: PageParam = { pageNo: 1, pageSize: 1
*/
export async function getPictureTypeList(): Promise<any> {
const res = await http.request({
url: `/ocr/ocrPicturetype/rootList`,
url: `/static/admin/web/distionary/bytypecode/izpicturetype`,
method: 'get',
})
const { data } = res
return data
const list = res.data[0].distionaryList
return list
}
/**

@ -30,10 +30,11 @@ export async function getFinalList(params: FinalParam) {
params: notEmptyParams,
})
const { data: { list, totalPage } } = res
const { data: { list, totalPage,totalCount } } = res
return {
pageCount: totalPage,
data: list,
totalCount
}
}

@ -17,10 +17,11 @@ export async function getConditionList(page: PageParam, searchParam: FilterSearc
},
})
const { data: { records, pages } } = res
const { data: { records, pages,total } } = res
return {
pageCount: pages,
data: records,
total
}
}

@ -75,3 +75,57 @@ export async function removeFiles(params) {
return res
}
/**
* ()
* @param packageid id
* @param taskchildpictureid id
* @param params
* @returns
*/
export async function getSimilarityList(params: any) {
const res = await http.request({
url: `/backstage/jifen/ocrtaskchildpicture/getSimilarityList`,
method: 'get',
params,
})
const { data: { records, pages, total } } = res
// 精简一下数据
const list = records.map((item) => {
return {
id: item.id,
taskId: item.taskId,
taskname: item.fromtaskname,
assignee: item.assignee,
pictureid: item.pictureid,
imgurl: item.imgUrl,
thumburl: item.imgUrl,
iztrueorfalse: item.iztrueorfalse,
states: item.states,
}
})
return {
pageCount: pages,
data: records,
total,
}
}
/**
* ()
* @param id id
* @param packageid id
* @returns
*/
export async function getTaskDetailInfo(taskId: string, packageid: string) {
const pid = packageid || 0
const res = await http.request({
url: `/backstage/jifen/ocrtaskchildpicture/getdata/${taskId}/${pid}`,
method: 'get',
})
return res.data
}

@ -1,25 +1 @@
<?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="37.3333333" height="37.3333333"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-664.000000, -4463.000000)">
<g id="切换_左" transform="translate(664.000000, 4463.000000)">
<rect id="矩形备份-2" stroke="#CFE4FF" stroke-width="2.66666667" x="1.33333333" y="1.33333333" width="61.3333333" height="61.3333333" rx="5.33333333"></rect>
<g id="箭头备份" transform="translate(32.000000, 32.000000) scale(-1, 1) rotate(-270.000000) translate(-32.000000, -32.000000) translate(13.333333, 13.333333)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g id="编组" mask="url(#mask-2)" fill="#1980FF">
<g transform="translate(4.360436, 8.660698)" id="形状结合">
<path d="M6.52026692,8.34350016 C6.53646644,8.02535456 6.66606265,7.711906 6.90905555,7.46891311 L6.90905555,7.46891311 L7.46891311,6.90905555 C7.51559647,6.86237218 7.56488031,6.81987422 7.61629834,6.78156167 L20.7250613,-6.32500477 C20.9854108,-6.5853543 21.4075208,-6.5853543 21.6678703,-6.32500477 L23.1705369,-4.82233817 C23.4308865,-4.56198864 23.4308865,-4.13987866 23.1705369,-3.87952913 L10.8682669,8.42273308 L23.1705369,20.7250613 C23.4048515,20.9593759 23.428283,21.3247164 23.2408313,21.5852362 L23.1705369,21.6678703 L21.6678703,23.1705369 C21.4075208,23.4308865 20.9854108,23.4308865 20.7250613,23.1705369 L20.7250613,23.1705369 L7.61629834,10.0639705 C7.56488031,10.0256579 7.51559647,9.98315998 7.46891311,9.93647662 L6.90905555,9.37661906 C6.66606265,9.13362617 6.53646644,8.82017761 6.52026692,8.50203201 Z" transform="translate(14.943033, 8.422766) scale(-1, -1) rotate(-90.000000) translate(-14.943033, -8.422766) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
<?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="1711414535036" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7149" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M938.672 0A85.328 85.328 0 0 1 1024 85.328v853.344A85.328 85.328 0 0 1 938.672 1024H85.328A85.328 85.328 0 0 1 0 938.672V85.328A85.328 85.328 0 0 1 85.328 0h853.344z m0 42.672H85.328a42.672 42.672 0 0 0-42.576 39.968l-0.08 2.688v853.344a42.672 42.672 0 0 0 39.968 42.576l2.688 0.08h853.344a42.672 42.672 0 0 0 42.576-39.968l0.08-2.688V85.328a42.672 42.672 0 0 0-39.968-42.576l-2.688-0.08z" fill="#CFE4FF" p-id="7150"></path><path d="M384.192 522.352c0.256 5.088 2.336 10.096 6.224 13.984l8.96 8.96c0.736 0.752 1.52 1.44 2.352 2.048L611.472 757.04a10.672 10.672 0 0 0 15.072 0l24.048-24.048a10.672 10.672 0 0 0 0-15.072L453.76 521.072 650.592 324.24a10.672 10.672 0 0 0 1.12-13.76l-1.12-1.328-24.048-24.032a10.672 10.672 0 0 0-15.072 0l-209.76 209.696c-0.8 0.624-1.6 1.296-2.352 2.048l-8.96 8.96c-3.872 3.888-5.952 8.896-6.208 13.984z" fill="#1880FF" p-id="7151"></path></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -1,25 +1 @@
<?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="37.3333333" height="37.3333333"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-928.000000, -4463.000000)">
<g id="切换_右" transform="translate(928.000000, 4463.000000)">
<g id="箭头" transform="translate(32.000000, 32.000000) rotate(-270.000000) translate(-32.000000, -32.000000) translate(13.333333, 13.333333)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g id="编组" mask="url(#mask-2)" fill="#1880FF">
<g transform="translate(4.291360, 9.809710)" id="形状结合">
<path d="M6.52026692,8.34350016 C6.53646644,8.02535456 6.66606265,7.711906 6.90905555,7.46891311 L6.90905555,7.46891311 L7.46891311,6.90905555 C7.51559647,6.86237218 7.56488031,6.81987422 7.61629834,6.78156167 L20.7250613,-6.32500477 C20.9854108,-6.5853543 21.4075208,-6.5853543 21.6678703,-6.32500477 L23.1705369,-4.82233817 C23.4308865,-4.56198864 23.4308865,-4.13987866 23.1705369,-3.87952913 L10.8682669,8.42273308 L23.1705369,20.7250613 C23.4048515,20.9593759 23.428283,21.3247164 23.2408313,21.5852362 L23.1705369,21.6678703 L21.6678703,23.1705369 C21.4075208,23.4308865 20.9854108,23.4308865 20.7250613,23.1705369 L20.7250613,23.1705369 L7.61629834,10.0639705 C7.56488031,10.0256579 7.51559647,9.98315998 7.46891311,9.93647662 L6.90905555,9.37661906 C6.66606265,9.13362617 6.53646644,8.82017761 6.52026692,8.50203201 Z" transform="translate(14.943033, 8.422766) scale(-1, -1) rotate(-90.000000) translate(-14.943033, -8.422766) "></path>
</g>
</g>
</g>
<rect id="矩形" stroke="#CFE4FF" stroke-width="2.66666667" x="1.33333333" y="1.33333333" width="61.3333333" height="61.3333333" rx="5.33333333"></rect>
</g>
</g>
</g>
</svg>
<?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="1711414527948" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6999" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M938.672 0A85.328 85.328 0 0 1 1024 85.328v853.344A85.328 85.328 0 0 1 938.672 1024H85.328A85.328 85.328 0 0 1 0 938.672V85.328A85.328 85.328 0 0 1 85.328 0h853.344z m0 42.672H85.328a42.672 42.672 0 0 0-42.576 39.968l-0.08 2.688v853.344a42.672 42.672 0 0 0 39.968 42.576l2.688 0.08h853.344a42.672 42.672 0 0 0 42.576-39.968l0.08-2.688V85.328a42.672 42.672 0 0 0-39.968-42.576l-2.688-0.08z" fill="#CFE4FF" p-id="7000"></path><path d="M653.712 522.352c-0.256 5.088-2.336 10.096-6.208 13.984l-8.96 8.96c-0.752 0.752-1.536 1.44-2.368 2.048l-209.744 209.696c-4.16 4.16-10.912 4.16-15.072 0L387.312 733.008a10.672 10.672 0 0 1 0-15.072L584.144 521.072 387.312 324.24a10.672 10.672 0 0 1-1.12-13.76l1.12-1.328 24.048-24.032a10.672 10.672 0 0 1 15.072 0l209.76 209.696c0.8 0.624 1.6 1.296 2.352 2.048l8.96 8.96c3.872 3.888 5.952 8.896 6.208 13.984z" fill="#1880FF" p-id="7001"></path></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="96px" height="96px" viewBox="0 0 96 96" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>批量审批</title>
<defs>
<rect id="path-1" x="0" y="0" width="96" height="96"></rect>
<linearGradient x1="-22.3619338%" y1="76.1321669%" x2="117.972308%" y2="50%" id="linearGradient-3">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
<filter x="-122.7%" y="-69.2%" width="345.5%" height="238.5%" filterUnits="objectBoundingBox" id="filter-4">
<feGaussianBlur stdDeviation="9.55102041" in="SourceGraphic"></feGaussianBlur>
</filter>
<linearGradient x1="14.9908397%" y1="-71.2671%" x2="47.6080819%" y2="303.1339%" id="linearGradient-5">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#F1FFF6" offset="100%"></stop>
</linearGradient>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="无法上传iconfont" transform="translate(-392.000000, -80.000000)">
<g id="批量审批" transform="translate(392.000000, 80.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="路径"></g>
<g id="Group-1822" mask="url(#mask-2)">
<g transform="translate(6.368194, 19.102041)">
<path d="M49.463055,49.6015194 L49.463055,24.323152 C49.463055,20.3860092 46.2687692,17.1917235 42.3316264,17.1917235 L39.583055,17.1917235 L39.583055,18.5713153 L39.5724427,18.645601 C39.540606,20.1843765 38.2777488,21.4260092 36.7283611,21.4260092 L19.8336672,21.4260092 L19.7699937,21.4260092 C18.220606,21.3941725 16.9789733,20.1313153 16.9789733,18.5713153 L16.9789733,17.1917235 L14.2304019,17.1917235 C10.293259,17.1917235 7.09897333,20.3860092 7.09897333,24.323152 L7.09897333,49.6015194 C7.09897333,53.5386623 10.293259,56.732948 14.2304019,56.732948 L42.3316264,56.732948 C46.2687692,56.732948 49.463055,53.5386623 49.463055,49.6015194 Z" id="Union" stroke="none" fill-opacity="0.600000024" fill="#F4FFF8" transform="translate(28.281014, 36.962336) rotate(-30.460000) translate(-28.281014, -36.962336) "></path>
<path d="M35.8342197,7.32322251 L35.8342197,10.2829337 C35.8342197,11.0044191 36.1111226,11.6607322 36.5650893,12.1512141 C37.0143978,12.636663 37.6367523,12.960043 38.3350711,13.0234495 L38.3350711,13.0234495 L61.3588209,13.0336572 C62.0803063,13.0336572 62.7366194,12.7567544 63.2271013,12.3027877 C63.7130458,11.8530205 64.0365903,11.2298538 64.09953,10.5306669 L64.09953,10.5306669 L64.1146901,7.32426948 L68.9147392,7.32426948 C71.8137163,7.32426948 74.4453735,8.47911287 76.3740413,10.3536539 C78.3118962,12.2371241 79.5396361,14.8470931 79.6165151,17.7413959 L79.6165151,17.7413959 L79.6203422,52.1057908 C79.6203422,55.0047678 78.4654988,57.6364251 76.5909578,59.5650929 C74.7074862,61.5029492 72.0975148,62.7306895 69.2032095,62.8075669 L69.2032095,62.8075669 L31.0290249,62.8113938 C28.1300479,62.8113938 25.4983906,61.6565504 23.5697229,59.7820094 C21.631868,57.8985391 20.4041281,55.2885701 20.327249,52.3942673 L20.327249,52.3942673 L20.323422,18.0298724 C20.323422,15.1308954 21.4782654,12.4992381 23.3528064,10.5705704 C25.2361737,8.63282142 27.8459603,7.40510979 30.7400738,7.32810915 L30.7400738,7.32810915 L35.8342197,7.32322251 Z M57.5494395,-1.09090909 C59.14008,-1.09090909 60.313592,-0.652974173 61.12441,0.1087034 C61.9490359,0.883351956 62.4414688,2.02617884 62.4888004,3.59725381 L62.4888004,3.59725381 L62.4925935,5.66693878 C62.4925935,7.25757933 62.0546586,8.43109126 61.292981,9.24190932 C60.5181849,10.0666922 59.3750704,10.5591556 57.8035332,10.6063267 L57.8035332,10.6063267 L42.405766,10.6100928 C40.8151255,10.6100928 39.6416135,10.1721578 38.8307955,9.41048027 C38.0061696,8.63583172 37.5137367,7.49300484 37.4664051,5.92192987 L37.4664051,5.92192987 L37.462612,3.8522449 C37.462612,2.26160435 37.9005469,1.08809242 38.6622245,0.277274355 C39.4370206,-0.547508531 40.5801351,-1.03997191 42.1516723,-1.08714299 L42.1516723,-1.08714299 Z" id="Union" stroke="url(#linearGradient-3)" stroke-width="2.18181818" fill-opacity="0.35" fill="#FCFCFC"></path>
<path d="M23.420377,36.9093878 C23.9191525,48.6146939 23.9191525,58.7918367 25.9142545,60.3093878 C27.9093566,61.837551 41.8750709,53.1885714 45.8652749,44.5395918 C49.0595607,37.6204082 42.2146627,24.6946939 38.3836423,19.1020408 L24.9167035,22.1583673 C24.2587443,23.1771429 23.0277239,27.5493878 23.420377,36.9093878 Z" id="路径" stroke="none" fill="#C1D7FF" filter="url(#filter-4)"></path>
<path d="M47.2331446,39.7010427 L47.2331446,36.3914559 C44.8150436,35.3332024 43.1250841,32.9174856 43.1250841,30.1155683 C43.1250841,26.3342271 46.1981823,23.268801 49.9718515,23.268801 C53.7531928,23.268801 56.8186189,26.342052 56.8186189,30.1155683 C56.8186189,32.9219483 55.1259085,35.333936 52.7105585,36.3911503 L52.7105585,39.7010427 L58.8687367,39.7010427 C60.7615316,39.7010427 62.2960328,41.2206582 62.2960328,43.1245181 L62.2960328,46.54781 L37.6477314,46.54781 L37.6477314,43.1243652 C37.6477314,41.2337099 39.1895989,39.7010427 41.0749664,39.7010427 L47.2331446,39.7010427 L47.2331446,39.7010427 Z M39.0170543,47.9171635 L60.9265265,47.9171635 L60.9265265,50.6558705 L39.0170543,50.6558705 L39.0170543,47.9171635 L39.0170543,47.9171635 Z" id="形状" stroke="none" fill="url(#linearGradient-5)"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

@ -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="1711433938252" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7299" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M512 64c247.424 0 448 200.576 448 448S759.424 960 512 960 64 759.424 64 512 264.576 64 512 64z m0 80C308.752 144 144 308.752 144 512s164.752 368 368 368 368-164.752 368-368S715.248 144 512 144z m158.896 182.592l1.52 1.328 22.688 22.56a16 16 0 0 1 0.064 22.624L557.12 512l138.048 138.88a16 16 0 0 1 1.28 21.136l-1.344 1.504-22.688 22.56a16 16 0 0 1-22.64-0.064L512 557.392l-137.776 138.624a16 16 0 0 1-21.12 1.392l-1.52-1.328-22.688-22.56a16 16 0 0 1-1.392-21.12l1.328-1.504L466.88 512l-138.048-138.88a16 16 0 0 1-1.28-21.136l1.344-1.504 22.688-22.56a16 16 0 0 1 21.12-1.28l1.52 1.344L512 466.608l137.792-138.624a16 16 0 0 1 21.12-1.392z" p-id="7300" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 1009 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="1711468398773" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7494" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M227.552 512a56.896 56.896 0 1 1 113.792 0 56.896 56.896 0 0 1-113.792 0zM512 568.896a56.896 56.896 0 1 0 0-113.792 56.896 56.896 0 0 0 0 113.792z m227.552 0a56.896 56.896 0 1 0 0-113.792 56.896 56.896 0 0 0 0 113.792z" p-id="7495" fill="#507AFD"></path></svg>

After

Width:  |  Height:  |  Size: 591 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 230 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

@ -0,0 +1,7 @@
// 任务审核状态
export const TASK_STATUS_OBJ = {
1: '未提交',
2: '待审批',
3: '通过',
4: '不通过',
} as any

@ -0,0 +1,11 @@
const commonKeyDown = (keyCode: number) => {
document.dispatchEvent(new KeyboardEvent('keydown', { keyCode }));
}
const c = () => {
commonKeyDown(27)
}
const initBind = (mousetrap) => {
mousetrap.bind('c', c)
}
export default initBind;

@ -1,127 +1,143 @@
<script lang="ts" setup>
import { computed, inject, onMounted, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useUser } from '@/store/modules/user'
import { getImgUrl } from '@/utils/urlUtils'
import { computed, inject, onMounted, ref } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useUser } from "@/store/modules/user";
import { getImgUrl } from "@/utils/urlUtils";
const emit = defineEmits<{
(e: 'logout'): void
}>()
(e: "logout"): void;
}>();
const router = useRouter()
const router = useRouter();
const userStore = useUser()
const userStore = useUser();
const useInfo = userStore.getUserInfo
const useInfo = userStore.getUserInfo;
const aiDisabled = ref(false)
const aiDisabled = ref(false);
function handleSelect(row) {
userStore.updateTenantId(row.key)
location.reload()
userStore.updateTenantId(row.key);
location.reload();
}
function logIt(e) {
return false
return false;
}
//
function goHome(e) {
router.push({ name: 'home' })
router.push({ name: "home" });
}
//
function goTask(e) {
router.push({ name: 'task-main' })
router.push({ name: "task-main" });
}
// AI
function goWorksheet(e) {
router.push({ name: 'worksheet-main' })
router.push({ name: "worksheet-main" });
}
//
function goFinal(e) {
router.push({ name: 'final-main' })
router.push({ name: "final-main" });
}
const mousetrap = inject('mousetrap') as any
const mousetrap = inject("mousetrap") as any;
onMounted(() => {
mousetrap.bind('g h', goHome)
mousetrap.bind('g t', goTask)
mousetrap.bind('g a', goWorksheet)
mousetrap.bind('g e', goFinal)
})
mousetrap.bind("g h", goHome);
mousetrap.bind("g t", goTask);
mousetrap.bind("g a", goWorksheet);
mousetrap.bind("g e", goFinal);
});
const showPopover = ref(false)
const popRef = ref(null)
const changeFlag = ref(false)
const showPopover = ref(false);
const popRef = ref(null);
const changeFlag = ref(false);
const iconName = computed(() => {
return showPopover.value ? 'expand' : 'collapse'
})
return showPopover.value ? "expand" : "collapse";
});
function handleUpdateShow(show: boolean) {
showPopover.value = show
showPopover.value = show;
}
function logOut() {
(popRef.value as any).setShow(false)
emit('logout')
(popRef.value as any).setShow(false);
emit("logout");
}
const currentCompanyName = computed(() => {
const tenantList = useInfo.tenantList
const currentId = userStore.getTenantId
const current = tenantList.find(item => item.id === currentId)
return current.name || 'name'
})
const tenantList = useInfo.tenantList;
const currentId = userStore.getTenantId;
const current = tenantList.find((item) => item.id === currentId);
return current.name || "name";
});
const options = computed(() => {
const tenantList = useInfo.tenantList
const tenantList = useInfo.tenantList;
return tenantList.map((item) => {
return {
label: item.name,
key: item.id,
}
})
})
};
});
});
</script>
<template>
<n-popover ref="popRef" style="border-radius: 10px" placement="bottom-end" raw :show-arrow="false" trigger="click"
@update:show="handleUpdateShow">
<n-popover
ref="popRef"
style="border-radius: 10px"
placement="bottom-end"
raw
:show-arrow="false"
trigger="click"
@update:show="handleUpdateShow"
>
<template #trigger>
<div class="setting">
<span>{{ useInfo.username }}</span>
<SvgIcon style="margin-left: 6px;" :name="iconName" size="14" />
<SvgIcon style="margin-left: 6px" :name="iconName" size="14" />
</div>
</template>
<div class="container">
<div class="header">
<n-avatar :src="getImgUrl(useInfo.usericon)" round style="width:53px; height:53px" />
<n-avatar
:src="getImgUrl(useInfo.usericon)"
round
style="width: 53px; height: 53px"
/>
<div style="margin-left: 12px">
<span style="display: block;" class="user-name">{{ useInfo.username }}</span>
<span style="display: block;" class="depart-name">{{ useInfo.departname }}</span>
<span style="display: block" class="user-name">{{ useInfo.username }}</span>
<span style="display: block" class="depart-name">{{ useInfo.departname }}</span>
</div>
</div>
<div class="trigger">
<span>{{ currentCompanyName }}</span>
<span @click="changeFlag = !changeFlag" style="cursor: pointer;">icon</span>
<span @click="changeFlag = !changeFlag" style="cursor: pointer">icon</span>
</div>
<div class="item">
<span>AI设置开关</span>
<n-switch v-model:value="aiDisabled" />
</div>
<div class="trigger">
联系我们
</div>
<n-divider style="margin-top: 0px; margin-bottom: 10px;padding: 0 22px;" />
<div class="trigger" @click="logOut">
退出登录
</div>
<div class="container sub-container" v-show="changeFlag" style="position: absolute;right:17vw;width: 11.5vw;padding:24px 0">
<div class="trigger" v-for="option in options" :key="option.key" @click="handleSelect(option)">
<div class="trigger">联系我们</div>
<n-divider style="margin-top: 0px; margin-bottom: 10px; padding: 0 22px" />
<div class="trigger" @click="logOut">退</div>
<div
class="container sub-container"
v-show="changeFlag"
style="position: absolute; right: 17vw; width: 11.5vw; padding: 24px 0"
>
<div
class="trigger"
v-for="option in options"
:key="option.key"
@click="handleSelect(option)"
>
{{ option.label }}
</div>
</div>
@ -130,15 +146,13 @@ const options = computed(() => {
</template>
<style lang="less" scoped>
@media screen and (min-width: 1920px) {
.container {
.header{
.user-name{
font-size: 21px;
}
.depart-name{
font-size: 16px;
}
.container {
.header {
.user-name {
font-size: 16px;
}
.depart-name {
font-size: 12px;
}
}
}

@ -105,7 +105,7 @@ export default defineComponent({
.replace({
name: 'Login',
query: {
redirect: route.fullPath,
// redirect: route.fullPath,
},
})
.finally(() => location.reload())

@ -32,7 +32,7 @@ const routes: Array<RouteRecordRaw> = [
path: 'message',
name: 'message-main',
meta: {
title: 'message',
title: '消息通知',
},
component: () => import('@/views/message/index.vue'),
},

@ -41,7 +41,7 @@ export function checkStatus(status: number, msg: string): void {
$message.error('网络未实现')
break
case 502:
$message.error('网络错误')
$message.error('网络错误,请重试')
break
case 503:
$message.error('服务不可用,服务器暂时过载或维护!')

@ -25,7 +25,7 @@ const offList = ref<any[]>([]);
const onList = ref<any[]>([]);
const allCount = computed(() => {
return `全部筛选(共${offList.value.length - 1}个)`;
return `全部筛选(共${offList.value.length}个)`;
});
const selectCount = computed(() => {
@ -389,6 +389,7 @@ const rightInputHandler = debounce((keyword) => {
&-info {
font-weight: bold;
position: relative;
font-size: 14px;
&:before {
background-color: #1980ff;
@ -446,9 +447,13 @@ const rightInputHandler = debounce((keyword) => {
--n-padding-bottom: 12px;
}
::v-deep(.n-card > .n-card-header .n-card-header__main){
font-weight: bolder !important;
font-weight: lighter !important;
font-size: 14px;
}
::v-deep(.n-scrollbar){
border-top: none !important;
}
::v-deep(.n-button--info-type){
background: #507AFD !important;
}
</style>

@ -52,7 +52,7 @@ onMounted(async () => {
};
if (item.fix) {
mustList.push(item);
if (!userFieldFixed?.length && !userFieldUnFixed?.length) {
if (!userFieldFixed?.length && !userFieldUnFixed?.length) {
fixLeftList.value.push(item);
}
}
@ -64,7 +64,6 @@ onMounted(async () => {
}
offList.value.push(item);
});
});
const allCount = computed(() => {
@ -199,13 +198,27 @@ const selectIds = ref<string[]>([]);
function onCheckAllChange(value) {
const ids: string[] = [];
for (const item of offList.value) {
if (!item.fix) {
item.checked = value;
ids.push(item.id);
}
}
if (value) {
offList.value.map((v) => {
if (!v.checked) {
onList.value.push(v);
}
});
} else {
onList.value = [];
fixLeftList.value = [];
offList.value.map((v) => {
if (v.fix) {
fixLeftList.value.push(v);
}
});
}
selectIds.value = value ? ids : [];
}
@ -311,6 +324,20 @@ function removeHandler(id: string, type: "fix" | "unfix") {
fixLeftList.value[index].checked = false;
}
}
const indeterminate = computed(() => {
let baseNum = 0;
offList.value.map((v) => {
if (v.fix) {
baseNum += 1;
}
});
return (
onList.value.length + fixLeftList.value.length - baseNum > 0 &&
offList.value.length - baseNum >
onList.value.length + fixLeftList.value.length - baseNum
);
});
</script>
<template>
@ -341,15 +368,16 @@ function removeHandler(id: string, type: "fix" | "unfix") {
<div>
<n-input placeholder="搜索关键字">
<template #suffix>
<SvgIcon size="14px" name="magnifying-1" />
<SvgIcon size="14px" name="magnifying-1" color="#999999" />
</template>
</n-input>
<div class="draggable-ul">
<div class="draggable-li">
<div class="draggable-ul left-wrap">
<div class="draggable-li" :class="{ checkAll: indeterminate }">
<n-checkbox
v-model:checked="checkAll"
label="全部"
@update:checked="onCheckAllChange"
:indeterminate="indeterminate"
/>
</div>
<div class="content">
@ -381,7 +409,7 @@ function removeHandler(id: string, type: "fix" | "unfix") {
:bordered="false"
>
<template #header-extra>
<span class="textbtnStyle" @click="clearDragSource"></span>
<span class="textbtnStyle" @click="clearDragSource"></span>
</template>
<div>
<n-input placeholder="搜索关键字">
@ -403,15 +431,12 @@ function removeHandler(id: string, type: "fix" | "unfix") {
:class="{ fix: item.fix }"
class="cursor-move draggable-item"
>
<SvgIcon name="drag" size="14" color="#666666" />
<span class="ml-2">{{ item.name }}</span>
<SvgIcon
v-if="!item.fix"
size="16px"
style="
display: block;
margin-left: auto;
cursor: pointer;
"
style="display: block; margin-left: auto; cursor: pointer"
name="clear"
@click="removeHandler(item.id, 'fix')"
/>
@ -430,15 +455,12 @@ function removeHandler(id: string, type: "fix" | "unfix") {
:class="{ fix: item.fix }"
class="cursor-move draggable-item"
>
<SvgIcon name="drag" size="14" color="#666666" />
<span class="ml-2">{{ item.name }}</span>
<SvgIcon
v-if="!item.fix"
size="16px"
style="
display: block;
margin-left: auto;
cursor: pointer;
"
style="display: block; margin-left: auto; cursor: pointer"
name="clear"
@click="removeHandler(item.id, 'unfix')"
/>
@ -453,7 +475,7 @@ function removeHandler(id: string, type: "fix" | "unfix") {
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="handleSumbit"> </n-button>
<n-button type="info" @click="handleSumbit"> </n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal">
取消
</n-button>
@ -467,6 +489,8 @@ function removeHandler(id: string, type: "fix" | "unfix") {
.wrapper {
display: flex;
flex-direction: column;
border-bottom: 1px solid #e8e8e8;
padding-bottom: 32px;
&-title {
font-weight: bold;
@ -474,7 +498,6 @@ function removeHandler(id: string, type: "fix" | "unfix") {
}
&-bar {
background-color: #e8e8e8;
width: 100%;
margin-top: 20px;
}
@ -487,6 +510,9 @@ function removeHandler(id: string, type: "fix" | "unfix") {
&-info {
font-weight: bold;
position: relative;
color: #333333;
font-size: 14px;
background: #f8f8f8;
&:before {
background-color: #1980ff;
@ -507,13 +533,17 @@ function removeHandler(id: string, type: "fix" | "unfix") {
.cardstyle {
width: 820px;
--n-padding-bottom: 20px;
// --n-padding-bottom: 20px;
--n-padding-left: 24px;
--n-padding-right: 24px;
--n-padding-top: 20px;
// padding: 20px 24px 0 24px !important
}
.textbtnStyle {
cursor: pointer;
color: #1980ff;
color: #507AFD;
}
.drag-wrapper {
@ -540,10 +570,11 @@ function removeHandler(id: string, type: "fix" | "unfix") {
}
.draggable-item {
padding: 10px 16px;
padding: 11px 16px;
color: #333;
display: flex;
align-items: center;
// border-bottom: 1px solid #e8e8e8;
}
.disable-check {
@ -551,9 +582,7 @@ function removeHandler(id: string, type: "fix" | "unfix") {
}
}
::v-deep(
.n-card.n-card--content-segmented > .n-card__content:not(:first-child)
) {
::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) {
border: 0px;
}
@ -561,10 +590,38 @@ function removeHandler(id: string, type: "fix" | "unfix") {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
::v-deep(.n-card > .n-card-header .n-card-header__main){
font-weight: bolder !important;
.left-wrap {
border: 1px solid #cbd3de;
}
::v-deep(.n-scrollbar){
::v-deep(.n-card > .n-card-header .n-card-header__main) {
font-weight: lighter !important;
font-size: 14px;
color: #666666;
}
::v-deep(.n-scrollbar) {
border-top: none !important;
}
::v-deep(.n-button--info-type) {
background: #507afd !important;
}
::v-deep(.n-button--default-type){
border: 1px solid #cad2dd !important;
}
// ::v-deep(.n-card__content){
// padding: 20px 24px 0 24px !important;
// }
::v-deep(.checkAll .n-checkbox.n-checkbox--indeterminate .n-checkbox-box) {
background: none;
border: none;
}
::v-deep(.checkAll .n-checkbox-box__border) {
border: 1px solid #e8e8e8 !important;
}
::v-deep(.checkAll .n-checkbox-icon) {
border: 3px solid #fff;
background: #1980ff;
}
::v-deep(.checkAll .n-checkbox-icon svg) {
display: none !important;
}
</style>

@ -84,11 +84,12 @@ const columns: DataTableColumns<RowData> = [
];
const loading = ref(true);
const total = ref(0);
const pagination = reactive({
page: 1,
pageCount: 1,
pageSize: 10,
showSizePicker:true,
showSizePicker: true,
pageSizes: [
{
label: "10 每页",
@ -108,6 +109,7 @@ const pagination = reactive({
},
],
showQuickJumper: true,
prefix:()=>`${total.value} 条数据`
});
const tableData = ref<Array<RowData>>([]);
const keyword = ref("");
@ -117,7 +119,8 @@ async function query(page: number, pageSize: number) {
search_searchname: { value: keyword.value, op: "like", type: "string" },
};
const result = await getConditionList({ pageNo: page, pageSize }, searchParam, 1);
const { data, pageCount } = result;
const { data, pageCount,total } = result;
total.value = total;
tableData.value = data;
pagination.page = page;
pagination.pageCount = pageCount;
@ -204,7 +207,6 @@ async function handlePageSizeChange(currentPageSize) {
await query(page, currentPageSize);
}
function handleClick() {
emit("showNewFilter");
show.value = false;
@ -333,9 +335,8 @@ const inputHandler = debounce((word) => {
:pagination="pagination"
:row-key="rowKey"
@update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
@update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
/>
</div>
</div>

@ -1,197 +1,200 @@
<script lang="ts" setup>
import { reactive, ref, unref } from 'vue'
import * as XLSX from 'xlsx'
import { arrayEquals } from '@/utils/index'
import { generateUuid } from '@/utils/uuid'
import { reactive, ref, unref } from "vue";
import * as XLSX from "xlsx";
import { arrayEquals } from "@/utils/index";
import { generateUuid } from "@/utils/uuid";
const props = defineProps<{
onSuccess: Function
headerConfig: string[]
}>()
onSuccess: Function;
headerConfig: string[];
}>();
interface ExcelData {
header: string[] | null
content: any[] | null
header: string[] | null;
content: any[] | null;
}
interface ParseResults {
fileName: string
results: any[]
uuid: string
fileName: string;
results: any[];
uuid: string;
}
const cardStyle = {
'width': '620px',
'--n-padding-bottom': '10px',
'--n-padding-left': '0px',
}
const inputRef = ref(null)
let loading = false
const excelData: ExcelData = { header: null, content: null }
const excelDatas: ParseResults[] = reactive([])
width: "620px",
"--n-padding-bottom": "10px",
"--n-padding-left": "0px",
};
const inputRef = ref(null);
let loading = false;
const excelData: ExcelData = { header: null, content: null };
const excelDatas: ParseResults[] = reactive([]);
function generateData(content) {
excelData.header = props.headerConfig
excelData.content = content
props.onSuccess && props.onSuccess(excelData)
excelData.header = props.headerConfig;
excelData.content = content;
props.onSuccess && props.onSuccess(excelData);
}
function handleDrop(e) {
e.stopPropagation()
e.preventDefault()
if (loading)
return
const files = e.dataTransfer.files
const rawFiles = Array.from(files)
e.stopPropagation();
e.preventDefault();
if (loading) return;
const files = e.dataTransfer.files;
const rawFiles = Array.from(files);
// eslint-disable-next-line dot-notation
const $message = window['$message']
const $message = window["$message"];
if (!isExcel(rawFiles)) {
$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
return false
$message.error("Only supports upload .xlsx, .xls, .csv suffix files");
return false;
}
uploadFiles(rawFiles)
e.stopPropagation()
e.preventDefault()
uploadFiles(rawFiles);
e.stopPropagation();
e.preventDefault();
}
async function uploadFiles(files) {
const inputEl: HTMLInputElement | null = unref(inputRef)
inputEl!.value = ''
const inputEl: HTMLInputElement | null = unref(inputRef);
inputEl!.value = "";
loading = true
loading = true;
for (const file of files) {
const fileData = await readFileData(file)
const message = validate(fileData)
const fileData = await readFileData(file);
const message = validate(fileData);
// TODO
if (message === undefined || true) {
const uuid = generateUuid()
const uuid = generateUuid();
excelDatas.push({
fileName: file.name,
results: (fileData as any).results,
uuid,
})
});
}
}
loading = false
loading = false;
}
function commitData() {
const mergeResults: any[] = []
const mergeResults: any[] = [];
if (excelDatas.length === 0)
return
if (excelDatas.length === 0) return;
excelDatas.forEach((item) => {
mergeResults.push(...item.results)
})
mergeResults.push(...item.results);
});
generateData(mergeResults)
generateData(mergeResults);
}
function validate(fileData) {
const { header } = fileData
const { header } = fileData;
//
const equal = arrayEquals(header, props.headerConfig)
const equal = arrayEquals(header, props.headerConfig);
if (!equal)
return '表头不匹配'
if (!equal) return "表头不匹配";
// TODO
}
function readFileData(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader()
const reader = new FileReader();
reader.onload = (e) => {
const data = e.target!.result
const workbook = XLSX.read(data, { type: 'array' })
const firstSheetName = workbook.SheetNames[0]
const worksheet = workbook.Sheets[firstSheetName]
const header = getHeaderRow(worksheet)
const results = XLSX.utils.sheet_to_json(worksheet)
resolve({ header, results })
}
reader.readAsArrayBuffer(file)
})
const data = e.target!.result;
const workbook = XLSX.read(data, { type: "array" });
const firstSheetName = workbook.SheetNames[0];
const worksheet = workbook.Sheets[firstSheetName];
const header = getHeaderRow(worksheet);
const results = XLSX.utils.sheet_to_json(worksheet);
resolve({ header, results });
};
reader.readAsArrayBuffer(file);
});
}
function handleDragover(e) {
e.stopPropagation()
e.preventDefault()
e.dataTransfer.dropEffect = 'copy'
e.stopPropagation();
e.preventDefault();
e.dataTransfer.dropEffect = "copy";
}
function handleUpload() {
(inputRef.value as any).click()
(inputRef.value as any).click();
}
function handleClick(e) {
const files = e.target.files
const rawFiles = Array.from(files)
uploadFiles(rawFiles)
const files = e.target.files;
const rawFiles = Array.from(files);
uploadFiles(rawFiles);
}
function getHeaderRow(sheet) {
const headers: string[] = []
const range = XLSX.utils.decode_range(sheet['!ref'])
let C
const R = range.s.r
const headers: string[] = [];
const range = XLSX.utils.decode_range(sheet["!ref"]);
let C;
const R = range.s.r;
/* start in the first row */
for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
const cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })]
for (C = range.s.c; C <= range.e.c; ++C) {
/* walk every column in the range */
const cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })];
/* find the cell in the first row */
let hdr = `UNKNOWN ${C}` // <-- replace with your desired default
if (cell && cell.t)
hdr = XLSX.utils.format_cell(cell)
headers.push(hdr)
let hdr = `UNKNOWN ${C}`; // <-- replace with your desired default
if (cell && cell.t) hdr = XLSX.utils.format_cell(cell);
headers.push(hdr);
}
return headers
return headers;
}
function isExcel(files) {
return files.every((file) => {
return /\.(xlsx|xls|csv)$/.test(file.name)
})
return /\.(xlsx|xls|csv)$/.test(file.name);
});
}
const show = ref(false)
const show = ref(false);
function showModal() {
show.value = true
show.value = true;
}
function closeModal() {
show.value = false
show.value = false;
}
async function handleSumbit(e: MouseEvent) {
e.preventDefault()
commitData()
closeModal()
e.preventDefault();
commitData();
closeModal();
}
defineExpose({
showModal,
})
});
function removeHandler(id: string) {
const index = excelDatas.findIndex(item => item.uuid === id)
excelDatas.splice(index, 1)
const index = excelDatas.findIndex((item) => item.uuid === id);
excelDatas.splice(index, 1);
}
function afterLeave() {
excelDatas.length = 0
excelDatas.length = 0;
}
</script>
<template>
<n-modal v-model:show="show" transform-origin="center" @after-leave="afterLeave">
<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-header">
<span class="wrapper-left">批量导入</span>
@ -203,17 +206,41 @@ function afterLeave() {
</div>
<n-divider />
<div class="wrapper-content">
<div class="wrapper-content-dragger" @drop="handleDrop" @dragover="handleDragover" @dragenter="handleDragover">
<input ref="inputRef" class="excel-upload-input" type="file" accept=".xlsx, .xls,.csv" @change="handleClick">
<SvgIcon style="margin-top: 30px;" size="45" name="upload" @click="handleUpload" />
<span style="margin-top: 20px;" class="wrapper-tip1">点击或拖拽审批文件到这里上传</span>
<span style="margin-top: 15px;margin-bottom: 20px;" class="wrapper-tip2">支持上传格式.xls .xlsx .csv的文件</span>
<div
class="wrapper-content-dragger"
@drop="handleDrop"
@dragover="handleDragover"
@dragenter="handleDragover"
>
<input
ref="inputRef"
class="excel-upload-input"
type="file"
accept=".xlsx, .xls,.csv"
@change="handleClick"
/>
<SvgIcon
style="margin-top: 32px; margin-bottom: 13px"
size="45"
name="upload"
@click="handleUpload"
/>
<span class="wrapper-tip1">点击或拖拽审批文件到这里上传</span>
<span style="margin-top: 3px; margin-bottom: 19px" class="wrapper-tip2"
>支持上传格式.xls .xlsx .csv的文件</span
>
</div>
<div v-for="(item, index) in excelDatas" :key="index" class="wrapper-content-files">
<div
v-for="(item, index) in excelDatas"
:key="index"
class="wrapper-content-files"
>
<div>{{ item.fileName }}</div>
<div>
<SvgIcon
size="16px" style="display: block; margin-left: auto; cursor: pointer" name="clear"
size="16px"
style="display: block; margin-left: auto; cursor: pointer"
name="clear"
@click="removeHandler(item.uuid)"
/>
</div>
@ -222,9 +249,7 @@ function afterLeave() {
</div>
<template #footer>
<div class="footer">
<n-button type="info" @click="handleSumbit">
确认
</n-button>
<n-button type="info" @click="handleSumbit"> </n-button>
</div>
</template>
</n-card>
@ -237,34 +262,41 @@ function afterLeave() {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
padding: 6px 0 0 24px;
// padding: 10px;
}
&-left {
font-weight: bold;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: bolder;
text-align: left;
color: #222222;
line-height: 24px;
}
&-right {
&-close {
width: 18px;
height: 18px;
width: 12px;
height: 12px;
cursor: pointer;
margin-right: 25px;
color: #999999;
}
&-icon {
background: #000;
display: inline-block;
width: 18px;
width: 12px;
height: 1px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
margin-bottom: 8px;
&:after {
content: '';
content: "";
display: block;
width: 18px;
width: 12px;
height: 1px;
background: #000;
transform: rotate(-90deg);
@ -274,19 +306,18 @@ function afterLeave() {
}
&-content {
margin-top: 20px;
margin: 33px 24px 0 25px;
&-dragger {
display: flex;
flex-direction: column;
align-items: center;
border: 1px dashed #1980FF;
width: 600px;
margin: 0 auto;
border: 1px dashed #1980ff;
// width: 600px;
font-size: 14px;
font-weight: bold;
border-radius: 2px;
text-align: center;
background: rgba(202, 210, 221, 0.1);
}
&-files {
@ -297,7 +328,6 @@ function afterLeave() {
justify-content: space-between;
}
}
}
.excel-upload-input {
@ -324,4 +354,19 @@ function afterLeave() {
margin-top: 0px;
margin-bottom: 0px;
}
.wrapper-tip1 {
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: lighter;
color: #666666;
line-height: 24px;
}
.wrapper-tip2 {
font-size: 12px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: lighter;
text-align: left;
color: #999999;
line-height: 22px;
}
</style>

@ -65,8 +65,8 @@ defineExpose({
<div class="wrapper">
<div class="closed">
<SvgIcon
style="cursor: pointer"
name="cut-down"
class="icon"
name="close-white"
width="32"
@click="closeModal"
/>
@ -99,8 +99,8 @@ defineExpose({
</div>
</n-scrollbar>
<div class="footer">
<SvgIcon style="cursor: pointer;" name="r1" width="162" height="54" @click="reject" />
<SvgIcon style="cursor: pointer;" name="r4" width="162" height="54" @click="viewRepeat" />
<img class="img-btn1" src="@/assets/images/btn_pass.png" alt="" @click="reject">
<img class="img-btn" src="@/assets/images/btn_repeat.png" alt="" @click="viewRepeat">
</div>
</div>
</div>
@ -121,11 +121,16 @@ defineExpose({
left: calc(50% - 350px);
.closed {
position: relative;
top: 0px;
left: 90%;
.icon{
cursor: pointer;
position: absolute;
top: 10px;
right: 7px;
}
}
.wrapper-header {
padding-top: 40px;
margin-top: 80px;
text-align: center;
.wrapper-title {
text-align: center;
@ -265,5 +270,17 @@ defineExpose({
font-size: 22px;
margin: 0px 5px
}
.img-btn1{
width: 162px;
height: 54px;
cursor: pointer;
}
.img-btn{
width: 173px;
height: 54px;
cursor: pointer;
}
}
</style>

@ -1,108 +1,106 @@
<script lang="ts" setup>
import { computed, h, reactive, ref, unref } from 'vue'
import { NDataTable, useDialog } from 'naive-ui'
import type { DataTableColumns, DataTableRowKey } from 'naive-ui'
import Action from '../comp/Action.vue'
import { RejectModal } from './index'
import type { RowData } from '@/config/final'
import { getFinalList } from '@/api/final'
import type { ApprovalParam } from '/#/api'
import { audit } from '@/api/task/task'
import { computed, h, reactive, ref, unref } from "vue";
import { NDataTable, useDialog } from "naive-ui";
import type { DataTableColumns, DataTableRowKey } from "naive-ui";
import Action from "../comp/Action.vue";
import { RejectModal } from "./index";
import type { RowData } from "@/config/final";
import { getFinalList } from "@/api/final";
import type { ApprovalParam } from "/#/api";
import { audit } from "@/api/task/task";
const emit = defineEmits<{
(e: 'commit', columns: any[])
}>()
(e: "commit", columns: any[]);
}>();
const show = ref(false)
const show = ref(false);
function showModal() {
show.value = true
show.value = true;
}
function closeModal() {
show.value = false
show.value = false;
}
async function handleSumbit(e: MouseEvent) {
e.preventDefault()
closeModal()
e.preventDefault();
closeModal();
}
defineExpose({
showModal,
})
});
const columns: DataTableColumns<RowData> = [
{
type: 'selection',
fixed: 'left',
type: "selection",
fixed: "left",
width: 50,
},
{
title: '任务Id',
key: 'id',
fixed: 'left',
title: "任务Id",
key: "id",
fixed: "left",
width: 100,
},
{
title: '任务名称',
key: 'fromtaskname',
fixed: 'left',
title: "任务名称",
key: "fromtaskname",
fixed: "left",
width: 200,
},
{
title: '审批节点',
key: 'approvalnode',
title: "审批节点",
key: "approvalnode",
width: 100,
},
{
title: '审批状态',
key: 'states',
title: "审批状态",
key: "states",
width: 100,
},
{
title: '图片相似度',
key: 'similarity',
title: "图片相似度",
key: "similarity",
width: 100,
},
{
title: '提报时间',
key: 'fromuptime',
title: "提报时间",
key: "fromuptime",
width: 200,
},
{
title: '更新时间',
key: 'updatetime',
title: "更新时间",
key: "updatetime",
width: 200,
},
{
title: '操作',
key: 'actions',
title: "操作",
key: "actions",
width: 200,
fixed: 'right',
fixed: "right",
render(row) {
return h(
Action,
{
id: row.id,
status: row.states,
trigger: actionHandler,
},
)
return h(Action, {
id: row.id,
status: row.states,
trigger: actionHandler,
});
},
},
]
const rejectModalRef = ref(null)
const columnsRef = ref(columns)
const tableRef = ref<InstanceType<typeof NDataTable>>()
const rowKey = (row: RowData) => row.id
const loading = ref(true)
];
const rejectModalRef = ref(null);
const columnsRef = ref(columns);
const tableRef = ref<InstanceType<typeof NDataTable>>();
const rowKey = (row: RowData) => row.id;
const loading = ref(true);
const total = ref(0);
const pagination = reactive({
page: 1,
pageCount: 1,
pageSize: 10,
showSizePicker:true,
showSizePicker: true,
pageSizes: [
{
label: "10 每页",
@ -122,31 +120,37 @@ const pagination = reactive({
},
],
showQuickJumper: true,
})
const tableData = ref<Array<RowData>>([])
const selectionIds = ref<DataTableRowKey[]>([])
prefix:()=>`${total.value} 条数据`
});
const tableData = ref<Array<RowData>>([]);
const selectionIds = ref<DataTableRowKey[]>([]);
const deviceHeight = ref(600)
const deviceHeight = ref(600);
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) {
const result = await getFinalList({ sortorder: 'asc', pageSize: 10, currPage: 1, sortname: '' })
const { data, pageCount } = result
tableData.value = data
pagination.page = page
pagination.pageCount = pageCount
loading.value = false
const result = await getFinalList({
sortorder: "asc",
pageSize: 10,
currPage: 1,
sortname: "",
});
const { data, pageCount,totalCount } = result;
total.value = totalCount;
tableData.value = data;
pagination.page = page;
pagination.pageCount = pageCount;
loading.value = false;
}
async function handlePageChange(currentPage) {
if (loading.value)
return
if (loading.value) return;
const { pageSize } = pagination
await query(currentPage, pageSize)
const { pageSize } = pagination;
await query(currentPage, pageSize);
}
async function handlePageSizeChange(currentPageSize) {
if (loading.value) return;
@ -158,56 +162,55 @@ async function handlePageSizeChange(currentPageSize) {
}
function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys
selectionIds.value = rowKeys;
}
function actionHandler(action: any) {
const { key } = action
const { key } = action;
switch (key) {
case 'view':
break
case 'reset':
resetHandler()
break
case 'approval':
approvalHandler()
break
case 'reject':
(rejectModalRef.value as any).showModal()
break
case "view":
break;
case "reset":
resetHandler();
break;
case "approval":
approvalHandler();
break;
case "reject":
(rejectModalRef.value as any).showModal();
break;
default:
break
break;
}
}
const dialog = useDialog()
const dialog = useDialog();
function resetHandler() {
dialog.info({
title: '确认提示',
content: '确认重置当前选中的任务的审批吗?',
positiveText: '确定',
negativeText: '取消',
title: "确认提示",
content: "确认重置当前选中的任务的审批吗?",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: async () => {
// TODO
// const result = await resetApproval()
},
onNegativeClick: () => { },
})
onNegativeClick: () => {},
});
}
function approvalHandler() {
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
title: "确认提示",
content: "确认给该任务审批为【通过】吗?",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: () => {
// TODO
},
onNegativeClick: () => { },
})
onNegativeClick: () => {},
});
}
function rejectHandler(idOrDesc: string, isOther: boolean) {
@ -218,22 +221,26 @@ function rejectHandler(idOrDesc: string, isOther: boolean) {
// approvd: false,
// taskComment: '',
// }
// if (isOther)
// param.taskComment = idOrDesc
// else
// param.taskComment = idOrDesc
// audit(param)
}
query(pagination.page, pagination.pageSize)
query(pagination.page, pagination.pageSize);
</script>
<template>
<div>
<n-modal v-model:show="show" transform-origin="center">
<n-card class="cardstyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<n-card
class="cardstyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<div class="wrapper">
<span class="wrapper-title">重复任务</span>
<div class="wrapper-bar">
@ -243,19 +250,25 @@ query(pagination.page, pagination.pageSize)
</div>
<div class="wrapper-content">
<NDataTable
ref="tableRef" remote :columns="columnsRef" :scroll-x="1250" :max-height="maxHeight" :data="tableData"
:loading="loading" :pagination="pagination" :row-key="rowKey" @update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
ref="tableRef"
remote
:columns="columnsRef"
:scroll-x="1250"
:max-height="maxHeight"
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="rowKey"
@update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
/>
</div>
</div>
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="handleSumbit">
确认
</n-button>
<n-button secondary style="margin-left:15px" @click="closeModal">
<n-button type="info" @click="handleSumbit"> </n-button>
<n-button secondary style="margin-left: 15px" @click="closeModal">
取消
</n-button>
</div>
@ -284,7 +297,7 @@ query(pagination.page, pagination.pageSize)
&-content {
flex: auto;
background: #FFF;
background: #fff;
margin-top: 20px;
}
@ -299,7 +312,7 @@ query(pagination.page, pagination.pageSize)
&:before {
background-color: #1980ff;
content: '';
content: "";
width: 5px;
border-radius: 2px;
top: 0;

@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui'
import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui'
import type { DataTableColumns, DataTableRowKey, PaginationProps } from "naive-ui";
import { NButton, NDataTable, useDialog, useMessage } from "naive-ui";
import {
computed,
defineEmits,
@ -13,9 +13,9 @@ import {
ref,
unref,
watch,
} from 'vue'
import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row'
import { useRoute, useRouter } from 'vue-router'
} from "vue";
import { rowPropKeys } from "naive-ui/es/legacy-grid/src/Row";
import { useRoute, useRouter } from "vue-router";
import {
Action,
CustomTabelModal,
@ -24,50 +24,50 @@ import {
RepeatModal,
RepeatTaskTableModal,
StatusItem,
} from '../comp'
import { getFinalList } from '@/api/final'
import { audit } from '@/api/task/task'
import SvgIcon from '@/components/Icon/SvgIcon.vue'
import type { RowData } from '@/config/final'
import { findKey, headRules } from '@/config/final'
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { useUser } from '@/store/modules/user'
import { useFinal } from '@/store/modules/final'
import { getViewportOffset } from '@/utils/domUtils'
import { isBoolean } from '@/utils/is'
import { useDictionary } from '@/store/modules/dictonary'
import ConfrimModal from '@/views/task/modal/ConfrimModal.vue'
import type { ApprovalParam } from '/#/api'
import emitter from '@/utils/mitt'
import { formatToDateHMS } from '@/utils/dateUtil'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
const emit = defineEmits(['changeShow'])
} from "../comp";
import { getFinalList } from "@/api/final";
import { audit } from "@/api/task/task";
import SvgIcon from "@/components/Icon/SvgIcon.vue";
import type { RowData } from "@/config/final";
import { findKey, headRules } from "@/config/final";
import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { useUser } from "@/store/modules/user";
import { useFinal } from "@/store/modules/final";
import { getViewportOffset } from "@/utils/domUtils";
import { isBoolean } from "@/utils/is";
import { useDictionary } from "@/store/modules/dictonary";
import ConfrimModal from "@/views/task/modal/ConfrimModal.vue";
import type { ApprovalParam } from "/#/api";
import emitter from "@/utils/mitt";
import { formatToDateHMS } from "@/utils/dateUtil";
import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter";
const emit = defineEmits(["changeShow"]);
function changeContent() {
emit('changeShow')
emit("changeShow");
}
const dicStore = useDictionary()
const izstatusList = ref([])
const router = useRouter()
const route = useRoute()
const reviewType = 0
const dicStore = useDictionary();
const izstatusList = ref([]);
const router = useRouter();
const route = useRoute();
const reviewType = 0;
const actionsColumns = {
title: '操作',
key: 'actions',
title: "操作",
key: "actions",
minWidth: 200,
fixed: 'right',
fixed: "right",
render(row) {
return h(ListAction, {
id: row.id,
status: row.states,
trigger: (action) => {
actionHandler(action, row)
actionHandler(action, row);
},
})
});
},
}
const columnsRef = ref<DataTableColumns<RowData>>([])
};
const columnsRef = ref<DataTableColumns<RowData>>([]);
// const columns: DataTableColumns<RowData> = [
// {
// type: "selection",
@ -167,213 +167,205 @@ const columnsRef = ref<DataTableColumns<RowData>>([])
async function getColumns() {
columnsRef.value = [
{
type: 'selection',
fixed: 'left',
type: "selection",
fixed: "left",
width: 50,
},
]
const userStore = useUser()
const userInfo = userStore.getUserInfo
let res
res = await getAllfieldList(reviewType) //
const allList = res.data
res = await getfieldList(reviewType, userInfo.id) //
const useList = res.data
const userFieldFixed = useList.userFieldFixed?.split(',')
const userFieldUnFixed = useList.userFieldUnFixed?.split(',')
console.log(userFieldFixed, userFieldUnFixed, 'userFieldUnFixed')
console.log(allList, 'allList')
];
const userStore = useUser();
const userInfo = userStore.getUserInfo;
let res;
res = await getAllfieldList(reviewType); //
const allList = res.data;
res = await getfieldList(reviewType, userInfo.id); //
const useList = res.data;
const userFieldFixed = useList.userFieldFixed?.split(",");
const userFieldUnFixed = useList.userFieldUnFixed?.split(",");
console.log(userFieldFixed, userFieldUnFixed, "userFieldUnFixed");
console.log(allList, "allList");
allList?.map((v) => {
if (!userFieldFixed?.length && !userFieldUnFixed?.length) {
if (v.isrequired == 2) {
columnsRef.value.push({
title: v.fieldDesc,
fixed: 'left',
fixed: "left",
key: v.name,
width: 120,
})
});
}
}
if (userFieldFixed?.find(v2 => v2 == v.name)) {
if (userFieldFixed?.find((v2) => v2 == v.name)) {
columnsRef.value.push({
title: v.fieldDesc,
key: v.name,
fixed: 'left',
fixed: "left",
width: 120,
})
});
}
if (userFieldUnFixed?.find(v2 => v2 == v.name)) {
if (userFieldUnFixed?.find((v2) => v2 == v.name)) {
columnsRef.value.push({
title: v.fieldDesc,
key: v.name,
width: 120,
})
});
}
})
columnsRef.value.push(actionsColumns as any)
formatColumns()
console.log(columnsRef.value, 'columnsRef')
});
columnsRef.value.push(actionsColumns as any);
formatColumns();
console.log(columnsRef.value, "columnsRef");
}
async function formatColumns() {
// TODO
let index
index = columnsRef.value.findIndex(v => v.title == '任务ID')
let index;
index = columnsRef.value.findIndex((v) => v.title == "任务ID");
if (index > -1) {
columnsRef.value[index] = {
title: '任务ID',
title: "任务ID",
key: columnsRef.value[index].key, // "id"
fixed: columnsRef.value[index].fixed || undefined,
width: 200,
render(row) {
const item: any = izstatusList.value.find(
(item: any) => item.value == row.states,
)
(item: any) => item.value == row.states
);
return h(
NButton,
{
'strong': true,
'tertiary': true,
'text': true,
'size': 'small',
'text-color': '#507AFD',
'onClick': () => goDetail(row),
strong: true,
tertiary: true,
text: true,
size: "small",
"text-color": "#507AFD",
onClick: () => goDetail(row),
},
{ default: () => row.id },
)
{ default: () => row.id }
);
},
}
};
}
index = columnsRef.value.findIndex(v => v.title == '任务名称')
index = columnsRef.value.findIndex((v) => v.title == "任务名称");
if (index > -1) {
columnsRef.value[index] = {
title: '任务名称',
title: "任务名称",
key: columnsRef.value[index].key, // "fromtaskname"
fixed: columnsRef.value[index].fixed || undefined,
width: 200,
ellipsis: {
tooltip: true,
},
}
};
}
index = columnsRef.value.findIndex(v => v.title == '审批状态')
index = columnsRef.value.findIndex((v) => v.title == "审批状态");
if (index > -1) {
columnsRef.value[index] = {
title: '审批状态',
title: "审批状态",
key: columnsRef.value[index].key,
fixed: columnsRef.value[index].fixed || undefined,
width: 120,
sorter: 'default',
sorter: "default",
renderSorterIcon: ({ order }) => {
if (order === false)
return h(SvgIcon, { name: 'sort-2' })
if (order === 'ascend')
return h(SvgIcon, { name: 'sort-1' })
if (order === 'descend')
return h(SvgIcon, { name: 'sort-3' })
if (order === false) return h(SvgIcon, { name: "sort-2" });
if (order === "ascend") return h(SvgIcon, { name: "sort-1" });
if (order === "descend") return h(SvgIcon, { name: "sort-3" });
},
render(row) {
const item: any = izstatusList.value.find(
(item: any) => item.value == row.states,
)
(item: any) => item.value == row.states
);
return h(StatusItem, {
id: row.id,
status: row.states,
label: item ? item.label : '',
})
label: item ? item.label : "",
});
},
}
};
}
index = columnsRef.value.findIndex(v => v.title == '图片相似度')
index = columnsRef.value.findIndex((v) => v.title == "图片相似度");
if (index > -1) {
columnsRef.value[index] = {
title: '图片相似度',
title: "图片相似度",
key: columnsRef.value[index].key,
fixed: columnsRef.value[index].fixed || undefined,
width: 150,
sorter: 'default',
sorter: "default",
renderSorterIcon: ({ order }) => {
if (order === false)
return h(SvgIcon, { name: 'sort-2' })
if (order === 'ascend')
return h(SvgIcon, { name: 'sort-1' })
if (order === 'descend')
return h(SvgIcon, { name: 'sort-3' })
if (order === false) return h(SvgIcon, { name: "sort-2" });
if (order === "ascend") return h(SvgIcon, { name: "sort-1" });
if (order === "descend") return h(SvgIcon, { name: "sort-3" });
},
render(row: any) {
return row.similarityscore ? `${row.similarityscore}%` : ''
return row.similarityscore ? `${row.similarityscore}%` : "";
},
}
};
}
index = columnsRef.value.findIndex(v => v.title == '提报时间')
index = columnsRef.value.findIndex((v) => v.title == "提报时间");
if (index > -1) {
columnsRef.value[index] = {
title: '提报时间',
title: "提报时间",
key: columnsRef.value[index].key,
fixed: columnsRef.value[index].fixed || undefined,
width: 200,
sorter: 'default',
sorter: "default",
renderSorterIcon: ({ order }) => {
if (order === false)
return h(SvgIcon, { name: 'sort-2' })
if (order === 'ascend')
return h(SvgIcon, { name: 'sort-1' })
if (order === 'descend')
return h(SvgIcon, { name: 'sort-3' })
if (order === false) return h(SvgIcon, { name: "sort-2" });
if (order === "ascend") return h(SvgIcon, { name: "sort-1" });
if (order === "descend") return h(SvgIcon, { name: "sort-3" });
},
render(row: any) {
return formatToDateHMS(row.createdate || 0)
return formatToDateHMS(row.createdate || 0);
},
}
};
}
index = columnsRef.value.findIndex(v => v.title == '更新时间')
index = columnsRef.value.findIndex((v) => v.title == "更新时间");
if (index > -1) {
columnsRef.value[index] = {
title: '更新时间',
title: "更新时间",
key: columnsRef.value[index].key,
fixed: columnsRef.value[index].fixed || undefined,
width: 200,
render(row: any) {
return row.updatetime ? formatToDateHMS(row.updatetime) : ''
return row.updatetime ? formatToDateHMS(row.updatetime) : "";
},
}
};
}
}
const deviceHeight = ref(600)
const deviceHeight = ref(600);
onMounted(() => {
emitter.on('filter-final', refreshHandler)
getColumns()
emitter.on("filter-final", refreshHandler);
getColumns();
nextTick(() => {
computeListHeight()
})
})
computeListHeight();
});
});
onBeforeMount(() => {
dicStore.fetchizstatusListt()
})
dicStore.fetchizstatusListt();
});
watch(
() => dicStore.izstatusList,
(newval) => {
izstatusList.value = newval
},
)
izstatusList.value = newval;
}
);
onUnmounted(() => {
emitter.off('filter-final', refreshHandler)
})
emitter.off("filter-final", refreshHandler);
});
const tableRef = ref<InstanceType<typeof NDataTable>>()
const rowKey = (row: RowData) => row.id
const loading = ref(true)
const tableRef = ref<InstanceType<typeof NDataTable>>();
const rowKey = (row: RowData) => row.id;
const loading = ref(true);
const total = ref(0);
const pagination = reactive({
page: 1,
pageCount: 1,
@ -381,211 +373,204 @@ const pagination = reactive({
showSizePicker: true,
pageSizes: [
{
label: '10 每页',
label: "10 每页",
value: 10,
},
{
label: '15 每页',
label: "15 每页",
value: 15,
},
{
label: '30 每页',
label: "30 每页",
value: 30,
},
{
label: '50 每页',
label: "50 每页",
value: 50,
},
],
showQuickJumper: true,
})
const tableData = ref<Array<RowData>>([])
const selectionIds = ref<DataTableRowKey[]>([])
const dialog = useDialog()
const message = useMessage()
const finalStore = useFinal()
prefix: () => `${total.value} 条数据`,
});
const tableData = ref<Array<RowData>>([]);
const selectionIds = ref<DataTableRowKey[]>([]);
const dialog = useDialog();
const message = useMessage();
const finalStore = useFinal();
async function query(page: number, pageSize: number, filterId?: any) {
const asideParmas = unref(finalStore.getAsideValue)
const asideParmas = unref(finalStore.getAsideValue);
// 使使
const params = filterId ? { userSearchId: filterId } : asideParmas
const params = filterId ? { userSearchId: filterId } : asideParmas;
const result = await getFinalList({
sortorder: 'asc',
sortorder: "asc",
pageSize,
currPage: page,
sortname: '',
sortname: "",
...params,
})
const { data, pageCount } = result
tableData.value = data
console.log(data, 'tableData')
pagination.page = page
pagination.pageCount = pageCount
loading.value = false
});
const { data, pageCount, totalCount } = result;
tableData.value = data;
total.value = totalCount;
pagination.page = page;
pagination.pageCount = pageCount;
loading.value = false;
}
async function handlePageChange(currentPage) {
if (loading.value)
return
if (loading.value) return;
const { pageSize } = pagination
await query(currentPage, pageSize)
const { pageSize } = pagination;
await query(currentPage, pageSize);
}
async function handlePageSizeChange(currentPageSize) {
if (loading.value)
return
if (loading.value) return;
const { page } = pagination
pagination.pageSize = currentPageSize
const { page } = pagination;
pagination.pageSize = currentPageSize;
await query(page, currentPageSize)
await query(page, currentPageSize);
}
function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys
selectionIds.value = rowKeys;
}
async function computeListHeight() {
const table = unref(tableRef)
if (!table)
return
const tableEl: any = table?.$el
const headEl = tableEl.querySelector('.n-data-table-thead ')
const { bottomIncludeBody } = getViewportOffset(headEl)
const headerH = 64
let paginationH = 2
const marginH = 60
const table = unref(tableRef);
if (!table) return;
const tableEl: any = table?.$el;
const headEl = tableEl.querySelector(".n-data-table-thead ");
const { bottomIncludeBody } = getViewportOffset(headEl);
const headerH = 64;
let paginationH = 2;
const marginH = 60;
if (!isBoolean(unref(pagination))) {
const paginationEl = tableEl.querySelector(
'.n-data-table__pagination',
) as HTMLElement
".n-data-table__pagination"
) as HTMLElement;
if (paginationEl) {
const offsetHeight = paginationEl.offsetHeight
paginationH += offsetHeight || 0
}
else {
paginationH += 28
const offsetHeight = paginationEl.offsetHeight;
paginationH += offsetHeight || 0;
} else {
paginationH += 28;
}
}
let height = bottomIncludeBody - (headerH + paginationH + marginH)
const maxHeight = 800
height = maxHeight && maxHeight < height ? maxHeight : height
deviceHeight.value = height
let height = bottomIncludeBody - (headerH + paginationH + marginH);
const maxHeight = 800;
height = maxHeight && maxHeight < height ? maxHeight : height;
deviceHeight.value = height;
}
useWindowSizeFn(computeListHeight)
useWindowSizeFn(computeListHeight);
const maxHeight = computed(() => {
return tableData.value.length ? `${unref(deviceHeight)}px` : 'auto'
})
return tableData.value.length ? `${unref(deviceHeight)}px` : "auto";
});
query(pagination.page, pagination.pageSize)
query(pagination.page, pagination.pageSize);
const customTabelRef = ref(null)
const importExcelRef = ref(null)
const rejectModalRef = ref(null)
const repeatModalRef = ref(null)
const repeatTaskTableModalRef = ref(null)
const customTabelRef = ref(null);
const importExcelRef = ref(null);
const rejectModalRef = ref(null);
const repeatModalRef = ref(null);
const repeatTaskTableModalRef = ref(null);
function showModal(modalRef: any) {
const modal = unref(modalRef)! as any
modal.showModal()
const modal = unref(modalRef)! as any;
modal.showModal();
}
const popover = ref<ComponentRef | null>(null)
const popover = ref<ComponentRef | null>(null);
function importHandler() {
(popover.value as any).setShow(false)
showModal(importExcelRef)
(popover.value as any).setShow(false);
showModal(importExcelRef);
}
function exportHandler() {
loading.value = true
import('@/utils/exportExcel').then((excel) => {
loading.value = true;
import("@/utils/exportExcel").then((excel) => {
const tHeader = [
'任务Id',
'任务名称',
'审批节点',
'审批状态',
'图片相似度',
'提报时间',
'更新时间',
]
"任务Id",
"任务名称",
"审批节点",
"审批状态",
"图片相似度",
"提报时间",
"更新时间",
];
const filterVal = [
'id',
'name',
'approvalnode',
'approvalstatus',
'similarity',
'uptime',
'updatetime',
]
const list = tableData.value
const data = formatJson(filterVal, list)
"id",
"name",
"approvalnode",
"approvalstatus",
"similarity",
"uptime",
"updatetime",
];
const list = tableData.value;
const data = formatJson(filterVal, list);
excel.export_json_to_excel({
header: tHeader,
data,
filename: 'data',
filename: "data",
autoWidth: true,
bookType: 'xlsx',
})
loading.value = false
})
bookType: "xlsx",
});
loading.value = false;
});
}
function formatJson(filterVal, jsonDataList) {
return jsonDataList.map(v =>
return jsonDataList.map((v) =>
filterVal.map((j) => {
return v[j]
}),
)
return v[j];
})
);
}
function sucessHandler(excelData) {
const data = excelData.content.map((item) => {
const obj = {}
const obj = {};
Object.keys(item).forEach((key) => {
const k = findKey(columns, key)
obj[k] = item[key]
})
return obj
})
const k = findKey(columns, key);
obj[k] = item[key];
});
return obj;
});
tableData.value = data
tableData.value = data;
}
function commitHandler(columns) {
columnsRef.value = [
...columns,
actionsColumns,
]
formatColumns()
columnsRef.value = [...columns, actionsColumns];
formatColumns();
}
function actionHandler(action: any, row: any) {
const { key } = action
const { key } = action;
switch (key) {
case 'view':
goDetail(row)
break
case 'reset':
resetHandler()
break
case 'approval':
approvalHandler(row)
break
case 'reject':
rejectHandler(row)
break
case "view":
goDetail(row);
break;
case "reset":
resetHandler();
break;
case "approval":
approvalHandler(row);
break;
case "reject":
rejectHandler(row);
break;
default:
break
break;
}
}
// states:1234
function validate(items: any[]) {
if (items.length === 0)
return '至少选中一个任务'
if (items.length === 0) return "至少选中一个任务";
// const useInfo = userStore.getUserInfo
// const username = useInfo.loginname
@ -602,152 +587,151 @@ function validate(items: any[]) {
// return ''
// }
return null
return null;
}
function goDetail(row) {
router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } })
router.push({ name: "final-detail", query: { id: row.id, packageid: row.packageid } });
}
function resetHandler() {
dialog.info({
title: '确认提示',
content: '确认重置当前选中的任务的审批吗?',
positiveText: '确定',
negativeText: '取消',
title: "确认提示",
content: "确认重置当前选中的任务的审批吗?",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: async () => {
// TODO
// const result = await resetApproval()
},
onNegativeClick: () => {},
})
});
}
function getSelectItems() {
return tableData.value.filter(item => selectionIds.value.includes(item.id))
return tableData.value.filter((item) => selectionIds.value.includes(item.id));
}
function approvalHandler(row) {
// const items = getSelectItems()
const items = [row]
const msg = validate(items)
const items = [row];
const msg = validate(items);
if (msg !== null) {
message.error(msg)
return
message.error(msg);
return;
}
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
title: "确认提示",
content: "确认给该任务审批为【通过】吗?",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: () => {
approval(items)
approval(items);
},
onNegativeClick: () => {},
})
});
}
function batchApproval() {
const items = getSelectItems()
const msg = validate(items)
const items = getSelectItems();
const msg = validate(items);
if (msg !== null) {
message.error(msg)
return
message.error(msg);
return;
}
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
title: "确认提示",
content: "确认给该任务审批为【通过】吗?",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: () => {
approval(items)
approval(items);
},
onNegativeClick: () => {},
})
});
}
function approval(items) {
const formIds: string[] = items.map(item => item.id)
const taskIds: string[] = items.map(item => item.taskId)
const tasknames: string[] = items.map(item => item.taskname)
const formIds: string[] = items.map((item) => item.id);
const taskIds: string[] = items.map((item) => item.taskId);
const tasknames: string[] = items.map((item) => item.taskname);
const param: ApprovalParam = {
formid: formIds,
taskId: taskIds,
approvd: true,
taskComment: 'approval',
taskComment: "approval",
taskname: tasknames,
}
};
doAudit(param)
doAudit(param);
}
function rejectHandler(row) {
// const items = getSelectItems()
const items = [row]
const msg = validate(items)
const items = [row];
const msg = validate(items);
if (msg !== null) {
message.error(msg)
return
message.error(msg);
return;
}
const modal = unref(rejectModalRef)! as any
modal.showModal()
const modal = unref(rejectModalRef)! as any;
modal.showModal();
}
function reject(idOrDesc: string, backId: string, isOther: boolean) {
const items = getSelectItems()
const formIds: string[] = items.map(item => item.id)
const taskIds: string[] = items.map(item => item.fromtaskid)
const tasknames: string[] = items.map(item => item.fromtaskname)
const items = getSelectItems();
const formIds: string[] = items.map((item) => item.id);
const taskIds: string[] = items.map((item) => item.fromtaskid);
const tasknames: string[] = items.map((item) => item.fromtaskname);
const param: ApprovalParam = {
formid: formIds,
taskId: taskIds,
approvd: false,
taskComment: idOrDesc,
taskname: isOther ? tasknames : ['其他'],
}
taskname: isOther ? tasknames : ["其他"],
};
doAudit(param)
doAudit(param);
}
function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res
if (code === 'OK')
reload()
else message.error(res.message)
})
const { code } = res;
if (code === "OK") reload();
else message.error(res.message);
});
}
function reload() {
const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
query(page!, pageSize!)
const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps;
query(page!, pageSize!);
}
watch(
() => finalStore.asideValue,
(newVal, oldVal) => {
refreshHandler()
refreshHandler();
},
{ deep: true },
)
{ deep: true }
);
function reset() {
pagination.page = 1
pagination.pageCount = 1
pagination.pageSize = 1
pagination.page = 1;
pagination.pageCount = 1;
pagination.pageSize = 1;
}
async function refreshHandler(searchId?: any) {
reset()
query(pagination.page, pagination.pageSize, searchId)
reset();
query(pagination.page, pagination.pageSize, searchId);
}
</script>
@ -759,9 +743,7 @@ async function refreshHandler(searchId?: any) {
<SvgIcon size="32" name="magnifying" @click="changeContent" />
</div>
<div>
<NButton class="xjcc" text @click="showModal(repeatModalRef)">
小结查重
</NButton>
<NButton class="xjcc" text @click="showModal(repeatModalRef)"> </NButton>
<div class="btn" @click="batchApproval">
<SvgIcon style="margin-right: 6px" size="14" name="tf" />
批量审批
@ -779,13 +761,19 @@ async function refreshHandler(searchId?: any) {
</template>
<ul class="wrapper-header-action">
<li @click="importHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">批量导入数据</span>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px"
>批量导入数据</span
>
</li>
<li @click="exportHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出待审数据</span>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px"
>导出待审数据</span
>
</li>
<li>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px"
>导出全部数据</span
>
</li>
</ul>
</n-popover>
@ -991,7 +979,7 @@ async function refreshHandler(searchId?: any) {
background: #fff;
}
}
:deep(.n-data-table .n-data-table-td.n-data-table-td--fixed-right){
:deep(.n-data-table .n-data-table-td.n-data-table-td--fixed-right) {
z-index: 100 !important;
}
</style>

@ -305,7 +305,7 @@ onMounted(() => {
:bordered="false"
>
<div class="input_wrap">
<n-input placeholder="搜索关键词" @input="leftInputHandler">
<n-input placeholder="关键词搜索" @input="leftInputHandler">
<template #suffix>
<SvgIcon size="14px" name="magnifying-1-color999" />
</template>
@ -341,7 +341,7 @@ onMounted(() => {
<span class="textbtnStyle" @click="clearDragSource"></span>
</template>
<div class="input_wrap">
<n-input placeholder="搜索关键词" @input="rightInputHandler">
<n-input placeholder="关键词搜索" @input="rightInputHandler">
<template #suffix>
<SvgIcon size="14px" name="magnifying-1-color999" />
</template>
@ -399,7 +399,7 @@ onMounted(() => {
background: #507AFD !important;
}
.n-button--default-type{
background: #CAD2DD !important;
background: #fff !important;
color: #333333;
}
}
@ -407,6 +407,7 @@ onMounted(() => {
&-info {
font-weight: bold;
position: relative;
font-size: 14px;
&:before {
background-color: #1980FF;
@ -468,7 +469,8 @@ onMounted(() => {
--n-padding-bottom: 12px;
}
::v-deep(.n-card > .n-card-header .n-card-header__main){
font-weight: bolder !important;
font-weight: lighter !important;
font-size: 14px;
}
::v-deep(.n-scrollbar){
border-left: 1px solid #cad2dd !important;
@ -491,5 +493,7 @@ onMounted(() => {
height: 44px !important;
}
}
::v-deep(.n-button--info-type){
background: #507AFD !important;
}
</style>

@ -63,7 +63,7 @@ const columns: DataTableColumns<RowData> = [
{
title: "创建时间",
key: "createtime",
width: 180
width: 180,
},
{
title: "更新者",
@ -72,10 +72,10 @@ const columns: DataTableColumns<RowData> = [
{
title: "更新时间",
key: "updatetime",
width: 180
width: 180,
},
];
const total = ref(0);
const loading = ref(true);
const pagination = reactive({
page: 1,
@ -83,7 +83,6 @@ const pagination = reactive({
pageSize: 10,
showSizePicker: true,
pageSizes: [
{
label: "10 每页",
value: 10,
@ -102,6 +101,7 @@ const pagination = reactive({
},
],
showQuickJumper: true,
prefix: () => `${total.value} 条数据`,
});
const tableData = ref<Array<RowData>>([]);
const keyword = ref("");
@ -111,9 +111,10 @@ async function query(page: number, pageSize: number) {
search_searchname: { value: keyword.value, op: "like", type: "string" },
};
const result = await getConditionList({ pageNo: page, pageSize }, searchParam, 0);
const { data, pageCount } = result;
const { data, pageCount, total } = result;
tableData.value = data;
pagination.page = page;
total.value = total;
pagination.pageCount = pageCount;
loading.value = false;
}

@ -164,7 +164,7 @@ async function featchList() {
upname: item.upname,
ocrPictureclass: item.ocrPictureclass,
uphead: item.uphead,
similar: item.similarityscore || 0,
similar: item.similarityscore || -1,
imgName: item.imgname
}
})
@ -203,45 +203,39 @@ async function oneCheck() {
const asideVal = cloneDeep(configStore.getAsideValue)
asideVal.izyear = dayjs(asideVal.izyear[0]).format("YYYY/MM/DD") + '-' + dayjs(asideVal.izyear[1]).format("YYYY/MM/DD")
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
const checkingTaskModal = checkingTaskModalRef.value as any
delete asideVal.izsimilarity
if (checkDuplicateNo.value) {
getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => {
if (res.code === "OK") {
checkTaskStatus.value = res.data.status // 1. 2.
if (isRefresh.value === false) {
const modal = packageModalRef.value as any
modal.showModal()
return
}
if (checkTaskStatus.value === 2 && isRefresh) {
checkingTaskModal.closeModal()
tasksLoadingModal.closeModal()
isRefresh.value = false
message.success('任务执行完毕,正在刷新数据...');
reset()
loadMore()
} else if (checkTaskStatus.value === 1) {
checkingTaskModal.showModal()
tasksLoadingModal.showModal()
return
}
}
})
return
// ,,..
if(checkDuplicateNo.value && checkTaskStatus.value && checkTaskStatus.value===1){
tasksLoadingModal.showModal()
return;
}
checkingTaskModal.showModal()
tasksLoadingModal.showModal()
//
oneClickCheckTaskPackage(asideVal).then((res) => {
if (res.code === "OK") {
checkDuplicateNo.value = res.data.checkDuplicateNo
checkTaskStatus.value = res.data.status
tasksLoadingModal.showModal()
} else {
message.error(res.message || '查重失败')
}
})
}
/**
* 显示添加任务包
*/
async function showAddPackage() {
const modal = packageModalRef.value as any
modal.showModal()
}
//,
async function tasksLoadingCloseCallback() {
const checkingTaskModal = checkingTaskModalRef.value as any
checkingTaskModal.showModal()
}
async function showLoginSuccessModal() {
const modal = LoginSuccessModalRef.value as any
// modal.showModal()
@ -260,6 +254,9 @@ async function commitHandler(settingParam) {
message.success(res.data);
modal.closeModal()
finishModal.showModal()
//
checkDuplicateNo.value='';
checkTaskStatus.value = null;
}
})
const asideVal = configStore.getAsideValue
@ -381,13 +378,47 @@ function previewHandler(index: number, event: MouseEvent) {
if (imageRef.value?.[index] && (imageRef.value[index] as any).src)
(imageRef.value?.[index] as any).mergedOnClick();
}
/**
* 检查查重状态
*/
function refresh(val) {
oneCheck()
// delete asideVal.izsimilarity
const checkingTaskModal = checkingTaskModalRef.value as any
if (checkDuplicateNo.value) {
getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => {
if (res.code === "OK") {
checkTaskStatus.value = res.data.status // 1. 2.
// if (isRefresh.value === false) {
// const modal = packageModalRef.value as any
// modal.showModal()
// return
// }
if (checkTaskStatus.value === 2 && isRefresh) {
checkingTaskModal.closeModal()
isRefresh.value = false
message.success('任务执行完毕,正在刷新数据...');
reset()
loadMore()
} else if (checkTaskStatus.value === 1) {
// checkingTaskModal.showModal()
return
}
}
})
return
}
}
/**
* 取消查重任务
*/
function cancel(val) {
if (checkTaskStatus.value === 1) {
removeCheckDuplicate(checkDuplicateNo.value).then((res) => {
if (res.code === "OK") {
checkDuplicateNo.value='';
checkTaskStatus.value = null;
message.success("查重任务取消成功")
}
})
@ -406,17 +437,17 @@ function cancel(val) {
<SvgIcon v-show="checkTaskStatus !== 2" style="cursor: pointer;" size="105" name="yijianchachong"
@click="oneCheck" />
<SvgIcon v-show="checkTaskStatus === 2" style="cursor: pointer;" size="105" name="shengchengrenwubao"
@click="oneCheck" />
@click="showAddPackage" />
</div>
<div class="wrapper-content">
<div style="display: flex;justify-content: space-between;">
<div class="form">
<n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click">
<!-- <n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click">
<div class="dropdown">
<span>{{ timeLabel || '请选择' }}</span>
<SvgIcon class="gap" name="arrow-botton" size="14" />
</div>
</n-popselect>
</n-popselect> -->
<n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
<div class="dropdown">
<!-- <span>{{ viewLabel || '请选择' }}</span> -->
@ -449,7 +480,7 @@ function cancel(val) {
<n-image class="img" :img-props="{ onClick: hideDownload }"
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
:preview-src="item.imgUrl" :src="item.thumburl" ref="imageRef" />
<div class="percent">
<div class="percent" v-if="item.simila!=-1">
<SvgIcon size="42" name="tag" />
<div class="val">
{{ `${item.similar}%` }}
@ -484,7 +515,7 @@ function cancel(val) {
</div>
<PackageSettingsModal ref="packageModalRef" @commit="commitHandler" />
<GeneratePackageModal ref="generateModalRef" />
<QueryRepeatedTasksModal ref="queryRepeatedTasksModalRef" />
<QueryRepeatedTasksModal ref="queryRepeatedTasksModalRef" @closeCallback="tasksLoadingCloseCallback"/>
<LoginSuccessModal ref="LoginSuccessModalRef" />
<FinishPackageModal ref="finishPackageModal" />
<CheckingTaskModal ref="checkingTaskModalRef" @refresh="refresh" @cancel="cancel" />

@ -45,7 +45,7 @@ defineExpose({
<template>
<div>
<n-modal v-model:show="show" transform-origin="center" style="position: fixed;right: 0;bottom: 0;">
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true" style="padding: 8px 8px 0 8px;">
<div class="wrapper">
<div class="title">查重进度</div>

@ -29,7 +29,7 @@ defineExpose({
<template>
<div>
<n-modal v-model:show="show" 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">
<div style="display: flex;">
<div><svg-icon size="80" name="robot2" /></div>
@ -78,4 +78,5 @@ defineExpose({
color: #666666;
line-height: 22px;
}
</style>

@ -1,6 +1,12 @@
<script lang="ts" setup>
import { ref } from 'vue';
const emit = defineEmits<{
(e: 'closeCallback', value: any),
}>()
const show = ref(false)
const stys = {
@ -20,16 +26,20 @@ function showModal() {
function closeModal() {
show.value = false
emit('closeCallback', true)
}
defineExpose({
showModal,
closeModal,
})
</script>
<template>
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center">
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center">
<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;"/>
<div class="wrapper">
@ -48,4 +58,5 @@ defineExpose({
justify-content: center;
align-items: center;
}
</style>

@ -266,7 +266,7 @@ function forget() {
</template>
</n-input>
</n-form-item>
<n-form-item class="form-item">
<!-- <n-form-item class="form-item"> -->
<n-button
:class="{ 'btn-disabled': computedForm() }"
class="btn"
@ -278,7 +278,7 @@ function forget() {
>
下一步
</n-button>
</n-form-item>
<!-- </n-form-item> -->
</n-form>
</div>
<div v-if="tab === 1" class="form-1">
@ -347,8 +347,7 @@ function forget() {
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.04);
backdrop-filter: blur(12px);
position: relative;
padding: 3rem 1.6875rem 2.625rem;
padding: 3rem 1.6875rem 2rem;
.img-close {
position: absolute;
right: 0;
@ -357,7 +356,6 @@ function forget() {
height: 1.75rem;
cursor: pointer;
}
.tab {
font-size: 1.5rem;
font-family: PingFang SC, PingFang SC-Medium;
@ -389,8 +387,8 @@ function forget() {
height: 2.75rem;
background: linear-gradient(234deg, #96aaff 0%, #1c43ff 100%);
border-radius: 3px;
margin-top: .625rem;
margin-bottom: .875rem;
margin-top: 1rem;
// margin-bottom: .875rem;
font-size: 1rem;
&-disabled {
opacity: 0.5;
@ -436,4 +434,27 @@ function forget() {
line-height: 1.3125rem;
cursor: pointer;
}
//
::v-deep(.n-base-clear > .n-base-clear__clear > .n-base-icon > svg) {
color: #c9c9c9;
}
::v-deep(.n-input .n-input__input-el) {
height: 2.75rem !important;
font-size: 1rem !important;
}
::v-deep(.n-input .n-input-wrapper) {
height: 2.75rem !important;
}
.save-btn {
font-size: 0.9375rem;
}
::v-deep(.n-form-item .n-form-item-feedback-wrapper) {
height: 1rem;
padding: 0 !important;
margin: 0 !important;
line-height: normal !important;
min-height: 0 !important;
// margin-bottom: .5rem;
}
</style>

@ -8,6 +8,7 @@ import { PageEnum } from "@/enums/pageEnum";
import { useUserStore } from "@/store/modules/user";
import { ResultEnum } from "@/enums/httpEnum";
import { getCode, smsLogin } from "@/api/login/login";
import SvgIcon from "@/components/Icon/SvgIcon.vue";
const emit = defineEmits(["close", "forget"]);
interface FormState {
@ -54,96 +55,86 @@ const tab = ref(0);
const countTime = ref("获取验证码");
const rules = {
enterprisecode: [
{ required: true, message: "请输入企业编码", trigger: "blur" },
{
trigger: ["blur","input","change"],
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value) {
if (loginSuccess.value || !value) {
return true;
}
if (!value) {
return new Error("请输入企业编码");
}
return new Error(loginRejectMessge.value);
},
},
],
agentcode: [
{ required: true, message: "请输入验证码", trigger: "blur" },
{
trigger: ["blur","input","change"],
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value) {
if (loginSuccess.value || !value) {
return true;
}
if (!value) {
return new Error("请输入验证码");
}
return new Error(loginRejectMessge.value);
},
},
],
phone: [
{
trigger: ["blur","input","change"],
{ required: true, message: "请输入手机号", trigger: "blur" },
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value) {
if (loginSuccess.value || !value) {
return true;
}
if (!value) {
return new Error("请输入手机号");
}
return new Error(loginRejectMessge.value);
},
},],
},
],
phonecode: [
{ required: true, message: "请输入验证码", trigger: "blur" },
{
trigger: ["blur","input","change"],
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (value.length < 4 && value.length > 0) {
return new Error("请正确填写4位手机短信验证码");
}
if (loginSuccess.value) {
if (loginSuccess.value || !value) {
return true;
}
if (!value) {
return new Error("请输入验证码");
}
return new Error(loginRejectMessge.value);
},
},
],
username: [
{ required: true, message: "请输入账号", trigger: "blur" },
{
trigger: ["blur","input","change"],
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value) {
if (loginSuccess.value || !value) {
return true;
}
if (!value) {
return new Error("请输入账号");
}
return new Error(loginRejectMessge.value);
},
},
],
password: [
{
trigger: ["blur","input","change"],
{ required: true, message: "请输入密码", trigger: "blur" },
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (loginSuccess.value) {
if (loginSuccess.value || !value) {
return true;
}
if (!value) {
return new Error("请输入密码");
}
return new Error(loginRejectMessge.value);
},
},],
},
],
captcha: [{ required: true, message: "请输入验证码", trigger: "blur" }],
};
@ -506,7 +497,7 @@ function forget() {
<style lang="less" scoped>
.form-login {
width: 26.25rem;
height: 28.0625rem;
height: 26.0625rem;
box-sizing: border-box;
background: linear-gradient(
136deg,
@ -572,7 +563,7 @@ function forget() {
margin-top: 1.8125rem;
.form-item {
height: 4.75rem;
height: 3.75rem;
}
.item-input {
@ -589,7 +580,7 @@ function forget() {
height: 2.75rem;
background: linear-gradient(234deg, #96aaff 0%, #1c43ff 100%);
border-radius: 3px;
// margin-top: 1rem;
margin-top: 1rem;
// margin-bottom: -0.875rem;
&-disabled {

@ -90,12 +90,12 @@ function close() {
<div class="subtitle">探索更多功能</div>
</div>
</div>
<img class="item-footer" src="../../assets/images/login/footer.png" alt="" />
</div>
<n-modal v-model:show="show" :mask-closable="false">
<Login v-if="ifLogin" @close="close" @forget="ifLogin = !ifLogin" />
<Forget v-else @close="close" @forget="ifLogin = !ifLogin" />
</n-modal>
<img class="item-footer" src="../../assets/images/login/footer.png" alt="" />
</div>
</template>
@ -105,6 +105,8 @@ function close() {
background-repeat: no-repeat;
background-size: cover;
height: 56.25rem;
position: absolute;
width: 100%;
.f-c-c {
display: flex;
@ -287,7 +289,8 @@ function close() {
.item-footer {
width: 60.625rem;
height: 7.4375rem;
position: fixed;
position: absolute;
// position: fixed;
left: 44.5rem;
bottom: 0;
margin-left: -30.3125rem;

@ -43,7 +43,7 @@ const tab = ref(1)
async function getList() {
const res = await getMessageList({
pageNo: state.pageNo,
pageSize: '10',
pageSize: '7',
msgCategory: tab.value,
})
if (res.code === 'OK') {

@ -1,87 +1,85 @@
<script lang="ts" setup>
import { useTaskStore } from "@/store/modules/task";
import { debounce } from "lodash-es";
import { computed, onMounted, ref, unref, watch, shallowRef } from "vue";
import CustomFieldModal from "../modal/CustomFieldModal.vue";
import type { AsideEntity } from "@/config/aside";
import { useUser } from "@/store/modules/user";
import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter";
import TaskList from "./TaskList.vue";
import AdvanceFilter from "../../home/aside/comp/AdvanceFilter.vue";
import { debounce } from 'lodash-es'
import { computed, onMounted, ref, shallowRef, unref, watch } from 'vue'
import CustomFieldModal from '../modal/CustomFieldModal.vue'
import AdvanceFilter from '../../home/aside/comp/AdvanceFilter.vue'
import {
CustomFilterModalVue,
FilterModalVue,
NewFilterModalVue,
} from "../../home/aside/comp/modals";
} from '../../home/aside/comp/modals'
import TaskList from './TaskList.vue'
import type { AsideEntity } from '@/config/aside'
import { useUser } from '@/store/modules/user'
import { getAllfieldList, getfieldList } from '@/api/home/filter'
import emitter from "@/utils/mitt";
import { useTaskStore } from '@/store/modules/task'
const CustomFieldModalRef = ref(null);
const collapse = ref(false);
const taskStore = useTaskStore();
const taskListRef = ref<HTMLDivElement | null>(null);
import emitter from '@/utils/mitt'
const CustomFieldModalRef = ref(null)
const collapse = ref(false)
const taskStore = useTaskStore()
const taskListRef = ref<HTMLDivElement | null>(null)
//
const showFieldList = ref<any[]>([]);
const showFieldList = ref<any[]>([])
function collapseHandler() {
collapse.value = !collapse.value;
collapse.value = !collapse.value
}
const asideWidth = computed(() => {
return collapse.value ? 0 : 308;
});
return collapse.value ? 0 : 308
})
const asideStyle = computed(() => {
return {
width: `${asideWidth.value}px`,
};
});
}
})
const collapseIcon = computed(() => {
return collapse.value ? "expand-cir" : "collapse-cir";
});
return collapse.value ? 'expand-cir' : 'collapse-cir'
})
const asideEnter = ref(false);
const asideEnter = ref(false)
const showCollapse = computed(() => {
return collapse.value ? true : asideEnter.value;
});
return collapse.value ? true : asideEnter.value
})
watch(
() => taskStore.immersion,
() => {
collapse.value = true;
}
);
collapse.value = true
},
)
function showFilter() {
const modal = unref(CustomFieldModalRef)! as any;
modal.showModal();
const modal = unref(CustomFieldModalRef)! as any
modal.showModal()
}
const showSearch = ref(false);
const showSearch = ref(false)
function setShowSearch(value: boolean) {
showSearch.value = value;
showSearch.value = value
}
const inputHandler = debounce((word) => {
(taskListRef.value as any).search(word);
}, 500);
(taskListRef.value as any).search(word)
}, 500)
const reviewType = 2;
const reviewType = 2
async function getshowFieldList() {
showFieldList.value = [];
const userStore = useUser();
const userInfo = userStore.getUserInfo;
let res;
res = await getAllfieldList(reviewType); //
const allList = res.data;
res = await getfieldList(reviewType, userInfo.id); //
const useList = res.data;
showFieldList.value = []
const userStore = useUser()
const userInfo = userStore.getUserInfo
let res
res = await getAllfieldList(reviewType) //
const allList = res.data
res = await getfieldList(reviewType, userInfo.id) //
const useList = res.data
/**
* name 标题
* id 键值
@ -89,60 +87,61 @@ async function getshowFieldList() {
* checked 是否选中
*/
if (useList.userFieldFixed) {
useList.userFieldFixed?.split(",").map((v) => {
let item = allList.find((v2) => v2.name == v);
useList.userFieldFixed?.split(',').map((v) => {
let item = allList.find(v2 => v2.name == v)
if (item) {
item = {
name: item.fieldDesc,
id: item.name,
fix: item.isrequired == 2,
checked: true,
};
showFieldList.value.push(item);
}
showFieldList.value.push(item)
}
});
} else {
})
}
else {
//
allList.map((v) => {
if (v.isrequired == 2) {
let item = {
const item = {
name: v.fieldDesc,
id: v.name,
fix: v.isrequired == 2,
checked: true,
};
showFieldList.value.push(item);
}
showFieldList.value.push(item)
}
});
})
}
}
onMounted(() => {
getshowFieldList();
});
getshowFieldList()
})
// key
function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`);
element?.scrollIntoView(true);
const element = document.querySelector(`#${key}`)
element?.scrollIntoView(true)
}
//
function filterHandler(searchId: string) {
emitter.emit("filter", searchId);
emitter.emit('filter', searchId)
}
function showModal(modalRef: any) {
const modal = unref(modalRef)! as any;
modal.showModal();
const modal = unref(modalRef)! as any
modal.showModal()
}
//
const showItems = shallowRef<{ key: string; config: AsideEntity }[]>([]);
const filterModalRef = ref(null);
const newFilterModalRef = ref(null);
const customModalRef = ref(null);
const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([])
const filterModalRef = ref(null)
const newFilterModalRef = ref(null)
const customModalRef = ref(null)
function editFilter(filter: any) {
const modal = unref(newFilterModalRef)! as any;
modal.showModal();
modal.edit(filter);
const modal = unref(newFilterModalRef)! as any
modal.showModal()
modal.edit(filter)
}
</script>
@ -209,14 +208,14 @@ function editFilter(filter: any) {
</div>
<TaskList
ref="taskListRef"
:showFieldList="showFieldList"
:show-field-list="showFieldList"
style="height: calc(100vh - 146px)"
class="work-sheet-list"
/>
<CustomFieldModal
ref="CustomFieldModalRef"
:reviewType="reviewType"
@onOk="getshowFieldList"
:review-type="reviewType"
@on-ok="getshowFieldList"
/>
<!-- 过滤列表 -->
<FilterModalVue
@ -243,6 +242,7 @@ function editFilter(filter: any) {
padding: 12px 16px;
width: 100%;
overflow: hidden;
border-bottom: 1px solid #e8e8e8;
.warpper {
display: flex;

@ -1,8 +1,8 @@
<script lang="ts" setup>
import { format } from "date-fns";
import { computed } from "vue";
import { format } from 'date-fns'
import { computed } from 'vue'
defineOptions({ name: "ListItem" });
defineOptions({ name: 'ListItem' })
const props = defineProps({
selected: {
@ -14,23 +14,22 @@ const props = defineProps({
required: true,
},
showFieldList: {
type: Array,
type: Array as any,
default: () => [],
},
});
})
console.log(props.showFieldList)
console.log(props.listItem)
const svgName = computed(() => {
return props.selected ? "task-select" : "task";
});
return props.selected ? 'task-select' : 'task'
})
</script>
<template>
<div class="list-item" :class="{ 'list-item-selected': selected }">
<div v-for="(item, index) in showFieldList" :key="index">
<div v-if="item.id == 'fromtaskname'" class="list-item-header">
<div style="display: flex">
<div v-if="item.id === 'fromtaskname'" class="list-item-header">
<div class="id-wrap">
<SvgIcon :name="svgName" size="28" />
<span
class="list-item-header-name"
@ -41,26 +40,25 @@ const svgName = computed(() => {
</div>
<!-- <SvgIcon v-show="selected" size="14" name="more-ver" /> -->
</div>
<ul class="list-item-detail" v-else>
<li v-if="item.id == 'statshisText'">
<ul v-else class="list-item-detail">
<li v-if="item.id === 'statshisText'">
审批状态<span
class="list-item-status"
:class="
listItem.statshisText == '通过'
? 'list-item-success'
: listItem.statshisText == '不通过'
? 'list-item-error'
: 'list-item-watting'
"
>{{ listItem.statshisText }}</span
>
class="list-item-status"
:class="
listItem.statshisText === '通过'
? 'list-item-success'
: listItem.statshisText === '不通过'
? 'list-item-error'
: 'list-item-watting'
"
>{{ listItem.statshisText }}</span>
</li>
<li v-else-if="item.id === 'createdate'">
提交时间{{ format(listItem.createdate, "yyyy-MM-dd HH:mm:ss") }}
</li>
<li v-else class="ellipsis">
<span class="label">{{ item.name }}</span>{{ listItem[item.id] }}
</li>
<li v-else-if="item.id == 'createdate'">
提交时间{{ format(listItem.createdate, "yyyy-MM-dd HH:mm:ss") }}
</li>
<li v-else>
{{ item.name }}{{ listItem[item.id] }}
</li>
</ul>
</div>
@ -109,6 +107,24 @@ const svgName = computed(() => {
display: flex;
align-items: center;
.id-wrap{
display: flex;
align-items: center;
margin-bottom: 6px
}
.list-item-header-name{
width: 226px;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #333333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0;
}
&-name {
font-size: 16px;
font-weight: bold;
@ -118,12 +134,29 @@ const svgName = computed(() => {
}
&-selected {
color: #507afd;
color: #507afd!important;
}
}
.label{
font-size: 13px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #666666;
line-height: 18px;
}
.ellipsis{
display: block;
width: 226px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
&-selected {
background-color: #f2f5fe;
background: rgba(68,113,232,0.07);
}
&-status {

@ -5,9 +5,10 @@ import { useDialog, useMessage } from 'naive-ui'
import { useRoute } from 'vue-router'
import BatchModal from '../modal/BatchModal.vue'
import { getAllfieldList, getfieldList } from '@/api/home/filter'
import { TASK_STATUS_OBJ } from '@/enums/index'
import { audit, dubiousfileyd } from '@/api/task/task'
import { getTaskDetailInfo, getTaskDetailPictureList } from '@/api/work/work'
import { audit, dubiousfileyd, getSimilarityList, getTaskDetailInfo } from '@/api/task/task'
import { getTaskDetailPictureList } from '@/api/work/work'
import { useTask } from '@/store/modules/task'
import { useUser } from '@/store/modules/user'
import { isEmpty } from '@/utils'
@ -32,9 +33,9 @@ const CustomSettingModalRef = ref(null)
const taskTableData = ref<any[]>([])
const route = useRoute()
const sortBy: PictureSortParam = {
orderbyname: 'asc',
orderbyvalue: 'pictureResult',
const sortBy: any = {
orderType: 'asc',
orderName: 'similarityScore',
}
function setBatch(value: boolean) {
@ -78,10 +79,21 @@ const imageRef = ref<ComponentElRef | null>()
let processItems: any[] = []
onMounted(() => {
window.addEventListener('keydown', handleKeydown)
if (route.query.id)
getDetail(route.query.id, route.query.packageid)
})
//
function handleKeydown(event) {
if (event.key === 'ArrowLeft')
backHandler()
//
else if (event.key === 'ArrowRight')
forwardHandler()
//
}
//
async function getDetail(taskId, packageid) {
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)
@ -237,7 +249,6 @@ function backHandler() {
async function handleDragEnd(event, item) {
//
const flag = taskStore.getInFile
console.log(item)
if (flag) {
const res = await dubiousfileyd({ pictureid: item.pictureid })
if (res.code === 'OK') {
@ -283,6 +294,7 @@ watch(
if (isEmpty(taskId))
return
taskDetailInfo.value = await getTaskDetailInfo(taskId, packageid)
console.log(taskDetailInfo.value)
getTableData()
// TODO mock
// let showFieldData = taskDetailInfo.value.ocrPicture;
@ -304,13 +316,14 @@ watch(
// }
// }
// }
if (!isEmpty(packageid)) {
const { data, total } = await getTaskDetailPictureList(
packageid,
taskId,
{ ...taskpagination, ...sortBy },
if (!isEmpty(taskDetailInfo.value.ocrPicture.id)) {
const { data, total } = await getSimilarityList(
{ pictureId: taskDetailInfo.value.ocrPicture.id, ...taskpagination, ...sortBy },
)
console.log(data)
taskDetailPictureList.value = data
console.log(taskDetailPictureList.value)
totalCount.value = total
}
else {
@ -320,9 +333,10 @@ watch(
},
)
// storeid
const currentTaskId = computed(() => {
const index = taskStore.getCurrentIndex
return taskStore.getApprovalList[index]?.formid || ''
return taskStore.getApprovalList[index]?.id || ''
})
function overTaskHandle() {
@ -347,6 +361,7 @@ function showActionsModal() {
onUnmounted(() => {
taskStore.reset()
window.removeEventListener('keydown', handleKeydown)
})
const mark = computed(() => {
@ -398,18 +413,43 @@ function getPercent(pictureid: string) {
<div
v-show="!showActions"
style="display: flex; align-items: center"
@click="setBatch(true)"
>
<div class="btn">
<SvgIcon style="margin-right: 6px" size="14" name="tf" />
<div class="btn" @click="setBatch(true)">
<SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批
</div>
<SvgIcon
style="cursor: pointer"
size="20"
name="immersion-model"
@click="immersionHandler"
/>
<!-- <n-popover
ref="popover"
:style="{ padding: '0px' }"
style="width: 148px"
:show-arrow="false"
placement="bottom-start"
trigger="click"
>
<template #trigger>
<div class="icon-wrap">
<SvgIcon size="20" name="more-blue" />
</div>
</template>
<ul class="wrapper-header-action">
<li @click="importHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">批量导入数据</span>
</li>
<li @click="exportHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出待审数据</span>
</li>
<li>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span>
</li>
</ul>
</n-popover> -->
<div class="icon-wrap">
<SvgIcon
size="20"
name="immersion-model"
@click="immersionHandler"
/>
</div>
</div>
<div v-show="showActions" class="batch">
<n-button text @click="setBatch(false)">
@ -466,8 +506,8 @@ function getPercent(pictureid: string) {
/>
</div>
<div class="status">
<SvgIcon v-show="taskDetailInfo?.userapprove?.statshis === 3" width="134" height="129" name="p1" />
<SvgIcon v-show="taskDetailInfo?.userapprove?.statshis === 2" width="134" height="129" name="p2" />
<img v-show="taskDetailInfo?.userapprove?.statshis === 2" class="img-status" src="@/assets/images/task/pass.png" alt="">
<img v-show="taskDetailInfo?.userapprove?.statshis === 3" class="img-status" src="@/assets/images/task/not_pass.png" alt="">
</div>
<div class="mark">
<SvgIcon
@ -483,32 +523,32 @@ function getPercent(pictureid: string) {
name="zhen"
/>
</div>
<div class="info">
<div class="info img-info">
<n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1">
<span>
<SvgIcon size="40" name="m1" />
<img class="icon-status" src="@/assets/images/task/status.png" alt="">
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span style="font-size: bold; font-size: 18px">{{ mark }}</span>
<span>审批状态</span>
<span class="value">{{ TASK_STATUS_OBJ[taskDetailInfo.states] }}</span>
<span class="label">审批状态</span>
</n-gi>
<n-gi span="4" class="gi1">
<span>
<SvgIcon size="40" name="m2" />
<img class="icon-status" src="@/assets/images/task/similarity.png" alt="">
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span style="font-size: bold; font-size: 18px">{{
<span class="value num">{{
totalCount
}}</span>
<span>相似匹配</span>
}}<span class="unit"></span> </span>
<span class="label">相似匹配</span>
</n-gi>
</n-grid>
</div>
<div class="time">
<SvgIcon color="#FFF" size="16" name="time" />
<SvgIcon class="svg-time" color="#FFF" size="16" name="time" />
<span>{{ formatToDateHMS(taskDetailInfo.createdate || 0) }}</span>
</div>
<div style="display: none">
@ -533,13 +573,13 @@ function getPercent(pictureid: string) {
<div class="list">
<div
v-for="(item, index) in taskDetailPictureList"
:key="index"
:key="item.id"
class="item"
>
<div
draggable="true"
class="img-wrapper"
:style="{ 'background-image': `url(${item.thumburl})` }"
:style="{ 'background-image': `url(${item.imgUrl})` }"
@dragend="(event) => { handleDragEnd(event, item) }"
/>
<div class="check">
@ -551,7 +591,7 @@ function getPercent(pictureid: string) {
/>
</div>
<div class="percent">
{{ getPercent(item.pictureid) }}
{{ item.similarityscore }}
</div>
</div>
</div>
@ -582,6 +622,74 @@ function getPercent(pictureid: string) {
</template>
<style lang="less" scoped>
::v-deep(.n-tabs-tab__label) {
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
color: #666666;
}
::v-deep(.n-tabs-tab--active .n-tabs-tab__label) {
color: #507AFD;
}
.wrapper-header-action {
padding: 8px;
li {
height: 32px;
line-height: 32px;
cursor: pointer;
&:hover {
background-color: #f3f8ff;
}
}
}
.icon-wrap{
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
background: rgba(80,122,253,.1);
border-radius: 8px;
margin-left: 10px;
cursor: pointer;
}
.img-info{
.icon-status{
width: 32px;
height: 32px;
}
.label{
font-size: 11px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #ffffff;
}
.value{
font-size: 15px;
font-family: PingFang SC, PingFang SC-Semibold;
font-weight: 600;
color: #ffffff;
}
.num{
font-size: 18px;
font-family: PingFang SC, PingFang SC-Semibold;
font-weight: 600;
color: #ffffff;
}
.unit{
font-size: 11px;
}
}
.wrapper {
display: flex;
flex: 1;
@ -646,11 +754,10 @@ function getPercent(pictureid: string) {
}
.font {
font-size: 18px;
font-weight: bold;
color: #333333;
line-height: 25px;
margin-left: 12px;
font-size: 20px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #0d0b22;
}
}
@ -703,7 +810,7 @@ function getPercent(pictureid: string) {
height: 119px;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
padding: 10px;
padding: 16px 0 0 23px;
color: #fff;
}
@ -712,9 +819,16 @@ function getPercent(pictureid: string) {
z-index: 3;
left: 2%;
bottom: 2%;
color: #fff;
display: flex;
align-items: center;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #ffffff;
.svg-time{
margin-right: 5px
}
}
.gi1 {
@ -739,14 +853,19 @@ function getPercent(pictureid: string) {
.status{
position: absolute;
z-index: 3;
left: 3%;
top: 3%;
left: 0;
top: 0;
.img-status{
width: 133px;
height: 129px;
}
}
}
.right {
flex: 0.5;
background: #fafafa;
background: #F6F9FD;
border-radius: 8px;
margin-left: 20px;
padding: 24px;
@ -769,7 +888,7 @@ function getPercent(pictureid: string) {
}
.item {
flex-basis: calc((100% - 48px) / 3);
// flex-basis: calc((100% - 48px) / 3);
box-sizing: border-box;
border-radius: 8px;
position: relative;
@ -777,8 +896,8 @@ function getPercent(pictureid: string) {
margin: 0px 16px 27px 0px;
.img-wrapper {
// width: 230px;
height: 130px;
width: 122px;
height: 70px;
overflow: hidden;
background-size: cover;
background-position: center;
@ -797,7 +916,9 @@ function getPercent(pictureid: string) {
.percent {
position: absolute;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
width: 35px;
height: 18px;
opacity: 0.9;
@ -807,6 +928,15 @@ function getPercent(pictureid: string) {
right: 12px;
top: 2px;
color: #fff;
font-size: 14px;
}
.percent-unit{
font-size: 8dvb;
}
.percent-red{
background: #ff4e4f;
}
}
}

@ -92,14 +92,16 @@ onMounted(() => {
<div class="card">
<n-collapse arrow-placement="right" :default-expanded-names="['1']">
<template #header-extra>
审批结果{{ getLabel(props.data.states) }}
<div class="status">
审批结果{{ getLabel(props.data.states) }}
</div>
</template>
<n-collapse-item title="收起" name="1">
<div v-for="items in props.data.userapproveList" :key="items.nodeName" class="item">
<div class="header">
<SvgIcon class="icon" name="approve" size="16" />
<div class="title">
<div class="item-title">
{{ items.nodeName }}
</div>
</div>
@ -131,11 +133,23 @@ onMounted(() => {
</template>
<style lang="less" scoped>
::v-deep(.n-timeline-item-timeline__line) {
width: 1px!important;
}
::v-deep(.n-collapse-item__header) {
flex-direction: row-reverse;
}
::v-deep(.n-collapse-item__header-main) {
flex: none!important;
}
::v-deep(.n-collapse-item__header-extra) {
flex: 1;
}
.info-header {
display: flex;
padding: 6px 0 15px 0;
align-items: center;
justify-content: space-between;
margin-bottom: 18px;
.left_box {
display: flex;
align-items: center;
@ -144,15 +158,13 @@ onMounted(() => {
align-items: center;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: Medium;
text-align: left;
font-weight: 500;
color: #333333;
line-height: 22px;
&:before {
content: "";
width: 4px;
height: 18px;
height: 12px;
background: #507afd;
border-radius: 3px;
display: inline-block;
@ -160,6 +172,18 @@ onMounted(() => {
}
}
}
.right_box {
display: flex;
align-items: center;
cursor: pointer;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
color: #666666;
.icon{
margin-left: 7px
}
}
}
.point-line{
@ -210,6 +234,14 @@ onMounted(() => {
padding: 16px;
}
.status{
font-size: 14px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
text-align: center;
color: #333333;
}
.point{
width: 4px;
height: 4px;
@ -218,6 +250,13 @@ onMounted(() => {
margin-right: 6px;
}
.item-title{
font-size: 14px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #333333;
}
.header{
display: flex;
align-items: center;

@ -8,6 +8,13 @@ defineProps({
</script>
<template>
<div class="info-header">
<div class="left_box">
<div class="title">
基本信息
</div>
</div>
</div>
<table class="description">
<tr>
<th>图片名称</th>
@ -15,15 +22,13 @@ defineProps({
{{ data?.ocrPicture?.imgname }}
</td>
<th>图片格式</th>
<td class="blue">
</td>
<td class="blue" />
</tr>
<tr>
<th>图片大小</th>
<td></td>
<td />
<th>图片尺寸</th>
<td></td>
<td />
</tr>
<tr>
<th>上传时间</th>
@ -33,18 +38,62 @@ defineProps({
</tr>
<tr>
<th>标记时间</th>
<td> </td>
<td />
<th>色彩空间</th>
<td>{{ data?.ocrPicture?.space }}</td>
</tr>
<tr>
<th>来源</th>
<td> {{ data?.ocrPicture?.source }}</td>
<th>
来源
</th>
<td colspan="3">
{{ data?.ocrPicture?.source }}
</td>
</tr>
</table>
</template>
<style lang="less" scoped>
.info-header {
display: flex;
padding: 6px 0 15px 0;
align-items: center;
justify-content: space-between;
.left_box {
display: flex;
align-items: center;
.title {
display: flex;
align-items: center;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #333333;
&:before {
content: "";
width: 4px;
height: 12px;
background: #507afd;
border-radius: 3px;
display: inline-block;
margin-right: 10px;
}
}
}
.right_box {
display: flex;
align-items: center;
cursor: pointer;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
color: #666666;
.icon{
margin-left: 7px
}
}
}
.description {
width: 100%;
font-size: 14px;
@ -54,16 +103,24 @@ th {
width: 20%;
background-color: #fafafa;
color: #666666;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
line-height: 22px;
}
td {
width: 30%;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
color: #666666;
}
th,
td {
border: 1px solid #ebebeb;
padding: 12px 24px;
padding: 10px 24px;
text-align: left;
}

@ -8,7 +8,8 @@ import { useMessage } from 'naive-ui'
import { timeOptions, viewOptions } from '@/config/home'
import { off, on } from '@/utils/domUtils'
import { useTask } from '@/store/modules/task'
import { getTaskDetailInfo, getTaskDetailPictureList } from '@/api/work/work'
import { getTaskDetailPictureList } from '@/api/work/work'
import { getTaskDetailInfo } from '@/api/task/task'
import type { PictureSortParam } from '/#/api'
import emitter from '@/utils/mitt'

@ -2,10 +2,9 @@
import { getAllfieldList, getfieldList, savefield } from "@/api/home/filter";
import { workPackageMap } from "@/config/workorder";
import { useUser } from "@/store/modules/user";
import { difference } from "lodash-es";
import { difference, cloneDeep } from "lodash-es";
import { computed, defineEmits, defineProps, onMounted, ref, watch } from "vue";
import { VueDraggable } from "vue-draggable-plus";
const props = defineProps({
reviewType: {
type: Number,
@ -23,6 +22,10 @@ const onList = ref<any[]>([]);
//
const fixList = ref<any[]>([]);
const offShowList = ref<any[]>([]);
const onShowList = ref<any[]>([]);
const fixShowList = ref<any[]>([]);
const allCount = computed(() => {
return `全部筛选(共${offList.value.length - 1}个)`;
});
@ -128,22 +131,38 @@ const selectIds = ref<string[]>([]);
function onCheckAllChange(value) {
const ids: string[] = [];
for (const item of offList.value) {
if (!item.fix) {
item.checked = value;
ids.push(item.id);
}
}
for (const item of offShowList.value) {
if (!item.fix) {
item.checked = value;
ids.push(item.id);
}
}
selectIds.value = value ? ids : [];
if (value) {
offList.value.map((v) => {
if (!v.checked) {
onList.value.push(v);
}
});
onShowList.value = cloneDeep(onList.value)
} else {
onList.value = [];
onShowList.value = [];
}
}
function onCheckChange(checked: any, item: any) {
const index = selectIds.value.indexOf(item.id);
item.checked = checked;
let currentIndex = offList.value.findIndex(v=>v.id == item.id)
offList.value[currentIndex].checked = item.checked;
if (index === -1 && checked) selectIds.value.push(item.id);
else selectIds.value.splice(index, 1);
}
@ -177,12 +196,14 @@ watch(
});
}
}
onShowList.value = cloneDeep(onList.value);
} else {
const list = onList.value;
for (let index = 0; index < list.length; index++) {
const item = list[index];
if (!item.fix && diff.includes(item.id)) {
list.splice(index, 1);
onShowList.value.splice(index, 1);
index--;
}
}
@ -213,6 +234,7 @@ function clearDragSource() {
onList.value = onList.value.filter((item) => {
return item.fix === true;
});
onShowList.value = cloneDeep(onList.value);
}
function removeHandler(id: string) {
@ -221,11 +243,11 @@ function removeHandler(id: string) {
});
if (index !== -1) onList.value.splice(index, 1);
index = offList.value.findIndex(v=>v.id==id);
index = offList.value.findIndex((v) => v.id == id);
offList.value[index].checked = false;
offShowList.value = cloneDeep(offList.value)
}
onMounted(async () => {
const getData = async (type = "") => {
const userStore = useUser();
const userInfo = userStore.getUserInfo;
let res;
@ -241,46 +263,81 @@ onMounted(async () => {
*/
const userFieldFixed = useList.userFieldFixed?.split(",");
const userFieldUnFixed = useList.userFieldUnFixed?.split(",");
allList.map((v) => {
let item = {
name: v.fieldDesc,
id: v.name,
fix: v.isrequired == 2,
checked:
v.isrequired == 2 ||
Boolean(userFieldFixed?.find(v2=>v2==v.name)) ||
Boolean(userFieldUnFixed?.find(v2=>v2==v.name))
};
if (item.fix) {
fixList.value.push(item);
} else {
offList.value.push(item);
}
});
offList.value.unshift(...fixList.value);
useList.userFieldFixed?.split(",").map((v) => {
let item = allList.find((v2) => v2.name == v);
if (item) {
item = {
name: item.fieldDesc,
id: item.name,
fix: item.isrequired == 2,
checked: true,
if (!type || type == "off") {
offList.value = [];
allList.map((v) => {
let item = {
name: v.fieldDesc,
id: v.name,
fix: v.isrequired == 2,
checked:
v.isrequired == 2 ||
Boolean(userFieldFixed?.find((v2) => v2 == v.name)) ||
Boolean(userFieldUnFixed?.find((v2) => v2 == v.name)),
};
selectIds.value.push(item.id);
if (!item.fix) {
onList.value.push(item);
if (item.fix) {
fixList.value.push(item);
} else {
offList.value.push(item);
}
});
offList.value.unshift(...fixList.value);
}
if (!type || type == "on") {
useList.userFieldFixed?.split(",").map((v) => {
let item = allList.find((v2) => v2.name == v);
if (item) {
item = {
name: item.fieldDesc,
id: item.name,
fix: item.isrequired == 2,
checked: true,
};
selectIds.value.push(item.id);
if (!item.fix) {
onList.value.push(item);
}
}
});
}
offShowList.value = cloneDeep(offList.value);
fixShowList.value = cloneDeep(fixList.value);
onShowList.value = cloneDeep(onList.value);
};
onMounted(() => getData());
const indeterminate = computed(() => {
let baseNum = 0;
offList.value.map((v) => {
if (v.fix) {
baseNum += 1;
}
});
console.log(offList.value,'offList.value');
console.log(useList, 'useList');
return onList.value.length > 0 && offList.value.length - baseNum > onList.value.length;
});
const queryData = (value, type) => {
if (value) {
if (type == "off") {
offShowList.value = offList.value.filter((item) => item.name.indexOf(value) > -1);
} else {
onShowList.value = onList.value.filter((item) => item.name.indexOf(value) > -1);
fixShowList.value = fixList.value.filter((item) => item.name.indexOf(value) > -1);
}
} else {
// getData(type);
if(type == "off") {
offShowList.value = cloneDeep(offList.value);
}else{
onShowList.value = cloneDeep(onList.value);
fixShowList.value = cloneDeep(fixList.value)
}
}
};
</script>
<template>
<n-modal v-model:show="show" transform-origin="center">
<n-modal v-model:show="show" transform-origin="center" :mask-closable="false">
<n-card
class="cardstyle"
:bordered="false"
@ -305,22 +362,26 @@ onMounted(async () => {
:bordered="false"
>
<div>
<n-input placeholder="搜索关键字">
<n-input
placeholder="搜索关键字"
@input="(value) => queryData(value, 'off')"
>
<template #suffix>
<SvgIcon size="14px" name="magnifying-1" />
</template>
</n-input>
<div class="draggable-ul">
<div class="draggable-li">
<div class="draggable-li" :class="{ checkAll: indeterminate }">
<n-checkbox
v-model:checked="checkAll"
label="全部"
@update:checked="onCheckAllChange"
:indeterminate="indeterminate"
/>
</div>
<div class="content">
<div
v-for="item in offList"
v-for="item in offShowList"
:key="item.id"
style="width: 170px"
:class="{ 'disable-check': item.fix }"
@ -347,17 +408,21 @@ onMounted(async () => {
:bordered="false"
>
<template #header-extra>
<span class="textbtnStyle" @click="clearDragSource"></span>
<span class="textbtnStyle" @click="clearDragSource"></span>
</template>
<div>
<n-input placeholder="搜索关键字">
<n-input
placeholder="搜索关键字"
@input="(value) => queryData(value, 'on')"
>
<template #suffix>
<SvgIcon size="14px" name="magnifying-1" />
</template>
</n-input>
<div class="draggable-title">系统默认</div>
<div class="draggable-ul">
<div
v-for="item in fixList"
v-for="item in fixShowList"
:key="item.id"
:class="{ fix: item.fix }"
class="cursor-move draggable-item"
@ -365,6 +430,7 @@ onMounted(async () => {
<span class="ml-2">{{ item.name }}</span>
</div>
</div>
<div class="draggable-title" style="border-top: none">自定义配置</div>
<VueDraggable
v-model="onList"
class="draggable-ul"
@ -372,15 +438,16 @@ onMounted(async () => {
group="shared"
>
<div
v-for="item in onList"
v-for="item in onShowList"
:key="item.id"
:class="{ fix: item.fix }"
class="cursor-move draggable-item"
>
<SvgIcon name="drag" size="14" />
<span class="ml-2">{{ item.name }}</span>
<SvgIcon
v-if="!item.fix"
size="16px"
size="16"
style="display: block; margin-left: auto; cursor: pointer"
name="clear"
@click="removeHandler(item.id)"
@ -408,7 +475,8 @@ onMounted(async () => {
.wrapper {
display: flex;
flex-direction: column;
border-bottom: 1px solid #e8e8e8;
padding-bottom: 32px;
&-title {
font-weight: bold;
font-size: 16px;
@ -428,6 +496,9 @@ onMounted(async () => {
&-info {
font-weight: bold;
position: relative;
color: #333333;
font-size: 14px;
background: #f8f8f8;
&:before {
background-color: #1980ff;
@ -456,7 +527,12 @@ onMounted(async () => {
cursor: pointer;
color: #1980ff;
}
.draggable-title {
border: 1px solid #cad2dd;
border-bottom: none;
color: gray;
padding: 12px;
}
.draggable-ul {
width: 100%;
overflow: hidden;
@ -476,10 +552,11 @@ onMounted(async () => {
}
.draggable-item {
padding: 10px 16px;
padding: 11px 16px;
color: #333;
display: flex;
align-items: center;
border-bottom: 1px solid #e8e8e8;
}
.disable-check {
@ -487,9 +564,7 @@ onMounted(async () => {
}
}
::v-deep(
.n-card.n-card--content-segmented > .n-card__content:not(:first-child)
) {
::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) {
border: 0px;
}
@ -497,10 +572,35 @@ onMounted(async () => {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
::v-deep(.n-card > .n-card-header .n-card-header__main){
::v-deep(.n-card > .n-card-header .n-card-header__main) {
font-weight: bolder !important;
}
::v-deep(.n-scrollbar){
::v-deep(.n-scrollbar) {
border-top: none !important;
}
::v-deep(.checkAll .n-checkbox.n-checkbox--indeterminate .n-checkbox-box) {
background: none;
border: none;
}
::v-deep(.checkAll .n-checkbox-box__border) {
border: 1px solid #e8e8e8 !important;
}
::v-deep(.checkAll .n-checkbox-icon) {
border: 3px solid #fff;
background: #1980ff;
}
::v-deep(.checkAll .n-checkbox-icon svg) {
display: none !important;
}
::v-deep(.n-card > .n-card-header .n-card-header__main) {
font-weight: lighter !important;
font-size: 14px;
color: #666666;
}
::v-deep(.n-button--info-type) {
background: #507afd !important;
}
::v-deep(.n-button--default-type) {
border: 1px solid #cad2dd !important;
}
</style>

@ -215,6 +215,8 @@ function onCheckChange(checked: any, item: any) {
.wrapper {
display: flex;
flex-direction: column;
border-bottom: 1px solid #e8e8e8;
padding-bottom: 32px;
&-title {
font-weight: bold;
@ -222,7 +224,6 @@ function onCheckChange(checked: any, item: any) {
}
&-bar {
background-color: #e8e8e8;
width: 100%;
margin-top: 20px;
}
@ -235,6 +236,7 @@ function onCheckChange(checked: any, item: any) {
&-info {
font-weight: bold;
position: relative;
color: #333333;
&:before {
background-color: #1980ff;
@ -282,10 +284,11 @@ function onCheckChange(checked: any, item: any) {
}
.draggable-item {
padding: 10px 16px;
padding: 11px 16px;
color: #333;
display: flex;
align-items: center;
border-bottom: 1px solid #E8E8E8;
}
.disable-check {
@ -303,4 +306,5 @@ function onCheckChange(checked: any, item: any) {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
</style>

@ -268,5 +268,5 @@ const inputHandler = debounce((word) => {
z-index: 10;
}
}
</style>
../types

@ -363,6 +363,7 @@ onMounted(async () => {
:class="{ fix: item.fix }"
class="cursor-move draggable-item"
>
<SvgIcon name="drag" size="24" />
<span class="ml-2">{{ item.name }}</span>
<SvgIcon
v-if="!item.fix"
@ -394,6 +395,8 @@ onMounted(async () => {
.wrapper {
display: flex;
flex-direction: column;
border-bottom: 1px solid #e8e8e8;
padding-bottom: 32px;
&-title {
font-weight: bold;
@ -401,7 +404,6 @@ onMounted(async () => {
}
&-bar {
background-color: #e8e8e8;
width: 100%;
margin-top: 20px;
}
@ -414,6 +416,8 @@ onMounted(async () => {
&-info {
font-weight: bold;
position: relative;
color: #333333;
font-size: 14px;
&:before {
background-color: #1980ff;
@ -462,10 +466,11 @@ onMounted(async () => {
}
.draggable-item {
padding: 10px 16px;
padding: 11px 16px;
color: #333;
display: flex;
align-items: center;
border-bottom: 1px solid #E8E8E8;
}
.disable-check {
@ -484,9 +489,13 @@ onMounted(async () => {
--n-padding-bottom: 12px;
}
::v-deep(.n-card > .n-card-header .n-card-header__main){
font-weight: bolder !important;
font-weight: lighter !important;
font-size: 14px;
}
::v-deep(.n-scrollbar){
border-top: none !important;
}
::v-deep(.n-button--info-type){
background: #507AFD !important;
}
</style>

@ -377,6 +377,7 @@ onMounted(async () => {
:class="{ fix: item.fix }"
class="cursor-move draggable-item"
>
<SvgIcon name="drag" size="24" />
<span class="ml-2">{{ item.name }}</span>
<SvgIcon
v-if="!item.fix"
@ -408,6 +409,8 @@ onMounted(async () => {
.wrapper {
display: flex;
flex-direction: column;
border-bottom: 1px solid #e8e8e8;
padding-bottom: 32px;
&-title {
font-weight: bold;
@ -415,7 +418,6 @@ onMounted(async () => {
}
&-bar {
background-color: #e8e8e8;
width: 100%;
margin-top: 20px;
}
@ -428,6 +430,8 @@ onMounted(async () => {
&-info {
font-weight: bold;
position: relative;
color: #333333;
font-size: 14px;
&:before {
background-color: #1980ff;
@ -476,10 +480,11 @@ onMounted(async () => {
}
.draggable-item {
padding: 10px 16px;
padding: 11px 16px;
color: #333;
display: flex;
align-items: center;
border-bottom: 1px solid #E8E8E8;
}
.disable-check {
@ -498,9 +503,14 @@ onMounted(async () => {
--n-padding-bottom: 12px;
}
::v-deep(.n-card > .n-card-header .n-card-header__main){
font-weight: bolder !important;
font-weight: lighter !important;
font-size: 14px;
}
::v-deep(.n-scrollbar){
border-top: none !important;
}
::v-deep(.n-button--info-type){
background: #507AFD !important;
}
</style>

Loading…
Cancel
Save