| | |
| | | <a-cascader |
| | | v-model="editForm.parentCode" |
| | | placeholder="请选择" |
| | | change-on-select |
| | | :options="newParentListOptions" |
| | | @change="positionLevel" |
| | | :disabled="pageState === 'view'" |
| | |
| | | unitName:'', |
| | | parentCode: [], |
| | | areaCode:'', |
| | | state:Number, |
| | | state:'0', |
| | | } |
| | | |
| | | private pagination:any={ |
| | |
| | | page:1, |
| | | size: 20 |
| | | }).then(res=>{ |
| | | this.dataSource =res.data.data.item |
| | | this.dataSource = res.data.data.item |
| | | this.pagination.total = res.data.data.total |
| | | }) |
| | | .catch(err=>{ |
| | | console.log(err); |
| | |
| | | parentCode: code, |
| | | parentCodeList:this.editForm.parentCode, |
| | | areaCode: this.editForm.areaCode, |
| | | state:this.editForm.state |
| | | state:parseInt(this.editForm.state) |
| | | }).then((res: any) => { |
| | | this.handleSearch() |
| | | this.visibleCreateModal = false |
| | |
| | | unitName:'', |
| | | parentCode: [], |
| | | areaCode:'', |
| | | state: Number, |
| | | state: '0', |
| | | parentCodeList:[] |
| | | } |
| | | }).catch((err)=>{ |
| | |
| | | } |
| | | |
| | | private handleCreateModalCancel(): any { |
| | | this.visibleCreateModal = false; |
| | | this.visibleCreateModal = false; |
| | | this.editForm = { |
| | | unitName:'', |
| | | parentCode: [], |
| | | areaCode:'', |
| | | state: '0', |
| | | parentCodeList:[] |
| | | } |
| | | } |
| | | private handleInvalidityModalCancel(): any { |
| | | this.visibleInvalidityModal = false; |
| | | private handleInvalidityModalCancel(): any { |
| | | this.editForm = { |
| | | unitName:'', |
| | | parentCode: [], |
| | | areaCode:'', |
| | | state: '0', |
| | | 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] |
| | |
| | | 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) { |
| | |
| | | console.log('1111',text) |
| | | console.log('2222',record) |
| | | console.log('333', index) |
| | | if (record.state==='1') { |
| | | if (record.isInvalid ===0) { |
| | | if (record.state ==='0') { |
| | | return <div> |
| | | <a onClick = { |
| | | () => this.handleUpdateModalVisible(true, record) |
| | | } > 编辑 </a> |
| | | <a-divider type='vertical' /> |
| | | <a onClick = { |
| | | () => this.handleDetailModalVisible(true, record) |
| | | } > 详情 </a> |
| | | <a-divider type = 'vertical' / > |
| | | <a v-show="record.state !=='1'" onClick={ () => this.handleAssert(record) |
| | | } >生效</a> |
| | | <a-divider type = 'vertical' /> |
| | | <a v-show="record.isInvalid !=='0'" onClick = { |
| | | () => this.handleInvalidity(record) |
| | | } >作废</a> |
| | | </div> |
| | | } else { |
| | | return <div> |
| | | <a onClick = { |
| | | () => this.handleUpdateModalVisible(true, record) |
| | | } > 编辑 </a> |
| | | <a-divider type='vertical' /> |
| | | <a onClick = { |
| | | () => this.handleDetailModalVisible(true, record) |
| | | } > 详情 </a> |
| | | <a-divider type = 'vertical' / > |
| | | <a v-show="record.state !=='1'" onClick={ () => this.handleAssert(record) |
| | | } >生效</a> |
| | | |
| | | </div> |
| | | } |
| | | } else { |
| | | if (record.isInvalid ===0) { |
| | | return <div> |
| | | <a onClick = { |
| | | () => this.handleUpdateModalVisible(true, record) |
| | | } > 编辑 </a> |
| | | <a-divider type='vertical' /> |
| | | <a onClick = { |
| | | () => this.handleDetailModalVisible(true, record) |
| | | } > 详情 </a> |
| | |
| | | </div> |
| | | } else { |
| | | return <div> |
| | | <a onClick = { |
| | | () => this.handleUpdateModalVisible(true, record) |
| | | } > 编辑 </a> |
| | | <a-divider type='vertical' /> |
| | | <a onClick = { |
| | | () => this.handleDetailModalVisible(true, record) |
| | | } > 详情 </a> |
| | | <a-divider type='vertical' /> |
| | | <a onClick = { |
| | | () => this.handleUpdateModalVisible(true, record) |
| | | } > 编辑 </a> |
| | | </div> |
| | | } |
| | | } |
| | | this.handleSearch(); |
| | | } |
| | | |