Browse Source

Merge branch 'master' of http://121.36.37.70:3000/shaojiahao/Jinan_project

非煤矿山灾害智能感知和预警系统
邵佳豪 1 year ago
parent
commit
0ba8224bbf
  1. 3
      proxy.config.json
  2. 16
      src/app/home/basic-info/unit/unit.component.html
  3. 22
      src/app/home/basic-info/unit/unit.component.ts

3
proxy.config.json

@ -1,8 +1,11 @@
{
"/api": {
"target": "https://121.36.37.70:8204/",
<<<<<<< HEAD
"测试": "https://121.36.37.70:8204/",
"生产": "https://fx.anxincloud.cn/",
=======
>>>>>>> 1af64195fbad28ee962a81913395cde18a4de404
"secure": false,
"changeOrigin": true
},

16
src/app/home/basic-info/unit/unit.component.html

@ -24,8 +24,10 @@
<nz-option nzValue="其他单位" nzLabel="其他单位"></nz-option>
<nz-option nzValue="九小场所" nzLabel="九小场所"></nz-option>
</nz-select>
<nz-range-picker [(ngModel)]="searchValue.date" [nzSize]="'small'" style="margin-right: 10px;"></nz-range-picker>
<button (click)="search()" nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>查询</button>
<button (click)="reset()" nz-button><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
<div class="translate">
<button nz-button nzType="primary" (click)="addUnit()"><i nz-icon nzType="plus-circle"
@ -36,13 +38,14 @@
<nz-table style="font-size: 18px!important;" [nzLoading]="nzLoading" [nzBordered]="true" #basicTable [nzData]="listOfData" [nzShowPagination]='false'>
<thead>
<tr>
<th nzWidth="17%">单位名称</th>
<th nzWidth="8%">信息完整度</th>
<th nzWidth="15%">单位名称</th>
<th nzWidth="7%">信息完整度</th>
<th nzWidth="10%">所属机构</th>
<th nzWidth="13%">单位类型</th>
<th nzWidth="13%">使用性质</th>
<th nzWidth="9%">单位级别</th>
<th nzWidth="18%">单位地址</th>
<th nzWidth="12%">单位类型</th>
<th nzWidth="12%">使用性质</th>
<th nzWidth="8%">单位级别</th>
<th nzWidth="15%">单位地址</th>
<th nzWidth="10%">业务开展时间</th>
<th>操作</th>
</tr>
</thead>
@ -62,6 +65,7 @@
{{data.companyLevel}}
</td>
<td>{{ data.address }}</td>
<td>{{ data.lastPlanTaskTime }}</td>
<td class="operation">
<a class="bule" (click)="look(data)">查看</a>
<a class="bule" (click)="edit(data)">编辑</a>

22
src/app/home/basic-info/unit/unit.component.ts

@ -13,6 +13,7 @@ import { asBlob } from 'html-docx-js-typescript'
// 要保存这个docx文件推荐引入file-saver哦,你可以用npm i -D file-saver来安装
import { saveAs } from 'file-saver'
import { MethodService } from 'src/app/service/method.service';
import * as moment from 'moment';
@Component({
selector: 'app-unit',
templateUrl: './unit.component.html',
@ -27,6 +28,7 @@ export class UnitComponent implements OnInit {
PageNumber = 1
PageSize = 10
ngOnInit(): void {
this.getBuildingTypes()
this.getAllOrganization()
}
@ -76,11 +78,15 @@ export class UnitComponent implements OnInit {
unit: '',
uniytype: '',
or: JSON.parse(sessionStorage.getItem('userData')).organizationId,
property: ''
property: '',
date:null
};
aaa(){
console.log(this.searchValue.date);
}
nzLoading = false
totalCount
@ -92,6 +98,8 @@ export class UnitComponent implements OnInit {
BuildingTypeId: this.searchValue.uniytype,
OrganizationId: this.searchValue.or ? this.searchValue.or : OrganizationId,
CompanyLevel: this.searchValue.property,
PlanCheckStartTime:this.searchValue.date&&JSON.stringify(this.searchValue.date)!="[]"?moment(this.searchValue.date[0]).format('yyyy-MM-DD') + ' 00:00:00':null,
PlanCheckEndTime:this.searchValue.date&&JSON.stringify(this.searchValue.date)!="[]"?moment(this.searchValue.date[1]).format('yyyy-MM-DD') + ' 23:59:59':null,
PageNumber: this.PageNumber,
PageSize: this.PageSize
}
@ -99,9 +107,14 @@ export class UnitComponent implements OnInit {
params: params
}).subscribe((data: any) => {
this.nzLoading = false
// console.log(data);
console.log(data);
this.totalCount = data.totalCount
this.listOfData = data.items
this.listOfData.forEach(element => {
if(element.lastPlanTaskTime){
element.lastPlanTaskTime=moment(element.lastPlanTaskTime).format('yyyy-MM-DD HH:ss')
}
});
this.listOfData = [...this.listOfData]
})
}
@ -119,7 +132,8 @@ export class UnitComponent implements OnInit {
unit: '',
uniytype: '',
or: JSON.parse(sessionStorage.getItem('userData')).organizationId,
property: ''
property: '',
date:null
};
this.getCompanies()
}

Loading…
Cancel
Save