添加上传组件

djz_new
ZR20090193-陈敬勇 2 years ago
parent 8d4b561577
commit 647aac6ed6

19
.gitignore vendored

@ -0,0 +1,19 @@
# Build and Release Folders
bin-debug/
bin-release/
[Oo]bj/
[Bb]in/
# Other files and folders
.settings/
.vs/
.vscode/
# Executables
*.swf
*.air
*.ipa
*.apk
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.

@ -1,5 +1,5 @@
# port
VITE_PORT = 3000
VITE_PORT = 9995
# 网站标题
VITE_GLOB_APP_TITLE = 董家镇公共自助服务平台

@ -16,7 +16,10 @@ VITE_DROP_CONSOLE = false
VITE_GLOB_API_URL=http://localhost:5001/api
# File upload address optional
VITE_GLOB_UPLOAD_URL=/upload
VITE_GLOB_UPLOAD_URL=http://60.209.125.238:9991/api/VW_INFO_FILES/UploadDJZ
# 预览地址
VITE_GLOB_VIEW_URL=http://60.209.125.238:9991/
# 接口前缀
VITE_GLOB_API_URL_PREFIX=

@ -21,6 +21,13 @@ VITE_GLOB_API_URL=http://localhost:8080/api
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://localhost:8080/api
# File upload address optional
VITE_GLOB_UPLOAD_URL=http://60.209.125.238:9991/api/VW_INFO_FILES/UploadDJZ
# 预览地址
VITE_GLOB_VIEW_URL=http://60.209.125.238:9991
# 接口父路径前缀
VITE_GLOB_API_URL_PREFIX=

@ -42,6 +42,7 @@
"ant-design-vue": "2.2.8",
"axios": "^0.24.0",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.5",
"echarts": "^5.2.2",
"lodash-es": "^4.17.21",
"mockjs": "^1.1.0",

@ -0,0 +1,24 @@
// @ts-ignore
import { request } from '/@/utils/request';
// import { message } from 'ant-design-vue';
import { useGlobSetting } from '/@/hooks/setting';
const globSetting = useGlobSetting();
const baseUploadUrl = globSetting.uploadUrl;
const viewUploadUrl = globSetting.viewUrl;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
enum Api {
list = '/YardBook/GetYardBookList',
editBook = '/YardBook/EditBook',
submitBook = '/YardBook/SubmitBook',
getFiles = '/YardBook/GetFileList',
}
/**
* api
*/
export const uploadUrl = baseUploadUrl;
/**
* api
*/
export const viewUrl = viewUploadUrl;

