diff --git a/dist.zip b/dist.zip
deleted file mode 100644
index a9b9f1a..0000000
Binary files a/dist.zip and /dev/null differ
diff --git a/src/option/user/info.js b/src/option/user/info.js
index e198ead..37ee09b 100644
--- a/src/option/user/info.js
+++ b/src/option/user/info.js
@@ -1,4 +1,5 @@
-import website from "../../config/website"
+import website from "../../config/website";
+import { Message } from 'element-ui';
export default {
tabs: true,
tabsActive: 1,
@@ -8,6 +9,7 @@ export default {
prop: 'info',
column: [{
label: '头像',
+ prop: 'avatar',
type: 'upload',
listType: 'picture-img',
propsHttp: {
@@ -15,15 +17,31 @@ export default {
res: 'data',
url: 'link',
},
- canvasOption: {
- text: ' ',
- ratio: 0.1
- },
+ // canvasOption: {
+ // text: ' ',
+ // ratio: 0.1
+ // },
+ fileType: 'img',//img/video/audio,
+ accept: 'image/png, image/jpeg',
action: '/api/blade-resource/oss/endpoint/put-file',
tip: '只能上传jpg/png用户头像,且不超过500kb',
span: 12,
row: true,
- prop: 'avatar'
+ prop: 'avatar',
+ tip: '只能上传jpg/png用户头像,且不超过500kb',
+ action: '/api/blade-resource/oss/endpoint/put-file',
+ uploadBefore: (file, done, loading) => {
+ if (['image/png', 'image/jpeg'].indexOf(file.type) == -1) {
+ Message({
+ message: '只能上传jpg/png用户头像',
+ type: 'error'
+ });
+ loading();
+ }
+ else {
+ done();
+ }
+ }
}, {
label: '姓名',
span: 12,
diff --git a/src/views/system/dept.vue b/src/views/system/dept.vue
index 900357a..ca6ad6d 100644
--- a/src/views/system/dept.vue
+++ b/src/views/system/dept.vue
@@ -16,8 +16,8 @@
-
-
+
+
{{ row.deptCategoryName }}
@@ -37,6 +37,7 @@ import {
} from "@/api/system/dept";
import { mapGetters } from "vuex";
// import website from '@/config/website';
+import { Message } from 'element-ui';
export default {
data() {
@@ -90,15 +91,28 @@ export default {
type: 'upload',
listType: 'picture-img',
span: 24,
- fileType: 'img',//img/video/audio
+ fileType: 'img',//img/video/audio,
+ accept: 'image/png, image/jpeg',
propsHttp: {
home: this.website.filePrex,
res: 'data',
url: "link",
},
- tip: '只能上传jpg/png用户头像,且不超过500kb',
+ tip: '只能上传jpg/png格式文件,且不超过500kb',
action: '/api/blade-resource/oss/endpoint/put-file',
hide: true,
+ uploadBefore: (file, done, loading) => {
+ if (['image/png', 'image/jpeg'].indexOf(file.type) == -1) {
+ Message({
+ message: '只能上传jpg/png格式文件',
+ type: 'error'
+ });
+ loading();
+ }
+ else {
+ done();
+ }
+ }
},
{
label: "机构全称",
@@ -343,6 +357,4 @@ export default {
};
-
+
diff --git a/src/views/system/userinfo.vue b/src/views/system/userinfo.vue
index 75a6437..cf76346 100644
--- a/src/views/system/userinfo.vue
+++ b/src/views/system/userinfo.vue
@@ -1,7 +1,8 @@
@@ -87,6 +88,4 @@ export default {
};
-
+