diff --git a/src/views/iot-card/CardManagement/UploadFile.vue b/src/views/iot-card/CardManagement/UploadFile.vue index 7356d608..060202d6 100644 --- a/src/views/iot-card/CardManagement/UploadFile.vue +++ b/src/views/iot-card/CardManagement/UploadFile.vue @@ -102,6 +102,7 @@ const uploadChange = async (info: Record) => { .then((response: any) => { count.value = response.result?.total || 0 onlyMessage('导入成功'); + errMessage.value = ''; }) .catch((err) => { errMessage.value = err?.response?.data?.message || '导入失败' diff --git a/src/views/system/Basis/index.vue b/src/views/system/Basis/index.vue index 6a7ab35f..8fddcbb4 100644 --- a/src/views/system/Basis/index.vue +++ b/src/views/system/Basis/index.vue @@ -458,11 +458,11 @@ const uploader: uploaderType = { uploader.imageTypes .map((m: string) => m.split('.')[1]) .filter((typeStr) => file.type.includes(typeStr)).length > 0; - const sizeBool = file.size / 1024 / 1024 < 4; + const sizeBool = file.size / 1024 / 1024 < 2; if (!typeBool) { onlyMessage(`请上传.jpg.png.jfif.pjp.pjpeg.jpeg格式的图片`, 'error'); } else if (!sizeBool) { - onlyMessage(`图片大小必须小于4M`, 'error'); + onlyMessage(`图片大小必须小于2M`, 'error'); } return typeBool && sizeBool; }, diff --git a/src/views/system/Department/components/EditDepartmentDialog.vue b/src/views/system/Department/components/EditDepartmentDialog.vue index c47728ed..0e8251ef 100644 --- a/src/views/system/Department/components/EditDepartmentDialog.vue +++ b/src/views/system/Department/components/EditDepartmentDialog.vue @@ -17,6 +17,7 @@ v-model:value="form.data.parentId" style="width: 100%" placeholder="请选择上级组织" + allowClear :tree-data="treeData" :field-names="{ value: 'id' }" @change="handleTreeSelectChange" diff --git a/src/views/system/Department/components/LeftTree.vue b/src/views/system/Department/components/LeftTree.vue index dccf2262..740a6245 100644 --- a/src/views/system/Department/components/LeftTree.vue +++ b/src/views/system/Department/components/LeftTree.vue @@ -128,7 +128,7 @@ function getTree(cb?: Function) { treeMap.clear() getTreeData_api(params) .then((resp: any) => { - selectedKeys.value = [resp.result[0].id]; + selectedKeys.value = [resp.result[0]?.id]; sourceTree.value = resp.result.sort((a: any, b: any) => a.sortIndex === b.sortIndex ? b.createTime - a.createTime @@ -272,8 +272,9 @@ init(); align-items: center; .title { - width: calc(100% - 80px); - } + flex: 1; + min-width: 80px; + } .func-btns { display: none; font-size: 14px; diff --git a/src/views/system/Department/device/index.vue b/src/views/system/Department/device/index.vue index 98cb8d8d..b38cb8e4 100644 --- a/src/views/system/Department/device/index.vue +++ b/src/views/system/Department/device/index.vue @@ -93,25 +93,25 @@ @@ -303,7 +304,6 @@ const columns = [ key: 'permission', ellipsis: true, scopedSlots: true, - width: 300, }, { title: '注册时间', @@ -311,7 +311,6 @@ const columns = [ key: 'registryTime', ellipsis: true, scopedSlots: true, - width: 200, search: { type: 'date', }, @@ -330,6 +329,7 @@ const columns = [ ], }, scopedSlots: true, + width:80 }, { diff --git a/src/views/system/Department/product/index.vue b/src/views/system/Department/product/index.vue index 09b2c466..988353f5 100644 --- a/src/views/system/Department/product/index.vue +++ b/src/views/system/Department/product/index.vue @@ -89,25 +89,25 @@ @@ -297,7 +298,7 @@ const columns = [ dataIndex: 'state', key: 'state', ellipsis: true, - width: '80px', + width: 80, search: { type: 'select', options: [ diff --git a/src/views/system/Menu/Detail/BasicInfo.vue b/src/views/system/Menu/Detail/BasicInfo.vue index bd890dd4..761aad68 100644 --- a/src/views/system/Menu/Detail/BasicInfo.vue +++ b/src/views/system/Menu/Detail/BasicInfo.vue @@ -5,6 +5,7 @@
@@ -288,6 +289,7 @@ const routeParams = { // 表单 const basicFormRef = ref(); const permissFormRef = ref(); +const uploadIcon = ref(); const form = reactive({ data: { name: '', @@ -393,6 +395,10 @@ const form = reactive({ }); form.init(); +const choseIcon = (typeStr:string) =>{ + form.data.icon = typeStr; + uploadIcon.value?.clearValidate(); +} // 弹窗 const dialogVisible = ref(false);