增加菜单搜索功能,优化table高度
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<iframe :id="id" :src="url" frameborder="0" width="100%" :height="height" scrolling="auto"></iframe>
|
||||||
<iframe :id="id" :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"></iframe>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -16,7 +14,8 @@
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
url: "",
|
url: "",
|
||||||
id:""
|
id:"",
|
||||||
|
height: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -33,8 +32,8 @@
|
|||||||
methods: {
|
methods: {
|
||||||
goUrl () {
|
goUrl () {
|
||||||
let url = this.$route.meta.url
|
let url = this.$route.meta.url
|
||||||
let id = this.$route.path
|
this.id = this.$route.path
|
||||||
this.id = id
|
this.height = document.documentElement.clientHeight-130
|
||||||
console.log("------url------"+url)
|
console.log("------url------"+url)
|
||||||
console.log("------token------"+Vue.ls.get(ACCESS_TOKEN))
|
console.log("------token------"+Vue.ls.get(ACCESS_TOKEN))
|
||||||
if (url !== null && url !== undefined) {
|
if (url !== null && url !== undefined) {
|
||||||
|
|||||||
@@ -69,9 +69,9 @@
|
|||||||
</a-layout-content>
|
</a-layout-content>
|
||||||
|
|
||||||
<!-- layout footer -->
|
<!-- layout footer -->
|
||||||
<a-layout-footer style="padding: 0px">
|
<!-- <a-layout-footer style="padding: 0px">-->
|
||||||
<global-footer/>
|
<!-- <global-footer/>-->
|
||||||
</a-layout-footer>
|
<!-- </a-layout-footer>-->
|
||||||
</a-layout>
|
</a-layout>
|
||||||
|
|
||||||
<!-- update-start---- author:os_chengtgen -- date:20190830 -- for:issues/463 -编译主题颜色已生效,但还一直转圈,显示主题 正在编译 ---- -->
|
<!-- update-start---- author:os_chengtgen -- date:20190830 -- for:issues/463 -编译主题颜色已生效,但还一直转圈,显示主题 正在编译 ---- -->
|
||||||
|
|||||||
@@ -2,27 +2,27 @@
|
|||||||
<div class="user-wrapper" :class="theme">
|
<div class="user-wrapper" :class="theme">
|
||||||
<!-- update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
|
<!-- update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
|
||||||
<!-- update-begin author:sunjianlei date:20191@20 for: 解决全局样式冲突的问题 -->
|
<!-- update-begin author:sunjianlei date:20191@20 for: 解决全局样式冲突的问题 -->
|
||||||
<!-- <span class="action" @click="showClick">-->
|
<span class="action" @click="showClick">
|
||||||
<!-- <a-icon type="search"></a-icon>-->
|
<a-icon type="search"></a-icon>
|
||||||
<!-- </span>-->
|
</span>
|
||||||
<!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
|
<!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
|
||||||
<!-- <component :is="searchMenuComp" v-show="searchMenuVisible || isMobile()" class="borders" :visible="searchMenuVisible" title="搜索菜单" :footer="null" @cancel="searchMenuVisible=false">-->
|
<component :is="searchMenuComp" v-show="searchMenuVisible || isMobile()" class="borders" :visible="searchMenuVisible" title="搜索菜单" :footer="null" @cancel="searchMenuVisible=false">
|
||||||
<!-- <a-select-->
|
<a-select
|
||||||
<!-- class="search-input"-->
|
class="search-input"
|
||||||
<!-- showSearch-->
|
showSearch
|
||||||
<!-- :showArrow="false"-->
|
:showArrow="false"
|
||||||
<!-- placeholder="搜索菜单"-->
|
placeholder="搜索菜单"
|
||||||
<!-- optionFilterProp="children"-->
|
optionFilterProp="children"
|
||||||
<!-- :filterOption="filterOption"-->
|
:filterOption="filterOption"
|
||||||
<!-- :open="isMobile()?true:null"-->
|
:open="isMobile()?true:null"
|
||||||
<!-- :getPopupContainer="(node) => node.parentNode"-->
|
:getPopupContainer="(node) => node.parentNode"
|
||||||
<!-- :style="isMobile()?{width: '100%',marginBottom:'50px'}:{}"-->
|
:style="isMobile()?{width: '100%',marginBottom:'50px'}:{}"
|
||||||
<!-- @change="searchMethods"-->
|
@change="searchMethods"
|
||||||
<!-- @blur="hiddenClick"-->
|
@blur="hiddenClick"
|
||||||
<!-- >-->
|
>
|
||||||
<!-- <a-select-option v-for="(site,index) in searchMenuOptions" :key="index" :value="site.id">{{site.meta.title}}</a-select-option>-->
|
<a-select-option v-for="(site,index) in searchMenuOptions" :key="index" :value="site.id">{{site.text}}</a-select-option>
|
||||||
<!-- </a-select>-->
|
</a-select>
|
||||||
<!-- </component>-->
|
</component>
|
||||||
<!-- update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
|
<!-- update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
|
||||||
<!-- update-end author:sunjianlei date:20191220 for: 解决全局样式冲突的问题 -->
|
<!-- update-end author:sunjianlei date:20191220 for: 解决全局样式冲突的问题 -->
|
||||||
<!-- update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
|
<!-- update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
|
||||||
@@ -174,8 +174,8 @@
|
|||||||
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||||
searchMenus(arr,menus){
|
searchMenus(arr,menus){
|
||||||
for(let i of menus){
|
for(let i of menus){
|
||||||
if(!i.hidden && "layouts/RouteView"!==i.component){
|
if("/layouts/RouteView"!==i.component && "/layouts/TabLayout"!==i.component){
|
||||||
arr.push(i)
|
arr.push(i)
|
||||||
}
|
}
|
||||||
if(i.children&& i.children.length>0){
|
if(i.children&& i.children.length>0){
|
||||||
this.searchMenus(arr,i.children)
|
this.searchMenus(arr,i.children)
|
||||||
@@ -188,10 +188,10 @@
|
|||||||
// update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
|
// update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
|
||||||
searchMethods(value) {
|
searchMethods(value) {
|
||||||
let route = this.searchMenuOptions.filter(item => item.id === value)[0]
|
let route = this.searchMenuOptions.filter(item => item.id === value)[0]
|
||||||
if (route.meta.internalOrExternal === true || route.component.includes('layouts/IframePageView')) {
|
if (route.component.includes('layouts/IframePageView')) {
|
||||||
window.open(route.meta.url, '_blank')
|
window.open(route.url, '_blank')
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({ path: route.path })
|
this.$router.push({ path: route.url })
|
||||||
}
|
}
|
||||||
this.searchMenuVisible = false
|
this.searchMenuVisible = false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ export const JeecgListMixin = {
|
|||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
total: 0
|
total: 0
|
||||||
},
|
},
|
||||||
|
/* 控制table高度 */
|
||||||
|
scroll: {
|
||||||
|
y: document.documentElement.clientHeight-330
|
||||||
|
},
|
||||||
/* 排序参数 */
|
/* 排序参数 */
|
||||||
isorter:{
|
isorter:{
|
||||||
column: 'createTime',
|
column: 'createTime',
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ function generateChildRouters (data) {
|
|||||||
icon: item.icon,
|
icon: item.icon,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
componentName:componentName,
|
componentName:componentName,
|
||||||
|
internalOrExternal:true,
|
||||||
keepAlive: true
|
keepAlive: true
|
||||||
// permissionList:""
|
// permissionList:""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,7 @@
|
|||||||
{title: '名称', dataIndex: 'name', width: 100},
|
{title: '名称', dataIndex: 'name', width: 100},
|
||||||
{title: '上级编号', dataIndex: 'parentNumber', width: 80},
|
{title: '上级编号', dataIndex: 'parentNumber', width: 80},
|
||||||
{title: '链接', dataIndex: 'url', width: 250},
|
{title: '链接', dataIndex: 'url', width: 250},
|
||||||
|
{title: '组件', dataIndex: 'component', width: 250},
|
||||||
{title: '排序', dataIndex: 'sort', width: 80},
|
{title: '排序', dataIndex: 'sort', width: 80},
|
||||||
{
|
{
|
||||||
title: '是否启用', dataIndex: 'enabled', width: 80, align: "center",
|
title: '是否启用', dataIndex: 'enabled', width: 80, align: "center",
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
|
:scroll="scroll"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<!-- 字符串超长截取省略号显示-->
|
<!-- 字符串超长截取省略号显示-->
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="链接">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="链接">
|
||||||
<a-input placeholder="请输入链接" v-decorator.trim="[ 'url' ]" />
|
<a-input placeholder="请输入链接" v-decorator.trim="[ 'url' ]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="组件">
|
||||||
|
<a-input placeholder="请输入组件" v-decorator.trim="[ 'component' ]" />
|
||||||
|
</a-form-item>
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
|
||||||
<a-input placeholder="请输入排序" v-decorator.trim="[ 'sort' ]" />
|
<a-input placeholder="请输入排序" v-decorator.trim="[ 'sort' ]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -118,7 +121,7 @@
|
|||||||
this.jselectMultiple.value = ''
|
this.jselectMultiple.value = ''
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'number', 'name', 'parentNumber', 'url','sort','pushBtn','icon','enabled'))
|
this.form.setFieldsValue(pick(this.model,'number', 'name', 'parentNumber', 'url', 'component', 'sort', 'pushBtn', 'icon', 'enabled'))
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
close () {
|
close () {
|
||||||
|
|||||||
Reference in New Issue
Block a user