File tree Expand file tree Collapse file tree 3 files changed +35
-31
lines changed
web/src/js/view/newhome/module Expand file tree Collapse file tree 3 files changed +35
-31
lines changed Original file line number Diff line number Diff line change 1818 </div >
1919 </div >
2020 </div >
21- <!-- <div class="admin-box-right">
22- <p class="title">{{$t('message.GLY.KSRM')}}</p>
23- <div class="admin-box-video">
24- <div v-for="(item, index) in videos" :key="index" class="video-item" @click="play(item)">
25- <video width="100%" height="100" controls>
26- <source :src="item.url" type="video/mp4" />
27- </video>
28- <h3 class="video-title">{{item.title}}</h3>
29- </div>
30- </div>
31- </div> -->
3221 </div >
33- <Modal
34- v-model =" showVideo"
35- :title =" video.title"
36- :footer-hide =" true"
37- width =" 800"
38- >
39- <video v-if =" showVideo" width =" 100%" controls autoplay >
40- <source :src =" video.url" type =" video/mp4" />
41- </video >
42- </Modal >
4322 </div >
4423</template >
4524<script >
@@ -62,14 +41,12 @@ export default {
6241 {title: ' Scriptis' ,url: ' /home' ,icon: ' fi-scriptis' },
6342 {title: ' Workflow' ,url: ' /project' ,icon: ' fi-workflow1' },
6443 ],
65- showVideo: false ,
6644 video: {},
6745 demos: [],
6846 videos: []
6947 }
7048 },
7149 created () {
72- // this.getVideos();
7350 this .getDemos ();
7451 },
7552 methods: {
@@ -103,10 +80,6 @@ export default {
10380 getsrc (item ) {
10481 return this .src [item .name ];
10582 },
106- play (item ) {
107- this .showVideo = true ;
108- this .video = item
109- }
11083 }
11184};
11285 </script >
Original file line number Diff line number Diff line change 6060 <li v-if =" tag && tagIndex <= 2" class =" item" :key =" tagIndex" >{{tag}}</li >
6161 </template >
6262 </ul >
63- <!-- <Button size="small" class="editor" @click.stop="editor(item)">{{ $t('message.workspace.editWorkspace') }}</Button> -->
6463 </i-col >
6564 </Row >
6665 <div v-show =" visual === 'table'" class =" workspace-table" >
103102 :add-project-show =" workspaceShow"
104103 @show =" workspaceShowAction"
105104 @confirm =" workspaceConfirm" ></WorkspaceForm >
105+ <Modal
106+ v-model =" showVideo"
107+ :title =" video.title"
108+ :footer-hide =" true"
109+ width =" 800"
110+ >
111+ <video v-if =" showVideo" width =" 100%" controls autoplay >
112+ <source :src =" video.url" type =" video/mp4" />
113+ </video >
114+ </Modal >
106115 <Spin
107116 v-if =" loading"
108117 size =" large"
@@ -125,6 +134,7 @@ export default {
125134 data () {
126135 return {
127136 loading: false ,
137+ showVideo: false ,
128138 actionType: ' ' ,
129139 currentWorkspaceData: {
130140 name: ' ' ,
@@ -137,6 +147,7 @@ export default {
137147 cacheData: [],
138148 filteredData: [],
139149 visual: ' card' ,
150+ video: {},
140151 videos: [],
141152 videoCache: [],
142153 visualCates: [
@@ -253,6 +264,10 @@ export default {
253264 } else {
254265 this .videos = this .videoCache .slice (0 , this .pageSize );
255266 }
267+ },
268+ play (item ) {
269+ this .showVideo = true ;
270+ this .video = item
256271 }
257272 }
258273}
Original file line number Diff line number Diff line change 11<template >
22 <div class =" workspace-table" >
3- <Table :columns =" columns" :data =" tableData" style =" margin-bottom : 10px ;" >
3+ <Table :columns =" columns" :data =" tableData" style =" margin-bottom : 10px ;" @on-row-click = " gotoWorkspace " >
44 <template slot-scope="{ row }" slot="name">
55 <span >{{ row.name }}</span >
66 </template >
1010 </template >
1111
1212 <template slot-scope="{ row }" slot="label" >
13- <Tag color =" blue" v-for =" (label, index) in row.label.split(',')" :key =" index" >{{label}}</Tag >
13+ <template v-if =" row .label " >
14+ <Tag color =" blue" v-for =" (label, index) in row.label.split(',')" :key =" index" >{{label}}</Tag >
15+ </template >
1416 </template >
1517
1618 <template slot-scope="{ row }" slot="description">
17- <span >{{ row.description }}</span >
19+ <span class = " desc " >{{ row.description }}</span >
1820 </template >
1921 </Table >
2022 </div >
@@ -65,6 +67,20 @@ export default {
6567 dateFormat (date ) {
6668 return moment (date).format (' YYYY-MM-DD HH:mm:ss' );
6769 },
70+ gotoWorkspace (workspace ) {
71+ this .$router .push ({ path: ' /workspace' , query: { workspaceId: workspace .id }});
72+ },
6873 }
6974}
7075 </script >
76+
77+ <style lang="scss" scoped>
78+ .workspace-table {
79+ .desc {
80+ width : 100% ;
81+ display : block ;
82+ overflow : hidden ;
83+ text-overflow : ellipsis ;
84+ }
85+ }
86+ </style >
You can’t perform that action at this time.
0 commit comments