@ -0,0 +1,460 @@
<template>
<div ref="containerRef" :class="`${prefixCls}-container`">
<a-upload
:headers="headers"
:multiple="multiple"
:action="uploadUrl"
:fileList="fileList"
:disabled="disabled"
:remove="onRemove"
v-bind="bindProps"
@change="onFileChange"
@preview="onFilePreview"
>
<template v-if="isImageMode">
<div v-if="!isMaxCount">
<Icon icon="ant-design:plus-outlined" />
<div class="ant-upload-text">{{ text }}</div>
</div>
</template>
<a-button v-else-if="buttonVisible" :disabled="isMaxCount || disabled">
<Icon icon="ant-design:upload-outlined" />
<span>{{ text }}</span>
</a-button>
</a-upload>
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, computed, watch, nextTick, createApp } from 'vue';
import { Icon } from '/@/components/Icon';
import { getToken } from '/@/utils/auth';
import { uploadUrl } from '/@/api/common/index';
import { propTypes } from '/@/utils/propTypes';
import { useMessage } from '/@/hooks/web/useMessage';
import { createImgPreview } from '/@/components/Preview/index';
import { useAttrs } from '/@/hooks/core/useAttrs';
import { useDesign } from '/@/hooks/web/useDesign';
import { UploadTypeEnum } from './upload.data';
import { getFileAccessHttpUrl } from '/@/utils/commonUtil';
import UploadItemActions from './components/UploadItemActions.vue';
const { createMessage, createConfirm } = useMessage();
const { prefixCls } = useDesign('j-upload');
const attrs = useAttrs();
const emit = defineEmits(['change', 'update:value']);
const props = defineProps({
value: propTypes.oneOfType([propTypes.string, propTypes.array]),
text: propTypes.string.def('上传'),
fileType: propTypes.string.def(UploadTypeEnum.all),
/*这个属性用于控制文件上传的业务路径*/
bizPath: propTypes.string.def('temp'),
/**
* 是否返回url
* true仅返回url
* false返回fileName filePath fileSize
*/
returnUrl: propTypes.bool.def(false),
//
maxCount: propTypes.number.def(0),
buttonVisible: propTypes.bool.def(true),
multiple: propTypes.bool.def(true),
//
mover: propTypes.bool.def(true),
//
download: propTypes.bool.def(true),
//
removeConfirm: propTypes.bool.def(false),
beforeUpload: propTypes.func,
disabled: propTypes.bool.def(false),
});
const headers = reactive({
'X-Access-Token': getToken(),
});
const fileList = ref<any[]>([]);
const uploadGoOn = ref<boolean>(true);
// refs
const containerRef = ref();
//
const isMaxCount = computed(() => props.maxCount > 0 && fileList.value.length >= props.maxCount);
//
const isImageMode = computed(() => props.fileType === UploadTypeEnum.image);
// props attrs
const bindProps = computed(() => {
const bind: any = Object.assign({}, props, attrs);
bind.name = 'files';
bind.listType = isImageMode.value ? 'picture-card' : 'text';
bind.class = [bind.class, { 'upload-disabled': props.disabled }];
bind.data = { biz: props.bizPath, ...bind.data };
//beforeUpload return false
if (!bind.beforeUpload) {
bind.beforeUpload = onBeforeUpload;
}
//beforeUpload return false
//
if (isImageMode.value && !bind.accept) {
bind.accept = 'image/*';
}
return bind;
});
watch(
() => props.value,
(val) => {
if (Array.isArray(val)) {
if (props.returnUrl) {
parsePathsValue(val.join(','));
} else {
parseArrayValue(val);
}
} else {
parsePathsValue(val);
}
},
{ immediate: true },
);
watch(fileList, () => nextTick(() => addActionsListener()), { immediate: true });
const antUploadItemCls = 'ant-upload-list-item';
// Listener
function addActionsListener() {
if (!isImageMode.value) {
return;
}
const uploadItems = containerRef.value
? containerRef.value.getElementsByClassName(antUploadItemCls)
: null;
if (!uploadItems || uploadItems.length === 0) {
return;
}
for (const uploadItem of uploadItems) {
let hasActions = uploadItem.getAttribute('data-has-actions') === 'true';
if (!hasActions) {
uploadItem.addEventListener('mouseover', onAddActionsButton);
}
}
}
//
function onAddActionsButton(event) {
const getUploadItem = () => {
for (const path of event.path) {
if (path.classList.contains(antUploadItemCls)) {
return path;
} else if (path.classList.contains(`${prefixCls}-container`)) {
return null;
}
}
return null;
};
const uploadItem = getUploadItem();
if (!uploadItem) {
return;
}
const actions = uploadItem.getElementsByClassName('ant-upload-list-item-actions');
if (!actions || actions.length === 0) {
return;
}
//
const div = document.createElement('div');
div.className = 'upload-actions-container';
createApp(UploadItemActions, {
element: uploadItem,
fileList: fileList,
mover: props.mover,
download: props.download,
emitValue: emitValue,
}).mount(div);
actions[0].appendChild(div);
uploadItem.setAttribute('data-has-actions', 'true');
uploadItem.removeEventListener('mouseover', onAddActionsButton);
}
//
function parsePathsValue(paths) {
if (!paths || paths.length == 0) {
fileList.value = [];
return;
}
let list: any[] = [];
console.log('7', paths);
for (const item of paths.split(',')) {
let url = getFileAccessHttpUrl(item);
list.push({
uid: uidGenerator(),
name: getFileName(item),
status: 'done',
url: url,
response: { status: 'history', message: item },
});
}
console.log('8', list);
fileList.value = list;
}
//
function parseArrayValue(array) {
if (!array || array.length == 0) {
fileList.value = [];
return;
}
console.log('10', array);
let list: any[] = [];
for (const item of array) {
let url = getFileAccessHttpUrl(item.filePath);
list.push({
uid: uidGenerator(),
name: item.fileName,
path: item.filePath,
url: url,
status: 'done',
response: { status: 'history', message: item.filePath },
});
}
fileList.value = list;
}
//
function onBeforeUpload(file) {
uploadGoOn.value = true;
if (isImageMode.value) {
if (file.type.indexOf('image') < 0) {
createMessage.warning('请上传图片');
uploadGoOn.value = false;
return false;
}
}
// beforeUpload
if (typeof props.beforeUpload === 'function') {
return props.beforeUpload(file);
}
return true;
}
//
function onRemove() {
if (props.removeConfirm) {
return new Promise((resolve) => {
createConfirm({
title: '删除',
content: `确定要删除这${isImageMode.value ? '张图片' : '个文件'}吗?`,
iconType: 'warning',
onOk: () => resolve(true),
onCancel: () => resolve(false),
});
});
}
return true;
}
// uploadchange
function onFileChange(info) {
if (!info.file.status && uploadGoOn.value === false) {
info.fileList.pop();
}
let fileListTemp = info.fileList;
//
if (props.maxCount > 0) {
let count = fileListTemp.length;
if (count >= props.maxCount) {
let diffNum = props.maxCount - fileListTemp.length;
if (diffNum >= 0) {
fileListTemp = fileListTemp.slice(-props.maxCount);
} else {
return;
}
}
}
if (info.file.status === 'done') {
console.log('1', info.file.response);
if (info.file.response.status) {
console.log('2', fileListTemp);
fileListTemp = fileListTemp.map((file) => {
if (file.response.status === 'history') {
// let reUrl = file.response.message;
let reUrl = file.response.message;
file.path = reUrl;
file.url = getFileAccessHttpUrl(reUrl);
} else if (file.response.status) {
let reUrl = file.response.data + file.name;
file.path = reUrl;
file.url = getFileAccessHttpUrl(reUrl);
}
return file;
});
// console.log('0', fileListTemp);
}
} else if (info.file.status === 'error') {
createMessage.error(`${info.file.name} 上传失败.`);
}
// console.log('', fileList);
fileList.value = fileListTemp;
if (info.file.status === 'done' || info.file.status === 'removed') {
//returnUrltrue
if (props.returnUrl) {
handlePathChange();
} else {
//returnUrlfalse
let newFileList: any[] = [];
console.log('9', fileListTemp);
for (const item of fileListTemp) {
if (item.status === 'done') {
let url: any = '';
if (item.response.status === 'history') {
url = item.response.message;
} else if (item.response.status) {
url = item.response.data + item.name;
}
// let fileJson = {
// name: item.name,
// url: url,
// };
let fileJson = {
fileName: item.name,
filePath: url,
fileSize: item.size,
};
newFileList.push(fileJson);
}
}
// console.log('2', newFileList);
emitValue(newFileList);
}
}
}
function handlePathChange() {
let uploadFiles = fileList.value;
console.log('3', uploadFiles);
let path = '';
if (!uploadFiles || uploadFiles.length == 0) {
path = '';
}
let pathList: string[] = [];
for (const item of uploadFiles) {
if (item.response.status === 'history') {
pathList.push(item.path);
} else if (item.status === 'done') {
// console.log(item);
// pathList.push(item.path);
pathList.push(item.response.data + item.name);
// pathList.push(item.response.message);
} else {
return;
}
}
console.log('4', pathList);
if (pathList.length > 0) {
path = pathList.join(',');
}
emitValue(path);
}
//
function onFilePreview(file) {
if (isImageMode.value) {
createImgPreview({ imageList: [file.url], maskClosable: true });
} else {
window.open(file.url);
}
}
function emitValue(value) {
emit('change', value);
emit('update:value', value);
}
function uidGenerator() {
return '-' + parseInt(Math.random() * 10000 + 1, 10);
}
function getFileName(path) {
if (path.lastIndexOf('\\') >= 0) {
let reg = new RegExp('\\\\', 'g');
path = path.replace(reg, '/');
}
return path.substring(path.lastIndexOf('/') + 1);
}
defineExpose({
addActionsListener,
});
</script>
<style lang="less">
//noinspection LessUnresolvedVariable
@prefix-cls: ~'@{namespace}-j-upload';
.@{prefix-cls} {
&-container {
position: relative;
.upload-disabled {
.ant-upload-list-item {
.anticon-close {
display: none;
}
.anticon-delete {
display: none;
}
}
/* update-begin-author:taoyan date:2022-5-24 for:VUEN-1093详情界面 图片下载按钮显示不全*/
.upload-download-handler {
right: 6px !important;
}
/* update-end-author:taoyan date:2022-5-24 for:VUEN-1093详情界面 图片下载按钮显示不全*/
}
.ant-upload-list-item {
.upload-actions-container {
position: absolute;
top: -31px;
left: -18px;
z-index: 11;
width: 84px;
height: 84px;
line-height: 28px;
text-align: center;
pointer-events: none;
a {
opacity: 0.9;
margin: 0 5px;
cursor: pointer;
transition: opacity 0.3s;
.anticon {
color: #fff;
font-size: 16px;
}
&:hover {
opacity: 1;
}
}
.upload-mover-handler,
.upload-download-handler {
position: absolute;
pointer-events: auto;
}
.upload-mover-handler {
width: 100%;
bottom: 0;
}
.upload-download-handler {
top: -4px;
right: -4px;
}
}
}
}
}
</style>

@ -0,0 +1,53 @@
<template>
<BasicModal
@register="registerModal"
:title="modalTitle"
:width="width"
@ok="handleOk"
v-bind="$attrs"
>
<DUpload ref="uploadRef" :value="value" v-bind="uploadBinds.props" @change="emitValue" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, unref, reactive, computed, nextTick } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import DUpload from './DUpload.vue';
import { UploadTypeEnum } from './upload.data';
import { propTypes } from '/@/utils/propTypes';
const { createMessage } = useMessage();
const emit = defineEmits(['change', 'update:value', 'register']);
const props = defineProps({
value: propTypes.oneOfType([propTypes.string, propTypes.array]),
width: propTypes.number.def(520),
});
const uploadRef = ref();
const uploadBinds = reactive({ props: {} as any });
const modalTitle = computed(() =>
uploadBinds.props?.fileType === UploadTypeEnum.image ? '图片上传' : '文件上传',
);
//
const [registerModal, { closeModal }] = useModalInner(async (data) => {
uploadBinds.props = unref(data) || {};
if ([UploadTypeEnum.image, 'img', 'picture'].includes(uploadBinds.props?.fileType)) {
uploadBinds.props.fileType = UploadTypeEnum.image;
} else {
uploadBinds.props.fileType = UploadTypeEnum.file;
}
nextTick(() => uploadRef.value.addActionsListener());
});
function handleOk() {
closeModal();
}
function emitValue(value) {
emit('change', value);
emit('update:value', value);
}
</script>

