Commit 3ef40bd6 authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents 604345d4 1034f24d
//定义变量 //定义变量
//@import './themes/default.less'; //@import './themes/deepBlank.less';
// @import './themes/green.less'; // @import './themes/green.less';
@import './themes/blank.less'; @import './themes/default.less';
...@@ -141,17 +141,7 @@ ...@@ -141,17 +141,7 @@
font-size: 14px; font-size: 14px;
} }
.ivu-modal-header {
// background-color: #f2f2f2;
background-color: @modal-header-bg-color;
color: #fff;
border-radius: 5px 5px 0 0;
.ivu-modal-header-inner {
color: #fff;
}
}
.ivu-modal-close { .ivu-modal-close {
.ivu-icon-ios-close { .ivu-icon-ios-close {
...@@ -183,7 +173,7 @@ ...@@ -183,7 +173,7 @@
vertical-align: middle; vertical-align: middle;
float: left; float: left;
font-size: 14px; font-size: 14px;
color: @table-color; color: @form-color !important;
line-height: 1; line-height: 1;
padding: 10px 12px 10px 0; padding: 10px 12px 10px 0;
box-sizing: border-box; box-sizing: border-box;
...@@ -191,7 +181,7 @@ ...@@ -191,7 +181,7 @@
.footers { .footers {
.ivu-form .ivu-form-item-label { .ivu-form .ivu-form-item-label {
color: white; color: @form-footer-color;
} }
} }
...@@ -399,14 +389,72 @@ ...@@ -399,14 +389,72 @@
//顶部导航 //顶部导航
.i-layout-tabs { .i-layout-tabs {
background-color: @layout-tabs !important; background-color: @layout-tabs !important;
} }
.i-layout-tabs-main { .i-layout-tabs-main {
background-color: @layout-tabs !important; background-color: @layout-tabs !important;
} }
.i-layout-tabs-close-main { .i-layout-tabs-close-main {
color: @layout-tabs-close; color: @layout-tabs-close;
background-color: @layout-tabs-bg-close !important;
}
.i-layout-tabs .ivu-tabs.ivu-tabs-card>.ivu-tabs-bar .ivu-tabs-tab {
background: @tabs-bg-tag !important;
}
//弹框以及表单:
.ivu-modal-header {
// background-color: #f2f2f2;
background-color: @modal-header-bg-color;
color: #fff;
border-radius: 5px 5px 0 0;
border-bottom: 1px solid @modal-header-border-color !important;
.ivu-modal-header-inner {
color: #fff;
}
}
.ivu-modal-body {
background: @madal-body-bg-color !important;
}
.ivu-divider-horizontal.ivu-divider-with-text-left:before {
border-top: 1px solid @form-divider-boder-color !important;
}
.ivu-divider-horizontal.ivu-divider-with-text-left:after {
border-top: 1px solid @form-divider-boder-color !important;
}
.ivu-input {
background: @input-bg-color !important;
border: 1px solid @input-boder-color !important;
}
.ivu-select-selection {
background: @input-bg-color !important;
border: 1px solid @input-boder-color !important;
}
//左侧列表样式
.ivu-layout-sider-children {
background: @left-tree-bg;
}
.ivu-tree-title {
color: @tree-title-color !important;
}
.ivu-btn-group>.ivu-btn {
color: @group-btn-color;
opacity: 0.8;
background: @group-btn-bg-color;
} }
//-------------蓝色-----------
//滚动条颜色
@scrollbar-track-bg-color: rgb(239, 239, 239);
@scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5);
@scrollbar-thumb-bg-color-hover: rgba(38, 128, 235, 0.8);
@scrollbar-corner-bg-color: rgba(38, 128, 235, 1);
//顶部导航颜色
@home-mene: #2680eb;
@layout-header: #515A6E;
@layout-tabs: #f5f7f9;
@layout-tabs-close: #515A6E;
//bady颜色
@layout-content-bg-color: #fff;
@card-bg: #fff;
@body-color: #515a6e;
@border-color: #dcdfe6;
@border-bot-color: #eee;
@msg-bg-color: #fff;
//table表头颜色
@table-header: #edeef0;
@table-title-color: #515a6e;
@cao-zuo-color: #2680eb;
//user
@s1-color: #333;
//图标颜色
@icon-title-color: #2680eb;
//左右滑动图标颜色
@icon-slide1-color: #dcdfe6;
@icon-slide2-color: #a7b8cc;
//收藏夹自体图标颜色
@icon-color: #2680eb;
//首页标题颜色
@title-color: #0099ff;
//表格、表单 以及其他字体颜色
@table-color: #515A6E;
//弹框颜色
@modal-header-bg-color: #515A6E;
// -------------深色-----------
//滚动条颜色
@scrollbar-track-bg-color: rgb(239, 239, 239);
@scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5);
@scrollbar-thumb-bg-color-hover: rgba(38, 128, 235, 0.8);
@scrollbar-corner-bg-color: rgba(38, 128, 235, 1);
//顶部导航颜色
@home-mene: #106FFE;
@layout-header: #2F2F57;
@layout-tabs: #222341;
@layout-tabs-close: #fff;
@layout-tabs-bg-close: #2F2F57;
@tabs-bg-tag: #2F2F57;
//bady颜色
@layout-content-bg-color: #222341;
@card-bg: #2f2f57;
@body-color: #fff;
@border-color: #106FFE;
@border-bot-color: #2f2f57;
@msg-bg-color: #292a4e;
//首页标题颜色
@title-color: #0099ff;
//user
@s1-color: #fff;
//图标颜色
@icon-title-color: #fff;
//左右滑动图标颜色
@icon-slide1-color: #106FFE;
@icon-slide2-color: #106FFE;
//收藏夹自体图标颜色
@icon-color: #106FFE;
//table表头颜色(首页)
@table-header: #2b3568;
@table-title-color: #fff;
@cao-zuo-color: #106FFE;
//表格 以及其他字体颜色
@table-color: #fff;
//表单的颜色
@form-color: #fff;
@form-footer-color: #fff;
@form-divider-boder-color: #106FFE;
@input-bg-color: #222341;
@input-boder-color: #222341;
//弹框颜色
@modal-header-bg-color: #2F2F57;
@madal-body-bg-color: #2f2f57;
@modal-header-border-color: #106FFE;
//左侧列表
@left-tree-bg: #2F2F57;
@left-tree-header-bg-color: #2F2F57;
@left-tree-header-color: #fff;
@tree-title-color: #fff;
@group-btn-bg-color:#2F2F57;
@group-btn-color:#F5F6FA;
\ No newline at end of file
//-------------蓝色-----------
// -------------深色-----------
//滚动条颜色 //滚动条颜色
@scrollbar-track-bg-color: rgb(239, 239, 239); @scrollbar-track-bg-color: rgb(239, 239, 239);
...@@ -7,46 +6,74 @@ ...@@ -7,46 +6,74 @@
@scrollbar-thumb-bg-color-hover: rgba(38, 128, 235, 0.8); @scrollbar-thumb-bg-color-hover: rgba(38, 128, 235, 0.8);
@scrollbar-corner-bg-color: rgba(38, 128, 235, 1); @scrollbar-corner-bg-color: rgba(38, 128, 235, 1);
//顶部导航颜色 //顶部导航颜色
@home-mene: #2680eb; @home-mene: #2680eb;
@layout-header: #2f2f57; @layout-header: #515A6E;
@layout-tabs: #5151f1; @layout-tabs: #f5f7f9;
@layout-tabs-close: #515A6E; @layout-tabs-close: #515A6E;
@layout-tabs-bg-close:#fff;
@tabs-bg-tag: #fff;
//bady颜色 //bady颜色
@layout-content-bg-color: #232341; @layout-content-bg-color: #fff;
@card-bg: #2f2f57; @card-bg: #fff;
@body-color: #fff; @body-color: #515a6e;
@border-color: #2680eb; @border-color: #dcdfe6;
@border-bot-color: #2f2f57; @border-bot-color: #eee;
@msg-bg-color: #292a4e; @msg-bg-color: #fff;
//table表头颜色 //首页标题颜色
@table-header: #2b3568; @title-color: #0099ff;
@table-title-color: #fff;
@cao-zuo-color: #2680eb;
//user //user
@s1-color: #fff; @s1-color: #333;
//图标颜色 //图标颜色
@icon-title-color: #fff; @icon-title-color: #2680eb;
//左右滑动图标颜色 //左右滑动图标颜色
@icon-slide1-color: #22489a; @icon-slide1-color: #dcdfe6;
@icon-slide2-color: #5d7291; @icon-slide2-color: #a7b8cc;
//收藏夹自体图标颜色 //收藏夹自体图标颜色
@icon-color: #2680eb; @icon-color: #2680eb;
//首页标题颜色
@title-color: #0099ff;
//表格、表单 以及其他字体颜色
@table-color: #fff; //table表头颜色(首页)
@table-header: #edeef0;
@table-title-color: #515a6e;
@cao-zuo-color: #2680eb;
//表格、 以及其他字体颜色
@table-color: #515A6E;
//表单的颜色
@form-color: #515a6e;
@form-footer-color: #fff;
@form-divider-boder-color:#e8eaec;
@input-bg-color:#fff;
@input-boder-color:#dcdee2;
//弹框颜色 //弹框颜色
@modal-header-bg-color: #515A6E; @modal-header-bg-color: #515A6E;
@madal-body-bg-color: #fff;
@modal-header-border-color: #e8eaec;
//左侧列表
@left-tree-bg:#fff;
@left-tree-header-bg-color: #f5f6fa;
@left-tree-header-color: #515a6e;
@tree-title-color:#515a6e;
@group-btn-bg-color:#fff;
@group-btn-color:#515a6e;
\ No newline at end of file
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
@layout-header: #515A6E; @layout-header: #515A6E;
@layout-tabs: #f5f7f9; @layout-tabs: #f5f7f9;
@layout-tabs-close: #515A6E; @layout-tabs-close: #515A6E;
@layout-tabs-bg-close:#fff;
@tabs-bg-tag: #fff;
//bady颜色 //bady颜色
@layout-content-bg-color: #fff; @layout-content-bg-color: #fff;
...@@ -21,15 +23,13 @@ ...@@ -21,15 +23,13 @@
@border-bot-color: #eee; @border-bot-color: #eee;
@msg-bg-color: #fff; @msg-bg-color: #fff;
//table表头颜色
@table-header: #2b3568;
@table-title-color: #fff;
@cao-zuo-color: #04bb8c;
//user //user
@s1-color: #333; @s1-color: #333;
//首页标题颜色
@title-color: #04bb8c;
//图标颜色 //图标颜色
@icon-title-color: #04bb8c; @icon-title-color: #04bb8c;
...@@ -42,11 +42,37 @@ ...@@ -42,11 +42,37 @@
//收藏夹自体图标颜色 //收藏夹自体图标颜色
@icon-color: #04bb8c; @icon-color: #04bb8c;
//首页标题颜色
@title-color: #04bb8c;
//表格、表单 以及其他字体颜色
//table表头颜色(首页)
@table-header: #2b3568;
@table-title-color: #fff;
@cao-zuo-color: #04bb8c;
//表格、以及其他字体颜色
@table-color: #515A6E; @table-color: #515A6E;
//表单的颜色
@form-color: #515a6e;
@form-footer-color: #fff;
@form-divider-boder-color:#e8eaec;
@input-bg-color:#fff;
@input-boder-color:#dcdee2;
//弹框颜色 //弹框颜色
@modal-header-bg-color: #515A6E; @modal-header-bg-color: #515A6E;
@madal-body-bg-color: #fff;
@modal-header-border-color: #e8eaec;
//左侧列表
@left-tree-bg:#fff;
@left-tree-header-bg-color: #f5f6fa;
@left-tree-header-color: #515a6e;
@tree-title-color:#515a6e;
@group-btn-bg-color:#fff;
@group-btn-color:#515a6e;
\ No newline at end of file
<template> <template>
<div class="flex fd tree-menu"> <div class="flex fd tree-menu">
<h3> <h3>
产品结构 产品结构
<div class="fr mr10 mt10"> <div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small"> <ButtonGroup class="fr" size="small">
...@@ -33,8 +33,8 @@ export default { ...@@ -33,8 +33,8 @@ export default {
expand: false, expand: false,
ids: [], ids: [],
tree: [], tree: [],
divHeight:'', divHeight: "",
keys: "", keys: "",
// list: [] // list: []
}; };
...@@ -45,23 +45,23 @@ export default { ...@@ -45,23 +45,23 @@ export default {
methods: { methods: {
toggle() { toggle() {
this.expand = !this.expand; this.expand = !this.expand;
this.loadTree() this.loadTree();
}, },
async loadTree() { async loadTree() {
this.$http.storeHouse this.$http.storeHouse
.getpaged({ materialType: this.type }) .getpaged({ materialType: this.type })
.then((res) => { .then((res) => {
console.log(res.result) console.log(res.result);
if (res.result) { if (res.result) {
let items = res.result; let items = res.result;
// let item = this.$u.clone(res.result); // let item = this.$u.clone(res.result);
console.log('items:',items) console.log("items:", items);
this.tree = this.getTrees(items) this.tree = this.getTrees(items);
this.change1(this.tree) this.change1(this.tree);
search(this.keys, items); search(this.keys, items);
function search(keys, items) { function search(keys, items) {
items.map(u => { items.map((u) => {
if (keys.length < 3) { if (keys.length < 3) {
u.expand = expand; u.expand = expand;
result.push(u); result.push(u);
...@@ -75,36 +75,36 @@ export default { ...@@ -75,36 +75,36 @@ export default {
} }
}); });
} }
} else { } else {
this.$Message.error('加载库房库位树失败!') this.$Message.error("加载库房库位树失败!");
} }
}) });
}, },
//重构左侧树 //重构左侧树
getTrees(trees) { getTrees(trees) {
var expand = this.expand var expand = this.expand;
trees.forEach((data, index) => { trees.forEach((data, index) => {
var that = this var that = this;
data.expand = expand data.expand = expand;
if (data.children.length > 0) { if (data.children.length > 0) {
this.getTrees(data.children) this.getTrees(data.children);
} }
}) });
return trees return trees;
}, },
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
return h( return h(
'span', "span",
{ {
style: { style: {
color: data.isClick ? '#000' : '#bbb', //根据选中状态设置样式 color: data.isClick ? "#000" : "#bbb", //根据选中状态设置样式
cursor: data.isClick ? 'pointer' : '', cursor: data.isClick ? "pointer" : "",
background: node.node.selected&&data.isClick ? '#AAD8D4' : '#ffffff', background:
paddingLeft: '10px', node.node.selected && data.isClick ? "#AAD8D4" : "#ffffff",
paddingRight: '10px', paddingLeft: "10px",
paddingTop: '3px', paddingRight: "10px",
paddingBottom: '3px' paddingTop: "3px",
paddingBottom: "3px",
}, },
on: { on: {
// click: () => { // click: () => {
...@@ -112,49 +112,49 @@ export default { ...@@ -112,49 +112,49 @@ export default {
// this.$refs.tree.handleSelect(node.nodeKey) //手动选择树节点 // this.$refs.tree.handleSelect(node.nodeKey) //手动选择树节点
// } // }
// } // }
} },
}, },
data.title data.title
) );
}, },
//得到此树节点下所有是产品的Id //得到此树节点下所有是产品的Id
getAllIds(trees) { getAllIds(trees) {
trees.forEach((data, index) => { trees.forEach((data, index) => {
var that = this var that = this;
if (data.isClick) { if (data.isClick) {
this.ids.push(data.id) this.ids.push(data.id);
} }
if (data.children.length > 0) { if (data.children.length > 0) {
this.getAllIds(data.children) this.getAllIds(data.children);
} }
}) });
}, },
change(value) { change(value) {
if (value.length > 0) { if (value.length > 0) {
if (value[0].isClick) { if (value[0].isClick) {
this.ids = [] this.ids = [];
this.getAllIds(value) this.getAllIds(value);
if (this.ids.length > 0) { if (this.ids.length > 0) {
this.$emit('storeIds', this.ids) this.$emit("storeIds", this.ids);
//this.easySearch.storeId.value = this.ids //this.easySearch.storeId.value = this.ids
} else { } else {
this.$emit('storeIds', [-1]) this.$emit("storeIds", [-1]);
} }
} else { } else {
this.$Message.error('当前操作用户无此库位的权限') this.$Message.error("当前操作用户无此库位的权限");
this.$emit('storeIds', [-1]) this.$emit("storeIds", [-1]);
} }
} }
}, },
change1(value) { change1(value) {
if (value.length > 0) { if (value.length > 0) {
this.ids = [] this.ids = [];
this.getAllIds(value) this.getAllIds(value);
if (this.ids.length > 0) { if (this.ids.length > 0) {
this.$emit('storeIds', this.ids) this.$emit("storeIds", this.ids);
} else { } else {
this.$emit('storeIds', [-1]) this.$emit("storeIds", [-1]);
} }
} }
}, },
...@@ -184,7 +184,7 @@ export default { ...@@ -184,7 +184,7 @@ export default {
// }, // },
hide() { hide() {
this.$emit("on-hide"); this.$emit("on-hide");
} },
}, },
computed: { computed: {
data() { data() {
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
let result = []; let result = [];
search(this.keys, items); search(this.keys, items);
function search(keys, data) { function search(keys, data) {
data.map(u => { data.map((u) => {
if (keys.length < 3) { if (keys.length < 3) {
u.expand = expand; u.expand = expand;
result.push(u); result.push(u);
...@@ -208,12 +208,13 @@ export default { ...@@ -208,12 +208,13 @@ export default {
}); });
} }
return result; return result;
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../assets/css/custom.less";
.tree-menu { .tree-menu {
h3 { h3 {
height: 50px; height: 50px;
...@@ -221,8 +222,8 @@ export default { ...@@ -221,8 +222,8 @@ export default {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: bold; font-weight: bold;
line-height: 50px; line-height: 50px;
color: rgba(81, 90, 110, 1); color: @left-tree-header-color;
background:rgba(245,246,250,1); background: @left-tree-header-bg-color;
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
......
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
@import "../../assets/css/custom.less";
.tree-menu { .tree-menu {
h3 { h3 {
height: 50px; height: 50px;
...@@ -151,8 +152,8 @@ export default { ...@@ -151,8 +152,8 @@ export default {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: bold; font-weight: bold;
line-height: 50px; line-height: 50px;
color: rgba(81, 90, 110, 1); color: @left-tree-header-color;
background: rgba(245, 246, 250, 1); background: @left-tree-header-bg-color;
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
......
...@@ -147,6 +147,7 @@ export default { ...@@ -147,6 +147,7 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
@import "../../assets/css/custom.less";
.tree-menu { .tree-menu {
h3 { h3 {
height: 50px; height: 50px;
...@@ -154,8 +155,8 @@ export default { ...@@ -154,8 +155,8 @@ export default {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: bold; font-weight: bold;
line-height: 50px; line-height: 50px;
color: rgba(81, 90, 110, 1); color: @left-tree-header-color;
background: rgba(245, 246, 250, 1); background: @left-tree-header-bg-color;
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
......
...@@ -402,6 +402,7 @@ export default { ...@@ -402,6 +402,7 @@ export default {
margin-top: 10px; margin-top: 10px;
font-size: 30px; font-size: 30px;
color: @icon-slide1-color; color: @icon-slide1-color;
opacity: 0.4;
position: absolute; position: absolute;
width: 40px; width: 40px;
top: 13px; top: 13px;
...@@ -411,6 +412,7 @@ export default { ...@@ -411,6 +412,7 @@ export default {
margin-top: 10px; margin-top: 10px;
font-size: 30px; font-size: 30px;
color: @icon-slide2-color; color: @icon-slide2-color;
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
width: 40px; width: 40px;
...@@ -422,6 +424,7 @@ export default { ...@@ -422,6 +424,7 @@ export default {
margin-top: 10px; margin-top: 10px;
font-size: 30px; font-size: 30px;
color: @icon-slide1-color; color: @icon-slide1-color;
opacity: 0.4;
position: absolute; position: absolute;
top: 13px; top: 13px;
right: 0; right: 0;
...@@ -431,6 +434,7 @@ export default { ...@@ -431,6 +434,7 @@ export default {
margin-top: 10px; margin-top: 10px;
font-size: 30px; font-size: 30px;
color: @icon-slide2-color; color: @icon-slide2-color;
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
top: 13px; top: 13px;
...@@ -472,6 +476,7 @@ export default { ...@@ -472,6 +476,7 @@ export default {
.bg-b { .bg-b {
font-size: 30px; font-size: 30px;
color: @icon-slide1-color; color: @icon-slide1-color;
opacity: 0.4;
width: 35px; width: 35px;
position: absolute; position: absolute;
top: 45px; top: 45px;
...@@ -480,6 +485,7 @@ export default { ...@@ -480,6 +485,7 @@ export default {
.bg-b1 { .bg-b1 {
font-size: 30px; font-size: 30px;
color: @icon-slide2-color; color: @icon-slide2-color;
width: 35px; width: 35px;
position: absolute; position: absolute;
top: 45px; top: 45px;
...@@ -496,6 +502,7 @@ export default { ...@@ -496,6 +502,7 @@ export default {
position: absolute; position: absolute;
font-size: 30px; font-size: 30px;
color: @icon-slide1-color; color: @icon-slide1-color;
opacity: 0.4;
top: 45px; top: 45px;
right: 0; right: 0;
width: 35px; width: 35px;
......
...@@ -398,8 +398,8 @@ export default { ...@@ -398,8 +398,8 @@ export default {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: bold; font-weight: bold;
line-height: 50px; line-height: 50px;
color: rgba(81, 90, 110, 1); color: @left-tree-header-color;
background: rgba(245, 246, 250, 1); background: @left-tree-header-bg-color;
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
......
...@@ -315,8 +315,8 @@ export default { ...@@ -315,8 +315,8 @@ export default {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: bold; font-weight: bold;
line-height: 50px; line-height: 50px;
color: rgba(81, 90, 110, 1); color: @left-tree-header-color;
background: rgba(245, 246, 250, 1); background: @left-tree-header-bg-color;
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
......
...@@ -301,12 +301,13 @@ export default { ...@@ -301,12 +301,13 @@ export default {
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../assets/css/custom.less";
.resources-p { .resources-p {
.form-row { .form-row {
width: 600px; width: 600px;
margin-left: 50px; margin-left: 50px;
.ivu-form-item-label { .ivu-form-item-label {
color: #fff !important; color: @form-color;
} }
} }
.ivu-footer-toolbar-right { .ivu-footer-toolbar-right {
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
modal: false, modal: false,
title: "新增", title: "新增",
curId: 0, curId: 0,
detail: null detail: null,
}; };
}, },
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
title: "删除", title: "删除",
content: "<p>您确定要删除吗?</p>", content: "<p>您确定要删除吗?</p>",
onOk: () => { onOk: () => {
Api.delete(this.nodeInfo.id).then(r => { Api.delete(this.nodeInfo.id).then((r) => {
if (r.success) { if (r.success) {
this.loadTree(); this.loadTree();
this.$Message.success("删除成功"); this.$Message.success("删除成功");
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
}, },
onCancel: () => { onCancel: () => {
this.$Message.success("取消删除"); this.$Message.success("取消删除");
} },
}); });
} }
}, },
...@@ -125,14 +125,14 @@ export default { ...@@ -125,14 +125,14 @@ export default {
// this.handleSelect(data); //手动选择树节点 // this.handleSelect(data); //手动选择树节点
// }, // },
//右键点击事件 //右键点击事件
contextmenu: e => { contextmenu: (e) => {
e.preventDefault(); e.preventDefault();
this.$refs.contentMenu.$refs.reference = event.target; this.$refs.contentMenu.$refs.reference = event.target;
this.$refs.contentMenu.currentVisible = !this.$refs.contentMenu this.$refs.contentMenu.currentVisible = !this.$refs.contentMenu
.currentVisible; .currentVisible;
this.nodeInfo = data; this.nodeInfo = data;
} },
} },
}, },
data.title data.title
); );
...@@ -141,10 +141,10 @@ export default { ...@@ -141,10 +141,10 @@ export default {
// this.$emit("clickItem", data); // this.$emit("clickItem", data);
// }, // },
loadTree() { loadTree() {
Api.getleveltree().then(r => { Api.getleveltree().then((r) => {
setTree(r.result); setTree(r.result);
function setTree(data) { function setTree(data) {
data.map(u => { data.map((u) => {
u.title = u.name; u.title = u.name;
u.value = u.id; u.value = u.id;
if (u.children) { if (u.children) {
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
if (b.children) { if (b.children) {
addId(b.children); addId(b.children);
function addId(data) { function addId(data) {
data.map(u => { data.map((u) => {
ids.push(u.value); ids.push(u.value);
if (u.children) { if (u.children) {
addId(u.children); addId(u.children);
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
}, },
hide() { hide() {
this.$emit("on-hide"); this.$emit("on-hide");
} },
}, },
computed: { computed: {
data() { data() {
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
let result = []; let result = [];
search(this.keys, items); search(this.keys, items);
function search(keys, data) { function search(keys, data) {
data.map(u => { data.map((u) => {
if (keys.length < u.title) { if (keys.length < u.title) {
u.expand = expand; u.expand = expand;
result.push(u); result.push(u);
...@@ -203,12 +203,13 @@ export default { ...@@ -203,12 +203,13 @@ export default {
}); });
} }
return result; return result;
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../../assets/css/custom.less";
.tree-menu { .tree-menu {
h3 { h3 {
height: 50px; height: 50px;
...@@ -216,8 +217,8 @@ export default { ...@@ -216,8 +217,8 @@ export default {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: bold; font-weight: bold;
line-height: 50px; line-height: 50px;
color: rgba(81, 90, 110, 1); color: @left-tree-header-color;
background: rgba(245, 246, 250, 1); background: @left-tree-header-bg-color;
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
vertical-align: middle; vertical-align: middle;
float: left; float: left;
font-size: 14px; font-size: 14px;
color: #515a6e; /* color: #515a6e; */
line-height: 1; line-height: 1;
padding: 10px 12px 10px 0; padding: 10px 12px 10px 0;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -11396,8 +11396,7 @@ textarea.ivu-page-options-elevator input { ...@@ -11396,8 +11396,7 @@ textarea.ivu-page-options-elevator input {
background-clip: padding-box background-clip: padding-box
} }
.ivu-modal-header { .ivu-modal-header {
border-bottom: 1px solid #e3e8ee;
padding: 14px 16px; padding: 14px 16px;
line-height: 1 line-height: 1
} }
...@@ -14104,13 +14103,13 @@ span.ivu-date-picker-cells-cell-disabled.ivu-date-picker-cells-cell-selected em ...@@ -14104,13 +14103,13 @@ span.ivu-date-picker-cells-cell-disabled.ivu-date-picker-cells-cell-selected em
vertical-align: middle; vertical-align: middle;
float: left; float: left;
font-size: 12px; font-size: 12px;
color: #657180; /* color: #657180; */
line-height: 1; line-height: 1;
padding: 10px 12px 10px 0; padding: 10px 12px 10px 0;
box-sizing: border-box box-sizing: border-box
} }
.ivu-form-label-left .ivu-form-item-label { .ivu-form-label-left . {
text-align: left text-align: left
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment