diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.ts b/src/app/pages/audit/audit-ing/audit-ing.component.ts index 86c93bc..286285d 100644 --- a/src/app/pages/audit/audit-ing/audit-ing.component.ts +++ b/src/app/pages/audit/audit-ing/audit-ing.component.ts @@ -81,9 +81,9 @@ export class AuditIngComponent implements OnInit { dispose(item) { - console.log(item) + // console.log(item) this.getData(item).then(res => { - console.log('审批具体信息', res) + // console.log('审批具体信息', res) item.getData = res const modal = this.modal.create({ nzContent: AuditDisposeComponent, @@ -189,6 +189,8 @@ export class AuditIngComponent implements OnInit { } return new Promise((resolve, reject) => { let params = { id: item.itemId } + + console.log('xxxxxxxxxxxxxxx走着了吗') this.http.get(url, { params }).subscribe((data: any) => { let auditLog = { rejectReason: item.rejectReason } let organization = { displayName: item.organization ? item.organization.displayName : "" } diff --git a/src/app/pages/audit/gas-base-info/gas-base-info.component.html b/src/app/pages/audit/gas-base-info/gas-base-info.component.html index 8e7685e..11a6ee9 100644 --- a/src/app/pages/audit/gas-base-info/gas-base-info.component.html +++ b/src/app/pages/audit/gas-base-info/gas-base-info.component.html @@ -1,4 +1,4 @@ -
+
详情 @@ -12,7 +12,8 @@

- +

@@ -75,6 +76,91 @@
+
+

加油机

+
+

+ +

+

+ + +

+

+ + +

+
+
+

油罐设备

+
+

+ +

+

+ + +

+

+ + +

+

+ + +

+
+
+

输油管

+
+

+ +

+

+ + +

+

+ +

+
+
+

油气回收

+
+

+ + +

+

+ + +

+

+ + +

+

+ +

+
+
+

阀门

+
+

+ +

+

+ +

+ +
+
+
+ -
+
\ No newline at end of file diff --git a/src/app/pages/audit/gas-base-info/gas-base-info.component.scss b/src/app/pages/audit/gas-base-info/gas-base-info.component.scss index 8604584..b280cfd 100644 --- a/src/app/pages/audit/gas-base-info/gas-base-info.component.scss +++ b/src/app/pages/audit/gas-base-info/gas-base-info.component.scss @@ -1,47 +1,89 @@ +.box { + max-height: 520px; + overflow-y: auto; + +} + +::-webkit-input-placeholder { + /* WebKit browsers */ + color: #345d85; +} + +//滚动条样式 +::-webkit-scrollbar { + width: 5px; +} + +::-webkit-scrollbar-thumb { + background-image: linear-gradient(#2495f8, #1c73c2, #0a3d6a, #061d3c); +} + +::-webkit-scrollbar-track { + background-color: #061d3c; +} + p { - margin-bottom: 0; - color: #C4E2FC; - margin: 10px 0; - img { - width: 88px; - height: 56px; - cursor: pointer; - } -} -label{ display: inline-block; vertical-align: middle; } + margin-bottom: 0; + color: #C4E2FC; + margin: 10px 0; + + img { + width: 88px; + height: 56px; + cursor: pointer; + } +} + +label { + display: inline-block; + vertical-align: middle; +} + .marginLeft { - width: 55%; - overflow: hidden; + width: 55%; + overflow: hidden; +} + +.marginLeft2 { + width: 100%; + overflow: hidden; + + img { + width: 120px; + height: 80px; + } } + .title { - font-family: sybold; + 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: 48px; + 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%); - 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; - } -} -.recordP{ - display: flex; - justify-content: space-between; - align-items: center; -} \ No newline at end of file + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } +} + +.recordP { + display: flex; + justify-content: space-between; + align-items: center; +} diff --git a/src/app/pages/audit/gas-base-info/gas-base-info.component.ts b/src/app/pages/audit/gas-base-info/gas-base-info.component.ts index 2a21d19..d5ecea4 100644 --- a/src/app/pages/audit/gas-base-info/gas-base-info.component.ts +++ b/src/app/pages/audit/gas-base-info/gas-base-info.component.ts @@ -1,7 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Component, Input, OnInit } from '@angular/core'; import { NzModalRef } from 'ng-zorro-antd/modal'; - +import Viewer from 'viewerjs'; @Component({ selector: 'app-gas-base-info', templateUrl: './gas-base-info.component.html', @@ -9,7 +9,7 @@ import { NzModalRef } from 'ng-zorro-antd/modal'; }) export class GasBaseInfoComponent implements OnInit { - constructor(private modal: NzModalRef,private http: HttpClient) { } + constructor(private modal: NzModalRef, private http: HttpClient) { } @Input() data?: any; isDetails: boolean = false; //是否是详情 @@ -24,14 +24,36 @@ export class GasBaseInfoComponent implements OnInit { baseInfo: any = { stationType: null, } + + otherData getBaseInfo() { let params = { organizationUnitId: this.data.organizationId } - this.http.get('/api/services/app/GasStation/Get',{params}).subscribe((data: any)=>{ - data.result.govUnitDetail? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null; + this.http.get('/api/services/app/GasStation/Get', { params }).subscribe((data: any) => { + data.result.govUnitDetail ? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null; this.baseInfo = data.result + this.baseInfo.otherData ? this.otherData = JSON.parse(this.baseInfo.otherData) : null + console.log('otherData', this.otherData) }) } - + //查看图片 + 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); + } destroyModal() { this.modal.destroy({ data: 'this the result data' }); } @@ -43,7 +65,7 @@ export class GasBaseInfoComponent implements OnInit { return } let params = { orgId: this.data.organizationId } - this.http.get(`/api/services/app/GasStation/GetAuditted`,{params}).subscribe((data: any)=>{ + this.http.get(`/api/services/app/GasStation/GetAuditted`, { params }).subscribe((data: any) => { //this.auditList = data.result.actionList || [] console.log(data) }) @@ -52,7 +74,7 @@ export class GasBaseInfoComponent implements OnInit { //获取审核次数 getVerifyNum(): number { let num = 0 - this.auditList.forEach(item=>{ + this.auditList.forEach(item => { if (item.auditStatus == 2 || item.auditStatus == 3) { num = num + 1 } @@ -63,7 +85,7 @@ export class GasBaseInfoComponent implements OnInit { //获取驳回次数 getRejectNum(): number { let num = 0 - this.auditList.forEach(item=>{ + this.auditList.forEach(item => { if (item.auditStatus == 3) { num = num + 1 } diff --git a/src/app/pages/oil-station-info/oil-station-info.component.html b/src/app/pages/oil-station-info/oil-station-info.component.html index 72eb763..dd807d1 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.html +++ b/src/app/pages/oil-station-info/oil-station-info.component.html @@ -301,136 +301,410 @@ - - -
- 审核中... -
- +
+
+ 加油机 + +
+ + + + + + + + + + + + + + + + + + + + +
加油机名称 + - + - -
-
- 证照有效期:* -
- - +
品牌 + - + + + - + 油枪数量 + - + + + - -
-
- 证照提醒时间:* -
- +
油品品号 + - + + + - + 油枪编号 + - + + + - -
-
- 证照年检时间:* -
- - +
+
+ +
+
+ 油罐设备 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + - - - - - -
油罐设备名称 + - + + + - +
油品品号 + - - + + + - + 油枪编号 + - + + + + +
油罐容积 + + + + - - -
-
- 证照图片: -
-
- - - -
-
- - -
-
- - +
安全容积 + + + + + + + +
油罐类型 + + + + + + + + + 油泵类型 + + + + + + + + +
- - - - -
--> + +
+ +
+
+ 输油管 + +
+ + + + + + + + + + + + + + + + + + +
输油管名称 + + + + + + + +
连接的加油机 + + + + + + + + 连接的油罐 + + + + + + + +
设计图纸 +
+
+ + + +
+
+ + +
+
+
+
+ +
+
+ 油气回收 + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
油气回收名称 + + + + + + + + 一次油气回收系统类型 + + + + + + + +
二次油气回收系统类型 + + + + + + + + + 二次油气回收泵类型 + + + + + + + +
三次油气回收处理装置 + + + + + + + + 油气回收在线监测装置 + + + + + + + +
设计图纸 +
+
+ + + +
+
+ + +
+
+
+
+ +
+
+ 阀门 + +
+ + + + + + + + +
阀门名称 + + + + + + + + 描述 + + + + + + + +
+
+ +
+ +
+ 审核中... +
+ +
+ +
- 当前审核状态:{{httpBody.auditLog.auditStatusDesc}} - 审核意见:{{httpBody.auditLog.rejectReason}} - - - + 当前审核状态:{{httpBody.auditLog.auditStatusDesc}} + 审核意见:{{httpBody.auditLog.rejectReason}} + + +
@@ -438,6 +712,6 @@
- +
\ No newline at end of file diff --git a/src/app/pages/oil-station-info/oil-station-info.component.scss b/src/app/pages/oil-station-info/oil-station-info.component.scss index d8f917f..997ab9e 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.scss +++ b/src/app/pages/oil-station-info/oil-station-info.component.scss @@ -12,7 +12,7 @@ } .content { - width: 1000px; + width: 1050px; height: 100%; display: flex; flex-direction: column; @@ -28,9 +28,6 @@ .tablebox { flex: 1; - - - .table { position: relative; @@ -62,6 +59,11 @@ text-align: left; border: 0px; } + textarea{ + background: none; + color: #fff; + border: 0; + } } @@ -123,6 +125,47 @@ } + + + .itemname { + width: 120px; + text-align: right; + box-sizing: border-box; + padding-right: 12px; + } + + .deleteTr { + position: absolute; + right: 5px; + top: 5px; + cursor: pointer; + } + + + } + } + + .shade { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + background-color: rgba(77, 80, 83, 0.3); + display: flex; + justify-content: center; + align-items: center; + font-size: 25px; + font-family: titlefont; + color: white; + z-index: 999; + } + } + + .otherInfo { + .otherInfoItem { + table { + position: relative; .uploadDivbox { width: 100%; height: 80px; @@ -161,41 +204,32 @@ } } } - - .itemname { - width: 120px; - text-align: right; - box-sizing: border-box; - padding-right: 12px; - } - - .deleteTr { + .deleteTable { position: absolute; - right: 5px; - top: 5px; - cursor: pointer; + right: 2px; + top: 2px; + z-index: 100; + i { + color: #fff; + font-size: 18px; + cursor: pointer; + } } - - } } - .shade { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - background-color: rgba(77, 80, 83, 0.3); - display: flex; - justify-content: center; - align-items: center; - font-size: 25px; - font-family: titlefont; - color: white; + .moduleName { + span { + color: #23D9FF; + margin-right: 6px; + } + + margin-bottom: 12px; } } + + .btnbox { height: 36px; line-height: 36px; @@ -212,7 +246,7 @@ color: #91CCFF; } - button{ + button { margin-left: 16px; } } @@ -224,12 +258,13 @@ right: 66px; top: 22px; - button { - width: 64px; - height: 32px; - background: rgba(0, 129, 255, 0.3); - border: 1px solid #36A2FF; - border-radius: 0px; - color: #91CCFF; - } +} + +.buleBtn { + width: 64px; + height: 32px; + background: rgba(0, 129, 255, 0.3); + border: 1px solid #36A2FF; + border-radius: 0px; + color: #91CCFF; } diff --git a/src/app/pages/oil-station-info/oil-station-info.component.ts b/src/app/pages/oil-station-info/oil-station-info.component.ts index 9227768..feac988 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.ts +++ b/src/app/pages/oil-station-info/oil-station-info.component.ts @@ -88,6 +88,9 @@ export class OilStationInfoComponent implements OnInit { this.fireBrigade = data.result.govUnitDetail.fireBrigade } + if (this.httpBody.otherData) { + this.otherInfoData = JSON.parse(this.httpBody.otherData) + } console.log('油站信息', this.httpBody) }, err => { @@ -139,8 +142,8 @@ export class OilStationInfoComponent implements OnInit { stationName: JSON.parse(sessionStorage.getItem('userdata')).organization.displayName, organizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, auditLog: { - auditStatusDesc:null, - rejectReason:null + auditStatusDesc: null, + rejectReason: null }, auditStatus: null, openTime: '', @@ -160,19 +163,119 @@ export class OilStationInfoComponent implements OnInit { hospital: {}, fireBrigade: {} }, + hasBuildingInfo: true, businessLicenseImage: '', dangerousChemicalLicenseImage: '', gasSellLicenseImage: '', licenses: [ + ], + otherData: null + } + + + otherInfoData = { + oilingMachine: [ + { name: '', brand: '', oilGunNum: '', oilsArticleNum: '', oilGunSerialNum: '' } + ], + tankEquipment: [ + { name: '', oilsArticleNum: '', oilGunSerialNum: '', oilOmeterVolume: '', safetyVolume: '', oilOmeterType: 0, oilPumpType: 0 } + ], + oilDeliveryPipe: [ + { name: '', connectTanker: '', connectOilTank: '', designPaper: '' } + ], + oilVaporRecovery: [ + { name: '', onceSystemType: '', twiceSystemType: 0, twicePumpType: '', thriceProcessingUnit: '', monitoringDevice: '', designPaper: '' } + ], + valve: [ + { name: '', description: '' } ] } - perpetualChange(item, $event) { - if ($event) { - item.endTime = '9999-01-01' + + + addTable(tableData, type) { + if (type == 'oilingMachine') { + tableData.push({ name: '', brand: '', oilGunNum: '', oilsArticleNum: '', oilGunSerialNum: '' }) + } + if (type == 'tankEquipment') { + tableData.push({ name: '', oilsArticleNum: '', oilGunSerialNum: '', oilOmeterVolume: '', safetyVolume: '', oilOmeterType: 0, oilPumpType: 0 }) } + if (type == 'oilDeliveryPipe') { + tableData.push({ name: '', connectTanker: '', connectOilTank: '', designPaper: '' }) + } + } + deleteTable(tableData, key) { + tableData.splice(key, 1) } + + uploadType: string + isUploadLoading = false + filechange(e, type, item) { + this.isUploadLoading = true + let file = e.target.files[0] || null //获取上传的文件 + this.uploadType = type + this.openFileSelect(file, `stationPhotos/${this.userdata.organization.id}/`, item) + } + //设置文件路径并上传 + postFilePath + async openFileSelect(file: File, extensionPath: string, item) { + this.postFilePath = extensionPath; + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传 + if (fileSize >= shardSize) // 超过5MB要分块上传 + { + await this.postFileByMul(file, item); + } + else //普通上传 + { + await this.postFile(file, item); + } + } + //上传文件 + async postFile(file: File, item) { + 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; + item.designPaper = filePath + this.isUploadLoading = false + resolve('success') + }); + }) + } + /** + * 分块上传 + * @param file + */ + postFileByMul(file: File, item) { + this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => { + let dataObj = value as any; + item.designPaper = dataObj.filePath + this.isUploadLoading = false + }); + } + + + //查看图片 + 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); + } goback() { this.router.navigate(['/todaywarning/petrolStation']) } @@ -189,8 +292,11 @@ export class OilStationInfoComponent implements OnInit { let body = JSON.parse(JSON.stringify(this.httpBody)) body.stationType body.govUnitDetail = JSON.stringify(this.httpBody.govUnitDetail) - console.log(body) + if (!body.hasBuildingInfo) { + body.otherData = JSON.stringify(this.otherInfoData) + } + // console.log(body) body.licenses.forEach(item => { delete item.isPerpetual }) @@ -201,6 +307,7 @@ export class OilStationInfoComponent implements OnInit { this.isLoadingSave = false this.message.create('success', '保存成功!'); }, err => { + reject(err) this.isLoadingSave = false this.message.create('error', '保存失败!'); }) @@ -209,7 +316,6 @@ export class OilStationInfoComponent implements OnInit { this.message.create('warning', '请填写完整!'); return false } - } @@ -218,17 +324,20 @@ export class OilStationInfoComponent implements OnInit { await this.submitForm() - let params = { - id: this.httpBody.id + if (this.validateForm.valid) { + let params = { + id: this.httpBody.id + } + this.http.post('/api/services/app/GasStation/Commit', null, { params: params }).subscribe((data: any) => { + this.isSubmitAuditLoading = false + this.getInfo() + this.message.create('success', '提交审核成功!'); + }, err => { + this.isSubmitAuditLoading = false + this.message.create('error', '提交审核失败!'); + }) } - this.http.post('/api/services/app/GasStation/Commit', null, { params: params }).subscribe((data: any) => { - this.isSubmitAuditLoading = false - this.getInfo() - this.message.create('success', '提交审核成功!'); - }, err => { - this.isSubmitAuditLoading = false - this.message.create('error', '提交审核失败!'); - }) + } isRevocationAuditLoading: boolean = false diff --git a/src/theme.less b/src/theme.less index 5822154..6df522d 100644 --- a/src/theme.less +++ b/src/theme.less @@ -11,7 +11,7 @@ } .yellowColor { - color: #FFBD4B; + color: #FFBD4B!important; } .greenColor {