@ -0,0 +1,90 @@
<template>
<div v-show="download" class="upload-download-handler">
<a class="download" title="下载" @click="onDownload">
<Icon icon="ant-design:download" />
</a>
</div>
<div v-show="mover && list.length > 1" class="upload-mover-handler">
<a title="向前移动" @click="onMoveForward">
<Icon icon="ant-design:arrow-left" />
</a>
<a title="向后移动" @click="onMoveBack">
<Icon icon="ant-design:arrow-right" />
</a>
</div>
</template>
<script lang="ts" setup>
import { unref, computed } from 'vue';
import { Icon } from '/@/components/Icon';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
const props = defineProps({
element: { type: HTMLElement, required: true },
fileList: { type: Object, required: true },
mover: { type: Boolean, required: true },
download: { type: Boolean, required: true },
emitValue: { type: Function, required: true },
});
const list = computed(() => unref(props.fileList));
//
function onMoveForward() {
let index = getIndexByUrl();
if (index === -1) {
createMessage.warn('移动失败:' + index);
return;
}
if (index === 0) {
doSwap(index, unref(list).length - 1);
return;
}
doSwap(index, index - 1);
}
//
function onMoveBack() {
let index = getIndexByUrl();
if (index === -1) {
createMessage.warn('移动失败:' + index);
return;
}
if (index == unref(list).length - 1) {
doSwap(index, 0);
return;
}
doSwap(index, index + 1);
}
function doSwap(oldIndex, newIndex) {
if (oldIndex !== newIndex) {
let array: any[] = [...(unref(list) as Array<any>)];
let temp = array[oldIndex];
array[oldIndex] = array[newIndex];
array[newIndex] = temp;
props.emitValue(array.map((i) => i.url).join(','));
}
}
function getIndexByUrl() {
const url = props.element?.getElementsByTagName('img')[0]?.src;
if (url) {
const fileList: any = unref(list);
for (let i = 0; i < fileList.length; i++) {
let current = fileList[i].url;
const replace = url.replace(window.location.origin, '');
if (current === replace || encodeURI(current) === replace) {
return i;
}
}
}
return -1;
}
function onDownload() {
const url = props.element?.getElementsByTagName('img')[0]?.src;
window.open(url);
}
</script>

@ -0,0 +1,3 @@
export { UploadTypeEnum } from './upload.data';
export { default as DUpload } from './DUpload.vue';
export { default as DUploadModal } from './DUploadModal.vue';

@ -0,0 +1,5 @@
export enum UploadTypeEnum {
all = 'all',
image = 'image',
file = 'file',
}

@ -30,6 +30,7 @@ import { BasicUpload } from '/@/components/Upload';
import { StrengthMeter } from '/@/components/StrengthMeter';
import { IconPicker } from '/@/components/Icon';
import { CountdownInput } from '/@/components/CountDown';
import DUpload from './Ds/components/DUpload/DUpload.vue';
const componentMap = new Map<ComponentType, Component>();
@ -67,6 +68,8 @@ componentMap.set('InputCountDown', CountdownInput);
componentMap.set('Upload', BasicUpload);
componentMap.set('Divider', Divider);
//自定义组件
componentMap.set('DUpload', DUpload);
export function add(compName: ComponentType, component: Component) {
componentMap.set(compName, component);

@ -112,4 +112,5 @@ export type ComponentType =
| 'Render'
| 'Slider'
| 'Rate'
| 'Divider';
| 'Divider'
| 'DUpload';

@ -55,7 +55,6 @@ export function useModal(): UseModalReturnType {
}
const getInstance = () => {
console.log(modal);
const instance = unref(modal);
if (!instance) {
error('useModal instance is undefined!');

@ -7,4 +7,5 @@ export type ComponentType =
| 'Checkbox'
| 'Switch'
| 'DatePicker'
| 'TimePicker';
| 'TimePicker'
| 'DUpload';

@ -3,8 +3,51 @@ import { Button } from './Button';
import {
// Need
Button as AntButton,
Select,
Alert,
Checkbox,
DatePicker,
Radio,
Switch,
Card,
List,
Tabs,
Descriptions,
Tree,
Table,
Divider,
Modal,
Drawer,
TreeSelect,
Dropdown,
Tag,
Tooltip,
Badge,
Popover,
Upload,
Transfer,
Steps,
PageHeader,
Result,
Empty,
Avatar,
Menu,
Breadcrumb,
Form,
Input,
Row,
Col,
Spin,
Space,
Layout,
Collapse,
Slider,
InputNumber,
Carousel,
Popconfirm,
Skeleton,
Cascader,
Rate,
} from 'ant-design-vue';
const compList = [AntButton.Group];
@ -14,5 +57,51 @@ export function registerGlobComp(app: App) {
app.component(comp.name || comp.displayName, comp);
});
app.use(Input).use(Button).use(Layout);
app
.use(Select)
.use(Alert)
.use(Button)
.use(Breadcrumb)
.use(Checkbox)
.use(DatePicker)
.use(Radio)
.use(Switch)
.use(Card)
.use(List)
.use(Descriptions)
.use(Tree)
.use(TreeSelect)
.use(Table)
.use(Divider)
.use(Modal)
.use(Drawer)
.use(Dropdown)
.use(Tag)
.use(Tooltip)
.use(Badge)
.use(Popover)
.use(Upload)
.use(Transfer)
.use(Steps)
.use(PageHeader)
.use(Result)
.use(Empty)
.use(Avatar)
.use(Menu)
.use(Tabs)
.use(Form)
.use(Input)
.use(Row)
.use(Col)
.use(Spin)
.use(Space)
.use(Layout)
.use(Collapse)
.use(Slider)
.use(InputNumber)
.use(Carousel)
.use(Popconfirm)
.use(Skeleton)
.use(Cascader)
.use(Rate);
}

@ -10,6 +10,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
VITE_GLOB_APP_SHORT_NAME,
VITE_GLOB_API_URL_PREFIX,
VITE_GLOB_UPLOAD_URL,
VITE_GLOB_VIEW_URL,
} = getAppEnvConfig();
if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) {
@ -25,6 +26,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
shortName: VITE_GLOB_APP_SHORT_NAME,
urlPrefix: VITE_GLOB_API_URL_PREFIX,
uploadUrl: VITE_GLOB_UPLOAD_URL,
viewUrl: VITE_GLOB_VIEW_URL,
};
return glob as Readonly<GlobConfig>;
};

