查看
diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
index 7d0c97f..35205b6 100644
--- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
+++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
@@ -182,7 +182,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
formatter: function (value, index) {
let newParamsName = '';
const paramsNameNumber = value.length;
- const provideNumber = 10;
+ const provideNumber = 1000;
const rowNumber = Math.ceil(paramsNameNumber / provideNumber);
if (paramsNameNumber > provideNumber) {
for (let p = 0; p < rowNumber; p++) {
@@ -219,7 +219,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
}
}
},
- inverse: true
+ inverse: true//倒序
},
series:
@@ -250,13 +250,12 @@ export class CriminalRecordsAdminComponent implements OnInit {
global: false // 缺省为 false
}
},
- barWidth: '36%',
-
+ barWidth: '36%'
}
,
grid: {
- left: '150px',
- right: '80px',
+ left: '175px',
+ right: '60px',
bottom: '3px',
top: '36px'
},
@@ -291,7 +290,24 @@ export class CriminalRecordsAdminComponent implements OnInit {
}
startdate
enddate
+
+ isMisinformation: boolean = false//误报按钮的显隐
ngOnInit(): void {
+ let loginUserInfo
+ if (sessionStorage.getItem('isGasStation') == 'true') {
+ loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation'))
+ } else {
+ loginUserInfo = JSON.parse(sessionStorage.getItem('userdata'))
+ }
+
+ if (loginUserInfo.roles.find((item) => {
+ return item.name == 'ViolationPositiveCensorer'
+ })) {
+ this.isMisinformation = true
+ } else {
+ this.isMisinformation = false
+ }
+
//当前日期
let myDate: any = new Date();
let nowY = myDate.getFullYear();
@@ -312,7 +328,8 @@ export class CriminalRecordsAdminComponent implements OnInit {
event: [null],
site: [null],
disposalState: [null],
- datePicker: [[this.startdate, this.enddate]]
+ datePicker: [[this.startdate, this.enddate]],
+ misinformation: ['true'],
});
//饼图
@@ -463,12 +480,13 @@ export class CriminalRecordsAdminComponent implements OnInit {
Level: this.validateForm.value.level,
ViolationIds: ViolationIds,
ViolateArea: this.validateForm.value.site,
- OrganizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id,
+ OrganizationUnitId: this.validateForm.value.organization,
IsContainsChildren: 'true',
IsHandled: disposalState,
ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null,
SkipCount: this.SkipCount,
- MaxResultCount: this.MaxResultCount
+ MaxResultCount: this.MaxResultCount,
+ Positive: this.validateForm.value.misinformation
}
this.tableSpin = true
this.http.get('/api/services/app/ViolateRecord/GetAll', {
@@ -476,12 +494,9 @@ export class CriminalRecordsAdminComponent implements OnInit {
}).subscribe((data: any) => {
this.list = this.list.concat(data.result.items);
this.list = [...this.list]
- // this.list = data.result.items
this.totalCount = data.result.totalCount
console.log('违规记录列表', data)
this.tableSpin = false
-
- console.log(this.list.length)
})
}
@@ -557,10 +572,12 @@ export class CriminalRecordsAdminComponent implements OnInit {
}
this.validateForm.patchValue({
organization: JSON.parse(sessionStorage.getItem('userdata')).organization.id,
- datePicker: [this.startdate, this.enddate]
+ datePicker: [this.startdate, this.enddate],
+ misinformation: 'true',
});
this.list = []
this.SkipCount = '0'
+ console.log('xxxx',this.validateForm.value)
this.getViolateRecordList()
}
@@ -685,7 +702,15 @@ export class CriminalRecordsAdminComponent implements OnInit {
},
nzFooter: null,
nzOnOk: async () => {
-
+ console.log('误报处理')
+ for (let index = 0; index < this.list.length; index++) {
+ const element = this.list[index];
+ if (element.id == item.id) {
+ this.list.splice(index, 1)
+ this.totalCount = String(Number(this.totalCount) - 1)
+ this.SkipCount = String(Number(this.SkipCount) - 1)
+ }
+ }
}
});
const instance = modal.getContentComponent();
@@ -737,7 +762,9 @@ export class CriminalRecordsAdminComponent implements OnInit {
goWarningList() {
this.router.navigate(['/records/warningstatisticslist'])
}
-
+ goMisinformationList() {
+ this.router.navigate(['records/misinformationList'])
+ }
dispose(item) {
console.log(item)
const modal = this.modal.create({
diff --git a/src/app/pages/criminal-records/criminal-records.component.html b/src/app/pages/criminal-records/criminal-records.component.html
index 16da2bd..504340e 100644
--- a/src/app/pages/criminal-records/criminal-records.component.html
+++ b/src/app/pages/criminal-records/criminal-records.component.html
@@ -7,6 +7,7 @@
预警类型统计
+
卸油统计
证照预警统计
@@ -19,10 +20,10 @@
-
-
-
-
+
+
+
+
@@ -69,7 +70,14 @@
-
+
+
+
+
+
+
+
+
查询
@@ -193,8 +201,13 @@
{{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
- 已处置
- 未处置
+
+ 误报
+
+
+ 已处置
+ 未处置
+
查看
diff --git a/src/app/pages/criminal-records/criminal-records.component.ts b/src/app/pages/criminal-records/criminal-records.component.ts
index 795d9f4..0d3262f 100644
--- a/src/app/pages/criminal-records/criminal-records.component.ts
+++ b/src/app/pages/criminal-records/criminal-records.component.ts
@@ -297,7 +297,23 @@ export class CriminalRecordsComponent implements OnInit {
}
startdate
enddate
+
+ isMisinformation: boolean = false//误报按钮的显隐
ngOnInit(): void {
+ let loginUserInfo
+ if (sessionStorage.getItem('isGasStation') == 'true') {
+ loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation'))
+ } else {
+ loginUserInfo = JSON.parse(sessionStorage.getItem('userdata'))
+ }
+
+ if (loginUserInfo.roles.find((item) => {
+ return item.name == 'ViolationPositiveCensorer'
+ })) {
+ this.isMisinformation = true
+ } else {
+ this.isMisinformation = false
+ }
//当前日期
let myDate: any = new Date();
let nowY = myDate.getFullYear();
@@ -316,7 +332,8 @@ export class CriminalRecordsComponent implements OnInit {
event: [null],
disposalState: [null],
site: [null],
- datePicker: [[this.startdate, this.enddate]]
+ datePicker: [[this.startdate, this.enddate]],
+ misinformation: ['true'],
});
// 饼图
this.myChart = echarts.init(document.getElementById('piechart'));
@@ -446,7 +463,8 @@ export class CriminalRecordsComponent implements OnInit {
ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null,
IsHandled: disposalState,
SkipCount: this.SkipCount,
- MaxResultCount: this.MaxResultCount
+ MaxResultCount: this.MaxResultCount,
+ Positive: this.validateForm.value.misinformation
}
this.tableSpin = true
this.http.get('/api/services/app/ViolateRecord/GetAll', {
@@ -490,7 +508,8 @@ export class CriminalRecordsComponent implements OnInit {
this.validateForm.controls[key].updateValueAndValidity();
}
this.validateForm.patchValue({
- datePicker: [this.startdate, this.enddate]
+ datePicker: [this.startdate, this.enddate],
+ misinformation: 'true'
});
this.list = []
this.SkipCount = '0'
@@ -643,6 +662,9 @@ export class CriminalRecordsComponent implements OnInit {
goWarningList() {
this.router.navigate(['/records/petrolStation/warningstatisticslist'])
}
+ goMisinformationList() {
+ this.router.navigate(['records/petrolStation/misinformationList'])
+ }
dispose(item) {
console.log(item)
const modal = this.modal.create({
diff --git a/src/app/pages/home-page/home-page.component.scss b/src/app/pages/home-page/home-page.component.scss
index 2bcbd41..eea676e 100644
--- a/src/app/pages/home-page/home-page.component.scss
+++ b/src/app/pages/home-page/home-page.component.scss
@@ -1016,7 +1016,7 @@
}
// 适配150%
-@media screen and (max-height: 600px) {
+@media screen and (max-height: 630px) {
.informbox {
width: 100%;
height: 32px;
@@ -1333,6 +1333,38 @@
width: 76%;
// border: 1px solid red;
}
+
+ .oilNum {
+ position: absolute;
+ left: 4%;
+ bottom: 16px;
+ display: flex;
+ flex-direction: column;
+
+ .oilNumItem {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ color: white;
+ font-size: 12px;
+
+ span {
+ margin: 0 4px;
+ }
+
+ .pointbox {
+ display: flex;
+ align-items: center;
+ }
+
+ .point {
+ width: 6px;
+ height: 6px;
+ background-color: #91CCFF;
+
+ }
+ }
+ }
}
}
@@ -1356,3 +1388,6 @@
height: 6px;
}
}
+
+
+//适配1366*768
diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts
index 6a86b41..9fecdc0 100644
--- a/src/app/pages/home-page/home-page.component.ts
+++ b/src/app/pages/home-page/home-page.component.ts
@@ -424,6 +424,13 @@ export class HomePageComponent implements OnInit {
this.getHomeAggregation()
}, 10 * 6000);
+
+ this.resolutionRatio()
+ }
+
+ resolutionRatio() {
+ console.log(document.documentElement.clientWidth)
+ console.log(document.documentElement.clientHeight)
}
//获得所有未读消息
@@ -669,7 +676,7 @@ export class HomePageComponent implements OnInit {
isOpenModel: boolean = false
look(item) {
- console.log('消息item', item)
+ console.log('消息item', item)
if (item.notification.data.eventSystemName == '灭火器维护') {
this.isOpenModel = true
let copydata = item.notification.data
diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html
index 2cd7b54..a99a790 100644
--- a/src/app/pages/home/home.component.html
+++ b/src/app/pages/home/home.component.html
@@ -19,6 +19,9 @@
预警记录
+
+ 审批
+
@@ -30,6 +33,9 @@
预警记录
+
+ 证件
+
diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts
index 2255548..ee6b0e1 100644
--- a/src/app/pages/home/home.component.ts
+++ b/src/app/pages/home/home.component.ts
@@ -43,38 +43,31 @@ export class HomeComponent implements OnInit {
userName: string
ngOnInit(): void {
- this.navChangeService.getMessage().subscribe((message: any) => {
- console.log(message);//send a message
- if (message.name == 'oilstation') {
- this.isGasStationNav = true
- }
- });
-
+ // this.navChangeService.getMessage().subscribe((message: any) => {
+ // console.log(message);//send a message
+ // if (message.name == 'oilstation') {
+ // this.isGasStationNav = true
+ // }
+ // });
if (this.router.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'false') {//控制返回按钮显示
+ this.isGasStationNav = true
this.isGasStationBack = true
} else {
+ this.isGasStationNav = false
this.isGasStationBack = false
}
- // if (this.router.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'true') {
- // this.isGasStation = true
- // } else {
- // this.isGasStation = false
- // }
-
if (sessionStorage.getItem('isGasStation') == 'true') {
this.isGasStation = true
this.isGasStationNav = true
- } else {
- this.isGasStation = false
- this.isGasStationNav = false
}
this.router.events.pipe(
filter(event => event instanceof NavigationEnd)
).subscribe((event: any) => {
if (event.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'false') {//控制返回按钮显示
+ this.isGasStationNav = true
this.isGasStationBack = true
} else {
this.isGasStationBack = false
@@ -154,6 +147,8 @@ export class HomeComponent implements OnInit {
SignalRAspNetCoreHelper.initSignalR();
abp.event.on('abp.notifications.received', this.reloadPage);
}
+
+ //右下角消息弹窗
messageId = []
receiptOfNotification(userNotification) {
let obj = {
@@ -283,7 +278,7 @@ export class HomeComponent implements OnInit {
nzComponentParams: {
data: copydata
},
- nzFooter: null,
+ nzFooter: null
});
const instance = modal.getContentComponent();
}
@@ -309,7 +304,6 @@ export class HomeComponent implements OnInit {
})
}
close(item) {
- // console.log(item)
this.messageId.forEach((element) => {
if (element.id == item.notification.entityId) {
this.notificationService.remove(element.messageId)
@@ -322,6 +316,7 @@ export class HomeComponent implements OnInit {
console.log('退出')
abp.event.off('abp.notifications.received', this.reloadPage);
abp.signalr.disconnect()
+ this.notificationService.remove()
}
//获得时间
diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.html b/src/app/pages/license/file-category/details-file-category/details-file-category.component.html
new file mode 100644
index 0000000..c44bbdd
--- /dev/null
+++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.html
@@ -0,0 +1,47 @@
+
+
+
+
+
证件名称: {{data.licenseTypeName}}
+
+
有效期类型: 不适用 无 有
+
+
+
证件图片:
+
+
+
+
+
+
+ 审核记录
+
+
+ 审核次数:{{getVerifyNum()}}
+
+
+ 驳回次数:{{getRejectNum()}}
+
+
+
+
+
+ {{item.creationTime | date:"yyyy/MM/dd"}}
+ {{item.auditStatus | auditStatus}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.scss b/src/app/pages/license/file-category/details-file-category/details-file-category.component.scss
new file mode 100644
index 0000000..b5b9ea1
--- /dev/null
+++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.scss
@@ -0,0 +1,60 @@
+.box {
+ .title {
+ font-family: sybold;
+ width: 100%;
+ height: 48px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .titlecontent {
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ text-align: center;
+ color: #91CCFF;
+ font-size: 16px;
+ }
+
+ i {
+ position: absolute;
+ right: 12px;
+ color: #fff;
+ font-size: 18px;
+ cursor: pointer;
+ }
+ }
+
+ .content {
+ box-sizing: border-box;
+ padding: 0 15px;
+ max-height: 580px;
+ overflow-y: auto;
+
+ .circle {
+ width: 8px;
+ height: 8px;
+ background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%);
+ opacity: 1;
+ }
+ .recordP{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+ }
+
+ p {
+ margin-bottom: 0;
+ color: #C4E2FC;
+ margin: 12px 0;
+
+ img {
+ width: 88px;
+ height: 56px;
+ cursor: pointer;
+ }
+ }
+}
diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts b/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts
new file mode 100644
index 0000000..2161bd7
--- /dev/null
+++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.ts
@@ -0,0 +1,111 @@
+import { Component, OnInit, Input } from '@angular/core';
+import { NzModalRef } from 'ng-zorro-antd/modal';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service';
+import Viewer from 'viewerjs';
+import { NzMessageService } from 'ng-zorro-antd/message';
+
+@Component({
+ selector: 'app-details-file-category',
+ templateUrl: './details-file-category.component.html',
+ styleUrls: ['./details-file-category.component.scss']
+})
+export class DetailsFileCategoryComponent implements OnInit {
+
+ @Input() data?: any;
+ constructor(private modal: NzModalRef, private http: HttpClient,private message: NzMessageService) { }
+
+ ngOnInit(): void {
+ this.getAuditLogging()
+ }
+
+ auditList: any[] = [];
+ //获取审核记录
+ getAuditLogging() {
+ if (!this.data.auditLogId) {
+ return
+ }
+ let params = { id: this.data.auditLogId }
+ this.http.get(`/api/services/app/ContentAuditLog/Get`,{params}).subscribe((data: any)=>{
+ this.auditList = data.result.actionList || []
+ console.log(this.auditList)
+ })
+ }
+
+ //获取审核次数
+ getVerifyNum(): number {
+ let num = 0
+ this.auditList.forEach(item=>{
+ if (item.auditStatus == 2 || item.auditStatus == 3) {
+ num = num + 1
+ }
+ })
+ return num
+ }
+
+ //获取驳回次数
+ getRejectNum(): number {
+ let num = 0
+ this.auditList.forEach(item=>{
+ if (item.auditStatus == 3) {
+ num = num + 1
+ }
+ })
+ return num
+ }
+
+ destroyModal() {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+
+ //获取文件格式
+ getFileType(name: string):string {
+ let suffix
+ if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) {
+ suffix = 'img'
+ } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) {
+ suffix = 'word'
+ } else if (name.substring(name.length-4).includes('pdf')) {
+ suffix = 'pdf'
+ }
+ return suffix
+ }
+
+ //查看图片
+ viewImg(url) {
+ let dom = document.getElementById(`viewerjs`)
+ let pObjs = dom.childNodes;
+ let node = document.createElement("img")
+ node.style.display = "none";
+ node.src = url;
+ node.id = 'img'
+ dom.appendChild(node)
+ setTimeout(() => {
+ let viewer = new Viewer(document.getElementById(`viewerjs`), {
+ hidden: () => {
+ dom.removeChild(pObjs[0]);
+ viewer.destroy();
+ }
+ });
+ node.click();
+ }, 0);
+ }
+
+ //查看文件
+ lookFile(item) {
+ if (!item.imageUrl) {
+ return
+ }
+ if (this.getFileType(item.imageUrl) == 'word') {
+ let arr = item.imageUrl.split('.')
+ arr[arr.length - 1] = 'pdf'
+ window.open(arr.join('.'))
+ } else if (this.getFileType(item.imageUrl) == 'pdf') {
+ window.open(item.imageUrl)
+ } else {
+ this.message.create('warning', '暂不支持查看!');
+ }
+ }
+
+}
diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html
new file mode 100644
index 0000000..7efab10
--- /dev/null
+++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html
@@ -0,0 +1,48 @@
+
\ No newline at end of file
diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss
new file mode 100644
index 0000000..75ccce6
--- /dev/null
+++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss
@@ -0,0 +1,127 @@
+.box {
+ .title {
+ font-family: sybold;
+ width: 100%;
+ height: 48px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .titlecontent {
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ text-align: center;
+ color: #91CCFF;
+ font-size: 16px;
+ }
+
+ i {
+ position: absolute;
+ right: 12px;
+ color: #fff;
+ font-size: 18px;
+ cursor: pointer;
+ }
+ }
+
+ p {
+ margin-bottom: 0;
+ color: #C4E2FC;
+ margin: 12px 0;
+ }
+
+ .form {
+ box-sizing: border-box;
+ padding: 0 17px;
+
+ label {
+ color: #C4E2FC;
+ margin-right: 6px;
+ }
+
+
+
+ .validity {
+ display: flex;
+ align-items: center;
+ }
+
+ nz-date-picker {
+ flex: .5;
+ }
+
+ nz-range-picker {
+ flex: 1;
+ }
+
+ .btnbox {
+ width: 100%;
+ margin-top: 24px;
+ margin-bottom: 17px;
+ display: flex;
+ justify-content: flex-end;
+
+ button {
+ border-radius: 0px;
+ color: #91CCFF;
+ }
+
+ button:nth-child(2) {
+ margin-left: 16px;
+ }
+
+ .ok {
+ background: rgba(0, 129, 255, 0.4);
+ }
+
+ .cancel {
+ border: 1px solid #C4E2FC;
+ background: #0c1e38;
+ color: rgba(99, 102, 105, 0.6);
+ box-shadow: 0 0 3px 0 #fff inset;
+ }
+ }
+ }
+
+ .uploadDivbox {
+ width: 100%;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ position: relative;
+ margin: 5px 0;
+
+ .uploadDiv {
+ width: 120px;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+
+ .fileinput {
+ width: 114px;
+ height: 32px;
+ position: absolute;
+ z-index: 100;
+ opacity: 0;
+ top: 23px;
+ cursor: pointer;
+ }
+
+ button {
+ z-index: 99;
+ width: 114px;
+ height: 32px;
+ background: rgba(0, 129, 255, 0.3);
+ border: 1px solid #36A2FF;
+ opacity: 1;
+ border-radius: 0px;
+ color: #91CCFF;
+ }
+ }
+ }
+}
diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
new file mode 100644
index 0000000..8d590bb
--- /dev/null
+++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
@@ -0,0 +1,147 @@
+import { Component, OnInit, Input } from '@angular/core';
+import { NzModalRef } from 'ng-zorro-antd/modal';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service';
+import Viewer from 'viewerjs';
+import { NzMessageService } from 'ng-zorro-antd/message';
+@Component({
+ selector: 'app-edit-file-category',
+ templateUrl: './edit-file-category.component.html',
+ styleUrls: ['./edit-file-category.component.scss']
+})
+export class EditFileCategoryComponent implements OnInit {
+
+ @Input() data?: any;
+
+ validateForm!: FormGroup;
+ constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService,private message: NzMessageService) { }
+
+
+ data2
+ ngOnInit(): void {
+ this.validateForm = this.fb.group({
+ type: [null, [Validators.required]]
+ });
+ this.data2 = JSON.parse(JSON.stringify(this.data))
+ this.validatyType = (this.data2.validatyType).toString()
+ console.log(this.data2)
+ }
+
+ validatyType: string
+ isLongTerm = false
+ imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg'
+ validityChange($event) {
+ this.isLongTerm = $event
+ }
+
+ destroyModal() {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+ ok() {
+ this.modal.triggerOk()
+ }
+
+
+
+ isLoadingSave: boolean = false
+ uploadIndex: string
+ filechange(e) {
+ let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
+ let file = e.target.files[0] || null //获取上传的文件
+ this.openFileSelect(file, `stationPhotos/${oilStationId}/`)
+ }
+ //设置文件路径并上传
+ postFilePath
+ async openFileSelect(file: File, extensionPath: string) {
+ this.postFilePath = extensionPath;
+ let fileSize = file.size || null //上传文件的总大小
+ let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传
+ if (fileSize >= shardSize) // 超过5MB要分块上传
+ {
+ await this.postFileByMul(file);
+ }
+ else //普通上传
+ {
+ await this.postFile(file);
+ }
+ }
+ //上传文件
+ async postFile(file: File) {
+ await new Promise((resolve, reject) => {
+ this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => {
+ let dataObj = data as any;
+ let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
+ this.imageUrl = filePath
+ this.data2.imageUrl = filePath
+ console.log('上传成功', filePath)
+ resolve('success')
+ });
+ })
+ }
+
+ /**
+ * 分块上传
+ * @param file
+ */
+ postFileByMul(file: File) {
+ this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => {
+ let dataObj = value as any;
+ let filePath = dataObj.filePath
+ this.imageUrl = filePath
+ this.data2.imageUrl = filePath
+ console.log('上传成功', filePath)
+ });
+
+ }
+
+ //获取文件格式
+ getFileType(name: string):string {
+ let suffix
+ if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) {
+ suffix = 'img'
+ } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) {
+ suffix = 'word'
+ } else if (name.substring(name.length-4).includes('pdf')) {
+ suffix = 'pdf'
+ }
+ return suffix
+ }
+
+ //查看图片
+ viewImg(url) {
+ let dom = document.getElementById(`viewerjs`)
+ let pObjs = dom.childNodes;
+ let node = document.createElement("img")
+ node.style.display = "none";
+ node.src = url;
+ node.id = 'img'
+ dom.appendChild(node)
+ setTimeout(() => {
+ let viewer = new Viewer(document.getElementById(`viewerjs`), {
+ hidden: () => {
+ dom.removeChild(pObjs[0]);
+ viewer.destroy();
+ }
+ });
+ node.click();
+ }, 0);
+ }
+
+ //查看文件
+ lookFile(item) {
+ if (!item.imageUrl) {
+ return
+ }
+ if (this.getFileType(item.imageUrl) == 'word') {
+ let arr = item.imageUrl.split('.')
+ arr[arr.length - 1] = 'pdf'
+ window.open(arr.join('.'))
+ } else if (this.getFileType(item.imageUrl) == 'pdf') {
+ window.open(item.imageUrl)
+ } else {
+ this.message.create('warning', '暂不支持查看!');
+ }
+ }
+
+}
diff --git a/src/app/pages/license/file-category/file-category.component.html b/src/app/pages/license/file-category/file-category.component.html
new file mode 100644
index 0000000..a279810
--- /dev/null
+++ b/src/app/pages/license/file-category/file-category.component.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+ 证件名称
+
+ 有效期类型
+ 附件
+ 提交时间
+ 审核状态
+ 操作
+
+
+
+
+
+ {{item.licenseTypeName || ''}}
+
+
+ 不适用
+ 无
+ 有
+
+
+
+
+
+
+ {{item.committedTime | date:"yyyy/MM/dd"}}未提交审核
+
+ {{item.auditStatus | auditStatus}}
+
+
+ 编辑
+ 详情
+ 撤销审核
+ 提交审核
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/license/file-category/file-category.component.scss b/src/app/pages/license/file-category/file-category.component.scss
new file mode 100644
index 0000000..7b92f86
--- /dev/null
+++ b/src/app/pages/license/file-category/file-category.component.scss
@@ -0,0 +1,23 @@
+.box {
+ width: 100%;
+ height: 100%;
+}
+
+.tablebox {
+ width: 100%;
+ height: 100%;
+
+ .operation {
+ span {
+ margin-right: 6px;
+ }
+ }
+
+ #table {
+ img {
+ width: 30px;
+ height: 30px;
+ cursor: pointer;
+ }
+ }
+}
diff --git a/src/app/pages/license/file-category/file-category.component.ts b/src/app/pages/license/file-category/file-category.component.ts
new file mode 100644
index 0000000..e8a7828
--- /dev/null
+++ b/src/app/pages/license/file-category/file-category.component.ts
@@ -0,0 +1,175 @@
+import { Component, OnInit, ViewContainerRef } from '@angular/core';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { Observable, fromEvent } from 'rxjs';
+import { debounceTime } from 'rxjs/operators';
+import Viewer from 'viewerjs';
+import * as moment from 'moment';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { HttpClient } from '@angular/common/http';
+import { EditFileCategoryComponent } from './edit-file-category/edit-file-category.component';
+import { DetailsFileCategoryComponent } from './details-file-category/details-file-category.component';
+@Component({
+ selector: 'app-file-category',
+ templateUrl: './file-category.component.html',
+ styleUrls: ['./file-category.component.scss']
+})
+export class FileCategoryComponent implements OnInit {
+
+ constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
+ tableSpin = false
+ list = []; //tabelData
+
+ tableScrollHeight
+ ngOnInit(): void {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ // 页面监听
+ fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ });
+ this.getStationList()
+ }
+
+ //获取当前油站档案类证照
+ getStationList() {
+ this.tableSpin = true
+ let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation'));
+ let params = { orgId: data.organization.id || "" }
+ this.http.get(`/api/services/app/StationFileLicense/GetStationList`, { params }).subscribe((info: any) => {
+ this.list = info.result
+ this.tableSpin = false
+ console.log(info.result)
+ })
+ }
+
+ //获取文件格式
+ getFileType(name: string):string {
+ let suffix
+ if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) {
+ suffix = 'img'
+ } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) {
+ suffix = 'word'
+ } else if (name.substring(name.length-4).includes('pdf')) {
+ suffix = 'pdf'
+ }
+ return suffix
+ }
+
+ //查看图片
+ viewImg(url) {
+ let dom = document.getElementById(`viewerjs`)
+ let pObjs = dom.childNodes;
+ let node = document.createElement("img")
+ node.style.display = "none";
+ node.src = url;
+ node.id = 'img'
+ dom.appendChild(node)
+ setTimeout(() => {
+ let viewer = new Viewer(document.getElementById(`viewerjs`), {
+ hidden: () => {
+ dom.removeChild(pObjs[0]);
+ viewer.destroy();
+ }
+ });
+ node.click();
+ }, 0);
+ }
+
+ //查看文件
+ lookFile(item) {
+ if (!item.imageUrl) {
+ return
+ }
+ if (this.getFileType(item.imageUrl) == 'word') {
+ let arr = item.imageUrl.split('.')
+ arr[arr.length - 1] = 'pdf'
+ window.open(arr.join('.'))
+ } else if (this.getFileType(item.imageUrl) == 'pdf') {
+ window.open(item.imageUrl)
+ } else {
+ this.message.create('warning', '暂不支持查看!');
+ }
+ }
+
+ dispose() {
+
+ }
+
+ edit(item) {
+ const modal = this.modal.create({
+ nzContent: EditFileCategoryComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 750,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: item
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+ await new Promise(resolve => {
+ instance.data2.validatyType = Number(instance.validatyType)
+ this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe(data => {
+ resolve(data);
+ this.getStationList();
+ this.message.create('success', '修改成功!');
+ return true
+ })
+ })
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterClose.subscribe(result => { });
+ }
+ details(item) {
+ const modal = this.modal.create({
+ nzContent: DetailsFileCategoryComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 450,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: item
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterClose.subscribe(result => { });
+ }
+
+ //提交审核
+ submitReview(item) {
+ if (!item.id) {
+ return
+ }
+ let params = { id: item.id }
+ this.http.post('/api/services/app/StationFileLicense/Commit', {}, { params }).subscribe(data => {
+ this.message.create('success', '提交审核成功!');
+ this.getStationList();
+ })
+ }
+
+ //撤销审核
+ cancelReview(item) {
+ let params = { id: item.id }
+ this.http.post('/api/services/app/StationFileLicense/Uncommit', {}, { params }).subscribe(data => {
+ this.message.create('success', '撤销审核成功!');
+ this.getStationList();
+ })
+ }
+
+}
diff --git a/src/app/pages/license/histories/histories.component.html b/src/app/pages/license/histories/histories.component.html
new file mode 100644
index 0000000..3dcfc90
--- /dev/null
+++ b/src/app/pages/license/histories/histories.component.html
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+ 证件名称
+
+ 证件编号
+ 证件有效期
+ 有效期类型
+ 办理类型
+ 通知内容
+ 通知状态
+ 处置状态
+ 操作
+
+
+
+
+
+ {{item.licenseSnapshot.validityLicenseType.licenseName}}
+
+ {{item.licenseSnapshot.licenseCode}}
+ {{item.licenseSnapshot.validityEndTime | date:"yyyy/MM/dd"}}
+
+
+ 长期
+
+
+ {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}}
+
+
+ {{getHandleTypes(item.handleTypes)}}
+ {{item.notificationContent | notificationContent}}
+
+ {{item.licenseSnapshot.licenseViolationType | licenseViolationType}}
+ {{item.handleState | handleState}}
+
+ 详情
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/license/histories/histories.component.scss b/src/app/pages/license/histories/histories.component.scss
new file mode 100644
index 0000000..aaca580
--- /dev/null
+++ b/src/app/pages/license/histories/histories.component.scss
@@ -0,0 +1,15 @@
+.box {
+ width: 100%;
+ height: 100%;
+}
+
+.tablebox {
+ width: 100%;
+ height: 100%;
+
+ .operation {
+ span {
+ margin-right: 6px;
+ }
+ }
+}
diff --git a/src/app/pages/license/histories/histories.component.ts b/src/app/pages/license/histories/histories.component.ts
new file mode 100644
index 0000000..8600679
--- /dev/null
+++ b/src/app/pages/license/histories/histories.component.ts
@@ -0,0 +1,123 @@
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit, ViewContainerRef } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { Observable, fromEvent } from 'rxjs';
+import { debounceTime } from 'rxjs/operators';
+import { DetailsUpdateCategoryComponent } from '../update-category/details-update-category/details-update-category.component';
+@Component({
+ selector: 'app-histories',
+ templateUrl: './histories.component.html',
+ styleUrls: ['./histories.component.scss']
+})
+
+
+export class HistoriesComponent implements OnInit {
+
+ constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private http: HttpClient, private message: NzMessageService) { }
+ tableSpin = false
+ list = []
+
+ tableScrollHeight
+ ngOnInit(): void {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ // 页面监听
+ fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ });
+
+
+ this.getInform()
+ }
+
+ dispose() {
+ console.log('处置')
+ }
+
+
+ //获取当前油站通知
+ SkipCount = '0'
+ MaxResultCount = '999'
+ getInform() {
+ this.tableSpin = true
+ let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation'));
+ let params: any = {
+ OrganizationUnitId: data.organization.id || "",
+ Active: false,
+ SkipCount: this.SkipCount,
+ MaxResultCount: this.MaxResultCount
+ }
+ this.http.get(`/api/services/app/StationValidityLicenseNotificationRecord/GetAll`, { params: params }).subscribe((data: any) => {
+
+ this.list = data.result.items
+ this.tableSpin = false
+ console.log(data.result.items)
+ })
+ }
+
+
+ //获取办理类型
+ getHandleTypes(handleTypes: any[]): string {
+ if (!handleTypes || !handleTypes.length) {
+ return
+ }
+ let names: string[] = []
+ let handleTypeList = JSON.parse(JSON.stringify(handleTypes));
+ let list: handleTypeList[] = new handleType().list;
+ handleTypeList.forEach(item => {
+ list.find(element => {
+ item == element.value ? names.push(element.name) : null
+ })
+ })
+ return names.join(',')
+ }
+
+
+ //处置
+ details(item) {
+ const modal = this.modal.create({
+ nzContent: DetailsUpdateCategoryComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 450,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: item.licenseSnapshot
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterClose.subscribe(result => { });
+ }
+
+}
+
+
+//办理类型
+export class handleType {
+ list: handleTypeList[] = [
+ { value: 0, name: "无" },
+ { value: 1, name: "年度公示" },
+ { value: 2, name: "年检" },
+ { value: 3, name: "到期换证" },
+ { value: 4, name: "年度执行报告" },
+ { value: 5, name: "到期检测" },
+ { value: 6, name: "年度复训" },
+ { value: 7, name: "年度检测" },
+ { value: 8, name: "到期备案" },
+ { value: 9, name: "到期评价" },
+ ]
+}
+export class handleTypeList {
+ value: number
+ name: string
+}
\ No newline at end of file
diff --git a/src/app/pages/license/inform/inform.component.html b/src/app/pages/license/inform/inform.component.html
new file mode 100644
index 0000000..f77cf12
--- /dev/null
+++ b/src/app/pages/license/inform/inform.component.html
@@ -0,0 +1,51 @@
+
\ No newline at end of file
diff --git a/src/app/pages/license/inform/inform.component.scss b/src/app/pages/license/inform/inform.component.scss
new file mode 100644
index 0000000..710d327
--- /dev/null
+++ b/src/app/pages/license/inform/inform.component.scss
@@ -0,0 +1,13 @@
+.box{
+ width: 100%;
+ height: 100%;
+}
+.tablebox{
+ width: 100%;
+ height: 100%;
+ .operation{
+ span{
+ margin-right: 6px;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/pages/license/inform/inform.component.ts b/src/app/pages/license/inform/inform.component.ts
new file mode 100644
index 0000000..41e6777
--- /dev/null
+++ b/src/app/pages/license/inform/inform.component.ts
@@ -0,0 +1,108 @@
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { Observable, fromEvent } from 'rxjs';
+import { debounceTime } from 'rxjs/operators';
+@Component({
+ selector: 'app-inform',
+ templateUrl: './inform.component.html',
+ styleUrls: ['./inform.component.scss']
+})
+export class InformComponent implements OnInit {
+
+ constructor(private http: HttpClient, private message: NzMessageService) { }
+ tableSpin = false
+ list = []
+
+ tableScrollHeight
+
+ fromEvent
+ ngOnInit(): void {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ // 页面监听
+
+ this.fromEvent = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ });
+
+
+ this.getInform()
+ }
+
+
+
+ dispose() {
+ console.log('处置')
+ }
+
+
+ //获取当前油站通知
+ SkipCount = '0'
+ MaxResultCount = '100'
+ getInform() {
+ this.tableSpin = true
+ let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation'));
+ let params: any = {
+ OrganizationUnitId: data.organization.id || "",
+ Active: true,
+ SkipCount: this.SkipCount,
+ MaxResultCount: this.MaxResultCount
+ }
+ this.http.get(`/api/services/app/StationValidityLicenseNotificationRecord/GetAll`, { params: params }).subscribe((data: any) => {
+ this.list = data.result.items
+ this.tableSpin = false
+ console.log(data.result.items)
+ })
+ }
+
+
+ //获取办理类型
+ getHandleTypes(handleTypes: any[]): string {
+ if (!handleTypes || !handleTypes.length) {
+ return
+ }
+ let names: string[] = []
+ let handleTypeList = JSON.parse(JSON.stringify(handleTypes));
+ let list: handleTypeList[] = new handleType().list;
+ handleTypeList.forEach(item => {
+ list.find(element => {
+ item == element.value ? names.push(element.name) : null
+ })
+ })
+ return names.join(',')
+ }
+
+
+ //处置
+ updateState(item, type) {
+ let body = {
+ id: item.id,
+ operation: type
+ }
+ this.http.put('/api/services/app/StationValidityLicenseNotificationRecord/UpdateState', body).subscribe(data => {
+ this.getInform()
+ this.message.create('success', '操作成功');
+ }, err => {
+ this.message.create('error', '操作失败');
+ })
+ }
+}
+//办理类型
+export class handleType {
+ list: handleTypeList[] = [
+ { value: 0, name: "无" },
+ { value: 1, name: "年度公示" },
+ { value: 2, name: "年检" },
+ { value: 3, name: "到期换证" },
+ { value: 4, name: "年度执行报告" },
+ { value: 5, name: "到期检测" },
+ { value: 6, name: "年度复训" },
+ { value: 7, name: "年度检测" },
+ { value: 8, name: "到期备案" },
+ { value: 9, name: "到期评价" },
+ ]
+}
+export class handleTypeList {
+ value: number
+ name: string
+}
\ No newline at end of file
diff --git a/src/app/pages/license/nav-bar/nav-bar.component.html b/src/app/pages/license/nav-bar/nav-bar.component.html
new file mode 100644
index 0000000..790c47c
--- /dev/null
+++ b/src/app/pages/license/nav-bar/nav-bar.component.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/license/nav-bar/nav-bar.component.scss b/src/app/pages/license/nav-bar/nav-bar.component.scss
new file mode 100644
index 0000000..71c53c0
--- /dev/null
+++ b/src/app/pages/license/nav-bar/nav-bar.component.scss
@@ -0,0 +1,75 @@
+.license {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+}
+
+.title {
+ width: 100%;
+ height: 64px;
+ box-sizing: border-box;
+ padding: 0 28px;
+ margin: 13px 0;
+ position: relative;
+
+ .titlebox {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+
+ img {
+ width: 65px;
+ height: 65px;
+ }
+
+ .nav {
+ flex: 1;
+ height: 48px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ // background-image: linear-gradient(to right, #002147, #033565, #064e8e, #064e8e, #033565, #002147);
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.32) 50%, rgba(35, 153, 255, 0) 100%);
+
+ .navitem {
+ width: 100%;
+ height: 32px;
+ display: flex;
+ align-items: center;
+ // background-image: linear-gradient(to right, #002147, #0f5ca0, #1c88e6, #1c88e6, #0f5ca0, #002147);
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.8) 50%, rgba(35, 153, 255, 0) 100%);
+
+ span {
+ margin-left: 25px;
+ color: #bce0ff;
+ font-size: 20px;
+ font-family: titlefont;
+ cursor: pointer;
+ }
+
+ span:nth-child(1) {
+ margin-left: 12px;
+ }
+
+ .grey {
+ color: #68829F;
+ }
+ }
+
+ }
+ }
+
+ .packup {
+ position: absolute;
+ right: 33px;
+ top: 16px;
+ cursor: pointer;
+ }
+}
+.content{
+ flex: 1;
+ box-sizing: border-box;
+ padding: 0 40px 20px 40px;
+}
diff --git a/src/app/pages/license/nav-bar/nav-bar.component.ts b/src/app/pages/license/nav-bar/nav-bar.component.ts
new file mode 100644
index 0000000..5f0f058
--- /dev/null
+++ b/src/app/pages/license/nav-bar/nav-bar.component.ts
@@ -0,0 +1,20 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-nav-bar',
+ templateUrl: './nav-bar.component.html',
+ styleUrls: ['./nav-bar.component.scss']
+})
+export class NavBarComponent implements OnInit {
+
+ constructor() { }
+
+ navList = ['通知','更新类证件','档案类证件','历史纪录']
+ selectedItem = '通知'
+ selectNav(item){
+ this.selectedItem = item
+ }
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/pages/license/pdf-word-look/pdf-word-look.component.html b/src/app/pages/license/pdf-word-look/pdf-word-look.component.html
new file mode 100644
index 0000000..b8db427
--- /dev/null
+++ b/src/app/pages/license/pdf-word-look/pdf-word-look.component.html
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/src/app/pages/license/pdf-word-look/pdf-word-look.component.scss b/src/app/pages/license/pdf-word-look/pdf-word-look.component.scss
new file mode 100644
index 0000000..96c259d
--- /dev/null
+++ b/src/app/pages/license/pdf-word-look/pdf-word-look.component.scss
@@ -0,0 +1,38 @@
+.box {
+ .title {
+ font-family: sybold;
+ width: 100%;
+ height: 48px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .titlecontent {
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ text-align: center;
+ color: #91CCFF;
+ font-size: 16px;
+ }
+
+ i {
+ position: absolute;
+ right: 12px;
+ color: #fff;
+ font-size: 18px;
+ cursor: pointer;
+ }
+ }
+
+ .content {
+ box-sizing: border-box;
+ padding: 0 15px;
+ max-height: 580px;
+ overflow-y: auto;
+
+ }
+
+}
diff --git a/src/app/pages/license/pdf-word-look/pdf-word-look.component.ts b/src/app/pages/license/pdf-word-look/pdf-word-look.component.ts
new file mode 100644
index 0000000..505bdac
--- /dev/null
+++ b/src/app/pages/license/pdf-word-look/pdf-word-look.component.ts
@@ -0,0 +1,28 @@
+import { Component, OnInit, Input } from '@angular/core';
+import { NzModalRef } from 'ng-zorro-antd/modal';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service';
+import Viewer from 'viewerjs';
+@Component({
+ selector: 'app-pdf-word-look',
+ templateUrl: './pdf-word-look.component.html',
+ styleUrls: ['./pdf-word-look.component.scss']
+})
+export class PdfWordLookComponent implements OnInit {
+
+ @Input() data?: any;
+ constructor(private modal: NzModalRef) { }
+
+
+ ngOnInit(): void {
+ console.log('文档地址',this.data.url)
+ }
+
+
+ destroyModal() {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+
+
+}
diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.html b/src/app/pages/license/update-category/details-update-category/details-update-category.component.html
new file mode 100644
index 0000000..7ac2a22
--- /dev/null
+++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.html
@@ -0,0 +1,53 @@
+
+
+
+
+
证件名称: {{data.licenseTypeName || ''}}
+
+
证件编号: {{data.licenseCode || ''}}
+
+
证件有效期: {{data.validityStartTime | date:"yyyy/MM/dd"}} - {{data.validityEndTime | date:"yyyy/MM/dd"}}
+
+
办理类型: {{getHandleTypes(data.handleTypes)}}
+
+
有效期类型: {{data.validityDays || 0}}天
+
+
+
证件图片:
+
+
+
+
+
+
+ 审核记录
+
+
+ 审核次数:{{getVerifyNum()}}
+
+
+ 驳回次数:{{getRejectNum()}}
+
+
+
+
+
+ {{item.creationTime | date:"yyyy/MM/dd"}}
+ {{item.auditStatus | auditStatus}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.scss b/src/app/pages/license/update-category/details-update-category/details-update-category.component.scss
new file mode 100644
index 0000000..ff540a7
--- /dev/null
+++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.scss
@@ -0,0 +1,59 @@
+.box {
+ .title {
+ font-family: sybold;
+ width: 100%;
+ height: 48px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .titlecontent {
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ text-align: center;
+ color: #91CCFF;
+ font-size: 16px;
+ }
+
+ i {
+ position: absolute;
+ right: 12px;
+ color: #fff;
+ font-size: 18px;
+ cursor: pointer;
+ }
+ }
+
+ .content {
+ box-sizing: border-box;
+ padding: 0 15px;
+ max-height: 580px;
+ overflow-y: auto;
+ .circle {
+ width: 8px;
+ height: 8px;
+ background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%);
+ opacity: 1;
+ }
+ .recordP{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+ }
+
+ p {
+ margin-bottom: 0;
+ color: #C4E2FC;
+ margin: 12px 0;
+
+ img {
+ width: 88px;
+ height: 56px;
+ cursor: pointer;
+ }
+ }
+}
diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts b/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts
new file mode 100644
index 0000000..18de9d9
--- /dev/null
+++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts
@@ -0,0 +1,128 @@
+import { Component, OnInit, Input } from '@angular/core';
+import { NzModalRef } from 'ng-zorro-antd/modal';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service';
+import Viewer from 'viewerjs';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { handleType, handleTypeList } from '../edit-update-category/edit-update-category.component';
+
+@Component({
+ selector: 'app-details-update-category',
+ templateUrl: './details-update-category.component.html',
+ styleUrls: ['./details-update-category.component.scss']
+})
+export class DetailsUpdateCategoryComponent implements OnInit {
+ @Input() data?: any;
+ constructor(private modal: NzModalRef,private message: NzMessageService,private http: HttpClient) { }
+
+
+ ngOnInit(): void {
+ this.getAuditLogging()
+ }
+
+ auditList: any[] = [];
+ //获取审核记录
+ getAuditLogging() {
+ if (!this.data.auditLogId) {
+ return
+ }
+ let params = { id: this.data.auditLogId }
+ this.http.get(`/api/services/app/ContentAuditLog/Get`,{params}).subscribe((data: any)=>{
+ this.auditList = data.result.actionList || []
+ console.log(this.auditList)
+ })
+ }
+
+ //获取审核次数
+ getVerifyNum(): number {
+ let num = 0
+ this.auditList.forEach(item=>{
+ if (item.auditStatus == 2 || item.auditStatus == 3) {
+ num = num + 1
+ }
+ })
+ return num
+ }
+
+ //获取驳回次数
+ getRejectNum(): number {
+ let num = 0
+ this.auditList.forEach(item=>{
+ if (item.auditStatus == 3) {
+ num = num + 1
+ }
+ })
+ return num
+ }
+
+ destroyModal() {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+
+ //获取办理类型
+ getHandleTypes(handleTypes: any[]):string {
+ if (!handleTypes || !handleTypes.length) {
+ return
+ }
+ let names: string[] = []
+ let handleTypeList = JSON.parse(JSON.stringify(handleTypes));
+ let list: handleTypeList[] = new handleType().list;
+ handleTypeList.forEach(item=>{
+ list.find(element=>{
+ item == element.value? names.push(element.name) : null
+ })
+ })
+ return names.join(',')
+ }
+
+ //获取文件格式
+ getFileType(name: string):string {
+ let suffix
+ if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) {
+ suffix = 'img'
+ } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) {
+ suffix = 'word'
+ } else if (name.substring(name.length-4).includes('pdf')) {
+ suffix = 'pdf'
+ }
+ return suffix
+ }
+
+ //查看文件
+ lookFile(item) {
+ if (!item.imageUrl) {
+ return
+ }
+ if (this.getFileType(item.imageUrl) == 'word') {
+ let arr = item.imageUrl.split('.')
+ arr[arr.length - 1] = 'pdf'
+ window.open(arr.join('.'))
+ } else if (this.getFileType(item.imageUrl) == 'pdf') {
+ window.open(item.imageUrl)
+ } else {
+ this.message.create('warning', '暂不支持查看!');
+ }
+ }
+
+ //查看图片
+ viewImg(url) {
+ let dom = document.getElementById(`viewerjs`)
+ let pObjs = dom.childNodes;
+ let node = document.createElement("img")
+ node.style.display = "none";
+ node.src = url;
+ node.id = 'img'
+ dom.appendChild(node)
+ setTimeout(() => {
+ let viewer = new Viewer(document.getElementById(`viewerjs`), {
+ hidden: () => {
+ dom.removeChild(pObjs[0]);
+ viewer.destroy();
+ }
+ });
+ node.click();
+ }, 0);
+ }
+
+}
diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html
new file mode 100644
index 0000000..5020e33
--- /dev/null
+++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html
@@ -0,0 +1,70 @@
+
\ No newline at end of file
diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss
new file mode 100644
index 0000000..75ccce6
--- /dev/null
+++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss
@@ -0,0 +1,127 @@
+.box {
+ .title {
+ font-family: sybold;
+ width: 100%;
+ height: 48px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .titlecontent {
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ text-align: center;
+ color: #91CCFF;
+ font-size: 16px;
+ }
+
+ i {
+ position: absolute;
+ right: 12px;
+ color: #fff;
+ font-size: 18px;
+ cursor: pointer;
+ }
+ }
+
+ p {
+ margin-bottom: 0;
+ color: #C4E2FC;
+ margin: 12px 0;
+ }
+
+ .form {
+ box-sizing: border-box;
+ padding: 0 17px;
+
+ label {
+ color: #C4E2FC;
+ margin-right: 6px;
+ }
+
+
+
+ .validity {
+ display: flex;
+ align-items: center;
+ }
+
+ nz-date-picker {
+ flex: .5;
+ }
+
+ nz-range-picker {
+ flex: 1;
+ }
+
+ .btnbox {
+ width: 100%;
+ margin-top: 24px;
+ margin-bottom: 17px;
+ display: flex;
+ justify-content: flex-end;
+
+ button {
+ border-radius: 0px;
+ color: #91CCFF;
+ }
+
+ button:nth-child(2) {
+ margin-left: 16px;
+ }
+
+ .ok {
+ background: rgba(0, 129, 255, 0.4);
+ }
+
+ .cancel {
+ border: 1px solid #C4E2FC;
+ background: #0c1e38;
+ color: rgba(99, 102, 105, 0.6);
+ box-shadow: 0 0 3px 0 #fff inset;
+ }
+ }
+ }
+
+ .uploadDivbox {
+ width: 100%;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ position: relative;
+ margin: 5px 0;
+
+ .uploadDiv {
+ width: 120px;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+
+ .fileinput {
+ width: 114px;
+ height: 32px;
+ position: absolute;
+ z-index: 100;
+ opacity: 0;
+ top: 23px;
+ cursor: pointer;
+ }
+
+ button {
+ z-index: 99;
+ width: 114px;
+ height: 32px;
+ background: rgba(0, 129, 255, 0.3);
+ border: 1px solid #36A2FF;
+ opacity: 1;
+ border-radius: 0px;
+ color: #91CCFF;
+ }
+ }
+ }
+}
diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
new file mode 100644
index 0000000..fe390b5
--- /dev/null
+++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
@@ -0,0 +1,221 @@
+import { Component, OnInit, Input } from '@angular/core';
+import { NzModalRef } from 'ng-zorro-antd/modal';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service';
+import Viewer from 'viewerjs';
+import { NzMessageService } from 'ng-zorro-antd/message';
+
+@Component({
+ selector: 'app-edit-update-category',
+ templateUrl: './edit-update-category.component.html',
+ styleUrls: ['./edit-update-category.component.scss']
+})
+export class EditUpdateCategoryComponent implements OnInit {
+
+ @Input() data?: any;
+
+ validateForm!: FormGroup;
+ constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService,private message: NzMessageService,) { }
+
+ handleTypeList: handleTypeList[] = new handleType().list;
+ data2: any; //深拷贝data
+ isLongTermTime: Date = null; // 限期 日期
+ isNoLongTermTime: Date[] = []; //长期 日期
+
+ ngOnInit(): void {
+ this.validateForm = this.fb.group({
+ number: [null, [Validators.required]],
+ isLongTerm: [null, [Validators.required]],
+ type: [null, [Validators.required]],
+ isLongTermTime: [null,],
+ isNoLongTermTime: [null,],
+ });
+ // 日期
+ this.data2 = JSON.parse(JSON.stringify(this.data))
+ if (this.data2.isLongTerm) {
+ this.isLongTermTime = new Date(this.data2.validityStartTime)
+ if (this.isLongTermTime.getFullYear && this.isLongTermTime.getFullYear() < 1000) {
+ this.isLongTermTime = new Date()
+ }
+ } else {
+ this.isNoLongTermTime = []
+ this.isNoLongTermTime.push(new Date(this.data2.validityStartTime))
+ this.isNoLongTermTime.push(new Date(this.data2.validityEndTime))
+ if (this.isNoLongTermTime.length && this.isNoLongTermTime.find(item=>{ return item.getFullYear() < 1000 })) {
+ this.isNoLongTermTime[0] = new Date()
+ this.isNoLongTermTime[1] = new Date()
+ }
+ }
+
+ console.log(this.data2)
+ }
+
+ imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg'
+
+ destroyModal() {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+
+ ok() {
+ this.modal.triggerOk()
+ }
+
+ //check change
+ validityChange($event) {
+ if ($event) { //长期
+ this.data2.validityDays = 999
+ } else { //限期
+ let start = (new Date(this.isNoLongTermTime[0])).getTime();
+ let end = (new Date(this.isNoLongTermTime[1])).getTime();
+ let time = end - start
+ if (time <= 0) {
+ this.data2.validityDays = 0
+ } else {
+ this.data2.validityDays = time / (1000*3600*24);
+ }
+ }
+ }
+
+ //date change
+ onChange(e) {
+ if (!e) {
+ return
+ }
+ if (e instanceof Array) {
+ let start = (new Date(e[0])).getTime();
+ let end = (new Date(e[1])).getTime();
+ let time = end - start
+ if (time <= 0) {
+ this.data2.validityDays = 0
+ } else {
+ this.data2.validityDays = time / (1000*3600*24);
+ }
+ } else {
+ this.data2.validityDays = 999
+ }
+ }
+
+ //获取文件格式
+ getFileType(name: string):string {
+ let suffix
+ if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) {
+ suffix = 'img'
+ } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) {
+ suffix = 'word'
+ } else if (name.substring(name.length-4).includes('pdf')) {
+ suffix = 'pdf'
+ }
+ return suffix
+ }
+
+ //查看文件
+ lookFile(item) {
+ if (!item.imageUrl) {
+ return
+ }
+ if (this.getFileType(item.imageUrl) == 'word') {
+ let arr = item.imageUrl.split('.')
+ arr[arr.length - 1] = 'pdf'
+ window.open(arr.join('.'))
+ } else if (this.getFileType(item.imageUrl) == 'pdf') {
+ window.open(item.imageUrl)
+ } else {
+ this.message.create('warning', '暂不支持查看!');
+ }
+ }
+
+
+
+ isLoadingSave: boolean = false
+ uploadIndex: string
+ filechange(e) {
+ let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
+ let file = e.target.files[0] || null //获取上传的文件
+ this.openFileSelect(file, `stationPhotos/${oilStationId}/`)
+ }
+ //设置文件路径并上传
+ postFilePath
+ async openFileSelect(file: File, extensionPath: string) {
+ this.postFilePath = extensionPath;
+ let fileSize = file.size || null //上传文件的总大小
+ let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传
+ if (fileSize >= shardSize) // 超过5MB要分块上传
+ {
+ await this.postFileByMul(file);
+ }
+ else //普通上传
+ {
+ await this.postFile(file);
+ }
+ }
+ //上传文件
+ async postFile(file: File) {
+ await new Promise((resolve, reject) => {
+ this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => {
+ let dataObj = data as any;
+ let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
+ this.imageUrl = filePath
+ this.data2.imageUrl = filePath
+ console.log('上传成功', filePath)
+ resolve('success')
+ });
+ })
+ }
+
+ /**
+ * 分块上传
+ * @param file
+ */
+ postFileByMul(file: File) {
+ this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => {
+ let dataObj = value as any;
+ let filePath = dataObj.filePath
+ this.imageUrl = filePath
+ this.data2.imageUrl = filePath
+ console.log('上传成功', filePath)
+ });
+
+ }
+
+ //查看图片
+ viewImg(url) {
+ let dom = document.getElementById(`viewerjs`)
+ let pObjs = dom.childNodes;
+ let node = document.createElement("img")
+ node.style.display = "none";
+ node.src = url;
+ node.id = 'img'
+ dom.appendChild(node)
+ setTimeout(() => {
+ let viewer = new Viewer(document.getElementById(`viewerjs`), {
+ hidden: () => {
+ dom.removeChild(pObjs[0]);
+ viewer.destroy();
+ }
+ });
+ node.click();
+ }, 0);
+ }
+
+}
+
+//办理类型
+export class handleType {
+ list: handleTypeList[] =[
+ { value: 0, name: "无" },
+ { value: 1, name: "年度公示" },
+ { value: 2, name: "年检" },
+ { value: 3, name: "到期换证" },
+ { value: 4, name: "年度执行报告" },
+ { value: 5, name: "到期检测" },
+ { value: 6, name: "年度复训" },
+ { value: 7, name: "年度检测" },
+ { value: 8, name: "到期备案" },
+ { value: 9, name: "到期评价" },
+ ]
+}
+export class handleTypeList {
+ value: number
+ name: string
+}
\ No newline at end of file
diff --git a/src/app/pages/license/update-category/update-category.component.html b/src/app/pages/license/update-category/update-category.component.html
new file mode 100644
index 0000000..b205c16
--- /dev/null
+++ b/src/app/pages/license/update-category/update-category.component.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+ 证件名称
+
+ 证件编号
+ 证件有效期
+ 附件
+ 有效期类型
+ 办理类型
+
+ 提交时间
+ 审核状态
+ 预警状态
+ 操作
+
+
+
+
+
+ {{item.licenseTypeName || ''}}
+
+ {{item.licenseCode || ''}}
+ {{item.isLongTerm ? '长期证照' : (item.validityEndTime | date:"yyyy/MM/dd")}}
+
+
+
+
+
+
+
+ 长期
+
+
+ {{item.validityDays ? item.validityDays+'天' : '/'}}
+
+
+
+ {{getHandleTypes(item.handleTypes)}}
+
+ {{item.committedTime | date:"yyyy/MM/dd"}}未提交审核
+
+ {{item.auditStatus | auditStatus}}
+
+
+ 无
+ 办理提醒
+ 临期提醒
+ 逾期报警
+
+
+ 编辑
+ 详情
+ 撤销审核
+ 提交审核
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/license/update-category/update-category.component.scss b/src/app/pages/license/update-category/update-category.component.scss
new file mode 100644
index 0000000..87b68c8
--- /dev/null
+++ b/src/app/pages/license/update-category/update-category.component.scss
@@ -0,0 +1,20 @@
+.box{
+ width: 100%;
+ height: 100%;
+}
+.tablebox{
+ width: 100%;
+ height: 100%;
+ .operation{
+ span{
+ margin-right: 6px;
+ }
+ }
+ #table{
+ img{
+ width: 30px;
+ height: 30px;
+ cursor: pointer;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/pages/license/update-category/update-category.component.ts b/src/app/pages/license/update-category/update-category.component.ts
new file mode 100644
index 0000000..4e36b4f
--- /dev/null
+++ b/src/app/pages/license/update-category/update-category.component.ts
@@ -0,0 +1,205 @@
+import { Component, OnInit, ViewContainerRef } from '@angular/core';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { Observable, fromEvent } from 'rxjs';
+import { debounceTime } from 'rxjs/operators';
+import Viewer from 'viewerjs';
+import { EditUpdateCategoryComponent, handleType, handleTypeList } from './edit-update-category/edit-update-category.component';
+import * as moment from 'moment';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { HttpClient } from '@angular/common/http';
+import { DetailsUpdateCategoryComponent } from './details-update-category/details-update-category.component';
+import { PdfWordLookComponent } from '../pdf-word-look/pdf-word-look.component';
+@Component({
+ selector: 'app-update-category',
+ templateUrl: './update-category.component.html',
+ styleUrls: ['./update-category.component.scss']
+})
+export class UpdateCategoryComponent implements OnInit {
+
+ constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
+ tableSpin = false
+ list = []
+
+ tableScrollHeight
+ ngOnInit(): void {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ // 页面监听
+ fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
+ this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px'
+ });
+ this.getStationList()
+ }
+
+ //获取当前油站档案类证照
+ getStationList() {
+ this.tableSpin = true
+ let data = JSON.parse(sessionStorage.getItem('userdataOfgasstation'));
+ let params = { orgId: data.organization.id || "" }
+ this.http.get(`/api/services/app/StationValidityLicense/GetCurStationLicense`,{params}).subscribe((info: any)=>{
+ this.list = info.result
+ this.tableSpin = false
+ console.log(info.result)
+ })
+ }
+
+ //获取办理类型
+ getHandleTypes(handleTypes: any[]):string {
+ if (!handleTypes || !handleTypes.length) {
+ return
+ }
+ let names: string[] = []
+ let handleTypeList = JSON.parse(JSON.stringify(handleTypes));
+ let list: handleTypeList[] = new handleType().list;
+ handleTypeList.forEach(item=>{
+ list.find(element=>{
+ item == element.value? names.push(element.name) : null
+ })
+ })
+ return names.join(',')
+ }
+
+ //获取文件格式
+ getFileType(name: string):string {
+ let suffix
+ if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) {
+ suffix = 'img'
+ } else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) {
+ suffix = 'word'
+ } else if (name.substring(name.length-4).includes('pdf')) {
+ suffix = 'pdf'
+ }
+ return suffix
+ }
+
+ //查看图片
+ viewImg(url) {
+ let dom = document.getElementById(`viewerjs`)
+ let pObjs = dom.childNodes;
+ let node = document.createElement("img")
+ node.style.display = "none";
+ node.src = url;
+ node.id = 'img'
+ dom.appendChild(node)
+ setTimeout(() => {
+ let viewer = new Viewer(document.getElementById(`viewerjs`), {
+ hidden: () => {
+ dom.removeChild(pObjs[0]);
+ viewer.destroy();
+ }
+ });
+ node.click();
+ }, 0);
+ }
+
+ //查看文件
+ lookFile(item) {
+ if (!item.imageUrl) {
+ return
+ }
+ if (this.getFileType(item.imageUrl) == 'word') {
+ let arr = item.imageUrl.split('.')
+ arr[arr.length - 1] = 'pdf'
+ window.open(arr.join('.'))
+ } else if (this.getFileType(item.imageUrl) == 'pdf') {
+ window.open(item.imageUrl)
+ } else {
+ this.message.create('warning', '暂不支持查看!');
+ }
+ }
+
+ dispose() {
+
+ }
+
+ edit(item) {
+ const modal = this.modal.create({
+ nzContent: EditUpdateCategoryComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 750,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: item
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ let body = instance.data2
+ // 日期
+ if (body.isLongTerm) {
+ body.validityStartTime = instance.isLongTermTime
+ } else {
+ body.validityStartTime = instance.isNoLongTermTime[0] || new Date()
+ body.validityEndTime = instance.isNoLongTermTime[1] || new Date()
+ }
+ this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe(data => {
+ resolve(data);
+ this.getStationList();
+ this.message.create('success', '修改成功!');
+ return true
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterClose.subscribe(result => { });
+ }
+
+ details(item) {
+ const modal = this.modal.create({
+ nzContent: DetailsUpdateCategoryComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 450,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: item
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterClose.subscribe(result => { });
+ }
+
+ //提交审核
+ submitReview(item){
+ if (!item.id) {
+ return
+ }
+ let params = { id: item.id }
+ this.http.post('/api/services/app/StationValidityLicense/Commit', {},{params}).subscribe(data => {
+ this.message.create('success', '提交审核成功!');
+ this.getStationList();
+ })
+ }
+
+ //撤销审核
+ cancelReview(item){
+ let params = { id: item.id }
+ this.http.post('/api/services/app/StationValidityLicense/Uncommit', {},{params}).subscribe(data => {
+ this.message.create('success', '撤销审核成功!');
+ this.getStationList();
+ })
+ }
+
+}
diff --git a/src/app/pages/login/login.component.html b/src/app/pages/login/login.component.html
index c14a77a..56bc092 100644
--- a/src/app/pages/login/login.component.html
+++ b/src/app/pages/login/login.component.html
@@ -7,14 +7,14 @@
-
+
-
@@ -47,4 +47,4 @@
智能安全管理系统 -->