Browse Source

[合并]合并代码

master
陈鹏飞 5 years ago
parent
commit
0dd60a9b9e
  1. 2
      src/app/navigation/navigation.component.html
  2. 2
      src/app/navigation/navigation.component.scss
  3. 2
      src/app/tabbar/tabbar.component.html
  4. 16
      src/app/ui/all-file/all-file.component.html
  5. 131
      src/app/ui/all-file/all-file.component.ts
  6. 2
      src/app/ui/all-file/folderdalog.html
  7. 2
      src/app/ui/all-file/viewdetails.html
  8. BIN
      src/assets/images/bg_login.jpg
  9. BIN
      src/assets/images/cad.png
  10. BIN
      src/assets/images/file.gif
  11. BIN
      src/assets/images/gaopenche.gif
  12. BIN
      src/assets/images/logo.jpg
  13. BIN
      src/assets/images/logo.png
  14. BIN
      src/assets/images/music.gif
  15. BIN
      src/assets/images/shebei.jpg
  16. BIN
      src/assets/images/sheshi.jpg
  17. BIN
      src/assets/images/shipinlogo.gif

2
src/app/navigation/navigation.component.html

@ -2,7 +2,7 @@
<mat-sidenav-container class="example-container" autosize [class.myapp-dark-theme]="darktheme">
<mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;">
<div class="biglogobox">
<img src="../../assets/images/logo.png" alt="">
<img src="../../assets/images/logo.jpg" alt="">
</div>
<div class="navbox">
<div class="openSystem">

2
src/app/navigation/navigation.component.scss

@ -178,7 +178,7 @@ mat-sidenav{
// margin-bottom: 100px;
img{
// margin-right: 11px;
width: 194px;
width: 100px;
height: 100px;
}
}

2
src/app/tabbar/tabbar.component.html

@ -8,7 +8,7 @@
<mat-icon>account_circle</mat-icon>
</button>
<span style="position: absolute;right:100px;color: white;font-size: 16px;" *ngIf="isLogin.isLogin">已登录</span>
<span style="position: absolute;right:100px;color: white;font-size: 16px;" *ngIf="isLogin.isLogin">欢迎您,管理员</span>
<!-- 已登录状态 -->
<button mat-icon-button [matMenuTriggerFor]="appMenu" class="login" *ngIf="isLogin.isLogin">
<mat-icon>account_circle</mat-icon>

16
src/app/ui/all-file/all-file.component.html

@ -92,16 +92,24 @@
<th style="width: 63%;" mat-header-cell *matHeaderCellDef> 文件名 </th>
<td mat-cell *matCellDef="let element">
<img *ngIf="element.type == 'pdf'" src="../../../assets/images/pdf.png" alt="">
<img *ngIf="element.type == 'jpeg' || element.type == 'jpg' || element.type == 'png'" src="../../../assets/images/img.png" alt="">
<img *ngIf="element.type == 'jpeg' || element.type == 'jpg' || element.type == 'png' || element.type == 'gif' || element.type == 'svg'|| element.type == 'webp' || element.type == 'bmp'" src="../../../assets/images/img.png" alt="">
<img *ngIf="element.type == 'doc' || element.type == 'docx'" src="../../../assets/images/word.png" alt="">
<img *ngIf="element.type == 'xlsx'" src="../../../assets/images/excel.png" alt="">
<img *ngIf="element.type == 'zip'" src="../../../assets/images/zip.png" alt="">
<img *ngIf="element.type == 'MP4' || element.type == 'mp4'" src="../../../assets/images/MP4.png" alt="">
<img *ngIf="element.type == 'bmp'" src="../../../assets/images/bmp.png" alt="">
<!-- <img *ngIf="element.type == 'bmp'" src="../../../assets/images/bmp.png" alt=""> -->
<img *ngIf="element.type == 'txt'" src="../../../assets/images/txt.png" alt="">
<img *ngIf="element.type == 'pptx'" src="../../../assets/images/ppt.png" alt="">
<img *ngIf="element.isDir" src="../../../assets/images/file.png" alt="">
<i class="iconfont icon-mp"></i>
<img *ngIf="element.type == 'cad' || element.type == 'CAD'" src="../../../assets/images/cad.png" alt="">
<img *ngIf="element.type == 'avi' || element.type == 'swf'|| element.type == 'mov'" src="../../../assets/images/shipinlogo.gif" alt="">
<img *ngIf="element.type == 'mp3' || element.type == 'aif' || element.type == 'wav' || element.type == 'flac'" src="../../../assets/images/music.gif" alt="">
<img *ngIf="element.isDir" src="../../../assets/images/file.gif" alt="">
<img *ngIf="element.type == 'gaopenche' || element.type == 'denggao'" src="../../../assets/images/gaopenche.gif" alt="">
<img *ngIf="element.type == 'miehuo' || element.type == 'kongqi'" src="../../../assets/images/shebei.jpg" alt="">
<img *ngIf="element.type == 'waifu' || element.type == 'neifu' || element.type == 'gong' || element.type == 'qiu'" src="../../../assets/images/sheshi.jpg" alt="">
<span *ngIf="element.isDir == false" class="filename" (click)="clickName($event,element)">
{{element.key | name}}
</span>

