b4b9ddf3 by 蔡俊立
2 parents 076291ea 6fab4126
......@@ -19,7 +19,9 @@
"nprogress": "0.2.0",
"vue": "2.6.10",
"vue-router": "3.0.2",
"vuex": "3.1.0"
"vuex": "3.1.0",
"bpmn-js": "^7.4.0",
"diagram-js": "^6.8.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.4",
......
import request from '@/utils/request'
/*
楼盘查询
*/
// 根据条件进行列表查询
export function getLpZrz(data) {
return request({
url: '/zhcx/lpcx/getLpZrz',
method: 'post',
data: data
})
}
......@@ -29,7 +29,7 @@ export function getNextNode (bsmSqyw) {
}
/*
业务办理-选择单元-根据条件进行列表查询-国有建设用地使用权
业务办理-选择单元-根据条件进行列表查询-国有建设用地使用权、房屋所有权(首次登记)
*/
export function selectScBdcdy (data) {
return request({
......@@ -40,17 +40,17 @@ export function selectScBdcdy (data) {
})
}
/*
业务办理-选择单元-根据条件进行列表查询-房屋所有权
*/
export function selectFwsyq (data) {
return request({
url: 'ywbl/ywsq/selectFwsyq',
method: 'post',
data,
showLoading: true
})
}
// /*
// 业务办理-选择单元-根据条件进行列表查询-房屋所有权
// */
// export function selectFwsyq (data) {
// return request({
// url: 'ywbl/ywsq/selectFwsyq',
// method: 'post',
// data,
// showLoading: true
// })
// }
// 待办箱列表查询接口
export function searchTaskToDo (data) {
......
<template>
<div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" class="menu-icon" />
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title"
class="menu-icon" />
</el-menu-item>
</app-link>
</template>
......@@ -12,14 +13,8 @@
<template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
</template>
<sidebar-item
v-for="child in item.children"
:key="child.path"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu"
/>
<sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child"
:base-path="resolvePath(child.path)" class="nest-menu" />
</el-submenu>
</div>
</template>
......@@ -50,14 +45,14 @@ export default {
default: ''
}
},
data() {
data () {
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
// TODO: refactor with render function
this.onlyOneChild = null
return {}
},
methods: {
hasOneShowingChild(children = [], parent) {
hasOneShowingChild (children = [], parent) {
const showingChildren = children.filter(item => {
if (item.hidden) {
return false
......@@ -75,13 +70,13 @@ export default {
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
this.onlyOneChild = { ...parent, path: '', noShowingChildren: true }
return true
}
return false
},
resolvePath(routePath) {
resolvePath (routePath) {
if (isExternal(routePath)) {
return routePath
}
......
......@@ -5,9 +5,9 @@
:unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false"
mode="vertical">
<!-- 权限菜单 -->
<!-- <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" /> -->
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
<!-- 菜单全部展示 -->
<sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" />
<!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> -->
</el-menu>
</el-scrollbar>
</div>
......
......@@ -20,17 +20,16 @@ router.beforeEach(async (to, from, next) => {
next()
} else {
const { result: getMenuData } = await getMenuInfo()
console.log(getMenuData);
// const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData)
// router.addRoutes(accessRoutes)
next()
const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData)
router.addRoutes(accessRoutes)
console.log(router);
next({ ...to, replace: true })
}
NProgress.done()
})
router.afterEach(to => {
// 解决刷新页面报404问题
sessionStorage.setItem('routerTo', to.fullPath)
Cookies.set("routerTo", to.fullPath)
NProgress.done()
})
......
......@@ -25,7 +25,6 @@ export const constantRoutes = [
component: () => import('@/views/error-page/404'),
hidden: true
},
{ path: '*', redirect: '/404', hidden: true },
// 业务流程框架
{
path: '/workFrame',
......@@ -58,7 +57,7 @@ export const asyncRoutes = [
{
path: 'home',
component: () => import('@/views/home/index'),
name: 'Dashboard',
name: 'home',
meta: { title: '工作台', icon: 'workbench', affix: true }
}
]
......@@ -273,7 +272,7 @@ export const asyncRoutes = [
const createRouter = () =>
new Router({
scrollBehavior: () => ({ y: 0 }),
routes: [...constantRoutes, ...asyncRoutes]
routes: [...constantRoutes]
})
const router = createRouter()
......
import { asyncRoutes, constantRoutes, resetRouter } from '@/router'
import asyncRouter from '@/utils/asyncRouter.js'
const state = {
routes: [],
addRoutes: false,
......@@ -8,26 +8,18 @@ const state = {
const mutations = {
SET_ROUTES: (state, routes) => {
state.addRoutes = true
state.routes = constantRoutes.concat(routes)
state.routes = routes
},
RESET_ROUTE: (state) => {
state.addRoutes = false
}
}
const actions = {
// 添加全部菜单
generateRoutes ({ commit }, getMenuInfo) {
return new Promise(resolve => {
// 将路由树数据转成数组结构
let arr1 = []
dfs(_.cloneDeep(asyncRoutes), node => arr1.push(node))
_.each(arr1, i => {
i.parentId = i.parentId ? i.parentId : null
})
let permission_arr = _.intersectionBy(arr1, getMenuInfo, 'name')
// 将权限菜单数组转成路由树数据结构
let permission_tree = array2Tree(permission_arr, null)
let permission_tree = asyncRouter(getMenuInfo)
commit('SET_ROUTES', permission_tree)
resolve(permission_tree)
})
......
import Layout from '@/layout'
export default function filterAsyncRouter (routers) {
routers.forEach(item => {
if (!item.children) {
delete item.children
delete item.redirect
}
if (!item.parentId) {
item.component = Layout
} else {
item.component = loadView(item.uri)
}
item.meta.icon = item.icon
if (item.children) {
item.children = filterAsyncRouter(item.children)
}
})
return routers
}
function loadView (view) {
return r => require.ensure([], () => r(require(`@/views${view}.vue`)))
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ const service = axios.create({
'Content-Type': 'application/json; charset=utf-8',
'Authorization': 'bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO'
//token列表
//'Authorization': 'bearer AT-12-eRKHta5I8ZWftIU86sSyJ8rUkPhMvMJU'
// 'Authorization': 'bearer AT-12-eRKHta5I8ZWftIU86sSyJ8rUkPhMvMJU'
//renc:bearer AT-30-KHB4LXc8-CZXwBEyaFJa9lRmMTc5sHVI
//tianh:bearer AT-33-3zFTGkhQ4eUv4nXvzAmbgN5RPZppzEY6
//zhangh:bearer AT-7-Tx8dlZH0LNRc33UjD1CX1xwa-1D7kQmQ
......
......@@ -79,7 +79,8 @@ export default {
},
fetchData () {
this.queryForm.sqywbm = this.djywbm;
selectScBdcdy({ ...this.queryForm, ...this.pageData, fwfl: this.activeName }).then((res) => {
this.queryForm.fwfl = this.activeName;
selectScBdcdy({ ...this.queryForm, ...this.pageData }).then((res) => {
if (res.code === 200) {
let { total, records } = res.result;
this.tableData.total = total;
......@@ -88,7 +89,7 @@ export default {
})
},
handleTabClick () {
this.pageData.currentPage = 1
this.pageData.currentPage = 1;
this.fetchData()
},
submitForm () {
......
......@@ -26,10 +26,10 @@ class data extends filter {
)
}
},
{
prop: "status",
label: "状态",
},
// {
// prop: "status",
// label: "状态",
// },
{
prop: "qllxmc",
label: "权利类型",
......@@ -50,10 +50,10 @@ class data extends filter {
prop: "zdmj",
label: "宗地面积",
},
{
prop: "qlsdfs",
label: "权利设定方式",
},
// {
// prop: "qlsdfs",
// label: "权利设定方式",
// },
{
prop: "jzwjbyt",
label: "房屋用途",
......
......@@ -40,7 +40,7 @@
</div>
<!-- 表格 -->
<div class="from-clues-content">
<lb-table :page-size="pageData.size" @sort-change="handleSort" :current-page.sync="pageData.current"
<lb-table :page-size="pageData.size" border @sort-change="handleSort" :current-page.sync="pageData.current"
:total="pageData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
:column="tableData.columns" :data="tableData.data">
</lb-table>
......@@ -50,6 +50,7 @@
<script>
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./lpcxdata";
import { getLpZrz } from "@/api/lpb.js"
export default {
name: "lpcx",
components: {},
......@@ -66,27 +67,31 @@ export default {
zrzh: "",
},
pageData: {
current: 1,
size: 10,
total: 2,
currentPage: 1,
pageSize: 10,
total: 0,
},
ywlys: datas.ywlys(),
tableData: {
columns: datas.columns(),
data: [
{
slsj: "2022-5-12",
},
{
slsj: "2022-5-13",
},
],
},
data: []
}
};
},
methods: {
queryClick(){
this.fetchData();
},
// 初始化数据
fetchData () {
getLpZrz({ ...this.queryForm, ...this.pageData }).then(res => {
if (res.code === 200) {
this.pageData.total = res.result.total;
this.tableData.data = res.result.records
}
})
},
handleSort (name, sort) {
console.log(name, sort);
......
......@@ -40,7 +40,7 @@ class data extends filter {
label: "用途",
},
{
prop: "mj",
prop: "zydmj",
label: "面积(㎡)",
},
{
......@@ -62,16 +62,6 @@ class data extends filter {
}
]
}
ywlys () {
return [
{ value: 1, label: "办事大厅" },
{ value: 2, label: "微信小程序" },
{ value: 3, label: "法院端" },
{ value: 4, label: "银行端" },
]
}
}
let datas = new data()
export {
......