0e6f741b by 任超

feat:业务申请

1 parent 2219f048
......@@ -2,4 +2,4 @@
<div id="app">
<router-view />
</div>
</template>
</template>
\ No newline at end of file
......
......@@ -25,7 +25,6 @@ router.beforeEach(async (to, from, next) => {
await store.dispatch('user/getUserInfo')
router.addRoutes([...accessRoutes, { path: '*', redirect: '/404', hidden: true }])
const routeTo = Cookies.get('routerTo')
console.log(routeTo)
if (routeTo && routeTo !== '/') {
next({ ...to, replace: true })
} else {
......
......@@ -41,6 +41,14 @@ export const constantRoutes = [
},
// 业务流程只读框架
{
path: '/workFrameViewcs',
component: () => import('@/views/workflow/workFrameView1.vue'),
name: 'workFrameViewcs',
hidden: true,
meta: { title: '发起申请2' }
},
// 业务流程只读框架
{
path: '/workFrameView',
component: () => import('@/views/workflow/workFrameView.vue'),
name: 'workFrameView',
......
......@@ -12,8 +12,7 @@ const getters = {
addDict: state => state.dict.addDict,
dictData: state => state.dict.dictData,
djbxx: state => state.djbxx.djbxx,
// 受理信息
oldDetail: state => state.slxx.oldDetail,
newDetail: state => state.slxx.newDetail
// 流程图转件
transfer: state => state.workflow.transfer
}
export default getters
......
......@@ -5,7 +5,6 @@ import getters from './getters'
Vue.use(Vuex)
// https://webpack.js.org/guides/dependency-management/#requirecontext
const modulesFiles = require.context('./modules', true, /\.js$/)
// you do not need `import app from './modules/app'`
// it will auto require all vuex module from modules file
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
......
const state = {
oldDetail: {},
newDetail: {}
}
const mutations = {
SET_OLDDETAIL: (state, data) => {
state.oldDetail = data
},
SET_NEWDETAIL: (state, data) => {
state.newDetail = data
}
}
const actions = {
setQlrxxOld ({ commit }, data) {
commit('SET_OLDDETAIL', data)
},
setQlrxxNew ({ commit }, data) {
commit('SET_NEWDETAIL', data)
}
}
export default {
namespaced: true,
state,
mutations,
actions
}
const state = {
transfer: false
}
const mutations = {
SET_TRANSFER: (state, data) => {
state.transfer = data
},
}
const actions = {
setTransfere ({ commit }, data) {
commit('SET_TRANSFER', data)
}
}
export default {
namespaced: true,
state,
mutations,
actions
}
<template>
<div class="content">
<div class="left">
<el-tree
ref="tree"
:data="treedata"
:props="defaultProps"
@node-click="handleNodeClick"
:default-expand-all="true"
:expand-on-click-node="false"
node-key="id"
:default-checked-keys="[showTab]"
>
<el-tree ref="tree" :data="treedata" :props="defaultProps" @node-click="handleNodeClick"
:default-expand-all="true" :expand-on-click-node="false" node-key="id" :default-checked-keys="[showTab]">
</el-tree>
</div>
<div class="right">
......@@ -22,7 +14,7 @@
import { getBdcqljqtsx } from "@/api/registerBook.js";
import { loadTreeData, getNode } from "./djbFrameData.js";
export default {
data() {
data () {
return {
//接收参数
// propsParam: this.$attrs,
......@@ -44,11 +36,11 @@ export default {
};
},
props: ["formData"],
mounted() {
mounted () {
this.loadData();
},
methods: {
loadData() {
loadData () {
getBdcqljqtsx({
bdcdyid: this.formData.bdcdyid,
bdcdyh: this.formData.bdcdyh,
......@@ -56,7 +48,7 @@ export default {
if (res.code === 200) {
this.treedata = loadTreeData(res.result, this.formData.bdcdyh);
this.$nextTick(function () {
this.defaultNode = getNode(this.formData.qllx, {linShi:0,xianShi:0,liShi:0}, "");
this.defaultNode = getNode(this.formData.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, "");
this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
this.loadComponent(this.defaultNode.form);
});
......@@ -69,10 +61,10 @@ export default {
bsmQlxx: this.formData.bsmQlxx,
};
},
handleNodeClick(data, node, elem) {
handleNodeClick (data, node, elem) {
this.loadComponent(data.form);
},
loadComponent(form) {
loadComponent (form) {
this.componentTag = (r) =>
require.ensure([], () => r(require("@/views/registerBook/" + form)));
},
......@@ -80,6 +72,10 @@ export default {
};
</script>
<style scoped lang="scss">
/deep/.rollTable {
height: calc(100vh - 240px) !important;
}
.content {
width: 100%;
height: 100%;
......@@ -113,7 +109,7 @@ export default {
height: 45px;
}
/deep/ .el-tree-node:focus > .el-tree-node__content {
/deep/ .el-tree-node:focus>.el-tree-node__content {
background-color: #f5f5f5;
color: #0079fe;
border-right: 4px solid #0079fe;
......@@ -123,7 +119,7 @@ export default {
white-space: pre-wrap;
}
/deep/ .is-current > .el-tree-node__content {
/deep/ .is-current>.el-tree-node__content {
background-color: #f5f5f5;
color: #0079fe;
border-right: 4px solid #0079fe;
......
......@@ -3,6 +3,7 @@ import {
leftMenu,
stepExpandInfo,
record,
completeTask,
getNextLinkInfo,
} from "@/api/fqsq.js";
export default {
......@@ -157,10 +158,8 @@ export default {
})
break;
case "back": //退回按钮
this.$popup({
title: "退回",
editItem: "workflow/components/th",
height: "400px",
this.$popup("退回", "workflow/components/th", {
height: "200px",
width: '30%',
formData: {
bsmSlsq: this.bsmSlsq,
......@@ -190,9 +189,7 @@ export default {
});
break;
case "stop": //终止按钮
this.$popup({
title: "终止",
editItem: "workflow/components/stop",
this.$popup("终止", "workflow/components/stop", {
height: "330px",
width: '30%',
formData: {
......@@ -246,7 +243,7 @@ export default {
sendToNext (obj) {
const h = this.$createElement;
this.$msgbox({
title: "您确定转出吗?",
title: "您确定转出吗?1",
message: h("div", { style: "margin: auto" }, [
h("span", null, "下个环节名称:"),
h("i", { style: "color: teal" }, obj.taskName),
......@@ -267,12 +264,9 @@ export default {
if (res.code === 200) {
instance.confirmButtonLoading = false;
this.$message.success("转件成功");
setTimeout(() => {
window.opener = null;
window.open("about:blank", "_self");
window.close();
this.$emit("input", false);
}, 1000);
window.opener.location.reload(); //刷新父窗口
window.close();
this.$emit("input", false);
} else {
instance.confirmButtonLoading = false;
instance.confirmButtonText = "确定";
......@@ -291,12 +285,14 @@ export default {
});
},
sendToEnd () {
let that = this
const h = this.$createElement;
this.$msgbox({
title: "您确定转出吗?",
title: "您确定转出吗?2",
message: "此环节为流程结束环节,转出后流程将结束",
showCancelButton: true,
beforeClose: (action, instance, done) => {
console.log(action, 'actionaction');
if (action === "confirm") {
instance.confirmButtonLoading = true;
instance.confirmButtonText = "执行中...";
......@@ -307,19 +303,17 @@ export default {
}).then((res) => {
if (res.code === 200) {
instance.confirmButtonLoading = false;
this.$message.success("转件成功");
setTimeout(() => {
window.opener = null;
window.open("about:blank", "_self");
window.close();
this.$emit("input", false);
}, 1000);
that.$message.success("转件成功");
localStorage.setItem('transfer', true)
window.opener.location.reload(); //刷新父窗口
window.close();
that.$emit("input", false);
} else {
instance.confirmButtonLoading = false;
instance.confirmButtonText = "确定";
this.$message.error(res.message);
}
});
})
} else {
done();
}
......
import { getForm } from "../flowform";
export default {
methods: {
//右侧表单选项卡事件
beforeLeave (activeName, oldActiveName) {
if (activeName && activeName != 0) this.getFromRouter(activeName)
},
//切换选项卡内容组件
getFromRouter (tabname) {
this.componentTag = getForm(tabname, this.$route.query.sqywbm);
}
}
}
......@@ -151,9 +151,6 @@ export default {
window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
window.removeEventListener('unload', e => this.unloadHandler(e))
},
computed: {
...mapGetters(["oldDetail", "newDetail"])
},
methods: {
beforeunloadHandler () {
this._beforeUnload_time = new Date().getTime()
......@@ -346,9 +343,7 @@ export default {
});
break;
case "stop": //终止按钮
this.$popup({
title: "终止",
editItem: "workflow/components/stop",
this.$popup("终止", "workflow/components/stop", {
height: "330px",
width: '30%',
formData: {
......@@ -422,7 +417,6 @@ export default {
},
//申请单元点击事件
unitClick (index) {
if (index >= 0) {
this.currentSelectProps = this.unitData[index];
this.currentSelectProps.batchOperation = false;
......@@ -447,10 +441,6 @@ export default {
});
}
});
// if (this.currentSelectProps.bsmSldy != this.unitData[index].bsmSldy) {
// this.currentSelectProps = this.unitData[index];
// this.fresh += 1;
// }
},
//批量按钮判断
judgeBatchShow () {
......
......@@ -72,13 +72,13 @@
@import "./workFrame.scss";
</style>
<script>
import { mapGetters } from "vuex"
import WorkFlow from "./mixin/index"
import publicFlow from "./mixin/public.js"
import { getStepFormInfo } from "@/api/fqsq.js";
import { getForm } from './flowform'
import NoticeBar from '@/components/NoticeBar/index'
import { deleteFlow, unClaimTask } from "@/api/ywbl.js";
import ProcessViewer from './components/processViewer.vue'
import { getForm } from "./flowform.js";
import fqsqDialog from "@/views/ywbl/ywsq/slectBdc.vue";
export default {
components: {
......@@ -86,7 +86,7 @@ export default {
NoticeBar,
ProcessViewer
},
mixins: [WorkFlow],
mixins: [WorkFlow, publicFlow],
data () {
return {
noticeList: [],
......@@ -127,15 +127,11 @@ export default {
window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
window.removeEventListener('unload', e => this.unloadHandler(e))
},
computed: {
...mapGetters(["oldDetail", "newDetail"])
},
methods: {
beforeunloadHandler () {
this._beforeUnload_time = new Date().getTime()
},
unloadHandler (e) {
thsi.$alert("234234");
this._gap_time = new Date().getTime() - this._beforeUnload_time
//判断是窗口关闭还是刷新
if (this._gap_time <= 10) {
......@@ -192,11 +188,10 @@ export default {
bsmSlsq: this.bsmSlsq,
dataList: this.unitData,
},
cancel: function () { }, //取消事件的回调
confirm: function () {
that.loadBdcdylist();
}, //确认事件的回调
});
}
})
},
//申请单元点击事件
unitClick (index) {
......@@ -208,7 +203,7 @@ export default {
}
getStepFormInfo(this.currentSelectProps).then((res) => {
if (res.code === 200) {
this.fresh += 1;
this.fresh++;
//获取单元对应的所有表单信息
this.tabList = res.result;
//默认加载第一个表单信息
......@@ -224,14 +219,6 @@ export default {
})
}
})
},
//表单选项卡事件
beforeLeave (activeName, oldActiveName) {
if (activeName && activeName != 0) this.getFromRouter(activeName)
},
//切换选项卡内容组件
getFromRouter (tabname) {
this.componentTag = getForm(tabname, this.$route.query.sqywbm);
}
}
}
......
<template>
<div class="container">
<!-- 顶部内容框 -->
<div class="topButton">
<!-- 左侧业务功能按钮 -->
<ul>
<li @click="operation(item)" v-for="(item, index) in leftButtonList" :key="index">
<svg-icon :icon-class="item.icon" />
<span class="iconName">{{ item.name }}</span>
</li>
</ul>
<!-- 右侧流程按钮 -->
<ul>
<li @click="operation(item)" v-for="(item, index) in rightButtonList" :key="index">
<svg-icon class="icon" :icon-class="item.icon" />
<span class="iconName">{{ item.name }}</span>
</li>
</ul>
</div>
<!-- 内容框架 -->
<div class="containerFrame">
<!-- 左侧菜单栏 -->
<div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
<div v-if="this.isShowdrawer">
<div class="title">申请单元列表({{ unitData.length }})</div>
<el-menu :default-active="activeIndex" @select="unitClick">
<el-menu-item v-for="(item, index) in unitData" :index="index.toString()" :key="index">
<div>
<p>{{ item.bdcdyh }}</p>
<p class="title-detail">{{ item.zl }}</p>
</div>
</el-menu-item>
</el-menu>
</div>
<div class="map-drawer-click map-drawer" v-if="!isShowdrawer" @click="
() => {
this.isShowdrawer = !this.isShowdrawer;
}
"></div>
<div class="map-drawer-expand map-drawer" v-else @click="
() => {
this.isShowdrawer = !this.isShowdrawer;
}
"></div>
</div>
<div class="leftCon">
<!-- 分屏左侧预览 -->
<div v-if="splitScreen" class="splitScreen-con">
<component :is="clxxForm" v-bind="currentSelectProps" :key="fresh" />
</div>
<!-- 表单内容区域 -->
<div class="rightContainer">
<el-tabs v-model="tabName" :before-leave="beforeLeave">
<el-tab-pane :label="item.name" :name="item.value" v-for="(item, index) in tabList" :key="index">
</el-tab-pane>
</el-tabs>
<component :key="fresh" :is="componentTag" v-bind="currentSelectProps" />
</div>
</div>
</div>
</div>
</template>
<style scoped lang='scss'>
@import "~@/styles/mixin.scss";
@import "./workFrame.scss";
</style>
<script>
import {
leftMenu,
stepExpandInfo,
getStepFormInfo
} from "@/api/fqsq.js"
import publicFlow from "./mixin/public.js"
import { getWorkFlowImage } from "@/api/jsydsyqFlow.js"
export default {
mixins: [publicFlow],
data () {
return {
// 流程图
imgSrc: '',
// 折叠
isShowdrawer: true,
// 默认选中
activeIndex: '0',
//受理申请标识码
bsmSlsq: this.$route.query.bsmSlsq,
//当前流程所在环节
bestepid: this.$route.query.bestepid,
//顶部左侧按钮集合
leftButtonList: [],
//顶部右侧按钮集合
rightButtonList: [],
//左侧菜单数据集合
unitData: [],
//设置那个表单选中
tabName: "",
//表单集合
tabList: [],
//选择加载哪一个组件
componentTag: "",
//设置表单组件是否刷选值
fresh: 10,
//设置表单传递数据
currentSelectProps: {},
//是否开启材料分屏
splitScreen: false,
//材料分屏表单
clxxForm: "",
//材料信息选择卡索引
clxxIndex: "",
//材料信息选项卡对象
clxxTab: {},
}
},
mounted () {
this.loadBdcdylist();
this.flowInitParam();
},
methods: {
//加载流程初始参数
flowInitParam () {
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
formdata.append("bestepid", this.bestepid);
formdata.append("type", "READ_ONLY");
stepExpandInfo(formdata).then((res) => {
if (res.code === 200) {
this.leftButtonList = res.result.button;
this.rightButtonList = res.result.operation;
}
})
},
//流程环节操作按钮
operation (item) {
//按钮 B1:流程图 B2:材料分屏 B3:材料导入 B4:登记簿 B5:证书预览 B6:打印申请书
//操作按钮 登簿:record 转件:transfer 退回:back 退出:signout
let that = this;
switch (item.value) {
case "B1":
getWorkFlowImage(this.bsmSlsq).then(res => {
this.imgSrc = URL.createObjectURL(res)
this.$popup({
title: '流程图',
editItem: 'workflow/components/flowChart',
formData: this.imgSrc
})
})
break;
case "B5":
this.zsylFlag = true;
break;
case "B2": //材料分屏按钮
this.splitScreen = this.splitScreen ? false : true;
this.$store.dispatch('app/settScreen', this.splitScreen)
if (this.splitScreen) {
//如果当前选项卡为材料信息内容,递减到上一个选项卡内容
if (this.tabName == this.clxxTab.value) {
this.tabName = this.tabList[this.clxxIndex - 1].value;
this.getFromRouter(this.tabList[this.clxxIndex - 1].value);
}
this.tabList.splice(this.clxxIndex, 1);
} else {
this.tabList.splice(this.clxxIndex, 1, this.clxxTab);
}
break;
case "signout":
window.close();
break;
}
},
//读取申请单元信息
loadBdcdylist () {
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
formdata.append("bestepid", this.bestepid);
leftMenu(formdata).then((res) => {
if (res.code === 200) {
this.unitData = res.result;
this.currentSelectProps = res.result[0];
this.unitClick(0);
}
})
},
//申请单元点击事件
unitClick (index) {
this.currentSelectProps = this.unitData[index];
this.currentSelectProps.type = 'ONLY_READ';
getStepFormInfo(this.currentSelectProps).then((res) => {
if (res.code === 200) {
this.fresh++;
//获取单元对应的所有表单信息
this.tabList = res.result;
//默认加载第一个表单信息
this.tabName = res.result[0].value;
}
});
}
}
}
</script>
\ No newline at end of file
......@@ -79,7 +79,7 @@ export default {
components: { searchBox },
mixins: [table, searchMin],
computed: {
...mapGetters(['dictData']),
...mapGetters(['dictData', 'transfer'])
},
data () {
return {
......@@ -102,6 +102,9 @@ export default {
}
}
},
created () {
this.queryClick()
},
mounted () {
sendThis(this);
this.queryClick()
......
......@@ -136,6 +136,7 @@ export default {
},
ywhClick (item) {
const { href } = this.$router.resolve('/workFrameView?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&viewtype=1');
// const { href } = this.$router.resolve('/workFrameViewcs?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&viewtype=1');
window.open(href, '_blank');
}
}
......
<template>
<dialogBox :title="title" width="85%" :isButton="false" :isMain="true" @closeDialog="closeDialog" v-model="myValue">
<component :is="editItem" @closeDialog="closeDialog" v-bind="$attrs" :isJump="isJump" id="slectBdc"
@updateDialog="updateDialog" :djywbm="djywbm" :key="key" :djqxObj="djqxObj"/>
@updateDialog="updateDialog" :djywbm="djywbm" :key="key" :djqxObj="djqxObj" />
</dialogBox>
</template>
<script>
......@@ -11,11 +11,11 @@ export default {
isJump: { type: Boolean, default: false },
value: { type: Boolean, default: true },
djywbm: { type: String, default: '' },
djqxObj: { type: Object, default: {} }
djqxObj: { type: Object, default: () => { } }
},
data () {
return {
title:"",
title: "",
key: 0,
editItem: '',
myValue: this.value
......@@ -37,7 +37,7 @@ export default {
},
methods: {
loadView (view) {
this.title ="申请业务:"+this.djqxObj.djywmc;
this.title = "申请业务:" + this.djqxObj.djywmc;
return r => require.ensure([], () => r(require(`./components/${view}.vue`)))
},
closeDialog () {
......