131
src/app/ui/all-file/all-file.component.ts

@ -36,9 +36,12 @@ export class AllFileComponent {
//表头排序
sortData (e) {
let data = this.oldDataSource.concat();
// console.log(123,data)
data.forEach(element => {
let typeArr = element.key.split('.')
element.type = typeArr[typeArr.length - 1]
if(element.key.indexOf(".") != -1){
let typeArr = element.key.split('.')
element.type = typeArr[typeArr.length - 1]
}
element.newTime = new Date(element.lastModified).getTime()
});
if( e.direction=='asc' ) { //从小到大排序
@ -73,6 +76,7 @@ export class AllFileComponent {
//获得当前资料库的文件列表
getALLFileList(name){
this.selectedDataBank = name
let paramsdata = {
prefix : this.selectedDataBank + "/",
@ -83,11 +87,78 @@ export class AllFileComponent {
}).subscribe((data:any) => {
// console.log(data)
this.oldDataSource = data.contents //保存表格数据
this.selection.clear()
data.contents.forEach((item)=>{
let typeArr = item.key.split('.')
item.type = typeArr[typeArr.length - 1]
})
if(this.selectedDataBank == "装备车辆"){
data.contents.unshift(
{ key: "装备车辆/高喷车",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "gaopenche"
},
{ key: "装备车辆/登高平台车",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "denggao"
},
{ key: "装备车辆/灭火侦查机器人",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "miehuo"
},
{ key: "装备车辆/空气呼吸器",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "kongqi"
}
)
}
if(this.selectedDataBank == "设备设施"){
data.contents.unshift(
{ key: "设备设施/外浮顶罐",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "waifu"
},
{ key: "设备设施/内浮顶罐",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "neifu"
},
{ key: "设备设施/拱顶罐",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "gong"
},
{ key: "设备设施/球罐",
lastModified: null,
eTag: null,
size: 0,
isDir: false,
type: "qiu"
}
)
}
this.oldDataSource = data.contents //保存表格数据
this.dataSource = new MatTableDataSource(data.contents);
this.fileNum = data.contents.length
@ -152,8 +223,10 @@ export class AllFileComponent {
//点击列表每一条的名字
clickName(e,item){
// console.log(item)
e.stopPropagation()
if(item.type == "jpg" || item.type == "png" && !item.isDir){
if(item.type == "jpg" || item.type == "png" || item.type == "bmp"&& !item.isDir){
const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去
width: '1600px',
height:'900px',
@ -169,23 +242,45 @@ export class AllFileComponent {
});
dialogRef.afterClosed().subscribe(
);
}else if(item.type == "mp3" || item.type == "MP3"&& !item.isDir){
const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去
width: '380px',
height:'108px',
data: {url:item.key,type:"mp3"}
});
dialogRef.afterClosed().subscribe(
);
}else if(item.type == "pdf"){
// const config = new MatSnackBarConfig();
// config.verticalPosition = 'top';
// config.duration = 3000
// this.snackBar.open('该文件类型暂不支持在线查看,请下载查看','确定',config)
// "/api/Objects/drives/" + this.data.url
window.open("/api/Objects/drives/" + item.key)
// const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去
// width: '1600px',
// height:'900px',
// data: {url:item.key,type:"pdf"}
// });
// dialogRef.afterClosed().subscribe(
// );
}else if(item.type == "gaopenche"){
window.open("GaoPenChe")
}else if(item.type == "denggao"){
window.open("denggaoche")
}else if(item.type == "waifu"){
window.open("waifudingguan")
}else if(item.type == "neifu"){
window.open("neifudingguan")
}else if(item.type == "gong"){
window.open("gongdingguan")
}else if(item.type == "qiu"){
window.open("qiuguan")
}else if (item.isDir) {
this.selectedDataBank = item.key.substring(0, item.key.length - 1)
this.getALLFileList(this.selectedDataBank)

2
src/app/ui/all-file/folderdalog.html

@ -4,7 +4,7 @@
<input matInput id="name" name="name" type='text'
required
style="font-size: 12px;"
[(ngModel)]="newFolderName" placeholder="创建文件夹名称">
[(ngModel)]="newFolderName" placeholder="创建文件夹">
</mat-form-field>
<div class="btn">

2
src/app/ui/all-file/viewdetails.html

@ -2,6 +2,6 @@
<div class="imgbox" style="text-align: center;">
<img *ngIf="data.type == 'img'" style="max-width: 100%;max-height: 100%;" class="imgitemdefault" [src]="Url">
<video style="margin-top: 70px;" autoplay controls *ngIf="data.type == 'video'" [src]="Url"></video>
<!-- <iframe width="100%" height="100%" *ngIf="data.type == 'pdf'" [src]="Url" frameborder="0"></iframe> -->
<audio autoplay controls *ngIf="data.type == 'mp3'" [src]="Url"></audio>
</div>
</div>

BIN
src/assets/images/bg_login.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

BIN
src/assets/images/cad.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
src/assets/images/file.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/images/gaopenche.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
src/assets/images/logo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
src/assets/images/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
src/assets/images/music.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
src/assets/images/shebei.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/images/sheshi.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/images/shipinlogo.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Loading…
Cancel
Save