@ -0,0 +1,328 @@
import { useGlobSetting } from '/@/hooks/setting';
import { merge, random } from 'lodash-es';
import { isArray } from '/@/utils/is';
import { FormSchema } from '/@/components/Form';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.uploadUrl;
const viewApiUrl = globSetting.viewUrl;
/**
* 访
* @param fileUrl
* @param prefix(http) http/https
*/
export const getFileAccessHttpUrl = (fileUrl, prefix = 'http') => {
let result = fileUrl;
try {
if (fileUrl && fileUrl.length > 0 && !fileUrl.startsWith(prefix)) {
//判断是否是数组格式
let isArray = fileUrl.indexOf('[') != -1;
if (!isArray) {
let prefix = `${viewApiUrl}`;
// 判断是否已包含前缀
if (!fileUrl.startsWith(prefix)) {
result = `${prefix}${fileUrl}`;
}
}
}
} catch (err) {}
return result;
};
/**
* window.resize
*/
export function triggerWindowResizeEvent() {
let event: any = document.createEvent('HTMLEvents');
event.initEvent('resize', true, true);
event.eventType = 'message';
window.dispatchEvent(event);
}
/**
*
* @param length
*/
export const getRandom = (length: number = 1) => {
return '-' + parseInt(String(Math.random() * 10000 + 1), length);
};
/**
*
* @param length
* @param chats
* @return string
*/
export function randomString(length: number, chats?: string) {
if (!length) length = 1;
if (!chats) {
// noinspection SpellCheckingInspection
chats = '0123456789qwertyuioplkjhgfdsazxcvbnm';
}
let str = '';
for (let i = 0; i < length; i++) {
let num = random(0, chats.length - 1);
str += chats[num];
}
return str;
}
/**
* tree
* @param array tree
* @param opt
* @param startPid
*/
export const listToTree = (array, opt, startPid) => {
const obj = {
primaryKey: opt.primaryKey || 'key',
parentKey: opt.parentKey || 'parentId',
titleKey: opt.titleKey || 'title',
startPid: opt.startPid || '',
currentDept: opt.currentDept || 0,
maxDept: opt.maxDept || 100,
childKey: opt.childKey || 'children',
};
if (startPid) {
obj.startPid = startPid;
}
return toTree(array, obj.startPid, obj.currentDept, obj);
};
/**
* tree
* @param list
* @param startPid
* @param currentDept
* @param opt
* @returns {Array}
*/
export const toTree = (array, startPid, currentDept, opt) => {
if (opt.maxDept < currentDept) {
return [];
}
let child = [];
if (array && array.length > 0) {
child = array
.map((item) => {
// 筛查符合条件的数据(主键 = startPid
if (typeof item[opt.parentKey] !== 'undefined' && item[opt.parentKey] === startPid) {
// 满足条件则递归
const nextChild = toTree(array, item[opt.primaryKey], currentDept + 1, opt);
// 节点信息保存
if (nextChild.length > 0) {
item['isLeaf'] = false;
item[opt.childKey] = nextChild;
} else {
item['isLeaf'] = true;
}
item['title'] = item[opt.titleKey];
item['label'] = item[opt.titleKey];
item['key'] = item[opt.primaryKey];
item['value'] = item[opt.primaryKey];
return item;
}
})
.filter((item) => {
return item !== undefined;
});
}
return child;
};
/**
*
* @param tableData
* @param fieldKeys
*/
export function mapTableTotalSummary(tableData: Recordable[], fieldKeys: string[]) {
let totals: any = { _row: '合计', _index: '合计' };
fieldKeys.forEach((key) => {
totals[key] = tableData.reduce((prev, next) => {
prev += next[key];
return prev;
}, 0);
});
return totals;
}
/**
*
*
* (debounce)(delay)100ms
* 100ms
*
*
* @param fn
* @param delay
* @returns {Function}
*/
export function simpleDebounce(fn, delay = 100) {
let timer: any | null = null;
return function () {
let args = arguments;
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(() => {
// @ts-ignore
fn.apply(this, args);
}, delay);
};
}
/**
*
* @param date
* @param block
*/
export function dateFormat(date, block) {
if (!date) {
return '';
}
let format = block || 'yyyy-MM-dd';
date = new Date(date);
const map = {
M: date.getMonth() + 1, // 月份
d: date.getDate(), // 日
h: date.getHours(), // 小时
m: date.getMinutes(), // 分
s: date.getSeconds(), // 秒
q: Math.floor((date.getMonth() + 3) / 3), // 季度
S: date.getMilliseconds(), // 毫秒
};
format = format.replace(/([yMdhmsqS])+/g, (all, t) => {
let v = map[t];
if (v !== undefined) {
if (all.length > 1) {
v = `0${v}`;
v = v.substr(v.length - 2);
}
return v;
} else if (t === 'y') {
return date
.getFullYear()
.toString()
.substr(4 - all.length);
}
return all;
});
return format;
}
/**
* IE11EdgeChromeFirefoxSafari
* 使JVxeTable Span
*/
export function getEventPath(event) {
let target = event.target;
let path = (event.composedPath && event.composedPath()) || event.path;
if (path != null) {
return path.indexOf(window) < 0 ? path.concat(window) : path;
}
if (target === window) {
return [window];
}
let getParents = (node, memo) => {
const parentNode = node.parentNode;
if (!parentNode) {
return memo;
} else {
return getParents(parentNode, memo.concat(parentNode));
}
};
return [target].concat(getParents(target, []), window);
}
/**
* push
* @param array
* @param value
* @param key id
* @returns {boolean} push true false
*/
export function pushIfNotExist(array, value, key?) {
for (let item of array) {
if (key && item[key] === value[key]) {
return false;
} else if (item === value) {
return false;
}
}
array.push(value);
return true;
}
/**
*
* @param obj
* @returns {*}
*/
export function filterObj(obj) {
if (!(typeof obj == 'object')) {
return;
}
for (let key in obj) {
if (obj.hasOwnProperty(key) && (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
delete obj[key];
}
}
return obj;
}
/**
* 线
* @param string
*/
export function underLine2CamelCase(string: string) {
return string.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
}
/**
*
* @param treeList
* @param fn
* @param childrenKey
*/
export function findTree(treeList: any[], fn: Fn, childrenKey = 'children') {
for (let i = 0; i < treeList.length; i++) {
let item = treeList[i];
if (fn(item, i, treeList)) {
return item;
}
let children = item[childrenKey];
if (isArray(children)) {
let findResult = findTree(children, fn, childrenKey);
if (findResult) {
return findResult;
}
}
}
return null;
}
/** 获取 mapFormSchema 方法 */
export function bindMapFormSchema<T>(spanMap, spanTypeDef: T) {
return function (s: FormSchema, spanType: T = spanTypeDef) {
return merge(
{
disabledLabelWidth: true,
} as FormSchema,
spanMap[spanType],
s,
);
};
}
/**
* nullnull
* @param str
* @return {boolean}
*/
export function stringIsNull(str) {
// 两个 == 可以同时判断 null 和 undefined
return str == null || str === 'null' || str === 'undefined';
}

@ -28,6 +28,7 @@ export function getAppEnvConfig() {
VITE_GLOB_APP_SHORT_NAME,
VITE_GLOB_API_URL_PREFIX,
VITE_GLOB_UPLOAD_URL,
VITE_GLOB_VIEW_URL,
} = ENV;
if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
@ -42,6 +43,7 @@ export function getAppEnvConfig() {
VITE_GLOB_APP_SHORT_NAME,
VITE_GLOB_API_URL_PREFIX,
VITE_GLOB_UPLOAD_URL,
VITE_GLOB_VIEW_URL,
};
}

@ -8,6 +8,20 @@
@ok="handleSubmit"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button @click="closeModal" preIcon="ant-design:cloud-upload-outlined" type="error" :loading="loading" style="margin-right: 0.8rem">提交</a-button>
<a-button @click="closeModal" preIcon="ant-design:close-outlined" type="warning" :loading="loading" ghost style="margin-right: 0.8rem">取消</a-button>
<a-button
@click="handleSubmit(false)"
type="success"
:loading="loading"
preIcon="ant-design:check-outlined"
style="margin-right: 0.8rem"
>仅保存</a-button
>
<a-button @click="handleSubmit(true)" preIcon="ant-design:check-circle-outlined" type="primary" :loading="loading">保存并关闭</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
@ -16,11 +30,13 @@
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from './columns';
import { editBook } from '/@/api/yard/book';
import { editBook, getFiles } from '/@/api/yard/book';
import { useUserStore } from '/@/store/modules/user';
const isUpdate = ref(true);
const loading = ref(false);
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
@ -28,32 +44,48 @@
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
setModalProps({ confirmLoading: false, loading: true });
isUpdate.value = !!data?.isUpdate;
//
// updateSchema({ field: 'customername', dynamicDisabled: true });
// updateSchema({ field: 'bsno', dynamicDisabled: true });
if (unref(isUpdate)) {
setFieldsValue({
...data.record,
});
//
const res: API.DataResult = await getFiles({ id: data.record.gid });
// console.log(res);
setFieldsValue({ files: res.data });
} else {
//
const userStore = useUserStore();
const user = userStore.getUserInfo;
setFieldsValue({ customername: unref(user.companyName) });
setFieldsValue({ corpid: unref(user.companyId) });
setFieldsValue({ userName: unref(user.userName) });
}
setModalProps({ loading: false });
});
const getTitle = computed(() => (!unref(isUpdate) ? '新增预约' : '编辑预约'));
async function handleSubmit() {
async function handleSubmit(exit) {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
// setModalProps({ confirmLoading: true });
// TODO custom api
console.log(values);
loading.value = true;
const res: API.DataResult = await editBook(values);
console.log(res);
if (res.succeeded) {
} else {
}
closeModal();
loading.value = false;
exit && closeModal();
} finally {
setModalProps({ confirmLoading: false });
// setModalProps({ confirmLoading: false });
}
}
</script>

