From 1b3baa1e35d16cd1c45fb1d56efa15f2b3d80cb1 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Thu, 27 Oct 2022 17:51:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=A4=B4=E5=83=8F=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0,=E4=BF=AE=E6=94=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/manage.js | 11 +- src/components/jeecg/JImageUpload.vue | 2 +- src/components/tools/UserMenu.vue | 2 +- src/extends/FileMangement/fileMangement.vue | 4 +- src/mixins/JeecgListMixin.js | 9 +- .../form/ProcessMaterialBorrowingForm.vue | 30 ++-- .../form/ProcessMaterialWarehousingForm.vue | 46 +++--- .../form/ProcessMaterialsAllotForm.vue | 30 ++-- .../form/ProcessMaterialsDeliveryForm.vue | 30 ++-- .../form/ProcessMaterialsReturnForm.vue | 30 ++-- .../ProcessPermissionAuthorizationForm.vue | 22 ++- .../form/ProcessSmaterialsScrapForm.vue | 20 ++- .../form/ProcessSpecialMaterialsForm.vue | 29 ++-- .../activiti/form/ProcessUdgetPlanForm.vue | 49 +++--- src/views/system/UserList.vue | 4 +- src/views/system/modules/UserModal.vue | 154 ++++++++++++------ 16 files changed, 286 insertions(+), 186 deletions(-) diff --git a/src/api/manage.js b/src/api/manage.js index b017b86..eb4f340 100644 --- a/src/api/manage.js +++ b/src/api/manage.js @@ -127,7 +127,8 @@ export function downFile(url,parameter){ * @param parameter * @returns {*} */ -export function downloadFile(url, fileName, parameter) { +export function +downloadFile(url, fileName, parameter) { return downFile(url, parameter).then((data) => { if (!data || data.size === 0) { Vue.prototype['$message'].warning('文件下载失败') @@ -179,10 +180,10 @@ export function getFileAccessHttpUrl(avatar,subStr) { if(avatar && avatar.startsWith(subStr)){ return avatar; }else{ - if (window._CONFIG['BASE_FileType']=="mongodb"){ - const token = Vue.ls.get(ACCESS_TOKEN); - return window._CONFIG['domianURL']+`/system/sysFile/opendownload?id=${avatar}&token=${token}` - } + // if (window._CONFIG['BASE_FileType']=="mongodb"){ + // const token = Vue.ls.get(ACCESS_TOKEN); + // return window._CONFIG['domianURL']+`/system/sysFile/opendownload?id=${avatar}&token=${token}` + // } if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){ return window._CONFIG['staticDomainURL'] + "/" + avatar; } diff --git a/src/components/jeecg/JImageUpload.vue b/src/components/jeecg/JImageUpload.vue index 004fd44..f50fcd1 100644 --- a/src/components/jeecg/JImageUpload.vue +++ b/src/components/jeecg/JImageUpload.vue @@ -48,7 +48,7 @@ name: 'JImageUpload', data(){ return { - uploadAction:window._CONFIG['domianURL']+"/sys/common/upload", + uploadAction:window._CONFIG['domianURL']+"/sys/upload/uploadMinio", uploadLoading:false, picUrl:false, headers:{}, diff --git a/src/components/tools/UserMenu.vue b/src/components/tools/UserMenu.vue index 2d88c5a..6ac68bf 100644 --- a/src/components/tools/UserMenu.vue +++ b/src/components/tools/UserMenu.vue @@ -100,7 +100,7 @@ import { mixinDevice } from '@/utils/mixin.js' import { getFileAccessHttpUrl,getAction } from "@/api/manage" import Vue from 'vue' - import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" + import { UI_CACHE_DB_DICT_DATA, USER_INFO } from '@/store/mutation-types' export default { name: "UserMenu", diff --git a/src/extends/FileMangement/fileMangement.vue b/src/extends/FileMangement/fileMangement.vue index 3970404..ba076dc 100644 --- a/src/extends/FileMangement/fileMangement.vue +++ b/src/extends/FileMangement/fileMangement.vue @@ -23,7 +23,7 @@ \ No newline at end of file diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue index 4d0ae83..1a3fbc2 100644 --- a/src/views/system/modules/UserModal.vue +++ b/src/views/system/modules/UserModal.vue @@ -97,6 +97,22 @@ 普通用户 上级 + + 头像 +
+ +
上传头像
+
+
- - - - + + + + + + + + + + + + + + + + + + + + + { that.form.setFieldsValue(pick(this.model,'username','sex','realname','email','phone','activitiSync','workNo','telephone','post')) }); + this.picUrl = record.avatar;//以这句为主,设置model中的图片字段 + this.model.img = record.avatar; + console.log("图片路径>>>>>>>>>",record.avatar) + console.log("图片路径>>>>>>>>>",this.picUrl) + let obj ={} + obj.url= record.avatar; //身份为上级显示负责部门,否则不显示 if(this.model.userIdentity=="2"){ this.identity="2"; @@ -627,32 +687,32 @@ } return e && e.fileList }, - beforeUpload: function(file){ - var fileType = file.type; - if(fileType.indexOf('image')<0){ - this.$message.warning('请上传图片'); - return false; - } - //TODO 验证文件大小 - }, - handleChange (info) { - this.picUrl = ""; - if (info.file.status === 'uploading') { - this.uploadLoading = true; - return - } - if (info.file.status === 'done') { - var response = info.file.response; - this.uploadLoading = false; - console.log(response); - if(response.success){ - this.model.avatar = response.message; - this.picUrl = "Has no pic url yet"; - }else{ - this.$message.warning(response.message); - } - } - }, + // beforeUpload: function(file){ + // var fileType = file.type; + // if(fileType.indexOf('image')<0){ + // this.$message.warning('请上传图片'); + // return false; + // } + // //TODO 验证文件大小 + // }, + // handleChange (info) { + // this.picUrl = ""; + // if (info.file.status === 'uploading') { + // this.uploadLoading = true; + // return + // } + // if (info.file.status === 'done') { + // var response = info.file.response; + // this.uploadLoading = false; + // console.log(response); + // if(response.success){ + // this.model.avatar = response.message; + // this.picUrl = "Has no pic url yet"; + // }else{ + // this.$message.warning(response.message); + // } + // } + // }, // 搜索用户对应的部门API onSearch(){ this.$refs.departWindow.add(this.checkedDepartKeys,this.userId);