更正:列表点击办理,增加二次提醒:是否确定更正该宗地\自然幢\多幢
Showing
1 changed file
with
36 additions
and
19 deletions
... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
12 | <el-table-column label="操作" width="100"> | 12 | <el-table-column label="操作" width="100"> |
13 | <template slot-scope="scope"> | 13 | <template slot-scope="scope"> |
14 | <el-button @click="handleClick(scope.row)" type="text" size="small" | 14 | <el-button @click="handleClick(scope.row)" type="text" size="small" |
15 | >办理 | 15 | >更正 |
16 | </el-button | 16 | </el-button |
17 | > | 17 | > |
18 | <el-button type="text" size="small">定位</el-button> | 18 | <el-button type="text" size="small">定位</el-button> |
... | @@ -116,44 +116,61 @@ | ... | @@ -116,44 +116,61 @@ |
116 | }, | 116 | }, |
117 | //点击办理 | 117 | //点击办理 |
118 | handleClick(row) { | 118 | handleClick(row) { |
119 | console.log(row); | 119 | let type;name; |
120 | let path = ""; | ||
121 | var type; | ||
122 | var id = row.bsm; | ||
123 | switch (row.dylx) { | 120 | switch (row.dylx) { |
124 | case "自然幢": | ||
125 | path = "/zrz"; | ||
126 | type = "1"; | ||
127 | this.$store.state.zrzbsm = row.glbsm; | ||
128 | break; | ||
129 | case "zd": | 121 | case "zd": |
130 | path = "/zd"; | ||
131 | type = "0"; | 122 | type = "0"; |
123 | name = '宗地'; | ||
132 | this.$store.state.zdbsm = row.glbsm | 124 | this.$store.state.zdbsm = row.glbsm |
133 | break; | 125 | break; |
134 | case "户": | 126 | case "zrz": |
135 | path = "h"; | 127 | type = "1"; |
136 | this.$store.state.hbsm = row.glbsm | 128 | name = '自然幢'; |
129 | this.$store.state.zrzbsm = row.glbsm; | ||
130 | break; | ||
131 | case "h": | ||
132 | case "h0": | ||
133 | case "h1": | ||
137 | type = "2"; | 134 | type = "2"; |
135 | name = "户" | ||
136 | this.$store.state.hbsm = row.glbsm; | ||
137 | case "dz": | ||
138 | type = "3"; | ||
139 | name = "多幢"; | ||
140 | this.$store.state.dzbsm = row.glbsm; | ||
138 | default: | 141 | default: |
139 | break; | 142 | break; |
140 | } | 143 | } |
141 | var data = {"id": id, "type": type}; | 144 | let data = {"id": row.bsm, "type": type}; |
145 | this.$confirm('是否确定更正该'+name+'?', '提示', { | ||
146 | confirmButtonText: '确定', | ||
147 | cancelButtonText: '取消', | ||
148 | type: 'warning' | ||
149 | }).then(() => { | ||
142 | updateQsztByBsm(data) | 150 | updateQsztByBsm(data) |
143 | .then((res => { | 151 | .then((res => { |
144 | if (res.code == 200) { | 152 | if (res.code == 200) { |
145 | this.$message({ | 153 | this.$message({ |
146 | message: res.message, | 154 | type: 'success', |
147 | type: "success", | 155 | message: '更正成功!' |
148 | }); | 156 | }); |
157 | this.$router.push("/"+path); | ||
149 | } else { | 158 | } else { |
150 | this.$message({ | 159 | this.$message({ |
151 | message: res.message, | 160 | message: res.message, |
152 | type: "warning", | 161 | type: "warning", |
153 | }); | 162 | }); |
154 | } | 163 | } |
155 | })) | 164 | })).catch(() => { |
156 | this.$router.push(path); | 165 | this.$message({ |
166 | message: res.message, | ||
167 | type: "error", | ||
168 | }); | ||
169 | }); | ||
170 | |||
171 | }).catch(() => { | ||
172 | |||
173 | }); | ||
157 | }, | 174 | }, |
158 | }, | 175 | }, |
159 | computed: {}, | 176 | computed: {}, | ... | ... |
-
Please register or sign in to post a comment