| | |
| | | <template>
|
| | | <div class="tools-entry">
|
| | | <div class="entry-wrap">
|
| | | <el-carousel :height="rowSize==3?'600px':'770px'" :autoplay="false" arrow="never">
|
| | | <el-carousel :height="rowSize==3?'600px':'770px'" :autoplay="false" arrow="never" :indicator-position="carousels.length==1?'none':''">
|
| | | <el-carousel-item v-for="(carousel,index) in carousels" :key="index">
|
| | | <div class="app-list clearFix sdk-list">
|
| | | <!-- <draggable v-model="carousel" @start="drag=true" @end="drag=false"> -->
|
| | |
| | | <script>
|
| | | import draggable from "vuedraggable"
|
| | | import { findAllSdk } from '@/api/taskMange';
|
| | | import {chunkArr} from '@/scripts/util';
|
| | | import bus from '@/plugin/bus'
|
| | | export default {
|
| | | name: 'toolsEntry',
|
| | | components: { draggable },
|
| | |
| | | title: '人员跟踪'
|
| | | }
|
| | | ],
|
| | | rowSize: 3,
|
| | | //rowSize: 3,
|
| | | badgeNum: 0,
|
| | | curDock: {}
|
| | | }
|
| | | },
|
| | | computed: {
|
| | |
| | | let arr = null;
|
| | | //根据屏幕高度来判断是展示3排还是4排 阈值:970
|
| | | if (window.innerHeight >= 930) {
|
| | | this.rowSize = 4;
|
| | | //this.rowSize = 4;
|
| | | arr = this.chunk(tempArr, 24);
|
| | | //arr = chunkArr(tempArr,24);
|
| | | } else {
|
| | | this.rowSize = 3;
|
| | | //this.rowSize = 3;
|
| | | arr = this.chunk(tempArr, 18);
|
| | | //arr = chunkArr(tempArr, 18);
|
| | | }
|
| | | console.log(arr)
|
| | | return arr
|
| | | },
|
| | | rowSize (){
|
| | | if (window.innerHeight >= 930) {
|
| | | return 4;
|
| | | }else{
|
| | | return 3;
|
| | | }
|
| | | }
|
| | | },
|
| | | mounted () {
|
| | |
| | | }
|
| | | }
|
| | | });
|
| | |
|
| | | this.$nextTick( () =>{
|
| | | bus.$on("open-app", (val)=> {
|
| | | debugger
|
| | | const cur = this.stateDocks.find( (item)=> {
|
| | | return item.id == val
|
| | | })
|
| | | this.dockClick(cur)
|
| | | this.curDock = cur
|
| | | })
|
| | | })
|
| | | },
|
| | | methods: {
|
| | | chunk (arr, size) {
|
| | |
| | | console.log(e)
|
| | | })
|
| | | },
|
| | | |
| | | dockClick (dock) {
|
| | |
|
| | | if (dock.type === '1') {
|
| | | window.open(dock.url);
|
| | | } else if (dock.type === '2' && !dock.isOpen) {
|
| | |
| | | screenshot: ''
|
| | | });
|
| | | }
|
| | | }
|
| | | },
|
| | | watch:{
|
| | | curDock:function (val) {
|
| | | this.dockClick(val)
|
| | | }
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
|