Compare commits
17 Commits
lb
...
2f4e9f31cd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f4e9f31cd | ||
|
|
5798e5b6e0 | ||
|
|
3265b4a580 | ||
|
|
a08af6774e | ||
|
|
3c38763cf4 | ||
|
|
23b7b85b39 | ||
| 2f2eaf4e20 | |||
|
|
a5a4f93328 | ||
|
|
f7938f30e2 | ||
|
|
d23cb260a4 | ||
|
|
e5eb49a7b6 | ||
|
|
35d5d91c23 | ||
| f3a7e38d13 | |||
| 1617bc347a | |||
| 68c271618a | |||
| ff11e1d3fb | |||
| 37c0c445a3 |
19
src/App.vue
@@ -1,5 +1,13 @@
|
||||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-11-25 09:51:46
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2023-01-13 15:13:05
|
||||
-->
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<transition name="el-fade-in-linear" id="app">
|
||||
<router-view />
|
||||
</transition>
|
||||
</template>
|
||||
@@ -8,10 +16,13 @@
|
||||
.el-table th.gutter {
|
||||
display: table-cell !important;
|
||||
}
|
||||
#app {
|
||||
background-color: #f2f4f9;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
import { messages } from '@/i18n'
|
||||
// import { messages } from '@/i18n'
|
||||
export default {
|
||||
watch: {
|
||||
'$i18n.locale': 'i18nHandle'
|
||||
@@ -23,7 +34,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()
|
||||
@@ -32,3 +44,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
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/choicepart-bg.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
src/assets/img/choicepart/choicepart-hover.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
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 |
BIN
src/assets/img/logo2.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
src/assets/img/logo3.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
@@ -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,10 +254,14 @@ img {
|
||||
margin-right: 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
&__close {
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
.aui-content {
|
||||
&__wrapper {
|
||||
margin-left: $sidebar--width-fold;
|
||||
background-color: #F2F4F9;
|
||||
}
|
||||
&--tabs > .el-tabs > .el-tabs__header {
|
||||
left: $sidebar--width-fold;
|
||||
@@ -265,10 +282,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: #0b58ff;
|
||||
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 +309,7 @@ img {
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: mix(#000, $--color-primary, 15%);
|
||||
// background-color: #001528;
|
||||
}
|
||||
}
|
||||
> .el-menu-item.is-active,
|
||||
@@ -285,7 +317,7 @@ img {
|
||||
color: #fff;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
color: #263445;
|
||||
}
|
||||
}
|
||||
.el-menu-item i,
|
||||
@@ -332,7 +364,18 @@ 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: 14px;
|
||||
// 新加的
|
||||
margin-left: 10px;
|
||||
}
|
||||
&-mini {
|
||||
max-width: 100%;
|
||||
color: #fff;
|
||||
@@ -370,10 +413,15 @@ 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 {
|
||||
@@ -381,6 +429,7 @@ img {
|
||||
&:hover {
|
||||
.aui-navbar__icon-menu {
|
||||
color: $--color-text-primary;
|
||||
// color: #fff;
|
||||
}
|
||||
.el-dropdown {
|
||||
color: $--color-text-primary;
|
||||
@@ -392,9 +441,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 +513,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 +522,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 +557,10 @@ img {
|
||||
overflow-y: scroll;
|
||||
transition: width .3s;
|
||||
}
|
||||
.close {
|
||||
width: 0px;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
&__menu {
|
||||
width: $sidebar--width;
|
||||
border-right: 0;
|
||||
@@ -527,14 +587,21 @@ img {
|
||||
/* Content
|
||||
------------------------------ */
|
||||
.aui-content {
|
||||
position: relative;
|
||||
padding: $content--padding;
|
||||
min-height: calc(100vh - #{$navbar--height});
|
||||
top: 16px;
|
||||
margin:0 16px 0;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 16px 16px 0;
|
||||
//此处修底部高度
|
||||
height: calc(100vh - 85px);
|
||||
overflow: auto;
|
||||
&__wrapper {
|
||||
position: relative;
|
||||
// 注释掉可隐藏侧边栏,但需要在main.vue中加入main-content的限制条件
|
||||
margin-left: $sidebar--width;
|
||||
min-height: calc(100vh - #{$navbar--height});
|
||||
background-color: $content--background-color;
|
||||
//此处修改背景色
|
||||
background-color: #F2F4F9;
|
||||
transition: margin-left .3s;
|
||||
}
|
||||
> .aui-card--fill > .el-card__body {
|
||||
|
||||
@@ -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>
|
||||
@@ -5,9 +5,8 @@
|
||||
:visible.sync="visible"
|
||||
@close="handleClose"
|
||||
:distory-on-close="true"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
|
||||
:close-on-click-modal="false">
|
||||
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
|
||||
<!-- 如果需要更精细一点的布局,可以根据配置项实现地再复杂一点,但此处暂时全部采用一行两列布局 -->
|
||||
<el-row v-for="n in rows" :key="n" :gutter="20">
|
||||
@@ -18,16 +17,14 @@
|
||||
v-if="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]"
|
||||
:prop="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name"
|
||||
:key="`${n}-col-${c}-item`"
|
||||
:label="getLabel(n, c)"
|
||||
>
|
||||
:label="getLabel(n, c)">
|
||||
<!-- 暂时先不实现部分输入方式 -->
|
||||
<el-input
|
||||
v-if="getType(n, c) === 'input'"
|
||||
:placeholder="getPlaceholder(n, c)"
|
||||
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
|
||||
clearable
|
||||
:disabled="isDetail"
|
||||
/>
|
||||
:disabled="isDetail" />
|
||||
<el-radio v-if="getType(n, c) === 'radio'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||
<el-checkbox v-if="getType(n, c) === 'check'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||
<el-select
|
||||
@@ -36,8 +33,7 @@
|
||||
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
|
||||
clearable
|
||||
:disabled="isDetail"
|
||||
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)"
|
||||
>
|
||||
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)">
|
||||
<el-option v-for="opt in configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :key="opt.label + Math.random()" :label="opt.label" :value="opt.value" />
|
||||
</el-select>
|
||||
<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||
@@ -47,16 +43,14 @@
|
||||
:options="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options"
|
||||
:props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
|
||||
:disabled="isDetail"
|
||||
clearable
|
||||
/>
|
||||
clearable />
|
||||
<el-time-select v-if="getType(n, c) === 'time'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
|
||||
<el-date-picker
|
||||
v-if="getType(n, c) === 'date'"
|
||||
v-bind="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
|
||||
:placeholder="getPlaceholder(n, c)"
|
||||
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
|
||||
:disabled="isDetail"
|
||||
/>
|
||||
:disabled="isDetail" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -65,14 +59,13 @@
|
||||
<template v-if="configs.extraComponents && configs.extraComponents.length > 0">
|
||||
<el-form-item v-for="(ec, index) in configs.extraComponents" :key="ec.name + index" :label="ec.label" class="extra-components">
|
||||
<component
|
||||
style="margin-top: 40px;"
|
||||
style="margin-top: 40px"
|
||||
v-if="ec.hasModel"
|
||||
:is="ec.component"
|
||||
v-bind="ec.props"
|
||||
v-model="dataForm[ec.name]"
|
||||
@ready="handleEditorReady"
|
||||
:read-only="isDetail"
|
||||
/>
|
||||
:read-only="isDetail" />
|
||||
<!-- <component v-if="ec.hasModel" :is="ec.component" v-bind="ec.props" v-model="dataForm[ec.name]" /> -->
|
||||
<component
|
||||
v-else
|
||||
@@ -80,8 +73,7 @@
|
||||
v-bind="ec.props"
|
||||
@uploader-update-filelist="handleUploadListUpdate($event, ec.props.extraParams.typeCode)"
|
||||
:uploader-inject-file-list="/*用于设备分流的*/ fileList[ec.props.extraParams.typeCode]"
|
||||
:read-only="isDetail"
|
||||
/>
|
||||
:read-only="isDetail" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
@@ -96,11 +88,14 @@
|
||||
<el-button
|
||||
v-if="
|
||||
!isDetail &&
|
||||
(operate.showAlways ||
|
||||
(((dataForm.id && operate.showOnEdit) || (!dataForm.id && !operate.showOnEdit)) && (operate.permission ? $hasPermission(operate.permission) : true)))
|
||||
(operate.showAlways ||
|
||||
(((dataForm.id && operate.showOnEdit) || (!dataForm.id && !operate.showOnEdit)) && (operate.permission ? $hasPermission(operate.permission) : true)))
|
||||
"
|
||||
:key="`operate-${index}`"
|
||||
:type="btnType[operate.name]"
|
||||
:style="{
|
||||
backgroundColor: btnType[operate.name],
|
||||
color: btnColor[operate.name]
|
||||
}"
|
||||
@click="handleClick(operate)"
|
||||
>{{ btnName[operate.name] }}</el-button
|
||||
>
|
||||
@@ -125,9 +120,17 @@ const title = {
|
||||
|
||||
// 或者也可以改造成自定义颜色:
|
||||
const btnType = {
|
||||
save: 'success',
|
||||
update: 'primary',
|
||||
reset: 'text'
|
||||
add :'#0b58ff',
|
||||
save: '#000',
|
||||
update: '#0b58ff',
|
||||
reset: ''
|
||||
// cancel: 'text'
|
||||
// add more...
|
||||
}
|
||||
const btnColor = {
|
||||
save: '#fff',
|
||||
update: '#fff',
|
||||
reset: ''
|
||||
// cancel: 'text'
|
||||
// add more...
|
||||
}
|
||||
@@ -154,7 +157,7 @@ export default {
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
nameFilter: function(name) {
|
||||
nameFilter: function (name) {
|
||||
if (!name) return null
|
||||
// for i18n
|
||||
const defaultNames = {
|
||||
@@ -181,6 +184,7 @@ export default {
|
||||
/** 按钮相关属性 */
|
||||
btnName,
|
||||
btnType,
|
||||
btnColor,
|
||||
defaultNames: {
|
||||
name: i18n.t('name'),
|
||||
code: i18n.t('code'),
|
||||
@@ -222,7 +226,7 @@ export default {
|
||||
|
||||
/** 转换 configs.fields 的结构,把纯字符串转为对象 */
|
||||
this.$nextTick(() => {
|
||||
this.configs.fields = this.configs.fields.map(item => {
|
||||
this.configs.fields = this.configs.fields.map((item) => {
|
||||
if (typeof item === 'string') {
|
||||
return { name: item }
|
||||
}
|
||||
@@ -230,13 +234,13 @@ export default {
|
||||
})
|
||||
|
||||
/** 动态设置dataForm字段 */
|
||||
this.configs.fields.forEach(item => {
|
||||
this.configs.fields.forEach((item) => {
|
||||
this.$set(this.dataForm, [item.name], '')
|
||||
|
||||
/** select 的默认值设置 */
|
||||
if (item.type === 'select') {
|
||||
const opts = item.options || []
|
||||
const dft = opts.find(item => item.default || false)
|
||||
const dft = opts.find((item) => item.default || false)
|
||||
if (dft) {
|
||||
this.$set(this.dataForm, [item.name], dft.value)
|
||||
}
|
||||
@@ -259,10 +263,10 @@ export default {
|
||||
// 如果有 relatedField,就需要在当前item的数据加载后,刷新 relatedField 的列表
|
||||
if (item.relatedField) {
|
||||
this.$watch(
|
||||
function() {
|
||||
function () {
|
||||
return this.dataForm[item.name]
|
||||
},
|
||||
function(val, old) {
|
||||
function (val, old) {
|
||||
if (val && val !== old) {
|
||||
this.$emit('select-change', { name: item.name, id: val })
|
||||
}
|
||||
@@ -318,7 +322,7 @@ export default {
|
||||
}
|
||||
/** 检查是否需要额外的组件 */
|
||||
this.configs.extraComponents &&
|
||||
this.configs.extraComponents.forEach(item => {
|
||||
this.configs.extraComponents.forEach((item) => {
|
||||
// if (Object.hasOwn(this.dataForm, [item.name])) {
|
||||
if (this.dataForm.hasOwnProperty(item.name)) {
|
||||
return
|
||||
@@ -409,7 +413,7 @@ export default {
|
||||
this.fileList = {}
|
||||
if (this.dataForm.files) {
|
||||
// console.log('files: ', this.dataForm.files)
|
||||
this.dataForm.files.forEach(file => {
|
||||
this.dataForm.files.forEach((file) => {
|
||||
// const fileName = file.fileUrl.split('/').pop()
|
||||
/** [1] 处理 fileList */
|
||||
// if (Object.hasOwn(this.fileList, file.typeCode)) {
|
||||
@@ -439,7 +443,7 @@ export default {
|
||||
this.shouldWait.then(() => {
|
||||
if (this.tempForm.length) {
|
||||
// console.log('create new, tempform', JSON.stringify(this.tempForm.length))
|
||||
this.tempForm.forEach(item => {
|
||||
this.tempForm.forEach((item) => {
|
||||
// console.log('item data', item.data)
|
||||
this.dataForm[item.name] = item.data
|
||||
})
|
||||
@@ -452,7 +456,7 @@ export default {
|
||||
},
|
||||
|
||||
emitSelectChange(name, id) {
|
||||
const currentField = this.configs.fields.find(item => item.name === name)
|
||||
const currentField = this.configs.fields.find((item) => item.name === name)
|
||||
if (currentField.relatedField) {
|
||||
this.dataForm[currentField.relatedField] = null
|
||||
}
|
||||
@@ -464,7 +468,7 @@ export default {
|
||||
handleClick(btn) {
|
||||
/** 提取url */
|
||||
const urls = {}
|
||||
this.configs.operations.map(item => {
|
||||
this.configs.operations.map((item) => {
|
||||
urls[item.name] = {}
|
||||
urls[item.name].url = item.url
|
||||
urls[item.name].extraFields = item.extraFields || {}
|
||||
@@ -474,7 +478,7 @@ export default {
|
||||
case 'save':
|
||||
case 'update':
|
||||
/** 需要验证表单的操作 */
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
/** 对于文件上传的单独处理(合并处理) */
|
||||
if (Object.keys(this.fileForm).length) {
|
||||
@@ -490,7 +494,7 @@ export default {
|
||||
this.$set(this.dataForm, 'fileIds', fileIds)
|
||||
}
|
||||
|
||||
// console.log('before send: ', this.dataForm)
|
||||
console.log('before send: ', this.dataForm)
|
||||
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(urls[btn.name].url),
|
||||
@@ -513,7 +517,7 @@ export default {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
this.$message({
|
||||
message: err,
|
||||
type: 'error',
|
||||
@@ -557,7 +561,7 @@ export default {
|
||||
this.$set(
|
||||
this.fileForm,
|
||||
typeCode,
|
||||
filelist.map(item => item.id)
|
||||
filelist.map((item) => item.id)
|
||||
)
|
||||
// console.log('after handleUploadListUpdate(): ', this.fileForm)
|
||||
},
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2023-01-06 15:49:50
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2023-01-16 10:18:25
|
||||
*/
|
||||
import i18n from '@/i18n'
|
||||
|
||||
export default {
|
||||
@@ -19,7 +27,8 @@ export default {
|
||||
colors: {
|
||||
delete: '#FF5454',
|
||||
preview: '#f09843',
|
||||
design: '#99089f',
|
||||
design: '#0b58ff',
|
||||
edit: '#0b58ff'
|
||||
// 'view-trend': 'red'
|
||||
// add more...
|
||||
},
|
||||
@@ -57,7 +66,8 @@ export default {
|
||||
for (const optionStr of this.injectData.head?.options) {
|
||||
const optObj = typeof optionStr === 'object'
|
||||
// btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr))
|
||||
btns.push(h('el-button', { props: { type: 'text' }, style: { color: optObj ? this.colors[optionStr.name] : this.colors[optionStr] || '#409EFF' }, on: { click: this.emit.bind(null, optionStr) } }, typeof optionStr === 'object' ? this.text[optionStr.name] : this.text[optionStr]))
|
||||
// 原色 #409EFF
|
||||
btns.push(h('el-button', { props: { type: 'text' }, style: { color: optObj ? this.colors[optionStr.name] : this.colors[optionStr] || '#0b58ff' }, on: { click: this.emit.bind(null, optionStr) } }, typeof optionStr === 'object' ? this.text[optionStr.name] : this.text[optionStr]))
|
||||
}
|
||||
return h('span', null, btns)
|
||||
}
|
||||
|
||||
@@ -1,16 +1,42 @@
|
||||
<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">
|
||||
<!-- :label="item.name ? item.name : item.label" 三元判别就可以让厂务的实时数据可以显示 -->
|
||||
<el-checkbox v-for="(item, index) in tableHeadConfigs" :key="'cb' + index" v-model="selectedBox[index]" :label="item.name ? item.name : item.label" />
|
||||
</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: '40px' }"
|
||||
: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 +46,14 @@
|
||||
:header-align="head.align || 'center'"
|
||||
:align="head.align || 'center'"
|
||||
:width="head.width || 50"
|
||||
:index="head.type === 'index' ? val => {
|
||||
return val + 1 + (page - 1) * size
|
||||
} : null"
|
||||
v-bind="head.more"
|
||||
></el-table-column>
|
||||
:index="
|
||||
head.type === 'index'
|
||||
? (val) => {
|
||||
return val + 1 + (page - 1) * size
|
||||
}
|
||||
: null
|
||||
"
|
||||
v-bind="head.more"></el-table-column>
|
||||
<!-- 普通的表头 -->
|
||||
<el-table-column
|
||||
v-else
|
||||
@@ -38,9 +67,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 +86,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 +108,7 @@ export default {
|
||||
},
|
||||
maxHeight: {
|
||||
type: Number,
|
||||
// default: window.innerHeight - 325
|
||||
default: 500
|
||||
},
|
||||
spanMethod: {
|
||||
@@ -88,21 +125,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>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: lb
|
||||
* @Date: 2022-05-18 16:00:00
|
||||
* @LastEditors: lb
|
||||
* @LastEditTime: 2022-05-18 16:00:00
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2023-01-03 10:00:06
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -45,18 +45,19 @@ $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: '';
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 4px;
|
||||
height: $height + 2px;
|
||||
height: $height;
|
||||
border-radius: 1px;
|
||||
margin-right: $mgr;
|
||||
// background-color: #0b58ff;
|
||||
background-color: #409EFF;
|
||||
margin-right: $mgr;
|
||||
// background-color: #0b58ff;#409EFF;
|
||||
background-color: #0b58ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,9 @@ 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.brand.home = 'Home'
|
||||
|
||||
t.routes = {}
|
||||
t.routes['产品池'] = 'Products Pool'
|
||||
@@ -71,6 +72,7 @@ t.andeng.btnVal = 'Button Value'
|
||||
t.andeng.btnBoxModel = 'Button Box Model'
|
||||
|
||||
|
||||
t.copyright = 'VISHAKHA glass pvt Ltd'
|
||||
t.dictValueList = 'View Details'
|
||||
t.save = 'Save'
|
||||
t.add = 'Add'
|
||||
@@ -136,11 +138,21 @@ t.min = 'Min Value'
|
||||
t.max = 'Max Value'
|
||||
t.status = 'Status'
|
||||
t.normal = 'Normal'
|
||||
t.shutdown = 'Shut Down'
|
||||
t.malfunction = 'Malfunction' // ?
|
||||
t.diagram = 'Device Status Sequence Diagram'
|
||||
t.addr = 'Address'
|
||||
t.planStop = 'Plan to stop'
|
||||
t.startTime = 'Start Time'
|
||||
t.endTime = 'End Time'
|
||||
t.today = 'Today'
|
||||
t.time = 'Time'
|
||||
t.eqId = 'Current Equipment ID:'
|
||||
t.ti = 'Time'
|
||||
t.plcCode = 'PLC Code'
|
||||
t.equName = 'Equipment Name'
|
||||
t.equCode = 'Equipment Code'
|
||||
|
||||
|
||||
t.graph = 'Graph'
|
||||
t.category = 'Category'
|
||||
@@ -373,6 +385,13 @@ t.pl.status = 'Product Line Status'
|
||||
t.pl.belong = 'Product Line'
|
||||
t.pl.tvalue = 'TT Value'
|
||||
t.pl.factoryHints = 'Please select a factory'
|
||||
t.pl.process = 'Working procedure'
|
||||
t.pl.add = 'Add Euipment'
|
||||
t.pl.queryFirst = 'Please Query First'
|
||||
t.pl.choose = 'Please select equipment'
|
||||
t.pl.confirm = 'Confirm'
|
||||
t.pl.cancel = 'Cancel'
|
||||
t.pl.success = 'The new device data is obtained successfully'
|
||||
|
||||
|
||||
t.prompt = {}
|
||||
@@ -387,6 +406,7 @@ t.prompt.month = 'Please choose month'
|
||||
t.validate = {}
|
||||
t.validate.required = 'This is required.'
|
||||
t.validate.format = '{attr} has a wrong format.'
|
||||
t.validate.keyValueWarning = 'The value must be an integer between 0 and 100!'
|
||||
|
||||
t.upload = {}
|
||||
t.upload.title = 'Upload Assets'
|
||||
@@ -430,7 +450,9 @@ t.login.username = 'Username'
|
||||
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.copyright = 'Copyright @Intelligent Automation Research Institute Co., Ltd Version: 1.0'
|
||||
t.login.copyright = 'Copyright @VISHAKHA glass pvt 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: 2023-01-12 11:19:00
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import Cookies from 'js-cookie'
|
||||
@@ -41,7 +49,10 @@ export function getLanguage() {
|
||||
}
|
||||
|
||||
export default new VueI18n({
|
||||
// locale: Cookies.get('language') || 'zh-CN',
|
||||
// 默认语言
|
||||
locale: Cookies.get('language') || 'en',
|
||||
locale: getLanguage(), // 先默认中文
|
||||
messages
|
||||
messages,
|
||||
//抑制警告
|
||||
silentFallbackWarn: true,
|
||||
})
|
||||
|
||||
@@ -4,8 +4,9 @@ t.loading = '加载中...'
|
||||
t.createTime = '添加时间'
|
||||
|
||||
t.brand = {}
|
||||
t.brand.lg = '生产监控系统'
|
||||
t.brand.mini = '监控'
|
||||
t.brand.lg = '深加工SCADA平台'
|
||||
t.brand.mini = 'SCADA'
|
||||
t.brand.home = '首页'
|
||||
|
||||
t.routes = {}
|
||||
// 一级
|
||||
@@ -71,6 +72,7 @@ t.andeng.btnVal = '按钮值'
|
||||
t.andeng.btnBoxModel = '按钮盒模式'
|
||||
|
||||
|
||||
t.copyright = 'VISHAKHA glass pvt Ltd'
|
||||
t.dictValueList = '查看值列表'
|
||||
t.save = '保存'
|
||||
t.add = '新增' // 1
|
||||
@@ -136,12 +138,21 @@ t.min = '最小值' // 1
|
||||
t.max = '最大值' // 1
|
||||
t.status = '状态' // 1
|
||||
t.normal = '正常' // ?
|
||||
t.shutdown = '停机' // ?
|
||||
t.malfunction = '故障' // ?
|
||||
t.diagram = '设备状态时序图'
|
||||
t.addr = '地址' // 1
|
||||
t.planStop = '计划停机' // ?
|
||||
t.startTime = '开始时间' // 1
|
||||
t.endTime = '结束时间' // 1
|
||||
t.to = '至' // 1
|
||||
t.today = '今天' // 1
|
||||
t.time = '选择时间'
|
||||
t.eqId = '当前设备ID:'
|
||||
t.ti = '时间'
|
||||
t.plcCode = 'PLC 编码'
|
||||
t.equName = '设备名称'
|
||||
t.equCode = '设备编码'
|
||||
|
||||
t.graph = '图形'
|
||||
t.category = '分类'
|
||||
@@ -373,6 +384,14 @@ t.pl.status = '产线状态'
|
||||
t.pl.belong = '所属产线'
|
||||
t.pl.tvalue = '产线TT值(每小时下片数量)'
|
||||
t.pl.factoryHints = '请选择所属工厂'
|
||||
t.pl.process = '工序'
|
||||
t.pl.add = '添加设备'
|
||||
t.pl.queryFirst = '请先查询数据'
|
||||
t.pl.success = '新设备数据获取成功'
|
||||
t.pl.choose = '请选择设备'
|
||||
t.pl.confirm = '确定'
|
||||
t.pl.cancel = '取消'
|
||||
|
||||
|
||||
t.prompt = {}
|
||||
t.prompt.title = '提示'
|
||||
@@ -386,6 +405,7 @@ t.prompt.month = '请选择月份'
|
||||
t.validate = {}
|
||||
t.validate.required = '必填项不能为空'
|
||||
t.validate.format = '{attr}格式错误'
|
||||
t.validate.keyValueWarning = '该数值必须是100以内的正整数!'
|
||||
|
||||
t.upload = {}
|
||||
t.upload.title = '上传资料'
|
||||
@@ -429,7 +449,9 @@ t.login.username = '用户名'
|
||||
t.login.password = '密码'
|
||||
t.login.captcha = '验证码'
|
||||
t.login.demo = '在线演示'
|
||||
t.login.copyright = '版权所有:中建材智能自动化研究院有限公司 版本: 1.0'
|
||||
// t.login.copyright = '版权所有:中建材智能自动化研究院有限公司 版本: 1.0'
|
||||
t.login.copyright = '版权所有:VISHAKHA glass pvt Ltd 版本: 1.0'
|
||||
t.login.warning = '已经登录过了'
|
||||
|
||||
t.schedule = {}
|
||||
t.schedule.beanName = 'bean名称'
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-12-13 21:01:02
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2023-01-11 10:47:26
|
||||
*/
|
||||
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-', ''))
|
||||
}
|
||||
}
|
||||
|
||||
const svgFiles = require.context('./svg', true, /\.svg$/)
|
||||
svgFiles.keys().map(item => svgFiles(item))
|
||||
|
||||
2
src/icons/svg/chrome.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1660620397071" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M87.788 227.913c17.049 29.189 34.039 58.291 51.043 87.383 51.784 88.596 103.585 177.181 155.325 265.804 2.62 4.485 5.062 9.143 7 13.955C349.786 715.89 484.618 771.244 604.34 719.47c2.398-1.037 4.887-1.861 9.302-3.526-2.588 4.897-4.038 7.89-5.7 10.755-54.798 94.487-109.707 188.908-164.246 283.545-4.133 7.171-8.493 8.259-15.899 6.935-206.01-36.867-364.332-183.492-412.98-387.026-33.681-140.916-9.465-273.513 67.799-396.221a55.282 55.282 0 0 1 2.993-4.263c0.41-0.532 1.065-0.875 2.179-1.756zM637.574 322.251c4.879-0.232 7.832-0.494 10.785-0.495 109.636-0.021 219.273 0.08 328.908-0.221 8.034-0.021 11.143 2.592 13.896 9.949 77.165 206.263 15.492 437.682-155.167 576.728-99.718 81.243-214.648 119.245-343.254 115.541-4.101-0.116-8.19-0.579-13.782-0.991 2.282-4.327 3.863-7.594 5.678-10.723 73.799-127.297 147.568-254.609 221.459-381.853 61.326-105.603 35.165-231.359-63.311-303.663-1.275-0.936-2.452-2.003-5.212-4.272zM970.66 284.978h-15.17c-145.492 0-290.984-0.444-436.474 0.156-97.432 0.401-169.373 44.268-212.233 132.11-11.095 22.739-15.798 48.603-23.28 72.528-0.437-0.663-2.509-3.517-4.279-6.546-54.593-93.406-109.079-186.878-163.896-280.152-3.852-6.555-3.331-10.476 1.434-16.115C205.093 82.393 316.58 20.463 452.687 3.72c207.799-25.561 413.84 82.445 511.367 267.993 1.915 3.643 3.675 7.368 6.606 13.265zM702.425 512.551c-0.178 106.027-85.601 189.996-193.057 189.771-103.007-0.212-187.656-86.695-187.287-191.343 0.373-106.007 85.766-189.459 193.555-189.154 102.551 0.287 186.962 86.481 186.789 190.726z" p-id="965"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
2
src/icons/svg/chrome2.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1660620397071" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M87.788 227.913c17.049 29.189 34.039 58.291 51.043 87.383 51.784 88.596 103.585 177.181 155.325 265.804 2.62 4.485 5.062 9.143 7 13.955C349.786 715.89 484.618 771.244 604.34 719.47c2.398-1.037 4.887-1.861 9.302-3.526-2.588 4.897-4.038 7.89-5.7 10.755-54.798 94.487-109.707 188.908-164.246 283.545-4.133 7.171-8.493 8.259-15.899 6.935-206.01-36.867-364.332-183.492-412.98-387.026-33.681-140.916-9.465-273.513 67.799-396.221a55.282 55.282 0 0 1 2.993-4.263c0.41-0.532 1.065-0.875 2.179-1.756zM637.574 322.251c4.879-0.232 7.832-0.494 10.785-0.495 109.636-0.021 219.273 0.08 328.908-0.221 8.034-0.021 11.143 2.592 13.896 9.949 77.165 206.263 15.492 437.682-155.167 576.728-99.718 81.243-214.648 119.245-343.254 115.541-4.101-0.116-8.19-0.579-13.782-0.991 2.282-4.327 3.863-7.594 5.678-10.723 73.799-127.297 147.568-254.609 221.459-381.853 61.326-105.603 35.165-231.359-63.311-303.663-1.275-0.936-2.452-2.003-5.212-4.272zM970.66 284.978h-15.17c-145.492 0-290.984-0.444-436.474 0.156-97.432 0.401-169.373 44.268-212.233 132.11-11.095 22.739-15.798 48.603-23.28 72.528-0.437-0.663-2.509-3.517-4.279-6.546-54.593-93.406-109.079-186.878-163.896-280.152-3.852-6.555-3.331-10.476 1.434-16.115C205.093 82.393 316.58 20.463 452.687 3.72c207.799-25.561 413.84 82.445 511.367 267.993 1.915 3.643 3.675 7.368 6.606 13.265zM702.425 512.551c-0.178 106.027-85.601 189.996-193.057 189.771-103.007-0.212-187.656-86.695-187.287-191.343 0.373-106.007 85.766-189.459 193.555-189.154 102.551 0.287 186.962 86.481 186.789 190.726z" p-id="965" fill="#fff"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
13
src/icons/svg/countdown.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="选择" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="首页选择" transform="translate(-1492.000000, -20.000000)" fill-rule="nonzero">
|
||||
<g id="banner/top" transform="translate(1.000000, -0.000000)">
|
||||
<g id="倒计时" transform="translate(1491.000000, 20.000000)">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M18.6251339,2.5 L18.7173046,2.506884 C19.0181775,2.55223577 19.25,2.81622235 19.25,3.13636364 C19.25,3.48849651 18.9695089,3.77267387 18.6250952,3.77272728 L18.6250952,3.77272728 L17.500134,3.77272728 L17.500134,6.68181819 L17.4950738,6.93194703 C17.4134263,8.92636566 16.3486624,10.7533909 14.6512846,11.7864428 L14.6512846,11.7864428 L14.3002984,12.0000588 L14.6513368,12.2135889 L14.8602283,12.3467668 C16.5045868,13.4445685 17.5015027,15.3107448 17.500134,17.3180114 L17.500134,17.3180114 L17.500134,20.2272727 L18.6251339,20.2272727 L18.7173078,20.2341693 C19.0181892,20.2795564 19.25,20.5435156 19.25,20.8636364 C19.25,21.2157918 18.9694948,21.5 18.6251339,21.5 L18.6251339,21.5 L4.62513396,21.5 L4.53296333,21.493116 C4.23209038,21.4477642 4.00026791,21.1837777 4.00026791,20.8636364 C4.00026791,20.5115035 4.28075902,20.2273261 4.62517273,20.2272727 L4.62517273,20.2272727 L5.75013395,20.2272727 L5.75013395,17.3181818 L5.75519413,17.068053 C5.8368416,15.0736343 6.90160547,13.2466092 8.59898334,12.2135572 L8.59898334,12.2135572 L8.94996946,11.9999412 L8.59893115,11.7864111 L8.39003962,11.6532332 C6.74568111,10.5554315 5.74876521,8.68925518 5.75013389,6.68198865 L5.75013389,6.68198865 L5.75013395,3.77272728 L4.62513396,3.77272728 L4.53097506,3.76549115 C4.34557884,3.73677723 4.18042961,3.62417437 4.08444297,3.45578133 C3.97185234,3.2582593 3.97185234,3.01446799 4.08444297,2.81694595 C4.196414,2.6205109 4.40253386,2.5 4.62513396,2.5 L4.62513396,2.5 L18.6251339,2.5 Z M11.6309675,12.6364317 L11.4133705,12.641183 C8.9566894,12.7532313 7.00013396,14.805007 7.00013396,17.3181818 L7.00013396,17.3181818 L7.00013396,20.2272727 L16.2501339,20.2272727 L16.2501339,17.3181818 L16.2450986,17.0982663 C16.1348575,14.6926999 14.227663,12.7467226 11.8259996,12.6410372 L11.8259996,12.6410372 L11.6309675,12.6364317 Z M16.2501339,3.77272728 L7.00013396,3.77272728 L7.00013396,6.68181819 L7.00489156,6.89606874 C7.1155058,9.38167112 9.1410632,11.3636364 11.625134,11.3636364 L11.625134,11.3636364 L11.8208425,11.3591365 L12.0382189,11.3444826 C14.4134338,11.1283734 16.2499952,9.11397106 16.2501339,6.68183244 L16.2501339,6.68183244 L16.2501339,3.77272728 Z" id="形状结合" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
15
src/icons/svg/countdown2.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="1_基础资料" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="1-1工厂信息" transform="translate(-1446.000000, -20.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g id="banner/top/栏" transform="translate(336.000000, 0.000000)">
|
||||
<g id="编组-5" transform="translate(944.000000, 15.000000)">
|
||||
<g id="倒计时" transform="translate(166.000000, 5.000000)">
|
||||
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M18.6251339,2.5 L18.7173046,2.506884 C19.0181775,2.55223577 19.25,2.81622235 19.25,3.13636364 C19.25,3.48849651 18.9695089,3.77267387 18.6250952,3.77272728 L18.6250952,3.77272728 L17.500134,3.77272728 L17.500134,6.68181819 L17.4950738,6.93194703 C17.4134263,8.92636566 16.3486624,10.7533909 14.6512846,11.7864428 L14.6512846,11.7864428 L14.3002984,12.0000588 L14.6513368,12.2135889 L14.8602283,12.3467668 C16.5045868,13.4445685 17.5015027,15.3107448 17.500134,17.3180114 L17.500134,17.3180114 L17.500134,20.2272727 L18.6251339,20.2272727 L18.7173078,20.2341693 C19.0181892,20.2795564 19.25,20.5435156 19.25,20.8636364 C19.25,21.2157918 18.9694948,21.5 18.6251339,21.5 L18.6251339,21.5 L4.62513396,21.5 L4.53296333,21.493116 C4.23209038,21.4477642 4.00026791,21.1837777 4.00026791,20.8636364 C4.00026791,20.5115035 4.28075902,20.2273261 4.62517273,20.2272727 L4.62517273,20.2272727 L5.75013395,20.2272727 L5.75013395,17.3181818 L5.75519413,17.068053 C5.8368416,15.0736343 6.90160547,13.2466092 8.59898334,12.2135572 L8.59898334,12.2135572 L8.94996946,11.9999412 L8.59893115,11.7864111 L8.39003962,11.6532332 C6.74568111,10.5554315 5.74876521,8.68925518 5.75013389,6.68198865 L5.75013389,6.68198865 L5.75013395,3.77272728 L4.62513396,3.77272728 L4.53097506,3.76549115 C4.34557884,3.73677723 4.18042961,3.62417437 4.08444297,3.45578133 C3.97185234,3.2582593 3.97185234,3.01446799 4.08444297,2.81694595 C4.196414,2.6205109 4.40253386,2.5 4.62513396,2.5 L4.62513396,2.5 L18.6251339,2.5 Z M11.6309675,12.6364317 L11.4133705,12.641183 C8.9566894,12.7532313 7.00013396,14.805007 7.00013396,17.3181818 L7.00013396,17.3181818 L7.00013396,20.2272727 L16.2501339,20.2272727 L16.2501339,17.3181818 L16.2450986,17.0982663 C16.1348575,14.6926999 14.227663,12.7467226 11.8259996,12.6410372 L11.8259996,12.6410372 L11.6309675,12.6364317 Z M16.2501339,3.77272728 L7.00013396,3.77272728 L7.00013396,6.68181819 L7.00489156,6.89606874 C7.1155058,9.38167112 9.1410632,11.3636364 11.625134,11.3636364 L11.625134,11.3636364 L11.8208425,11.3591365 L12.0382189,11.3444826 C14.4134338,11.1283734 16.2499952,9.11397106 16.2501339,6.68183244 L16.2501339,6.68183244 L16.2501339,3.77272728 Z" id="形状结合"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
15
src/icons/svg/download.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="1_基础资料">
|
||||
<g id="1-1工厂信息" transform="translate(-1580.000000, -20.000000)">
|
||||
<g id="banner/top/栏" transform="translate(336.000000, 0.000000)">
|
||||
<g id="编组-5" transform="translate(944.000000, 15.000000)">
|
||||
<g id="下载" transform="translate(300.000000, 5.000000)">
|
||||
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M7.6875,13.5 L11.25,13.5 L11.25,3.75 C11.25,3.33578644 11.5857864,3 12,3 C12.4142136,3 12.75,3.33578644 12.75,3.75 L12.75,13.5 L12.75,13.5 L16.3125,13.5 L12,18 L7.6875,13.5 Z M20.25,12 C19.8357864,12 19.5,12.3357864 19.5,12.75 L19.5,18.5 C19.5,19.0522847 19.0522847,19.5 18.5,19.5 L5.5,19.5 C4.94771525,19.5 4.5,19.0522847 4.5,18.5 L4.5,12.75 C4.5,12.3357864 4.16421356,12 3.75,12 C3.33578644,12 3,12.3357864 3,12.75 L3,19 C3,20.1045695 3.8954305,21 5,21 L19,21 C20.1045695,21 21,20.1045695 21,19 L21,12.75 C21,12.3357864 20.6642136,12 20.25,12 Z" id="形状"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
15
src/icons/svg/download2.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="1_基础资料">
|
||||
<g id="1-1工厂信息" transform="translate(-1580.000000, -20.000000)">
|
||||
<g id="banner/top/栏" transform="translate(336.000000, 0.000000)">
|
||||
<g id="编组-5" transform="translate(944.000000, 15.000000)">
|
||||
<g id="下载" transform="translate(300.000000, 5.000000)">
|
||||
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M7.6875,13.5 L11.25,13.5 L11.25,3.75 C11.25,3.33578644 11.5857864,3 12,3 C12.4142136,3 12.75,3.33578644 12.75,3.75 L12.75,13.5 L12.75,13.5 L16.3125,13.5 L12,18 L7.6875,13.5 Z M20.25,12 C19.8357864,12 19.5,12.3357864 19.5,12.75 L19.5,18.5 C19.5,19.0522847 19.0522847,19.5 18.5,19.5 L5.5,19.5 C4.94771525,19.5 4.5,19.0522847 4.5,18.5 L4.5,12.75 C4.5,12.3357864 4.16421356,12 3.75,12 C3.33578644,12 3,12.3357864 3,12.75 L3,19 C3,20.1045695 3.8954305,21 5,21 L19,21 C20.1045695,21 21,20.1045695 21,19 L21,12.75 C21,12.3357864 20.6642136,12 20.25,12 Z" id="形状" fill="#fff"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
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/home.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1615188284589" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2221" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M998.428444 381.112889l-469.333333-353.180445c-0.469333-0.355556-0.981333-0.568889-1.479111-0.896a28.017778 28.017778 0 0 0-2.417778-1.464888 29.909333 29.909333 0 0 0-10.453333-3.128889 30.705778 30.705778 0 0 0-5.475556-0.014223 28.771556 28.771556 0 0 0-13.112889 4.707556c-0.412444 0.284444-0.867556 0.469333-1.28 0.782222l-469.333333 353.180445a28.458667 28.458667 0 0 0 34.204445 45.468444l73.656888-55.424V854.186667c0 111.701333 29.141333 147.555556 136.803556 147.555555h483.555556c107.662222 0 147.640889-35.854222 147.640888-147.555555V379.320889l62.805334 47.260444c5.12 3.854222 11.121778 5.717333 17.080889 5.717334a28.444444 28.444444 0 0 0 17.137777-51.185778zM443.747556 674.673778H580.266667c31.288889 0 36.707556 0.554667 36.707555 28.8v241.422222H417.877333V703.473778c0-28.245333-5.418667-28.8 25.870223-28.8z m400.782222-327.111111v506.666666c0 81.365333-14.193778 90.666667-90.752 90.666667h-108.359111V703.473778c0-48.967111-23.850667-57.244444-65.152-57.244445h-136.519111c-41.301333 0-54.314667 8.277333-54.314667 57.244445v241.422222H270.222222c-76.572444 0-79.914667-9.301333-79.914666-90.666667V347.562667c0-5.788444-1.749333-11.150222-4.721778-15.644445L512 86.272l334.336 251.591111a28.231111 28.231111 0 0 0-1.806222 9.699556z" fill="" p-id="2222"></path><path d="M435.370667 230.499556L250.055111 373.617778c-3.512889 2.688-2.858667 6.855111-2.858667 11.278222v161.777778a14.222222 14.222222 0 1 0 28.444445 0V391.907556l178.730667-138.837334c6.243556-4.778667 5.034667-13.710222 0.256-19.939555a13.425778 13.425778 0 0 0-19.256889-2.631111zM261.418667 589.340444a14.222222 14.222222 0 0 0-14.222223 14.222223v14.222222a14.222222 14.222222 0 1 0 28.444445 0v-14.222222a14.222222 14.222222 0 0 0-14.222222-14.222223z" fill="#000" p-id="2223"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
15
src/icons/svg/international.svg
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
18
src/icons/svg/language2.svg
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
17
src/icons/svg/language3.svg
Normal file
|
After Width: | Height: | Size: 6.8 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 |
@@ -112,8 +112,9 @@ export default {
|
||||
var tabName = this.$store.state.contentTabsActiveName
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
|
||||
if (this.$store.state.contentTabs.length <= 0) {
|
||||
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
|
||||
return false
|
||||
// this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
|
||||
// return false
|
||||
this.$router.push({ name: 'home' })
|
||||
}
|
||||
if (tabName === this.$store.state.contentTabsActiveName) {
|
||||
this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name })
|
||||
|
||||
@@ -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: 2023-01-12 09:50:26
|
||||
*/
|
||||
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,12 @@ export default new Vuex.Store({
|
||||
contentTabs: [
|
||||
{
|
||||
...window.SITE_CONFIG['contentTabDefault'],
|
||||
'name': 'home',
|
||||
'title': 'home'
|
||||
// 这里显示/隐藏 main-content的home标签
|
||||
// 'name': 'home',
|
||||
// 'title': 'home'
|
||||
}
|
||||
],
|
||||
contentTabsActiveName: 'home'
|
||||
// contentTabsActiveName: 'home'
|
||||
},
|
||||
modules: {
|
||||
user
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-11-25 09:51:46
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2023-01-11 20:52:35
|
||||
*/
|
||||
/** filters */
|
||||
import moment from 'moment'
|
||||
|
||||
@@ -21,4 +29,12 @@ export const pick = (obj, paths) => {
|
||||
}
|
||||
})
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
// export function timeFormatter(timeObj) {
|
||||
// if (timeObj) {
|
||||
// return moment(timeObj).format('YYYY-MM-DD HH:mm:ss')
|
||||
// } else {
|
||||
// return '-'
|
||||
// }
|
||||
// }
|
||||
@@ -113,4 +113,9 @@ export function calcMaxHeight(num) {
|
||||
|
||||
const finalHeight = clientHeight - num - FIXED_HEIGHT
|
||||
return finalHeight > 0 ? finalHeight : -finalHeight
|
||||
}
|
||||
}
|
||||
|
||||
// tableHeight
|
||||
export function tableHeight(n) {
|
||||
return window.innerHeight - n
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ const http = axios.create({
|
||||
* 请求拦截
|
||||
*/
|
||||
http.interceptors.request.use(config => {
|
||||
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
|
||||
// config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
|
||||
config.headers['Accept-Language'] = Cookies.get('language') || 'en'
|
||||
config.headers['token'] = Cookies.get('token') || ''
|
||||
// 默认参数
|
||||
var defaults = {}
|
||||
@@ -59,6 +60,7 @@ http.interceptors.response.use(response => {
|
||||
router.replace({ name: 'login' })
|
||||
return Promise.reject(response.data.msg)
|
||||
}
|
||||
// 下三行注释掉
|
||||
// else if (response.data.code === 500) {
|
||||
// return Promise.reject(response.data.msg)
|
||||
// }
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
56
src/views/Footerbar.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-01-27 10:07:42
|
||||
* @LastEditTime: 2023-01-13 16:22:01
|
||||
* @LastEditors: fzq
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \mt-bus-fe\src\layout\components\FooterBar.vue
|
||||
-->
|
||||
<template>
|
||||
<div v-if="this.$route.meta.hiddenSiderbar !== true" :class="[$store.state.sidebarFold == true ? 'footerbar' : 'footerbar2']">
|
||||
© {{ $t('copyright') }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.footerbar{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
// line-height: 50px;
|
||||
// text-indent: 2em;
|
||||
// background: #fff;
|
||||
// z-index: 999;
|
||||
// box-shadow: 2px -2px 2px rgba($color: #000000, $alpha: .1);
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #C7C7C7;
|
||||
margin: 5px 0;
|
||||
}
|
||||
.footerbar2{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
// line-height: 50px;
|
||||
// text-indent: 2em;
|
||||
// background: #fff;
|
||||
// z-index: 999;
|
||||
// box-shadow: 2px -2px 2px rgba($color: #000000, $alpha: .1);
|
||||
left: 50vw;
|
||||
font-size: 12px;
|
||||
color: #C7C7C7;
|
||||
margin: 5px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -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">
|
||||
@@ -10,18 +11,17 @@
|
||||
<el-dropdown-item @click.native="tabsCloseAllHandle()">{{ $t('contentTabs.closeAll') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-tabs v-model="$store.state.contentTabsActiveName" @tab-click="tabSelectedHandle" @tab-remove="tabRemoveHandle">
|
||||
<el-tabs v-model="$store.state.contentTabsActiveName" @tab-click="tabSelectedHandle" @tab-remove="tabRemoveHandle" ref="tabs">
|
||||
<el-tab-pane
|
||||
v-for="item in $store.state.contentTabs"
|
||||
:key="item.name"
|
||||
:name="item.name"
|
||||
:label="item.title"
|
||||
:closable="item.name !== 'home'"
|
||||
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }"
|
||||
>
|
||||
<template v-if="item.name === 'home'">
|
||||
:closable="item.name !== ''"
|
||||
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }">
|
||||
<!-- <template v-if="item.name === 'home'">
|
||||
<svg slot="label" class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#icon-home"></use></svg>
|
||||
</template>
|
||||
</template> -->
|
||||
<iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>
|
||||
<keep-alive v-else>
|
||||
<router-view v-if="item.name === $store.state.contentTabsActiveName" />
|
||||
@@ -44,6 +44,19 @@ export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
// 通过加上ref,再删除数组第一个元素来把空元素删除,不知道为何会出现这个元素
|
||||
this.$store.state.contentTabs.splice(0, 1)
|
||||
// 加个判断防止home页面报$children的错
|
||||
if (this.$route.meta.hiddenSiderbar !== true) {
|
||||
this.$refs.tabs.$children[0].$refs.tabs[0].style.display = 'none'
|
||||
}
|
||||
// console.log(this.$refs.tabs.$children[0].$refs)
|
||||
// console.log('11',this.$refs.tabs.$children[0].$refs.tabs[0])
|
||||
// console.log('22',this.$store.state.contentTabs)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// tabs, 是否通过iframe展示
|
||||
tabIsIframe(url) {
|
||||
@@ -51,7 +64,7 @@ export default {
|
||||
},
|
||||
// tabs, 选中tab
|
||||
tabSelectedHandle(tab) {
|
||||
tab = this.$store.state.contentTabs.filter(item => item.name === tab.name)[0]
|
||||
tab = this.$store.state.contentTabs.filter((item) => item.name === tab.name)[0]
|
||||
if (tab) {
|
||||
this.$router.push({
|
||||
name: tab.name,
|
||||
@@ -65,10 +78,11 @@ export default {
|
||||
if (tabName === 'home') {
|
||||
return false
|
||||
}
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter((item) => item.name !== tabName)
|
||||
if (this.$store.state.contentTabs.length <= 0) {
|
||||
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
|
||||
return false
|
||||
// return false
|
||||
this.$router.push({ name: 'home' })
|
||||
}
|
||||
// 当前选中tab被删除
|
||||
if (tabName === this.$store.state.contentTabsActiveName) {
|
||||
@@ -82,13 +96,14 @@ export default {
|
||||
},
|
||||
// tabs, 关闭其它
|
||||
tabsCloseOtherHandle() {
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => {
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter((item) => {
|
||||
return item.name === 'home' || item.name === this.$store.state.contentTabsActiveName
|
||||
})
|
||||
},
|
||||
// tabs, 关闭全部
|
||||
tabsCloseAllHandle() {
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home')
|
||||
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,54 @@
|
||||
<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:;">
|
||||
<!-- 36px -->
|
||||
<img src="../assets/img/logo2.png" style="width: 30.8px; height: 26px; position: relative; top: -0.075em; 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/logo2.png" style="width: 30.8px; height: 26px; 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)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<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"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<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()"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true">
|
||||
<use xlink:href="#icon-sync"></use>
|
||||
</svg>
|
||||
@@ -30,27 +65,133 @@
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#gitee"></use></svg>
|
||||
</a>
|
||||
</el-menu-item> -->
|
||||
<el-menu-item index="3">
|
||||
<!-- <el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="avatar-container right-menu-item 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-menu-item
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<svg style="width: 24px; height: 24px; vertical-align: -7px">
|
||||
<use v-if="this.$route.meta.hiddenSiderbar" xlink:href="#countdown"></use>
|
||||
<use v-if="!this.$route.meta.hiddenSiderbar" xlink:href="#countdown2"></use>
|
||||
</svg>
|
||||
{{ formatTime }}
|
||||
</el-menu-item> -->
|
||||
<el-menu-item v-if="this.$route.meta.hiddenSiderbar !== true" @click="toHome">
|
||||
<svg
|
||||
style="width: 24px; height: 24px; vertical-align: -7px;backgroundColor: '#fff';color: '#000'">
|
||||
<use xlink:href="#home"></use>
|
||||
</svg>
|
||||
<span style="color: #000">
|
||||
{{ $t('brand.home') }}
|
||||
</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
index="3"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#fff' : '#000'
|
||||
}">
|
||||
<!-- <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">
|
||||
<use xlink:href="#icon-earth"></use>
|
||||
<span>
|
||||
<!-- <svg class="icon-svg aui-navbar__icon-menu hover-effect" aria-hidden="true"> -->
|
||||
<svg
|
||||
class="icon-svg aui-navbar__icon-menu"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<!-- 根据路由2选1隐藏 -->
|
||||
<use v-if="this.$route.meta.hiddenSiderbar" xlink:href="#language2"></use>
|
||||
<use v-if="!this.$route.meta.hiddenSiderbar" xlink:href="#language3"></use>
|
||||
</svg>
|
||||
<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN">中文</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="getLang() === 'en'" command="toEN">En</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="getLang() === 'en'" command="toEN">English</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="4" @click="fullscreenHandle()">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||
<el-menu-item
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<!-- href="Lodap.zip" -->
|
||||
<a
|
||||
><svg
|
||||
:style="this.$route.meta.hiddenSiderbar !== true ? 'color: #000' : 'color: #fff'"
|
||||
style="width: 24px; height: 24px; vertical-align: -7px"
|
||||
icon-class="download"
|
||||
>
|
||||
<use v-if="this.$route.meta.hiddenSiderbar" xlink:href="#download2"></use>
|
||||
<use v-if="!this.$route.meta.hiddenSiderbar" xlink:href="#download"></use>
|
||||
</svg>
|
||||
</a>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<!-- href="google.exe" -->
|
||||
<a >
|
||||
<!-- <svg-icon style="width: 24px; height: 24px; vertical-align: -7px" icon-class="chrome" /></a> -->
|
||||
<svg v-if="this.$route.meta.hiddenSiderbar" style="color: #fff; width: 24px; height: 24px; vertical-align: -7px">
|
||||
<use xlink:href="#chrome2"></use>
|
||||
</svg>
|
||||
<svg v-if="!this.$route.meta.hiddenSiderbar" style="width: 24px; height: 24px; vertical-align: -7px">
|
||||
<use xlink:href="#chrome"></use>
|
||||
</svg>
|
||||
</a>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
index="4"
|
||||
@click="fullscreenHandle()"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<svg
|
||||
class="icon-svg aui-navbar__icon-menu"
|
||||
aria-hidden="true"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<use xlink:href="#icon-fullscreen"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5" class="aui-navbar__avatar">
|
||||
<el-dropdown placement="bottom" :show-timeout="0">
|
||||
<el-menu-item
|
||||
index="5"
|
||||
class="aui-navbar__avatar"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<el-dropdown
|
||||
placement="bottom"
|
||||
:show-timeout="0"
|
||||
:style="{
|
||||
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
|
||||
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
|
||||
}">
|
||||
<span class="el-dropdown-link">
|
||||
<img src="~@/assets/img/avatar.png" />
|
||||
<span>{{ $store.state.user.name }}</span>
|
||||
@@ -69,23 +210,102 @@
|
||||
</nav>
|
||||
</template>
|
||||
<script>
|
||||
// import Hamburger from '@/components/Hamburger'
|
||||
import Cookies from 'js-cookie'
|
||||
import screenfull from 'screenfull'
|
||||
import UpdatePassword from './main-navbar-update-password'
|
||||
import { clearLoginInfo } from '@/utils'
|
||||
import moment from 'moment'
|
||||
// let logoutInterval = null
|
||||
// const timeInterval = null
|
||||
export default {
|
||||
inject: ['refresh'],
|
||||
data() {
|
||||
return {
|
||||
// logoutTime: 1800000,
|
||||
updatePasswordVisible: false,
|
||||
messageTip: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// formatTime() {
|
||||
// return moment(this.logoutTime - 28800000).format('HH:mm:ss')
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
// logoutTime: function (val) {
|
||||
// if (val <= 0) {
|
||||
// this.logout()
|
||||
// }
|
||||
// }
|
||||
// $route: function () {
|
||||
// this.getAlarm()
|
||||
// }
|
||||
},
|
||||
// mounted() {
|
||||
// // this.getAlarm()
|
||||
// logoutInterval = setInterval(() => {
|
||||
// this.logoutTime -= 1000
|
||||
// }, 1000)
|
||||
// addEventListener('click', this.logoutTimeReset)
|
||||
// addEventListener('keydown', this.logoutTimeReset)
|
||||
// addEventListener('visibilitychange', this.visibilitychangeListener)
|
||||
// },
|
||||
// destroyed() {
|
||||
// clearInterval(logoutInterval)
|
||||
// clearInterval(timeInterval)
|
||||
// removeEventListener('click', this.logoutTimeReset)
|
||||
// removeEventListener('keydown', this.logoutTimeReset)
|
||||
// removeEventListener('visibilitychange', this.visibilitychangeListener)
|
||||
// },
|
||||
components: {
|
||||
UpdatePassword
|
||||
// Hamburger
|
||||
},
|
||||
methods: {
|
||||
// 获取当前语言环境
|
||||
// winBlur() {
|
||||
// this.blurTime = new Date()
|
||||
// clearInterval(logoutInterval)
|
||||
// },
|
||||
// // 浏览器获取焦点
|
||||
// winFocus() {
|
||||
// if (this.logoutTime - (new Date() - this.blurTime).valueOf() <= 0) {
|
||||
// this.logout()
|
||||
// } else {
|
||||
// this.logoutTime -= (new Date() - this.blurTime).valueOf()
|
||||
// logoutInterval = setInterval(() => {
|
||||
// this.logoutTime -= 1000
|
||||
// }, 1000)
|
||||
// }
|
||||
// },
|
||||
// // 重置退出时间
|
||||
// logoutTimeReset() {
|
||||
// this.logoutTime = this.time * 60000
|
||||
// },
|
||||
// visibilitychangeListener() {
|
||||
// if (document.hidden) {
|
||||
// this.winBlur()
|
||||
// } else {
|
||||
// this.winFocus()
|
||||
// }
|
||||
// },
|
||||
// async logout() {
|
||||
// console.log("sessionStorage.getItem('loginspc')", sessionStorage.getItem('loginspc'))
|
||||
// if (sessionStorage.getItem('loginspc') === 'login') {
|
||||
// const spcUrl = `/spc/upms/userinfo/logoutUser?account=${'ZJCadmin'}`
|
||||
// axios.get(spcUrl).then((res) => {
|
||||
// if (res.data.code !== 'OK') {
|
||||
// this.$message.error(this.$t('module.quality.spc.error'))
|
||||
// }
|
||||
// sessionStorage.setItem('loginspc', 'logout')
|
||||
// })
|
||||
// }
|
||||
// await this.$store.dispatch('user/logout')
|
||||
// console.log('`/login?redirect=${this.$route.fullPath}`', `/login?redirect=${this.$route.fullPath}`)
|
||||
// this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
||||
// clearInterval(logoutInterval)
|
||||
// },
|
||||
// // 获取当前语言环境
|
||||
getLang() {
|
||||
return Cookies.get('language')
|
||||
},
|
||||
@@ -123,6 +343,9 @@ export default {
|
||||
this.$refs.updatePassword.init()
|
||||
})
|
||||
},
|
||||
async toHome() {
|
||||
this.$router.push('/')
|
||||
},
|
||||
// 退出
|
||||
logoutHandle() {
|
||||
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
|
||||
@@ -147,3 +370,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -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,16 +1,18 @@
|
||||
<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>
|
||||
<footerbar />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Footerbar from './Footerbar'
|
||||
import MainNavbar from './main-navbar'
|
||||
import MainSidebar from './main-sidebar'
|
||||
import MainContent from './main-content'
|
||||
@@ -35,7 +37,8 @@ export default {
|
||||
components: {
|
||||
MainNavbar,
|
||||
MainSidebar,
|
||||
MainContent
|
||||
MainContent,
|
||||
Footerbar
|
||||
},
|
||||
watch: {
|
||||
$route: 'routeHandle'
|
||||
@@ -50,11 +53,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)
|
||||
)
|
||||
},
|
||||
@@ -63,6 +68,7 @@ export default {
|
||||
if (!route.meta.isTab) {
|
||||
return false
|
||||
}
|
||||
// console.log('tab',this.$store.state.contentTabs);
|
||||
var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0]
|
||||
if (!tab) {
|
||||
tab = {
|
||||
|
||||
@@ -1,32 +1,243 @@
|
||||
<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>
|
||||
</el-card>
|
||||
<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>
|
||||
</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)
|
||||
// }
|
||||
// console.log('item',item)
|
||||
this.toRouter(item)
|
||||
},
|
||||
toRouter(item) {
|
||||
// console.log(item.children[0].url)
|
||||
// 加个判断看是否双层children
|
||||
if ((item.children) && (item.children[0].url == "")){
|
||||
this.$router.push({name: item.children[0].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
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</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: 16vh;
|
||||
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, .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: 0;
|
||||
right: 0;
|
||||
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, .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,11 +1,22 @@
|
||||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-11-25 09:51:46
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2023-01-13 09:04:39
|
||||
-->
|
||||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="$t('schedule.log')" :close-on-click-modal="false" :close-on-press-escape="false" width="75%">
|
||||
<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>
|
||||
{{ $t('schedule.jobId') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.jobId" :placeholder="$t('schedule.jobId')" 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-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
@@ -78,3 +89,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,12 +1,15 @@
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-job__schedule">
|
||||
<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>
|
||||
{{ $t('schedule.beanName') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" 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-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
@@ -200,3 +203,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,17 +1,21 @@
|
||||
<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>
|
||||
{{$t('eq.name')}}
|
||||
</el-form-item>
|
||||
<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 +23,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -52,7 +57,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 +288,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
addOrUpdateConfigs,
|
||||
@@ -495,6 +506,12 @@ export default {
|
||||
// }
|
||||
// })
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -530,3 +547,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,24 @@
|
||||
<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-select v-model="dataForm.lineId" :placeholder="'产线'" clearable>
|
||||
{{ $t('pl.name') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.name')" clearable>
|
||||
<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.equipmentId" :placeholder="'设备名称'" clearable>
|
||||
{{ $t('eq.name') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.equipmentId" :placeholder="$t('eq.name')" clearable>
|
||||
<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
|
||||
</el-select>
|
||||
</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 v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -256,3 +262,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,8 +1,11 @@
|
||||
<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>
|
||||
{{ $t('factory.title') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
||||
<el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" clearable>
|
||||
@@ -10,6 +13,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 产线 -->
|
||||
<el-form-item>
|
||||
{{ $t('pl.title') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
|
||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
||||
@@ -17,6 +23,9 @@
|
||||
</el-form-item>
|
||||
<!-- 时间类型 -->
|
||||
<!-- 按时间段 -->
|
||||
<el-form-item>
|
||||
{{ $t('timetype') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="timeType" :placeholder="$t('timetype')" clearable>
|
||||
<el-option value="range" :label="$t('reftimerange')" />
|
||||
@@ -24,6 +33,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 日期选择 -->
|
||||
<el-form-item>
|
||||
{{ $t('time') }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="timeType === 'date'">
|
||||
<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="$t('hints.date')" format="yyyy-MM-dd" />
|
||||
</el-form-item>
|
||||
@@ -41,7 +53,7 @@
|
||||
</el-form-item>
|
||||
<!-- 按钮 -->
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -372,4 +384,18 @@ export default {
|
||||
.slide-to-left-enter-to {
|
||||
transform: translateX(0);
|
||||
}
|
||||
.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,12 +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>
|
||||
{{ $t('prompt.month') }}
|
||||
</el-form-item>
|
||||
<!-- 月份 -->
|
||||
<el-form-item>
|
||||
<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="$t('prompt.month')" format="yyyy-MM" />
|
||||
</el-form-item>
|
||||
<!-- 产线 -->
|
||||
<el-form-item>
|
||||
{{ $t('pl.title') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
|
||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
|
||||
@@ -15,7 +21,7 @@
|
||||
|
||||
<!-- 按钮 -->
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -49,7 +55,7 @@ const tableConfigs = [
|
||||
name: i18n.t('index')
|
||||
},
|
||||
// { prop: 'time', name: '时间', filter: timeFilter },
|
||||
{ prop: 'pdName', name: i18n.t('pl.name') },
|
||||
{ prop: 'pdlName', name: i18n.t('pl.name') },
|
||||
{ prop: 'wsName', name: i18n.t('ws.title') },
|
||||
{ prop: 'eqName', name: i18n.t('eq.title') },
|
||||
{ prop: 'mtbf', name: i18n.t('eq.mtbf'), width: 220 },
|
||||
@@ -202,3 +208,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,20 @@
|
||||
<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>
|
||||
{{ $t('eq.groupname') }}
|
||||
</el-form-item>
|
||||
<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 +22,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -43,7 +48,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 +81,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
@@ -164,6 +175,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 +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,6 +1,6 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm">
|
||||
<el-form :inline="true" :model="dataForm" class="blueTip" size="small">
|
||||
<el-form-item :label="$t('eq.groupname')">
|
||||
<strong>{{ $route.params.groupName || '--' }}</strong></el-form-item
|
||||
>
|
||||
@@ -17,8 +17,8 @@
|
||||
<el-input :placeholder="$t('alarm.code') + '/' + $t('alarm.content')" v-model="dataForm.key" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$route.params.id && $hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$route.params.id && $hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">
|
||||
批量删除
|
||||
</el-button> -->
|
||||
@@ -26,6 +26,7 @@
|
||||
</el-form>
|
||||
|
||||
<base-table
|
||||
:top-btn-config="topBtnConfig"
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
@@ -33,6 +34,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -65,7 +67,12 @@ const dictEntries = {
|
||||
alarmType: { value: '1557925215454814210', field: 'typeDictValue' }, // field 和下面 addOrUpdateConfigs 里对应
|
||||
alarmLevel: { value: '1557925289517834242', field: 'gradeDictValue' }
|
||||
}
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -76,7 +83,7 @@ const tableConfigs = [
|
||||
{ prop: 'typeDictValue', name: i18n.t('alarm.type'), filter: dictFilter(dictEntries.alarmType.value) },
|
||||
{ prop: 'gradeDictValue', name: i18n.t('alarm.level'), filter: dictFilter(dictEntries.alarmLevel.value) },
|
||||
{ prop: 'alarmContent', name: i18n.t('alarm.content') },
|
||||
// { prop: 'externalCode', name: i18n.t('alarm.externalCode') },
|
||||
{ prop: 'externalCode', name: i18n.t('alarm.externalCode') },
|
||||
{ prop: 'description', name: i18n.t('alarm.description') },
|
||||
{ prop: 'remark', name: i18n.t('alarm.remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
@@ -90,6 +97,7 @@ const addOrUpdateConfigs = {
|
||||
{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
|
||||
{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
|
||||
{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true },
|
||||
{ name: 'externalCode', label: i18n.t('alarm.externalCode') },
|
||||
{ name: 'description', label: i18n.t('alarm.description') },
|
||||
{ name: 'remark', label: i18n.t('alarm.remark') }
|
||||
// { name: 'externalCode', label: i18n.t('alarm.externalCode') }
|
||||
@@ -105,6 +113,7 @@ export default {
|
||||
mixins: [dictListMixin],
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
@@ -212,6 +221,17 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateConfigs.operations.forEach(item => {
|
||||
if (item.extraFields) {
|
||||
item.extraFields.equipmentGroupId = this.$route.params.id || null
|
||||
}
|
||||
})
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -247,3 +267,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,13 +1,16 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true">
|
||||
<el-form-item :label="'当前设备id'">
|
||||
<el-form :inline="true" class="blueTip" size="small">
|
||||
<el-form-item :label="$t('eqId')">
|
||||
<strong>{{ $route.params.id }}</strong></el-form-item
|
||||
>
|
||||
</el-form>
|
||||
|
||||
<!-- <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" /> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<base-table
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -77,10 +80,10 @@ export default {
|
||||
type: 'index',
|
||||
name: i18n.t('index')
|
||||
},
|
||||
{ prop: 'time', name: '时间', filter: timeFilter },
|
||||
{ prop: 'plcCode', name: 'PLC 编码' },
|
||||
{ prop: 'equName', name: '设备名称' },
|
||||
{ prop: 'equCode', name: '设备编码' },
|
||||
{ prop: 'time', name: this.$t('ti'), filter: timeFilter },
|
||||
{ prop: 'plcCode', name: this.$t('plcCode') },
|
||||
{ prop: 'equName', name: this.$t('equName') },
|
||||
{ prop: 'equCode', name: this.$t('equCode') },
|
||||
// ...['数值1', '数值2', '数值3'].map(name => {
|
||||
// return { prop: name, name }
|
||||
// })
|
||||
|
||||
@@ -1,16 +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>
|
||||
{{$t('name')}}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('name') + ' / ' + $t('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:equipmentplc: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:equipmentplc:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :top-btn-config="topBtnConfig" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@@ -35,7 +38,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', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'code', name: i18n.t('code') },
|
||||
@@ -83,6 +91,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
@@ -165,6 +174,12 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -200,3 +215,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)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
{{$t('eq.name')}}
|
||||
</el-form-item>
|
||||
<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('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentplcconnect: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:equipmentplcconnect:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -38,7 +41,12 @@ import TableOperateComponent from '@/components/base-table/components/operationC
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
import { dictFilter } from '@/utils/filters'
|
||||
// import axios from '@/utils/request.js'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'lineName', name: i18n.t('pl.title') },
|
||||
@@ -116,6 +124,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
@@ -229,6 +238,12 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -264,3 +279,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,49 +1,58 @@
|
||||
<template>
|
||||
<!-- 设备效率分析 -->
|
||||
<div class="mod-config">
|
||||
<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-select v-model="dataForm.productlines" :placeholder="'产线'" @change="handleProductLineChange" clearable>
|
||||
{{ $t('pl.title') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" @change="handleProductLineChange" clearable>
|
||||
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id"
|
||||
:label="productLine.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 工序 -->
|
||||
<el-form-item>
|
||||
{{ $t('pl.process') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
|
||||
<el-select v-model="dataForm.wsId" :placeholder="'工序'" clearable>
|
||||
<el-select v-model="dataForm.wsId" :placeholder="$t('pl.process')" clearable>
|
||||
<el-option v-for="ws in wsList" :key="ws.id" :value="ws.id" :label="ws.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 日期选择 -->
|
||||
<el-form-item>
|
||||
<el-date-picker key="date-picker" v-model="rawTime" type="date" :placeholder="'请选择日期'" format="yyyy-MM-dd" />
|
||||
{{ $t('time') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker key="date-picker" v-model="rawTime" type="date" :placeholder="$t('time')" format="yyyy-MM-dd" />
|
||||
</el-form-item>
|
||||
<!-- 按钮 -->
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('search') }}</el-button>
|
||||
<el-button class="buttonColor" @click="getDataList()">{{ $t('search') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="addEq()">{{ '添加设备' }}</el-button>
|
||||
<el-button type="success" @click="addEq()">{{ $t('pl.add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="time-chart" style="margin-top: 10px;">
|
||||
<div v-show="equipmentCount > 0" id="time-chart__inner" ref="time-chart__inner" class="time-chart__inner"
|
||||
style="min-height: 50vh;" :style="{ height: autoHeight + 'px', width: '100%' }" />
|
||||
<div v-show="equipmentCount === 0">请先查询数据</div>
|
||||
<div v-show="equipmentCount === 0">{{ $t('pl.queryFirst') }}</div>
|
||||
<!-- <div v-show="equipmentCount === 0">{{ $t('module.basicData.visual.hints.searchFirst') }}</div> -->
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" :title="'添加设备'" width="30%">
|
||||
<el-select v-model="eqId" style="width: 100%" placeholder="请选择设备" clearable>
|
||||
<el-dialog :visible.sync="dialogVisible" :title="$t('pl.add')" width="30%">
|
||||
<el-select v-model="eqId" style="width: 100%" :placeholder="$t('pl.choose')" clearable>
|
||||
<el-option v-for="eq in dialogEqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
||||
</el-select>
|
||||
<div slot="footer">
|
||||
<el-button @click="dialogVisible = false">{{ '取消' }}</el-button>
|
||||
<el-button type="primary" @click="dialogConfirm">{{ '确定' }}</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('pl.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="dialogConfirm">{{ $t('pl.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -51,7 +60,7 @@
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
// import i18n from '@/i18n'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import moment from 'moment'
|
||||
@@ -91,9 +100,9 @@ class ChartOption {
|
||||
this.legend = {
|
||||
data: [
|
||||
// i18n.t('module.basicData.visual.echartLegends.working'),
|
||||
'正常',
|
||||
'停机',
|
||||
'故障'
|
||||
i18n.t('normal'),
|
||||
i18n.t('shutdown'),
|
||||
i18n.t('malfunction')
|
||||
],
|
||||
bottom: '0%',
|
||||
selectedMode: false,
|
||||
@@ -108,7 +117,7 @@ class ChartOption {
|
||||
}
|
||||
this.title = {
|
||||
// text: i18n.t('module.basicData.visual.echartTitles.eqStatus'),
|
||||
text: '设备状态时序图',
|
||||
text: i18n.t('diagram'),
|
||||
left: 'center'
|
||||
}
|
||||
this.xAxis = {
|
||||
@@ -142,9 +151,9 @@ class ChartOption {
|
||||
data: []
|
||||
}
|
||||
this.series = [
|
||||
{ name: /** i18n.t('module.basicData.visual.echartLegends.working') */ '正常', type: 'bar', data: [] },
|
||||
{ name: '停机', type: 'bar', data: [] },
|
||||
{ name: '故障', type: 'bar', data: [] },
|
||||
{ name: /** i18n.t('module.basicData.visual.echartLegends.working') */ i18n.t('normal'), type: 'bar', data: [] },
|
||||
{ name: i18n.t('shutdown'), type: 'bar', data: [] },
|
||||
{ name: i18n.t('malfunction'), type: 'bar', data: [] },
|
||||
{
|
||||
type: 'custom',
|
||||
renderItem: renderItem,
|
||||
@@ -189,7 +198,7 @@ export default {
|
||||
chart: null,
|
||||
chartOption: new ChartOption(),
|
||||
equipments: {},
|
||||
state: ['正常', '停机', '故障'],
|
||||
state: [this.$t('normal'),this.$t('shutdown'),this.$t('malfunction')],
|
||||
colors: ['#4caf50', '#ffb300', '#e53935'],
|
||||
// queryBuffer: {},
|
||||
// tableConfigs,
|
||||
@@ -286,12 +295,12 @@ export default {
|
||||
}).then(({ data: res }) => {
|
||||
if (res && res.code === 0) {
|
||||
this.wsList = res.data.list
|
||||
/** set default */
|
||||
if (this.wsList.length) {
|
||||
this.dataForm.wsId = this.wsList[0].id
|
||||
} else {
|
||||
this.dataForm.wsId = null
|
||||
}
|
||||
/** select 默认选项set default */
|
||||
// if (this.wsList.length) {
|
||||
// this.dataForm.wsId = this.wsList[0].id
|
||||
// } else {
|
||||
// this.dataForm.wsId = null
|
||||
// }
|
||||
} else {
|
||||
this.wsList.splice(0)
|
||||
}
|
||||
@@ -338,7 +347,7 @@ export default {
|
||||
value: [index, status.startTime, status.endTime],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: status.status === '正常' ? '#4caf50' : status.status === '停机' ? '#ffb300' : status.status === '故障' ? '#e53935' : null
|
||||
color: status.status === this.$t('normal') ? '#4caf50' : status.status === this.$t('shutdown') ? '#ffb300' : status.status === this.$t('malfunction') ? '#e53935' : null
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -460,7 +469,7 @@ export default {
|
||||
if (this.equipmentCount) {
|
||||
this.dialogVisible = true
|
||||
} else {
|
||||
this.$message.warning('请先查询数据')
|
||||
this.$message.warning(this.$t('pl.queryFirst'))
|
||||
}
|
||||
},
|
||||
|
||||
@@ -496,13 +505,13 @@ export default {
|
||||
} else {
|
||||
/** handle new equipment */
|
||||
const newEqStatusList = res.data
|
||||
console.log('添加设备', res)
|
||||
// console.log('添加设备', res)
|
||||
const newEq = this.transformDataToEquipments(newEqStatusList)
|
||||
this.$set(this.equipments, Object.keys(newEq)[0], newEq[Object.keys(newEq)[0]])
|
||||
this.chartOption.setYAxis(Object.keys(this.equipments).map(item => this.equipments[item].name))
|
||||
this.chartOption.setData(this.transformEquipmentsToSeries(this.equipments))
|
||||
|
||||
this.$message.success('新设备数据获取成功')
|
||||
this.$message.success(this.$t('pl.success'))
|
||||
this.$nextTick(() => {
|
||||
this.dialogVisible = false
|
||||
this.renderChart()
|
||||
@@ -544,4 +553,18 @@ export default {
|
||||
/* .time-chart__inner {
|
||||
transition: all 300ms ease-out;
|
||||
} */
|
||||
.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,20 @@
|
||||
<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>
|
||||
{{ $t('eq.type') }}
|
||||
</el-form-item>
|
||||
<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 +22,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -43,7 +48,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 +100,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
@@ -188,6 +199,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 +242,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,20 @@
|
||||
<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>
|
||||
{{ $t('factory.name') }}
|
||||
</el-form-item>
|
||||
<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 +22,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -26,8 +31,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 +47,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 +94,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -168,11 +178,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 +219,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,23 @@
|
||||
<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>
|
||||
{{ $t('prod.name') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- {{$t('prod.name')}} -->
|
||||
<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 +25,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
@clickTopBtn="clickTopBtn" />
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -29,8 +34,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 +57,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 },
|
||||
@@ -89,7 +100,7 @@ const addOrUpdateConfigs = {
|
||||
{
|
||||
type: 'number',
|
||||
trigger: 'blur',
|
||||
transform: val => Number(val),
|
||||
transform: (val) => Number(val),
|
||||
message: i18n.t('hints.number')
|
||||
}
|
||||
]
|
||||
@@ -115,7 +126,7 @@ const addOrUpdateConfigs = {
|
||||
name: 'area',
|
||||
label: i18n.t('prod.area'),
|
||||
type: 'number',
|
||||
rules: [{ type: 'number', transform: val => Number(val), message: i18n.t('hints.number'), trigger: 'blur' }]
|
||||
rules: [{ type: 'number', transform: (val) => Number(val), message: i18n.t('hints.number'), trigger: 'blur' }]
|
||||
},
|
||||
'specifications',
|
||||
'remark'
|
||||
@@ -132,7 +143,7 @@ const addOrUpdateConfigs = {
|
||||
relatedField: 'productId',
|
||||
tableConfigs: [
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: (val) => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
|
||||
{ prop: 'name', name: i18n.t('attrName'), formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
|
||||
{ prop: 'code', name: i18n.t('attrValue'), formField: true },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
@@ -144,6 +155,7 @@ export default {
|
||||
mixins: [dictListMixin],
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@@ -167,7 +179,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.initDictList([UnitDictTypeId, ProductTypeDictTypeId])
|
||||
this.addOrUpdateConfigs.fields.forEach(item => {
|
||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||
if (item.name) {
|
||||
if (item.name === 'typeDictValue') {
|
||||
item.options = this.dictList[ProductTypeDictTypeId]
|
||||
@@ -176,6 +188,7 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(this.$route)
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@@ -193,6 +206,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)
|
||||
@@ -256,7 +275,7 @@ export default {
|
||||
var ids = id
|
||||
? [id]
|
||||
: // ? [1556817256347828335]
|
||||
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'), {
|
||||
@@ -290,3 +309,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,20 @@
|
||||
<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>
|
||||
{{ $t('pl.name') }}
|
||||
</el-form-item>
|
||||
<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 +22,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
@clickTopBtn="clickTopBtn" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@@ -26,8 +30,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 +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',
|
||||
@@ -52,7 +60,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 +87,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 +102,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -133,10 +142,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 +203,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 +244,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,17 +1,22 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<!-- <el-form-item> -->
|
||||
<!-- <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form :inline="true" :model="dataForm" :rules="dataFormRules" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityInspectionBoxBtn:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
{{ $t('inspect.det') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input> -->
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:qualityInspectionBoxBtn: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,7 +24,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
@clickTopBtn="clickTopBtn" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@@ -27,8 +32,7 @@
|
||||
: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"
|
||||
@@ -36,8 +40,7 @@
|
||||
:configs="addOrUpdateConfigs"
|
||||
@refreshDataList="getDataList"
|
||||
@select-change="handleDialogSelectChange"
|
||||
@destory-dialog="handleDestroyDialog"
|
||||
/>
|
||||
@destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -51,8 +54,14 @@ import TableOperateComponent from '@/components/base-table/components/operationC
|
||||
// import CKEditor from 'ckeditor4-vue'
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import { iteratee } from 'lodash'
|
||||
// import Cookies from 'js-cookie'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -86,14 +95,55 @@ const addOrUpdateConfigs = {
|
||||
{ name: 'sectionId', label: i18n.t('ws.title'), required: true, type: 'select', options: [] },
|
||||
{ name: 'model', label: i18n.t('andeng.btnBoxModel') },
|
||||
{
|
||||
// name: 'keyValue',
|
||||
// label: i18n.t('andeng.btnVal'),
|
||||
// required: true,
|
||||
// rules: [{ type: 'integer', trigger: 'blur', message: i18n.t('hints.integer'), transform: (val) => Number(val) }]
|
||||
|
||||
// keyValue: [
|
||||
// {
|
||||
// type: 'number',
|
||||
// message: i18n.t('validate.keyValueWarning'),
|
||||
// trigger: 'blur',
|
||||
// transform(value) {
|
||||
// if (value) {
|
||||
// // 将输入的转为数字
|
||||
// var val = Number(value)
|
||||
// // 正则校验输入的数字是否在0-128之内并且属于整数
|
||||
// if (/^(?:[1-9]?\d|128)$/.test(val)) return val
|
||||
// // 返回false即为校验失败
|
||||
// return false
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
name: 'keyValue',
|
||||
label: i18n.t('andeng.btnVal'),
|
||||
required: true,
|
||||
rules: [{ type: 'integer', trigger: 'blur', message: i18n.t('hints.integer'), transform: val => Number(val) }]
|
||||
rules: [
|
||||
{
|
||||
type: 'integer',
|
||||
trigger: 'blur',
|
||||
message: i18n.t('validate.keyValueWarning'),
|
||||
transform(value) {
|
||||
if (value) {
|
||||
// 将输入的转为数字
|
||||
var val = Number(value)
|
||||
// 正则校验输入的数字是否在[0-100]之内并且属于整数
|
||||
if (/^(?:[1-9]?\d|100)$/.test(val)) return val
|
||||
// 返回false即为校验失败
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'inspectionDetContent',
|
||||
label: i18n.t('andeng.inspectContent')
|
||||
label: i18n.t('andeng.inspectContent'),
|
||||
required: true,
|
||||
type: 'select',
|
||||
options: []
|
||||
}
|
||||
],
|
||||
operations: [
|
||||
@@ -116,11 +166,13 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
addOrUpdateConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
key: '',
|
||||
inspectionDetId: ''
|
||||
},
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
@@ -128,7 +180,26 @@ export default {
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false
|
||||
addOrUpdateVisible: false,
|
||||
dataFormRules: {
|
||||
keyValue: [
|
||||
{
|
||||
type: 'number',
|
||||
message: i18n.t('validate.keyValueWarning'),
|
||||
trigger: 'blur',
|
||||
transform(value) {
|
||||
if (value) {
|
||||
// 将输入的转为数字
|
||||
var val = Number(value)
|
||||
// 正则校验输入的数字是否在0-128之内并且属于整数
|
||||
if (/^(?:[1-9]?\d|128)$/.test(val)) return val
|
||||
// 返回false即为校验失败
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -136,6 +207,7 @@ export default {
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getInspectionContentList()
|
||||
this.getDataList()
|
||||
this.getPlList()
|
||||
this.getWsList()
|
||||
@@ -153,9 +225,9 @@ export default {
|
||||
url: this.$http.adornUrl('/monitoring/productionLine/list'),
|
||||
method: 'get'
|
||||
}).then(({ data: res }) => {
|
||||
const plConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId')
|
||||
const plConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'productionId')
|
||||
plConfig.options =
|
||||
res.data?.map(item => ({
|
||||
res.data?.map((item) => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
})) || []
|
||||
@@ -175,9 +247,9 @@ export default {
|
||||
method: 'get',
|
||||
params: this.$http.adornParams(params)
|
||||
}).then(({ data: res }) => {
|
||||
const wsConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'sectionId')
|
||||
const wsConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'sectionId')
|
||||
wsConfig.options =
|
||||
res.data?.list?.map(item => ({
|
||||
res.data?.list?.map((item) => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
})) || []
|
||||
@@ -194,9 +266,9 @@ export default {
|
||||
// key: this.dataForm.key
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
const eqTypeConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'equipmentTypeId')
|
||||
const eqTypeConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'equipmentTypeId')
|
||||
eqTypeConfig.options =
|
||||
data.data?.list?.map(item => ({
|
||||
data.data?.list?.map((item) => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
})) || []
|
||||
@@ -213,9 +285,9 @@ export default {
|
||||
// key: this.dataForm.key
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
const groupConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'groupId')
|
||||
const groupConfig = this.addOrUpdateConfigs.fields.find((item) => item.name === 'groupId')
|
||||
groupConfig.options =
|
||||
data.data?.list?.map(item => ({
|
||||
data.data?.list?.map((item) => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
})) || []
|
||||
@@ -227,10 +299,11 @@ export default {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/qualityInspectionBoxBtn/page'),
|
||||
method: 'get',
|
||||
// key 查询
|
||||
params: this.$http.adornParams({
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize
|
||||
// key: this.dataForm.key
|
||||
limit: this.pageSize,
|
||||
key: this.dataForm.key
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
@@ -245,6 +318,31 @@ export default {
|
||||
this.dataListLoading = false
|
||||
})
|
||||
},
|
||||
// 获取产检测内容列表
|
||||
getInspectionContentList() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/qualityInspectionDet/page'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
limit: 999,
|
||||
page: 1
|
||||
})
|
||||
}).then(({ data: res }) => {
|
||||
if (res && res.code === 0) {
|
||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||
// console.log('item',item)
|
||||
// console.log('res',res)
|
||||
if (item.name === 'inspectionDetContent')
|
||||
item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.code }))
|
||||
// console.log('item',item)
|
||||
})
|
||||
} else {
|
||||
this.addOrUpdateConfigs.fields.forEach((item) => {
|
||||
if (item.name === 'inspectionDetContent') item.options.splice(0)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.pageSize = val
|
||||
@@ -265,6 +363,18 @@ export default {
|
||||
switch (name) {
|
||||
case 'productionId':
|
||||
this.getWsList(id)
|
||||
case 'inspectionDetContent':
|
||||
// this.dataForm.inspectionDetId = id
|
||||
// console.log(id)
|
||||
// console.log(this.addOrUpdateConfigs.fields[4].options)
|
||||
for (var i = 0; i < this.addOrUpdateConfigs.fields[4].options.length; i++) {
|
||||
if (this.addOrUpdateConfigs.fields[4].options[i].label == id) {
|
||||
this.dataForm.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
|
||||
this.addOrUpdateConfigs.fields.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
|
||||
}
|
||||
}
|
||||
console.log('dataForm', this.dataForm)
|
||||
console.log('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
|
||||
}
|
||||
},
|
||||
handleOperations({ type, data: id }) {
|
||||
@@ -292,7 +402,7 @@ export default {
|
||||
url: this.$http.adornUrl('/monitoring/equipment/export'),
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
}).then(res => {
|
||||
}).then((res) => {
|
||||
let fileName = 'equipment-list.xls'
|
||||
if (res.headers['content-disposition']) {
|
||||
const contentDisposition = res.headers['content-disposition']
|
||||
@@ -331,11 +441,17 @@ export default {
|
||||
// }
|
||||
// })
|
||||
},
|
||||
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'), {
|
||||
@@ -366,3 +482,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,6 +1,9 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" @keyup.enter.native="getDataList()">
|
||||
<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
{{ $t('time')}}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- type="datetimerange" -->
|
||||
<el-date-picker
|
||||
@@ -16,7 +19,7 @@
|
||||
/>
|
||||
</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-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -399,4 +402,8 @@ export default {
|
||||
background: #fff;
|
||||
padding: 12px;
|
||||
}
|
||||
.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)">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
|
||||
<el-form-item>
|
||||
{{ $t('inspect.det') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet: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:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@@ -35,7 +38,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',
|
||||
@@ -68,6 +76,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -172,6 +181,12 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -207,3 +222,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,21 +1,28 @@
|
||||
<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>
|
||||
{{ $t('pl.title') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.title')" clearable filterable>
|
||||
<el-option v-for="pl in plList" :key="pl.value" :value="pl.value" :label="pl.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
{{ $t('inspect.det') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord: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:qualityinspectionrecord: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"
|
||||
@@ -23,6 +30,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
|
||||
<el-pagination
|
||||
@@ -57,7 +65,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',
|
||||
@@ -111,6 +124,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -271,6 +285,12 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -306,3 +326,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,20 @@
|
||||
<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>
|
||||
{{ $t('inspect.typename') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.typename')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype: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:qualityinspectiontype: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 +22,7 @@
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
@clickTopBtn="clickTopBtn"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -43,6 +48,12 @@ import TableOperateComponent from '@/components/base-table/components/operationC
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -73,6 +84,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
@@ -155,6 +167,13 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
// 新增按钮
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -190,3 +209,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,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: lb
|
||||
* @Date: 2022-06-22 14:00:17
|
||||
* @LastEditors: lb
|
||||
* @LastEditTime: 2022-06-22 14:00:17
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2023-01-03 10:18:14
|
||||
* @Description: 设备生产实时数据
|
||||
-->
|
||||
<template>
|
||||
@@ -59,6 +59,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}, 1000 * 60 * 5)
|
||||
console.log(this.tableProps)
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// console.log('before destroyed...')
|
||||
|
||||
@@ -1,16 +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>
|
||||
{{ $t('categoryName') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('categoryName')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reportsheetcategory: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:reportsheetcategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -36,6 +39,12 @@ import TableOperateComponent from '@/components/base-table/components/operationC
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
@@ -60,6 +69,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
addOrUpdateConfigs,
|
||||
@@ -141,6 +151,12 @@ export default {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id
|
||||
@@ -176,3 +192,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,17 +1,20 @@
|
||||
<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>
|
||||
{{ $t('report.name') }}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('report.name')" 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 v-if="$hasPermission('')" type="primary" @click="addOrUpdateHandle()">新增(跳到设计)</el-button> -->
|
||||
<el-button v-if="$hasPermission('monitoring:reportsheet:save')" type="primary" @click="handleAdd()">{{ $t('add') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:reportsheet:save')" type="primary" @click="handleAdd()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :top-btn-config="topBtnConfig" :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" @clickTopBtn="clickTopBtn"/>
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@@ -37,7 +40,12 @@ import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import axios from '@/utils/request'
|
||||
|
||||
const topBtnConfig = [
|
||||
{
|
||||
type: 'add',
|
||||
btnName: i18n.t('add')
|
||||
}
|
||||
]
|
||||
const CategoryList = {
|
||||
name: 'CategoryList',
|
||||
props: {
|
||||
@@ -72,7 +80,7 @@ const CategoryList = {
|
||||
render: function(h) {
|
||||
const childOptions = []
|
||||
this.injectData.head.options?.forEach(item => {
|
||||
console.log('item', item.value)
|
||||
// console.log('item', item.value)
|
||||
childOptions.push(h('el-option', { props: { label: item.label, value: item.value } }, null))
|
||||
})
|
||||
return h('el-select', { props: { value: this.pickedId }, on: { change: this.handleChange } }, childOptions)
|
||||
@@ -93,6 +101,7 @@ const addOrUpdateConfigs = {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topBtnConfig,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs: [],
|
||||
dataForm: {
|
||||
@@ -233,6 +242,11 @@ export default {
|
||||
name: 'monitoring-reportDesign'
|
||||
})
|
||||
},
|
||||
clickTopBtn() {
|
||||
this.$router.push({
|
||||
name: 'monitoring-reportDesign'
|
||||
})
|
||||
},
|
||||
addOrUpdateHandle(id) {
|
||||
console.log('edit:', id)
|
||||
this.addOrUpdateVisible = true
|
||||
@@ -275,3 +289,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>
|
||||
|
||||