33个文件已删除
11 文件已重命名
7个文件已修改
| | |
| | | <tools></tools> |
| | | <desktop></desktop> |
| | | <tools-entry ref="dock_model"></tools-entry> |
| | | <!-- <dock ref="dock_model"></dock> --> |
| | | <notice-tip ref="notice_tip_model"></notice-tip> |
| | | <notification-center></notification-center> |
| | | </div> |
| | |
| | | }); |
| | | } |
| | | |
| | | // setTimeout(function () { |
| | | // _that.$refs.dock_model.initDockItem(); |
| | | // }, 100); |
| | | // axios.get(process.env.VUE_APP_USER_DATA_URL).then(function (res) { |
| | | |
| | | // }); |
| | | |
| | | let msgResp = require("./mock/messages.json") |
| | | if (msgResp.success) { |
| | | msgResp.data.forEach(function (item) { |
| | | _that.addMessage(item); |
| | | }) |
| | | } |
| | | // axios.get(process.env.VUE_APP_MESSAGE_URL).then(function (res) { |
| | | |
| | | // }); |
| | | |
| | | let weather = require("./mock/weather.json") |
| | | if (weather.success) { |
| | | _that.addWeather(weather.data.data); |
| | | } |
| | | // axios.get(process.env.VUE_APP_WEATHER_URL).then(function (res) { |
| | | |
| | | // }); |
| | | |
| | | setTimeout(function () { |
| | | _that.addMessage({ |
| | | id: 'N1', |
| | | icon: 'images/frost.png', |
| | | tip: '分布式任务调度', |
| | | title: '默认账号', |
| | | body: '账号:frost 密码:frost', |
| | | time: new Date() |
| | | }, true); |
| | | }, 3000); |
| | | |
| | | setTimeout(function () { |
| | | _that.addMessage({ |
| | | id: 'N2', |
| | | icon: 'images/message.png', |
| | | icon: '/images/desktop/message.png', |
| | | tip: '消息', |
| | | title: '官方QQ', |
| | | body: '1106088328', |
| | | title: 'SmartAi', |
| | | body: 'v1.0.0', |
| | | time: new Date() |
| | | }, true); |
| | | }, 6000); |
| | | |
| | | console.log(this.$store.state.desktop) |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | addMessage: function (message, ding) { |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | background-size: 100% 100%; |
| | | background-image: url("../../../assets/img/desktop/desktop.png"); |
| | | background-image: url("/images/desktop/background.png"); |
| | | background-attachment: fixed; |
| | | } |
| | | |
| | |
| | | </slot> |
| | | </div> |
| | | <div class="d-frame-content"> |
| | | |
| | | <iframe :src="data.url" v-if="data.url"></iframe> |
| | | <div v-html="data.html" v-if="data.html"></div> |
| | | <!-- <span class="d-frame-operation-resize" v-resize></span> --> |
| | | <span class="d-frame-operation-resize" @mousedown="mousedown" @mousemove.prevent="mousemove" @mouseup="mouseup"></span> |
| | | <span |
| | | class="d-frame-operation-resize" |
| | | @mousedown="mousedown" |
| | | @mousemove.prevent="mousemove" |
| | | @mouseup="mouseup" |
| | | ></span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | width: this.data.width || 1024, |
| | | height: this.data.height || 512, |
| | | resizeObj: { |
| | | startW : 0, |
| | | startW: 0, |
| | | startH: 0, |
| | | mouX: 0, |
| | | mouY: 0, |
| | |
| | | }, |
| | | methods: { |
| | | //resize |
| | | mousedown(e){ |
| | | debugger |
| | | this.resizeObj.mouX = e.clientX; |
| | | this.resizeObj.mouY = e.clientY; |
| | | this.resizeObj.startW = this.width; |
| | | this.resizeObj.startH = this.height; |
| | | this.resizeObj.resizeLock = true; |
| | | }, |
| | | mousemove(e){ |
| | | document.onmousemove = function(e){ |
| | | if(!this.resizeObj.resizeLock){ |
| | | return |
| | | } |
| | | e = e||window.event; |
| | | e.preventDefault(); |
| | | this.width = this.resizeObj.startW + e.clientX-this.resizeObj.mouX; |
| | | this.height = this.resizeObj.startH + e.clientY-this.resizeObj.mouY; |
| | | }.bind(this) |
| | | }, |
| | | mouseup(){ |
| | | this.resizeObj.resizeLock = false; |
| | | document.onmousemove = null; |
| | | }, |
| | | mousedown(e) { |
| | | debugger |
| | | this.resizeObj.mouX = e.clientX; |
| | | this.resizeObj.mouY = e.clientY; |
| | | this.resizeObj.startW = this.width; |
| | | this.resizeObj.startH = this.height; |
| | | this.resizeObj.resizeLock = true; |
| | | }, |
| | | mousemove(e) { |
| | | document.onmousemove = function (e) { |
| | | if (!this.resizeObj.resizeLock) { |
| | | return |
| | | } |
| | | e = e || window.event; |
| | | e.preventDefault(); |
| | | this.width = this.resizeObj.startW + e.clientX - this.resizeObj.mouX; |
| | | this.height = this.resizeObj.startH + e.clientY - this.resizeObj.mouY; |
| | | }.bind(this) |
| | | }, |
| | | mouseup() { |
| | | this.resizeObj.resizeLock = false; |
| | | document.onmousemove = null; |
| | | }, |
| | | //resize end |
| | | closeFrame: function () { |
| | | this.$store.dispatch('desktop/closeFrame', this.data); |
| | |
| | | //找到当前的iframe |
| | | let curIframe = Array.from(document.querySelectorAll('iframe')).find(iframe => iframe.src.indexOf(data.url) >= 0); |
| | | //保存当前应用快照 |
| | | html2canvas(curIframe.contentWindow.document.body,{ |
| | | dpi: window.devicePixelRatio*4, |
| | | html2canvas(curIframe.contentWindow.document.body, { |
| | | dpi: window.devicePixelRatio * 4, |
| | | logging: true, //查看html2canvas内部执行流程 |
| | | removeContainer: true, |
| | | imageTimeout : 0, |
| | | useCORS : true //开启跨域配置 |
| | | imageTimeout: 0, |
| | | useCORS: true //开启跨域配置 |
| | | }).then(canvas => { |
| | | let shotSrc = canvas.toDataURL(); |
| | | this.$store.commit('desktop/addMinDock', { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | html,body{ |
| | | html, |
| | | body { |
| | | heiht: 100%; |
| | | } |
| | | .d-frame { |
| | |
| | | |
| | | .d-frame-title-operation i { |
| | | margin: 0 3px; |
| | | font-size:18px; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .d-frame-operation-close { |
| | |
| | | height: 15px; |
| | | z-index: 1000; |
| | | cursor: nwse-resize; |
| | | background: url("/images/resize.png") no-repeat; |
| | | background: url("/images/desktop/resize.png") no-repeat; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | |
| | | <weather-notice></weather-notice> |
| | | |
| | | <copyright></copyright> |
| | | </div> |
| | | <div class="notification-center-body" v-if="notificationCenterType === 1"> |
| | | <message-notice |
| | |
| | | import Calender from './Calendar'; |
| | | import WeatherNotice from './WeatherNotice'; |
| | | import MessageNotice from './MessageNotice'; |
| | | import Copyright from './Copyright'; |
| | | |
| | | export default { |
| | | name: "NotificationCenter", |
| | | components: { |
| | | WeatherNotice, MessageNotice, Copyright |
| | | WeatherNotice, MessageNotice |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | height: calc(100% - 30px); |
| | | width: 300px; |
| | | background-color: rgba(200, 200, 200, 0.7); |
| | | box-shadow: -1px 1px 2px rgba(0,0,0,.3); |
| | | box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.3); |
| | | z-index: 140; |
| | | } |
| | | |
| | |
| | | :class="['tools-icon','tools-show-desktop', {clicked:this.$store.state.desktop.preferenceVisiable}]" |
| | | @click="togglePreference()" |
| | | > |
| | | <img class="system" :src="`${publicPath}images/header-icon/system.png`" /> |
| | | <img class="system" :src="`${publicPath}images/desktop/header-icon/system.png`" /> |
| | | <!-- <span class="fa fa-apple"></span> --> |
| | | </div> |
| | | <div class="tools-icon"> |
| | | <!-- <span class="fa fa-safari"></span> --> |
| | | <img class="smart-ai" :src="`${publicPath}images/header-icon/SmartAI.png`" alt /> |
| | | <img class="smart-ai" :src="`${publicPath}images/desktop/header-icon/SmartAI.png`" alt /> |
| | | </div> |
| | | </div> |
| | | <div class="tools-middle"> |
| | | <div v-for="dock in this.$store.state.desktop.minDocks" :key="dock.id" class="dock-item-wrap"> |
| | | <a @click="dockClick(dock)" > |
| | | <a @click="dockClick(dock)"> |
| | | <img class="dock-item" :src="dock.src" :alt="dock.alt" /> |
| | | <img class="dock-shot" :src="dock.screenshot" :alt="dock.name"> |
| | | <img class="dock-shot" :src="dock.screenshot" :alt="dock.name" /> |
| | | </a> |
| | | </div> |
| | | </div> |
| | | <div class="tools-right"> |
| | | <div class="tools-icon"> |
| | | <!-- <span class="fa fa-battery-full"></span> --> |
| | | <img :src="`${publicPath}images/header-icon/search.png`" alt /> |
| | | <img :src="`${publicPath}images/desktop/header-icon/search.png`" alt /> |
| | | </div> |
| | | <div class="tools-icon"> |
| | | <!-- <span class="fa fa-battery-full"></span> --> |
| | | <img :src="`${publicPath}images/header-icon/help.png`" alt /> |
| | | <img :src="`${publicPath}images/desktop/header-icon/help.png`" alt /> |
| | | </div> |
| | | <div class="tools-icon" @click="notificationCenterClick()"> |
| | | <!-- <span class="fa fa-battery-full"></span> --> |
| | | <img :src="`${publicPath}images/header-icon/notice.png`" alt /> |
| | | <img :src="`${publicPath}images/desktop/header-icon/notice.png`" alt /> |
| | | </div> |
| | | <div class="tools-icon"> |
| | | <!-- <span class="fa fa-battery-full"></span> --> |
| | | <img :src="`${publicPath}images/header-icon/user.png`" alt /> |
| | | <img :src="`${publicPath}images/desktop/header-icon/user.png`" alt /> |
| | | </div> |
| | | <!-- <timer></timer> --> |
| | | <!-- <div class="tools-icon tools-notification-center" @click="notificationCenterClick()"> |
| | |
| | | .tools .tools-middle { |
| | | float: left; |
| | | position: relative; |
| | | |
| | | } |
| | | .tools .tools-middle::before { |
| | | width: 1px; |
| | |
| | | width: auto; |
| | | height: 70%; |
| | | } |
| | | .dock-item-wrap .dock-shot{ |
| | | .dock-item-wrap .dock-shot { |
| | | visibility: hidden; |
| | | width: 100px; |
| | | height: 46px; |
| | |
| | | left: -50%; |
| | | } |
| | | .tools .tools-middle .dock-item-wrap:hover .dock-shot, |
| | | .tools .tools-middle .dock-item-wrap.clicked .dock-shot{ |
| | | .tools .tools-middle .dock-item-wrap.clicked .dock-shot { |
| | | visibility: visible; |
| | | } |
| | | } |
| | | .tools-icon { |
| | | text-align: center; |
| | | height: 100%; |
| | |
| | | <div class="tools-entry">
|
| | | <div class="entry-wrap">
|
| | | <div class="app-list clearFix">
|
| | | <div class="app" v-for="dock in this.$store.state.desktop.docks" :key="dock.id" @click="dockClick(dock)">
|
| | | <div class="wrap">
|
| | | <div class="app-icon">
|
| | | <img :src="dock.src" :alt="dock.alt">
|
| | | </div>
|
| | | <div class="app-name">{{dock.name}}</div>
|
| | | </div> |
| | | <div
|
| | | class="app"
|
| | | v-for="dock in this.$store.state.desktop.docks"
|
| | | :key="dock.id"
|
| | | @click="dockClick(dock)"
|
| | | >
|
| | | <div class="wrap">
|
| | | <div class="app-icon">
|
| | | <img :src="dock.src" :alt="dock.alt" />
|
| | | </div>
|
| | | <div class="app-name">{{dock.name}}</div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
| | |
|
| | | <script>
|
| | | export default {
|
| | | name:'toolsEntry',
|
| | | data(){
|
| | | name: 'toolsEntry',
|
| | | data() {
|
| | | return {
|
| | | publicPath: process.env.BASE_URL,
|
| | | // applist:[
|
| | | // {src: `/images/app-mid/camera-access.png`, name:'摄像机接入'},
|
| | | // {src: `/images/app-mid/datastack-config.png`, name:'数据栈配置'},
|
| | | // {src: `/images/app-mid/DVR-access.png`, name:'硬盘录像机接入'},
|
| | | // {src: `/images/app-mid/data-push.png`, name:'数据推送'},
|
| | | // {src: `/images/app-mid/GB-config.png`, name:'GB28281配置'},
|
| | | // {src: `/images/app-mid/scene-config.png`, name:'场景配置'},
|
| | | // {src: `/images/app-mid/library.png`, name:'比对库管理'},
|
| | | // {src: `/images/app-mid/poll.png`, name:'轮询管理'},
|
| | | // {src: `/images/app-mid/algorithm-manage.png`, name:'算法管理'},
|
| | | // {src: `/images/app-mid/algorithm-store.png`, name:'算法商城'},
|
| | | // {src: `/images/app-mid/hashrate-manage.png`, name:'算力管理'},
|
| | | // {src: `/images/app-mid/monitor.png`, name:'实时监控-在线播放'},
|
| | | // {src: `/images/app-mid/search.png`, name:'检索-统计查询'},
|
| | | // {src: `/images/app-mid/360.png`, name:'全景视频'},
|
| | | // {src: `/images/app-mid/log-manage.png`, name:'日志管理'},
|
| | | // {src: `/images/app-mid/device.png`, name:'设备管理'},
|
| | | // {src: `/images/app-mid/settings.png`, name:'系统设置'},
|
| | | // {src: `/images/app-mid/vindicate.png`, name:'系统维护'}
|
| | | // ]
|
| | | }
|
| | | },
|
| | | methods:{
|
| | | |
| | | methods: {
|
| | |
|
| | | dockClick(dock) {
|
| | | if (dock.type === '1') {
|
| | | window.open(dock.url);
|
| | |
| | | </script>
|
| | |
|
| | | <style lang="scss">
|
| | | .tools-entry{
|
| | | //margin-top: 130px;
|
| | | position: absolute;
|
| | | top: 142px;
|
| | | left: 50%;
|
| | | transform: translateX(-50%);
|
| | | .entry-wrap{
|
| | | width: 1180px;
|
| | | padding: 0 60px;
|
| | | margin: 0 auto;
|
| | | .app-list{
|
| | | .app{
|
| | | width: 16.6%;
|
| | | margin-bottom: 54px;
|
| | | float: left;
|
| | | .wrap{
|
| | | .app-icon{
|
| | | text-align: center;
|
| | | line-height: 110px;
|
| | | width: 110px;
|
| | | height: 110px;
|
| | | margin: auto;
|
| | | img{
|
| | | vertical-align: middle;
|
| | | margin-right: -3px;
|
| | | }
|
| | | }
|
| | | .app-name{
|
| | | padding-top: 10px;
|
| | | text-align: center;
|
| | | font: Bold 16px/16px Microsoft JhengHei;
|
| | | color: #fff;
|
| | | .tools-entry {
|
| | | //margin-top: 130px;
|
| | | position: absolute;
|
| | | top: 142px;
|
| | | left: 50%;
|
| | | transform: translateX(-50%);
|
| | | .entry-wrap {
|
| | | width: 1180px;
|
| | | padding: 0 60px;
|
| | | margin: 0 auto;
|
| | | .app-list {
|
| | | .app {
|
| | | width: 16.6%;
|
| | | margin-bottom: 54px;
|
| | | float: left;
|
| | | .wrap {
|
| | | .app-icon {
|
| | | text-align: center;
|
| | | line-height: 110px;
|
| | | width: 110px;
|
| | | height: 110px;
|
| | | margin: auto;
|
| | | img {
|
| | | vertical-align: middle;
|
| | | margin-right: -3px;
|
| | | }
|
| | | }
|
| | | |
| | | &:hover{
|
| | | .app-icon{
|
| | | background: rgba(0,0,0,.4);
|
| | | }
|
| | | .app-name {
|
| | | padding-top: 10px;
|
| | | text-align: center;
|
| | | font: Bold 16px/16px Microsoft JhengHei;
|
| | | color: #fff;
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | &:hover {
|
| | | .app-icon {
|
| | | background: rgba(0, 0, 0, 0.4);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | </style> |
| | |
| | | <template> |
| | | <notice v-if="this.$store.state.desktop.weather"> |
| | | <template slot="notice-header-icon"> |
| | | <img class="notice-header-icon-img" src="images/weather.png" /> |
| | | <img class="notice-header-icon-img" src="/images/desktop/weather.png" /> |
| | | </template> |
| | | <template slot="notice-header-title">天气</template> |
| | | <template slot="notice-body"> |
| | |
| | | isShow: true, |
| | | url: '', |
| | | title: 'safari', |
| | | icon: 'images/safari.png', |
| | | icon: '/images/desktop/safari.png', |
| | | order: 0, |
| | | leftOffset: 8, |
| | | topOffset: 8 |