|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private handleCreateModalCancel(): any { | 
|---|
|  |  |  | this.visibleCreateModal = false; | 
|---|
|  |  |  | this.visibleCreateModal = false; | 
|---|
|  |  |  | this.editForm = { | 
|---|
|  |  |  | unitName:'', | 
|---|
|  |  |  | parentCode: [], | 
|---|
|  |  |  | areaCode:'', | 
|---|
|  |  |  | state: Number, | 
|---|
|  |  |  | parentCodeList:[] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private handleInvalidityModalCancel(): any { | 
|---|
|  |  |  | this.visibleInvalidityModal = false; | 
|---|
|  |  |  | private handleInvalidityModalCancel(): any { | 
|---|
|  |  |  | this.editForm = { | 
|---|
|  |  |  | unitName:'', | 
|---|
|  |  |  | parentCode: [], | 
|---|
|  |  |  | areaCode:'', | 
|---|
|  |  |  | state: Number, | 
|---|
|  |  |  | parentCodeList:[] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.visibleInvalidityModal = false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private cityData() { | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private positionLevel(val: any) { | 
|---|
|  |  |  | private  positionLevel(val: any) { | 
|---|
|  |  |  | this.serch.areaCode = '' | 
|---|
|  |  |  | this.editForm.areaCode = '' | 
|---|
|  |  |  | let code =val[val.length-1] | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private handleAssert(record: any){ | 
|---|
|  |  |  | get("unit/state",{ | 
|---|
|  |  |  | id: record.unitId, | 
|---|
|  |  |  | unitId: record.unitId, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | <a-alert message="生效成功" type="success" /> | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.handleSearch() | 
|---|
|  |  |  | this.$message.success('操作成功') | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(err=>{ | 
|---|
|  |  |  | console.log(err); | 
|---|
|  |  |  | 
|---|
|  |  |  | unitId: this.recordTableData.unitId, | 
|---|
|  |  |  | invalidReason:this.createForm.getFieldValue('code') | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | <a-alert message="已作废" type="success" /> | 
|---|
|  |  |  | this.visibleInvalidityModal=false | 
|---|
|  |  |  | this.$message.success('操作成功') | 
|---|
|  |  |  | this.visibleInvalidityModal = false | 
|---|
|  |  |  | this.handleSearch() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(err=>{ | 
|---|
|  |  |  | console.log(err); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private progressStateRender(text: string) { | 
|---|
|  |  |  | if (text === 0) { | 
|---|
|  |  |  | if (text === '0') { | 
|---|
|  |  |  | return <a-badge status = 'success' text = '生效' />; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return <a-badge status = 'processing' text = '未生效' />; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private handleUpdateModalVisible(visible: boolean, record: any): void { | 
|---|
|  |  |  | private async handleUpdateModalVisible(visible: boolean, record: any): void { | 
|---|
|  |  |  | this.visibleCreateModal = true; | 
|---|
|  |  |  | this.positionLevel(record.parentCodeList) | 
|---|
|  |  |  | await this.positionLevel(record.parentCodeList) | 
|---|
|  |  |  | this.title = '编辑责任单位' | 
|---|
|  |  |  | let params = _.cloneDeep(record) | 
|---|
|  |  |  | console.log(params) | 
|---|
|  |  |  | 
|---|
|  |  |  | this.pageState='edit' | 
|---|
|  |  |  | console.log('editForm',record) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private handleDetailModalVisible(visible: boolean, record: any): void { | 
|---|
|  |  |  | private async handleDetailModalVisible(visible: boolean, record: any): void { | 
|---|
|  |  |  | this.visibleCreateModal = true; | 
|---|
|  |  |  | await this.positionLevel(record.parentCodeList) | 
|---|
|  |  |  | this.title = '责任单位详情' | 
|---|
|  |  |  | this.editForm = record | 
|---|
|  |  |  | let params = _.cloneDeep(record) | 
|---|
|  |  |  | console.log(params) | 
|---|
|  |  |  | params.parentCode=record.parentCodeList | 
|---|
|  |  |  | this.editForm = params | 
|---|
|  |  |  | this.pageState='view' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private opRender(text: string, record: any, index: number) { | 
|---|
|  |  |  | 
|---|
|  |  |  | <a onClick = { | 
|---|
|  |  |  | () => this.handleDetailModalVisible(true, record) | 
|---|
|  |  |  | } > 详情 </a> | 
|---|
|  |  |  | <a-divider type = 'vertical'  / > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.handleSearch(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|