|
|
|
@ -24,7 +24,8 @@ |
|
|
|
<img src="../assets/img/twCircle.png" |
|
|
|
style="width: 0.9vw;height:0.9vw;object-fit: contain;float: right;margin-top: 7%;"> |
|
|
|
<div style="width: 55%;text-align: center;"> |
|
|
|
{{ item.name }}</div> |
|
|
|
{{ item.name }} |
|
|
|
</div> |
|
|
|
<img src="../assets/img/jiantouchoose.png" |
|
|
|
style="width: 0.9vw;height:0.9vw;object-fit: contain;float: right;margin-top: 7%;"> |
|
|
|
<img src="../assets/img/muluchoose.png" |
|
|
|
@ -45,7 +46,7 @@ |
|
|
|
type="text" |
|
|
|
placeholder="请输入" |
|
|
|
v-model="selectName" |
|
|
|
@keyup.enter = "getContentList()" |
|
|
|
@keyup.enter="getContentList()" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div style="width: 7%;height: 70%;float: right;margin-right: 15%;" @click="getContentList()"> |
|
|
|
@ -61,7 +62,7 @@ |
|
|
|
<img v-if="spType1==item" src="../assets/img/typeHeadChoose.png" style="width: 7vw;object-fit: contain;"> |
|
|
|
<img v-else src="../assets/img/typeHead.png" style="width: 7vw;object-fit: contain;"> |
|
|
|
|
|
|
|
<div style="position: absolute;z-index: 12121;width: 100%;text-align: center;color: white;top: 15%;" > |
|
|
|
<div style="position: absolute;z-index: 12121;width: 100%;text-align: center;color: white;top: 15%;"> |
|
|
|
{{ item }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -122,7 +123,7 @@ |
|
|
|
<div |
|
|
|
style="width: 9%;text-decoration: underline;font-style: italic;display: flex;justify-content: space-around;margin-left: 1%;"> |
|
|
|
<div @click="editTw(item.id)">修改</div> |
|
|
|
<!-- <div @click="deleteTw(item.id)">删除</div>--> |
|
|
|
<!-- <div @click="deleteTw(item.id)">删除</div>--> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -176,8 +177,9 @@ |
|
|
|
:on-remove="handleVideoRemove" |
|
|
|
> |
|
|
|
<div v-if="!videoFlag && showVideoPath" style="display: flex; flex-wrap: wrap; gap: 10px;"> |
|
|
|
<div style="position: relative; flex: 1 1 calc(33.333% - 20px); min-width: 200px; margin-bottom: 10px;"> |
|
|
|
<video :src="showVideoPath" style="width:90%; height: auto;border-radius: 0.5vw;" class="avatar video-avatar" controls> |
|
|
|
<div style="position: relative; flex: 1 1 calc(33.333% - 20px); min-width: 200px; margin-bottom: 10px;"> |
|
|
|
<video :src="showVideoPath" style="width:90%; height: auto;border-radius: 0.5vw;" |
|
|
|
class="avatar video-avatar" controls> |
|
|
|
您的浏览器不支持视频播放 |
|
|
|
</video> |
|
|
|
<img |
|
|
|
@ -190,7 +192,8 @@ |
|
|
|
</div> |
|
|
|
<el-progress :stroke-width="10" class="progressType" v-if="videoFlag" |
|
|
|
type="circle" :percentage="videoUploadPercent" style="margin-top:30px;"></el-progress> |
|
|
|
<el-button style="z-index: 999;" class="video-btn" slot="trigger" size="small" type="primary">点击上传视频</el-button> |
|
|
|
<el-button style="z-index: 999;" class="video-btn" slot="trigger" size="small" type="primary">点击上传视频 |
|
|
|
</el-button> |
|
|
|
</el-upload> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
@ -236,10 +239,10 @@ export default { |
|
|
|
{id: 4, name: "帮助文档", info: "Help"} |
|
|
|
], |
|
|
|
page: "视频资源", |
|
|
|
typeList: ["全部","起降", "飞行", "通信载荷使用", "探测载荷使用", "攻击载荷使用"], |
|
|
|
typeList: ["全部", "起降", "飞行", "通信载荷使用", "探测载荷使用", "攻击载荷使用"], |
|
|
|
contentList: [], |
|
|
|
selectName: "", |
|
|
|
spType1:"全部", |
|
|
|
spType1: "全部", |
|
|
|
spType: "", |
|
|
|
pageSize: 6, |
|
|
|
pageNum: 1, |
|
|
|
@ -253,12 +256,12 @@ export default { |
|
|
|
form: { |
|
|
|
name: "", |
|
|
|
contentInfo: "", |
|
|
|
spType:"", |
|
|
|
spType: "", |
|
|
|
}, |
|
|
|
TxtValue: "", |
|
|
|
id: 0, |
|
|
|
fileList: [], // 已上传文件列表 |
|
|
|
isUpload:0, |
|
|
|
isUpload: 0, |
|
|
|
|
|
|
|
|
|
|
|
//上传的视频 |
|
|
|
@ -266,13 +269,13 @@ export default { |
|
|
|
// 设置上传的请求头部 |
|
|
|
headers: {Authorization: "Bearer " + getToken()}, |
|
|
|
// 上传的地址 |
|
|
|
url: "http://127.0.0.1:10031/fileUpdate/upload", |
|
|
|
url: "http://127.0.0.1:10031/fileUpdate/upload", |
|
|
|
url2: "http://127.0.0.1:10031", |
|
|
|
}, |
|
|
|
videoFlag: false, //是否显示进度条 |
|
|
|
videoUploadPercent: "", //进度条的进度, |
|
|
|
isShowUploadVideo: false, //显示上传按钮 |
|
|
|
videoFileList:[], |
|
|
|
videoFileList: [], |
|
|
|
showVideoPath: "", |
|
|
|
uploadUrl: "",//你要上传视频到你后台的地址 |
|
|
|
} |
|
|
|
@ -285,9 +288,9 @@ export default { |
|
|
|
}, |
|
|
|
changeType(item) { |
|
|
|
this.spType1 = item; |
|
|
|
if(this.spType1=="全部"){ |
|
|
|
if (this.spType1 == "全部") { |
|
|
|
this.spType = ""; |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.spType = this.spType1 |
|
|
|
} |
|
|
|
this.getContentList(); |
|
|
|
@ -306,55 +309,64 @@ export default { |
|
|
|
pageSize: this.pageSize |
|
|
|
} |
|
|
|
getSpList(data).then((res) => { |
|
|
|
console.log(res); |
|
|
|
this.contentList = res.data.list; |
|
|
|
this.total = res.data.total; |
|
|
|
this.totalPage = res.data.totalPages; |
|
|
|
|
|
|
|
var aaa = 0; |
|
|
|
this.onePagesList = []; |
|
|
|
this.pagesList = []; |
|
|
|
if(this.totalPage>3){ |
|
|
|
if (this.pageNum < this.totalPage - 3) { |
|
|
|
|
|
|
|
for (let i = this.pageNum; i <= this.totalPage; i++) { |
|
|
|
this.pagesList.push(i); |
|
|
|
this.onePagesList.push(i); |
|
|
|
aaa = aaa + 1; |
|
|
|
console.log(aaa); |
|
|
|
if (aaa == 4) { |
|
|
|
break; |
|
|
|
if (res.code != 500) { |
|
|
|
if(res.data.list!=undefined){ |
|
|
|
this.contentList = res.data.list; |
|
|
|
this.total = res.data.total; |
|
|
|
this.totalPage = res.data.totalPages; |
|
|
|
|
|
|
|
var aaa = 0; |
|
|
|
this.onePagesList = []; |
|
|
|
this.pagesList = []; |
|
|
|
if (this.totalPage > 3) { |
|
|
|
if (this.pageNum < this.totalPage - 3) { |
|
|
|
|
|
|
|
for (let i = this.pageNum; i <= this.totalPage; i++) { |
|
|
|
this.pagesList.push(i); |
|
|
|
this.onePagesList.push(i); |
|
|
|
aaa = aaa + 1; |
|
|
|
console.log(aaa); |
|
|
|
if (aaa == 4) { |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
for (let i = 1; i <= this.totalPage; i++) { |
|
|
|
|
|
|
|
this.pagesList.push(i); |
|
|
|
this.onePagesList.push(i); |
|
|
|
aaa = aaa + 1; |
|
|
|
console.log(aaa); |
|
|
|
if (aaa == 3) { |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.onePagesList) |
|
|
|
} |
|
|
|
|
|
|
|
}else { |
|
|
|
for (let i = 1; i <= this.totalPage; i++) { |
|
|
|
|
|
|
|
this.pagesList.push(i); |
|
|
|
this.onePagesList.push(i); |
|
|
|
aaa = aaa + 1; |
|
|
|
console.log(aaa); |
|
|
|
if (aaa == 3) { |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if(res.msg=="token无效") |
|
|
|
localStorage.clear(); |
|
|
|
this.$router.push('/') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.onePagesList) |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
goXq(id) { |
|
|
|
|
|
|
|
this.$router.push({path: '/SpInfoXq', query: {id: id,type: "sp"}}) |
|
|
|
this.$router.push({path: '/SpInfoXq', query: {id: id, type: "sp"}}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//管理员操作 |
|
|
|
//管理员操作 |
|
|
|
deleteTw(id){ |
|
|
|
deleteTw(id) { |
|
|
|
twdelete(id); |
|
|
|
this.getContentList(); |
|
|
|
console.log("这是删除操作") |
|
|
|
@ -374,7 +386,7 @@ export default { |
|
|
|
this.videoFileList = []; |
|
|
|
this.showVideoPath = ""; |
|
|
|
if (res.data.data.spUrl != null) { |
|
|
|
this.videoFileList.push({ url: res.data.data.spUrl,name: res.data.data.name }); |
|
|
|
this.videoFileList.push({url: res.data.data.spUrl, name: res.data.data.name}); |
|
|
|
this.showVideoPath = res.data.data.spUrl; |
|
|
|
} |
|
|
|
|
|
|
|
@ -430,7 +442,7 @@ export default { |
|
|
|
this.$message.warning('该视频已存在于列表中'); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.videoFileList.push({ url: videoUrl, name: file.name }); |
|
|
|
this.videoFileList.push({url: videoUrl, name: file.name}); |
|
|
|
this.showVideoPath = this.videoFileList.map(f => f.url).join(','); |
|
|
|
this.updateCourseUrl(); |
|
|
|
this.$message.success('视频上传成功'); |
|
|
|
@ -462,16 +474,16 @@ export default { |
|
|
|
}, |
|
|
|
submitInfo() { |
|
|
|
console.log(this.videoFileList); |
|
|
|
if(this.form.spType=="全部"){ |
|
|
|
if (this.form.spType == "全部") { |
|
|
|
this.form.spType = ""; |
|
|
|
} |
|
|
|
var urlStr = this.videoFileList[0]; |
|
|
|
var data = { |
|
|
|
name: this.form.name, |
|
|
|
spUrl:urlStr.url, |
|
|
|
type:2, |
|
|
|
spUrl: urlStr.url, |
|
|
|
type: 2, |
|
|
|
id: this.id, |
|
|
|
spType:this.form.spType |
|
|
|
spType: this.form.spType |
|
|
|
} |
|
|
|
editInfo(data).then((res) => { |
|
|
|
console.log(res); |
|
|
|
@ -618,6 +630,7 @@ export default { |
|
|
|
color: #ffffff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.password-input-container { |
|
|
|
width: 70%; |
|
|
|
height: 80%; |
|
|
|
@ -626,6 +639,7 @@ export default { |
|
|
|
top: 8%; |
|
|
|
left: 10%; |
|
|
|
} |
|
|
|
|
|
|
|
input { |
|
|
|
width: 90%; |
|
|
|
height: 100%; |
|
|
|
@ -633,17 +647,19 @@ input { |
|
|
|
outline: none; |
|
|
|
color: white; /* 文字颜色 */ |
|
|
|
background-color: transparent; |
|
|
|
padding-left:3%; |
|
|
|
padding-left: 3%; |
|
|
|
position: absolute; |
|
|
|
z-index: 2000; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
input::placeholder { |
|
|
|
color: white; |
|
|
|
opacity: 1; /* Firefox 默认将 placeholder 的透明度设置为 0.54 */ |
|
|
|
|
|
|
|
} |
|
|
|
.m-video{ |
|
|
|
|
|
|
|
.m-video { |
|
|
|
width: 12vw !important; |
|
|
|
background: none !important; |
|
|
|
} |
|
|
|
|