更正:列表点击办理,增加二次提醒:是否确定更正该宗地\自然幢\多幢
Showing
1 changed file
with
44 additions
and
27 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}; |
| 142 | updateQsztByBsm(data) | 145 | this.$confirm('是否确定更正该'+name+'?', '提示', { |
| 143 | .then((res => { | 146 | confirmButtonText: '确定', |
| 144 | if (res.code == 200) { | 147 | cancelButtonText: '取消', |
| 145 | this.$message({ | 148 | type: 'warning' |
| 146 | message: res.message, | 149 | }).then(() => { |
| 147 | type: "success", | 150 | updateQsztByBsm(data) |
| 148 | }); | 151 | .then((res => { |
| 149 | } else { | 152 | if (res.code == 200) { |
| 153 | this.$message({ | ||
| 154 | type: 'success', | ||
| 155 | message: '更正成功!' | ||
| 156 | }); | ||
| 157 | this.$router.push("/"+path); | ||
| 158 | } else { | ||
| 159 | this.$message({ | ||
| 160 | message: res.message, | ||
| 161 | type: "warning", | ||
| 162 | }); | ||
| 163 | } | ||
| 164 | })).catch(() => { | ||
| 150 | this.$message({ | 165 | this.$message({ |
| 151 | message: res.message, | 166 | message: res.message, |
| 152 | type: "warning", | 167 | type: "error", |
| 153 | }); | 168 | }); |
| 154 | } | 169 | }); |
| 155 | })) | 170 | |
| 156 | this.$router.push(path); | 171 | }).catch(() => { |
| 172 | |||
| 173 | }); | ||
| 157 | }, | 174 | }, |
| 158 | }, | 175 | }, |
| 159 | computed: {}, | 176 | computed: {}, | ... | ... |
-
Please register or sign in to post a comment