diff --git a/package.json b/package.json
index a17c2f3..4da972a 100644
--- a/package.json
+++ b/package.json
@@ -85,6 +85,7 @@
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path-to-regexp": "^6.2.1",
+ "pdfjs-dist": "^4.10.38",
"pinia": "2.1.4",
"qrcode": "^1.5.3",
"qs": "^6.11.2",
diff --git a/src/assets/custom.scss b/src/assets/custom.scss
index 890e904..c3e29d1 100644
--- a/src/assets/custom.scss
+++ b/src/assets/custom.scss
@@ -19,50 +19,50 @@
margin: 10px 20px 2px 10px;
}
-:deep(.ant-form-item-label > label.ant-form-item-no-colon) {
- font-family: "Noto Sans SC", serif;
- font-size: 14px;
- color: white;
-}
+//:deep(.ant-form-item-label > label.ant-form-item-no-colon) {
+// font-family: "Noto Sans SC", serif;
+// font-size: 14px;
+// color: white;
+//}
+//
+//:deep(.vben-basic-table-form-container label) {
+// color: transparent !important;
+// width: 10px !important;
+//}
-:deep(.vben-basic-table-form-container label) {
- color: transparent !important;
- width: 10px !important;
-}
-
-:deep(.ant-input-affix-wrapper) {
- border-radius: 6px;
- background-color: rgba(45,119,243,0.2);
- border: 1px solid rgba(45,119,243,0.3);
-}
-
-:deep(.ant-input-affix-wrapper >input.ant-input) {
- height: 26px;
-}
-
-:deep(.ant-input-affix-wrapper:hover),
-:deep(.ant-input-affix-wrapper:focus) {
- background-color: rgba(45,119,243,0.3);
- border: 1px solid rgba(45,119,243,0.4);
-}
-
-:deep(.ant-input-affix-wrapper > textarea) {
- padding: 4px 11px;
- border: 1px solid rgba(45,119,243,0.3);
-}
-
-:deep(.ant-input) {
- font-family: "Noto Sans SC", serif;
- font-size: 14px;
- color: #FFFFFF;
- background: transparent;
-}
-
-:deep(.ant-input::placeholder) {
- font-family: "Noto Sans SC", serif;
- font-size: 14px;
- color: #AAAAAA;
-}
+//:deep(.ant-input-affix-wrapper) {
+// border-radius: 6px;
+// background-color: rgba(45,119,243,0.2);
+// border: 1px solid rgba(45,119,243,0.3);
+//}
+//
+//:deep(.ant-input-affix-wrapper >input.ant-input) {
+// height: 26px;
+//}
+//
+//:deep(.ant-input-affix-wrapper:hover),
+//:deep(.ant-input-affix-wrapper:focus) {
+// background-color: rgba(45,119,243,0.3);
+// border: 1px solid rgba(45,119,243,0.4);
+//}
+//
+//:deep(.ant-input-affix-wrapper > textarea) {
+// padding: 4px 11px;
+// border: 1px solid rgba(45,119,243,0.3);
+//}
+//
+//:deep(.ant-input) {
+// font-family: "Noto Sans SC", serif;
+// font-size: 14px;
+// color: #FFFFFF;
+// background: transparent;
+//}
+//
+//:deep(.ant-input::placeholder) {
+// font-family: "Noto Sans SC", serif;
+// font-size: 14px;
+// color: #AAAAAA;
+//}
//:deep(.ant-btn-default) {
// font-family: "Noto Sans SC", serif;
@@ -114,95 +114,95 @@
// border: none;
//}
-:deep(.vben-basic-table) {
- background: transparent;
-}
-
+//:deep(.vben-basic-table) {
+// background: transparent;
+//}
+//
:deep(.ant-table-wrapper) {
background: transparent;
}
+//
+//:deep(.vben-basic-table .ant-table-wrapper) {
+// background-color: transparent !important;
+// padding: 0;
+//}
-:deep(.vben-basic-table .ant-table-wrapper) {
- background-color: transparent !important;
- padding: 0;
-}
+//:deep(.ant-spin-container) {
+// margin: 0 5px;
+//}
-:deep(.ant-spin-container) {
- margin: 0 5px;
-}
+//:deep(.ant-table.ant-table-middle) {
+// border-radius: 0;
+// background-color: transparent !important;
+//}
-:deep(.ant-table.ant-table-middle) {
- border-radius: 0;
- background-color: transparent !important;
-}
+//:deep(.vben-basic-table .ant-table-wrapper .ant-table.ant-table-bordered .ant-table-title) {
+// padding-top: 8px !important;
+// border-radius: 8px 8px 0 0;
+// border-left: 1px solid #183171 !important;
+// border-top: 1px solid #183171 !important;
+// border-right: 1px solid #183171 !important;
+// background-color: #13265a !important;
+//}
-:deep(.vben-basic-table .ant-table-wrapper .ant-table.ant-table-bordered .ant-table-title) {
- padding-top: 8px !important;
- border-radius: 8px 8px 0 0;
- border-left: 1px solid #183171 !important;
- border-top: 1px solid #183171 !important;
- border-right: 1px solid #183171 !important;
- background-color: #13265a !important;
-}
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container) {
+// border-inline-start: 1px solid rgba(45,119,243,0.3) !important;
+//}
+//
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table) {
+// border-top: 1px solid rgba(45,119,243,0.3) !important;
+//}
+//
+//:deep(.ant-table-cell) {
+// background-color: #0d1540 !important;
+//}
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container) {
- border-inline-start: 1px solid rgba(45,119,243,0.3) !important;
-}
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >thead>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >thead>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >thead>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >thead>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >tbody>tr>td),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >tbody>tr>td),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >tbody>tr>td),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >tbody>tr>td),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >tfoot>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >tfoot>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >tfoot>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >tfoot>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >tfoot>tr>td),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >tfoot>tr>td),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >tfoot>tr>td),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >tfoot>tr>td) {
+// border-inline-end: 1px solid rgba(45,119,243,0.3) !important;
+//}
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table) {
- border-top: 1px solid rgba(45,119,243,0.3) !important;
-}
+//:deep(.ant-table-wrapper .ant-table-tbody >tr.ant-table-row:hover>td),
+//:deep(.ant-table-wrapper .ant-table-tbody >tr >td.ant-table-cell-row-hover) {
+// background: #273c62 !important;
+//}
-:deep(.ant-table-cell) {
- background-color: #0d1540 !important;
-}
-
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >thead>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >thead>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >thead>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >thead>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >tbody>tr>td),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >tbody>tr>td),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >tbody>tr>td),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >tbody>tr>td),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >tfoot>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >tfoot>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >tfoot>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >tfoot>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >tfoot>tr>td),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table >tfoot>tr>td),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >tfoot>tr>td),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-summary >table >tfoot>tr>td) {
- border-inline-end: 1px solid rgba(45,119,243,0.3) !important;
-}
-
-:deep(.ant-table-wrapper .ant-table-tbody >tr.ant-table-row:hover>td),
-:deep(.ant-table-wrapper .ant-table-tbody >tr >td.ant-table-cell-row-hover) {
- background: #273c62 !important;
-}
-
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >thead>tr>th),
-:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >thead>tr>th) {
- font-family: "Noto Sans SC", serif;
- font-size: 14px;
- font-weight: normal;
- color: #ffffff;
- border-bottom: none;
- background: #13265a !important;
-}
-
-:deep(.ant-table-wrapper .ant-table-cell-ellipsis.ant-table-cell-fix-right-first) {
- overflow: hidden !important;
- border-left: 1px solid rgba(45,119,243,0.3) !important;
-}
-
-:deep(.ant-table-tbody >tr >td) {
- font-family: "Noto Sans SC", serif;
- font-size: 14px;
- color: #ffffff;
- border-bottom: 1px solid rgba(45,119,243,0.3) !important;
-}
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >thead>tr>th),
+//:deep(.ant-table-wrapper .ant-table.ant-table-bordered >.ant-table-container >.ant-table-body >table >thead>tr>th) {
+// font-family: "Noto Sans SC", serif;
+// font-size: 14px;
+// font-weight: normal;
+// color: #ffffff;
+// border-bottom: none;
+// background: #13265a !important;
+//}
+//
+//:deep(.ant-table-wrapper .ant-table-cell-ellipsis.ant-table-cell-fix-right-first) {
+// overflow: hidden !important;
+// border-left: 1px solid rgba(45,119,243,0.3) !important;
+//}
+//
+//:deep(.ant-table-tbody >tr >td) {
+// font-family: "Noto Sans SC", serif;
+// font-size: 14px;
+// color: #ffffff;
+// border-bottom: 1px solid rgba(45,119,243,0.3) !important;
+//}
:deep(.ant-pagination-total-text) {
font-family: "Noto Sans SC", serif;
@@ -529,10 +529,10 @@
border-inline-end: 1px solid #183171 !important;
}
-:deep(.ant-checkbox-inner) {
- border: 1px solid rgba(45, 119, 243, 0.3) !important;
- background-color: #13265a !important;
-}
+//:deep(.ant-checkbox-inner) {
+// border: 1px solid rgba(45, 119, 243, 0.3) !important;
+// background-color: #13265a !important;
+//}
:deep(.CodeMirror) {
border-radius: 6px;
diff --git a/src/assets/style.css b/src/assets/style.css
new file mode 100644
index 0000000..abe27a1
--- /dev/null
+++ b/src/assets/style.css
@@ -0,0 +1,192 @@
+.custom-modal .ant-modal-content {
+ background-color: #13265a;
+}
+.ant-modal-header {
+ background-color: #13265a !important;
+}
+.vben-basic-title {
+ font-family: "Noto Sans SC", serif;
+ font-size: 16px;
+ color: #ffffff !important;
+}
+
+.ant-btn-primary {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #FFFFFF;
+ background-color: #3793d4;
+ box-shadow: inset 0 0 20px 2px #006CC6;
+ height: 36px;
+ border-radius: 6px;
+ border: none;
+}
+
+.ant-btn-primary:hover {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #FFFFFF;
+ background-color: rgba(69,175,223,0.8);
+ box-shadow: inset 0 0 20px 2px #006CC6;
+ height: 36px;
+ border-radius: 6px;
+ border: none;
+}
+
+.ant-btn-default {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #FFFFFF;
+ background-color: rgba(58,98,203,0.8);
+ box-shadow: inset 0 0 20px 2px #3A62CB;
+ height: 36px;
+ border-radius: 6px;
+ border: none;
+}
+
+.ant-btn-default:hover {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #FFFFFF !important;
+ background-color: rgba(58,98,203,0.8);
+ box-shadow: inset 0 0 20px 2px #006CC6;
+ height: 36px;
+ border-radius: 6px;
+ border: none;
+}
+
+.ant-btn-default:disabled,
+.ant-btn-default:disabled:hover,
+.ant-btn-default:disabled svg {
+ color: #AAAAAA !important;
+ background-color: rgba(58,98,203,0.8);
+ box-shadow: inset 0 0 20px 2px #3A62CB;
+}
+
+.ant-spin-container {
+ margin: 0 5px;
+}
+
+.ant-spin-container .scroll-container {
+ padding-top: 10px;
+}
+
+.ant-tree-checkbox-inner,
+.ant-checkbox-inner {
+ border: 1px solid rgba(45, 119, 243, 0.3) !important;
+ background-color: #13265a !important;
+}
+
+.ant-form-item-label > label {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #FFFFFF !important;
+ height: 36px !important;
+}
+
+.vben-basic-table-form-container label {
+ color: transparent !important;
+ width: 10px !important;
+}
+
+.ant-input-affix-wrapper {
+ border-radius: 6px;
+ background-color: rgba(45,119,243,0.2);
+ border: 1px solid rgba(45,119,243,0.3);
+}
+
+.ant-input-affix-wrapper >input.ant-input {
+ height: 26px;
+}
+
+.ant-input-affix-wrapper:hover,
+.ant-input-affix-wrapper:focus {
+ background-color: rgba(45,119,243,0.3);
+ border: 1px solid rgba(45,119,243,0.4);
+}
+
+.ant-input-affix-wrapper > textarea {
+ padding: 4px 11px;
+ border: 1px solid rgba(45,119,243,0.3);
+}
+
+.ant-input {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #FFFFFF;
+ background: transparent;
+}
+
+.ant-input::placeholder {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #AAAAAA;
+}
+
+.vben-basic-table {
+ background: transparent;
+}
+
+.vben-basic-table .ant-table-wrapper {
+ background-color: transparent;
+ padding: 0;
+}
+
+.ant-table.ant-table-middle {
+ border-radius: 0;
+ background-color: transparent !important;
+}
+
+.ant-table-title {
+ border-radius: 8px 8px 0 0;
+ border-left: 1px solid #183171 !important;
+ border-top: 1px solid #183171 !important;
+ border-right: 1px solid #183171 !important;
+ background-color: #13265a !important;
+}
+
+.ant-table-container {
+ border-inline-start: 1px solid rgba(45,119,243,0.3) !important;
+}
+
+.ant-table.ant-table-bordered >.ant-table-container {
+ border-inline-start: 1px solid rgba(45,119,243,0.3) !important;
+}
+
+.ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table,
+.ant-table.ant-table-bordered >.ant-table-container >.ant-table-header >table {
+ border-top: 1px solid rgba(45,119,243,0.3) !important;
+}
+
+.ant-table-cell {
+ background-color: #0d1540 !important;
+}
+.ant-table.ant-table-bordered th,
+.ant-table.ant-table-bordered td {
+ border-inline-end: 1px solid rgba(45, 119, 243, 0.3) !important;
+}
+
+.ant-table-tbody >tr.ant-table-row:hover>td,
+.ant-table-tbody >tr >td.ant-table-cell-row-hover {
+ background: #273c62 !important;
+}
+
+.ant-table.ant-table-bordered >.ant-table-container >.ant-table-content >table >thead>tr>th {
+ border-bottom: none;
+ background: #13265a !important;
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ font-weight: normal;
+ color: #ffffff;
+}
+
+.ant-table-cell-ellipsis.ant-table-cell-fix-right-first {
+ overflow: hidden !important;
+ border-left: 1px solid rgba(45,119,243,0.3) !important;
+}
+
+.ant-table-tbody >tr >td {
+ font-family: "Noto Sans SC", serif;
+ font-size: 14px;
+ color: #ffffff;
+ border-bottom: 1px solid rgba(45,119,243,0.3) !important;
+}
diff --git a/src/components/PdfViewer/index.vue b/src/components/PdfViewer/index.vue
new file mode 100644
index 0000000..684f595
--- /dev/null
+++ b/src/components/PdfViewer/index.vue
@@ -0,0 +1,222 @@
+
+
+
+
+
+
diff --git a/src/components/Table/src/BasicTable.vue b/src/components/Table/src/BasicTable.vue
index ca5bb8c..eea4fbc 100644
--- a/src/components/Table/src/BasicTable.vue
+++ b/src/components/Table/src/BasicTable.vue
@@ -415,7 +415,7 @@
.ant-table-title {
min-height: 40px;
- padding: 0 0 8px !important;
+ padding: 8px 0 8px !important;
}
.ant-table.ant-table-bordered .ant-table-title {
diff --git a/src/main.ts b/src/main.ts
index ea2e6ff..952aa90 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -3,6 +3,8 @@ import '@/design/index.less';
import '@/components/VxeTable/src/css/index.scss';
import 'ant-design-vue/dist/reset.css';
import '@/design/font.css';
+
+import "@/assets/style.css";
// Register icon sprite
import 'virtual:svg-icons-register';
diff --git a/src/views/data/task/drawer.vue b/src/views/data/task/drawer.vue
index 837fe49..2f1e39d 100644
--- a/src/views/data/task/drawer.vue
+++ b/src/views/data/task/drawer.vue
@@ -1,21 +1,11 @@
-
-
-
-
-
+
新 增
OCR识别
-
@@ -52,7 +42,6 @@ import {defineEmits, ref, computed, unref, h} from 'vue';
import { BasicForm, useForm } from '@/components/Form/index';
import { formSchema } from './schema';
import { BasicDrawer, useDrawerInner } from '@/components/Drawer';
-import { CodeEditor } from "@/components/CodeEditor";
import * as TaskApi from '@/api/data/taskApi';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { EyeOutlined, PlusOutlined } from "@ant-design/icons-vue";
@@ -99,11 +88,11 @@ const columns = [
const paramData = ref([]);
-const emit = defineEmits(['success', 'register']);
+const emit = defineEmits(['success', 'register', 'ocrClick']);
const isUpdate = ref(true);
const entity = ref();
-const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
+const [registerForm, { resetFields, setFieldsValue, validate, getFieldsValue }] = useForm({
labelWidth: 120,
schemas: formSchema,
showActionButtonGroup: false,
@@ -124,6 +113,13 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (
});
});
+const setParamData = (items: any) => {
+ paramData.value = [];
+ items.forEach((d: any, index: number) => {
+ paramData.value.push({index, ...d});
+ });
+};
+
const [registerTable] = useTable({
title: '预埋件列表',
columns,
@@ -146,35 +142,32 @@ const [registerTable] = useTable({
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
async function handleSubmit() {
- try {
- const values = await validate();
- setDrawerProps({ confirmLoading: true });
- const {
- ...rest
- } = values;
- const action = !unref(isUpdate) ? TaskApi.add : TaskApi.update;
- const data = !unref(isUpdate)
- ? {
- ...rest,
- }
- : Object.assign({},
- {
- ...unref(entity),
- ...rest,
- },
- );
- let p: any = [];
- paramData.value.forEach((d: any) => {
- delete d.index;
- p.push(d);
- });
- data.paramJson = JSON.stringify(p);
- await action(data);
- closeDrawer();
- emit('success');
- } catch {} finally {
- setDrawerProps({ confirmLoading: false });
- }
+ const values = await validate();
+ setDrawerProps({confirmLoading: true});
+ const {
+ ...rest
+ } = values;
+ const action = !unref(isUpdate) ? TaskApi.add : TaskApi.update;
+ const data = !unref(isUpdate)
+ ? {
+ ...rest,
+ }
+ : Object.assign({},
+ {
+ ...unref(entity),
+ ...rest,
+ },
+ );
+ let p: any = [];
+ paramData.value.forEach((d: any) => {
+ delete d.index;
+ p.push(d);
+ });
+ data.paramJson = JSON.stringify(p);
+ await action(data);
+ closeDrawer();
+ emit('success');
+ setDrawerProps({confirmLoading: false});
}
const handleCreate = () => {
@@ -189,35 +182,29 @@ const handleDelete = (record: Recordable) => {
paramData.value = paramData.value.filter(d => d.code !== record.code);
};
-const fileInput = ref();
const handleOpenFileDialog = () => {
- fileInput.value?.click();
+ const rest = getFieldsValue();
+ const data = !unref(isUpdate)
+ ? {
+ ...rest,
+ }
+ : Object.assign({},
+ {
+ ...unref(entity),
+ ...rest,
+ },
+ );
+ emit("ocrClick", data);
};
-const handleFileChange = (event: any) => {
- const file = event.target.files[0];
- if (file) {
- const reader = new FileReader();
- reader.onload = (e) => {
- handleImport(e.target!.result);
- fileInput.value!.value = '';
- };
- reader.readAsDataURL(file);
- }
-};
-
-const handleImport = (base64ImageString: any) => {
- TaskApi.importImageOCR(base64ImageString).then((res: any) => {
- WebViewService.setMessage("数据导入成功!", "success").then(() => {});
- paramData.value = JSON.parse(res);
- }).catch(() => {
- WebViewService.setMessage("数据导入失败!", "error").then(() => {});
- });
-};
-
-const updateParamData = (data: any) => {
+const updateParamData = async (data: any) => {
paramData.value[data.index] = { ...data };
}
+
+defineExpose({
+ setParamData
+});
+
-
diff --git a/src/views/data/task/schema.ts b/src/views/data/task/schema.ts
index 29544f2..ba99e32 100644
--- a/src/views/data/task/schema.ts
+++ b/src/views/data/task/schema.ts
@@ -233,7 +233,7 @@ export const schema = {
const queryFields = ['name','deviceSn','startTimeQuery','state'];
// const editFields = ['name','deviceSn','paramJson'];
-const editFields = ['name','deviceSn'];
+const editFields = ['name', 'deviceSn'];
const tableFields = ['name','deviceSn','startTime','endTime','state','createTime'];
const descriptionFields = ['name','deviceSn','paramJson','resultJson','startTime','endTime','state'];
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index c1190c1..9fefca6 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -6,7 +6,7 @@
- 新增
+ 新 增
@@ -103,9 +103,9 @@ import {defineComponent, h, onMounted} from 'vue';
reload();
}
- onMounted(() => {
- WebViewService.setIsLoading(false).then(() => {});
- });
+ // onMounted(() => {
+ // WebViewService.setIsLoading(false).then(() => {});
+ // });
return {
registerTable,