diff --git a/src/assets/css/bootstrap/bootstrap.less b/src/assets/css/bootstrap/bootstrap.less index 9ca3a63..1d1850a 100644 --- a/src/assets/css/bootstrap/bootstrap.less +++ b/src/assets/css/bootstrap/bootstrap.less @@ -4,7 +4,7 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ // Core variables and mixins -@import "../inspinia/variables.less"; +@import "../global/variables.less"; diff --git a/src/assets/css/global/color.less b/src/assets/css/global/color.less index 3a784ab..6fa3b6b 100644 --- a/src/assets/css/global/color.less +++ b/src/assets/css/global/color.less @@ -1,4 +1,3 @@ -@import "../inspinia/variables.less"; @import "./variables.less"; .bg-primary { diff --git a/src/assets/css/global/variables.less b/src/assets/css/global/variables.less index b0fe940..86b7670 100644 --- a/src/assets/css/global/variables.less +++ b/src/assets/css/global/variables.less @@ -1,4 +1,89 @@ -@import "../inspinia/variables.less"; +@import "../bootstrap/variables.less"; +//Bootstrap Theme. +//@brand-primary: darken(#428bca, 6.5%); // #337ab7 +//@brand-success: #5cb85c; +//@brand-info: #5bc0de; +//@brand-warning: #f0ad4e; +//@brand-danger: #d9534f; +//@brand-gray: #c2c2c2; + +//Angulr Theme. +//@brand-primary: #7266ba; +//@brand-info: #23b7e5; +//@brand-success: #27c24c; +//@brand-warning: #fad733; +//@brand-danger: #f05050; +//@brand-light: #edf1f2; +//@brand-dark: #3a3f51; +//@brand-black: #1c2b36; +//@brand-gray: #c2c2c2; +//@brand-laxative: #B3EE3A; + +//Inspina Theme. +//@brand-primary: #1ab394; +//@brand-success: #1c84c6; +//@brand-info: #23c6c8; +//@brand-warning: #f8ac59; +//@brand-danger: #ED5565; +//@brand-gray: #c2c2c2; +//@brand-laxative: #B3EE3A; + + +//zhengxianqian Theme. +//@brand-primary: #23B7E5; +@brand-primary: #006699; +@brand-success: #1ab394; +@brand-info: #5EC1C5; +@brand-warning: #FEC62E; +@brand-danger: #FE8768; +@brand-gray: #c2c2c2; +@brand-laxative: #B3EE3A; + + +@navy: @brand-primary; // Primary color +@dark-gray: @brand-gray; // Default color +@blue: @brand-success; // Success color +@lazur: @brand-info; // Info color +@yellow: @brand-warning; // Warrning color +@red: @brand-danger; // Danger color +@green: @brand-laxative; // Danger color + +@gray-base: #000; +@gray-darker: lighten(@gray-base, 13.5%); // #222 +@gray-dark: lighten(@gray-base, 20%); // #333 +@gray: lighten(@gray-base, 33.5%); // #555 +@gray-light: lighten(@gray-base, 46.7%); // #777 +@gray-lighter: lighten(@gray-base, 93.5%); // #eee + +// Various colors +@text-color: #676a6c; // Body text +@gray: #f3f3f4; // Background wrapper color +@light-gray: #D1DADE; // Default label, badget +@label-badget-color: #5E5E5E; +@light-blue: #f3f6fb; + +// Spiner color and margin +@spin-color: @navy; +@spin-margin: 0 auto; + +// IBOX colors ( default panel colors) +@border-color: #e7eaec; // IBox border +@ibox-title-bg: #ffffff; // IBox Background header +@ibox-content-bg: #ffffff; // IBox Background content + +//Sidebar width +@sidebar-width: 170px; + +// Boxed layout width +@boxed-width: 1200px; + +//Border radius for buttons +@btn-border-radius: 3px; + +//Navigation +@nav-bg: #2F4050; +@nav-text-color: #a7b1c2; + @top-navigation-height: 45px; diff --git a/src/assets/css/inspinia/style.less b/src/assets/css/inspinia/style.less index 1272ab6..9520119 100644 --- a/src/assets/css/inspinia/style.less +++ b/src/assets/css/inspinia/style.less @@ -5,7 +5,7 @@ * */ // Variables, Mixins -@import "variables.less"; +@import "../global/variables.less"; @import "mixins.less"; // INSPINIA Theme Elements @import "typography.less"; diff --git a/src/assets/css/inspinia/variables.less b/src/assets/css/inspinia/variables.less deleted file mode 100644 index 6253091..0000000 --- a/src/assets/css/inspinia/variables.less +++ /dev/null @@ -1,76 +0,0 @@ -@import "../bootstrap/variables.less"; -//Bootstrap Theme. -//@brand-primary: darken(#428bca, 6.5%); // #337ab7 -//@brand-success: #5cb85c; -//@brand-info: #5bc0de; -//@brand-warning: #f0ad4e; -//@brand-danger: #d9534f; -//@brand-gray: #c2c2c2; - -//Angulr Theme. -//@brand-primary: #7266ba; -//@brand-info: #23b7e5; -//@brand-success: #27c24c; -//@brand-warning: #fad733; -//@brand-danger: #f05050; -//@brand-light: #edf1f2; -//@brand-dark: #3a3f51; -//@brand-black: #1c2b36; -//@brand-gray: #c2c2c2; -//@brand-laxative: #B3EE3A; - -//Inspina Theme. -//@brand-primary: #1ab394; -//@brand-success: #1c84c6; -//@brand-info: #23c6c8; -//@brand-warning: #f8ac59; -//@brand-danger: #ED5565; -//@brand-gray: #c2c2c2; -//@brand-laxative: #B3EE3A; - - - - -@navy: @brand-primary; // Primary color -@dark-gray: @brand-gray; // Default color -@blue: @brand-success; // Success color -@lazur: @brand-info; // Info color -@yellow: @brand-warning; // Warrning color -@red: @brand-danger; // Danger color -@green: @brand-laxative; // Danger color - -@gray-base: #000; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: lighten(@gray-base, 93.5%); // #eee - -// Various colors -@text-color: #676a6c; // Body text -@gray: #f3f3f4; // Background wrapper color -@light-gray: #D1DADE; // Default label, badget -@label-badget-color: #5E5E5E; -@light-blue: #f3f6fb; - -// Spiner color and margin -@spin-color: @navy; -@spin-margin: 0 auto; - -// IBOX colors ( default panel colors) -@border-color: #e7eaec; // IBox border -@ibox-title-bg: #ffffff; // IBox Background header -@ibox-content-bg: #ffffff; // IBox Background content - -//Sidebar width -@sidebar-width: 170px; - -// Boxed layout width -@boxed-width: 1200px; - -//Border radius for buttons -@btn-border-radius: 3px; - -//Navigation -@nav-bg: #2F4050; -@nav-text-color: #a7b1c2; diff --git a/src/backyard/image/cache/List.vue b/src/backyard/image/cache/List.vue index b2c9def..281e6db 100644 --- a/src/backyard/image/cache/List.vue +++ b/src/backyard/image/cache/List.vue @@ -57,7 +57,7 @@ data() { return { - pager: new Pager(ImageCache), + pager: new Pager(ImageCache, Pager.MAX_PAGE_SIZE), user: this.$store.state.user, selectedImageCaches: [] } diff --git a/src/backyard/matter/widget/MatterPanel.vue b/src/backyard/matter/widget/MatterPanel.vue index 3df3664..10b0bcd 100644 --- a/src/backyard/matter/widget/MatterPanel.vue +++ b/src/backyard/matter/widget/MatterPanel.vue @@ -198,12 +198,28 @@ this.$previewer.previewText(that.matter.name, that.matter.getPreviewUrl(), that.matter.size) + } else if (that.matter.isAudio()) { + + this.$previewer.previewAudio(that.matter.name, that.matter.getPreviewUrl(), that.matter.size) + + } else if (that.matter.isVideo()) { + + this.$previewer.previewVideo(that.matter.name, that.matter.getPreviewUrl(), that.matter.size) + } else { - this.download() + this.preview() } } }, + preview() { + if (this.director.isEditing()) { + console.error('导演正忙着,不予执行') + return + } + + window.open(this.matter.getPreviewUrl()) + }, download() { if (this.director.isEditing()) { console.error('导演正忙着,不予执行') diff --git a/src/backyard/user/Detail.vue b/src/backyard/user/Detail.vue index 8c5db99..b5965b9 100644 --- a/src/backyard/user/Detail.vue +++ b/src/backyard/user/Detail.vue @@ -29,7 +29,7 @@
- 角色:{{currentUser.getRoleName()}} + 角色:{{UserRoleMap[currentUser.role].name}}
@@ -47,7 +47,7 @@
- 性别:{{currentUser.getGenderName()}} + 性别:{{UserGenderMap[currentUser.gender].name}}
@@ -71,7 +71,7 @@
- 状态:{{currentUser.getStatusName()}} + 状态:{{UserStatusMap[currentUser.status].name}}
diff --git a/src/common/model/base/Pager.js b/src/common/model/base/Pager.js index 5876e6e..7b8fd3f 100644 --- a/src/common/model/base/Pager.js +++ b/src/common/model/base/Pager.js @@ -7,7 +7,7 @@ import {FilterType} from "./FilterType"; export default class Pager extends Base { - static MAX_PAGE_SIZE = 500 + static MAX_PAGE_SIZE = 100 constructor(Clazz, pageSize = 10, page = 0) { super() diff --git a/src/common/model/image/cache/ImageCache.js b/src/common/model/image/cache/ImageCache.js index cd5b457..31a8ba0 100644 --- a/src/common/model/image/cache/ImageCache.js +++ b/src/common/model/image/cache/ImageCache.js @@ -14,7 +14,7 @@ export default class ImageCache extends BaseEntity { this.userUuid = null; this.matterUuid = null; - this.uri = null; + this.mode = null; this.md5 = null; this.size = 0; this.path = 0; @@ -49,17 +49,12 @@ export default class ImageCache extends BaseEntity { } getMatterName() { - let quotePosition = this.uri.indexOf("?") - let path = this.uri.substr(0, quotePosition) - return path.substr(path.lastIndexOf("/") + 1) + + return this.path.substr(this.path.lastIndexOf("/") + 1) } getName() { - let quotePosition = this.uri.indexOf("?") - let query = this.uri.substr(quotePosition + 1) - let path = this.uri.substr(0, quotePosition) - let imageName = path.substr(path.lastIndexOf("/") + 1) - return imageName + "?" + query + return this.getMatterName() + "?" + this.mode } getResizeUrl(){ diff --git a/src/common/model/matter/Matter.js b/src/common/model/matter/Matter.js index 1084937..14eeac4 100644 --- a/src/common/model/matter/Matter.js +++ b/src/common/model/matter/Matter.js @@ -106,6 +106,16 @@ export default class Matter extends BaseEntity { return startWith(mimeType, 'application/vnd.ms-excel') || startWith(mimeType, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); } + isAudio() { + let mimeType = getMimeType(this.name) + return startWith(mimeType, 'audio'); + } + + isVideo() { + let mimeType = getMimeType(this.name) + return startWith(mimeType, 'video'); + } + getIcon() { if (this.dir) { @@ -121,9 +131,9 @@ export default class Matter extends BaseEntity { return "/static/img/file/ppt.svg" } else if (this.isXls()) { return "/static/img/file/xls.svg" - } else if (startWith(mimeType, 'audio')) { + } else if (this.isAudio()) { return "/static/img/file/audio.svg" - } else if (startWith(mimeType, 'video')) { + } else if (this.isVideo()) { return "/static/img/file/video.svg" } else if (this.isText()) { return "/static/img/file/text.svg" diff --git a/src/common/plugin/previewer/Previewer.js b/src/common/plugin/previewer/Previewer.js index 5d6b379..f8a30bb 100644 --- a/src/common/plugin/previewer/Previewer.js +++ b/src/common/plugin/previewer/Previewer.js @@ -38,4 +38,12 @@ export default class Previewer { this.$vm.previewOffice(name, url, size); } + previewAudio(name, url, size) { + this.$vm.previewAudio(name, url, size); + } + + previewVideo(name, url, size) { + this.$vm.previewVideo(name, url, size); + } + } diff --git a/src/common/plugin/previewer/PreviewerLayout.vue b/src/common/plugin/previewer/PreviewerLayout.vue index d4cf9b6..3d24ce4 100644 --- a/src/common/plugin/previewer/PreviewerLayout.vue +++ b/src/common/plugin/previewer/PreviewerLayout.vue @@ -6,14 +6,17 @@ import PdfPanel from "./panels/PdfPanel" import TextPanel from "./panels/TextPanel" import OfficePanel from "./panels/OfficePanel" + import AudioPanel from "./panels/AudioPanel" + import VideoPanel from "./panels/VideoPanel" import {humanFileSize} from "../../filter/str"; let CLASS_NAME = " previewer-mode" - //这个组件主要用于提供dom元素。 export default { data() { - return {} + return { + + } }, computed: {}, props: {}, @@ -31,11 +34,20 @@ document.body.className = bodyClassName.substr(0, position) + bodyClassName.substr(position + bodyClassName.length) } }, + preview(name, url, size, vNode) { let that = this; that.bodyAddClass() + //需要给vue一点点时间去挂载这个vNode + setTimeout(function () { + if (vNode.componentInstance && vNode.componentInstance.show) { + vNode.componentInstance.show() + } + }, 100) + + that.$msgbox({ title: name + "(" + humanFileSize(size) + ")", message: vNode, @@ -46,12 +58,16 @@ beforeClose: (action, instance, done) => { that.bodyRemoveClass() + + //如果有定义close函数,那么去调用。主要是音频和视频需要停止 + if (vNode.componentInstance && vNode.componentInstance.close) { + vNode.componentInstance.close() + } + done(); } }).then(action => { - console.log("then method ") }).catch((e) => { - console.log("catch method ") //关闭了对话框 that.bodyRemoveClass() }); @@ -59,10 +75,7 @@ previewPdf(name, url, size) { let that = this - - const h = this.$createElement; - - let vNode = h(PdfPanel, { + let vNode = this.$createElement(PdfPanel, { props: { name: name, url: url @@ -74,10 +87,7 @@ previewText(name, url, size) { let that = this - - const h = this.$createElement; - - let vNode = h(TextPanel, { + let vNode = this.$createElement(TextPanel, { props: { name: name, url: url @@ -89,12 +99,33 @@ previewOffice(name, url, size) { let that = this + let vNode = this.$createElement(OfficePanel, { + props: { + name: name, + url: url + } + }); - const h = this.$createElement; + this.preview(name, url, size, vNode) + }, + previewAudio(name, url, size) { - console.log("这里"); + let that = this - let vNode = h(OfficePanel, { + let vNode = this.$createElement(AudioPanel, { + props: { + name: name, + url: url + } + }); + + this.preview(name, url, size, vNode) + }, + previewVideo(name, url, size) { + + let that = this + + let vNode = this.$createElement(VideoPanel, { props: { name: name, url: url diff --git a/src/common/plugin/previewer/panels/AudioPanel.vue b/src/common/plugin/previewer/panels/AudioPanel.vue new file mode 100644 index 0000000..78acb38 --- /dev/null +++ b/src/common/plugin/previewer/panels/AudioPanel.vue @@ -0,0 +1,57 @@ + + + + + + + diff --git a/src/common/plugin/previewer/panels/TextPanel.vue b/src/common/plugin/previewer/panels/TextPanel.vue index e47239f..9d9abde 100644 --- a/src/common/plugin/previewer/panels/TextPanel.vue +++ b/src/common/plugin/previewer/panels/TextPanel.vue @@ -23,9 +23,10 @@ } }, watch: {}, - methods: {}, - mounted() { + methods: { + }, + mounted() { } } diff --git a/src/common/plugin/previewer/panels/VideoPanel.vue b/src/common/plugin/previewer/panels/VideoPanel.vue new file mode 100644 index 0000000..042c456 --- /dev/null +++ b/src/common/plugin/previewer/panels/VideoPanel.vue @@ -0,0 +1,57 @@ + + + + + + + diff --git a/src/common/widget/NbSwitcher.vue b/src/common/widget/NbSwitcher.vue index 09e7640..a849768 100644 --- a/src/common/widget/NbSwitcher.vue +++ b/src/common/widget/NbSwitcher.vue @@ -79,7 +79,7 @@ \ No newline at end of file + \ No newline at end of file diff --git a/static/img/file/doc.png b/static/img/file/doc.png deleted file mode 100644 index b16b6e3..0000000 Binary files a/static/img/file/doc.png and /dev/null differ diff --git a/static/img/file/file.png b/static/img/file/file.png deleted file mode 100644 index 65a5e29..0000000 Binary files a/static/img/file/file.png and /dev/null differ diff --git a/static/img/file/folder.png b/static/img/file/folder.png deleted file mode 100644 index 4d63877..0000000 Binary files a/static/img/file/folder.png and /dev/null differ diff --git a/static/img/file/image.png b/static/img/file/image.png deleted file mode 100644 index a504f5e..0000000 Binary files a/static/img/file/image.png and /dev/null differ diff --git a/static/img/file/pdf.png b/static/img/file/pdf.png deleted file mode 100644 index afbdd84..0000000 Binary files a/static/img/file/pdf.png and /dev/null differ diff --git a/static/img/file/ppt.png b/static/img/file/ppt.png deleted file mode 100644 index e3b312c..0000000 Binary files a/static/img/file/ppt.png and /dev/null differ diff --git a/static/img/file/text.png b/static/img/file/text.png deleted file mode 100644 index 834d027..0000000 Binary files a/static/img/file/text.png and /dev/null differ diff --git a/static/img/file/video.png b/static/img/file/video.png deleted file mode 100644 index 3606ca2..0000000 Binary files a/static/img/file/video.png and /dev/null differ diff --git a/static/img/file/xls.png b/static/img/file/xls.png deleted file mode 100644 index 17de757..0000000 Binary files a/static/img/file/xls.png and /dev/null differ