1.搜索源 触碰提示调整

2.ztree样式调整
This commit is contained in:
WangHao 2020-08-11 00:05:53 +08:00
parent 615687afca
commit b86156d9d0
4 changed files with 322 additions and 207 deletions

View File

@ -1,127 +1,127 @@
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
Vue.use(Router) Vue.use(Router)
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from '@/layout'
/** /**
* Note: 路由配置项 * Note: 路由配置项
* *
* hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401login等页面或者如一些编辑页面/edit/1 * hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401login等页面或者如一些编辑页面/edit/1
* alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时自动会变成嵌套的模式--如组件页面 * alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时自动会变成嵌套的模式--如组件页面
* // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面 * // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面
* // 若你想不管路由下面的 children 声明的个数都显示你的根路由 * // 若你想不管路由下面的 children 声明的个数都显示你的根路由
* // 你可以设置 alwaysShow: true这样它就会忽略之前定义的规则一直显示根路由 * // 你可以设置 alwaysShow: true这样它就会忽略之前定义的规则一直显示根路由
* redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
* name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题 * name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
* meta : { * meta : {
roles: ['admin','editor'] // 设置该路由进入的权限,支持多个权限叠加 roles: ['admin','editor'] // 设置该路由进入的权限,支持多个权限叠加
title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
icon: 'svg-name' // 设置该路由的图标对应路径src/icons/svg icon: 'svg-name' // 设置该路由的图标对应路径src/icons/svg
breadcrumb: false // 如果设置为false则不会在breadcrumb面包屑中显示 breadcrumb: false // 如果设置为false则不会在breadcrumb面包屑中显示
} }
*/ */
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [
{ {
path: '/redirect', path: '/redirect',
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: '/redirect/:path(.*)',
component: (resolve) => require(['@/views/redirect'], resolve) component: (resolve) => require(['@/views/redirect'], resolve)
} }
] ]
}, },
{ {
path: '/login', path: '/login',
component: (resolve) => require(['@/views/login'], resolve), component: (resolve) => require(['@/views/login'], resolve),
hidden: true hidden: true
}, },
{ {
path: '/404', path: '/404',
component: (resolve) => require(['@/views/error/404'], resolve), component: (resolve) => require(['@/views/error/404'], resolve),
hidden: true hidden: true
}, },
{ {
path: '/401', path: '/401',
component: (resolve) => require(['@/views/error/401'], resolve), component: (resolve) => require(['@/views/error/401'], resolve),
hidden: true hidden: true
}, },
{ {
path: '', path: '',
component: Layout, component: Layout,
redirect: 'index', redirect: 'index',
children: [ children: [
{ {
path: 'index', path: 'index',
component: (resolve) => require(['@/views/index'], resolve), component: (resolve) => require(['@/views/index'], resolve),
name: '首页', name: '首页',
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
} }
] ]
}, },
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,
hidden: true, hidden: true,
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{ {
path: 'profile', path: 'profile',
component: (resolve) => require(['@/views/system/user/profile/index'], resolve), component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
name: 'Profile', name: 'Profile',
meta: { title: '个人中心', icon: 'user' } meta: { title: '个人中心', icon: 'user' }
} }
] ]
}, },
{ {
path: '/dict', path: '/dict',
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: 'type/data/:dictId(\\d+)', path: 'type/data/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve), component: (resolve) => require(['@/views/system/dict/data'], resolve),
name: 'Data', name: 'Data',
meta: { title: '字典数据', icon: '' } meta: { title: '字典数据', icon: '' }
} }
] ]
}, },
{ {
path: '/job', path: '/job',
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: 'log', path: 'log',
component: (resolve) => require(['@/views/monitor/job/log'], resolve), component: (resolve) => require(['@/views/monitor/job/log'], resolve),
name: 'JobLog', name: 'JobLog',
meta: { title: '调度日志' } meta: { title: '调度日志' }
} }
] ]
}, },
{ {
path: '/gen', path: '/gen',
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: 'edit/:tableId(\\d+)', path: 'edit/:tableId(\\d+)',
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
name: 'GenEdit', name: 'GenEdit',
meta: { title: '修改生成配置' } meta: { title: '修改生成配置' }
} }
] ]
} }
] ]
export default new Router({ export default new Router({
mode: 'history', // 去掉url中的# mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
}) })

