Compare commits
14 Commits
lb
...
a08af6774e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a08af6774e | ||
|
|
3c38763cf4 | ||
|
|
23b7b85b39 | ||
| 2f2eaf4e20 | |||
|
|
a5a4f93328 | ||
|
|
f7938f30e2 | ||
|
|
d23cb260a4 | ||
|
|
e5eb49a7b6 | ||
|
|
35d5d91c23 | ||
| f3a7e38d13 | |||
| 1617bc347a | |||
| 68c271618a | |||
| ff11e1d3fb | |||
| 37c0c445a3 |
13
src/App.vue
@@ -1,3 +1,11 @@
|
||||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-11-25 09:51:46
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-12-13 19:44:21
|
||||
-->
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<router-view />
|
||||
@@ -11,7 +19,7 @@
|
||||
</style>
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
import { messages } from '@/i18n'
|
||||
// import { messages } from '@/i18n'
|
||||
export default {
|
||||
watch: {
|
||||
'$i18n.locale': 'i18nHandle'
|
||||
@@ -23,7 +31,8 @@ export default {
|
||||
i18nHandle(val, oldVal) {
|
||||
Cookies.set('language', val)
|
||||
document.querySelector('html').setAttribute('lang', val)
|
||||
document.title = messages[val].brand.lg
|
||||
// 不注释掉会报错
|
||||
// document.title = messages[val].brand.lg
|
||||
// 非登录页面,切换语言刷新页面
|
||||
if (this.$route.name !== 'login' && oldVal) {
|
||||
window.location.reload()
|
||||
|
||||
BIN
src/assets/img/choicepart/Basic Data.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/img/choicepart/Data Analysis.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
src/assets/img/choicepart/Equipment PLC.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
src/assets/img/choicepart/Factory Management.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
src/assets/img/choicepart/Log Management.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
src/assets/img/choicepart/Log Management2.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
src/assets/img/choicepart/MaterialsManage.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
src/assets/img/choicepart/OperationalOverview.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
src/assets/img/choicepart/Permission Management.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
src/assets/img/choicepart/Quality Management.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
src/assets/img/choicepart/Report Management.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
src/assets/img/choicepart/System Settings.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
src/assets/img/choicepart/choice-item-back.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
src/assets/img/choicepart/choicepart-back.png
Normal file
|
After Width: | Height: | Size: 3.5 MiB |
BIN
src/assets/img/choicepart/packingManage.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
src/assets/img/choicepart/厂务管理.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
src/assets/img/choicepart/基本资料.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/img/choicepart/报表管理.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
src/assets/img/choicepart/数据分析.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
src/assets/img/choicepart/日志管理.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
src/assets/img/choicepart/日志管理2.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
src/assets/img/choicepart/权限管理.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
src/assets/img/choicepart/系统设置.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
src/assets/img/choicepart/设备数采.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
src/assets/img/choicepart/质量管理.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
src/assets/img/cnbm.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/img/login-back.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
src/assets/img/login-back.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
src/assets/img/login.gif
Normal file
|
After Width: | Height: | Size: 4.6 MiB |
@@ -5,6 +5,8 @@
|
||||
}
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
// font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
||||
// font-family: Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;
|
||||
font-size: $--font-size-base;
|
||||
line-height: $base--line-height;
|
||||
color: $--color-text-primary;
|
||||
@@ -15,8 +17,8 @@ a {
|
||||
text-decoration: none;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
text-decoration: underline;
|
||||
color: #fff;
|
||||
// text-decoration: underline;
|
||||
}
|
||||
}
|
||||
img {
|
||||
@@ -217,6 +219,17 @@ img {
|
||||
&__brand {
|
||||
&-lg {
|
||||
display: none;
|
||||
// margin: 0;
|
||||
// color: #fff;
|
||||
// width: 189px;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// font-weight: 500;
|
||||
// line-height: 50px;
|
||||
// font-size: 14px;
|
||||
// font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
// vertical-align: middle;
|
||||
}
|
||||
&-mini {
|
||||
display: inline-block;
|
||||
@@ -241,6 +254,9 @@ img {
|
||||
margin-right: 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
&__close {
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
.aui-content {
|
||||
&__wrapper {
|
||||
@@ -265,10 +281,24 @@ img {
|
||||
align-items: stretch;
|
||||
height: $navbar--height;
|
||||
background-color: $--color-primary;
|
||||
box-shadow: 0 1px 0 0 rgba(0, 0, 0, .05);
|
||||
box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05);
|
||||
.home {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1030;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
height: $navbar--height;
|
||||
background-color: #409EFF;
|
||||
box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
&--colorful {
|
||||
.aui-navbar__body {
|
||||
// navbar body颜色
|
||||
background-color: transparent;
|
||||
// background-color: #304156;
|
||||
}
|
||||
.aui-navbar__menu {
|
||||
> .el-menu-item,
|
||||
@@ -278,6 +308,7 @@ img {
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: mix(#000, $--color-primary, 15%);
|
||||
// background-color: #001528;
|
||||
}
|
||||
}
|
||||
> .el-menu-item.is-active,
|
||||
@@ -285,7 +316,7 @@ img {
|
||||
color: #fff;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
color: #263445;
|
||||
}
|
||||
}
|
||||
.el-menu-item i,
|
||||
@@ -332,7 +363,16 @@ img {
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
transition: width .3s;
|
||||
&-lg,
|
||||
&-lg {
|
||||
width: 238px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
line-height: 20px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
&-mini {
|
||||
max-width: 100%;
|
||||
color: #fff;
|
||||
@@ -371,9 +411,13 @@ img {
|
||||
.el-menu-item.is-active,
|
||||
.el-submenu.is-active > .el-submenu__title {
|
||||
color: $--color-text-secondary;
|
||||
// background-color: rgb(13,43,104);
|
||||
&:focus,
|
||||
&:hover {
|
||||
// 点击之后图标颜色亮度
|
||||
color: $--color-text-primary;
|
||||
// color: #fff;
|
||||
// background-color: rgb(13,43,104);
|
||||
}
|
||||
}
|
||||
.el-menu-item {
|
||||
@@ -392,9 +436,10 @@ img {
|
||||
* {
|
||||
vertical-align: initial;
|
||||
}
|
||||
//
|
||||
.aui-navbar__icon-menu {
|
||||
vertical-align: middle;
|
||||
font-size: 16px;
|
||||
font-size: 22px;
|
||||
}
|
||||
.el-dropdown {
|
||||
color: $--color-text-secondary;
|
||||
@@ -463,7 +508,8 @@ img {
|
||||
bottom: 0;
|
||||
z-index: 1020;
|
||||
width: $sidebar--width;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
background-color:#304156;
|
||||
box-shadow: 1px 0 2px 0 rgba(0, 0, 0, .05);
|
||||
overflow: hidden;
|
||||
transition: width .3s;
|
||||
@@ -471,23 +517,28 @@ img {
|
||||
background-color: $sidebar--background-color-dark;
|
||||
.aui-sidebar__menu,
|
||||
> .el-menu--popup {
|
||||
background-color: $sidebar--background-color-dark;
|
||||
// background-color: $sidebar--background-color-dark;
|
||||
background-color: #304156;;
|
||||
.el-menu-item,
|
||||
.el-submenu > .el-submenu__title {
|
||||
color: $sidebar--text-color-dark;
|
||||
// color: $sidebar--text-color-dark;
|
||||
color: #f4f4f5;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: mix(#fff, $sidebar--text-color-dark, 50%);
|
||||
background-color: mix(#fff, $sidebar--background-color-dark, 2.5%);
|
||||
// background-color: mix(#fff, $sidebar--background-color-dark, 2.5%);
|
||||
background-color:#0B253F;
|
||||
}
|
||||
}
|
||||
.el-menu,
|
||||
.el-submenu.is-opened {
|
||||
background-color: mix(#000, $sidebar--background-color-dark, 15%);
|
||||
// background-color: mix(#000, $sidebar--background-color-dark, 15%);
|
||||
background-color:#0B253F;
|
||||
}
|
||||
.el-menu-item.is-active,
|
||||
.el-submenu.is-active > .el-submenu__title {
|
||||
color: mix(#fff, $sidebar--text-color-dark, 80%);
|
||||
// color: mix(#fff, $sidebar--text-color-dark, 80%);
|
||||
color: #409EFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,6 +552,10 @@ img {
|
||||
overflow-y: scroll;
|
||||
transition: width .3s;
|
||||
}
|
||||
.close {
|
||||
width: 0px;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
&__menu {
|
||||
width: $sidebar--width;
|
||||
border-right: 0;
|
||||
@@ -532,6 +587,7 @@ img {
|
||||
min-height: calc(100vh - #{$navbar--height});
|
||||
&__wrapper {
|
||||
position: relative;
|
||||
// 注释掉可隐藏侧边栏,但需要在main.vue中加入main-content的限制条件
|
||||
margin-left: $sidebar--width;
|
||||
min-height: calc(100vh - #{$navbar--height});
|
||||
background-color: $content--background-color;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
.mod-home {
|
||||
table {
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
border: 1px solid $--border-color-lighter;
|
||||
border-collapse: collapse;
|
||||
th,
|
||||
|
||||
@@ -5,15 +5,19 @@ $base--line-height: 1.15;
|
||||
$navbar--height: 50px;
|
||||
|
||||
// Sidebar
|
||||
$sidebar--width: 300px;
|
||||
// $sidebar--width: 300px;
|
||||
$sidebar--width: 248px;
|
||||
$sidebar--width-fold: 64px;
|
||||
$sidebar--background-color-dark: #263238;
|
||||
// $sidebar--background-color-dark: #263238;
|
||||
// $sidebar--background-color-dark: #001529;
|
||||
$sidebar--background-color-dark: #304156;
|
||||
$sidebar--text-color-dark: #8a979e;
|
||||
$sidebar--menu-item-height: 48px;
|
||||
|
||||
// Content
|
||||
$content--padding: 15px;
|
||||
$content--background-color: #f1f4f5;
|
||||
// $content--background-color: #f1f4f5;
|
||||
$content--background-color: #fff;
|
||||
$content--card-header-height: 60px;
|
||||
$content--tabs-header-height: 38px;
|
||||
// Content, 填充整屏高度(非tabs状态) = 整屏高度 - 导航条高度 - aui-content上下内边距高度
|
||||
|
||||
93
src/components/Breadcrumb/index.vue
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-01-27 10:07:42
|
||||
* @LastEditTime: 2021-01-28 16:26:15
|
||||
* @LastEditors: gtz
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \mt-bus-fe\src\components\Breadcrumb\index.vue
|
||||
-->
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="isredirect">{{ item.meta.title }}</span>
|
||||
<span v-else class="no-redirect">{{ item.meta.title }}</span>
|
||||
<!-- @click.prevent="handleLink(item)" -->
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route(route) {
|
||||
// if you go to the redirect page, do not update the breadcrumbs
|
||||
if (route.path.startsWith('/redirect/')) {
|
||||
return
|
||||
}
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
},
|
||||
methods: {
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
const matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
||||
// const first = matched[0]
|
||||
|
||||
// if (!this.isDashboard(first)) {
|
||||
// matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
|
||||
// }
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(this.pathCompile(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 48px;
|
||||
margin-left: 8px;
|
||||
.isredirect {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
.no-redirect {
|
||||
color: #8C8C8C;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
35
src/components/Hamburger/index.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<div style="padding: 5px 15px 5px 32px;" @click="toggleClick">
|
||||
<svg-icon style="width: 24px; height: 24px" class="item-icon hamburger" :class="{'is-active':isActive}" icon-class="hamburgerBtn" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Hamburger',
|
||||
props: {
|
||||
isActive: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleClick() {
|
||||
this.$emit('toggleClick')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.hamburger {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.hamburger.is-active {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
</style>
|
||||
62
src/components/SvgIcon/index.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||
<use :xlink:href="iconName" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
|
||||
import { isExternal } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'SvgIcon',
|
||||
props: {
|
||||
iconClass: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isExternal() {
|
||||
return isExternal(this.iconClass)
|
||||
},
|
||||
iconName() {
|
||||
return `#icon-${this.iconClass}`
|
||||
},
|
||||
svgClass() {
|
||||
if (this.className) {
|
||||
return 'svg-icon ' + this.className
|
||||
} else {
|
||||
return 'svg-icon'
|
||||
}
|
||||
},
|
||||
styleExternalIcon() {
|
||||
return {
|
||||
mask: `url(${this.iconClass}) no-repeat 50% 50%`,
|
||||
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.svg-external-icon {
|
||||
background-color: currentColor;
|
||||
mask-size: cover!important;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
@@ -1,16 +1,41 @@
|
||||
<template>
|
||||
<div class="base-table">
|
||||
<!-- 花式新增按钮 -->
|
||||
<div class="setting">
|
||||
<template v-if="topBtnConfig.length > 0">
|
||||
<!-- table顶部操作按钮区 -->
|
||||
<div class="action_btn">
|
||||
<template v-for="(btn, index) in topBtnConfig">
|
||||
<span v-if="btn.type === 'add'" :key="index" style="display: inline-block" @click="clickTopButton(btn.type)">
|
||||
<svg-icon style="width: 14px; height: 14px" class="iconPlus" icon-class="addPage" />
|
||||
<span class="add">{{ $t('add') }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 设置小齿轮table列的图标 -->
|
||||
<el-popover placement="bottom-start" width="200" trigger="click">
|
||||
<div class="setting-box">
|
||||
<el-checkbox v-for="(item, index) in tableHeadConfigs" :key="'cb' + index" v-model="selectedBox[index]" :label="item.name" />
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-s-tools" style="color: #0b58ff" />
|
||||
</el-popover>
|
||||
</div>
|
||||
<!-- border 属性增加边框:header-cell-style="{background:'#FAFAFA',color:'#606266',height: '40px'}" -->
|
||||
<!-- <el-table :data="data" -->
|
||||
<el-table
|
||||
:data="data"
|
||||
:data="renderData"
|
||||
style="width: 100%"
|
||||
fit
|
||||
border
|
||||
:header-cell-style="{ background: '#FAFAFA', color: '#606266', height: '40px' }"
|
||||
highlight-current-row
|
||||
:header-cell-style="{ background: '#FAFAFA', color: '#000', height: '40px' }"
|
||||
:max-height="maxHeight"
|
||||
:span-method="spanMethod || null"
|
||||
>
|
||||
:row-style="{ height: '20px' }"
|
||||
:cell-style="{ padding: '0px' }">
|
||||
<!-- 表格头定义 -->
|
||||
<template v-for="(head, idx) in tableHeadConfigs">
|
||||
<!-- in tableHeadConfigs -->
|
||||
<template v-for="(head, idx) in renderTableHeadList">
|
||||
<!-- 带type的表头 -->
|
||||
<el-table-column
|
||||
:key="idx"
|
||||
@@ -20,11 +45,14 @@
|
||||
:header-align="head.align || 'center'"
|
||||
:align="head.align || 'center'"
|
||||
:width="head.width || 50"
|
||||
:index="head.type === 'index' ? val => {
|
||||
:index="
|
||||
head.type === 'index'
|
||||
? (val) => {
|
||||
return val + 1 + (page - 1) * size
|
||||
} : null"
|
||||
v-bind="head.more"
|
||||
></el-table-column>
|
||||
}
|
||||
: null
|
||||
"
|
||||
v-bind="head.more"></el-table-column>
|
||||
<!-- 普通的表头 -->
|
||||
<el-table-column
|
||||
v-else
|
||||
@@ -38,9 +66,8 @@
|
||||
:tooltip-effect="head.tooltipEffect || 'light'"
|
||||
filter-placement="top"
|
||||
:align="head.align || null"
|
||||
v-bind="head.more"
|
||||
>
|
||||
<!-- 子组件 -->
|
||||
v-bind="head.more">
|
||||
<!-- 子组件 编辑/删除 -->
|
||||
<template v-if="head.prop" slot-scope="scope">
|
||||
<component v-if="head.subcomponent" :is="head.subcomponent" :key="idx + 'sub'" :inject-data="{ ...scope.row, head }" @emit-data="handleSubEmitData" />
|
||||
<!-- 直接展示数据或应用过滤器 -->
|
||||
@@ -58,13 +85,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isObject, isString } from 'lodash'
|
||||
import TableHead from './components/table-head.vue'
|
||||
export default {
|
||||
name: 'BaseTable',
|
||||
filters: {
|
||||
commonFilter: (source, filterType = (a) => a) => {
|
||||
return filterType(source)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
tableHeadConfigs: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
// required: true,
|
||||
// validator: val => val.filter(item => !isString(item.prop) || !isString(item.name)).length === 0
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
@@ -72,6 +107,7 @@ export default {
|
||||
},
|
||||
maxHeight: {
|
||||
type: Number,
|
||||
// default: window.innerHeight - 325
|
||||
default: 500
|
||||
},
|
||||
spanMethod: {
|
||||
@@ -88,21 +124,92 @@ export default {
|
||||
size: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
// 新增的props
|
||||
// tableConfig: {
|
||||
// type: Array,
|
||||
// required: true,
|
||||
// validator: (val) => val.filter((item) => !isString(item.prop) || !isString(item.label)).length === 0
|
||||
// },
|
||||
topBtnConfig: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
commonFilter: (source, filterType = a => a) => {
|
||||
commonFilter: (source, filterType = (a) => a) => {
|
||||
return filterType(source)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
selectedBox: new Array(100).fill(true)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
renderData() {
|
||||
return this.data.map((item, index) => {
|
||||
return {
|
||||
...item,
|
||||
_pageIndex: (this.page - 1) * this.limit + index + 1
|
||||
}
|
||||
})
|
||||
},
|
||||
renderTableHeadList() {
|
||||
return this.tableHeadConfigs.filter((item, index) => {
|
||||
return this.selectedBox[index]
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
this.selectedBox = new Array(100).fill(true)
|
||||
if (this.highIndex) {
|
||||
this.tableRowIndex = 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.selectedBox)
|
||||
console.log(this.tableHeadConfigs)
|
||||
},
|
||||
methods: {
|
||||
handleSubEmitData(payload) {
|
||||
this.$emit('operate-event', payload)
|
||||
},
|
||||
clickTopButton(val) {
|
||||
this.$emit('clickTopBtn', val)
|
||||
}
|
||||
},
|
||||
components: { TableHead }
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.setting {
|
||||
text-align: right;
|
||||
padding: 0px 15px 7px;
|
||||
.action_btn {
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
font-size: 14px;
|
||||
.add {
|
||||
color: #0b58ff;
|
||||
}
|
||||
}
|
||||
.setting-box {
|
||||
width: 100px;
|
||||
}
|
||||
i {
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
.el-table .success-row {
|
||||
background: #eaf1fc;
|
||||
}
|
||||
.iconPlus {
|
||||
color: #0b58ff;
|
||||
margin-right: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ $mgr: 6px;
|
||||
line-height: $height;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||
// font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
|
||||
@@ -16,7 +16,9 @@ $--color-transition-base: color .2s cubic-bezier(.645,.045,.355,1) !default;
|
||||
/* Color
|
||||
-------------------------- */
|
||||
/// color|1|Brand Color|0
|
||||
$--color-primary: #409EFF !default;
|
||||
// $--color-primary: #409EFF !default;
|
||||
// 左上标题背景颜色
|
||||
$--color-primary: #001529 !default;
|
||||
/// color|1|Background Color|4
|
||||
$--color-white: #FFFFFF !default;
|
||||
/// color|1|Background Color|4
|
||||
@@ -50,6 +52,7 @@ $--color-danger-lighter: mix($--color-white, $--color-danger, 90%) !default;
|
||||
$--color-info-lighter: mix($--color-white, $--color-info, 90%) !default;
|
||||
/// color|1|Font Color|2
|
||||
$--color-text-primary: #303133 !default;
|
||||
$--color-text-home: #fff !default;
|
||||
/// color|1|Font Color|2
|
||||
$--color-text-regular: #606266 !default;
|
||||
/// color|1|Font Color|2
|
||||
|
||||
@@ -4,8 +4,8 @@ t.loading = 'Loading...'
|
||||
t.createTime = 'Create Time'
|
||||
|
||||
t.brand = {}
|
||||
t.brand.lg = 'Monitoring System'
|
||||
t.brand.mini = 'PMS'
|
||||
t.brand.lg = 'SCADA Platform'
|
||||
t.brand.mini = 'SCADA'
|
||||
|
||||
t.routes = {}
|
||||
t.routes['产品池'] = 'Products Pool'
|
||||
@@ -431,6 +431,7 @@ t.login.password = 'Password'
|
||||
t.login.captcha = 'Captcha'
|
||||
t.login.demo = 'Demo'
|
||||
t.login.copyright = 'Copyright @Intelligent Automation Research Institute Co., Ltd Version: 1.0'
|
||||
t.login.warning = 'Already Login!'
|
||||
|
||||
t.schedule = {}
|
||||
t.schedule.beanName = 'Bean Name'
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-11-25 09:51:46
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-12-13 19:27:24
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import Cookies from 'js-cookie'
|
||||
@@ -43,5 +51,7 @@ export function getLanguage() {
|
||||
export default new VueI18n({
|
||||
// locale: Cookies.get('language') || 'zh-CN',
|
||||
locale: getLanguage(), // 先默认中文
|
||||
messages
|
||||
messages,
|
||||
//抑制警告
|
||||
silentFallbackWarn: true,
|
||||
})
|
||||
|
||||
@@ -4,8 +4,8 @@ t.loading = '加载中...'
|
||||
t.createTime = '添加时间'
|
||||
|
||||
t.brand = {}
|
||||
t.brand.lg = '生产监控系统'
|
||||
t.brand.mini = '监控'
|
||||
t.brand.lg = '深加工SCADA平台'
|
||||
t.brand.mini = 'SCADA'
|
||||
|
||||
t.routes = {}
|
||||
// 一级
|
||||
@@ -430,6 +430,7 @@ t.login.password = '密码'
|
||||
t.login.captcha = '验证码'
|
||||
t.login.demo = '在线演示'
|
||||
t.login.copyright = '版权所有:中建材智能自动化研究院有限公司 版本: 1.0'
|
||||
t.login.warning = '已经登录过了'
|
||||
|
||||
t.schedule = {}
|
||||
t.schedule.beanName = 'bean名称'
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
import './iconfont'
|
||||
import Vue from 'vue'
|
||||
import SvgIcon from '@/components/SvgIcon'// svg component
|
||||
|
||||
// register globally
|
||||
Vue.component('svg-icon', SvgIcon)
|
||||
|
||||
const req = require.context('./svg', false, /\.svg$/)
|
||||
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||
requireAll(req)
|
||||
|
||||
const svgFiles = require.context('./svg', true, /\.svg$/)
|
||||
svgFiles.keys().map(item => svgFiles(item))
|
||||
|
||||
export default {
|
||||
// 获取图标icon-(*).svg名称列表, 例如[shouye, xitong, zhedie, ...]
|
||||
getNameList() {
|
||||
return requireAll(req).map(item => item.default.id.replace('icon-', ''))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1
src/icons/svg/eye-open.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><defs><style/></defs><path d="M512 128q69.675 0 135.51 21.163t115.498 54.997 93.483 74.837 73.685 82.006 51.67 74.837 32.17 54.827L1024 512q-2.347 4.992-6.315 13.483T998.87 560.17t-31.658 51.669-44.331 59.99-56.832 64.34-69.504 60.16-82.347 51.5-94.848 34.687T512 896q-69.675 0-135.51-21.163t-115.498-54.826-93.483-74.326-73.685-81.493-51.67-74.496-32.17-54.997L0 513.707q2.347-4.992 6.315-13.483t18.816-34.816 31.658-51.84 44.331-60.33 56.832-64.683 69.504-60.331 82.347-51.84 94.848-34.816T512 128.085zm0 85.333q-46.677 0-91.648 12.331t-81.152 31.83-70.656 47.146-59.648 54.485-48.853 57.686-37.675 52.821-26.325 43.99q12.33 21.674 26.325 43.52t37.675 52.351 48.853 57.003 59.648 53.845T339.2 767.02t81.152 31.488T512 810.667t91.648-12.331 81.152-31.659 70.656-46.848 59.648-54.186 48.853-57.344 37.675-52.651T927.957 512q-12.33-21.675-26.325-43.648t-37.675-52.65-48.853-57.345-59.648-54.186-70.656-46.848-81.152-31.659T512 213.334zm0 128q70.656 0 120.661 50.006T682.667 512 632.66 632.661 512 682.667 391.339 632.66 341.333 512t50.006-120.661T512 341.333zm0 85.334q-35.328 0-60.33 25.002T426.666 512t25.002 60.33T512 597.334t60.33-25.002T597.334 512t-25.002-60.33T512 426.666z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
src/icons/svg/eye.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="128" height="64" xmlns="http://www.w3.org/2000/svg"><path d="M127.072 7.994c1.37-2.208.914-5.152-.914-6.87-2.056-1.717-4.797-1.226-6.396.982-.229.245-25.586 32.382-55.74 32.382-29.24 0-55.74-32.382-55.968-32.627-1.6-1.963-4.57-2.208-6.397-.49C-.17 3.086-.399 6.275 1.2 8.238c.457.736 5.94 7.36 14.62 14.72L4.17 35.96c-1.828 1.963-1.6 5.152.228 6.87.457.98 1.6 1.471 2.742 1.471s2.284-.49 3.198-1.472l12.564-13.983c5.94 4.416 13.021 8.587 20.788 11.53l-4.797 17.418c-.685 2.699.686 5.397 3.198 6.133h1.37c2.057 0 3.884-1.472 4.341-3.68L52.6 42.83c3.655.736 7.538 1.227 11.422 1.227 3.883 0 7.767-.49 11.422-1.227l4.797 17.173c.457 2.208 2.513 3.68 4.34 3.68.457 0 .914 0 1.143-.246 2.513-.736 3.883-3.434 3.198-6.133l-4.797-17.172c7.767-2.944 14.848-7.114 20.788-11.53l12.336 13.738c.913.981 2.056 1.472 3.198 1.472s2.284-.49 3.198-1.472c1.828-1.963 1.828-4.906.228-6.87l-11.65-13.001c9.366-7.36 14.849-14.474 14.849-14.474z"/></svg>
|
||||
|
After Width: | Height: | Size: 944 B |
1
src/icons/svg/international.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M83.287 103.01c-1.57-3.84-6.778-10.414-15.447-19.548-2.327-2.444-2.182-4.306-1.338-9.862v-.64c.553-3.81 1.513-6.05 14.313-8.087 6.516-1.018 8.203 1.57 10.589 5.178l.785 1.193a12.625 12.625 0 0 0 6.43 5.207c1.134.524 2.53 1.164 4.421 2.24 4.596 2.53 4.596 5.41 4.596 11.753v.727a26.91 26.91 0 0 1-5.178 17.454 59.055 59.055 0 0 1-19.025 11.026c3.49-6.546.814-14.313 0-16.553l-.146-.087zM64 5.12a58.502 58.502 0 0 1 25.484 5.818 54.313 54.313 0 0 0-12.859 10.327c-.93 1.28-1.716 2.473-2.472 3.579-2.444 3.694-3.637 5.352-5.818 5.614a25.105 25.105 0 0 1-4.219 0c-4.276-.29-10.094-.64-11.956 4.422-1.193 3.23-1.396 11.956 2.444 16.495.66 1.077.778 2.4.32 3.578a7.01 7.01 0 0 1-2.066 3.229 18.938 18.938 0 0 1-2.909-2.91 18.91 18.91 0 0 0-8.32-6.603c-1.25-.349-2.647-.64-3.985-.93-3.782-.786-8.03-1.688-9.019-3.812a14.895 14.895 0 0 1-.727-5.818 21.935 21.935 0 0 0-1.396-9.25 8.873 8.873 0 0 0-5.557-4.946A58.705 58.705 0 0 1 64 5.12zM0 64c0 35.346 28.654 64 64 64 35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64C28.654 0 0 28.654 0 64z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
19
src/icons/svg/table_add.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 60 (88103) - https://sketch.com -->
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="11_系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="11-1用户管理" transform="translate(-1764.000000, -160.000000)">
|
||||
<g id="编组-15" transform="translate(1763.000000, 158.000000)">
|
||||
<g id="编组-18">
|
||||
<g id="icon/界面内/新增" transform="translate(0.000000, 1.000000)">
|
||||
<g id="编组">
|
||||
<rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="11" height="11"></rect>
|
||||
<path d="M10.0813953,6.42885117 L6.37790698,6.42885117 L6.37790698,10.0770235 C6.37790698,10.3108355 6.19069767,10.5 5.95930233,10.5 L5.95930233,10.5 C5.72790698,10.5 5.54069767,10.3108355 5.54069767,10.0770235 L5.54069767,6.42885117 L1.91860465,6.42885117 C1.6872093,6.42885117 1.5,6.23968668 1.5,6.00587467 L1.5,6.00587467 C1.5,5.77206266 1.6872093,5.58289817 1.91860465,5.58289817 L5.54069767,5.58289817 L5.54069767,1.9229765 C5.54069767,1.68916449 5.72790698,1.5 5.95930233,1.5 L5.95930233,1.5 C6.19069767,1.5 6.37790698,1.68916449 6.37790698,1.9229765 L6.37790698,5.58289817 L10.0813953,5.58289817 C10.3127907,5.58289817 10.5,5.77206266 10.5,6.00587467 L10.5,6.00587467 C10.5,6.23968668 10.3127907,6.42885117 10.0813953,6.42885117 L10.0813953,6.42885117 Z" id="Shape" fill="#0B58FF" transform="translate(6.000000, 6.000000) scale(1, -1) translate(-6.000000, -6.000000) "></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -30,7 +30,7 @@ export const pageRoutes = [
|
||||
meta: { title: '登录' },
|
||||
beforeEnter(to, from, next) {
|
||||
if (Cookies.get('token')) {
|
||||
Vue.prototype.$message({ message: '已经登录过了', type: 'error' })
|
||||
Vue.prototype.$message({ message: $t('login.warning'), type: 'error' })
|
||||
next(false)
|
||||
} else {
|
||||
next()
|
||||
@@ -45,9 +45,11 @@ export const moduleRoutes = {
|
||||
component: () => import('@/views/main'),
|
||||
name: 'main',
|
||||
redirect: { name: 'home' },
|
||||
// redirect: { name: 'sys-log-login' },
|
||||
meta: { title: '主入口布局' },
|
||||
children: [
|
||||
{ path: '/home', component: () => import('@/views/modules/home'), name: 'home', meta: { title: '首页', isTab: true } }
|
||||
// { path: '/sys-log-login', component: () => import('@/views/modules/sys/log-login'), name: 'sys-log-login', meta: { title: '首页', isTab: true } }
|
||||
{ path: '/home', component: () => import('@/views/modules/home'), name: 'home', meta: { title: '首页', isTab: false, hiddenSiderbar: true } }
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-12-11 20:33:35
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-12-11 20:43:32
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
@@ -9,7 +17,7 @@ export default new Vuex.Store({
|
||||
namespaced: true,
|
||||
state: {
|
||||
// 导航条, 布局风格, default(白色) / colorful(鲜艳)
|
||||
navbarLayoutType: 'colorful',
|
||||
navbarLayoutType: '',
|
||||
// 侧边栏, 布局皮肤, default(白色) / dark(黑色)
|
||||
sidebarLayoutSkin: 'dark',
|
||||
// 侧边栏, 折叠状态
|
||||
@@ -23,11 +31,13 @@ export default new Vuex.Store({
|
||||
contentTabs: [
|
||||
{
|
||||
...window.SITE_CONFIG['contentTabDefault'],
|
||||
// 'name': 'sys-log-login',
|
||||
'name': 'home',
|
||||
'title': 'home'
|
||||
}
|
||||
],
|
||||
contentTabsActiveName: 'home'
|
||||
// contentTabsActiveName: 'sys-log-login'
|
||||
},
|
||||
modules: {
|
||||
user
|
||||
|
||||
@@ -114,3 +114,8 @@ export function calcMaxHeight(num) {
|
||||
const finalHeight = clientHeight - num - FIXED_HEIGHT
|
||||
return finalHeight > 0 ? finalHeight : -finalHeight
|
||||
}
|
||||
|
||||
// tableHeight
|
||||
export function tableHeight(n) {
|
||||
return window.innerHeight - n
|
||||
}
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-11-25 09:51:46
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-11-30 15:09:05
|
||||
*/
|
||||
/**
|
||||
* 邮箱
|
||||
* @param {*} s
|
||||
@@ -29,3 +37,11 @@ export function isPhone (s) {
|
||||
export function isURL (s) {
|
||||
return /^http[s]?:\/\/.*/.test(s)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function isExternal(path) {
|
||||
return /^(https?:|mailto:|tel:)/.test(path)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]">
|
||||
<!-- <main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]"> -->
|
||||
<main :class="[this.$route.meta.hiddenSiderbar !== true? ['aui-content', { 'aui-content--tabs': $route.meta.isTab }] : 'aui-sidebar.close']">
|
||||
<!-- tab展示内容 -->
|
||||
<template v-if="$route.meta.isTab">
|
||||
<el-dropdown class="aui-content--tabs-tools">
|
||||
@@ -89,6 +90,7 @@ export default {
|
||||
// tabs, 关闭全部
|
||||
tabsCloseAllHandle() {
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home')
|
||||
// this.$router.push({ name: 'sys-log-login' })
|
||||
this.$router.push({ name: 'home' })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,38 @@
|
||||
<template>
|
||||
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
|
||||
<nav
|
||||
class="aui-navbar"
|
||||
:class="[this.$route.meta.hiddenSiderbar !== true ? `aui-navbar--${$store.state.navbarLayoutType}` : 'aui-navbar.home']"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#001529' : 'rgb(13,43,104)'
|
||||
}">
|
||||
<!-- <hamburger v-if="showhome" id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
|
||||
<div class="aui-navbar__header">
|
||||
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">
|
||||
<img src="../assets/img/cnbm.png" style="width: 36px; height: 36px; position: relative; top: 0em; margin-right: 12px" alt="" />
|
||||
{{ $t('brand.lg') }}
|
||||
</a>
|
||||
<!-- <a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a> -->
|
||||
<!-- 缩放时LOGO -->
|
||||
<!-- <a class="aui-navbar__brand-mini" href="javascript:;"> -->
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">
|
||||
<img src="../assets/img/cnbm.png" style="width: 36px; height: 36px; position: relative; top: 0em" alt="" />
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="aui-navbar__body">
|
||||
<!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" /> -->
|
||||
<div
|
||||
class="aui-navbar__body"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)'
|
||||
}">
|
||||
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
|
||||
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
|
||||
<el-menu-item v-if="this.$route.meta.hiddenSiderbar !== true" index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true">
|
||||
<use xlink:href="#icon-outdent"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" @click="refresh()">
|
||||
<el-menu-item v-if="this.$route.meta.hiddenSiderbar !== true" index="2" @click="refresh()">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true">
|
||||
<use xlink:href="#icon-sync"></use>
|
||||
</svg>
|
||||
@@ -31,6 +50,14 @@
|
||||
</a>
|
||||
</el-menu-item> -->
|
||||
<el-menu-item index="3">
|
||||
<!-- <el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="hover-effect" trigger="click">
|
||||
<el-badge :hidden="alarmNum > 0 ? false : true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm">
|
||||
<svg-icon style="width: 24px; height: 24px" class="item-icon" icon-class="alarm" />
|
||||
</el-badge>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>暂无数据</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
<el-dropdown placement="bottom" :show-timeout="0" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||
@@ -69,6 +96,7 @@
|
||||
</nav>
|
||||
</template>
|
||||
<script>
|
||||
// import Hamburger from '@/components/Hamburger'
|
||||
import Cookies from 'js-cookie'
|
||||
import screenfull from 'screenfull'
|
||||
import UpdatePassword from './main-navbar-update-password'
|
||||
@@ -83,6 +111,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
UpdatePassword
|
||||
// Hamburger
|
||||
},
|
||||
methods: {
|
||||
// 获取当前语言环境
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]">
|
||||
<div class="aui-sidebar__inner">
|
||||
<!-- <aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]"> -->
|
||||
<aside v-if="this.$route.meta.hiddenSiderbar !== true" :class="[this.$route.meta.hiddenSiderbar !== true? ['aui-sidebar',`aui-sidebar--${$store.state.sidebarLayoutSkin}`]:'aui-sidebar.close']">
|
||||
<div v-if="this.$route.meta.hiddenSiderbar !== true" :class="[this.$route.meta.hiddenSiderbar !== true? 'aui-sidebar__inner':'aui-sidebar.close']">
|
||||
<el-menu
|
||||
:default-active="$store.state.sidebarMenuActiveName"
|
||||
:collapse="$store.state.sidebarFold"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div v-loading.fullscreen.lock="loading" :element-loading-text="$t('loading')" :class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]">
|
||||
<template v-if="!loading">
|
||||
<main-navbar />
|
||||
<main-sidebar />
|
||||
<div class="aui-content__wrapper">
|
||||
<main-navbar/>
|
||||
<main-sidebar v-if="this.$route.meta.hiddenSiderbar !== true"/>
|
||||
<div :class="[this.$route.meta.hiddenSiderbar !== true? 'aui-content__wrapper':'aui-sidebar.close']">
|
||||
<main-content v-if="!$store.state.contentIsNeedRefresh" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -50,11 +50,13 @@ export default {
|
||||
methods: {
|
||||
// 窗口改变大小
|
||||
windowResizeHandle() {
|
||||
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false
|
||||
this.$store.state.sidebarFold = ((document.documentElement['clientWidth'] <= 992) && (this.$route.name !== "home")) || false
|
||||
window.addEventListener(
|
||||
'resize',
|
||||
// 防抖
|
||||
debounce(() => {
|
||||
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false
|
||||
// this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false
|
||||
this.$store.state.sidebarFold = ((document.documentElement['clientWidth'] <= 992) && (this.$route.name !== "home")) || false
|
||||
}, 150)
|
||||
)
|
||||
},
|
||||
|
||||
@@ -1,32 +1,244 @@
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-home">
|
||||
<h3>项目介绍</h3>
|
||||
<ul>
|
||||
<li>
|
||||
renren-ui基于vue、element-ui构建开发,实现<a href="https://gitee.com/renrenio/renren-ui" target="_blank">renren-security</a>后台管理前端功能,提供一套更优的前端解决方案
|
||||
</li>
|
||||
<li>前后端分离,通过token进行数据交互,可独立部署</li>
|
||||
<li>动态菜单,通过菜单管理统一管理访问路由</li>
|
||||
<li>演示地址:<a href="http://demo.open.renren.io/renren-security" target="_blank">http://demo.open.renren.io/renren-security</a> (账号密码:admin/admin)</li>
|
||||
</ul>
|
||||
<h3>获取帮助</h3>
|
||||
<ul>
|
||||
<li>官方社区:<a href="https://www.renren.io/community" target="_blank">https://www.renren.io/community</a></li>
|
||||
<li>前端Git地址:<a href="https://gitee.com/renrenio/renren-ui" target="_blank">https://gitee.com/renrenio/renren-ui</a></li>
|
||||
<li>后台Git地址:<a href="https://gitee.com/renrenio/renren-security" target="_blank">https://gitee.com/renrenio/renren-security</a></li>
|
||||
<li>如需关注项目最新动态,请Watch、Star项目,同时也是对项目最好的支持</li>
|
||||
</ul>
|
||||
<h3>官方微信群</h3>
|
||||
<ul>
|
||||
<li>扫码下面的二维码,关注【人人开源】公众号,回复【加群】,即可根据提示加入微信群!</li>
|
||||
</ul>
|
||||
<div class="choicepart-container">
|
||||
<!-- <div class="choicepat-navbar">
|
||||
<navbar :showhome="false" :show-title="true" />
|
||||
</div> -->
|
||||
<div class="choicepart-box">
|
||||
<div
|
||||
v-for="(item, index) in routeList"
|
||||
:key="item.path"
|
||||
class="choicepart-item"
|
||||
@click="handelClick(item, index)"
|
||||
>
|
||||
<!-- :style="{ background: colorArr.colorList[index % 9] }" -->
|
||||
<div class="choicepart-item-border">
|
||||
<img :src="require(`../../assets/img/choicepart/${item.name}.png`)" alt="">
|
||||
</div>
|
||||
<div class="choicepart-item-title" :title="item.name">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.mod-home {
|
||||
line-height: 1.5;
|
||||
<script>
|
||||
// import db from '@/utils/indexDB'
|
||||
// import { mapGetters } from 'vuex'
|
||||
// import { constantRoutes } from '@/router'
|
||||
// import { Navbar } from '@/layout/components'
|
||||
// import { downLoadBGP } from '@/api/user'
|
||||
import store from '@/store'
|
||||
// import { blobToBase64 } from '@/utils/blobToBase64'
|
||||
const colorList = ['#8080ff', '#ff8080', '#b004fb', '#ff409f', '#00caca', '#8080c0', '#cccc00', '#ff8040', '#0c4d9e']
|
||||
const colorList1 = ['#b4b4ff', '#ffb4b4', '#c648fb', '#ff86c2', '#66f6f6', '#a2a2f3', '#ffff9a', '#ffc3a5', '#367cd4']
|
||||
|
||||
export default {
|
||||
name: 'ChoicePart',
|
||||
// components: { Navbar },
|
||||
data() {
|
||||
return {
|
||||
baseImg: require('../../assets/img/login-back.jpg'),
|
||||
coverImgUrl: localStorage.getItem('backImg') || '',
|
||||
rowNum: 1,
|
||||
colorArr: {
|
||||
colorList,
|
||||
colorList1
|
||||
},
|
||||
windowWidth: 0,
|
||||
dbConnect: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
routeList() {
|
||||
// const cangoList = []
|
||||
// const permission_routes = store.getters.permission_routes
|
||||
// console.log(permission_routes)
|
||||
// permission_routes.map(item => {
|
||||
// if (!item.hidden && item.meta) {
|
||||
// cangoList.push(item)
|
||||
// }
|
||||
// })
|
||||
// const formatList = cangoList.map((item, index) => {
|
||||
// return this.setIndex(item, index)
|
||||
// })
|
||||
// console.log(formatList)
|
||||
return window.SITE_CONFIG['menuList']
|
||||
},
|
||||
// ...mapGetters(['language', 'dictList', 'dictObj'])
|
||||
},
|
||||
created() {
|
||||
// 确保小图标点回来依然带字符
|
||||
this.$store.state.sidebarFold = false
|
||||
this.windowWidth = window.innerWidth
|
||||
console.log(this.$route)
|
||||
// this.dbConnect = db({
|
||||
// DBName: 'back_img',
|
||||
// version: '1.0',
|
||||
// params: [
|
||||
// { name: 'id', unique: true },
|
||||
// { name: 'imgUrl', unique: true }
|
||||
// ]
|
||||
// })
|
||||
// const request = this.dbConnect.openDB()
|
||||
// request.onsuccess = () => {
|
||||
// // const result = this.dbConnect.search('back_img', 'id', 1)
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
// console.log(this.dictList, this.dictObj)
|
||||
// this.getPic()
|
||||
},
|
||||
methods: {
|
||||
// getPic() {
|
||||
// // edit here
|
||||
// downLoadBGP().then(response => {
|
||||
// if (response.data.size) {
|
||||
// blobToBase64(response.data).then(res => {
|
||||
// this.coverImgUrl = res
|
||||
// localStorage.setItem('backImg', res)
|
||||
// console.log(res)
|
||||
// // const result = this.dbConnect.search('back_img', 'id', 1)
|
||||
// // if (result.result) {
|
||||
// // this.dbConnect.update({
|
||||
// // id: 1,
|
||||
// // imgUrl: res
|
||||
// // })
|
||||
// // } else {
|
||||
// // this.dbConnect.add({
|
||||
// // id: 1,
|
||||
// // imgUrl: res
|
||||
// // })
|
||||
// // }
|
||||
// })
|
||||
// // this.coverImgUrl = response.data
|
||||
// // const temp = response.data.split('/')
|
||||
// // temp.splice(0, 2)
|
||||
// // this.coverImgUrl = 'http://zzdhg.mes.picaiba.com/' + temp.join('/')
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
resize() {},
|
||||
handelClick(item, index) {
|
||||
// this.$store.dispatch('app/setChoicepart', index)
|
||||
// if (item.meta.unuse) {
|
||||
// this.$message.warning(this.$t('choisePart.module'))
|
||||
// } else {
|
||||
// this.toRouter(item)
|
||||
// }
|
||||
this.toRouter(item)
|
||||
},
|
||||
toRouter(item) {
|
||||
console.log(item.children[0].url)
|
||||
if (item.children) {
|
||||
this.$router.push({name: item.children[0].url.replace(new RegExp('/','g'),'-')})
|
||||
} else {
|
||||
this.$router.push({name: item.children[0].url.replace(new RegExp('/','g'),'-')})
|
||||
}
|
||||
},
|
||||
setIndex(list, index) {
|
||||
list.meta.routeIndex = index
|
||||
if (list.children) {
|
||||
list.children.map(item => {
|
||||
this.setIndex(item, index)
|
||||
})
|
||||
}
|
||||
return list
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.choicepart-container {
|
||||
min-width: 100%;
|
||||
min-height: 100vh;
|
||||
// background: linear-gradient(-45deg, rgb(25, 25, 200), rgb(0, 100, 200));
|
||||
background: url('../../assets/img/choicepart/choicepart-back.png') repeat;
|
||||
background-size: cover;
|
||||
overflow-x: scroll;
|
||||
.choicepart-box {
|
||||
width: 1440px;
|
||||
margin: 0 auto;
|
||||
margin: 0 auto;
|
||||
// 距离上面边距
|
||||
padding-top: 8vh;
|
||||
min-height: 100vh;
|
||||
.choicepart-item {
|
||||
display: inline-block;
|
||||
width: 208px;
|
||||
height: 258px;
|
||||
margin: 40px;
|
||||
background: url('../../assets/img/choicepart/choice-item-back.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
// border: 1px dashed #fff;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
|
||||
top: 0;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
img {
|
||||
width: 208px;
|
||||
height: 258px;
|
||||
}
|
||||
.choicepart-item-border {
|
||||
height: 100%;
|
||||
border-radius: 5px;
|
||||
padding: 0 5px;
|
||||
line-height: 32px;
|
||||
font-size: 28px;
|
||||
font-weight: lighter;
|
||||
color: #2c6bd8;
|
||||
overflow: hidden;
|
||||
}
|
||||
.choicepart-item-title {
|
||||
overflow: hidden;
|
||||
padding: 0 10px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 2px;
|
||||
right: 2px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
line-height: 48px;
|
||||
height: 48px;
|
||||
letter-spacing: 2px;
|
||||
background-color: rgba($color: #0b58ff, $alpha: 0.45);
|
||||
}
|
||||
}
|
||||
.choicepart-item:hover {
|
||||
.choicepart-item-title {
|
||||
background-color: rgba($color: #0b58ff, $alpha: 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.choicepat-navbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
::-webkit-scrollbar-track-piece {
|
||||
//滚动条凹槽的颜色,还可以设置边框属性
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
//滚动条的宽度
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
//滚动条的设置
|
||||
background-color: #dddddd;
|
||||
background-clip: padding-box;
|
||||
min-height: 28px;
|
||||
border-radius: 9px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #bbb;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
<el-button v-if="$hasPermission('monitoring:equipment:export')" @click="exportHandle()">{{ $t('export') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -19,6 +20,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -52,7 +54,12 @@ import CKEditor from 'ckeditor4-vue'
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -278,6 +285,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
addOrUpdateConfigs,
|
||||
@@ -495,6 +503,12 @@ export default {
|
||||
// }
|
||||
// })
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -530,3 +544,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttonColor {
|
||||
color: #fff;
|
||||
background: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.groupname') + ' / ' + $t('eq.groupcode')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -18,6 +19,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn" />
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -43,7 +45,12 @@ import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -71,6 +78,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
@@ -164,6 +172,12 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -199,3 +213,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttonColor {
|
||||
color: #fff;
|
||||
background: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.type')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenttype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmenttype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -18,6 +19,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -43,7 +45,12 @@ import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -90,6 +97,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
@@ -188,6 +196,14 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
// 更新树形结构
|
||||
this.getTreeEquipmentType()
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -223,3 +239,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttonColor {
|
||||
color: #fff;
|
||||
background: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('factory.name') + ' / ' + $t('factory.code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:factory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:factory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -18,6 +19,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -26,8 +28,7 @@
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
>
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
@@ -43,7 +44,12 @@ import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -85,6 +91,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -168,11 +175,17 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
? [id]
|
||||
: this.dataListSelections.map(item => {
|
||||
: this.dataListSelections.map((item) => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
|
||||
@@ -203,3 +216,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttonColor {
|
||||
color: #fff;
|
||||
background: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('prod.name') + ' / ' + $t('prod.code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button @click="addOrEdit()">测试</el-button> -->
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrEdit()">{{ $t('add') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrEdit()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -20,7 +21,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
@clickTopBtn="clickTopBtn" />
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -29,8 +30,8 @@
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
||||
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
@@ -52,6 +53,12 @@ import { dictFilter } from '@/utils/filters'
|
||||
|
||||
const UnitDictTypeId = '1557173812109242370'
|
||||
const ProductTypeDictTypeId = '1557179530308616193'
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
@@ -144,6 +151,7 @@ export default {
|
||||
mixins: [dictListMixin],
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@@ -176,6 +184,7 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(this.$route)
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@@ -193,6 +202,12 @@ export default {
|
||||
this.$refs.basedialog.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.showbasedialog = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.basedialog.init()
|
||||
})
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
// console.log("after dialog close: ", this.showbasedialog)
|
||||
@@ -290,3 +305,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttonColor {
|
||||
color: #fff;
|
||||
background: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('pl.name')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:productionline:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:productionline:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -18,7 +19,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
@clickTopBtn="clickTopBtn" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@@ -26,8 +27,7 @@
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
>
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
@@ -42,7 +42,12 @@ import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -52,7 +57,7 @@ const tableConfigs = [
|
||||
{ prop: 'factoryName', name: i18n.t('factory.title') },
|
||||
{ prop: 'name', name: i18n.t('pl.name') },
|
||||
{ prop: 'code', name: i18n.t('pl.code') },
|
||||
{ prop: 'status', name: i18n.t('pl.status'), filter: val => (val === 0 || val === 1 || val === 2) && ['停止', '运行', '未知'][val] },
|
||||
{ prop: 'status', name: i18n.t('pl.status'), filter: (val) => (val === 0 || val === 1 || val === 2) && ['停止', '运行', '未知'][val] },
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
@@ -79,7 +84,7 @@ const addOrUpdateConfigs = {
|
||||
placeholder: i18n.t('hints.number'),
|
||||
type: 'number', // TODO: 可改进为自动应用 number 验证,此时还必须添加下述规则:
|
||||
required: true,
|
||||
rules: [{ type: 'number', transform: val => Number(val), trigger: 'blur', message: i18n.t('hints.number') }]
|
||||
rules: [{ type: 'number', transform: (val) => Number(val), trigger: 'blur', message: i18n.t('hints.number') }]
|
||||
},
|
||||
'description',
|
||||
'remark'
|
||||
@@ -94,6 +99,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -133,10 +139,10 @@ export default {
|
||||
} else {
|
||||
this.factoryList.splice(0)
|
||||
}
|
||||
this.addOrUpdateConfigs.fields.forEach(item => {
|
||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||
if (item.name === 'factoryId') {
|
||||
console.log('res', item)
|
||||
item.options = this.factoryList.map(f => ({ value: f.id, label: f.name }))
|
||||
item.options = this.factoryList.map((f) => ({ value: f.id, label: f.name }))
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -194,11 +200,17 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
? [id]
|
||||
: this.dataListSelections.map(item => {
|
||||
: this.dataListSelections.map((item) => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
|
||||
@@ -229,3 +241,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttonColor {
|
||||
color: #fff;
|
||||
background: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<!-- 1. class="blueTip" size="small" -->
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('ws.name')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:workshopsection:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<!-- 2. class="buttonColor" -->
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:workshopsection:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 3. :top-btn-config="topBtnConfig" @clickTopBtn="clickTopBtn" -->
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -18,7 +21,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
@clickTopBtn="clickTopBtn" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@@ -26,8 +29,7 @@
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
>
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
@@ -43,7 +45,13 @@ import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
// 4.就是这个topBtnConfig
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -79,6 +87,8 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 5. 下面的 topBtnConfig,
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -114,11 +124,11 @@ export default {
|
||||
getProductLine() {
|
||||
this.$http.get(this.$http.adornUrl('/monitoring/productionLine/list')).then(({ data: res }) => {
|
||||
if (res && res.code === 0) {
|
||||
this.addOrUpdateConfigs.fields.forEach(item => {
|
||||
if (item.name === 'productionLineId') item.options = res.data.map(item => ({ label: item.name, value: item.id }))
|
||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||
if (item.name === 'productionLineId') item.options = res.data.map((item) => ({ label: item.name, value: item.id }))
|
||||
})
|
||||
} else {
|
||||
this.addOrUpdateConfigs.fields.forEach(item => {
|
||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||
if (item.name === 'productionLineId') item.options.splice(0)
|
||||
})
|
||||
// this.plList.splice(0)
|
||||
@@ -179,11 +189,18 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
// 6. 新增按钮
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
? [id]
|
||||
: this.dataListSelections.map(item => {
|
||||
: this.dataListSelections.map((item) => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
|
||||
@@ -214,3 +231,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.blueTip::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 24px;
|
||||
background: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.buttonColor {
|
||||
color: #fff;
|
||||
background: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__dict">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.dictName" :placeholder="$t('dict.dictName')" clearable></el-input>
|
||||
</el-form-item>
|
||||
@@ -9,11 +9,11 @@
|
||||
<el-input v-model="dataForm.dictType" :placeholder="$t('dict.dictType')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:dict:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||
</el-form-item>
|
||||
@@ -21,7 +21,19 @@
|
||||
<el-button @click="showIcons()">所有图标</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||
<!-- border
|
||||
:row-style="{ height: '50px' }"
|
||||
:cell-style="{ padding: '0px' }"
|
||||
-->
|
||||
<el-table
|
||||
v-loading="dataListLoading"
|
||||
:data="dataList"
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%"
|
||||
:row-style="{ height: '50px' }"
|
||||
:cell-style="{ padding: '0px' }"
|
||||
>
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="dictName" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center"></el-table-column>
|
||||
@@ -48,8 +60,7 @@
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
@@ -90,8 +101,8 @@ export default {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
//
|
||||
showIcons() {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<div class="btn-bar">
|
||||
<el-button @click="$router.go(-1)">{{ $t('notFound.back') }}</el-button>
|
||||
<el-button type="primary" @click="$router.push({ name: 'home' })">{{ $t('notFound.home') }}</el-button>
|
||||
<!-- <el-button type="primary" @click="$router.push({ name: 'sys-log-login' })">{{ $t('notFound.home') }}</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,69 +1,116 @@
|
||||
<template>
|
||||
<div class="aui-wrapper aui-page__login">
|
||||
<div class="aui-content__wrapper">
|
||||
<main class="aui-content">
|
||||
<div class="login-header">
|
||||
<h2 class="login-brand">{{ $t('brand.lg') }}</h2>
|
||||
<div class="login-container">
|
||||
<div class="login-background" :style="{backgroundImage: 'url(' + (coverImgUrl ? coverImgUrl : baseImg) + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">
|
||||
<div class="login-background-container">
|
||||
<div class="back-title">
|
||||
Wel<span>come</span>
|
||||
<p><span class="back-title-point" />{{ $t('brand.lg') }}</p>
|
||||
</div>
|
||||
<div class="login-body">
|
||||
<h3 class="login-title">{{ $t('login.title') }}</h3>
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" status-icon>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="dataForm.username" :placeholder="$t('login.username')">
|
||||
<span slot="prefix" class="el-input__icon">
|
||||
<svg class="icon-svg" aria-hidden="true"><use xlink:href="#icon-user"></use></svg>
|
||||
</span>
|
||||
</el-input>
|
||||
<img :src="require('../../assets/img/login.gif')" style="width: 90%; margin-left: 5%" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" class="login-form" autocomplete="on" label-position="left" @keyup.enter.native="dataFormSubmitHandle()">
|
||||
|
||||
<div class="title-container">
|
||||
<h3 class="title" :title="$t('brand.lg')">
|
||||
<img src="../../assets/img/cnbm.png" style="width: 1em; height: 1em; position: relative; top: 0em; margin-right: 12px" alt="">
|
||||
{{ $t('brand.lg') }}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<el-form-item prop="username" style="margin: 0px 8.3%">
|
||||
<el-input
|
||||
ref="username"
|
||||
v-model="dataForm.username"
|
||||
:placeholder="$t('login.username')"
|
||||
name="username"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
autocomplete="on"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="dataForm.password" type="password" :placeholder="$t('login.password')">
|
||||
<span slot="prefix" class="el-input__icon">
|
||||
<svg class="icon-svg" aria-hidden="true"><use xlink:href="#icon-lock"></use></svg>
|
||||
|
||||
<el-tooltip v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
|
||||
<el-form-item prop="password" style="margin: 8px 8.3%">
|
||||
<el-input
|
||||
:key="passwordType"
|
||||
ref="password"
|
||||
v-model="dataForm.password"
|
||||
:type="passwordType"
|
||||
:placeholder="$t('login.password')"
|
||||
name="password"
|
||||
tabindex="2"
|
||||
autocomplete="on"
|
||||
@keyup.native="checkCapslock"
|
||||
@blur="capsTooltip = false"
|
||||
@keyup.enter.native="dataFormSubmitHandle()"
|
||||
/>
|
||||
<span class="show-pwd" @click="showPwd">
|
||||
<svg-icon :icon-class="passwordType === 'password' ? 'eye-open' : 'eye'" />
|
||||
</span>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="captcha">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="14">
|
||||
<el-input v-model="dataForm.captcha" :placeholder="$t('login.captcha')">
|
||||
<span slot="prefix" class="el-input__icon">
|
||||
<svg class="icon-svg" aria-hidden="true"><use xlink:href="#icon-safetycertificate"></use></svg>
|
||||
</span>
|
||||
</el-input>
|
||||
</el-tooltip>
|
||||
|
||||
<!-- <lang-select class="login-language" /> -->
|
||||
|
||||
<el-button :loading="loading" type="primary" style="width: 83.4%; height: 6vh; background-color: #0B58FF; margin: 0px 8.3%; margin-top: 5vh" @click="dataFormSubmitHandle()">
|
||||
{{ $t('login.title') }}
|
||||
</el-button>
|
||||
<el-row class="login-footer">
|
||||
<el-row class="login-language">
|
||||
<el-col
|
||||
:span="2"
|
||||
:offset="8"
|
||||
:class="['login-language-box', this.$root.$i18n.locale === 'zh-CN' ? 'isActive' : '']"
|
||||
@click.native="chLang('zh')"
|
||||
>
|
||||
中文
|
||||
</el-col>
|
||||
<el-col :span="10" class="login-captcha">
|
||||
<img :src="captchaPath" @click="getCaptcha()">
|
||||
<el-col :span="1" :offset="1" style="color: #DCDFE6">|</el-col>
|
||||
<el-col
|
||||
:span="2"
|
||||
:offset="1"
|
||||
:class="['login-language-box', this.$root.$i18n.locale === 'en' ? 'isActive' : '']"
|
||||
@click.native="chLang('en')"
|
||||
>
|
||||
English
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="dataFormSubmitHandle()" class="w-percent-100">{{ $t('login.title') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="login-footer">
|
||||
<p style="background: #ececec99; border-radius: 8px;">
|
||||
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('zh')">中文</el-button> |
|
||||
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('en')">English</el-button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<el-row class="login-copyright">
|
||||
{{ $t('login.copyright') }}
|
||||
</p>
|
||||
</el-row>
|
||||
</el-row>
|
||||
<!-- <div style="position:relative">
|
||||
<div class="tips">
|
||||
<span>Username : admin</span>
|
||||
<span>Password : any</span>
|
||||
</div>
|
||||
</main>
|
||||
<div class="tips">
|
||||
<span style="margin-right:18px;">Username : editor</span>
|
||||
<span>Password : any</span>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { downLoadBGP } from '@/api/user'
|
||||
// import { mapGetters } from 'vuex'
|
||||
import Cookies from 'js-cookie'
|
||||
import debounce from 'lodash/debounce'
|
||||
// import { getUUID } from '@/utils'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
baseImg: require('../../assets/img/login-back.png'),
|
||||
coverImgUrl: '',
|
||||
captchaPath: '',
|
||||
passwordType: 'password',
|
||||
capsTooltip: false,
|
||||
loading: false,
|
||||
dataForm: {
|
||||
username: 'admin',
|
||||
password: 'admin',
|
||||
@@ -73,6 +120,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// ...mapGetters(['language']),
|
||||
dataRule() {
|
||||
return {
|
||||
username: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
@@ -87,6 +135,20 @@ export default {
|
||||
// this.getCaptcha()
|
||||
},
|
||||
methods: {
|
||||
checkCapslock(e) {
|
||||
const { key } = e
|
||||
this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z')
|
||||
},
|
||||
showPwd() {
|
||||
if (this.passwordType === 'password') {
|
||||
this.passwordType = ''
|
||||
} else {
|
||||
this.passwordType = 'password'
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.password.focus()
|
||||
})
|
||||
},
|
||||
chLang(lang) {
|
||||
switch (lang) {
|
||||
case 'zh':
|
||||
@@ -138,6 +200,7 @@ export default {
|
||||
})
|
||||
|
||||
this.$router.replace({ name: 'home' })
|
||||
// this.$router.replace({ name: 'sys-log-login' })
|
||||
})
|
||||
.catch(err => {
|
||||
this.$message({
|
||||
@@ -154,3 +217,201 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 修复input 背景不协调 和光标变色 */
|
||||
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
|
||||
|
||||
// $bg:#283443;
|
||||
$light_gray:#fff;
|
||||
$cursor: #161616;
|
||||
|
||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
||||
.login-container .el-input input {
|
||||
color: $cursor;
|
||||
height: 6vh !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
width: 85%;
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 12px 5px 12px 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border: 1px solid #D7D8D9;
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
height: 6vh;
|
||||
.el-form-item__content {
|
||||
height: calc(6vh - 2px);
|
||||
line-height: 6vh;
|
||||
.el-input {
|
||||
height: calc(6vh - 2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// $bg:#2d3a4b;
|
||||
$dark_gray:#889aa4;
|
||||
$light_gray:#eee;
|
||||
$cursor: #161616;
|
||||
|
||||
.login-container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
background-size: cover;
|
||||
// background-color: $bg;
|
||||
overflow: hidden;
|
||||
.login-background{
|
||||
position: absolute;
|
||||
width: 60%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.login-background-container{
|
||||
width: 95%;
|
||||
.back-title{
|
||||
color: #26B9DE;
|
||||
font-size: 88px;
|
||||
margin-left: 17%;
|
||||
span {
|
||||
color: #fff;
|
||||
}
|
||||
p {
|
||||
font-size: 22px;
|
||||
letter-spacing: 1px;
|
||||
.back-title-point {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 8px;
|
||||
background-color: #26B9DE;
|
||||
margin-right: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login-form {
|
||||
position: absolute;
|
||||
width: 40%;
|
||||
max-width: 100%;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 0 6.67%;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
background: rgba($color: #fff, $alpha: 1);
|
||||
backdrop-filter: blur(10px);
|
||||
box-shadow: 5px 5px 5px rgba($color: #000000, $alpha: .1);
|
||||
.login-footer{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
margin-bottom: 5vh;
|
||||
}
|
||||
.login-language{
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
color: $cursor;
|
||||
margin-bottom: 12px;
|
||||
.login-language-box {
|
||||
cursor: pointer;
|
||||
}
|
||||
.isActive {
|
||||
color: #0B58FF;
|
||||
cursor: auto;
|
||||
}
|
||||
}
|
||||
.login-copyright{
|
||||
text-align: center;
|
||||
color: #C7C7C7;
|
||||
font-size: 15px;
|
||||
line-height: 28px;
|
||||
padding: 0 16%;
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: #000;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title-container {
|
||||
position: relative;
|
||||
margin-top: 18vh;
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
line-height: 6vh;
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
font-size: 16px;
|
||||
color: $dark_gray;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.thirdparty-button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 6px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 470px) {
|
||||
.thirdparty-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||