@ -0,0 +1,222 @@
<template>
<BasicModal
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
:width="1100"
>
<a-form
ref="formRef"
:model="bookModel"
:label-col="labelCol"
:wrapper-col="wrapperCol"
:rules="validatorRules"
>
<!-- <a-row class="form-row" :gutter="16">-->
<!-- <a-col :lg="8">-->
<!-- <a-form-item label="委托单位" name="customername">-->
<!-- <a-input v-model:value="bookModel.customername" disabled="true" placeholder="请输入委托单位" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :lg="8">-->
<!-- <a-form-item label="业务类型">-->
<!-- <a-select placeholder="请选择业务类型" v-model:value="bookModel.businessType">-->
<!-- <a-select-option value="1">存箱业务</a-select-option>-->
<!-- <a-select-option value="2">提箱业务</a-select-option>-->
<!-- <a-select-option value="3">区域作业</a-select-option>-->
<!-- </a-select>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :lg="8">-->
<!-- <a-form-item label="预计日期">-->
<!-- <a-date-picker showTime valueFormat="YYYY-MM-DD" v-model:value="bookModel.enterdate" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<a-row class="form-row" :gutter="24">
<a-col :lg="8">
<a-form-item label="订单金额">
<a-input v-model:value="bookModel.truckno" placeholder="请输入订单金额" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="订单备注">
<a-input v-model:value="bookModel.boxCode" placeholder="请输入订单备注" />
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="8">
<a-col :lg="8">
<a-form-item label="装箱资料">
<a-upload
v-model:file-list="fileList"
name="file"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
:headers="headers"
@change="handleChange"
>
<a-button>
<upload-outlined></upload-outlined>
上传
</a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<!-- <a-row class="form-row" :gutter="16">-->
<!-- <a-col :lg="8">-->
<!-- <a-form-item label="承运车号">-->
<!-- <a-input v-model:value="bookModel.truckno" placeholder="请输入承运车号" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :lg="8">-->
<!-- <a-form-item label="箱号">-->
<!-- <a-input v-model:value="bookModel.boxCode" placeholder="请输入箱号" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
</a-form>
</BasicModal>
</template>
<script lang="ts">
import { defineComponent, ref, reactive, computed, unref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
import { UploadProps } from 'ant-design-vue';
import { UploadChangeParam } from 'ant-design-vue/lib/upload';
// import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
export default defineComponent({
name: 'OneToOneModal',
components: { BasicModal },
emits: ['success', 'register'],
setup(props, { emit }) {
const isUpdate = ref(true);
const rowId = ref('');
const formRef = ref();
const labelCol = reactive({
// xs: { span: 24 },
// sm: { span: 5 },
span: 8,
});
const wrapperCol = reactive({
// xs: { span: 24 },
// sm: { span: 16 },
span: 8,
});
const validatorRules = {
// customername: [{ required: true, message: '', trigger: 'blur' }],
};
const bookModel = reactive({
id: null,
customername: '',
orderMoney: '',
businessType: 0,
enterdate: '',
truckno: '',
boxCode: '',
jeecgOrderCustomerList: {
name: '',
telphone: '',
},
jeecgOrderTicketList: {
ticketCode: '',
tickectDate: '',
},
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
reset();
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
// rowId.value = data.record.id;
Object.assign(bookModel, data.record);
let params = { id: bookModel.id };
}
});
const getTitle = computed(() => (!unref(isUpdate) ? '新增预约' : '编辑预约'));
const fileList = ref([]);
const handleChange = (info: UploadChangeParam) => {
// let resFileList = [...info.fileList];
//
// // 1. Limit the number of uploaded files
// // Only to show two recent uploaded files, and old ones will be replaced by the new
// resFileList = resFileList.slice(-2);
//
// // 2. read from response and show file link
// resFileList = resFileList.map(file => {
// if (file.response) {
// // Component will show file.url as link
// file.url = file.response.url;
// }
// return file;
// });
//
// fileList.value = resFileList;
};
function reset() {
bookModel.id = null;
bookModel.customername = '';
bookModel.orderMoney = '';
// bookModel.orderDate = null;
bookModel.businessType = 0;
bookModel.enterdate = '';
bookModel.truckno = '';
bookModel.boxCode = '';
// bookModel.jeecgOrderCustomerList = {};
// bookModel.jeecgOrderTicketList = {};
}
async function handleSubmit() {
formRef.value
.validate()
.then(async () => {
try {
console.log('formData', JSON.stringify(bookModel));
setModalProps({ confirmLoading: true });
closeModal();
emit('success');
} finally {
setModalProps({ confirmLoading: false });
}
})
.catch((error: ValidateErrorEntity<any>) => {
console.log('error', error);
});
}
return {
formRef,
validatorRules,
bookModel,
registerModal,
getTitle,
labelCol,
wrapperCol,
handleSubmit,
};
},
});
</script>
<style scoped>
.ant-btn {
padding: 0 10px;
margin-left: 3px;
}
.ant-form-item-control {
line-height: 0px;
}
/** 主表单行间距 */
.ant-form .ant-form-item {
margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-enterdate .ant-form-item {
margin-bottom: 0px;
}
</style>

@ -3,6 +3,7 @@
import { Tag } from 'ant-design-vue';
import { BasicColumn, FormSchema } from '/@/components/Table';
import { formatToDate, formatToDateTime } from '/@/utils/dateUtil';
import dayjs from 'dayjs';
export const columns: BasicColumn[] = [
{
@ -163,6 +164,7 @@ export const formSchema: FormSchema[] = [
field: 'divider-selects',
component: 'Divider',
label: '基本信息',
helpMessage: ['请按要求填写场站预约基本信息'],
},
{
label: '',
@ -171,6 +173,20 @@ export const formSchema: FormSchema[] = [
defaultValue: '',
show: false,
},
{
label: '',
field: 'corpid',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '',
field: 'userName',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'customername',
label: '委托单位',
@ -179,6 +195,9 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 8,
},
dynamicDisabled: () => {
return true;
},
},
{
field: 'businessType',
@ -188,6 +207,13 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 8,
},
componentProps: {
options: [
{ label: '存箱业务', value: 1 },
{ label: '提箱业务', value: 2 },
{ label: '区域作业', value: 3 },
],
},
},
{
field: 'enterdate',
@ -197,6 +223,12 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 8,
},
componentProps: {
disabledDate: (current: dayjs.Dayjs) => {
// Can not select days before today and today
return current && current < dayjs().endOf('day');
},
},
},
{
field: 'truckno',
@ -223,6 +255,13 @@ export const formSchema: FormSchema[] = [
component: 'Select',
required: true,
colProps: { span: 8 },
componentProps: {
options: [
{ label: '20GP', value: '20GP' },
{ label: '40GP', value: '40GP' },
{ label: '40HC', value: '40HC' },
],
},
},
{
field: 'linkTel',
@ -232,9 +271,12 @@ export const formSchema: FormSchema[] = [
},
{
field: 'boxWeigth',
label: '车重(kg)',
component: 'InputNumber',
label: '车重',
component: 'Input',
colProps: { span: 8 },
componentProps: {
suffix: 'kg',
},
helpMessage: ['存箱请填写车重+货重'],
},
{
@ -249,16 +291,21 @@ export const formSchema: FormSchema[] = [
label: '流水号',
component: 'Input',
colProps: { span: 8 },
dynamicDisabled: () => {
return true;
},
},
{
field: 'divider-selects',
component: 'Divider',
label: '装箱资料',
helpMessage: ['只能上传jpg/png/bmp/jpeg/bmp文件且不超过3M'],
helpMessage: ['请按要求上传装箱相关资料!'],
},
{
field: 'files',
component: 'DUpload',
helpMessage: '最多上传7个文件',
label: '装箱资料',
componentProps: { maxCount: 7 },
},
// {
// field: 'remark',
// label: '备注',
// component: 'InputTextArea',
// },
];

@ -2,8 +2,8 @@
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleCreate"></a-button>
<a-button type="success" @click="handlePrint"></a-button>
<a-button type="primary" @click="handleCreate" preIcon="ant-design:plus-outlined">新增预约</a-button>
<a-button type="success" @click="handlePrint" preIcon="ant-design:printer-outlined">磅单打印</a-button>
</template>
<template #action="{ record }">
<TableAction
@ -26,6 +26,7 @@
import { useModal } from '/@/components/Modal';
import BookModal from './BookModal.vue';
import { columns, searchFormSchema } from './columns';
import { useUserStore } from '/@/store/modules/user';
// const total = ref(0);
let sortInfo: SorterResult = {};
let filterInfo: Partial<Recordable<string[]>> = [];
@ -126,13 +127,21 @@
});
}
}
if (condition.length == 0) {
condition.push({
FieldName: 'BSNO',
FieldValue: 'ZH0000000001',
ConditionalType: 10,
});
}
const userStore = useUserStore();
const user = userStore.getUserInfo;
//
condition.push({
FieldName: 'CORPID',
FieldValue: user.companyId,
ConditionalType: 0,
});
// if (condition.length == 0) {
// condition.push({
// FieldName: 'BSNO',
// FieldValue: 'ZH0000000001',
// ConditionalType: 10,
// });
// }
postParam.queryCondition = JSON.stringify(condition);
// console.log(postParam);
return postParam;