View File

@ -277,6 +277,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
/** 查询书签管理列表 */ /** 查询书签管理列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -1,6 +1,8 @@
<template > <template >
<div class="main"> <div class="main">
<div class="index-top"></div>
<!--github--> <!--github-->
<a @click="zreaZtree" class="github-corner" target="_blank" title="Follow me on GitHub" aria-label="Follow me on GitHub"> <a @click="zreaZtree" class="github-corner" target="_blank" title="Follow me on GitHub" aria-label="Follow me on GitHub">
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:#008000; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"> <svg width="80" height="80" viewBox="0 0 250 250" style="fill:#008000; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true">
@ -10,32 +12,48 @@
</a> </a>
<div class="areaTree" v-show="isShowZtree">
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span>
<span style="display: block;width: 100%;height: 30px;line-height: 30px;text-indent: 25px;font-size: 15px;font-weight:bold">我是菜单1号</span> <div style="height: 700px;width: 270px;margin-top: 50px"></div>
<div style="height: 700px;width: 500px;margin-top: 50px">
</div>
<div class="areaTree" >
<ul id="treeDemo" class="ztree" ></ul> <ul id="treeDemo" class="ztree" ></ul>
</div> </div>
<div class="sousou"> <div class="sousou">
<!-- //--> <!-- //-->
<div style="width: 800px;height: 200px;margin: 0 auto;margin-top: 19%"> <div style="width: 50%;height: 200px;margin: 0 auto;margin-top: 19%">
<div > <div >
<div class="choice-top" v-for="iconlist in iconlist"> <div class="choice-top" v-for="iconlist in iconlist">
<el-tooltip :hide-after="500" class="item" effect="dark" :content="iconlist.title" placement="top" > <el-tooltip :visible-arrow="visiblearro" :enterable="enterable" class="item" effect="dark" :content="iconlist.title" placement="top" >
<div @click="sendEventDataTop($event)" :data-icon="iconlist.icon"><img :ng-src="'https://favicon.lucq.fun/?url='+iconlist.icon" err-src="./images/default.ico" ng-click="detailBookmark(bookmark);$event.stopPropagation()" :src="'https://favicon.lucq.fun/?url='+iconlist.icon" ></div> <div @click="sendEventDataTop($event)" :data-icon="iconlist.icon"><img :ng-src="'https://favicon.lucq.fun/?url='+iconlist.icon" err-src="./images/default.ico" ng-click="detailBookmark(bookmark);$event.stopPropagation()" :src="'https://favicon.lucq.fun/?url='+iconlist.icon" ></div>
</el-tooltip> </el-tooltip>
</div> </div>
@ -45,16 +63,29 @@
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<el-input placeholder="百度一下" v-model="sousou" class="sousoucss" ref="sousouref"> <el-input placeholder="百度一下" v-model="sousou" class="sousoucss" ref="sousouref">
<img @click="IsCord()" slot="prefix" :src="sousouicon" style="width: 20px;height: 20px;position: absolute;top: 50%;margin-top: -10px;"> <img @click="IsCord()" slot="prefix" :src="sousouicon" style="width: 20px;height: 20px;position: absolute;top: 50%;margin-top: -10px;">
<el-button slot="append" icon="el-icon-search" circle ></el-button> <el-button slot="append" icon="el-icon-search" circle @click="getUrl"></el-button>
</el-input> </el-input>
</div> </div>
<el-card class="box-card" v-show="isSousouCard" style="width: 500px;opacity: 0.7"> <transition name="el-zoom-in-top">
<div class="choice" v-for="iconlist in iconlist"> <el-card class="box-card" v-show="isSousouCard" style="width: 100%;opacity: 0.7;margin-top: 10px;height:200px;overflow:auto">
<div class="choice" v-for="iconlist in iconlist" >
<div @click="sendEventData($event)" :data-icon="iconlist.icon"><img err-src="https://favicon.lucq.fun/?url=https://www.5118.com/" class="sousouicon" :ng-src="'https://favicon.lucq.fun/?url='+iconlist.icon" :src="'https://favicon.lucq.fun/?url='+iconlist.icon" ><span>{{iconlist.title}}</span></div> <div @click="sendEventData($event)" :data-icon="iconlist.icon"><img err-src="https://favicon.lucq.fun/?url=https://www.5118.com/" class="sousouicon" :ng-src="'https://favicon.lucq.fun/?url='+iconlist.icon" :src="'https://favicon.lucq.fun/?url='+iconlist.icon" ><span>{{iconlist.title}}</span></div>
<!-- ng-click="detailBookmark(bookmark);$event.stopPropagation()" --> </div>
</div> </el-card>
</el-card>
</transition>
<!-- <el-card class="box-card" v-show="isSousouCard" style="width: 500px;opacity: 0.7">-->
<!-- <div class="choice" v-for="iconlist in iconlist">-->
<!-- <div @click="sendEventData($event)" :data-icon="iconlist.icon"><img err-src="https://favicon.lucq.fun/?url=https://www.5118.com/" class="sousouicon" :ng-src="'https://favicon.lucq.fun/?url='+iconlist.icon" :src="'https://favicon.lucq.fun/?url='+iconlist.icon" ><span>{{iconlist.title}}</span></div>-->
<!--&lt;!&ndash; ng-click="detailBookmark(bookmark);$event.stopPropagation()" &ndash;&gt;-->
<!-- </div>-->
<!-- </el-card>-->
</div> </div>
@ -89,9 +120,12 @@
data:function(){ data:function(){
return{ return{
enterable:false,
visiblearro:true,//
isShowZtree:false,//ztree isShowZtree:false,//ztree
expandAll:false,//ztree expandAll:false,//ztree
curMenu:null, curMenu:null,
sousou:'百度一下',//
zTree_Menu:null, zTree_Menu:null,
isSousouCard:false,// isSousouCard:false,//
iconurl:'https://favicon.lucq.fun/?url=', iconurl:'https://favicon.lucq.fun/?url=',
@ -125,42 +159,42 @@
} }
}, },
zNodes:[ zNodes:[
{ id:1, pId:0, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:1, pId:0, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://www.baidu.com"},
{ id:2, pId:0, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:2, pId:0, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://movie.douban.com/"},
{ id:3, pId:2, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:3, pId:2, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:4, pId:0, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:4, pId:0, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://www.w3school.com.cn/"},
{ id:5, pId:4, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:5, pId:4, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:6, pId:0, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:6, pId:0, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:7, pId:6, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:7, pId:6, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:8, pId:0, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:8, pId:0, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://open.163.com/"},
{ id:9, pId:8, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:9, pId:8, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:1123, pId:0, name:"文件夹",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:1123, pId:0, name:"文件夹",icon:"https://favicon.lucq.fun/?url=https://y.qq.com"},
{ id:1142, pId:1, name:"收件箱",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:1142, pId:1, name:"收件箱",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:111, pId:11, name:"收件箱1",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:111, pId:19, name:"收件箱1",icon:"https://favicon.lucq.fun/?url=https://mail.sina.com.cn/"},
{ id:112, pId:111, name:"收件箱2",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:112, pId:111, name:"收件箱2",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:113, pId:112, name:"收件箱3",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:113, pId:112, name:"收件箱3",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:114, pId:113, name:"收件箱4",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:114, pId:113, name:"收件箱4",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:1321, pId:114, name:"照片",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:1321, pId:114, name:"照片",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:2322, pId:114, name:"照片",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:2322, pId:114, name:"照片",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:3323, pId:114, name:"照片",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:3323, pId:114, name:"照片",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:4324, pId:114, name:"照片",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:4324, pId:114, name:"照片",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:5325, pId:114, name:"照片",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:5325, pId:114, name:"照片",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:6399, pId:114, name:"照片",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:6399, pId:114, name:"照片",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:32, pId:399, name:"照片",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:32, pId:399, name:"照片",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:12, pId:1, name:"垃圾邮件",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:12, pId:1, name:"垃圾邮件",icon:"https://favicon.lucq.fun/?url=https://www.google.com/"},
{ id:13, pId:1, name:"草稿",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:13, pId:1, name:"草稿",icon:"https://favicon.lucq.fun/?url=https://yz.m.sm.cn/"},
{ id:14, pId:1, name:"已发送邮件",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:14, pId:1, name:"已发送邮件",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:15, pId:1, name:"已删除邮件",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:15, pId:1, name:"已删除邮件",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:322, pId:11, name:"快速视图",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:322, pId:11, name:"快速视图",icon:"https://favicon.lucq.fun/?url=https://taobao.com/"},
{ id:31, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:31, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:131, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:131, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:231, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:231, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:331, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:331, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:431, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:431, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:531, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:531, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:631, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:631, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:731, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:731, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
{ id:831, pId:3, name:"文档",icon:"https://s1.ax1x.com/2020/07/27/akpZ4O.png"}, { id:831, pId:3, name:"文档",icon:"https://favicon.lucq.fun/?url=https://www.sogou.com/"},
] ]
, ,
iconlist:[ iconlist:[
@ -198,19 +232,22 @@
methods:{ methods:{
addDiyDom:function(treeId, treeNode) { addDiyDom:function(treeId, treeNode) {
console.log("自定义ztree:"+treeId.tId+"___treeNode"+treeNode.tId)
var spaceWidth = 20; var spaceWidth = 20;
var switchObj = $("#" + treeNode.tId + "_switch"), var switchObj = $("#" + treeNode.tId + "_switch"),
icoObj = $("#" + treeNode.tId + "_ico"); icoObj = $("#" + treeNode.tId + "_ico");
switchObj.remove(); switchObj.remove();
icoObj.before(switchObj); icoObj.before(switchObj);
if (treeNode.level > -1) { if (treeNode.level > -1) {
var spaceStr = "<span style='display: inline-block;width:" + (spaceWidth * treeNode.level)+ "px'></span>"; var spaceStr = "<span style='display: inline-block;width:" + (spaceWidth * treeNode.level)+ "px'></span>";
switchObj.before(spaceStr); switchObj.before(spaceStr);
var switchObjspan = $("#" + treeNode.tId + "_span"); var switchObjspan = $("#" + treeNode.tId + "_span");
var editStr = "<span class="+treeNode.tId+"_count style='float:right;display: inline-block' onfocus='this.blur();'>99</span>";
var editStr = "<span class="+treeNode.tId+"_count style='color: #9e9e9e;float:right;display: inline-block;margin-right: 15px;font-size:8px' onfocus='this.blur();'>99</span>";
switchObjspan.after(editStr); switchObjspan.after(editStr);
} }
}, },
@ -221,7 +258,7 @@
if (confCount>0) return; if (confCount>0) return;
//if (treeNode.parentNode && treeNode.parentNode.id!=1) return; //if (treeNode.parentNode && treeNode.parentNode.id!=1) return;
var switchObjspan = $("#" + treeNode.tId + "_span"); var switchObjspan = $("#" + treeNode.tId + "_span");
var editStr = "<span class="+treeNode.tId+"_sz onclick='alert(2222);return false;' style='float:right;display: inline-block' onfocus='this.blur();'>删</span>"; var editStr = "<span class="+treeNode.tId+"_sz onclick='alert(2222);return false;' style='color: #9e9e9e;float:right;display: inline-block;margin-right: 15px;font-size:8px' onfocus='this.blur();'>删</span>";
switchObjspan.after(editStr); switchObjspan.after(editStr);
$("." + treeNode.tId + "_count").unbind().remove(); $("." + treeNode.tId + "_count").unbind().remove();
@ -236,9 +273,10 @@
removeHoverDom:function(treeId, treeNode) { removeHoverDom:function(treeId, treeNode) {
//console.log("removeHoverDom:"+"." + treeNode.tId + "_sz") //console.log("removeHoverDom:"+"." + treeNode.tId + "_sz")
//if (treeNode.parentTId && treeNode.getParentNode().id!=1) return; //if (treeNode.parentTId && treeNode.getParentNode().id!=1) return;
$("." + treeNode.tId + "_sz").unbind().remove(); $("." + treeNode.tId + "_sz").unbind().remove();
var switchObjspan = $("#" + treeNode.tId + "_span"); var switchObjspan = $("#" + treeNode.tId + "_span");
var editStr = "<span class="+treeNode.tId+"_count onclick='alert(1111111);return false;' style='float:right;display: inline-block' onfocus='this.blur();'>99</span>"; var editStr = "<span class="+treeNode.tId+"_count onclick='alert(1111111);return false;' style='color: #9e9e9e;float:right;display: inline-block;margin-right: 15px;font-size:8px' onfocus='this.blur();'>12</span>";
switchObjspan.after(editStr); switchObjspan.after(editStr);
}, },
@ -291,13 +329,31 @@
// //使IE // //使IE
// window.event.cancelBubble = true; // window.event.cancelBubble = true;
},
//
getUrl:function () {
var that=this;
if (that.sousou!=null&&that.sousou!=undefined&&that.sousou!='') {
var url=that.sousouicon+that.sousou;
window.open(url);
//window.location.href=url;
}else {
// that.$notify({
// title:'',
// type: 'success',
// message: ',!',
// });
that.$refs.sousouref.focus()
}
} }
}, },
mounted(){ mounted(){
var that=this; var that=this;
$.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes).expandAll(that.expandAll); $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes).expandAll(that.expandAll);
//
that.$refs.sousouref.focus() that.$refs.sousouref.focus()
// var _this = this // var _this = this
@ -323,12 +379,16 @@
} }
</script> </script>
<style> <style >
body{
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
}
.ztree li ul{ margin:0; padding:0} .ztree li ul{ margin:0; padding:0}
.ztree li {line-height:30px} .ztree li {line-height:30px}
.ztree li a {width:200px;height:30px;padding-top: 0px;;width:100%} .ztree li a {width:200px;height:30px;padding-top: 0px;font-size: 14px;width:100%}
.ztree li a:hover {text-decoration:none; background-color: #E7E7E7;opacity:0.4;} .ztree li a:hover {text-decoration:none; background-color: #E3E3E3;}
.ztree li a span.button.switch {vertical-align:middle} .ztree li a span.button.switch {vertical-align:middle}
.ztree.showIcon li a span.button.switch {visibility:visible} .ztree.showIcon li a span.button.switch {visibility:visible}
.ztree li a.curSelectedNode {background-color:#D4D4D4;border:0;height:30px;} .ztree li a.curSelectedNode {background-color:#D4D4D4;border:0;height:30px;}
@ -336,7 +396,7 @@
.ztree li span.button {margin-top: -4px;margin-left:3px} .ztree li span.button {margin-top: -4px;margin-left:3px}
.ztree li span.button.switch {width: 16px;height: 16px;} .ztree li span.button.switch {width: 16px;height: 16px;}
.ztree li a.level0 span {font-size: 100%;font-weight: bold} /*.ztree li a.level0 span {font-size: 100%;font-weight: bold}*/
.ztree li span.button {background-image:url("../ztree/left_menuForOutLook.png"); *background-image:url("../ztree/left_menuForOutLook.gif")} .ztree li span.button {background-image:url("../ztree/left_menuForOutLook.png"); *background-image:url("../ztree/left_menuForOutLook.gif")}
.ztree li span.button.switch.level0 {width: 20px; height:20px} .ztree li span.button.switch.level0 {width: 20px; height:20px}
.ztree li span.button.switch.level1 {width: 20px; height:20px} .ztree li span.button.switch.level1 {width: 20px; height:20px}
@ -360,16 +420,18 @@
.areaTree{ .areaTree{
width: 300px; width: 300px;
height: 700px; /*height: 700px;*/
overflow:auto; font-weight: 400;
background:url('https://ftp.bmp.ovh/imgs/2020/08/4ac1d6b4f41049ef.jpg') no-repeat; /*overflow:auto;*/
background-color: #F6F6F6;
/* background:url('https://ftp.bmp.ovh/imgs/2020/08/4ac1d6b4f41049ef.jpg') no-repeat;*/
background-size: 100% 100%; background-size: 100% 100%;
position:relative; /*position:relative;*/
animation-name:mymove; /*animation-name:mymove;*/
animation-duration:1s;/* 5s表示执行动画的时间0或不写则无动画效果 */ /*animation-duration:1s;!* 5s表示执行动画的时间0或不写则无动画效果 *!*/
/* 兼容调试如果animation-name执行那么-wekit-animation-name则不执行 */ /*!* 兼容调试如果animation-name执行那么-wekit-animation-name则不执行 *!*/
-webkit-animation-name:mymove; /*-webkit-animation-name:mymove;*/
-webkit-animation-duration:1s;/* 5s表示执行动画的时间0或不写则无动画效果 */ /*-webkit-animation-duration:1s;!* 5s表示执行动画的时间0或不写则无动画效果 *!*/
} }
@ -408,6 +470,13 @@ width: 100%;
opacity: 0.6; opacity: 0.6;
} }
.sousoucss button:hover{
color: #1c84c6;
}
.el-input-group__append{
background-color: #1f2d3d!important;
opacity: 0.7;
}
.choice { .choice {
@ -446,8 +515,16 @@ width: 100%;
color: #1c84c6; color: #1c84c6;
} }
/**顶部*/
.index-top{
width: 100%;
height: 50px;
background-color: #3c5d5b;
position: absolute;
top: 0;
opacity: 0.2;
}
/*搜索 */ /*搜索 */
.sousouicon{ .sousouicon{
@ -481,5 +558,42 @@ width: 100%;
} }
/**滚动条美化*/
/*滚动条的宽度*/
::-webkit-scrollbar {
width:5px;
height:3px;
/*background-color: red;*/
}
/*外层轨道。可以用display:none让其不显示也可以添加背景图片颜色改变显示效果*/
::-webkit-scrollbar-track {
width: 6px;
background-color:#fff;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius:2em;
}
/*滚动条的设置*/
::-webkit-scrollbar-thumb {
background-color:#606d71;
background-clip:padding-box;
min-height:28px;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius:2em;
}
/*滚动条移上去的背景*/
::-webkit-scrollbar-thumb:hover {
background-color: #7c6fff;
}
/*滚动条美化结束*/
</style> </style>

