9b86fc6a by zhaoqian

宗地分割,添加工作流

1 parent c075fdae
......@@ -319,3 +319,18 @@ export function updateFldc(data) {
data:data
})
}
/**
*根据宗地标识码获取权籍_集体土地所有权宗地分类面积调查记录
* @param zdbsm
*/
export function getZdbsms(zdBsm) {
return request({
url:'/bg/zdSplitMerge/getZdbsms',
method:'get',
params:{
zdBsm
}
})
}
\ No newline at end of file
......
......@@ -264,13 +264,20 @@ export default {
break;
}
if(item.type == 'zd' ||item.type == 'dz' ||item.type == 'zrz'||item.type == 'gzw'){
this.$router.push({
path: '/'+item.type,
query:{
let data = {
source: 2,
bsm:item.bsm,
auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
};
if(this.$route.query.workitemInstanceId){
data.workitemInstanceId = this.$route.query.workitemInstanceId;
}
if(this.$route.query.ywbsm){
data.ywbsm = this.$route.query.ywbsm;
}
this.$router.push({
path: '/'+item.type,
query:data
});
}
},
......
......@@ -264,7 +264,11 @@ export default {
if(this.$route.path == '/zrz'){
this.getTreeByBsm(this.$store.state.zrzbsm,'zrz',this.$route.query.auth)
}else if(this.$route.path == '/zd'){
if(this.$route.query.source === 'bsms'){
this.getTreeByS(this.$store.state.zdbsms);
}else {
this.getRightTree(this.$store.state.zdbsm,'0,1,2')
}
}else if(this.$route.path == '/dz'){
this.getTreeByBsm(this.$store.state.dzbsm,'dz',this.$route.query.auth)
}else if(this.$route.path == '/gzw'){
......
......@@ -57,10 +57,11 @@
<script>
import SearchHead from "@components/searchHead/searchHead";
import {getDbxList} from "@api/dbx";
import {getZdbsms} from '@api/zd'
export default {
name: "",
inject:['getRightTree','getTreeByBsm','getTreeList'],
inject:['getRightTree','getTreeByBsm','getTreeList','getTreeByS'],
components: {SearchHead},
props: {},
data() {
......@@ -123,22 +124,44 @@
//点击办理
handleClick(row) {
let path = "";
let data ={
bsm: row.glbsm,
ywbsm: row.businessId,
source: "2",
auth: '0,1,2',
workitemInstanceId:row.id
};
this.$store.state.oldZdbsm = '';
switch (row.dylx) {
case "zrz":
this.$store.state.zrzbsm = row.glbsm;
this.getTreeByBsm(row.glbsm,row.dylx,'0,1,2');
path = "/zrz";
this.gotoDetailPage(path,data);
break;
case "zd":
this.$store.state.zdbsm = row.glbsm;
if(row.templetName === '分割宗地'){
data.source = 'bsms';
getZdbsms(row.glbsm).then((res)=>{
if(res.code === 200){
this.$store.state.zdbsms = res.result;
this.getTreeByS(res.result);
}
})
}else {
this.getRightTree(row.glbsm,'0,1,2');
}
path = "/zd";
this.$nextTick(()=>{
this.gotoDetailPage(path,data);
})
break;
case "dz":
this.$store.state.dzbsm = row.glbsm;
this.getTreeByBsm(row.glbsm,row.dylx,'0,1,2');
path = "/dz";
this.gotoDetailPage(path,data);
break;
case "h":
case "h0":
......@@ -146,31 +169,35 @@
path="/h";
this.$store.state.hbsm=row.glbsm
this.getTreeByBsm(row.glbsm,'h','0,1,2');
this.gotoDetailPage(path,data);
break;
case "gzw":
this.$store.state.gzwbsm = row.glbsm;
this.getTreeByBsm(row.glbsm,"gzw",'0,1,2');
this.gotoDetailPage(path,data);
path = "/gzw";
break;
case "lq":
// this.$store.state.zrzbsm = row.glbsm;
this.getTreeByBsm(row.glbsm,row.dylx,'0,1,2');
this.gotoDetailPage(path,data);
path = "/lq";
break;
default:
break;
}
},
gotoDetailPage(path,data){
this.$router.push({
path: path,
query: {
bsm: row.glbsm,
ywbsm: row.businessId,
source: 2,
auth: '0,1,2',
workitemInstanceId:row.id
}
query: data
});
},
//定位
//图形定位
postionToMap(rowData){
......
......@@ -305,13 +305,14 @@
getListByPbsm,
getDdicByMC
} from "@api/common";
import {getQjZdjbxxDetailById, zdfg, getZrz} from '@api/zd'
import {getQjZdjbxxDetailById, zdfg, getZrz,getZdbsms} from '@api/zd'
import {getZdxx, ZdfggetZxx,dzfgGetZrzxx,saveDzFg} from '@api/dz'
import {getHZdxx} from '@api/h'
import zdQueryData from '@components/zdQueryData/zdQueryData'
import dzQueryData from '@components/dzQueryData/dzQueryData'
import {Message} from 'element-ui'
import hfghb from '../hfghb/index'
import { createProcessInstance } from "@api/user";
export default {
name: "",
......@@ -368,11 +369,15 @@
},
zdFghData: {
oldZdbsm: "",
newZdlist: []
newZdlist: [],
type:"zd",
ywlx:"change"
},
dzFghData: {
olddzbsm: "",
fwlist: []
fwlist: [],
type:"dz",
ywlx:"change"
},
hFghData: {
oldZdbsm: "",
......@@ -449,19 +454,25 @@
case "zd":
this.zdFghData = {
oldZdbsm: "",
newZdlist: []
newZdlist: [],
type:"zd",
ywlx:"change"
}
break
case "dz":
this.dzFghData = {
olddzbsm: "",
fwlist: []
fwlist: [],
type:"dz",
ywlx:"change"
}
break
case "h":
this.hFghData = {
oldZdbsm: "",
newZdlist: []
newZdlist: [],
type:"h",
ywlx:"change"
}
break;
default:
......@@ -609,26 +620,61 @@
if(this.tempBsmList.length === (this.zdZxx.dzList.length + this.zdZxx.zrzList.length)){
if (this.zdFghData.newZdlist.every(i => i.xmmc != '')) {
vm.loadingShow('正在保存中');
zdfg(this.zdFghData).then(res => {
let data = {
params:this.zdFghData,
workflowName:'分割宗地'
}
// zdfg(this.zdFghData).then(res => {
// vm.loadingHide()
// if (res.success) {
// this.$store.state.zdbsms = res.result;
// //更新目录树
// this.getTreeByS(res.result);
// this.$router.push({
// path: '/zd',
// query: {
// bsm: res.result[0],
// source: 3, //分割标识
// }
// });
// } else {
// Message.error("保存失败")
// }
// }).catch((error)=>{
// vm.loadingHide();
// console.log(error);
// })
createProcessInstance(data)
.then((res) => {
vm.loadingHide()
if (res.success) {
this.$store.state.zdbsms = res.result;
//更新目录树
this.getTreeByS(res.result);
if (res.needShow) {
//res.processInstance.title; 宗地标识码
getZdbsms(res.processInstance.title).then((res1)=>{
if(res1.code === 200){
this.$store.state.zdbsms = res1.result;
this.getTreeByS(res1.result);
this.$router.push({
path: '/zd',
query: {
bsm: res.result[0],
bsm: res1.result[0],
source: 3, //分割标识
ywbsm:res.processInstance.businessId,
workitemInstanceId:res.workitemInstance.id
}
});
}
});
} else {
Message.error("保存失败")
}
}).catch((error)=>{
}).catch((error) => {
vm.loadingHide();
console.log(error);
})
});
}else{
Message.warning("请完善分割后的宗地项目名称后重试")
}
......
......@@ -48,10 +48,11 @@
<script>
import SearchHeadYbx from "@components/searchHead/searchHeadYbx";
import {getYbxList,queryByBusinessId} from "@api/dbx";
import {getZdbsms} from '@api/zd';
export default {
name: "",
inject:['getRightTree','getTreeByBsm'],
inject:['getRightTree','getTreeByBsm','getTreeByS'],
components: {SearchHeadYbx},
props: {},
data() {
......@@ -134,21 +135,41 @@
console.log(data);
let path = "";
let params ={
bsm: data.glbsm,
ywbsm: data.glbsm,
source: 2,
auth: '0,1,2',
processInstanceId:row.id
};
this.$store.state.oldZdbsm = '';
switch (data.dylx) {
case "zrz":
this.$store.state.zrzbsm = data.glbsm;
this.getTreeByBsm(data.glbsm,data.dylx,'0,1,2');
path = "/zrz";
this.gotoDetailPage(path,params);
break;
case "zd":
this.$store.state.zdbsm = data.glbsm;
this.getRightTree(data.glbsm,'0,1,2');
path = "/zd";
if(row.templetName === '分割宗地'){
params.source = 'bsms';
getZdbsms(data.glbsm).then((response)=>{
if(response.code === 200){
this.$store.state.zdbsms = response.result;
this.getTreeByS(response.result);
}
})
}else {
this.getRightTree(row.glbsm,'0,1,2');
}
this.gotoDetailPage(path,params);
break;
case "dz":
this.$store.state.dzbsm = data.glbsm;
this.getTreeByBsm(data.glbsm,data.dylx,'0,1,2');
this.gotoDetailPage(path,params);
path = "/dz";
break;
case "h":
......@@ -157,31 +178,31 @@
path="/h";
this.$store.state.hbsm=data.glbsm
this.getTreeByBsm(data.glbsm,'h','0,1,2');
this.gotoDetailPage(path,params);
break;
case "gzw":
this.$store.state.gzwbsm = data.glbsm;
this.getTreeByBsm(data.glbsm,"gzw",'0,1,2');
path = "/gzw";
this.gotoDetailPage(path,params);
break;
default:
break;
}
this.$router.push({
path: path,
query: {
bsm: data.glbsm,
ywbsm: data.glbsm,
source: 2,
auth: '0,1,2',
processInstanceId:row.id
}
});
}
})
},
gotoDetailPage(path,data){
this.$router.push({
path: path,
query: data
});
},
//定位
//图形定位
postionToMap(rowData){
......
......@@ -149,6 +149,7 @@
},
uploadSuccess(res, file, fileList) {
this.$message.success("上传成功")
vm.loadingHide();
this.getFileList();
},
handleRemove(file, fileList) {
......