更正宗地,自然幢,多幢添加工作流机制
Showing
1 changed file
with
66 additions
and
1 deletions
| ... | @@ -67,6 +67,7 @@ | ... | @@ -67,6 +67,7 @@ |
| 67 | import SearchHead from "@components/searchHead/searchHead"; | 67 | import SearchHead from "@components/searchHead/searchHead"; |
| 68 | import {getSearchList} from "@api/search"; | 68 | import {getSearchList} from "@api/search"; |
| 69 | import {updateQsztByBsm} from "@api/common"; | 69 | import {updateQsztByBsm} from "@api/common"; |
| 70 | import { createProcessInstance } from "@api/user"; | ||
| 70 | 71 | ||
| 71 | export default { | 72 | export default { |
| 72 | name: "", | 73 | name: "", |
| ... | @@ -137,16 +138,19 @@ | ... | @@ -137,16 +138,19 @@ |
| 137 | handleClick(row) { | 138 | handleClick(row) { |
| 138 | let type;name; | 139 | let type;name; |
| 139 | let path = ""; | 140 | let path = ""; |
| 141 | let workflowName=""; | ||
| 140 | switch (row.dylx) { | 142 | switch (row.dylx) { |
| 141 | case "zd": | 143 | case "zd": |
| 142 | type = "zd"; | 144 | type = "zd"; |
| 143 | name = '宗地'; | 145 | name = '宗地'; |
| 144 | path = "/zd"; | 146 | path = "/zd"; |
| 147 | workflowName = "更正宗地"; | ||
| 145 | break; | 148 | break; |
| 146 | case "zrz": | 149 | case "zrz": |
| 147 | type = "zrz"; | 150 | type = "zrz"; |
| 148 | name = '自然幢'; | 151 | name = '自然幢'; |
| 149 | path = "/zrz"; | 152 | path = "/zrz"; |
| 153 | workflowName = "更正自然幢"; | ||
| 150 | break; | 154 | break; |
| 151 | case "h": | 155 | case "h": |
| 152 | case "h0": | 156 | case "h0": |
| ... | @@ -154,28 +158,36 @@ | ... | @@ -154,28 +158,36 @@ |
| 154 | type = "h"; | 158 | type = "h"; |
| 155 | name = "户" | 159 | name = "户" |
| 156 | path = "/h"; | 160 | path = "/h"; |
| 161 | workflowName = "更正户"; | ||
| 157 | break; | 162 | break; |
| 158 | case "dz": | 163 | case "dz": |
| 159 | type = "dz"; | 164 | type = "dz"; |
| 160 | name = "多幢"; | 165 | name = "多幢"; |
| 161 | path = "/dz"; | 166 | path = "/dz"; |
| 167 | workflowName = "更正多幢"; | ||
| 162 | break; | 168 | break; |
| 163 | case "gzw": | 169 | case "gzw": |
| 164 | type = "gzw"; | 170 | type = "gzw"; |
| 165 | name = "构筑物"; | 171 | name = "构筑物"; |
| 166 | path = "/gzw"; | 172 | path = "/gzw"; |
| 173 | workflowName = "更正构筑物"; | ||
| 167 | break; | 174 | break; |
| 168 | 175 | ||
| 169 | default: | 176 | default: |
| 170 | break; | 177 | break; |
| 171 | } | 178 | } |
| 172 | let data = {"id": row.bsm, "type": type}; | 179 | let data = {"id": row.bsm, "type": type,"ywlx":"modify"}; |
| 180 | let wfdata = { | ||
| 181 | params:data, | ||
| 182 | workflowName:workflowName | ||
| 183 | }; | ||
| 173 | this.$nextTick(()=>{ | 184 | this.$nextTick(()=>{ |
| 174 | this.$confirm('确定更正该'+name+'吗?', '提示', { | 185 | this.$confirm('确定更正该'+name+'吗?', '提示', { |
| 175 | confirmButtonText: '确定', | 186 | confirmButtonText: '确定', |
| 176 | cancelButtonText: '取消', | 187 | cancelButtonText: '取消', |
| 177 | type: 'warning' | 188 | type: 'warning' |
| 178 | }).then(() => { | 189 | }).then(() => { |
| 190 | if(row.dylx === 'h' ||row.dylx === 'h0' ||row.dylx === 'h1' ||row.dylx === 'gzw'){ | ||
| 179 | updateQsztByBsm(data) | 191 | updateQsztByBsm(data) |
| 180 | .then((res => { | 192 | .then((res => { |
| 181 | if (res.code == 200) { | 193 | if (res.code == 200) { |
| ... | @@ -231,6 +243,59 @@ | ... | @@ -231,6 +243,59 @@ |
| 231 | type: "error", | 243 | type: "error", |
| 232 | }); | 244 | }); |
| 233 | }); | 245 | }); |
| 246 | } else { | ||
| 247 | createProcessInstance(wfdata) | ||
| 248 | .then((res) => { | ||
| 249 | console.log(res); | ||
| 250 | if (res.needShow) { | ||
| 251 | this.$store.state.oldZdbsm = ''; | ||
| 252 | switch (row.dylx) { | ||
| 253 | case "zd": | ||
| 254 | this.$store.state.zdbsm = res.processInstance.title; | ||
| 255 | this.getRightTree(res.result,'0,1,2'); | ||
| 256 | break; | ||
| 257 | case "zrz": | ||
| 258 | this.$store.state.zrzbsm = res.processInstance.title; | ||
| 259 | this.getTreeByBsm(res.result,row.dylx,'0,1,2'); | ||
| 260 | break; | ||
| 261 | case "h": | ||
| 262 | case "h0": | ||
| 263 | case "h1": | ||
| 264 | this.$store.state.hbsm = res.processInstance.title; | ||
| 265 | this.getTreeByBsm(res.result,'h','0,1,2'); | ||
| 266 | break; | ||
| 267 | case "dz": | ||
| 268 | this.$store.state.dzbsm = res.processInstance.title; | ||
| 269 | this.getTreeByBsm(res.result,row.dylx,'0,1,2'); | ||
| 270 | break; | ||
| 271 | case "gzw": | ||
| 272 | this.$store.state.dzbsm = res.processInstance.title; | ||
| 273 | this.getTreeByBsm(res.result,row.dylx,'0,1,2'); | ||
| 274 | break; | ||
| 275 | |||
| 276 | default: | ||
| 277 | break; | ||
| 278 | } | ||
| 279 | this.$message({ | ||
| 280 | type: 'success', | ||
| 281 | message: '更正成功!' | ||
| 282 | }); | ||
| 283 | this.$router.push({ | ||
| 284 | path: path, | ||
| 285 | query: { | ||
| 286 | bsm: res.processInstance.title, | ||
| 287 | source: 2, | ||
| 288 | workitemInstanceId:res.workitemInstance.id, | ||
| 289 | auth:'1' | ||
| 290 | } | ||
| 291 | }); | ||
| 292 | } else { | ||
| 293 | this.$message.error("创建失败"); | ||
| 294 | } | ||
| 295 | }) | ||
| 296 | .catch((error) => {}); | ||
| 297 | } | ||
| 298 | |||
| 234 | 299 | ||
| 235 | }).catch(() => { | 300 | }).catch(() => { |
| 236 | 301 | ... | ... |
-
Please register or sign in to post a comment