View File

@ -1302,9 +1302,9 @@
makeDOMNodeIcon: function (html, setting, node) { makeDOMNodeIcon: function (html, setting, node) {
var nameStr = data.nodeName(setting, node), var nameStr = data.nodeName(setting, node),
name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;'); name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
html.push("<span id='", node.tId, consts.id.ICON, html.push("<span id='", node.tId, consts.id.ICON,
"' title='' treeNode", consts.id.ICON, " class='", view.makeNodeIcoClass(setting, node), "' title='' treeNode", consts.id.ICON, " class='", view.makeNodeIcoClass(setting, node),
"' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN, "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span style='margin-left:3px;' id='", node.tId, consts.id.SPAN,
"' class='", consts.className.NAME, "' class='", consts.className.NAME,
"'>", name, "</span>"); "'>", name, "</span>");
}, },
@ -1330,7 +1330,7 @@
fontStyle.push(f, ":", fontcss[f], ";"); fontStyle.push(f, ":", fontcss[f], ";");
} }
html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level, html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,
nodeClasses.add ? ' ' + nodeClasses.add.join(' ') : '', nodeClasses.add ? ' ' + nodeClasses.add.join(' ') : '',
"' treeNode", consts.id.A, " onclick=\"", (node.click || ''), "' treeNode", consts.id.A, " onclick=\"", (node.click || ''),
"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(''), "\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(''),
"'"); "'");
@ -2003,4 +2003,4 @@
var zt = $.fn.zTree, var zt = $.fn.zTree,
$$ = tools.$, $$ = tools.$,
consts = zt.consts; consts = zt.consts;
})(jQuery); })(jQuery);