mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect-embeded.git
synced 2025-06-24 13:34:13 +08:00
fixed
This commit is contained in:
parent
f146040e30
commit
baea43d692
@ -64,55 +64,55 @@
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
:deep(.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;
|
||||
}
|
||||
//:deep(.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;
|
||||
//}
|
||||
//
|
||||
//:deep(.ant-btn-default:hover) {
|
||||
// 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 #006CC6;
|
||||
// height: 36px;
|
||||
// border-radius: 6px;
|
||||
// border: none;
|
||||
//}
|
||||
//
|
||||
//:deep(.ant-btn-default:disabled),
|
||||
//:deep(.ant-btn-default:disabled:hover),
|
||||
//:deep(.ant-btn-default:disabled svg) {
|
||||
// color: #AAAAAA;
|
||||
//}
|
||||
|
||||
:deep(.ant-btn-default:hover) {
|
||||
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 #006CC6;
|
||||
height: 36px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
:deep(.ant-btn-default:disabled),
|
||||
:deep(.ant-btn-default:disabled:hover),
|
||||
:deep(.ant-btn-default:disabled svg) {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
:deep(.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;
|
||||
}
|
||||
|
||||
:deep(.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;
|
||||
}
|
||||
//:deep(.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;
|
||||
//}
|
||||
//
|
||||
//:deep(.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;
|
||||
//}
|
||||
|
||||
:deep(.vben-basic-table) {
|
||||
background: transparent;
|
||||
@ -561,3 +561,4 @@
|
||||
:deep(.ant-descriptions-item-label) {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ export default defineComponent({
|
||||
|
||||
return () => {
|
||||
const propsData = { ...unref(attrs), ...props, onCancel } as Recordable;
|
||||
return <Modal {...propsData}>{extendSlots(slots)}</Modal>;
|
||||
return <Modal class="custom-modal" {...propsData}>{extendSlots(slots)}</Modal>;
|
||||
};
|
||||
},
|
||||
});
|
||||
|
@ -1,5 +1,4 @@
|
||||
import type { AppRouteRecordRaw } from '/@/router/types';
|
||||
import { t } from '/@/hooks/web/useI18n';
|
||||
import {
|
||||
REDIRECT_NAME,
|
||||
LAYOUT,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import type { AppRouteModule } from '/src/router/types';
|
||||
import type { AppRouteModule } from '@/router/types';
|
||||
|
||||
import { LAYOUT } from '/src/router/constant';
|
||||
import { t } from '/src/hooks/web/useI18n';
|
||||
import { t } from '@/hooks/web/useI18n';
|
||||
|
||||
const about: AppRouteModule = {
|
||||
path: '/dashboard',
|
||||
|
@ -3,7 +3,6 @@ import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types';
|
||||
import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic';
|
||||
|
||||
import { PageEnum } from '/@/enums/pageEnum';
|
||||
import { t } from '/@/hooks/web/useI18n';
|
||||
|
||||
// import.meta.glob() 直接引入所有的模块 Vite 独有的功能
|
||||
const modules = import.meta.glob('./modules/**/*.ts', { eager: true });
|
||||
|
@ -56,7 +56,7 @@
|
||||
await action(data);
|
||||
closeDrawer();
|
||||
emit('success');
|
||||
} finally {
|
||||
} catch {} finally {
|
||||
setDrawerProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
|
@ -12,10 +12,10 @@
|
||||
</BasicForm>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleCreate" :icon="h(PlusOutlined)">新增</a-button>
|
||||
<a-button type="primary" @click="handleCreate" :icon="h(PlusOutlined)">新 增</a-button>
|
||||
<div style="width: 5px" />
|
||||
<a-button type="primary" :icon="h(EyeOutlined)" @click="handleOpenFileDialog">OCR识别</a-button>
|
||||
<input type="file" ref="fileInput" accept="image/bmp,image/jpeg,image/jpg,image/png" @change="handleFileChange" style="display: none;" />
|
||||
<input type="file" ref="fileInput" aria-hidden="true" accept="image/bmp,image/jpeg,image/jpg,image/png" @change="handleFileChange" style="display: none;" />
|
||||
<div style="width: 5px" />
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
@ -44,7 +44,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<Modal @register="register" />
|
||||
<Modal @register="register" @success="updateParamData" />
|
||||
</BasicDrawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@ -97,7 +97,7 @@ const columns = [
|
||||
},
|
||||
];
|
||||
|
||||
const paramData = ref([]);
|
||||
const paramData = ref<any>([]);
|
||||
|
||||
const emit = defineEmits(['success', 'register']);
|
||||
const isUpdate = ref(true);
|
||||
@ -114,7 +114,11 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (
|
||||
setDrawerProps({ confirmLoading: false });
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
entity.value = data?.record;
|
||||
paramData.value = entity.value && entity.value.paramJson ? JSON.parse(entity.value.paramJson) : [];
|
||||
paramData.value = [];
|
||||
const items = entity.value && entity.value.paramJson ? JSON.parse(entity.value.paramJson) : [];
|
||||
items.forEach((d: any, index: number) => {
|
||||
paramData.value.push({ index, ...d });
|
||||
});
|
||||
await setFieldsValue({
|
||||
...data.record,
|
||||
});
|
||||
@ -162,16 +166,17 @@ async function handleSubmit() {
|
||||
await action(data);
|
||||
closeDrawer();
|
||||
emit('success');
|
||||
} finally {
|
||||
} catch {} finally {
|
||||
setDrawerProps({ confirmLoading: false });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const handleCreate = () => {
|
||||
openModal(true, { isUpdate: false });
|
||||
};
|
||||
|
||||
const handleEdit = (record: Recordable) => {
|
||||
const handleEdit = (record: Recordable, index: number) => {
|
||||
openModal(true, { record, isUpdate: true });
|
||||
};
|
||||
|
||||
const handleDelete = (record: Recordable) => {
|
||||
@ -203,6 +208,10 @@ const handleImport = (base64ImageString: any) => {
|
||||
WebViewService.setMessage("数据导入失败!", "error").then(() => {});
|
||||
});
|
||||
};
|
||||
|
||||
const updateParamData = (data: any) => {
|
||||
paramData.value[data.index] = { ...data };
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@use '@/assets/custom.scss';
|
||||
|
@ -6,10 +6,10 @@
|
||||
</div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleCreate" :icon="h(PlusOutlined)">新增</a-button>
|
||||
<a-button type="primary" @click="handleCreate" :icon="h(PlusOutlined)">新 增</a-button>
|
||||
<div style="width: 5px" />
|
||||
<a-button type="default" :icon="h(ImportOutlined)" @click="handleOpenFileDialog">导入数据</a-button>
|
||||
<input type="file" ref="fileInput" accept="image/bmp,image/jpeg,image/jpg,image/png" @change="handleFileChange" style="display: none;" />
|
||||
<input type="file" ref="fileInput" accept="image/bmp,image/jpeg,image/jpg,image/png" aria-hidden="true" @change="handleFileChange" style="display: none;" />
|
||||
<div style="width: 5px" />
|
||||
<a-button type="default" @click="handleDownload" :icon="h(DownloadOutlined)" :disabled="checkedKeys.length === 0">下发数据</a-button>
|
||||
<a-button type="default" @click="handleSync" :icon="h(SyncOutlined)" :disabled="checkedKeys.length === 0">同步数据</a-button>
|
||||
|
@ -1,38 +1,194 @@
|
||||
|
||||
<template>
|
||||
<!-- 你的模板代码 -->
|
||||
<BasicModal v-bind="$attrs" title="Modal Title" :helpMessage="['提示1', '提示2']">
|
||||
Modal Info.
|
||||
<BasicModal v-bind="$attrs" @register="register" :closable="false" showFooter :title="getTitle" width="400px" @ok="handleSubmit">
|
||||
<BasicForm @register="registerForm" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import BasicModal from "@/components/Modal/src/BasicModal.vue";
|
||||
// import { ref } from "vue";
|
||||
// const showModal = ref(false);
|
||||
//
|
||||
// const handleOpen = () => {
|
||||
// showModal.value = true;
|
||||
// };
|
||||
//
|
||||
// const handleClose = () => {
|
||||
// showModal.value = false;
|
||||
// };
|
||||
import { BasicModal, useModalInner } from "@/components/Modal";
|
||||
import { computed, defineEmits, ref, unref } from "vue";
|
||||
import { BasicForm, FormSchema, useForm } from "@/components/Form";
|
||||
|
||||
const entity = ref();
|
||||
const isUpdate = ref(true);
|
||||
const emit = defineEmits(['success', 'register']);
|
||||
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
|
||||
|
||||
const [register, { closeModal, setModalProps }] = useModalInner(async (data) => {
|
||||
await resetFields();
|
||||
setModalProps({ confirmLoading: false });
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
entity.value = data?.record;
|
||||
await setFieldsValue({
|
||||
...data.record,
|
||||
});
|
||||
});
|
||||
|
||||
const paramSchema: FormSchema[] = [
|
||||
{
|
||||
colProps: { span: 24 },
|
||||
field: "code",
|
||||
label: "预埋件编号",
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
placeholder: '预埋件编号',
|
||||
},
|
||||
component: "Input",
|
||||
defaultValue: undefined,
|
||||
rules: [{ required: true, message: '请输入预埋件编号!' }],
|
||||
},
|
||||
{
|
||||
colProps: { span: 24 },
|
||||
field: "type",
|
||||
label: "类型",
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
placeholder: '类型',
|
||||
},
|
||||
component: "Input",
|
||||
defaultValue: undefined,
|
||||
rules: [{ required: true, message: '请输入类型!' }],
|
||||
},
|
||||
{
|
||||
colProps: { span: 24 },
|
||||
field: "x",
|
||||
label: "X(mm)",
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
placeholder: 'X(mm)',
|
||||
},
|
||||
component: "Input",
|
||||
defaultValue: undefined,
|
||||
rules: [{ required: true, message: '请输入X(mm)!' }],
|
||||
},
|
||||
{
|
||||
colProps: { span: 24 },
|
||||
field: "y",
|
||||
label: "Y(mm)",
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
placeholder: 'Y(mm)',
|
||||
},
|
||||
component: "Input",
|
||||
defaultValue: undefined,
|
||||
rules: [{ required: true, message: '请输入Y(mm)!' }],
|
||||
},
|
||||
{
|
||||
colProps: { span: 24 },
|
||||
field: "w",
|
||||
label: "W(mm)",
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
placeholder: 'W(mm)',
|
||||
},
|
||||
component: "Input",
|
||||
defaultValue: undefined,
|
||||
rules: [{ required: true, message: '请输入W(mm)!' }],
|
||||
},
|
||||
{
|
||||
colProps: { span: 24 },
|
||||
field: "h",
|
||||
label: "H(mm)",
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
placeholder: 'H(mm)',
|
||||
},
|
||||
component: "Input",
|
||||
defaultValue: undefined,
|
||||
rules: [{ required: true, message: '请输入H(mm)!' }],
|
||||
},
|
||||
];
|
||||
|
||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
||||
labelWidth: 90,
|
||||
schemas: paramSchema,
|
||||
showActionButtonGroup: false,
|
||||
});
|
||||
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
const values = await validate();
|
||||
setModalProps({ confirmLoading: true });
|
||||
const {
|
||||
...rest
|
||||
} = values;
|
||||
closeModal();
|
||||
const data = Object.assign({},
|
||||
{
|
||||
...unref(entity),
|
||||
...rest,
|
||||
});
|
||||
emit('success', data);
|
||||
} catch {} finally {
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@use '@/assets/custom.scss';
|
||||
</style>
|
||||
<!--// Modal.vue-->
|
||||
<!--<template>-->
|
||||
<style>
|
||||
.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;
|
||||
}
|
||||
|
||||
<!--</template>-->
|
||||
<!--<script lang="ts">-->
|
||||
<!--import { defineComponent } from 'vue';-->
|
||||
<!--import { BasicModal } from '/@/components/Modal';-->
|
||||
<!--export default defineComponent({-->
|
||||
<!-- components: { BasicModal },-->
|
||||
<!-- setup() {-->
|
||||
<!-- return {};-->
|
||||
<!-- },-->
|
||||
<!--});-->
|
||||
<!--</script>-->
|
||||
.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;
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
|
@ -8,24 +8,15 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
import { usePermission } from '@/hooks/web/usePermission';
|
||||
import { BasicTable, useTable } from '@/components/Table';
|
||||
import { isObject } from '@/utils/is';
|
||||
import dayjs from 'dayjs';
|
||||
import * as LogApi from '@/api/system/logApi';
|
||||
import { useDrawer } from '@/components/Drawer';
|
||||
import { columns, searchFormSchema } from './schema';
|
||||
import { useMessage } from "@/hooks/web/useMessage";
|
||||
import {SvgIcon} from "@/components/Icon";
|
||||
import {onMounted} from "vue";
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const { hasPermission } = usePermission();
|
||||
const go = useGo();
|
||||
|
||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||
const [registerTable, { reload, setSelectedRowKeys }] = useTable({
|
||||
const [registerTable] = useTable({
|
||||
api: (params) => LogApi.search(handleParams(params)),
|
||||
columns,
|
||||
formConfig: {
|
||||
|
@ -114,7 +114,7 @@ async function handleSubmit() {
|
||||
}
|
||||
closeDrawer();
|
||||
emit('success');
|
||||
} finally {
|
||||
} catch {} finally {
|
||||
setDrawerProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user