From fa0e4d6a9b61b4e5a153d147613ee1133c9c7c71 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 25 Sep 2023 14:42:33 +0800
Subject: [PATCH] Merge branch 'feature_1.0' into qa
---
src/views/list/Unit.vue | 52 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 36 insertions(+), 16 deletions(-)
diff --git a/src/views/list/Unit.vue b/src/views/list/Unit.vue
index 91a2dd4..511d816 100644
--- a/src/views/list/Unit.vue
+++ b/src/views/list/Unit.vue
@@ -350,10 +350,24 @@
}
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() {
@@ -377,7 +391,7 @@
})
}
- private positionLevel(val: any) {
+ private positionLevel(val: any) {
this.serch.areaCode = ''
this.editForm.areaCode = ''
let code =val[val.length-1]
@@ -406,10 +420,11 @@
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);
@@ -430,8 +445,9 @@
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);
@@ -440,15 +456,15 @@
}
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)
@@ -457,10 +473,14 @@
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) {
@@ -525,10 +545,10 @@
<a onClick = {
() => this.handleDetailModalVisible(true, record)
} > ������ </a>
- <a-divider type = 'vertical' / >
</div>
}
- }
+ }
+ this.handleSearch();
}
}
--
Gitblit v1.8.0