11e2d0c5 by zhaoqian

已办箱功能

1 parent f6a1dfe4
......@@ -115,3 +115,18 @@ export function booleanWorkflow(data) {
})
}
/**
* 获取工作流大纲
*/
export function getProcessOutlineByYbx(data) {
return request({
url: '/workflow/getProcessOutline',
method: 'get',
params: {
processInstanceId:data,
isCurrent:false
}
})
}
......
......@@ -54,6 +54,7 @@ const store = new Vuex.Store({
oldZdbsm:'',
newZdbsm:'',
isWorkFlow:false, // 判断是否工作流数据
lcgzShow:false,//是否待办箱的数据,显示流程追踪
},
modules: {
user,
......
......@@ -181,7 +181,10 @@ export default {
}else if(newPath == '/zrz' || newPath == '/zd' || newPath == '/dz'){
booleanWorkflow(this.$route.query.ywbsm).then(res=>{
this.$store.state.isWorkFlow = res.result;
})
});
if(typeof this.$route.query.processInstanceId !== 'undefined'){
this.$store.state.lcgzShow = true;
}
}
},
"$store.state.treeData":function (val) {
......
......@@ -115,14 +115,14 @@
<script>
import { Chart, registerShape } from '@antv/g2';
import {getDbxList} from "@api/dbx";
import {getDbxList,getYbxList} from "@api/dbx";
export default {
components:{},
data() {
return {
workList: [
{ name: "待办箱", img: require("@assets/images/dbx.png"),count:0,path:'/dbx' },
{ name: "退件箱", img: require("@assets/images/tjx.png"),count:0,path:'ybx' },
{ name: "已办箱", img: require("@assets/images/tjx.png"),count:0,path:'ybx' },
],
list: [
{ name: "宗地分割", img: require("@assets/images/zdfg.png"),path:'change',oLevel:'fg',tLevel:'zd'},
......@@ -182,6 +182,7 @@ export default {
this.imgHeight = this.$refs.enterBox.offsetHeight - 10
});
this.getDbxCount();
this.getYbxCount();
this.initG2qllx();
this.initG2tdfwtj();
this.initG2xntjid();
......@@ -248,6 +249,23 @@ export default {
}
})
},
getYbxCount(){
let data = {
page:0,
size:20,
current:false,
currentUser:true,
createDateStart:"",
createDateEnd:""
}
getYbxList(data).then((res)=>{
this.workList.forEach((item,index)=>{
if(item.name === '已办箱'){
item.count = res.totalElements;
}
})
})
},
initG2qllx(){
const data = [
{ item: '国有建设用地使用权', count: 40, percent: 0.4 },
......
......@@ -170,10 +170,10 @@
path: path,
query: {
bsm: data.glbsm,
ywbsm: data.businessId,
ywbsm: data.glbsm,
source: 2,
auth: '0,1,2',
workitemInstanceId:data.id
processInstanceId:row.id
}
});
......
......@@ -15,7 +15,7 @@
<el-tab-pane label="附件材料" name="fjcl">
<fjcl v-if="fjclVisible" ref="fjcl" :is-disabled="isDisabled"></fjcl>
</el-tab-pane>
<el-tab-pane label="流程跟踪" name="lcgz" v-if="$store.state.isWorkFlow" lazy>
<el-tab-pane label="流程跟踪" name="lcgz" v-if="$store.state.isWorkFlow || $store.state.lcgzShow" lazy>
<lcgz ref="lcgz" ></lcgz>
</el-tab-pane>
</el-tabs>
......
......@@ -26,7 +26,7 @@
<span>创建人</span>
<span>{{lcInfo.processInstance.creatorName}}</span>
</li>
<li>
<li v-if="lcInfo.workitemInstance">
<span>流程阶段</span>
<span>{{lcInfo.workitemInstance.nodeName}}</span>
</li>
......@@ -34,7 +34,7 @@
<span>流程状态</span>
<span>{{lcInfo.processInstance.state}}</span>
</li>
<li>
<li v-if="lcInfo.workitemInstance">
<span>当前责任人</span>
<span>{{lcInfo.workitemInstance.actorName}}</span>
</li>
......@@ -64,7 +64,7 @@
</template>
<script>
import { getActivityDetail,templateLoad,getProcessOutline } from "@api/user";
import { getActivityDetail,templateLoad,getProcessOutline,getProcessOutlineByYbx } from "@api/user";
import flowNode from "./flownode"
export default {
name: "",
......@@ -81,7 +81,12 @@ export default {
},
created() {},
mounted() {
this.getTemplate();
if(typeof this.$route.query.workitemInstanceId !== 'undefined'){
this.getTemplate();
}else if(typeof this.$route.query.processInstanceId !== 'undefined'){
this.getTemplateByProcessInstanceId();
}
},
methods: {
getTemplate(){
......@@ -122,6 +127,35 @@ export default {
vm.loadingHide();
});
},
getTemplateByProcessInstanceId(){
vm.loadingShow('数据获取中');
getProcessOutlineByYbx(this.$route.query.processInstanceId).then((res) => {
console.log(res.processInstance.templetId);
this.lcInfo = res;
templateLoad(res.processInstance.templetId).then((res1) => {
vm.loadingHide();
console.log(this.$x2js.xml2js(res1).Process,'Process');
this.flowData = this.$x2js.xml2js(res1).Process;
console.log(res1.activityOutlines,'res.activityOutlines');
this.flowState = res.activityOutlines;
this.$nextTick(()=>{
this.flowData.Nodes.ManualNode.push(this.flowData.Nodes.EndNode);
this.flowData.Nodes.ManualNode.unshift(this.flowData.Nodes.StartNode);
this.flowData.Nodes.ManualNode.forEach(item => {
item.activityState = this.flowState.filter( i => i.activityTemplateId == item.id)[0].activityState;
});
this.flowShow = true;
})
})
.catch((error) => {
vm.loadingHide();
});
})
.catch((error) => {
vm.loadingHide();
});
},
//获取当前点击节点名称
getCurNode(name){
console.log(name);
......