@ -142,6 +142,8 @@ export interface GlobConfig {
apiUrl: string;
// Upload url
uploadUrl?: string;
// 预览 url
viewUrl?: string;
// Service interface url prefix
urlPrefix?: string;
// Project abbreviation
@ -158,4 +160,6 @@ export interface GlobEnvConfig {
VITE_GLOB_APP_SHORT_NAME: string;
// Upload url
VITE_GLOB_UPLOAD_URL?: string;
// view url
VITE_GLOB_VIEW_URL?: string;
}

@ -3933,6 +3933,11 @@ dateformat@^3.0.0:
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
dayjs@^1.11.5:
version "1.11.5"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93"
integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==
debug@2.6.9, debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"

@ -11,7 +11,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentValidation.AspNetCore" Version="11.1.2" />
<PackageReference Include="FluentValidation" Version="11.2.2" />
<PackageReference Include="FluentValidation.AspNetCore" Version="11.2.2" />
<PackageReference Include="SqlSugarCore" Version="5.1.0" />
</ItemGroup>

@ -1,4 +1,7 @@
namespace DS.WMS.Core.System.Dtos;
using System.ComponentModel.DataAnnotations;
using DS.Module.Core;
namespace DS.WMS.Core.System.Dtos;
public class OP_YARD_BOOKInput
{
@ -9,17 +12,20 @@ public class OP_YARD_BOOKInput
/// <summary>
///委托单位
/// </summary>
/// </summary>
[Required(ErrorMessage = "委托单位不能为空")]
public string CUSTOMERNAME { get; set; }
/// <summary>
///进站时间
/// </summary>
/// </summary>
[Required(ErrorMessage = "预计日期不能为空")]
public DateTime? ENTERDATE { get; set; }
/// <summary>
///车牌
/// </summary>
/// </summary>
[Required(ErrorMessage = "承运车号不能为空")]
public string TRUCKNO { get; set; }
/// <summary>
@ -42,20 +48,15 @@ public class OP_YARD_BOOKInput
/// </summary>
public decimal? BoxWeigth { get; set; }
/// <summary>
///库位
/// </summary>
public string AREACODE { get; set; }
/// <summary>
///货物名称
/// </summary>
public string GOODNAME { get; set; }
public string GOODNAME { get; set; }
/// <summary>
///业务类型
/// </summary>
/// </summary>
[Required(ErrorMessage = "业务类型不能为空")]
public int? BusinessType { get; set; }
/// <summary>
@ -71,6 +72,7 @@ public class OP_YARD_BOOKInput
/// <summary>
/// 上传文件列表
/// </summary>
[Required(ErrorMessage = "装箱资料不能为空")]
public fileinfo[] Files { get; set; }
/// <summary>
@ -78,6 +80,7 @@ public class OP_YARD_BOOKInput
/// </summary>
public string UserName { get; set; }
}
/// <summary>
/// 文件信息
@ -86,9 +89,11 @@ public class fileinfo{
/// <summary>
/// 文件名称
/// </summary>
public string name { get; set; }
public string FileName { get; set; }
/// <summary>
/// 路径
/// </summary>
public string url { get; set; }
public string FilePath { get; set; }
public int FileSize { get; set; }
}

@ -53,8 +53,8 @@ public class OP_YARD_BOOKService : IOP_YARD_BOOKService
{
list.Add(new fileinfo
{
name = item.FILENAME,
url = item.IMGPATH.IsNullOrEmpty() ? item.FILEPATH : item.IMGPATH,
FileName = item.FILENAME,
FilePath = item.IMGPATH.IsNullOrEmpty() ? item.FILEPATH : item.IMGPATH,
});
}
}
@ -195,18 +195,18 @@ public class OP_YARD_BOOKService : IOP_YARD_BOOKService
var imgfiles = new string[] { "jpeg", "jpg", "gif", "bmp", "png" };
foreach (var item in model.Files)
{
var filetype = item.name.Substring(item.name.LastIndexOf(".") + 1);
var filetype = item.FileName.Substring(item.FileName.LastIndexOf(".") + 1);
var infoFile = new INFO_FILES();
infoFile.GID = Guid.NewGuid();
infoFile.PID = ctnId;
infoFile.FILENAME = item.name;
infoFile.FILENAME = item.FileName;
if (imgfiles.Contains(filetype))
{
infoFile.IMGPATH = item.url;
infoFile.IMGPATH = item.FilePath;
}
else
{
infoFile.FILEPATH = item.url;
infoFile.FILEPATH = item.FilePath;
}
infoFile.FILETYPE = "装箱资料";
@ -299,18 +299,18 @@ public class OP_YARD_BOOKService : IOP_YARD_BOOKService
// }
// else
// {
var filetype = item.name.Substring(item.name.LastIndexOf(".") + 1);
var filetype = item.FileName.Substring(item.FileName.LastIndexOf(".") + 1);
var infoFile = new INFO_FILES();
infoFile.GID = Guid.NewGuid();
infoFile.PID = GID;
infoFile.FILENAME = item.name;
infoFile.FILENAME = item.FileName;
if (imgfiles.Contains(filetype))
{
infoFile.IMGPATH = item.url;
infoFile.IMGPATH = item.FilePath;
}
else
{
infoFile.FILEPATH = item.url;
infoFile.FILEPATH = item.FilePath;
}
infoFile.FILETYPE = "装箱资料";

@ -1,7 +1,10 @@
using DS.Module.Core;
using System.Reflection;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.Filters;
using DS.Module.Core.Helpers;
using DS.Module.Core.Modules;
using DS.Module.Core.Reflection;
using DS.Module.Jwt;
using DS.Module.Log;
using DS.Module.SqlSugar;
@ -37,43 +40,53 @@ public class DSAppWebModule : DSAppModule
public override void ConfigureServices(ConfigureServicesContext context)
{
var service = context.Services;
service.Configure<ApiBehaviorOptions>(options =>
{
// 禁用默认模型验证过滤器
options.SuppressModelStateInvalidFilter = true;
});
// service.Configure<ApiBehaviorOptions>(options =>
// {
// // 禁用默认模型验证过滤器
// options.SuppressModelStateInvalidFilter = true;
// });
service.AddControllersWithViews(options =>
{
// 全局添加自定义模型验证过滤器
options.Filters.Add<ModelActionFiter>();
// options.Filters.Add<ModelActionFiter>();
//全局异常过滤
options.Filters.Add<GlobalExceptionsFilter>();
// options.Filters.Add(typeof(GlobalExceptionsFilter));
options.Filters.Add<GlobalExceptionsFilter>();
options.SuppressAsyncSuffixInActionNames = false;
//x.Filters.Add<PermissionAuthorizationFilter>();
})
.AddFluentValidation(config => //添加FluentValidation验证
{
var controllerAssemblies = new[]
{
typeof(UserLoginValidation).Assembly,
{
//程序集方式添加验证
config.RegisterValidatorsFromAssemblyContaining(typeof(UserLoginValidation));
//是否与MvcValidation共存
config.DisableDataAnnotationsValidation = true;
})
.ConfigureApiBehaviorOptions(options =>
{
//使用自定义模型验证
options.InvalidModelStateResponseFactory = (context) =>
{
var errors = context.ModelState
.Where(e => e.Value.Errors.Count > 0)
.Select(e => e.Value.Errors.First().ErrorMessage)
.ToList();
var result = DataResult<Object>.Failed(string.Join("|", errors));
return new JsonResult(result);
};
// config.ImplicitlyValidateChildProperties = true;
foreach (var assembly in controllerAssemblies)
{
config.RegisterValidatorsFromAssembly(assembly);
}
})
//全局配置Json序列化处理
.AddNewtonsoftJson(options =>
{
//忽略循环引用
options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
//不使用驼峰样式的key
// options.SerializerSettings.ContractResolver = new DefaultContractResolver();
//设置时间格式
// 首字母小写(驼峰样式)
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
// 时间格式化
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
// 忽略循环引用
options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
// 忽略空值
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
});
//跨域请求
policyName = AppSetting.Configuration["Cors:PolicyName"];
@ -89,7 +102,24 @@ public class DSAppWebModule : DSAppModule
});
});
}
// /// <summary>
// /// 获取所有的FluentValidation Validator的类
// /// </summary>
// public IEnumerable<Type> GetFluentValidationValidator(string assemblyName)
// {
// if (assemblyName == null)
// throw new ArgumentNullException(nameof(assemblyName));
// if (string.IsNullOrEmpty(assemblyName))
// throw new ArgumentNullException(nameof(assemblyName));
//
// var implementAssembly = AssemblyHelper.GetAssembliesByName(assemblyName);
// if (implementAssembly == null)
// {
// throw new DllNotFoundException($"the dll ConferenceWebApi not be found");
// }
// var validatorList = implementAssembly.Where(e => e.FullName.EndsWith("Validator"));
// return validatorList;
// }
/// <summary>
///
/// </summary>

@ -182,17 +182,17 @@
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.CUSTOMERNAME">
<summary>
委托单位
</summary>
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.ENTERDATE">
<summary>
进站时间
</summary>
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.TRUCKNO">
<summary>
车牌
</summary>
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.LinkTel">
<summary>
@ -214,11 +214,6 @@
箱重
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.AREACODE">
<summary>
库位
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.GOODNAME">
<summary>
货物名称
@ -227,7 +222,7 @@
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.BusinessType">
<summary>
业务类型
</summary>
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.OP_YARD_BOOKInput.ISTwoBox">
<summary>
@ -254,12 +249,12 @@
文件信息
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.fileinfo.name">
<member name="P:DS.WMS.Core.System.Dtos.fileinfo.FileName">
<summary>
文件名称
</summary>
</member>
<member name="P:DS.WMS.Core.System.Dtos.fileinfo.url">
<member name="P:DS.WMS.Core.System.Dtos.fileinfo.FilePath">
<summary>
路径
</summary>

@ -672,3 +672,167 @@
2022-10-15 10:59:55.9017 Info Adding target FileTarget(Name=allfile)
2022-10-15 10:59:55.9017 Info Adding target FileTarget(Name=ownFile-web)
2022-10-15 10:59:55.9484 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-15 22:58:40.0197 Info AppDomain Shutting down. LogFactory closing...
2022-10-15 22:58:40.0732 Info LogFactory has been closed.
2022-10-16 07:26:37.0099 Info Message Template Auto Format enabled
2022-10-16 07:26:37.0487 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 07:26:37.3515 Info Adding target FileTarget(Name=allfile)
2022-10-16 07:26:37.3515 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 07:26:37.4859 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 07:36:24.0911 Info Message Template Auto Format enabled
2022-10-16 07:36:24.1047 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 07:36:24.1957 Info Adding target FileTarget(Name=allfile)
2022-10-16 07:36:24.1957 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 07:36:24.2520 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 14:41:19.2077 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 14:41:19.2463 Info LogFactory has been closed.
2022-10-16 14:42:10.3237 Info Message Template Auto Format enabled
2022-10-16 14:42:10.3366 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 14:42:10.4020 Info Adding target FileTarget(Name=allfile)
2022-10-16 14:42:10.4020 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 14:42:10.4442 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 16:28:26.0504 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 16:28:26.0661 Info LogFactory has been closed.
2022-10-16 16:30:02.0272 Info Message Template Auto Format enabled
2022-10-16 16:30:02.0374 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 16:30:02.0932 Info Adding target FileTarget(Name=allfile)
2022-10-16 16:30:02.0932 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 16:30:02.1266 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 18:04:00.4444 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 18:04:00.4670 Info LogFactory has been closed.
2022-10-16 19:11:31.8975 Info Message Template Auto Format enabled
2022-10-16 19:11:31.9131 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 19:11:32.0165 Info Adding target FileTarget(Name=allfile)
2022-10-16 19:11:32.0240 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 19:11:32.0881 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 19:29:36.2223 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 19:29:36.2414 Info LogFactory has been closed.
2022-10-16 19:30:06.7953 Info Message Template Auto Format enabled
2022-10-16 19:30:06.8179 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 19:30:06.9514 Info Adding target FileTarget(Name=allfile)
2022-10-16 19:30:06.9608 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 19:30:07.0189 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 19:30:26.4599 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 19:30:26.4826 Info LogFactory has been closed.
2022-10-16 19:35:14.5248 Info Message Template Auto Format enabled
2022-10-16 19:35:14.5494 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 19:35:14.6631 Info Adding target FileTarget(Name=allfile)
2022-10-16 19:35:14.6631 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 19:35:14.6988 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 20:09:41.8777 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 20:09:41.8954 Info LogFactory has been closed.
2022-10-16 20:10:01.2491 Info Message Template Auto Format enabled
2022-10-16 20:10:01.2589 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 20:10:01.3194 Info Adding target FileTarget(Name=allfile)
2022-10-16 20:10:01.3194 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 20:10:01.3505 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 20:14:24.3873 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 20:14:24.4139 Info LogFactory has been closed.
2022-10-16 20:14:43.9987 Info Message Template Auto Format enabled
2022-10-16 20:14:44.0186 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 20:14:44.1162 Info Adding target FileTarget(Name=allfile)
2022-10-16 20:14:44.1162 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 20:14:44.1677 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 20:15:05.2483 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 20:15:05.2624 Info LogFactory has been closed.
2022-10-16 20:15:23.6799 Info Message Template Auto Format enabled
2022-10-16 20:15:23.6799 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 20:15:23.7568 Info Adding target FileTarget(Name=allfile)
2022-10-16 20:15:23.7568 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 20:15:23.8168 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 20:23:00.7866 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 20:23:00.8056 Info LogFactory has been closed.
2022-10-16 20:23:34.9439 Info Message Template Auto Format enabled
2022-10-16 20:23:34.9628 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 20:23:35.2276 Info Adding target FileTarget(Name=allfile)
2022-10-16 20:23:35.2276 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 20:23:35.2829 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 21:11:22.6935 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 21:11:22.7103 Info LogFactory has been closed.
2022-10-16 21:13:51.2559 Info Message Template Auto Format enabled
2022-10-16 21:13:51.2696 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 21:13:51.3841 Info Adding target FileTarget(Name=allfile)
2022-10-16 21:13:51.3841 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 21:13:51.4605 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 23:16:37.1597 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 23:16:37.1922 Info LogFactory has been closed.
2022-10-16 23:17:01.2070 Info Message Template Auto Format enabled
2022-10-16 23:17:01.2243 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 23:17:01.2957 Info Adding target FileTarget(Name=allfile)
2022-10-16 23:17:01.2957 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 23:17:01.3270 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 23:21:10.0785 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 23:21:10.0915 Info LogFactory has been closed.
2022-10-16 23:21:27.4032 Info Message Template Auto Format enabled
2022-10-16 23:21:27.4238 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 23:21:27.5129 Info Adding target FileTarget(Name=allfile)
2022-10-16 23:21:27.5129 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 23:21:27.5686 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 23:23:43.0927 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 23:23:43.1268 Info LogFactory has been closed.
2022-10-16 23:34:42.8608 Info Message Template Auto Format enabled
2022-10-16 23:34:42.8745 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 23:34:42.9619 Info Adding target FileTarget(Name=allfile)
2022-10-16 23:34:42.9619 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 23:34:43.0125 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 23:36:41.0230 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 23:36:41.0230 Info LogFactory has been closed.
2022-10-16 23:37:20.7552 Info Message Template Auto Format enabled
2022-10-16 23:37:20.7682 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 23:37:20.8404 Info Adding target FileTarget(Name=allfile)
2022-10-16 23:37:20.8404 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 23:37:20.8800 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-16 23:37:46.6447 Info AppDomain Shutting down. LogFactory closing...
2022-10-16 23:37:46.6684 Info LogFactory has been closed.
2022-10-16 23:38:03.3776 Info Message Template Auto Format enabled
2022-10-16 23:38:03.3940 Info Loading assembly: NLog.Web.AspNetCore
2022-10-16 23:38:03.4476 Info Adding target FileTarget(Name=allfile)
2022-10-16 23:38:03.4476 Info Adding target FileTarget(Name=ownFile-web)
2022-10-16 23:38:03.4784 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:00:04.3312 Info Message Template Auto Format enabled
2022-10-17 00:00:04.3563 Info Loading assembly: NLog.Web.AspNetCore
2022-10-17 00:00:04.5142 Info Adding target FileTarget(Name=allfile)
2022-10-17 00:00:04.5274 Info Adding target FileTarget(Name=ownFile-web)
2022-10-17 00:00:04.6195 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:01:30.5661 Info AppDomain Shutting down. LogFactory closing...
2022-10-17 00:01:30.5793 Info LogFactory has been closed.
2022-10-17 00:01:53.0855 Info Message Template Auto Format enabled
2022-10-17 00:01:53.1005 Info Loading assembly: NLog.Web.AspNetCore
2022-10-17 00:01:53.3365 Info Adding target FileTarget(Name=allfile)
2022-10-17 00:01:53.3365 Info Adding target FileTarget(Name=ownFile-web)
2022-10-17 00:01:53.5284 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:02:08.4329 Info AppDomain Shutting down. LogFactory closing...
2022-10-17 00:02:08.4482 Info LogFactory has been closed.
2022-10-17 00:04:02.3338 Info Message Template Auto Format enabled
2022-10-17 00:04:02.4273 Info Loading assembly: NLog.Web.AspNetCore
2022-10-17 00:04:02.8511 Info Adding target FileTarget(Name=allfile)
2022-10-17 00:04:02.8664 Info Adding target FileTarget(Name=ownFile-web)
2022-10-17 00:04:02.9610 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:04:24.9349 Info AppDomain Shutting down. LogFactory closing...
2022-10-17 00:04:24.9596 Info LogFactory has been closed.
2022-10-17 00:04:48.0176 Info Message Template Auto Format enabled
2022-10-17 00:04:48.0431 Info Loading assembly: NLog.Web.AspNetCore
2022-10-17 00:04:48.2116 Info Adding target FileTarget(Name=allfile)
2022-10-17 00:04:48.2316 Info Adding target FileTarget(Name=ownFile-web)
2022-10-17 00:04:48.3283 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:05:11.2137 Info AppDomain Shutting down. LogFactory closing...
2022-10-17 00:05:11.2327 Info LogFactory has been closed.
2022-10-17 00:05:30.8675 Info Message Template Auto Format enabled
2022-10-17 00:05:30.8824 Info Loading assembly: NLog.Web.AspNetCore
2022-10-17 00:05:30.9600 Info Adding target FileTarget(Name=allfile)
2022-10-17 00:05:30.9600 Info Adding target FileTarget(Name=ownFile-web)
2022-10-17 00:05:31.0057 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:06:57.1624 Info Message Template Auto Format enabled
2022-10-17 00:06:57.1624 Info Loading assembly: NLog.Web.AspNetCore
2022-10-17 00:06:57.2438 Info Adding target FileTarget(Name=allfile)
2022-10-17 00:06:57.2438 Info Adding target FileTarget(Name=ownFile-web)
2022-10-17 00:06:57.2884 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:07:40.8770 Info AppDomain Shutting down. LogFactory closing...
2022-10-17 00:07:40.8925 Info LogFactory has been closed.
2022-10-17 00:08:14.1720 Info Message Template Auto Format enabled
2022-10-17 00:08:14.1998 Info Loading assembly: NLog.Web.AspNetCore
2022-10-17 00:08:14.4300 Info Adding target FileTarget(Name=allfile)
2022-10-17 00:08:14.4453 Info Adding target FileTarget(Name=ownFile-web)
2022-10-17 00:08:14.5194 Info Validating config: TargetNames=allfile, ownFile-web, ConfigItems=47, FilePath=D:\Code\DS\YardBookSolution\yardbookapi-service\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2022-10-17 00:08:36.3607 Info AppDomain Shutting down. LogFactory closing...
2022-10-17 00:08:36.3742 Info LogFactory has been closed.

@ -18,7 +18,7 @@
},
"Cors": {
"PolicyName": "WMSCore.API",
"Url": "http://localhost:8000,http://localhost:3000,https://localhost:3100,http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084"
"Url": "http://localhost:8000,http://0.0.0.0:9995,http://localhost:9995,http://localhost:3000,https://localhost:3100,http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084"
},
"SwaggerDoc": {
"ContactName": "Wms API.Core",

Loading…
Cancel
Save