Compare commits
	
		
			68 Commits
		
	
	
		
			37c0c445a3
			...
			develop
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 5a3e16df1b | |||
| 
						 | 
					6815ac4cc4 | ||
| 
						 | 
					4ffbdaef8a | ||
| 36e6551465 | |||
| 
						 | 
					b1ab1962b1 | ||
| 2cefabc24b | |||
| 
						 | 
					db47bffb18 | ||
| 65b489d37c | |||
| 
						 | 
					5afadfb1ce | ||
| 67612107ea | |||
| 
						 | 
					e0d4e5327f | ||
| 7ec1c5f3fc | |||
| 
						 | 
					3da95fed21 | ||
| 092d7da353 | |||
| 
						 | 
					683fc9169a | ||
| e81c4f6907 | |||
| 
						 | 
					bc4cfdc990 | ||
| 1c67ef4c6a | |||
| 
						 | 
					0b5740d41c | ||
| bd8bdfd9a8 | |||
| 
						 | 
					41e680b55d | ||
| fa06c12ece | |||
| 
						 | 
					28303e4c5f | ||
| 
						 | 
					bbe5e63075 | ||
| e964c643d8 | |||
| 
						 | 
					f9d40b3790 | ||
| 
						 | 
					8ec42773cd | ||
| 715bc73504 | |||
| 
						 | 
					2f4e9f31cd | ||
| 
						 | 
					5798e5b6e0 | ||
| 63a487dcd2 | |||
| 
						 | 
					3265b4a580 | ||
| ece96e5cab | |||
| 
						 | 
					a08af6774e | ||
| 
						 | 
					3c38763cf4 | ||
| 
						 | 
					23b7b85b39 | ||
| 2f2eaf4e20 | |||
| 
						 | 
					a5a4f93328 | ||
| 
						 | 
					f7938f30e2 | ||
| 
						 | 
					d23cb260a4 | ||
| 
						 | 
					e5eb49a7b6 | ||
| 
						 | 
					35d5d91c23 | ||
| f3a7e38d13 | |||
| 5d36eb676c | |||
| 14b933fb0c | |||
| 92f52ab553 | |||
| 15210c2f12 | |||
| 8447b8f7ab | |||
| ca7fda73e3 | |||
| 1617bc347a | |||
| 762861a922 | |||
| 68c271618a | |||
| 127347fab0 | |||
| b9ac64ab13 | |||
| 089a6517d3 | |||
| 1047dd78ec | |||
| 5a08d8c1dd | |||
| d0f113513c | |||
| ff11e1d3fb | |||
| b54298fe09 | |||
| 5b2de3fb27 | |||
| 9c13434c48 | |||
| 86d3f63178 | |||
| 3f43f0c979 | |||
| ae8a3668c8 | |||
| d5af6a01f5 | |||
| 0b54133132 | |||
| 246baa1768 | 
@@ -2,6 +2,82 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
> 通过传入合理的配置项来使用 addOrUpdate Dialog
 | 
					> 通过传入合理的配置项来使用 addOrUpdate Dialog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 用途
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					通过给对话框传递配置项,并自动根据这些配置项来初始化对话框的功能
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## props
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- configs 对象
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					<my-dialog :configs="SomeConfigs" ... />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type Operation = {
 | 
				
			||||||
 | 
							name: 'add' | 'edit' | 'detail' | 'delete' | ...,
 | 
				
			||||||
 | 
							url: string, /** 该操作需要的接口地址,如删除接口 */
 | 
				
			||||||
 | 
							showAlways: boolean,
 | 
				
			||||||
 | 
							showOnEdit: boolean,
 | 
				
			||||||
 | 
							permission: string,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type SubTableConfig = {
 | 
				
			||||||
 | 
							[_:string]: any,
 | 
				
			||||||
 | 
							title: string, /** 表格的名称 */
 | 
				
			||||||
 | 
							url: string, /** 涉及的接口 */
 | 
				
			||||||
 | 
							tableConfigs: {
 | 
				
			||||||
 | 
								[_:string]: any,
 | 
				
			||||||
 | 
								type?: 'index' | ...,
 | 
				
			||||||
 | 
								prop: string,
 | 
				
			||||||
 | 
								name: string,
 | 
				
			||||||
 | 
								rules?: any[],
 | 
				
			||||||
 | 
								fixed?: string,
 | 
				
			||||||
 | 
								width?: string,
 | 
				
			||||||
 | 
								subcomponent: VueComponent,
 | 
				
			||||||
 | 
								options: any[],
 | 
				
			||||||
 | 
								formField: boolean, /** 是否在新增编辑子表单里出现该字段 */
 | 
				
			||||||
 | 
							}[], /** 表格prop配置数组,参考 components/base-table 组件和 element-ui 文档 */
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ExtraComponent = {
 | 
				
			||||||
 | 
							name: string,
 | 
				
			||||||
 | 
							label: string,
 | 
				
			||||||
 | 
							hasModel: boolean, /** 是否需要为该组件设置 v-model */
 | 
				
			||||||
 | 
							component: VueComponent, /** 动态加载的 vue 组件 */
 | 
				
			||||||
 | 
							props: {
 | 
				
			||||||
 | 
								[_:string]: string | object
 | 
				
			||||||
 | 
								extraParams?: { /** 上传组件使用 */
 | 
				
			||||||
 | 
									typeCode: string
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}[]
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type Field = {
 | 
				
			||||||
 | 
						[_:string]: string | boolean | object | object[],
 | 
				
			||||||
 | 
						name: string,
 | 
				
			||||||
 | 
						type?: 'input' | 'select' | ...,
 | 
				
			||||||
 | 
						options?: any[], /** 设置 type 为 select 时的选项数据 */
 | 
				
			||||||
 | 
						label?: string, /** 没有时会用 name 替代 */
 | 
				
			||||||
 | 
						placeholder?: string, /** 没有时会生成默认占位符 */
 | 
				
			||||||
 | 
						api?: string, /** 如果有该字段,就自动从api地址获取数据并填充到对应的输入框里,一般为 getCode 的接口 */
 | 
				
			||||||
 | 
						relatedField?: string, /** 关联字段,当设置此字段时,意味着需要在对话框组件上监听 select-change 事件,并当该字段数据被改变时刷新 relatedField 的列表,一般是像选择产线时更新工段列表这样的场景使用 */,
 | 
				
			||||||
 | 
						required?: boolean, /** 验证规则的简写,只需要限制必填项时,不需要其他验证规则时使用 */
 | 
				
			||||||
 | 
						rules?: object[], /** 规则设置参考 element-ui 的表单验证配置 */
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type Configs = {
 | 
				
			||||||
 | 
						type: 'dialog',
 | 
				
			||||||
 | 
						infoUrl: string, /** 编辑时获取信息的接口地址 */
 | 
				
			||||||
 | 
						fields: Field[],
 | 
				
			||||||
 | 
						extraComponents?: ExtraComponent[],
 | 
				
			||||||
 | 
						subtable?: SubTableConfig[],
 | 
				
			||||||
 | 
						operations?: Operation[]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 示例
 | 
					## 示例
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```js
 | 
					```js
 | 
				
			||||||
@@ -79,7 +155,7 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 配置项
 | 
					## 配置项解释
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br>
 | 
					<br>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -136,6 +212,7 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
含义:有些对话框里需要额外的表格来展示更深层次的数据,如“产品属性”
 | 
					含义:有些对话框里需要额外的表格来展示更深层次的数据,如“产品属性”
 | 
				
			||||||
类型:object
 | 
					类型:object
 | 
				
			||||||
选项:
 | 
					选项:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- title, 内嵌表格的标题
 | 
					- title, 内嵌表格的标题
 | 
				
			||||||
- url, 内嵌表格的数据地址
 | 
					- url, 内嵌表格的数据地址
 | 
				
			||||||
- tableConfigs,内嵌表格的配置选项
 | 
					- tableConfigs,内嵌表格的配置选项
 | 
				
			||||||
@@ -154,13 +231,14 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
      - 值:`edit` | `delete` | `detail`,需要其他可自行添加(修改 base-table 组件)
 | 
					      - 值:`edit` | `delete` | `detail`,需要其他可自行添加(修改 base-table 组件)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### extraComponents
 | 
					### extraComponents
 | 
				
			||||||
 | 
					
 | 
				
			||||||
含义: 需要在对话框里使用的自定义组件列表
 | 
					含义: 需要在对话框里使用的自定义组件列表
 | 
				
			||||||
类型: Array<object>
 | 
					类型: Array<object>
 | 
				
			||||||
对象选项:
 | 
					对象选项:
 | 
				
			||||||
 - name: 该组件对应的 dataForm 字段(需要参照后端文档来指定)
 | 
					 | 
				
			||||||
 - hasModel: boolean, 上传组件一般设置为 false,设置是否和 dataForm 关联
 | 
					 | 
				
			||||||
 - label
 | 
					 | 
				
			||||||
 - fieldType: 设置该组件的数据将以什么数据类型形式来保存
 | 
					 | 
				
			||||||
 - component: 组件
 | 
					 | 
				
			||||||
 - props 传给组件的配置
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: 该组件对应的 dataForm 字段(需要参照后端文档来指定)
 | 
				
			||||||
 | 
					- hasModel: boolean, 上传组件一般设置为 false,设置是否和 dataForm 关联
 | 
				
			||||||
 | 
					- label
 | 
				
			||||||
 | 
					- fieldType: 设置该组件的数据将以什么数据类型形式来保存
 | 
				
			||||||
 | 
					- component: 组件
 | 
				
			||||||
 | 
					- props 传给组件的配置
 | 
				
			||||||
 
 | 
				
			|||||||
| 
		 Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 24 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								public/favicon2.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								public/google.exe
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -1,12 +1,28 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Descripttion: 
 | 
				
			||||||
 | 
					 * @version: 
 | 
				
			||||||
 | 
					 * @Author: fzq
 | 
				
			||||||
 | 
					 * @Date: 2022-11-25 09:51:46
 | 
				
			||||||
 | 
					 * @LastEditors: fzq
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-01-30 14:26:02
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Created by Jacky.Gao on 2017-10-01.
 | 
					 * Created by Jacky.Gao on 2017-10-01.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 import defaultI18nJsonData from './designer.json';
 | 
					 import defaultI18nJsonData from './designer.json';
 | 
				
			||||||
 import en18nJsonData from './designer_en.json';
 | 
					 import en18nJsonData from './designer_en.json';
 | 
				
			||||||
 export default function buildLocal () {
 | 
					//  export default function buildLocal () {
 | 
				
			||||||
    let language = getCookie('language') || 'zh-CN';
 | 
					//     let language = getCookie('language') || 'zh-CN';
 | 
				
			||||||
 | 
					//     window.i18n = defaultI18nJsonData;
 | 
				
			||||||
 | 
					//     if (language !== 'zh-CN') {
 | 
				
			||||||
 | 
					//         window.i18n = en18nJsonData;
 | 
				
			||||||
 | 
					//     }
 | 
				
			||||||
 | 
					// }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default function buildLocal () {
 | 
				
			||||||
 | 
					    let language = getCookie('language') || 'en';
 | 
				
			||||||
    window.i18n = defaultI18nJsonData;
 | 
					    window.i18n = defaultI18nJsonData;
 | 
				
			||||||
    if (language !== 'zh-CN') {
 | 
					    if (language !== 'en') {
 | 
				
			||||||
        window.i18n = en18nJsonData;
 | 
					        window.i18n = en18nJsonData;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,11 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Descripttion: 
 | 
				
			||||||
 | 
					 * @version: 
 | 
				
			||||||
 | 
					 * @Author: fzq
 | 
				
			||||||
 | 
					 * @Date: 2022-11-25 09:51:46
 | 
				
			||||||
 | 
					 * @LastEditors: fzq
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-02-09 14:40:52
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
<html>
 | 
					<html>
 | 
				
			||||||
<head>
 | 
					<head>
 | 
				
			||||||
@@ -31,6 +39,7 @@
 | 
				
			|||||||
  <!-- 开发环境 -->
 | 
					  <!-- 开发环境 -->
 | 
				
			||||||
  <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
 | 
					  <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
 | 
				
			||||||
    <script>
 | 
					    <script>
 | 
				
			||||||
 | 
					    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.8';
 | 
				
			||||||
    window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
					    window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
  <% } %>
 | 
					  <% } %>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										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>
 | 
					<template>
 | 
				
			||||||
	<transition name="el-fade-in-linear">
 | 
						<transition name="el-fade-in-linear"  id="app">
 | 
				
			||||||
		<router-view />
 | 
							<router-view />
 | 
				
			||||||
	</transition>
 | 
						</transition>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -8,10 +16,13 @@
 | 
				
			|||||||
.el-table th.gutter {
 | 
					.el-table th.gutter {
 | 
				
			||||||
	display: table-cell !important;
 | 
						display: table-cell !important;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#app {
 | 
				
			||||||
 | 
					background-color: #f2f4f9;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import Cookies from 'js-cookie'
 | 
					import Cookies from 'js-cookie'
 | 
				
			||||||
import { messages } from '@/i18n'
 | 
					// import { messages } from '@/i18n'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
	watch: {
 | 
						watch: {
 | 
				
			||||||
		'$i18n.locale': 'i18nHandle'
 | 
							'$i18n.locale': 'i18nHandle'
 | 
				
			||||||
@@ -23,7 +34,8 @@ export default {
 | 
				
			|||||||
		i18nHandle(val, oldVal) {
 | 
							i18nHandle(val, oldVal) {
 | 
				
			||||||
			Cookies.set('language', val)
 | 
								Cookies.set('language', val)
 | 
				
			||||||
			document.querySelector('html').setAttribute('lang', 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) {
 | 
								if (this.$route.name !== 'login' && oldVal) {
 | 
				
			||||||
				window.location.reload()
 | 
									window.location.reload()
 | 
				
			||||||
@@ -32,3 +44,4 @@ export default {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</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 {
 | 
					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: 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;
 | 
					  font-size: $--font-size-base;
 | 
				
			||||||
  line-height: $base--line-height;
 | 
					  line-height: $base--line-height;
 | 
				
			||||||
  color: $--color-text-primary;
 | 
					  color: $--color-text-primary;
 | 
				
			||||||
@@ -15,8 +17,8 @@ a {
 | 
				
			|||||||
  text-decoration: none;
 | 
					  text-decoration: none;
 | 
				
			||||||
  &:focus,
 | 
					  &:focus,
 | 
				
			||||||
  &:hover {
 | 
					  &:hover {
 | 
				
			||||||
    color: $--color-primary;
 | 
					    color: #fff;
 | 
				
			||||||
    text-decoration: underline;
 | 
					    // text-decoration: underline;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
img {
 | 
					img {
 | 
				
			||||||
@@ -217,6 +219,17 @@ img {
 | 
				
			|||||||
    &__brand {
 | 
					    &__brand {
 | 
				
			||||||
      &-lg {
 | 
					      &-lg {
 | 
				
			||||||
        display: none;
 | 
					        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 {
 | 
					      &-mini {
 | 
				
			||||||
        display: inline-block;
 | 
					        display: inline-block;
 | 
				
			||||||
@@ -241,10 +254,14 @@ img {
 | 
				
			|||||||
      margin-right: 0;
 | 
					      margin-right: 0;
 | 
				
			||||||
      font-size: 18px;
 | 
					      font-size: 18px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    &__close {
 | 
				
			||||||
 | 
					      width: 0px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  .aui-content {
 | 
					  .aui-content {
 | 
				
			||||||
    &__wrapper {
 | 
					    &__wrapper {
 | 
				
			||||||
      margin-left: $sidebar--width-fold;
 | 
					      margin-left: $sidebar--width-fold;
 | 
				
			||||||
 | 
					      background-color: #F2F4F9;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    &--tabs > .el-tabs > .el-tabs__header {
 | 
					    &--tabs > .el-tabs > .el-tabs__header {
 | 
				
			||||||
      left: $sidebar--width-fold;
 | 
					      left: $sidebar--width-fold;
 | 
				
			||||||
@@ -265,10 +282,24 @@ img {
 | 
				
			|||||||
  align-items: stretch;
 | 
					  align-items: stretch;
 | 
				
			||||||
  height: $navbar--height;
 | 
					  height: $navbar--height;
 | 
				
			||||||
  background-color: $--color-primary;
 | 
					  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 {
 | 
					  &--colorful {
 | 
				
			||||||
    .aui-navbar__body {
 | 
					    .aui-navbar__body {
 | 
				
			||||||
 | 
					      // navbar body颜色
 | 
				
			||||||
      background-color: transparent;
 | 
					      background-color: transparent;
 | 
				
			||||||
 | 
					      // background-color: #304156;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    .aui-navbar__menu {
 | 
					    .aui-navbar__menu {
 | 
				
			||||||
      > .el-menu-item,
 | 
					      > .el-menu-item,
 | 
				
			||||||
@@ -278,6 +309,7 @@ img {
 | 
				
			|||||||
        &:hover {
 | 
					        &:hover {
 | 
				
			||||||
          color: #fff;
 | 
					          color: #fff;
 | 
				
			||||||
          background-color: mix(#000, $--color-primary, 15%);
 | 
					          background-color: mix(#000, $--color-primary, 15%);
 | 
				
			||||||
 | 
					          // background-color: #001528;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      > .el-menu-item.is-active,
 | 
					      > .el-menu-item.is-active,
 | 
				
			||||||
@@ -285,7 +317,7 @@ img {
 | 
				
			|||||||
        color: #fff;
 | 
					        color: #fff;
 | 
				
			||||||
        &:focus,
 | 
					        &:focus,
 | 
				
			||||||
        &:hover {
 | 
					        &:hover {
 | 
				
			||||||
          color: #fff;
 | 
					          color: #263445;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      .el-menu-item i,
 | 
					      .el-menu-item i,
 | 
				
			||||||
@@ -332,7 +364,18 @@ img {
 | 
				
			|||||||
    color: #fff;
 | 
					    color: #fff;
 | 
				
			||||||
    overflow: hidden;
 | 
					    overflow: hidden;
 | 
				
			||||||
    transition: width .3s;
 | 
					    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 {
 | 
					    &-mini {
 | 
				
			||||||
      max-width: 100%;
 | 
					      max-width: 100%;
 | 
				
			||||||
      color: #fff;
 | 
					      color: #fff;
 | 
				
			||||||
@@ -370,10 +413,15 @@ img {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    .el-menu-item.is-active,
 | 
					    .el-menu-item.is-active,
 | 
				
			||||||
    .el-submenu.is-active > .el-submenu__title {
 | 
					    .el-submenu.is-active > .el-submenu__title {
 | 
				
			||||||
 | 
					      // 点击之后背景颜色
 | 
				
			||||||
      color: $--color-text-secondary;
 | 
					      color: $--color-text-secondary;
 | 
				
			||||||
 | 
					      // background-color: rgb(13,43,104);
 | 
				
			||||||
      &:focus,
 | 
					      &:focus,
 | 
				
			||||||
      &:hover {
 | 
					      &:hover {
 | 
				
			||||||
 | 
					        // 点击之后图标颜色亮度
 | 
				
			||||||
        color: $--color-text-primary;
 | 
					        color: $--color-text-primary;
 | 
				
			||||||
 | 
					        // color: #fff;
 | 
				
			||||||
 | 
					        // background-color: rgb(13,43,104);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    .el-menu-item {
 | 
					    .el-menu-item {
 | 
				
			||||||
@@ -381,6 +429,7 @@ img {
 | 
				
			|||||||
      &:hover {
 | 
					      &:hover {
 | 
				
			||||||
        .aui-navbar__icon-menu {
 | 
					        .aui-navbar__icon-menu {
 | 
				
			||||||
          color: $--color-text-primary;
 | 
					          color: $--color-text-primary;
 | 
				
			||||||
 | 
					          // color: #fff;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .el-dropdown {
 | 
					        .el-dropdown {
 | 
				
			||||||
          color: $--color-text-primary;
 | 
					          color: $--color-text-primary;
 | 
				
			||||||
@@ -392,9 +441,10 @@ img {
 | 
				
			|||||||
      * {
 | 
					      * {
 | 
				
			||||||
        vertical-align: initial;
 | 
					        vertical-align: initial;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      // 
 | 
				
			||||||
      .aui-navbar__icon-menu {
 | 
					      .aui-navbar__icon-menu {
 | 
				
			||||||
        vertical-align: middle;
 | 
					        vertical-align: middle;
 | 
				
			||||||
        font-size: 16px;
 | 
					        font-size: 22px;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      .el-dropdown {
 | 
					      .el-dropdown {
 | 
				
			||||||
        color: $--color-text-secondary;
 | 
					        color: $--color-text-secondary;
 | 
				
			||||||
@@ -463,7 +513,8 @@ img {
 | 
				
			|||||||
  bottom: 0;
 | 
					  bottom: 0;
 | 
				
			||||||
  z-index: 1020;
 | 
					  z-index: 1020;
 | 
				
			||||||
  width: $sidebar--width;
 | 
					  width: $sidebar--width;
 | 
				
			||||||
  background-color: #fff;
 | 
					  // background-color: #fff;
 | 
				
			||||||
 | 
					  background-color:#304156;
 | 
				
			||||||
  box-shadow: 1px 0 2px 0 rgba(0, 0, 0, .05);
 | 
					  box-shadow: 1px 0 2px 0 rgba(0, 0, 0, .05);
 | 
				
			||||||
  overflow: hidden;
 | 
					  overflow: hidden;
 | 
				
			||||||
  transition: width .3s;
 | 
					  transition: width .3s;
 | 
				
			||||||
@@ -471,23 +522,29 @@ img {
 | 
				
			|||||||
    background-color: $sidebar--background-color-dark;
 | 
					    background-color: $sidebar--background-color-dark;
 | 
				
			||||||
    .aui-sidebar__menu,
 | 
					    .aui-sidebar__menu,
 | 
				
			||||||
    > .el-menu--popup {
 | 
					    > .el-menu--popup {
 | 
				
			||||||
      background-color: $sidebar--background-color-dark;
 | 
					      // background-color: $sidebar--background-color-dark;
 | 
				
			||||||
 | 
					      background-color: #304156;;
 | 
				
			||||||
      .el-menu-item,
 | 
					      .el-menu-item,
 | 
				
			||||||
      .el-submenu > .el-submenu__title {
 | 
					      .el-submenu > .el-submenu__title {
 | 
				
			||||||
        color: $sidebar--text-color-dark;
 | 
					        // color: $sidebar--text-color-dark;
 | 
				
			||||||
 | 
					        color: #f4f4f5;
 | 
				
			||||||
        &:focus,
 | 
					        &:focus,
 | 
				
			||||||
        &:hover {
 | 
					        &:hover {
 | 
				
			||||||
          color: mix(#fff, $sidebar--text-color-dark, 50%);
 | 
					          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-menu,
 | 
				
			||||||
      .el-submenu.is-opened {
 | 
					      .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-menu-item.is-active,
 | 
				
			||||||
      .el-submenu.is-active > .el-submenu__title {
 | 
					      .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;
 | 
				
			||||||
 | 
					        color: #0B58FF;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -501,6 +558,10 @@ img {
 | 
				
			|||||||
    overflow-y: scroll;
 | 
					    overflow-y: scroll;
 | 
				
			||||||
    transition: width .3s;
 | 
					    transition: width .3s;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  .close {
 | 
				
			||||||
 | 
					    width: 0px;
 | 
				
			||||||
 | 
					    margin-left: 0 !important;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  &__menu {
 | 
					  &__menu {
 | 
				
			||||||
    width: $sidebar--width;
 | 
					    width: $sidebar--width;
 | 
				
			||||||
    border-right: 0;
 | 
					    border-right: 0;
 | 
				
			||||||
@@ -527,14 +588,21 @@ img {
 | 
				
			|||||||
/* Content
 | 
					/* Content
 | 
				
			||||||
------------------------------ */
 | 
					------------------------------ */
 | 
				
			||||||
.aui-content {
 | 
					.aui-content {
 | 
				
			||||||
  position: relative;
 | 
					  top: 16px;
 | 
				
			||||||
  padding: $content--padding;
 | 
					  margin:0 16px 0;
 | 
				
			||||||
  min-height: calc(100vh - #{$navbar--height});
 | 
					  background-color: #fff;
 | 
				
			||||||
 | 
					  border-radius: 4px;
 | 
				
			||||||
 | 
					  padding: 16px 16px 0;
 | 
				
			||||||
 | 
					  //此处修底部高度
 | 
				
			||||||
 | 
					  height: calc(100vh - 85px);
 | 
				
			||||||
 | 
					  overflow: auto;
 | 
				
			||||||
  &__wrapper {
 | 
					  &__wrapper {
 | 
				
			||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
 | 
					    // 注释掉可隐藏侧边栏,但需要在main.vue中加入main-content的限制条件
 | 
				
			||||||
    margin-left: $sidebar--width;
 | 
					    margin-left: $sidebar--width;
 | 
				
			||||||
    min-height: calc(100vh - #{$navbar--height});
 | 
					    min-height: calc(100vh - #{$navbar--height});
 | 
				
			||||||
    background-color: $content--background-color;
 | 
					    //此处修改背景色
 | 
				
			||||||
 | 
					    background-color: #F2F4F9;
 | 
				
			||||||
    transition: margin-left .3s;
 | 
					    transition: margin-left .3s;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  > .aui-card--fill > .el-card__body {
 | 
					  > .aui-card--fill > .el-card__body {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,7 @@
 | 
				
			|||||||
.mod-home {
 | 
					.mod-home {
 | 
				
			||||||
  table {
 | 
					  table {
 | 
				
			||||||
    width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
 | 
					    height: 10px;
 | 
				
			||||||
    border: 1px solid $--border-color-lighter;
 | 
					    border: 1px solid $--border-color-lighter;
 | 
				
			||||||
    border-collapse: collapse;
 | 
					    border-collapse: collapse;
 | 
				
			||||||
    th,
 | 
					    th,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,15 +5,19 @@ $base--line-height: 1.15;
 | 
				
			|||||||
$navbar--height: 50px;
 | 
					$navbar--height: 50px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Sidebar
 | 
					// Sidebar
 | 
				
			||||||
$sidebar--width: 300px;
 | 
					// $sidebar--width: 300px;
 | 
				
			||||||
 | 
					$sidebar--width: 248px;
 | 
				
			||||||
$sidebar--width-fold: 64px;
 | 
					$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--text-color-dark: #8a979e;
 | 
				
			||||||
$sidebar--menu-item-height: 48px;
 | 
					$sidebar--menu-item-height: 48px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Content
 | 
					// Content
 | 
				
			||||||
$content--padding: 15px; 
 | 
					$content--padding: 15px; 
 | 
				
			||||||
$content--background-color: #f1f4f5;
 | 
					// $content--background-color: #f1f4f5;
 | 
				
			||||||
 | 
					$content--background-color: #fff;
 | 
				
			||||||
$content--card-header-height: 60px;
 | 
					$content--card-header-height: 60px;
 | 
				
			||||||
$content--tabs-header-height: 38px;
 | 
					$content--tabs-header-height: 38px;
 | 
				
			||||||
// Content, 填充整屏高度(非tabs状态) = 整屏高度 - 导航条高度 - aui-content上下内边距高度
 | 
					// Content, 填充整屏高度(非tabs状态) = 整屏高度 - 导航条高度 - aui-content上下内边距高度
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										93
									
								
								src/components/Breadcrumb/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,93 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: your name
 | 
				
			||||||
 | 
					 * @Date: 2021-01-27 10:07:42
 | 
				
			||||||
 | 
					 * @LastEditTime: 2021-01-28 16:26:15
 | 
				
			||||||
 | 
					 * @LastEditors: gtz
 | 
				
			||||||
 | 
					 * @Description: In User Settings Edit
 | 
				
			||||||
 | 
					 * @FilePath: \mt-bus-fe\src\components\Breadcrumb\index.vue
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-breadcrumb class="app-breadcrumb" separator="/">
 | 
				
			||||||
 | 
					    <transition-group name="breadcrumb">
 | 
				
			||||||
 | 
					      <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
 | 
				
			||||||
 | 
					        <span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="isredirect">{{ item.meta.title }}</span>
 | 
				
			||||||
 | 
					        <span v-else class="no-redirect">{{ item.meta.title }}</span>
 | 
				
			||||||
 | 
					        <!-- @click.prevent="handleLink(item)" -->
 | 
				
			||||||
 | 
					      </el-breadcrumb-item>
 | 
				
			||||||
 | 
					    </transition-group>
 | 
				
			||||||
 | 
					  </el-breadcrumb>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import pathToRegexp from 'path-to-regexp'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      levelList: null
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    $route(route) {
 | 
				
			||||||
 | 
					      // if you go to the redirect page, do not update the breadcrumbs
 | 
				
			||||||
 | 
					      if (route.path.startsWith('/redirect/')) {
 | 
				
			||||||
 | 
					        return
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.getBreadcrumb()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  created() {
 | 
				
			||||||
 | 
					    this.getBreadcrumb()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getBreadcrumb() {
 | 
				
			||||||
 | 
					      // only show routes with meta.title
 | 
				
			||||||
 | 
					      const matched = this.$route.matched.filter(item => item.meta && item.meta.title)
 | 
				
			||||||
 | 
					      // const first = matched[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // if (!this.isDashboard(first)) {
 | 
				
			||||||
 | 
					      //   matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    isDashboard(route) {
 | 
				
			||||||
 | 
					      const name = route && route.name
 | 
				
			||||||
 | 
					      if (!name) {
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    pathCompile(path) {
 | 
				
			||||||
 | 
					      // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
 | 
				
			||||||
 | 
					      const { params } = this.$route
 | 
				
			||||||
 | 
					      var toPath = pathToRegexp.compile(path)
 | 
				
			||||||
 | 
					      return toPath(params)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleLink(item) {
 | 
				
			||||||
 | 
					      const { redirect, path } = item
 | 
				
			||||||
 | 
					      if (redirect) {
 | 
				
			||||||
 | 
					        this.$router.push(redirect)
 | 
				
			||||||
 | 
					        return
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.$router.push(this.pathCompile(path))
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.app-breadcrumb.el-breadcrumb {
 | 
				
			||||||
 | 
					  display: inline-block;
 | 
				
			||||||
 | 
					  font-size: 14px;
 | 
				
			||||||
 | 
					  line-height: 48px;
 | 
				
			||||||
 | 
					  margin-left: 8px;
 | 
				
			||||||
 | 
					  .isredirect {
 | 
				
			||||||
 | 
					    color: rgba(0, 0, 0, 0.65);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .no-redirect {
 | 
				
			||||||
 | 
					    color: #8C8C8C;
 | 
				
			||||||
 | 
					    cursor: text;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										35
									
								
								src/components/Hamburger/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div style="padding: 5px 15px 5px 32px;" @click="toggleClick">
 | 
				
			||||||
 | 
					    <svg-icon style="width: 24px; height: 24px" class="item-icon hamburger" :class="{'is-active':isActive}" icon-class="hamburgerBtn" />
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'Hamburger',
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    isActive: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: false
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    toggleClick() {
 | 
				
			||||||
 | 
					      this.$emit('toggleClick')
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.hamburger {
 | 
				
			||||||
 | 
					  display: inline-block;
 | 
				
			||||||
 | 
					  vertical-align: middle;
 | 
				
			||||||
 | 
					  width: 20px;
 | 
				
			||||||
 | 
					  height: 20px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.hamburger.is-active {
 | 
				
			||||||
 | 
					  transform: rotate(180deg);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										62
									
								
								src/components/SvgIcon/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,62 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
 | 
				
			||||||
 | 
					  <svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
 | 
				
			||||||
 | 
					    <use :xlink:href="iconName" />
 | 
				
			||||||
 | 
					  </svg>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
 | 
				
			||||||
 | 
					import { isExternal } from '@/utils/validate'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'SvgIcon',
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    iconClass: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      required: true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    className: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: ''
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    isExternal() {
 | 
				
			||||||
 | 
					      return isExternal(this.iconClass)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    iconName() {
 | 
				
			||||||
 | 
					      return `#icon-${this.iconClass}`
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    svgClass() {
 | 
				
			||||||
 | 
					      if (this.className) {
 | 
				
			||||||
 | 
					        return 'svg-icon ' + this.className
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return 'svg-icon'
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    styleExternalIcon() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        mask: `url(${this.iconClass}) no-repeat 50% 50%`,
 | 
				
			||||||
 | 
					        '-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.svg-icon {
 | 
				
			||||||
 | 
					  width: 1em;
 | 
				
			||||||
 | 
					  height: 1em;
 | 
				
			||||||
 | 
					  vertical-align: -0.15em;
 | 
				
			||||||
 | 
					  fill: currentColor;
 | 
				
			||||||
 | 
					  overflow: hidden;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.svg-external-icon {
 | 
				
			||||||
 | 
					  background-color: currentColor;
 | 
				
			||||||
 | 
					  mask-size: cover!important;
 | 
				
			||||||
 | 
					  display: inline-block;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -1,10 +1,12 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="attr-form">
 | 
						<div class="attr-form">
 | 
				
			||||||
		<h3>
 | 
							<h3>
 | 
				
			||||||
			{{ title }} <el-button style="margin-left: 8px;" type="text" v-if="!isDetail && !showAddAttr" @click="showAddAttr = true">{{ $t('add') }}</el-button>
 | 
								<!-- <el-button style="margin-left: 8px" type="text" v-if="!isDetail && !showAddAttr" @click="showAddAttr = true">{{ $t('add') }}</el-button>  跟在{{ title }} 同行后面 -->
 | 
				
			||||||
 | 
								{{ title }}
 | 
				
			||||||
		</h3>
 | 
							</h3>
 | 
				
			||||||
		<div v-if="!showAddAttr">
 | 
							<div v-if="!showAddAttr">
 | 
				
			||||||
			<component
 | 
								<component
 | 
				
			||||||
 | 
									:top-btn-config="topBtnConfig"
 | 
				
			||||||
				key="sub-table"
 | 
									key="sub-table"
 | 
				
			||||||
				:is="require('../../base-table/index.vue').default"
 | 
									:is="require('../../base-table/index.vue').default"
 | 
				
			||||||
				:table-head-configs="filterTableConfigs()"
 | 
									:table-head-configs="filterTableConfigs()"
 | 
				
			||||||
@@ -12,8 +14,8 @@
 | 
				
			|||||||
				:page="pageIndex"
 | 
									:page="pageIndex"
 | 
				
			||||||
				:size="pageSize"
 | 
									:size="pageSize"
 | 
				
			||||||
				:max-height="calcMaxHeight(8)"
 | 
									:max-height="calcMaxHeight(8)"
 | 
				
			||||||
				@operate-event="handleOperations"
 | 
									@clickTopBtn="clickTopBtn"
 | 
				
			||||||
			/>
 | 
									@operate-event="handleOperations" />
 | 
				
			||||||
			<el-pagination
 | 
								<el-pagination
 | 
				
			||||||
				@size-change="sizeChangeHandle"
 | 
									@size-change="sizeChangeHandle"
 | 
				
			||||||
				@current-change="currentChangeHandle"
 | 
									@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -21,15 +23,14 @@
 | 
				
			|||||||
				:page-sizes="[5, 10, 20, 50]"
 | 
									:page-sizes="[5, 10, 20, 50]"
 | 
				
			||||||
				:page-size="pageSize"
 | 
									:page-size="pageSize"
 | 
				
			||||||
				:total="totalPage"
 | 
									:total="totalPage"
 | 
				
			||||||
				layout="total, sizes, prev, pager, next, jumper"
 | 
									layout="total, sizes, prev, pager, next, jumper">
 | 
				
			||||||
			>
 | 
					 | 
				
			||||||
			</el-pagination>
 | 
								</el-pagination>
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
		<div v-else style="background: #eee; border-radius: 8px; padding: 12px;">
 | 
							<div v-else style="background: #eee; border-radius: 8px; padding: 12px">
 | 
				
			||||||
			<el-row>
 | 
								<el-row>
 | 
				
			||||||
				<el-col>
 | 
									<el-col>
 | 
				
			||||||
					<el-form ref="AttrForm" :model="AttrForm" :rules="AttrFormRules" :inline="true" label-position="top">
 | 
										<el-form ref="AttrForm" :model="AttrForm" :rules="AttrFormRules" :inline="true" label-position="top">
 | 
				
			||||||
						<el-row :gutter="20" style="padding: 0 24px;">
 | 
											<el-row :gutter="20" style="padding: 0 24px">
 | 
				
			||||||
							<el-col :span="attrFormFields.length > 6 ? 6 : 12" v-for="field in attrFormFields" :key="field.prop + 'col'">
 | 
												<el-col :span="attrFormFields.length > 6 ? 6 : 12" v-for="field in attrFormFields" :key="field.prop + 'col'">
 | 
				
			||||||
								<el-form-item :key="field.prop" :prop="field.prop" :label="field.name" style="width: 100%">
 | 
													<el-form-item :key="field.prop" :prop="field.prop" :label="field.name" style="width: 100%">
 | 
				
			||||||
									<el-input v-if="field.formType === 'input' || !field.formType" v-model="AttrForm[field.prop]" :placeholder="$t('hints.input')" clearable />
 | 
														<el-input v-if="field.formType === 'input' || !field.formType" v-model="AttrForm[field.prop]" :placeholder="$t('hints.input')" clearable />
 | 
				
			||||||
@@ -43,7 +44,7 @@
 | 
				
			|||||||
					</el-form>
 | 
										</el-form>
 | 
				
			||||||
				</el-col>
 | 
									</el-col>
 | 
				
			||||||
			</el-row>
 | 
								</el-row>
 | 
				
			||||||
			<el-row style="text-align: right;">
 | 
								<el-row style="text-align: right">
 | 
				
			||||||
				<el-button size="small" @click="handleCloseAttrForm">{{ $t('cancel') }}</el-button>
 | 
									<el-button size="small" @click="handleCloseAttrForm">{{ $t('cancel') }}</el-button>
 | 
				
			||||||
				<el-button type="success" size="small" @click="handleSaveAttrForm">{{ $t('save') }}</el-button>
 | 
									<el-button type="success" size="small" @click="handleSaveAttrForm">{{ $t('save') }}</el-button>
 | 
				
			||||||
			</el-row>
 | 
								</el-row>
 | 
				
			||||||
@@ -56,6 +57,12 @@ import i18n from '@/i18n'
 | 
				
			|||||||
import BaseTable from '@/components/base-table'
 | 
					import BaseTable from '@/components/base-table'
 | 
				
			||||||
import { pick } from 'lodash/object'
 | 
					import { pick } from 'lodash/object'
 | 
				
			||||||
import { calcMaxHeight } from '@/utils'
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
 | 
					const topBtnConfig = [
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							type: 'add',
 | 
				
			||||||
 | 
							btnName: i18n.t('add')
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
	name: 'AttrForm',
 | 
						name: 'AttrForm',
 | 
				
			||||||
	components: { BaseTable },
 | 
						components: { BaseTable },
 | 
				
			||||||
@@ -96,6 +103,7 @@ export default {
 | 
				
			|||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
			calcMaxHeight,
 | 
								calcMaxHeight,
 | 
				
			||||||
 | 
								topBtnConfig,
 | 
				
			||||||
			showAddAttr: false,
 | 
								showAddAttr: false,
 | 
				
			||||||
			dataList: [],
 | 
								dataList: [],
 | 
				
			||||||
			pageIndex: 1,
 | 
								pageIndex: 1,
 | 
				
			||||||
@@ -107,9 +115,9 @@ export default {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	computed: {
 | 
						computed: {
 | 
				
			||||||
		attrFormFields() {
 | 
							attrFormFields() {
 | 
				
			||||||
			const _ = this.tableConfigs.filter(item => item.formField)
 | 
								const _ = this.tableConfigs.filter((item) => item.formField)
 | 
				
			||||||
			/** 顺带配置 AttrForm */
 | 
								/** 顺带配置 AttrForm */
 | 
				
			||||||
			_.forEach(item => {
 | 
								_.forEach((item) => {
 | 
				
			||||||
				this.$set(this.AttrForm, [item.prop], '')
 | 
									this.$set(this.AttrForm, [item.prop], '')
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -126,19 +134,18 @@ export default {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						// 加个created,来实现不能在topBtnConfig组件直接使用的? : 判别
 | 
				
			||||||
 | 
						created() {
 | 
				
			||||||
 | 
							// if(!(!this.isDetail && !this.showAddAttr)) {
 | 
				
			||||||
 | 
							// 	this.topBtnConfig = []
 | 
				
			||||||
 | 
							// }
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		/** filter tableConfigs */
 | 
					 | 
				
			||||||
		filterTableConfigs() {
 | 
							filterTableConfigs() {
 | 
				
			||||||
			// return this.tableConfigs.map(item => {
 | 
								if (this.isDetail) {
 | 
				
			||||||
			// 	const {prop, name, filter} = item
 | 
									/** 如果是查看详情,就屏蔽操作列 */
 | 
				
			||||||
			// 	const newConfigs = {prop,name,filter}
 | 
									return this.tableConfigs.filter((opt) => opt.prop !== 'operations')
 | 
				
			||||||
			// 	if (item.type) newConfigs.type = item.type
 | 
								}
 | 
				
			||||||
			// 	if (item.fixed) newConfigs.fixed = item.fixed
 | 
					 | 
				
			||||||
			// 	if (item.width) newConfigs.width = item.width
 | 
					 | 
				
			||||||
			// 	if (item.subcomponent) newConfigs.subcomponent = item.subcomponent
 | 
					 | 
				
			||||||
			// 	if (item.options) newConfigs.options = item.options
 | 
					 | 
				
			||||||
			// 	return newConfigs
 | 
					 | 
				
			||||||
			// })
 | 
					 | 
				
			||||||
			return this.tableConfigs
 | 
								return this.tableConfigs
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		/** init dataform */
 | 
							/** init dataform */
 | 
				
			||||||
@@ -189,7 +196,7 @@ export default {
 | 
				
			|||||||
						this.$nextTick(() => {
 | 
											this.$nextTick(() => {
 | 
				
			||||||
							this.$http.get(this.$http.adornUrl(`${this.url}/${id}`)).then(({ data: res }) => {
 | 
												this.$http.get(this.$http.adornUrl(`${this.url}/${id}`)).then(({ data: res }) => {
 | 
				
			||||||
								if (res && res.code === 0 && res.data) {
 | 
													if (res && res.code === 0 && res.data) {
 | 
				
			||||||
									const neededFields = [...this.attrFormFields.map(item => item.prop), 'id']
 | 
														const neededFields = [...this.attrFormFields.map((item) => item.prop), 'id']
 | 
				
			||||||
									const filtered = pick(res.data, neededFields)
 | 
														const filtered = pick(res.data, neededFields)
 | 
				
			||||||
									for (let field of neededFields) {
 | 
														for (let field of neededFields) {
 | 
				
			||||||
										this.AttrForm[field] = filtered[field]
 | 
															this.AttrForm[field] = filtered[field]
 | 
				
			||||||
@@ -238,7 +245,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		handleSaveAttrForm() {
 | 
							handleSaveAttrForm() {
 | 
				
			||||||
			this.$refs['AttrForm'].validate(valid => {
 | 
								this.$refs['AttrForm'].validate((valid) => {
 | 
				
			||||||
				if (valid) {
 | 
									if (valid) {
 | 
				
			||||||
					this.$http({
 | 
										this.$http({
 | 
				
			||||||
						// url: this.$http.adornUrl(`${this.url}/${!this.AttrForm.id ? '' : this.AttrForm.id}`),
 | 
											// url: this.$http.adornUrl(`${this.url}/${!this.AttrForm.id ? '' : this.AttrForm.id}`),
 | 
				
			||||||
@@ -278,6 +285,9 @@ export default {
 | 
				
			|||||||
		currentChangeHandle(val) {
 | 
							currentChangeHandle(val) {
 | 
				
			||||||
			this.pageIndex = val
 | 
								this.pageIndex = val
 | 
				
			||||||
			this.getDataList()
 | 
								this.getDataList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							clickTopBtn() {
 | 
				
			||||||
 | 
								this.showAddAttr = true
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,9 +5,8 @@
 | 
				
			|||||||
		:visible.sync="visible"
 | 
							:visible.sync="visible"
 | 
				
			||||||
		@close="handleClose"
 | 
							@close="handleClose"
 | 
				
			||||||
		:distory-on-close="true"
 | 
							:distory-on-close="true"
 | 
				
			||||||
		:close-on-click-modal="false"
 | 
							:close-on-click-modal="false">
 | 
				
			||||||
	>
 | 
							<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden">
 | 
				
			||||||
		<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
 | 
					 | 
				
			||||||
			<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
 | 
								<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
 | 
				
			||||||
				<!-- 如果需要更精细一点的布局,可以根据配置项实现地再复杂一点,但此处暂时全部采用一行两列布局  -->
 | 
									<!-- 如果需要更精细一点的布局,可以根据配置项实现地再复杂一点,但此处暂时全部采用一行两列布局  -->
 | 
				
			||||||
				<el-row v-for="n in rows" :key="n" :gutter="20">
 | 
									<el-row v-for="n in rows" :key="n" :gutter="20">
 | 
				
			||||||
@@ -18,27 +17,27 @@
 | 
				
			|||||||
							v-if="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]"
 | 
												v-if="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]"
 | 
				
			||||||
							:prop="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name"
 | 
												:prop="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name"
 | 
				
			||||||
							:key="`${n}-col-${c}-item`"
 | 
												:key="`${n}-col-${c}-item`"
 | 
				
			||||||
							:label="getLabel(n, c)"
 | 
												:label="getLabel(n, c)">
 | 
				
			||||||
						>
 | 
					 | 
				
			||||||
							<!-- 暂时先不实现部分输入方式 -->
 | 
												<!-- 暂时先不实现部分输入方式 -->
 | 
				
			||||||
							<el-input
 | 
												<el-input
 | 
				
			||||||
								v-if="getType(n, c) === 'input'"
 | 
													v-if="getType(n, c) === 'input'"
 | 
				
			||||||
								:placeholder="getPlaceholder(n, c)"
 | 
													:placeholder="getPlaceholder(n, c)"
 | 
				
			||||||
								v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
 | 
													v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
 | 
				
			||||||
								clearable
 | 
													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-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-checkbox v-if="getType(n, c) === 'check'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
 | 
				
			||||||
 | 
												<!-- 全部selcet下拉框可输入搜索 filterable-->
 | 
				
			||||||
							<el-select
 | 
												<el-select
 | 
				
			||||||
								v-if="getType(n, c) === 'select'"
 | 
													v-if="getType(n, c) === 'select'"
 | 
				
			||||||
								:placeholder="getPlaceholder(n, c)"
 | 
													:placeholder="getPlaceholder(n, c)"
 | 
				
			||||||
								v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
 | 
													v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
 | 
				
			||||||
								clearable
 | 
													clearable
 | 
				
			||||||
								:disabled="isDetail"
 | 
													filterable
 | 
				
			||||||
								@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)"
 | 
													:disabled="isDetail || configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].isDisabled"
 | 
				
			||||||
							>
 | 
													
 | 
				
			||||||
								<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" />
 | 
													@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-select>
 | 
				
			||||||
							<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
 | 
												<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
 | 
				
			||||||
							<el-cascader
 | 
												<el-cascader
 | 
				
			||||||
@@ -47,15 +46,15 @@
 | 
				
			|||||||
								:options="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options"
 | 
													:options="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options"
 | 
				
			||||||
								:props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
 | 
													:props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
 | 
				
			||||||
								:disabled="isDetail"
 | 
													:disabled="isDetail"
 | 
				
			||||||
							/>
 | 
													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-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
 | 
												<el-date-picker
 | 
				
			||||||
								v-if="getType(n, c) === 'date'"
 | 
													v-if="getType(n, c) === 'date'"
 | 
				
			||||||
								v-bind="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
 | 
													v-bind="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
 | 
				
			||||||
								:placeholder="getPlaceholder(n, c)"
 | 
													:placeholder="getPlaceholder(n, c)"
 | 
				
			||||||
 | 
													value-format='yyyy-MM-ddTHH:mm:ss'
 | 
				
			||||||
								v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
 | 
													v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
 | 
				
			||||||
								:disabled="isDetail"
 | 
													:disabled="isDetail" />
 | 
				
			||||||
							/>
 | 
					 | 
				
			||||||
						</el-form-item>
 | 
											</el-form-item>
 | 
				
			||||||
					</el-col>
 | 
										</el-col>
 | 
				
			||||||
				</el-row>
 | 
									</el-row>
 | 
				
			||||||
@@ -64,14 +63,13 @@
 | 
				
			|||||||
				<template v-if="configs.extraComponents && configs.extraComponents.length > 0">
 | 
									<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">
 | 
										<el-form-item v-for="(ec, index) in configs.extraComponents" :key="ec.name + index" :label="ec.label" class="extra-components">
 | 
				
			||||||
						<component
 | 
											<component
 | 
				
			||||||
							style="margin-top: 40px;"
 | 
												style="margin-top: 40px"
 | 
				
			||||||
							v-if="ec.hasModel"
 | 
												v-if="ec.hasModel"
 | 
				
			||||||
							:is="ec.component"
 | 
												:is="ec.component"
 | 
				
			||||||
							v-bind="ec.props"
 | 
												v-bind="ec.props"
 | 
				
			||||||
							v-model="dataForm[ec.name]"
 | 
												v-model="dataForm[ec.name]"
 | 
				
			||||||
							@ready="handleEditorReady"
 | 
												@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-if="ec.hasModel" :is="ec.component" v-bind="ec.props" v-model="dataForm[ec.name]" /> -->
 | 
				
			||||||
						<component
 | 
											<component
 | 
				
			||||||
							v-else
 | 
												v-else
 | 
				
			||||||
@@ -79,8 +77,7 @@
 | 
				
			|||||||
							v-bind="ec.props"
 | 
												v-bind="ec.props"
 | 
				
			||||||
							@uploader-update-filelist="handleUploadListUpdate($event, ec.props.extraParams.typeCode)"
 | 
												@uploader-update-filelist="handleUploadListUpdate($event, ec.props.extraParams.typeCode)"
 | 
				
			||||||
							:uploader-inject-file-list="/*用于设备分流的*/ fileList[ec.props.extraParams.typeCode]"
 | 
												:uploader-inject-file-list="/*用于设备分流的*/ fileList[ec.props.extraParams.typeCode]"
 | 
				
			||||||
							:read-only="isDetail"
 | 
												:read-only="isDetail" />
 | 
				
			||||||
						/>
 | 
					 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
				</template>
 | 
									</template>
 | 
				
			||||||
			</el-form>
 | 
								</el-form>
 | 
				
			||||||
@@ -95,12 +92,16 @@
 | 
				
			|||||||
				<el-button
 | 
									<el-button
 | 
				
			||||||
					v-if="
 | 
										v-if="
 | 
				
			||||||
						!isDetail &&
 | 
											!isDetail &&
 | 
				
			||||||
							(operate.showAlways ||
 | 
											(operate.showAlways ||
 | 
				
			||||||
								(((dataForm.id && operate.showOnEdit) || (!dataForm.id && !operate.showOnEdit)) && (operate.permission ? $hasPermission(operate.permission) : true)))
 | 
												(((dataForm.id && operate.showOnEdit) || (!dataForm.id && !operate.showOnEdit)) && (operate.permission ? $hasPermission(operate.permission) : true)))
 | 
				
			||||||
					"
 | 
										"
 | 
				
			||||||
					:key="`operate-${index}`"
 | 
										:key="`operate-${index}`"
 | 
				
			||||||
					:type="btnType[operate.name]"
 | 
										:style="{
 | 
				
			||||||
 | 
											backgroundColor: btnType[operate.name],
 | 
				
			||||||
 | 
											color: btnColor[operate.name]
 | 
				
			||||||
 | 
										}"
 | 
				
			||||||
					@click="handleClick(operate)"
 | 
										@click="handleClick(operate)"
 | 
				
			||||||
 | 
										:disabled='isDisabled'
 | 
				
			||||||
					>{{ btnName[operate.name] }}</el-button
 | 
										>{{ btnName[operate.name] }}</el-button
 | 
				
			||||||
				>
 | 
									>
 | 
				
			||||||
			</template>
 | 
								</template>
 | 
				
			||||||
@@ -113,6 +114,7 @@
 | 
				
			|||||||
import CKEditor from 'ckeditor4-vue'
 | 
					import CKEditor from 'ckeditor4-vue'
 | 
				
			||||||
import AttrForm from '../AttrForm'
 | 
					import AttrForm from '../AttrForm'
 | 
				
			||||||
import { pick } from 'lodash/object'
 | 
					import { pick } from 'lodash/object'
 | 
				
			||||||
 | 
					import { pick as __pick } from '@/utils/filters'
 | 
				
			||||||
import i18n from '@/i18n'
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
// 标题 for i18n
 | 
					// 标题 for i18n
 | 
				
			||||||
const title = {
 | 
					const title = {
 | 
				
			||||||
@@ -123,9 +125,17 @@ const title = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// 或者也可以改造成自定义颜色:
 | 
					// 或者也可以改造成自定义颜色:
 | 
				
			||||||
const btnType = {
 | 
					const btnType = {
 | 
				
			||||||
	save: 'success',
 | 
						add: '#0b58ff',
 | 
				
			||||||
	update: 'primary',
 | 
						save: '#0b58ff',
 | 
				
			||||||
	reset: 'text'
 | 
						update: '#0b58ff',
 | 
				
			||||||
 | 
						reset: ''
 | 
				
			||||||
 | 
						// cancel: 'text'
 | 
				
			||||||
 | 
						// add more...
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					const btnColor = {
 | 
				
			||||||
 | 
						save: '#fff',
 | 
				
			||||||
 | 
						update: '#fff',
 | 
				
			||||||
 | 
						reset: ''
 | 
				
			||||||
	// cancel: 'text'
 | 
						// cancel: 'text'
 | 
				
			||||||
	// add more...
 | 
						// add more...
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -147,19 +157,12 @@ export default {
 | 
				
			|||||||
	components: { AttrForm },
 | 
						components: { AttrForm },
 | 
				
			||||||
	props: {
 | 
						props: {
 | 
				
			||||||
		configs: {
 | 
							configs: {
 | 
				
			||||||
			/**
 | 
					 | 
				
			||||||
			 * TODO: 定义及使用方式,应改用README.md文件记录
 | 
					 | 
				
			||||||
			 * type: 'dialog' | 'drawer' | 'page'
 | 
					 | 
				
			||||||
			 * fields: Array<string|object>
 | 
					 | 
				
			||||||
			 * - fields.object: { name, type: 'number'|'textarea'|'select'|'date'|.., required: boolean,  validator: boolean(是否需要验证), [options]: any[], api: string(自动获取数据的接口,一般为getcode接口)}
 | 
					 | 
				
			||||||
			 * operations: Array[object], 操作名和对应的接口地址,还有permission(如,sys:dict:update)
 | 
					 | 
				
			||||||
			 */
 | 
					 | 
				
			||||||
			type: Object,
 | 
								type: Object,
 | 
				
			||||||
			default: () => ({}) // 此处省去类型检查,使用者自行注意就好
 | 
								default: () => ({}) // 此处省去类型检查,使用者自行注意就好
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	filters: {
 | 
						filters: {
 | 
				
			||||||
		nameFilter: function(name) {
 | 
							nameFilter: function (name) {
 | 
				
			||||||
			if (!name) return null
 | 
								if (!name) return null
 | 
				
			||||||
			// for i18n
 | 
								// for i18n
 | 
				
			||||||
			const defaultNames = {
 | 
								const defaultNames = {
 | 
				
			||||||
@@ -181,11 +184,14 @@ export default {
 | 
				
			|||||||
	// },
 | 
						// },
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
 | 
								// 按钮防重复点击
 | 
				
			||||||
 | 
								isDisabled: false,
 | 
				
			||||||
			COLUMN_PER_ROW,
 | 
								COLUMN_PER_ROW,
 | 
				
			||||||
			title,
 | 
								title,
 | 
				
			||||||
			/** 按钮相关属性 */
 | 
								/** 按钮相关属性 */
 | 
				
			||||||
			btnName,
 | 
								btnName,
 | 
				
			||||||
			btnType,
 | 
								btnType,
 | 
				
			||||||
 | 
								btnColor,
 | 
				
			||||||
			defaultNames: {
 | 
								defaultNames: {
 | 
				
			||||||
				name: i18n.t('name'),
 | 
									name: i18n.t('name'),
 | 
				
			||||||
				code: i18n.t('code'),
 | 
									code: i18n.t('code'),
 | 
				
			||||||
@@ -227,7 +233,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		/** 转换 configs.fields 的结构,把纯字符串转为对象 */
 | 
							/** 转换 configs.fields 的结构,把纯字符串转为对象 */
 | 
				
			||||||
		this.$nextTick(() => {
 | 
							this.$nextTick(() => {
 | 
				
			||||||
			this.configs.fields = this.configs.fields.map(item => {
 | 
								this.configs.fields = this.configs.fields.map((item) => {
 | 
				
			||||||
				if (typeof item === 'string') {
 | 
									if (typeof item === 'string') {
 | 
				
			||||||
					return { name: item }
 | 
										return { name: item }
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
@@ -235,13 +241,13 @@ export default {
 | 
				
			|||||||
			})
 | 
								})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** 动态设置dataForm字段 */
 | 
								/** 动态设置dataForm字段 */
 | 
				
			||||||
			this.configs.fields.forEach(item => {
 | 
								this.configs.fields.forEach((item) => {
 | 
				
			||||||
				this.$set(this.dataForm, [item.name], '')
 | 
									this.$set(this.dataForm, [item.name], '')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				/** select 的默认值设置 */
 | 
									/** select 的默认值设置 */
 | 
				
			||||||
				if (item.type === 'select') {
 | 
									if (item.type === 'select') {
 | 
				
			||||||
					const opts = item.options || []
 | 
										const opts = item.options || []
 | 
				
			||||||
					const dft = opts.find(item => item.default || false)
 | 
										const dft = opts.find((item) => item.default || false)
 | 
				
			||||||
					if (dft) {
 | 
										if (dft) {
 | 
				
			||||||
						this.$set(this.dataForm, [item.name], dft.value)
 | 
											this.$set(this.dataForm, [item.name], dft.value)
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
@@ -261,11 +267,27 @@ export default {
 | 
				
			|||||||
					})
 | 
										})
 | 
				
			||||||
				} // end if (item.api)
 | 
									} // end if (item.api)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									// 如果有 relatedField,就需要在当前item的数据加载后,刷新 relatedField 的列表
 | 
				
			||||||
 | 
									if (item.relatedField) {
 | 
				
			||||||
 | 
										this.$watch(
 | 
				
			||||||
 | 
											function () {
 | 
				
			||||||
 | 
												return this.dataForm[item.name]
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											function (val, old) {
 | 
				
			||||||
 | 
												if (val && val !== old) {
 | 
				
			||||||
 | 
													this.$emit('select-change', { name: item.name, id: val })
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											},
 | 
				
			||||||
 | 
											{ deep: true, immediate: true }
 | 
				
			||||||
 | 
										)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if (item.required) {
 | 
									if (item.required) {
 | 
				
			||||||
					const requiredRule = {
 | 
										const requiredRule = {
 | 
				
			||||||
						required: true,
 | 
											required: true,
 | 
				
			||||||
						message: i18n.t('validate.required'),
 | 
											message: i18n.t('validate.required'),
 | 
				
			||||||
						trigger: 'change'
 | 
											// trigger: 'change'
 | 
				
			||||||
 | 
											trigger: 'blur'
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					/** 检查是否已经存在该字段的规则 */
 | 
										/** 检查是否已经存在该字段的规则 */
 | 
				
			||||||
					const exists = this.dataFormRules[item.name] || null
 | 
										const exists = this.dataFormRules[item.name] || null
 | 
				
			||||||
@@ -307,8 +329,9 @@ export default {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
			/** 检查是否需要额外的组件 */
 | 
								/** 检查是否需要额外的组件 */
 | 
				
			||||||
			this.configs.extraComponents &&
 | 
								this.configs.extraComponents &&
 | 
				
			||||||
				this.configs.extraComponents.forEach(item => {
 | 
									this.configs.extraComponents.forEach((item) => {
 | 
				
			||||||
					if (Object.hasOwn(this.dataForm, [item.name])) {
 | 
										// if (Object.hasOwn(this.dataForm, [item.name])) {
 | 
				
			||||||
 | 
										if (this.dataForm.hasOwnProperty(item.name)) {
 | 
				
			||||||
						return
 | 
											return
 | 
				
			||||||
					} else {
 | 
										} else {
 | 
				
			||||||
						this.$set(this.dataForm, [item.name], calDefault(item.fieldType))
 | 
											this.$set(this.dataForm, [item.name], calDefault(item.fieldType))
 | 
				
			||||||
@@ -335,6 +358,11 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		getPlaceholder(n, c) {
 | 
							getPlaceholder(n, c) {
 | 
				
			||||||
 | 
								if (this.isDetail) {
 | 
				
			||||||
 | 
									/** 如果是详情,就不展示 提示文本 */
 | 
				
			||||||
 | 
									return ''
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
 | 
								const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
 | 
				
			||||||
			if (opt) {
 | 
								if (opt) {
 | 
				
			||||||
				// if opt is valid
 | 
									// if opt is valid
 | 
				
			||||||
@@ -383,18 +411,20 @@ export default {
 | 
				
			|||||||
					}).then(({ data: res }) => {
 | 
										}).then(({ data: res }) => {
 | 
				
			||||||
						if (res && res.code === 0) {
 | 
											if (res && res.code === 0) {
 | 
				
			||||||
							const dataFormKeys = Object.keys(this.dataForm)
 | 
												const dataFormKeys = Object.keys(this.dataForm)
 | 
				
			||||||
 | 
												console.log('keys ===> ', dataFormKeys)
 | 
				
			||||||
							// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
 | 
												// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
 | 
				
			||||||
							this.dataForm = pick(res.data, dataFormKeys)
 | 
												this.dataForm = __pick(res.data, dataFormKeys)
 | 
				
			||||||
 | 
												console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys))
 | 
				
			||||||
							// LABEL: FILE_RELATED
 | 
												// LABEL: FILE_RELATED
 | 
				
			||||||
							/** 对文件下载进行分流 */
 | 
												/** 对文件下载进行分流 */
 | 
				
			||||||
							this.fileList = {}
 | 
												this.fileList = {}
 | 
				
			||||||
							if (this.dataForm.files) {
 | 
												if (this.dataForm.files) {
 | 
				
			||||||
								// console.log('files: ', 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()
 | 
														// const fileName = file.fileUrl.split('/').pop()
 | 
				
			||||||
									/** [1] 处理 fileList */
 | 
														/** [1] 处理 fileList */
 | 
				
			||||||
									if (Object.hasOwn(this.fileList, file.typeCode)) {
 | 
														// if (Object.hasOwn(this.fileList, file.typeCode)) {
 | 
				
			||||||
 | 
														if (this.fileList.hasOwnProperty(file.typeCode)) {
 | 
				
			||||||
										/** 已存在 */
 | 
															/** 已存在 */
 | 
				
			||||||
										// this.fileList[file.typeCode].push({ id: file.id, name: fileName, typeCode: file.typeCode })
 | 
															// this.fileList[file.typeCode].push({ id: file.id, name: fileName, typeCode: file.typeCode })
 | 
				
			||||||
										this.fileList[file.typeCode].push(file)
 | 
															this.fileList[file.typeCode].push(file)
 | 
				
			||||||
@@ -404,7 +434,8 @@ export default {
 | 
				
			|||||||
									}
 | 
														}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
									/** [2] 处理 fileForm */
 | 
														/** [2] 处理 fileForm */
 | 
				
			||||||
									if (Object.hasOwn(this.fileForm, file.typeCode)) {
 | 
														// if (Object.hasOwn(this.fileForm, file.typeCode)) {
 | 
				
			||||||
 | 
														if (this.fileForm.hasOwnProperty(file.typeCode)) {
 | 
				
			||||||
										this.fileForm[file.typeCode].push(file.id)
 | 
															this.fileForm[file.typeCode].push(file.id)
 | 
				
			||||||
									} else {
 | 
														} else {
 | 
				
			||||||
										this.fileForm[file.typeCode] = [file.id]
 | 
															this.fileForm[file.typeCode] = [file.id]
 | 
				
			||||||
@@ -419,18 +450,24 @@ export default {
 | 
				
			|||||||
						this.shouldWait.then(() => {
 | 
											this.shouldWait.then(() => {
 | 
				
			||||||
							if (this.tempForm.length) {
 | 
												if (this.tempForm.length) {
 | 
				
			||||||
								// console.log('create new, tempform', JSON.stringify(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)
 | 
														// console.log('item data', item.data)
 | 
				
			||||||
									this.dataForm[item.name] = item.data
 | 
														this.dataForm[item.name] = item.data
 | 
				
			||||||
								})
 | 
													})
 | 
				
			||||||
								// console.log('create new, dataform', JSON.stringify(this.dataForm))
 | 
													// console.log('create new, dataform', JSON.stringify(this.dataForm))
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
 | 
												this.shouldWait = null
 | 
				
			||||||
						})
 | 
											})
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		emitSelectChange(name, id) {
 | 
							emitSelectChange(name, id) {
 | 
				
			||||||
 | 
								// console.log(id)
 | 
				
			||||||
 | 
								const currentField = this.configs.fields.find((item) => item.name === name)
 | 
				
			||||||
 | 
								if (currentField.relatedField) {
 | 
				
			||||||
 | 
									this.dataForm[currentField.relatedField] = null
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			this.$emit('select-change', { name, id })
 | 
								this.$emit('select-change', { name, id })
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -439,7 +476,7 @@ export default {
 | 
				
			|||||||
		handleClick(btn) {
 | 
							handleClick(btn) {
 | 
				
			||||||
			/** 提取url */
 | 
								/** 提取url */
 | 
				
			||||||
			const urls = {}
 | 
								const urls = {}
 | 
				
			||||||
			this.configs.operations.map(item => {
 | 
								this.configs.operations.map((item) => {
 | 
				
			||||||
				urls[item.name] = {}
 | 
									urls[item.name] = {}
 | 
				
			||||||
				urls[item.name].url = item.url
 | 
									urls[item.name].url = item.url
 | 
				
			||||||
				urls[item.name].extraFields = item.extraFields || {}
 | 
									urls[item.name].extraFields = item.extraFields || {}
 | 
				
			||||||
@@ -447,9 +484,18 @@ export default {
 | 
				
			|||||||
			/** 操作 */
 | 
								/** 操作 */
 | 
				
			||||||
			switch (btn.name) {
 | 
								switch (btn.name) {
 | 
				
			||||||
				case 'save':
 | 
									case 'save':
 | 
				
			||||||
 | 
										this.isDisabled = true
 | 
				
			||||||
 | 
										setTimeout(() => {
 | 
				
			||||||
 | 
											this.isDisabled = false
 | 
				
			||||||
 | 
										}, 3000)
 | 
				
			||||||
				case 'update':
 | 
									case 'update':
 | 
				
			||||||
 | 
										this.isDisabled = true
 | 
				
			||||||
 | 
										setTimeout(() => {
 | 
				
			||||||
 | 
											this.isDisabled = false
 | 
				
			||||||
 | 
										}, 3000)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					/** 需要验证表单的操作 */
 | 
										/** 需要验证表单的操作 */
 | 
				
			||||||
					this.$refs['dataForm'].validate(valid => {
 | 
										this.$refs['dataForm'].validate((valid) => {
 | 
				
			||||||
						if (valid) {
 | 
											if (valid) {
 | 
				
			||||||
							/** 对于文件上传的单独处理(合并处理) */
 | 
												/** 对于文件上传的单独处理(合并处理) */
 | 
				
			||||||
							if (Object.keys(this.fileForm).length) {
 | 
												if (Object.keys(this.fileForm).length) {
 | 
				
			||||||
@@ -465,7 +511,7 @@ export default {
 | 
				
			|||||||
								this.$set(this.dataForm, 'fileIds', fileIds)
 | 
													this.$set(this.dataForm, 'fileIds', fileIds)
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							// console.log('before send: ', this.dataForm)
 | 
												console.log('before send: ', this.dataForm)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							this.$http({
 | 
												this.$http({
 | 
				
			||||||
								url: this.$http.adornUrl(urls[btn.name].url),
 | 
													url: this.$http.adornUrl(urls[btn.name].url),
 | 
				
			||||||
@@ -488,7 +534,7 @@ export default {
 | 
				
			|||||||
										this.$message.error(res.msg)
 | 
															this.$message.error(res.msg)
 | 
				
			||||||
									}
 | 
														}
 | 
				
			||||||
								})
 | 
													})
 | 
				
			||||||
								.catch(err => {
 | 
													.catch((err) => {
 | 
				
			||||||
									this.$message({
 | 
														this.$message({
 | 
				
			||||||
										message: err,
 | 
															message: err,
 | 
				
			||||||
										type: 'error',
 | 
															type: 'error',
 | 
				
			||||||
@@ -510,7 +556,7 @@ export default {
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
					break
 | 
										break
 | 
				
			||||||
				case 'cancel':
 | 
									case 'cancel':
 | 
				
			||||||
					this.visible = false
 | 
										this.handleClose()
 | 
				
			||||||
				// add more..
 | 
									// add more..
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -532,7 +578,7 @@ export default {
 | 
				
			|||||||
			this.$set(
 | 
								this.$set(
 | 
				
			||||||
				this.fileForm,
 | 
									this.fileForm,
 | 
				
			||||||
				typeCode,
 | 
									typeCode,
 | 
				
			||||||
				filelist.map(item => item.id)
 | 
									filelist.map((item) => item.id)
 | 
				
			||||||
			)
 | 
								)
 | 
				
			||||||
			// console.log('after handleUploadListUpdate(): ', this.fileForm)
 | 
								// 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'
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
@@ -19,7 +27,8 @@ export default {
 | 
				
			|||||||
      colors: {
 | 
					      colors: {
 | 
				
			||||||
        delete: '#FF5454',
 | 
					        delete: '#FF5454',
 | 
				
			||||||
        preview: '#f09843',
 | 
					        preview: '#f09843',
 | 
				
			||||||
        design: '#99089f',
 | 
					        design: '#0b58ff',
 | 
				
			||||||
 | 
					        edit: '#0b58ff'
 | 
				
			||||||
        // 'view-trend': 'red'
 | 
					        // 'view-trend': 'red'
 | 
				
			||||||
        // add more...
 | 
					        // add more...
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
@@ -57,7 +66,8 @@ export default {
 | 
				
			|||||||
    for (const optionStr of this.injectData.head?.options) {
 | 
					    for (const optionStr of this.injectData.head?.options) {
 | 
				
			||||||
      const optObj = typeof optionStr === 'object'
 | 
					      const optObj = typeof optionStr === 'object'
 | 
				
			||||||
      // btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr))
 | 
					      // 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)
 | 
					    return h('span', null, btns)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,25 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Descripttion: 
 | 
				
			||||||
 | 
					 * @version: 
 | 
				
			||||||
 | 
					 * @Author: fzq
 | 
				
			||||||
 | 
					 * @Date: 2022-11-25 09:51:46
 | 
				
			||||||
 | 
					 * @LastEditors: fzq
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-02-09 10:17:22
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
 | 
					<!-- 数字代表多级表头最小列宽 -->
 | 
				
			||||||
 | 
					<!-- :width="opt.width || null" -->
 | 
				
			||||||
 | 
					<!-- :width="flexColumnWidth(opt.prop || null)" -->
 | 
				
			||||||
 | 
					<!-- header-align="center" align="center" -->
 | 
				
			||||||
 | 
					<!-- :min-width="opt.minWidth || null" -->
 | 
				
			||||||
	<el-table-column
 | 
						<el-table-column
 | 
				
			||||||
		:label="opt.label ? opt.label : opt.name"
 | 
							:label="opt.label ? opt.label : opt.name"
 | 
				
			||||||
		:prop="opt.prop || null"
 | 
							:prop="opt.prop || null"
 | 
				
			||||||
		:width="opt.width || null"
 | 
							:min-width="[$route.fullPath == '/monitoring-realtimeQualityInspection' ? 170 : (opt.minWidth || null)]"
 | 
				
			||||||
		:min-width="opt.minWidth || null"
 | 
					 | 
				
			||||||
		:fixed="opt.fixed || null"
 | 
							:fixed="opt.fixed || null"
 | 
				
			||||||
		:show-overflow-tooltip="opt.showOverflowTooltip || false"
 | 
							:show-overflow-tooltip="opt.showOverflowTooltip || false"
 | 
				
			||||||
		filter-placement="top"
 | 
							filter-placement="top"
 | 
				
			||||||
		:align="opt.align || null"
 | 
							:align="opt.align || 'center'"
 | 
				
			||||||
		v-bind="opt.more"
 | 
							v-bind="opt.more"
 | 
				
			||||||
	>
 | 
						>
 | 
				
			||||||
		<template v-if="opt.prop" slot-scope="scope">
 | 
							<template v-if="opt.prop" slot-scope="scope">
 | 
				
			||||||
@@ -35,6 +47,33 @@ export default {
 | 
				
			|||||||
			type: Object,
 | 
								type: Object,
 | 
				
			||||||
			default: () => ({})
 | 
								default: () => ({})
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							// 自定义表头列宽
 | 
				
			||||||
 | 
					        flexColumnWidth(str) {
 | 
				
			||||||
 | 
					          let flexWidth = 0
 | 
				
			||||||
 | 
					          for (const char of str) {
 | 
				
			||||||
 | 
					            if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
 | 
				
			||||||
 | 
					              // 如果是英文字符,为字符分配8个单位宽度
 | 
				
			||||||
 | 
					              flexWidth += 8
 | 
				
			||||||
 | 
					            } else if (char >= '\u4e00' && char <= '\u9fa5') {
 | 
				
			||||||
 | 
					              // 如果是中文字符,为字符分配20个单位宽度
 | 
				
			||||||
 | 
					              flexWidth += 20
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					              // 其他种类字符,为字符分配5个单位宽度
 | 
				
			||||||
 | 
					              flexWidth += 5
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        //   if (flexWidth < 50) {
 | 
				
			||||||
 | 
					        //     // 设置最小宽度
 | 
				
			||||||
 | 
					        //     flexWidth = 50
 | 
				
			||||||
 | 
					        //   }
 | 
				
			||||||
 | 
					          if (flexWidth > 250) {
 | 
				
			||||||
 | 
					            // 设置最大宽度
 | 
				
			||||||
 | 
					            flexWidth = 250
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          return flexWidth + 'px'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,42 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="base-table">
 | 
						<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
 | 
							<el-table
 | 
				
			||||||
			:data="data"
 | 
								:data="renderData"
 | 
				
			||||||
			style="width: 100%"
 | 
								style="width: 100%"
 | 
				
			||||||
			fit
 | 
								fit
 | 
				
			||||||
			border
 | 
								highlight-current-row
 | 
				
			||||||
			:header-cell-style="{ background: '#FAFAFA', color: '#606266', height: '40px' }"
 | 
								:header-cell-style="{ background: '#FAFAFA', color: '#000', height: '40px' }"
 | 
				
			||||||
			:max-height="maxHeight"
 | 
								:max-height="maxHeight"
 | 
				
			||||||
			:span-method="spanMethod || null"
 | 
								: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的表头 -->
 | 
									<!-- 带type的表头 -->
 | 
				
			||||||
				<el-table-column
 | 
									<el-table-column
 | 
				
			||||||
					:key="idx"
 | 
										:key="idx"
 | 
				
			||||||
@@ -20,12 +46,17 @@
 | 
				
			|||||||
					:header-align="head.align || 'center'"
 | 
										:header-align="head.align || 'center'"
 | 
				
			||||||
					:align="head.align || 'center'"
 | 
										:align="head.align || 'center'"
 | 
				
			||||||
					:width="head.width || 50"
 | 
										:width="head.width || 50"
 | 
				
			||||||
					:index="head.type === 'index' ? val => {
 | 
										:index="
 | 
				
			||||||
						return val + 1 + (page - 1) * size
 | 
											head.type === 'index'
 | 
				
			||||||
					} : null"
 | 
												? (val) => {
 | 
				
			||||||
					v-bind="head.more"
 | 
														return val + 1 + (page - 1) * size
 | 
				
			||||||
				></el-table-column>
 | 
												  }
 | 
				
			||||||
 | 
												: null
 | 
				
			||||||
 | 
										"
 | 
				
			||||||
 | 
										v-bind="head.more"></el-table-column>
 | 
				
			||||||
				<!-- 普通的表头 -->
 | 
									<!-- 普通的表头 -->
 | 
				
			||||||
 | 
									<!-- :align="head.align || null" 表头居中 -->
 | 
				
			||||||
 | 
									<!-- :min-width="head.minWidth || null" -->
 | 
				
			||||||
				<el-table-column
 | 
									<el-table-column
 | 
				
			||||||
					v-else
 | 
										v-else
 | 
				
			||||||
					:key="idx + 'else'"
 | 
										:key="idx + 'else'"
 | 
				
			||||||
@@ -37,10 +68,9 @@
 | 
				
			|||||||
					:show-overflow-tooltip="head.showOverflowTooltip || true"
 | 
										:show-overflow-tooltip="head.showOverflowTooltip || true"
 | 
				
			||||||
					:tooltip-effect="head.tooltipEffect || 'light'"
 | 
										:tooltip-effect="head.tooltipEffect || 'light'"
 | 
				
			||||||
					filter-placement="top"
 | 
										filter-placement="top"
 | 
				
			||||||
					:align="head.align || null"
 | 
										:align="head.align || 'center'"
 | 
				
			||||||
					v-bind="head.more"
 | 
										v-bind="head.more">
 | 
				
			||||||
				>
 | 
										<!-- 子组件 编辑/删除 -->
 | 
				
			||||||
					<!-- 子组件 -->
 | 
					 | 
				
			||||||
					<template v-if="head.prop" slot-scope="scope">
 | 
										<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" />
 | 
											<component v-if="head.subcomponent" :is="head.subcomponent" :key="idx + 'sub'" :inject-data="{ ...scope.row, head }" @emit-data="handleSubEmitData" />
 | 
				
			||||||
						<!-- 直接展示数据或应用过滤器 -->
 | 
											<!-- 直接展示数据或应用过滤器 -->
 | 
				
			||||||
@@ -49,7 +79,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
					<!-- 多级表头 -->
 | 
										<!-- 多级表头 -->
 | 
				
			||||||
					<template v-if="!head.prop && head.children">
 | 
										<template v-if="!head.prop && head.children">
 | 
				
			||||||
						<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead" />
 | 
											<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead"/>
 | 
				
			||||||
					</template>
 | 
										</template>
 | 
				
			||||||
				</el-table-column>
 | 
									</el-table-column>
 | 
				
			||||||
			</template>
 | 
								</template>
 | 
				
			||||||
@@ -58,13 +88,21 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					import { isObject, isString } from 'lodash'
 | 
				
			||||||
import TableHead from './components/table-head.vue'
 | 
					import TableHead from './components/table-head.vue'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
	name: 'BaseTable',
 | 
						name: 'BaseTable',
 | 
				
			||||||
 | 
						filters: {
 | 
				
			||||||
 | 
							commonFilter: (source, filterType = (a) => a) => {
 | 
				
			||||||
 | 
								return filterType(source)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	props: {
 | 
						props: {
 | 
				
			||||||
		tableHeadConfigs: {
 | 
							tableHeadConfigs: {
 | 
				
			||||||
			type: Array,
 | 
								type: Array,
 | 
				
			||||||
			default: () => []
 | 
								default: () => []
 | 
				
			||||||
 | 
								// required: true,
 | 
				
			||||||
 | 
								// validator: val => val.filter(item => !isString(item.prop) || !isString(item.name)).length === 0
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		data: {
 | 
							data: {
 | 
				
			||||||
			type: Array,
 | 
								type: Array,
 | 
				
			||||||
@@ -72,7 +110,10 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		maxHeight: {
 | 
							maxHeight: {
 | 
				
			||||||
			type: Number,
 | 
								type: Number,
 | 
				
			||||||
			default: 500
 | 
								// default: window.innerHeight - 325
 | 
				
			||||||
 | 
								// el-table高度
 | 
				
			||||||
 | 
								default: window.innerHeight - 100
 | 
				
			||||||
 | 
								// default: 500
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		spanMethod: {
 | 
							spanMethod: {
 | 
				
			||||||
			type: Function,
 | 
								type: Function,
 | 
				
			||||||
@@ -88,21 +129,92 @@ export default {
 | 
				
			|||||||
		size: {
 | 
							size: {
 | 
				
			||||||
			type: Number,
 | 
								type: Number,
 | 
				
			||||||
			default: 10
 | 
								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: {
 | 
						filters: {
 | 
				
			||||||
		commonFilter: (source, filterType = a => a) => {
 | 
							commonFilter: (source, filterType = (a) => a) => {
 | 
				
			||||||
			return filterType(source)
 | 
								return filterType(source)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	data() {
 | 
						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: {
 | 
						methods: {
 | 
				
			||||||
		handleSubEmitData(payload) {
 | 
							handleSubEmitData(payload) {
 | 
				
			||||||
			this.$emit('operate-event', payload)
 | 
								this.$emit('operate-event', payload)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							clickTopButton(val) {
 | 
				
			||||||
 | 
								this.$emit('clickTopBtn', val)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	components: { TableHead }
 | 
						components: { TableHead }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,14 +58,14 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		this.$watch('uploaderInjectFileList', function(val) {
 | 
							this.$watch('uploaderInjectFileList', function(val) {
 | 
				
			||||||
			if (val && val.length) {
 | 
								if (val && val.length) {
 | 
				
			||||||
				console.log('this.uploaderInjectFileList', this.uploaderInjectFileList)
 | 
									// console.log('this.uploaderInjectFileList', this.uploaderInjectFileList)
 | 
				
			||||||
				/** uploaderInjectFileList 里关于文件的信息比较全,需要手动过滤一下 */
 | 
									/** uploaderInjectFileList 里关于文件的信息比较全,需要手动过滤一下 */
 | 
				
			||||||
				this.fileList = val.map(item => {
 | 
									this.fileList = val.map(item => {
 | 
				
			||||||
					const name = item.fileUrl.split('/').pop()
 | 
										const name = item.fileUrl.split('/').pop()
 | 
				
			||||||
					return { ...pick(item, ['id', 'fileName', 'typeCode']), name }
 | 
										return { ...pick(item, ['id', 'fileName', 'typeCode']), name }
 | 
				
			||||||
				})
 | 
									})
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			console.log('fillist: ', this.fileList)
 | 
								// console.log('fillist: ', this.fileList)
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// if (this.parentDataForm) {
 | 
							// if (this.parentDataForm) {
 | 
				
			||||||
@@ -111,7 +111,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		/** 图片验证,由配置文件开启 */
 | 
							/** 图片验证,由配置文件开启 */
 | 
				
			||||||
		validateImage(file) {
 | 
							validateImage(file) {
 | 
				
			||||||
			console.log('[*] 验证图片')
 | 
								// console.log('[*] 验证图片')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			const isRightSize = file.size / 1024 / 1024 < 2
 | 
								const isRightSize = file.size / 1024 / 1024 < 2
 | 
				
			||||||
			if (!isRightSize) {
 | 
								if (!isRightSize) {
 | 
				
			||||||
@@ -146,10 +146,10 @@ export default {
 | 
				
			|||||||
				responseType: 'blob'
 | 
									responseType: 'blob'
 | 
				
			||||||
			}).then(({ data: res }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				const blob = new Blob([res])
 | 
									const blob = new Blob([res])
 | 
				
			||||||
				console.log('blob', blob)
 | 
									// console.log('blob', blob)
 | 
				
			||||||
				if ('download' in document.createElement('a')) {
 | 
									if ('download' in document.createElement('a')) {
 | 
				
			||||||
					const alink = document.createElement('a')
 | 
										const alink = document.createElement('a')
 | 
				
			||||||
					console.log('filename: ', fileName)
 | 
										// console.log('filename: ', fileName)
 | 
				
			||||||
					alink.download = fileName
 | 
										alink.download = fileName
 | 
				
			||||||
					alink.style.display = 'none'
 | 
										alink.style.display = 'none'
 | 
				
			||||||
					alink.target = '_blank'
 | 
										alink.target = '_blank'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: lb
 | 
					 * @Author: lb
 | 
				
			||||||
 * @Date: 2022-05-18 16:00:00
 | 
					 * @Date: 2022-05-18 16:00:00
 | 
				
			||||||
 * @LastEditors: lb
 | 
					 * @LastEditors: fzq
 | 
				
			||||||
 * @LastEditTime: 2022-05-18 16:00:00
 | 
					 * @LastEditTime: 2023-01-03 10:00:06
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -45,18 +45,19 @@ $mgr: 6px;
 | 
				
			|||||||
		line-height: $height;
 | 
							line-height: $height;
 | 
				
			||||||
		color: #000;
 | 
							color: #000;
 | 
				
			||||||
		font-weight: 500;
 | 
							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 {
 | 
							&::before {
 | 
				
			||||||
			content: '';
 | 
								content: '';
 | 
				
			||||||
			display: inline-block;
 | 
								display: inline-block;
 | 
				
			||||||
			vertical-align: top;
 | 
								vertical-align: top;
 | 
				
			||||||
			width: 4px;
 | 
								width: 4px;
 | 
				
			||||||
			height: $height + 2px;
 | 
								height: $height;
 | 
				
			||||||
			border-radius: 1px;
 | 
								border-radius: 1px;
 | 
				
			||||||
			margin-right: $mgr; 
 | 
								margin-right: $mgr; 
 | 
				
			||||||
			// background-color: #0b58ff;
 | 
								// background-color: #0b58ff;#409EFF;
 | 
				
			||||||
			background-color: #409EFF;
 | 
								background-color: #0b58ff;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,9 @@ $--color-transition-base: color .2s cubic-bezier(.645,.045,.355,1) !default;
 | 
				
			|||||||
/* Color
 | 
					/* Color
 | 
				
			||||||
-------------------------- */
 | 
					-------------------------- */
 | 
				
			||||||
/// color|1|Brand Color|0
 | 
					/// color|1|Brand Color|0
 | 
				
			||||||
$--color-primary: #409EFF !default;
 | 
					// $--color-primary: #409EFF !default;
 | 
				
			||||||
 | 
					// 左上标题背景颜色
 | 
				
			||||||
 | 
					$--color-primary: #001529 !default;
 | 
				
			||||||
/// color|1|Background Color|4
 | 
					/// color|1|Background Color|4
 | 
				
			||||||
$--color-white: #FFFFFF !default;
 | 
					$--color-white: #FFFFFF !default;
 | 
				
			||||||
/// color|1|Background Color|4
 | 
					/// 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-info-lighter: mix($--color-white, $--color-info, 90%) !default;
 | 
				
			||||||
/// color|1|Font Color|2
 | 
					/// color|1|Font Color|2
 | 
				
			||||||
$--color-text-primary: #303133 !default;
 | 
					$--color-text-primary: #303133 !default;
 | 
				
			||||||
 | 
					$--color-text-home: #fff !default;
 | 
				
			||||||
/// color|1|Font Color|2
 | 
					/// color|1|Font Color|2
 | 
				
			||||||
$--color-text-regular: #606266 !default;
 | 
					$--color-text-regular: #606266 !default;
 | 
				
			||||||
/// color|1|Font Color|2
 | 
					/// color|1|Font Color|2
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										292
									
								
								src/i18n/en.js
									
									
									
									
									
								
							
							
						
						@@ -4,8 +4,9 @@ t.loading = 'Loading...'
 | 
				
			|||||||
t.createTime = 'Create Time'
 | 
					t.createTime = 'Create Time'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.brand = {}
 | 
					t.brand = {}
 | 
				
			||||||
t.brand.lg = 'Monitoring System'
 | 
					t.brand.lg = 'SCADA Platform'
 | 
				
			||||||
t.brand.mini = 'PMS'
 | 
					t.brand.mini = 'SCADA'
 | 
				
			||||||
 | 
					t.brand.home = 'Home'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.routes = {}
 | 
					t.routes = {}
 | 
				
			||||||
t.routes['产品池'] = 'Products Pool'
 | 
					t.routes['产品池'] = 'Products Pool'
 | 
				
			||||||
@@ -24,17 +25,20 @@ t.routes['厂务'] = 'Factory Affair'
 | 
				
			|||||||
t.routes['设备'] = 'Equipment'
 | 
					t.routes['设备'] = 'Equipment'
 | 
				
			||||||
t.routes['字典管理'] = 'Dict Management'
 | 
					t.routes['字典管理'] = 'Dict Management'
 | 
				
			||||||
t.routes['PLC信息'] = 'PLC'
 | 
					t.routes['PLC信息'] = 'PLC'
 | 
				
			||||||
t.routes['设备与PLC关联配置'] = 'Relations between plc & equipments'
 | 
					// Relations between
 | 
				
			||||||
t.routes['设备生产实时数据'] = 'Realtime Equipment Data'
 | 
					t.routes['设备与PLC关联配置'] = 'PLC & Equipments'
 | 
				
			||||||
t.routes['产线生产实时数据'] = 'Realtime Productline Data'
 | 
					t.routes['近24小时设备生产数据'] = 'Equipment Data'
 | 
				
			||||||
t.routes['质量检查实时数据'] = 'Realtime Quality Inspection Data'
 | 
					t.routes['近24小时产线生产数据'] = 'Productline Data'
 | 
				
			||||||
 | 
					t.routes['近24小时质量检查数据'] = 'Quality Inspection Data'
 | 
				
			||||||
t.routes['报表总览'] = 'Report Overview'
 | 
					t.routes['报表总览'] = 'Report Overview'
 | 
				
			||||||
t.routes['报表分类'] = 'Report Types'
 | 
					t.routes['报表分类'] = 'Report Types'
 | 
				
			||||||
t.routes['报表详情'] = 'Report Detail'
 | 
					t.routes['报表详情'] = 'Report Detail'
 | 
				
			||||||
t.routes['报表设计'] = 'Report Design'
 | 
					t.routes['报表设计'] = 'Report Design'
 | 
				
			||||||
t.routes['报表预览'] = 'Report Preview'
 | 
					t.routes['报表预览'] = 'Report Preview'
 | 
				
			||||||
t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data'
 | 
					// Quality
 | 
				
			||||||
 | 
					t.routes['质量检测基础数据'] = 'Inspection Basic Data'
 | 
				
			||||||
t.routes['当前检测数据'] = 'Current Inspection Data'
 | 
					t.routes['当前检测数据'] = 'Current Inspection Data'
 | 
				
			||||||
 | 
					t.routes['检测统计数据'] = 'Statistics Data'
 | 
				
			||||||
t.routes['质量检查信息记录'] = 'Quality Inspection Records'
 | 
					t.routes['质量检查信息记录'] = 'Quality Inspection Records'
 | 
				
			||||||
t.routes['用户管理'] = 'User Management'
 | 
					t.routes['用户管理'] = 'User Management'
 | 
				
			||||||
t.routes['部门管理'] = 'Department Management'
 | 
					t.routes['部门管理'] = 'Department Management'
 | 
				
			||||||
@@ -44,10 +48,14 @@ t.routes['参数管理'] = 'Params Management'
 | 
				
			|||||||
t.routes['定时任务'] = 'Timed Tasks'
 | 
					t.routes['定时任务'] = 'Timed Tasks'
 | 
				
			||||||
t.routes['文件上传'] = 'File Upload'
 | 
					t.routes['文件上传'] = 'File Upload'
 | 
				
			||||||
t.routes['登录日志'] = 'Login Records'
 | 
					t.routes['登录日志'] = 'Login Records'
 | 
				
			||||||
t.routes['操作日志'] = 'Oprations Records'
 | 
					t.routes['操作日志'] = 'Operations Records'
 | 
				
			||||||
t.routes['设备效率分析'] = 'Equipment Efficiency Analysis'
 | 
					t.routes['设备效率分析'] = 'EQU Efficiency Analysis'
 | 
				
			||||||
t.routes['设备异常分析'] = 'Equipment Exceptions Analysis'
 | 
					t.routes['设备异常分析'] = 'EQU Exceptions Analysis'
 | 
				
			||||||
t.routes['设备状态时序图'] = 'Equipment Status Timesequence'
 | 
					t.routes['设备状态时序图'] = 'EQU Status Timeseq'
 | 
				
			||||||
 | 
					t.routes['产品质量分析'] = 'Product Quality Analysis'
 | 
				
			||||||
 | 
					t.routes['产量分析'] = 'Product Analysis'
 | 
				
			||||||
 | 
					t.routes['生产节拍时序图'] = 'Product Beat Timeseq'
 | 
				
			||||||
 | 
					t.routes['设备产量时序图'] = 'EQU Product Timeseq'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 三级
 | 
					// 三级
 | 
				
			||||||
t.routes['工厂'] = 'Factory'
 | 
					t.routes['工厂'] = 'Factory'
 | 
				
			||||||
@@ -61,8 +69,17 @@ t.routes['设备分组报警信息'] = 'Equipment Group Alarm'
 | 
				
			|||||||
t.routes['设备历史参数'] = 'Equipment Historical Parameters'
 | 
					t.routes['设备历史参数'] = 'Equipment Historical Parameters'
 | 
				
			||||||
t.routes['质量检测类型'] = 'Quality Inpection Types'
 | 
					t.routes['质量检测类型'] = 'Quality Inpection Types'
 | 
				
			||||||
t.routes['质量检测信息'] = 'Quality Inpection Details'
 | 
					t.routes['质量检测信息'] = 'Quality Inpection Details'
 | 
				
			||||||
 | 
					t.routes['安灯检测盒'] = 'Andeng inspection box'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.andeng = {}
 | 
				
			||||||
 | 
					t.andeng.inspectContent = 'Inspection Content'
 | 
				
			||||||
 | 
					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.save = 'Save'
 | 
				
			||||||
t.add = 'Add'
 | 
					t.add = 'Add'
 | 
				
			||||||
t.delete = 'Delete'
 | 
					t.delete = 'Delete'
 | 
				
			||||||
@@ -92,12 +109,12 @@ t.updatorName = 'Updator\'s name'
 | 
				
			|||||||
t.updateTime = 'Update Time'
 | 
					t.updateTime = 'Update Time'
 | 
				
			||||||
t.version = 'Version'
 | 
					t.version = 'Version'
 | 
				
			||||||
t.search = 'Search'
 | 
					t.search = 'Search'
 | 
				
			||||||
t.countPerPage = '每页数' // ?
 | 
					t.countPerPage = 'Per Page' // ?
 | 
				
			||||||
t.currentPage = '当前页' // ?
 | 
					t.currentPage = 'Current Page' // ?
 | 
				
			||||||
t.fetchList = '获取数据列表' // ?
 | 
					t.fetchList = 'Fetch Data List' // ?
 | 
				
			||||||
t.multi = '多选' // ?
 | 
					t.multi = 'Multiple Selection' // ?
 | 
				
			||||||
t.do = '进行' // ?
 | 
					t.do = 'Proceed' // ?
 | 
				
			||||||
t.submit = '表单提交' // ?
 | 
					t.submit = 'Submit' // ?
 | 
				
			||||||
t.desc = 'Description'
 | 
					t.desc = 'Description'
 | 
				
			||||||
t.disable = 'Disable'
 | 
					t.disable = 'Disable'
 | 
				
			||||||
t.equipment = 'Equipment'
 | 
					t.equipment = 'Equipment'
 | 
				
			||||||
@@ -106,7 +123,7 @@ t.cannotempty = 'can\'t be empty'
 | 
				
			|||||||
t.parameter = 'Parameters'
 | 
					t.parameter = 'Parameters'
 | 
				
			||||||
t.enable = 'Enable'
 | 
					t.enable = 'Enable'
 | 
				
			||||||
t.index = 'Index'
 | 
					t.index = 'Index'
 | 
				
			||||||
t.relation = '关联'
 | 
					t.relation = 'Relation'
 | 
				
			||||||
t.fetchInfo = 'Fetch Info'
 | 
					t.fetchInfo = 'Fetch Info'
 | 
				
			||||||
t.name = 'Name'
 | 
					t.name = 'Name'
 | 
				
			||||||
t.code = 'Code'
 | 
					t.code = 'Code'
 | 
				
			||||||
@@ -127,11 +144,25 @@ t.min = 'Min Value'
 | 
				
			|||||||
t.max = 'Max Value'
 | 
					t.max = 'Max Value'
 | 
				
			||||||
t.status = 'Status'
 | 
					t.status = 'Status'
 | 
				
			||||||
t.normal = 'Normal'
 | 
					t.normal = 'Normal'
 | 
				
			||||||
 | 
					t.shutdown = 'Shut Down'
 | 
				
			||||||
 | 
					t.malfunction = 'Malfunction' // ?
 | 
				
			||||||
 | 
					t.diagram = 'Device Status Sequence Diagram'
 | 
				
			||||||
 | 
					t.diagram2 = 'Device Product Sequence Diagram'
 | 
				
			||||||
t.addr = 'Address'
 | 
					t.addr = 'Address'
 | 
				
			||||||
t.planStop = 'Plan to stop'
 | 
					t.planStop = 'Plan to stop'
 | 
				
			||||||
t.startTime = 'Start Time'
 | 
					t.startTime = 'Start Time'
 | 
				
			||||||
t.endTime = 'End Time'
 | 
					t.endTime = 'End Time'
 | 
				
			||||||
t.today = 'Today'
 | 
					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.yAxisTime = 'Time (h)'
 | 
				
			||||||
 | 
					t.yAxisRate = 'Percentage (%)'
 | 
				
			||||||
 | 
					t.hourTime = '(h)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.graph = 'Graph'
 | 
					t.graph = 'Graph'
 | 
				
			||||||
t.category = 'Category'
 | 
					t.category = 'Category'
 | 
				
			||||||
@@ -157,6 +188,16 @@ t.all = 'All'
 | 
				
			|||||||
t.reset = 'Reset'
 | 
					t.reset = 'Reset'
 | 
				
			||||||
t.preview = 'Preview'
 | 
					t.preview = 'Preview'
 | 
				
			||||||
t.design = 'Design'
 | 
					t.design = 'Design'
 | 
				
			||||||
 | 
					t.timetype = 'Time Type'
 | 
				
			||||||
 | 
					t.reftimerange = 'By time range'
 | 
				
			||||||
 | 
					t.refdate = 'By date'
 | 
				
			||||||
 | 
					t.hour = 'Hour(s)'
 | 
				
			||||||
 | 
					t.yes = 'yes'
 | 
				
			||||||
 | 
					t.no = 'no'
 | 
				
			||||||
 | 
					t.LoginRecords = ' Login Records'
 | 
				
			||||||
 | 
					t.operationsRecords = ' Operations Records'
 | 
				
			||||||
 | 
					t.allIcons= 'All Icons'
 | 
				
			||||||
 | 
					t.err= 'Error'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.errors = {}
 | 
					t.errors = {}
 | 
				
			||||||
t.errors.nosection = 'There is no sections on this product line.'
 | 
					t.errors.nosection = 'There is no sections on this product line.'
 | 
				
			||||||
@@ -169,9 +210,10 @@ t.hints.select = 'Please select '
 | 
				
			|||||||
t.hints.date = 'Please select date'
 | 
					t.hints.date = 'Please select date'
 | 
				
			||||||
t.hints.checktime = 'Please select inspection time'
 | 
					t.hints.checktime = 'Please select inspection time'
 | 
				
			||||||
t.hints.number = 'Please input correct number'
 | 
					t.hints.number = 'Please input correct number'
 | 
				
			||||||
 | 
					t.hints.integer = 'Please input correct integer'
 | 
				
			||||||
t.hints.addr = 'Please input address'
 | 
					t.hints.addr = 'Please input address'
 | 
				
			||||||
t.hints.upload2m = 'File size cannot be larger than 2mb (2048kb)'
 | 
					t.hints.upload2m = 'File size cannot be larger than 2MB (2048KB)'
 | 
				
			||||||
t.hints.upload2mPic = 'Image files only. File size cannot be larger than 2mb (2048kb)'
 | 
					t.hints.upload2mPic = 'Image files only. File size cannot be larger than 2MB (2048KB)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.factory = {}
 | 
					t.factory = {}
 | 
				
			||||||
t.factory.title = 'Factory'
 | 
					t.factory.title = 'Factory'
 | 
				
			||||||
@@ -209,6 +251,9 @@ t.alarm.content = 'Alarm Content'
 | 
				
			|||||||
t.alarm.source = 'Alarm Source'
 | 
					t.alarm.source = 'Alarm Source'
 | 
				
			||||||
t.alarm.det = 'Alarm Details'
 | 
					t.alarm.det = 'Alarm Details'
 | 
				
			||||||
t.alarm.externalCode = 'External Code'
 | 
					t.alarm.externalCode = 'External Code'
 | 
				
			||||||
 | 
					t.alarm.description = 'Description'
 | 
				
			||||||
 | 
					t.alarm.remark = 'Remark'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.report = {}
 | 
					t.report = {}
 | 
				
			||||||
t.report.name = 'Report Name'
 | 
					t.report.name = 'Report Name'
 | 
				
			||||||
@@ -228,7 +273,7 @@ t.inspect.typetotal = 'Total Inspection Types'
 | 
				
			|||||||
t.inspect.typename = 'Inspection Type'
 | 
					t.inspect.typename = 'Inspection Type'
 | 
				
			||||||
t.inspect.typecode = 'Inspection Code'
 | 
					t.inspect.typecode = 'Inspection Code'
 | 
				
			||||||
t.inspect.ioTotal = 'Data of input/output and total inspections'
 | 
					t.inspect.ioTotal = 'Data of input/output and total inspections'
 | 
				
			||||||
t.inspect.plTotal = 'Inspection types per line'
 | 
					t.inspect.plTotal = 'Inspection contents in each line'
 | 
				
			||||||
t.inspect.inTotal = 'Up Sum'
 | 
					t.inspect.inTotal = 'Up Sum'
 | 
				
			||||||
t.inspect.outTotal = 'Down Sum'
 | 
					t.inspect.outTotal = 'Down Sum'
 | 
				
			||||||
t.inspect.checkTotal = 'Total Inspections'
 | 
					t.inspect.checkTotal = 'Total Inspections'
 | 
				
			||||||
@@ -237,27 +282,27 @@ t.inspect.typeCount = 'Data of inspection types'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.realtime = {}
 | 
					t.realtime = {}
 | 
				
			||||||
t.realtime.eq = 'Realtime data of equipments'
 | 
					t.realtime.eq = 'Realtime data of equipments(24h)'
 | 
				
			||||||
t.realtime.pl = 'Realtime data of product lines'
 | 
					t.realtime.pl = 'Realtime data of productlines(24h)'
 | 
				
			||||||
t.realtime.inspect = 'Realtime data of quality inspections'
 | 
					t.realtime.inspect = 'Realtime data of quality inspections(24h)'
 | 
				
			||||||
t.realtime.in = 'in'
 | 
					t.realtime.in = 'in'
 | 
				
			||||||
t.realtime.out = 'out'
 | 
					t.realtime.out = 'out'
 | 
				
			||||||
t.realtime.data = 'scrap'
 | 
					t.realtime.data = 'scrap'
 | 
				
			||||||
t.realtime.num = 'scrap quantity'
 | 
					t.realtime.num = 'scrap quantity'
 | 
				
			||||||
t.realtime.rate = 'scrap rate'
 | 
					t.realtime.rate = 'scrap rate'
 | 
				
			||||||
t.realtime.total = 'total production'
 | 
					t.realtime.total = 'Equipment total production'
 | 
				
			||||||
t.realtime.goodrate = 'Passed Rate'
 | 
					t.realtime.goodrate = 'Passed Rate'
 | 
				
			||||||
t.realtime.runState = '是否运行'
 | 
					t.realtime.runState = 'running state'
 | 
				
			||||||
t.realtime.state = '状态'
 | 
					t.realtime.state = 'status'
 | 
				
			||||||
t.realtime.hasFault = '是否故障'
 | 
					t.realtime.hasFault = 'malfunction'
 | 
				
			||||||
t.realtime.recentParamValue = '参数近期值'
 | 
					t.realtime.recentParamValue = 'recent parameters'
 | 
				
			||||||
t.realtime.view = '查看'
 | 
					t.realtime.view = 'view'
 | 
				
			||||||
t.realtime.input = '投入数'
 | 
					t.realtime.input = 'input' //'投入数'
 | 
				
			||||||
t.realtime.output = '产出数'
 | 
					t.realtime.output = 'output' //'产出数'
 | 
				
			||||||
t.realtime.eqName = '设备名称'
 | 
					t.realtime.eqName = 'Equipment name'
 | 
				
			||||||
t.realtime.eqCode = '设备编码'
 | 
					t.realtime.eqCode = 'Equipment cdoe'
 | 
				
			||||||
t.realtime.productionSnapshotTime = '生产量记录时间'
 | 
					t.realtime.productionSnapshotTime = 'production recording time' // '生产量记录时间'
 | 
				
			||||||
t.realtime.statusSnapshotTime = '状态记录时间'
 | 
					t.realtime.statusSnapshotTime = 'status recording time' // '状态记录时间'
 | 
				
			||||||
t.realtime.refresh = 'Refresh data...'
 | 
					t.realtime.refresh = 'Refresh data...'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -311,17 +356,73 @@ t.eq.port = 'Port'
 | 
				
			|||||||
t.eq.type = 'Type'
 | 
					t.eq.type = 'Type'
 | 
				
			||||||
t.eq.typecode = 'Type Code'
 | 
					t.eq.typecode = 'Type Code'
 | 
				
			||||||
t.eq.parent = 'Parent'
 | 
					t.eq.parent = 'Parent'
 | 
				
			||||||
 | 
					t.eq.mtbf = 'Mean time between failures[MTBF] (h)'
 | 
				
			||||||
 | 
					t.eq.mttr = 'Mean time to repair[MTTR] (h)'
 | 
				
			||||||
 | 
					t.eq.efficienttimeh = 'Working time(h)'
 | 
				
			||||||
 | 
					t.eq.shutdowntimeh = 'Off time(h)'
 | 
				
			||||||
 | 
					t.eq.worktimeh = 'Working time(h)'
 | 
				
			||||||
 | 
					t.eq.downtimeh = 'Malfunction duration(h)'
 | 
				
			||||||
 | 
					t.eq.stoptimeh = 'Halt duration(h)'
 | 
				
			||||||
 | 
					t.eq.worktime = 'Functioning duration'
 | 
				
			||||||
 | 
					t.eq.stoptime = 'Halt duration'
 | 
				
			||||||
 | 
					t.eq.downtime = 'Malfunction duration'
 | 
				
			||||||
 | 
					t.eq.downcount = 'Malfunction counts'
 | 
				
			||||||
 | 
					t.eq.downrate = 'Malfunction rates'
 | 
				
			||||||
 | 
					t.eq.stoplost = 'Lost'
 | 
				
			||||||
 | 
					t.eq.ratio = 'percentage'
 | 
				
			||||||
 | 
					t.eq.time = 'time'
 | 
				
			||||||
 | 
					t.eq.timetrend = 'trend'
 | 
				
			||||||
 | 
					t.eq.nogap = 'no interval'
 | 
				
			||||||
 | 
					t.eq.monthgap = 'by month'
 | 
				
			||||||
 | 
					t.eq.daygap = 'by day'
 | 
				
			||||||
 | 
					t.eq.weekgap = 'by week'
 | 
				
			||||||
 | 
					t.eq.hourgap = 'by hour'
 | 
				
			||||||
 | 
					t.eq.workdurationratio = 'Functioning duration ratio' // '工作时长比率'
 | 
				
			||||||
 | 
					t.eq.stopdurationratio = 'Halt duration ratio' // '停机时长比率'
 | 
				
			||||||
 | 
					t.eq.stopratio = 'Halt ratio' // '停机比率'
 | 
				
			||||||
 | 
					t.eq.downdurationratio = 'Malfunction duration ratio' // '故障时长比率'
 | 
				
			||||||
 | 
					t.eq.speedefficiency = 'Speed launch rate' //'速度开动率'
 | 
				
			||||||
 | 
					t.eq.speedlost = 'Speed lost'
 | 
				
			||||||
 | 
					t.eq.timeefficiency = 'Time launch rate' //'时间开动率'
 | 
				
			||||||
 | 
					t.eq.year = 'year'
 | 
				
			||||||
 | 
					t.eq.month = 'month'
 | 
				
			||||||
 | 
					t.eq.realyield = 'Actual processing speed'
 | 
				
			||||||
 | 
					t.eq.designyield = 'Theoretical processing speed'
 | 
				
			||||||
 | 
					t.eq.viewtrend = 'View Trends'
 | 
				
			||||||
 | 
					t.eq.productQuality = 'Product Quality Analysis' 
 | 
				
			||||||
 | 
					t.eq.productionAnalysis = 'Production Analysis' 
 | 
				
			||||||
 | 
					t.eq.productQuantity = 'Product Quantity' 
 | 
				
			||||||
 | 
					t.eq.line1= 'Line 1'
 | 
				
			||||||
 | 
					t.eq.line2= 'Line 2'
 | 
				
			||||||
 | 
					t.eq.line3= 'Line 3'
 | 
				
			||||||
 | 
					t.eq.line4= 'Line 4'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.eq.sectionName = 'Section Name'
 | 
				
			||||||
 | 
					t.eq.equipmentName = 'Equipment Name'
 | 
				
			||||||
 | 
					t.eq.okNum = 'Qualified Quantity'
 | 
				
			||||||
 | 
					t.eq.nokNum = 'Unqualified Quantity'
 | 
				
			||||||
 | 
					t.eq.passRate = 'Qualified Rate'
 | 
				
			||||||
 | 
					t.eq.passRatePercent = 'Qualified Rate(%)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.pl = {}
 | 
					t.pl = {}
 | 
				
			||||||
t.pl.title = 'Product Line'
 | 
					t.pl.title = 'Product Line'
 | 
				
			||||||
t.pl.id = 'Product Line ID'
 | 
					t.pl.id = 'Product Line ID'
 | 
				
			||||||
t.pl.name = 'Product Line Name'
 | 
					t.pl.name = 'Product Line Name'
 | 
				
			||||||
 | 
					t.pl.sum = 'Sum'
 | 
				
			||||||
t.pl.code = 'Product Line Code'
 | 
					t.pl.code = 'Product Line Code'
 | 
				
			||||||
t.pl.status = 'Product Line Status'
 | 
					t.pl.status = 'Product Line Status'
 | 
				
			||||||
t.pl.belong = 'Product Line'
 | 
					t.pl.belong = 'Product Line'
 | 
				
			||||||
t.pl.tvalue = 'TT Value'
 | 
					t.pl.tvalue = 'TT Value'
 | 
				
			||||||
t.pl.factoryHints = 'Please select a factory'
 | 
					t.pl.factoryHints = 'Please select a factory'
 | 
				
			||||||
 | 
					t.pl.process = 'Working procedure'
 | 
				
			||||||
 | 
					t.pl.add = 'Add Euipment'
 | 
				
			||||||
 | 
					t.pl.add2 = 'Add Comparison 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 = {}
 | 
					t.prompt = {}
 | 
				
			||||||
t.prompt.title = 'Prompt'
 | 
					t.prompt.title = 'Prompt'
 | 
				
			||||||
@@ -330,14 +431,17 @@ t.prompt.sure = 'Are you sure to delete this record?'
 | 
				
			|||||||
t.prompt.success = 'success'
 | 
					t.prompt.success = 'success'
 | 
				
			||||||
t.prompt.failed = 'failed'
 | 
					t.prompt.failed = 'failed'
 | 
				
			||||||
t.prompt.deleteBatch = 'Please choose items to delete.'
 | 
					t.prompt.deleteBatch = 'Please choose items to delete.'
 | 
				
			||||||
 | 
					t.prompt.month = 'Please choose month'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.validate = {}
 | 
					t.validate = {}
 | 
				
			||||||
t.validate.required = 'This is required.'
 | 
					t.validate.required = 'This is required.'
 | 
				
			||||||
t.validate.format = '{attr} has a wrong format.'
 | 
					t.validate.format = '{attr} has a wrong format.'
 | 
				
			||||||
 | 
					t.validate.keyValueWarning = 'The value must be an integer between 0 and 100!'
 | 
				
			||||||
 | 
					t.validate.requiredRole = 'Choose at least one role'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.upload = {}
 | 
					t.upload = {}
 | 
				
			||||||
t.upload.title = 'Upload Assets'
 | 
					t.upload.title = 'Upload Assets'
 | 
				
			||||||
t.upload.text = '将文件拖到此处,或<em>点击上传</em>'
 | 
					t.upload.text = 'Drag the file here, or <em> click Upload </em>'
 | 
				
			||||||
t.upload.tip = 'Only support files with format: {format}'
 | 
					t.upload.tip = 'Only support files with format: {format}'
 | 
				
			||||||
t.upload.button = 'upload'
 | 
					t.upload.button = 'upload'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -345,6 +449,8 @@ t.datePicker = {}
 | 
				
			|||||||
t.datePicker.range = 'to'
 | 
					t.datePicker.range = 'to'
 | 
				
			||||||
t.datePicker.start = 'Start Time'
 | 
					t.datePicker.start = 'Start Time'
 | 
				
			||||||
t.datePicker.end = 'End Time'
 | 
					t.datePicker.end = 'End Time'
 | 
				
			||||||
 | 
					t.datePicker.starttime = 'Start Time'
 | 
				
			||||||
 | 
					t.datePicker.endtime = 'End Time'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.fullscreen = {}
 | 
					t.fullscreen = {}
 | 
				
			||||||
t.fullscreen.prompt = 'This operation is not supported by your browser.'
 | 
					t.fullscreen.prompt = 'This operation is not supported by your browser.'
 | 
				
			||||||
@@ -375,7 +481,9 @@ t.login.username = 'Username'
 | 
				
			|||||||
t.login.password = 'Password'
 | 
					t.login.password = 'Password'
 | 
				
			||||||
t.login.captcha = 'Captcha'
 | 
					t.login.captcha = 'Captcha'
 | 
				
			||||||
t.login.demo = 'Demo'
 | 
					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 = {}
 | 
				
			||||||
t.schedule.beanName = 'Bean Name'
 | 
					t.schedule.beanName = 'Bean Name'
 | 
				
			||||||
@@ -401,60 +509,60 @@ t.schedule.times = 'Time Cost (ms)'
 | 
				
			|||||||
t.schedule.createDate = 'Executed Tune' // ?
 | 
					t.schedule.createDate = 'Executed Tune' // ?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.oss = {}
 | 
					t.oss = {}
 | 
				
			||||||
t.oss.config = '云存储配置'
 | 
					t.oss.config = 'Cloud storage configuration'
 | 
				
			||||||
t.oss.upload = '上传文件'
 | 
					t.oss.upload = 'upload'
 | 
				
			||||||
t.oss.url = 'URL地址'
 | 
					t.oss.url = 'url'
 | 
				
			||||||
t.oss.createDate = 'Create Time'
 | 
					t.oss.createDate = 'Create Time'
 | 
				
			||||||
t.oss.type = '类型'
 | 
					t.oss.type = 'type'
 | 
				
			||||||
t.oss.type1 = '七牛'
 | 
					t.oss.type1 = 'Qiniu'
 | 
				
			||||||
t.oss.type2 = '阿里云'
 | 
					t.oss.type2 = 'Aliyun'
 | 
				
			||||||
t.oss.type3 = '腾讯云'
 | 
					t.oss.type3 = 'Tencent Cloud'
 | 
				
			||||||
t.oss.qiniuDomain = '域名'
 | 
					t.oss.qiniuDomain = 'Domain name'
 | 
				
			||||||
t.oss.qiniuDomainTips = '七牛绑定的域名'
 | 
					t.oss.qiniuDomainTips = 'Bound domain name'
 | 
				
			||||||
t.oss.qiniuPrefix = '路径前缀'
 | 
					t.oss.qiniuPrefix = 'Prefix'
 | 
				
			||||||
t.oss.qiniuPrefixTips = '不设置默认为空'
 | 
					t.oss.qiniuPrefixTips = 'If no, the default value is null'
 | 
				
			||||||
t.oss.qiniuAccessKey = 'AccessKey'
 | 
					t.oss.qiniuAccessKey = 'AccessKey'
 | 
				
			||||||
t.oss.qiniuAccessKeyTips = '七牛AccessKey'
 | 
					t.oss.qiniuAccessKeyTips = 'Qiniu AccessKey'
 | 
				
			||||||
t.oss.qiniuSecretKey = 'SecretKey'
 | 
					t.oss.qiniuSecretKey = 'SecretKey'
 | 
				
			||||||
t.oss.qiniuSecretKeyTips = '七牛SecretKey'
 | 
					t.oss.qiniuSecretKeyTips = 'Qiniu SecretKey'
 | 
				
			||||||
t.oss.qiniuBucketName = '空间名'
 | 
					t.oss.qiniuBucketName = 'BucketName'
 | 
				
			||||||
t.oss.qiniuBucketNameTips = '七牛存储空间名'
 | 
					t.oss.qiniuBucketNameTips = 'Qiniu BucketName'
 | 
				
			||||||
t.oss.aliyunDomain = '域名'
 | 
					t.oss.aliyunDomain = 'Domain'
 | 
				
			||||||
t.oss.aliyunDomainTips = '阿里云绑定的域名,如:http://cdn.renren.io'
 | 
					t.oss.aliyunDomainTips = 'Domain name bound to Ali Cloud, such as:http://cdn.renren.io'
 | 
				
			||||||
t.oss.aliyunPrefix = '路径前缀'
 | 
					t.oss.aliyunPrefix = 'Prefix'
 | 
				
			||||||
t.oss.aliyunPrefixTips = '不设置默认为空'
 | 
					t.oss.aliyunPrefixTips = 'If no, the default value is null'
 | 
				
			||||||
t.oss.aliyunEndPoint = 'EndPoint'
 | 
					t.oss.aliyunEndPoint = 'EndPoint'
 | 
				
			||||||
t.oss.aliyunEndPointTips = '阿里云EndPoint'
 | 
					t.oss.aliyunEndPointTips = 'Aliyun EndPoint'
 | 
				
			||||||
t.oss.aliyunAccessKeyId = 'AccessKeyId'
 | 
					t.oss.aliyunAccessKeyId = 'AccessKeyId'
 | 
				
			||||||
t.oss.aliyunAccessKeyIdTips = '阿里云AccessKeyId'
 | 
					t.oss.aliyunAccessKeyIdTips = 'Aliyun AccessKeyId'
 | 
				
			||||||
t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
 | 
					t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
 | 
				
			||||||
t.oss.aliyunAccessKeySecretTips = '阿里云AccessKeySecret'
 | 
					t.oss.aliyunAccessKeySecretTips = 'Aliyun AccessKeySecret'
 | 
				
			||||||
t.oss.aliyunBucketName = 'BucketName'
 | 
					t.oss.aliyunBucketName = 'BucketName'
 | 
				
			||||||
t.oss.aliyunBucketNameTips = '阿里云BucketName'
 | 
					t.oss.aliyunBucketNameTips = 'Aliyun BucketName'
 | 
				
			||||||
t.oss.qcloudDomain = '域名'
 | 
					t.oss.qcloudDomain = 'Domain'
 | 
				
			||||||
t.oss.qcloudDomainTips = '腾讯云绑定的域名'
 | 
					t.oss.qcloudDomainTips = 'Tencent Cloud Domains'
 | 
				
			||||||
t.oss.qcloudPrefix = '路径前缀'
 | 
					t.oss.qcloudPrefix = 'Prefix'
 | 
				
			||||||
t.oss.qcloudPrefixTips = '不设置默认为空'
 | 
					t.oss.qcloudPrefixTips = 'If no, the default value is null'
 | 
				
			||||||
t.oss.qcloudAppId = 'AppId'
 | 
					t.oss.qcloudAppId = 'AppId'
 | 
				
			||||||
t.oss.qcloudAppIdTips = '腾讯云AppId'
 | 
					t.oss.qcloudAppIdTips = 'Tencent Cloud AppId'
 | 
				
			||||||
t.oss.qcloudSecretId = 'SecretId'
 | 
					t.oss.qcloudSecretId = 'SecretId'
 | 
				
			||||||
t.oss.qcloudSecretIdTips = '腾讯云SecretId'
 | 
					t.oss.qcloudSecretIdTips = 'Tencent Cloud SecretId'
 | 
				
			||||||
t.oss.qcloudSecretKey = 'SecretKey'
 | 
					t.oss.qcloudSecretKey = 'SecretKey'
 | 
				
			||||||
t.oss.qcloudSecretKeyTips = '腾讯云SecretKey'
 | 
					t.oss.qcloudSecretKeyTips = 'Tencent Cloud SecretKey'
 | 
				
			||||||
t.oss.qcloudBucketName = 'BucketName'
 | 
					t.oss.qcloudBucketName = 'BucketName'
 | 
				
			||||||
t.oss.qcloudBucketNameTips = '腾讯云BucketName'
 | 
					t.oss.qcloudBucketNameTips = 'Tencent Cloud BucketName'
 | 
				
			||||||
t.oss.qcloudRegion = '所属地区'
 | 
					t.oss.qcloudRegion = 'Region'
 | 
				
			||||||
t.oss.qcloudRegionTips = '请选择'
 | 
					t.oss.qcloudRegionTips = 'Select'
 | 
				
			||||||
t.oss.qcloudRegionBeijing1 = '北京一区(华北)'
 | 
					t.oss.qcloudRegionBeijing1 = 'Beijing District 1 (North China)'
 | 
				
			||||||
t.oss.qcloudRegionBeijing = '北京'
 | 
					t.oss.qcloudRegionBeijing = 'Beijing'
 | 
				
			||||||
t.oss.qcloudRegionShanghai = '上海(华东)'
 | 
					t.oss.qcloudRegionShanghai = 'Shanghai (East China)'
 | 
				
			||||||
t.oss.qcloudRegionGuangzhou = '广州(华南)'
 | 
					t.oss.qcloudRegionGuangzhou = 'Guangzhou (South China)'
 | 
				
			||||||
t.oss.qcloudRegionChengdu = '成都(西南)'
 | 
					t.oss.qcloudRegionChengdu = 'Chengdu (Southwest)'
 | 
				
			||||||
t.oss.qcloudRegionChongqing = '重庆'
 | 
					t.oss.qcloudRegionChongqing = 'Chongqing'
 | 
				
			||||||
t.oss.qcloudRegionSingapore = '新加坡'
 | 
					t.oss.qcloudRegionSingapore = 'Singapore'
 | 
				
			||||||
t.oss.qcloudRegionHongkong = '香港'
 | 
					t.oss.qcloudRegionHongkong = 'Hong Kong'
 | 
				
			||||||
t.oss.qcloudRegionToronto = '多伦多'
 | 
					t.oss.qcloudRegionToronto = 'Toronto'
 | 
				
			||||||
t.oss.qcloudRegionFrankfurt = '法兰克福'
 | 
					t.oss.qcloudRegionFrankfurt = 'Frankfurt'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.dept = {}
 | 
					t.dept = {}
 | 
				
			||||||
t.dept.name = 'Department Name'
 | 
					t.dept.name = 'Department Name'
 | 
				
			||||||
@@ -474,7 +582,7 @@ t.dict.remark = 'Remark'
 | 
				
			|||||||
t.dict.createDate = 'Create Time'
 | 
					t.dict.createDate = 'Create Time'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.logError = {}
 | 
					t.logError = {}
 | 
				
			||||||
t.logError.requestUri = 'Request URI'
 | 
					t.logError.requestUri = 'Request URL'
 | 
				
			||||||
t.logError.requestMethod = 'Request Method'
 | 
					t.logError.requestMethod = 'Request Method'
 | 
				
			||||||
t.logError.requestParams = 'Request Parameters'
 | 
					t.logError.requestParams = 'Request Parameters'
 | 
				
			||||||
t.logError.ip = 'IP'
 | 
					t.logError.ip = 'IP'
 | 
				
			||||||
@@ -501,7 +609,7 @@ t.logOperation.status0 = 'Failed'
 | 
				
			|||||||
t.logOperation.status1 = 'Success'
 | 
					t.logOperation.status1 = 'Success'
 | 
				
			||||||
t.logOperation.creatorName = 'User Name'
 | 
					t.logOperation.creatorName = 'User Name'
 | 
				
			||||||
t.logOperation.operation = 'User Operations'
 | 
					t.logOperation.operation = 'User Operations'
 | 
				
			||||||
t.logOperation.requestUri = 'Request URI'
 | 
					t.logOperation.requestUri = 'Request URL'
 | 
				
			||||||
t.logOperation.requestMethod = 'Request Method'
 | 
					t.logOperation.requestMethod = 'Request Method'
 | 
				
			||||||
t.logOperation.requestParams = 'Request Parameters'
 | 
					t.logOperation.requestParams = 'Request Parameters'
 | 
				
			||||||
t.logOperation.requestTime = 'Request Duration'
 | 
					t.logOperation.requestTime = 'Request Duration'
 | 
				
			||||||
@@ -510,21 +618,22 @@ t.logOperation.userAgent = 'User-Agent'
 | 
				
			|||||||
t.logOperation.createDate = 'Create Time'
 | 
					t.logOperation.createDate = 'Create Time'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.menu = {}
 | 
					t.menu = {}
 | 
				
			||||||
t.menu.name = 'Name'
 | 
					t.menu.name = 'Chinese Name'
 | 
				
			||||||
 | 
					t.menu.nameEn = 'Name'
 | 
				
			||||||
t.menu.icon = 'Icons'
 | 
					t.menu.icon = 'Icons'
 | 
				
			||||||
t.menu.type = 'Type'
 | 
					t.menu.type = 'Type'
 | 
				
			||||||
t.menu.type0 = 'Menu'
 | 
					t.menu.type0 = 'Menu'
 | 
				
			||||||
t.menu.type1 = 'Button'
 | 
					t.menu.type1 = 'Button'
 | 
				
			||||||
t.menu.sort = 'Sort'
 | 
					t.menu.sort = 'Sort'
 | 
				
			||||||
t.menu.url = 'Route'
 | 
					t.menu.url = 'Route'
 | 
				
			||||||
t.menu.permissions = '授权标识'
 | 
					t.menu.permissions = 'Authorization Identifier'
 | 
				
			||||||
t.menu.permissionsTips = '多个用逗号分隔,如:sys:menu:save,sys:menu:update'
 | 
					t.menu.permissionsTips = 'Multiple are separated by commas, such as:sys:menu:save,sys:menu:update'
 | 
				
			||||||
t.menu.parentName = '上级菜单'
 | 
					t.menu.parentName = 'Superior menu'
 | 
				
			||||||
t.menu.parentNameDefault = 'First tier menu'
 | 
					t.menu.parentNameDefault = 'First tier menu'
 | 
				
			||||||
t.menu.resource = '授权资源'
 | 
					t.menu.resource = 'Authorized Resource'
 | 
				
			||||||
t.menu.resourceUrl = '资源URL'
 | 
					t.menu.resourceUrl = 'Resource URL'
 | 
				
			||||||
t.menu.resourceMethod = 'Request methods'
 | 
					t.menu.resourceMethod = 'Request methods'
 | 
				
			||||||
t.menu.resourceAddItem = '添加一项'
 | 
					t.menu.resourceAddItem = 'Add Item'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.params = {}
 | 
					t.params = {}
 | 
				
			||||||
t.params.name = 'Parameter Name'
 | 
					t.params.name = 'Parameter Name'
 | 
				
			||||||
@@ -533,7 +642,7 @@ t.params.paramCode = 'Parameter Code'
 | 
				
			|||||||
t.params.paramValue = 'Parameter Value'
 | 
					t.params.paramValue = 'Parameter Value'
 | 
				
			||||||
t.params.paramStdValue = 'Standard Parameter Code'
 | 
					t.params.paramStdValue = 'Standard Parameter Code'
 | 
				
			||||||
t.params.plctitle = 'PLC Collection Parameters'
 | 
					t.params.plctitle = 'PLC Collection Parameters'
 | 
				
			||||||
t.params.plcid = 'PLC连接表ID'
 | 
					t.params.plcid = 'PLC ID'
 | 
				
			||||||
t.params.remark = 'Remark'
 | 
					t.params.remark = 'Remark'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.role = {}
 | 
					t.role = {}
 | 
				
			||||||
@@ -564,5 +673,6 @@ t.user.validate = {}
 | 
				
			|||||||
t.user.validate.confirmPassword = 'The two passwords are different. Please check again.'
 | 
					t.user.validate.confirmPassword = 'The two passwords are different. Please check again.'
 | 
				
			||||||
t.user.select = 'Select an user'
 | 
					t.user.select = 'Select an user'
 | 
				
			||||||
t.user.selecterror = 'Pick up a record'
 | 
					t.user.selecterror = 'Pick up a record'
 | 
				
			||||||
 | 
					t.user.userTable = ' User Table'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default t
 | 
					export default t
 | 
				
			||||||
@@ -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 Vue from 'vue'
 | 
				
			||||||
import VueI18n from 'vue-i18n'
 | 
					import VueI18n from 'vue-i18n'
 | 
				
			||||||
import Cookies from 'js-cookie'
 | 
					import Cookies from 'js-cookie'
 | 
				
			||||||
@@ -41,7 +49,10 @@ export function getLanguage() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default new VueI18n({
 | 
					export default new VueI18n({
 | 
				
			||||||
  // locale: Cookies.get('language') || 'zh-CN',
 | 
					  // 默认语言
 | 
				
			||||||
 | 
					  locale: Cookies.get('language') || 'en',
 | 
				
			||||||
  locale: getLanguage(), // 先默认中文
 | 
					  locale: getLanguage(), // 先默认中文
 | 
				
			||||||
  messages
 | 
					  messages,
 | 
				
			||||||
 | 
					  //抑制警告
 | 
				
			||||||
 | 
					  silentFallbackWarn: true,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,8 +4,9 @@ t.loading = '加载中...'
 | 
				
			|||||||
t.createTime = '添加时间'
 | 
					t.createTime = '添加时间'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.brand = {}
 | 
					t.brand = {}
 | 
				
			||||||
t.brand.lg = '生产监控系统'
 | 
					t.brand.lg = '深加工SCADA平台'
 | 
				
			||||||
t.brand.mini = '监控'
 | 
					t.brand.mini = 'SCADA'
 | 
				
			||||||
 | 
					t.brand.home = '首页'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.routes = {}
 | 
					t.routes = {}
 | 
				
			||||||
// 一级
 | 
					// 一级
 | 
				
			||||||
@@ -26,9 +27,9 @@ t.routes['设备'] = '设备'
 | 
				
			|||||||
t.routes['字典管理'] = '字典管理'
 | 
					t.routes['字典管理'] = '字典管理'
 | 
				
			||||||
t.routes['PLC信息'] = 'PLC信息'
 | 
					t.routes['PLC信息'] = 'PLC信息'
 | 
				
			||||||
t.routes['设备与PLC关联配置'] = '设备与PLC关联配置'  // ?
 | 
					t.routes['设备与PLC关联配置'] = '设备与PLC关联配置'  // ?
 | 
				
			||||||
t.routes['设备生产实时数据'] = '设备生产实时数据'
 | 
					t.routes['近24小时设备生产数据'] = '近24小时设备生产数据'
 | 
				
			||||||
t.routes['产线生产实时数据'] = '产线生产实时数据'
 | 
					t.routes['近24小时产线生产数据'] = '近24小时产线生产数据'
 | 
				
			||||||
t.routes['质量检查实时数据'] = '质量检查实时数据'
 | 
					t.routes['近24小时质量检查数据'] = '近24小时质量检查数据'
 | 
				
			||||||
t.routes['报表总览'] = '报表总览'
 | 
					t.routes['报表总览'] = '报表总览'
 | 
				
			||||||
t.routes['报表分类'] = '报表分类'
 | 
					t.routes['报表分类'] = '报表分类'
 | 
				
			||||||
t.routes['报表详情'] = '报表详情'
 | 
					t.routes['报表详情'] = '报表详情'
 | 
				
			||||||
@@ -36,6 +37,7 @@ t.routes['报表设计'] = '报表设计'
 | 
				
			|||||||
t.routes['报表预览'] = '报表预览'
 | 
					t.routes['报表预览'] = '报表预览'
 | 
				
			||||||
t.routes['质量检测基础数据'] = '质量检测基础数据'
 | 
					t.routes['质量检测基础数据'] = '质量检测基础数据'
 | 
				
			||||||
t.routes['当前检测数据'] = '当前检测数据'
 | 
					t.routes['当前检测数据'] = '当前检测数据'
 | 
				
			||||||
 | 
					t.routes['检测统计数据'] = '检测统计数据'
 | 
				
			||||||
t.routes['质量检查信息记录'] = '质量检查信息记录'
 | 
					t.routes['质量检查信息记录'] = '质量检查信息记录'
 | 
				
			||||||
t.routes['用户管理'] = '用户管理'
 | 
					t.routes['用户管理'] = '用户管理'
 | 
				
			||||||
t.routes['部门管理'] = '部门管理'
 | 
					t.routes['部门管理'] = '部门管理'
 | 
				
			||||||
@@ -49,6 +51,11 @@ t.routes['操作日志'] = '操作日志'
 | 
				
			|||||||
t.routes['设备效率分析'] = '设备效率分析'
 | 
					t.routes['设备效率分析'] = '设备效率分析'
 | 
				
			||||||
t.routes['设备异常分析'] = '设备异常分析'
 | 
					t.routes['设备异常分析'] = '设备异常分析'
 | 
				
			||||||
t.routes['设备状态时序图'] = '设备状态时序图'
 | 
					t.routes['设备状态时序图'] = '设备状态时序图'
 | 
				
			||||||
 | 
					t.routes['产品质量分析'] = '产品质量分析'
 | 
				
			||||||
 | 
					t.routes['产量分析'] = '产量分析'
 | 
				
			||||||
 | 
					t.routes['生产节拍时序图'] = '生产节拍时序图'
 | 
				
			||||||
 | 
					t.routes['设备产量时序图'] = '设备产量时序图'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 三级
 | 
					// 三级
 | 
				
			||||||
t.routes['工厂'] = '工厂'
 | 
					t.routes['工厂'] = '工厂'
 | 
				
			||||||
@@ -62,11 +69,16 @@ t.routes['设备分组报警信息'] = '设备分组报警信息'
 | 
				
			|||||||
t.routes['设备历史参数'] = '设备历史参数'
 | 
					t.routes['设备历史参数'] = '设备历史参数'
 | 
				
			||||||
t.routes['质量检测类型'] = '质量检测类型'
 | 
					t.routes['质量检测类型'] = '质量检测类型'
 | 
				
			||||||
t.routes['质量检测信息'] = '质量检测信息'
 | 
					t.routes['质量检测信息'] = '质量检测信息'
 | 
				
			||||||
 | 
					t.routes['安灯检测盒'] = '安灯检测盒'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.andeng = {}
 | 
				
			||||||
 | 
					t.andeng.inspectContent = '检测内容'
 | 
				
			||||||
 | 
					t.andeng.btnVal = '按钮值'
 | 
				
			||||||
 | 
					t.andeng.btnBoxModel = '按钮盒模式'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.copyright = 'VISHAKHA glass pvt Ltd'
 | 
				
			||||||
 | 
					t.dictValueList = '查看值列表'
 | 
				
			||||||
 | 
					 | 
				
			||||||
t.save = '保存'
 | 
					t.save = '保存'
 | 
				
			||||||
t.add = '新增' // 1
 | 
					t.add = '新增' // 1
 | 
				
			||||||
t.delete = '删除' // 1
 | 
					t.delete = '删除' // 1
 | 
				
			||||||
@@ -131,12 +143,25 @@ t.min = '最小值' // 1
 | 
				
			|||||||
t.max = '最大值' // 1
 | 
					t.max = '最大值' // 1
 | 
				
			||||||
t.status = '状态' // 1
 | 
					t.status = '状态' // 1
 | 
				
			||||||
t.normal = '正常' // ?
 | 
					t.normal = '正常' // ?
 | 
				
			||||||
 | 
					t.shutdown = '停机' // ?
 | 
				
			||||||
 | 
					t.malfunction = '故障' // ?
 | 
				
			||||||
 | 
					t.diagram = '设备状态时序图'
 | 
				
			||||||
 | 
					t.diagram2 = '设备产量时序图'
 | 
				
			||||||
t.addr = '地址' // 1
 | 
					t.addr = '地址' // 1
 | 
				
			||||||
t.planStop = '计划停机' // ?
 | 
					t.planStop = '计划停机' // ?
 | 
				
			||||||
t.startTime = '开始时间' // 1
 | 
					t.startTime = '开始时间' // 1
 | 
				
			||||||
t.endTime = '结束时间' // 1
 | 
					t.endTime = '结束时间' // 1
 | 
				
			||||||
t.to = '至' // 1
 | 
					t.to = '至' // 1
 | 
				
			||||||
t.today = '今天' // 1
 | 
					t.today = '今天' // 1
 | 
				
			||||||
 | 
					t.time = '选择时间'
 | 
				
			||||||
 | 
					t.eqId = '当前设备ID:'
 | 
				
			||||||
 | 
					t.ti = '时间'
 | 
				
			||||||
 | 
					t.plcCode = 'PLC 编码'
 | 
				
			||||||
 | 
					t.equName = '设备名称'
 | 
				
			||||||
 | 
					t.equCode = '设备编码'
 | 
				
			||||||
 | 
					t.yAxisTime = '时间 (h)'
 | 
				
			||||||
 | 
					t.yAxisRate = '百分比 (%)'
 | 
				
			||||||
 | 
					t.hourTime = '(时)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.graph = '图形'
 | 
					t.graph = '图形'
 | 
				
			||||||
t.category = '分类'
 | 
					t.category = '分类'
 | 
				
			||||||
@@ -162,6 +187,17 @@ t.all = '全部'
 | 
				
			|||||||
t.reset = '重置'
 | 
					t.reset = '重置'
 | 
				
			||||||
t.preview = '预览'
 | 
					t.preview = '预览'
 | 
				
			||||||
t.design = '设计'
 | 
					t.design = '设计'
 | 
				
			||||||
 | 
					t.timetype = '时间类型'
 | 
				
			||||||
 | 
					t.reftimerange = '按时间段'
 | 
				
			||||||
 | 
					t.refdate = '按日期'
 | 
				
			||||||
 | 
					t.hour = '小时'
 | 
				
			||||||
 | 
					t.yes = '是'
 | 
				
			||||||
 | 
					t.no = '否'
 | 
				
			||||||
 | 
					t.LoginRecords = ' 登录日志'
 | 
				
			||||||
 | 
					t.operationsRecords = ' 操作日志'
 | 
				
			||||||
 | 
					t.allIcons= '所有图标'
 | 
				
			||||||
 | 
					t.err= '错误'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.errors = {}
 | 
					t.errors = {}
 | 
				
			||||||
t.errors.nosection = '该产线没有工段'
 | 
					t.errors.nosection = '该产线没有工段'
 | 
				
			||||||
@@ -174,9 +210,10 @@ t.hints.select = '请选择'
 | 
				
			|||||||
t.hints.date = '请选择日期'
 | 
					t.hints.date = '请选择日期'
 | 
				
			||||||
t.hints.checktime = '请选择检测时间'
 | 
					t.hints.checktime = '请选择检测时间'
 | 
				
			||||||
t.hints.number = '请输入正确的数值'
 | 
					t.hints.number = '请输入正确的数值'
 | 
				
			||||||
 | 
					t.hints.integer = '请输入正确的整数'
 | 
				
			||||||
t.hints.addr = '请输入地址'
 | 
					t.hints.addr = '请输入地址'
 | 
				
			||||||
t.hints.upload2m = '上传文件大小不要超过 2mb (2048kb)'
 | 
					t.hints.upload2m = '上传文件大小不要超过 2MB (2048KB)'
 | 
				
			||||||
t.hints.upload2mPic = '上传图片文件,且大小不要超过 2mb (2048kb)'
 | 
					t.hints.upload2mPic = '上传图片文件,且大小不要超过 2MB (2048KB)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.factory = {}
 | 
					t.factory = {}
 | 
				
			||||||
t.factory.title = '工厂'
 | 
					t.factory.title = '工厂'
 | 
				
			||||||
@@ -215,6 +252,8 @@ t.alarm.content = '报警内容'
 | 
				
			|||||||
t.alarm.source = '报警来源'
 | 
					t.alarm.source = '报警来源'
 | 
				
			||||||
t.alarm.det = '报警详细内容'
 | 
					t.alarm.det = '报警详细内容'
 | 
				
			||||||
t.alarm.externalCode = '外部编码'
 | 
					t.alarm.externalCode = '外部编码'
 | 
				
			||||||
 | 
					t.alarm.description = '描述'
 | 
				
			||||||
 | 
					t.alarm.remark = '备注'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.report = {}
 | 
					t.report = {}
 | 
				
			||||||
t.report.name = '报表名称'
 | 
					t.report.name = '报表名称'
 | 
				
			||||||
@@ -234,7 +273,7 @@ t.inspect.typetotal = '检测类型总数'
 | 
				
			|||||||
t.inspect.typename = '检测类型名称'
 | 
					t.inspect.typename = '检测类型名称'
 | 
				
			||||||
t.inspect.typecode = '检测类型编码'
 | 
					t.inspect.typecode = '检测类型编码'
 | 
				
			||||||
t.inspect.ioTotal = '上下片及检测总数统计'
 | 
					t.inspect.ioTotal = '上下片及检测总数统计'
 | 
				
			||||||
t.inspect.plTotal = '各产线检测类型统计'
 | 
					t.inspect.plTotal = '各产线检测内容统计'
 | 
				
			||||||
t.inspect.inTotal = '上片总数'
 | 
					t.inspect.inTotal = '上片总数'
 | 
				
			||||||
t.inspect.outTotal = '下片总数'
 | 
					t.inspect.outTotal = '下片总数'
 | 
				
			||||||
t.inspect.checkTotal = '检测总数'
 | 
					t.inspect.checkTotal = '检测总数'
 | 
				
			||||||
@@ -243,15 +282,15 @@ t.inspect.typeCount = '检测类型统计数据'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.realtime = {}
 | 
					t.realtime = {}
 | 
				
			||||||
t.realtime.eq = '设备生产实时数据'
 | 
					t.realtime.eq = '近24小时产线生产数据'
 | 
				
			||||||
t.realtime.pl = '产线生产实时数据'
 | 
					t.realtime.pl = '近24小时产线生产数据'
 | 
				
			||||||
t.realtime.inspect = '质量检查实时数据'
 | 
					t.realtime.inspect = '近24小时质量检查数据'
 | 
				
			||||||
t.realtime.in = '进数据'
 | 
					t.realtime.in = '进数据'
 | 
				
			||||||
t.realtime.out = '出数据'
 | 
					t.realtime.out = '出数据'
 | 
				
			||||||
t.realtime.data = '报废数据'
 | 
					t.realtime.data = '报废数据'
 | 
				
			||||||
t.realtime.num = '报废数量'
 | 
					t.realtime.num = '报废数量'
 | 
				
			||||||
t.realtime.rate = '报废比例'
 | 
					t.realtime.rate = '报废比例'
 | 
				
			||||||
t.realtime.total = '总产量'
 | 
					t.realtime.total = '设备总产量'
 | 
				
			||||||
t.realtime.goodrate = '良品率'
 | 
					t.realtime.goodrate = '良品率'
 | 
				
			||||||
t.realtime.runState = '是否运行'
 | 
					t.realtime.runState = '是否运行'
 | 
				
			||||||
t.realtime.state = '状态'
 | 
					t.realtime.state = '状态'
 | 
				
			||||||
@@ -275,7 +314,7 @@ t.ws.code = '工段编码'
 | 
				
			|||||||
t.ws.binded = '已绑定的设备'
 | 
					t.ws.binded = '已绑定的设备'
 | 
				
			||||||
t.ws.unbind = '设备名称'
 | 
					t.ws.unbind = '设备名称'
 | 
				
			||||||
t.ws.eqbindplaceholder = '选择一个设备进行绑定'
 | 
					t.ws.eqbindplaceholder = '选择一个设备进行绑定'
 | 
				
			||||||
t.ws.sort = '排序'
 | 
					t.ws.sort = '工段排序'
 | 
				
			||||||
t.ws.setorder = '请输入工段中设备的顺序'
 | 
					t.ws.setorder = '请输入工段中设备的顺序'
 | 
				
			||||||
t.ws.bind = '绑定'
 | 
					t.ws.bind = '绑定'
 | 
				
			||||||
t.ws.eqbind = '设备绑定'
 | 
					t.ws.eqbind = '设备绑定'
 | 
				
			||||||
@@ -317,17 +356,74 @@ t.eq.port = '端口'
 | 
				
			|||||||
t.eq.type = '类型名称'
 | 
					t.eq.type = '类型名称'
 | 
				
			||||||
t.eq.typecode = '类型编码'
 | 
					t.eq.typecode = '类型编码'
 | 
				
			||||||
t.eq.parent = '父类'
 | 
					t.eq.parent = '父类'
 | 
				
			||||||
 | 
					t.eq.mtbf = '平均故障间隔时间[MTBF] (h)'
 | 
				
			||||||
 | 
					t.eq.mttr = '平均维修时间[MTTR] (h)'
 | 
				
			||||||
 | 
					t.eq.efficienttimeh = '有效时间(h)'
 | 
				
			||||||
 | 
					t.eq.shutdowntimeh = '关机时间(h)'
 | 
				
			||||||
 | 
					t.eq.worktimeh = '工作时长(h)'
 | 
				
			||||||
 | 
					t.eq.downtimeh = '故障时长(h)'
 | 
				
			||||||
 | 
					t.eq.stoptimeh = '停机时长(h)'
 | 
				
			||||||
 | 
					t.eq.worktime = '工作时长'
 | 
				
			||||||
 | 
					t.eq.stoptime = '停机时长'
 | 
				
			||||||
 | 
					t.eq.downtime = '故障时长'
 | 
				
			||||||
 | 
					t.eq.downcount = '故障次数'
 | 
				
			||||||
 | 
					t.eq.downrate = '故障比率'
 | 
				
			||||||
 | 
					t.eq.stoplost = '中断损失'
 | 
				
			||||||
 | 
					t.eq.ratio = '百分比'
 | 
				
			||||||
 | 
					t.eq.time = '时间'
 | 
				
			||||||
 | 
					t.eq.timetrend = '时间区间走势'
 | 
				
			||||||
 | 
					t.eq.nogap = '无间隔'
 | 
				
			||||||
 | 
					t.eq.monthgap = '按月'
 | 
				
			||||||
 | 
					t.eq.daygap = '按天'
 | 
				
			||||||
 | 
					t.eq.weekgap = '按周'
 | 
				
			||||||
 | 
					t.eq.hourgap = '按小时'
 | 
				
			||||||
 | 
					t.eq.workdurationratio = '工作时长比率'
 | 
				
			||||||
 | 
					t.eq.stopdurationratio = '停机时长比率'
 | 
				
			||||||
 | 
					t.eq.stopratio = '停机比率'
 | 
				
			||||||
 | 
					t.eq.downdurationratio = '故障时长比率'
 | 
				
			||||||
 | 
					t.eq.speedefficiency = '速度开动率'
 | 
				
			||||||
 | 
					t.eq.speedlost = '速度损失'
 | 
				
			||||||
 | 
					t.eq.timeefficiency = '时间开动率'
 | 
				
			||||||
 | 
					t.eq.year='年'
 | 
				
			||||||
 | 
					t.eq.month='月'
 | 
				
			||||||
 | 
					t.eq.realyield = '实际加工速度'
 | 
				
			||||||
 | 
					t.eq.designyield = '理论加工速度' 
 | 
				
			||||||
 | 
					t.eq.viewtrend = '查看趋势' 
 | 
				
			||||||
 | 
					t.eq.productQuality = '产品质量分析' 
 | 
				
			||||||
 | 
					t.eq.productionAnalysis = '产量分析' 
 | 
				
			||||||
 | 
					t.eq.productQuantity = '产品数量' 
 | 
				
			||||||
 | 
					t.eq.line1= '产线1'
 | 
				
			||||||
 | 
					t.eq.line2= '产线2'
 | 
				
			||||||
 | 
					t.eq.line3= '产线3'
 | 
				
			||||||
 | 
					t.eq.line4= '产线4'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.eq.sectionName = '工序'
 | 
				
			||||||
 | 
					t.eq.equipmentName = '设备名称'
 | 
				
			||||||
 | 
					t.eq.okNum = '合格数量'
 | 
				
			||||||
 | 
					t.eq.nokNum = '不合格数量'
 | 
				
			||||||
 | 
					t.eq.passRate = '合格率'
 | 
				
			||||||
 | 
					t.eq.passRatePercent = '合格率(%)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.pl = {}
 | 
					t.pl = {}
 | 
				
			||||||
t.pl.title = '产线'
 | 
					t.pl.title = '产线'
 | 
				
			||||||
t.pl.id = '产线ID'
 | 
					t.pl.id = '产线ID'
 | 
				
			||||||
t.pl.name = '产线名称'
 | 
					t.pl.name = '产线名称'
 | 
				
			||||||
 | 
					t.pl.sum = '合计'
 | 
				
			||||||
t.pl.code = '产线编码'
 | 
					t.pl.code = '产线编码'
 | 
				
			||||||
t.pl.status = '产线状态'
 | 
					t.pl.status = '产线状态'
 | 
				
			||||||
t.pl.belong = '所属产线'
 | 
					t.pl.belong = '所属产线'
 | 
				
			||||||
t.pl.tvalue = '产线TT值(每小时下片数量)'
 | 
					t.pl.tvalue = '产线TT值(每小时下片数量)'
 | 
				
			||||||
t.pl.factoryHints = '请选择所属工厂'
 | 
					t.pl.factoryHints = '请选择所属工厂'
 | 
				
			||||||
 | 
					t.pl.process = '工序'
 | 
				
			||||||
 | 
					t.pl.add = '添加设备'
 | 
				
			||||||
 | 
					t.pl.add2 = '添加对比设备'
 | 
				
			||||||
 | 
					t.pl.queryFirst = '请先查询数据'
 | 
				
			||||||
 | 
					t.pl.success = '新设备数据获取成功'
 | 
				
			||||||
 | 
					t.pl.choose = '请选择设备'
 | 
				
			||||||
 | 
					t.pl.confirm = '确定'
 | 
				
			||||||
 | 
					t.pl.cancel = '取消'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.prompt = {}
 | 
					t.prompt = {}
 | 
				
			||||||
t.prompt.title = '提示'
 | 
					t.prompt.title = '提示'
 | 
				
			||||||
@@ -336,10 +432,14 @@ t.prompt.sure = '确定删除这条记录吗?'
 | 
				
			|||||||
t.prompt.success = '操作成功'
 | 
					t.prompt.success = '操作成功'
 | 
				
			||||||
t.prompt.failed = '操作失败'
 | 
					t.prompt.failed = '操作失败'
 | 
				
			||||||
t.prompt.deleteBatch = '请选择删除项'
 | 
					t.prompt.deleteBatch = '请选择删除项'
 | 
				
			||||||
 | 
					t.prompt.month = '请选择月份'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.validate = {}
 | 
					t.validate = {}
 | 
				
			||||||
t.validate.required = '必填项不能为空'
 | 
					t.validate.required = '必填项不能为空'
 | 
				
			||||||
t.validate.format = '{attr}格式错误'
 | 
					t.validate.format = '{attr}格式错误'
 | 
				
			||||||
 | 
					t.validate.keyValueWarning = '该数值必须是100以内的正整数!'
 | 
				
			||||||
 | 
					t.validate.requiredRole = '至少选择一个角色'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.upload = {}
 | 
					t.upload = {}
 | 
				
			||||||
t.upload.title = '上传资料'
 | 
					t.upload.title = '上传资料'
 | 
				
			||||||
@@ -351,6 +451,8 @@ t.datePicker = {}
 | 
				
			|||||||
t.datePicker.range = '至'
 | 
					t.datePicker.range = '至'
 | 
				
			||||||
t.datePicker.start = '开始日期'
 | 
					t.datePicker.start = '开始日期'
 | 
				
			||||||
t.datePicker.end = '结束日期'
 | 
					t.datePicker.end = '结束日期'
 | 
				
			||||||
 | 
					t.datePicker.starttime = '开始时间'
 | 
				
			||||||
 | 
					t.datePicker.endtime = '结束时间'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.fullscreen = {}
 | 
					t.fullscreen = {}
 | 
				
			||||||
t.fullscreen.prompt = '您的浏览器不支持此操作'
 | 
					t.fullscreen.prompt = '您的浏览器不支持此操作'
 | 
				
			||||||
@@ -381,7 +483,9 @@ t.login.username = '用户名'
 | 
				
			|||||||
t.login.password = '密码'
 | 
					t.login.password = '密码'
 | 
				
			||||||
t.login.captcha = '验证码'
 | 
					t.login.captcha = '验证码'
 | 
				
			||||||
t.login.demo = '在线演示'
 | 
					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 = {}
 | 
				
			||||||
t.schedule.beanName = 'bean名称'
 | 
					t.schedule.beanName = 'bean名称'
 | 
				
			||||||
@@ -480,7 +584,7 @@ t.dict.remark = '备注'
 | 
				
			|||||||
t.dict.createDate = '创建时间'
 | 
					t.dict.createDate = '创建时间'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.logError = {}
 | 
					t.logError = {}
 | 
				
			||||||
t.logError.requestUri = '请求URI'
 | 
					t.logError.requestUri = '请求URL'
 | 
				
			||||||
t.logError.requestMethod = '请求方式'
 | 
					t.logError.requestMethod = '请求方式'
 | 
				
			||||||
t.logError.requestParams = '请求参数'
 | 
					t.logError.requestParams = '请求参数'
 | 
				
			||||||
t.logError.ip = '操作IP'
 | 
					t.logError.ip = '操作IP'
 | 
				
			||||||
@@ -507,7 +611,7 @@ t.logOperation.status0 = '失败'
 | 
				
			|||||||
t.logOperation.status1 = '成功'
 | 
					t.logOperation.status1 = '成功'
 | 
				
			||||||
t.logOperation.creatorName = '用户名'
 | 
					t.logOperation.creatorName = '用户名'
 | 
				
			||||||
t.logOperation.operation = '用户操作'
 | 
					t.logOperation.operation = '用户操作'
 | 
				
			||||||
t.logOperation.requestUri = '请求URI'
 | 
					t.logOperation.requestUri = '请求URL'
 | 
				
			||||||
t.logOperation.requestMethod = '请求方式'
 | 
					t.logOperation.requestMethod = '请求方式'
 | 
				
			||||||
t.logOperation.requestParams = '请求参数'
 | 
					t.logOperation.requestParams = '请求参数'
 | 
				
			||||||
t.logOperation.requestTime = '请求时长'
 | 
					t.logOperation.requestTime = '请求时长'
 | 
				
			||||||
@@ -516,7 +620,8 @@ t.logOperation.userAgent = 'User-Agent'
 | 
				
			|||||||
t.logOperation.createDate = '创建时间'
 | 
					t.logOperation.createDate = '创建时间'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.menu = {}
 | 
					t.menu = {}
 | 
				
			||||||
t.menu.name = '名称'
 | 
					t.menu.name = '中文名'
 | 
				
			||||||
 | 
					t.menu.nameEn = '英文名'
 | 
				
			||||||
t.menu.icon = '图标'
 | 
					t.menu.icon = '图标'
 | 
				
			||||||
t.menu.type = '类型'
 | 
					t.menu.type = '类型'
 | 
				
			||||||
t.menu.type0 = '菜单'
 | 
					t.menu.type0 = '菜单'
 | 
				
			||||||
@@ -570,6 +675,7 @@ t.user.validate = {}
 | 
				
			|||||||
t.user.validate.confirmPassword = '确认密码与密码输入不一致'
 | 
					t.user.validate.confirmPassword = '确认密码与密码输入不一致'
 | 
				
			||||||
t.user.select = '选择用户'
 | 
					t.user.select = '选择用户'
 | 
				
			||||||
t.user.selecterror = '请选择一条记录'
 | 
					t.user.selecterror = '请选择一条记录'
 | 
				
			||||||
 | 
					t.user.userTable = ' 用户表'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default t
 | 
					export default t
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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 './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
 | 
					      var tabName = this.$store.state.contentTabsActiveName
 | 
				
			||||||
      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) {
 | 
					      if (this.$store.state.contentTabs.length <= 0) {
 | 
				
			||||||
        this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
 | 
									// this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
 | 
				
			||||||
        return false
 | 
									// return false
 | 
				
			||||||
 | 
									this.$router.push({ name: 'home' })
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (tabName === this.$store.state.contentTabsActiveName) {
 | 
					      if (tabName === this.$store.state.contentTabsActiveName) {
 | 
				
			||||||
        this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name })
 | 
					        this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name })
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,7 +30,7 @@ export const pageRoutes = [
 | 
				
			|||||||
    meta: { title: '登录' },
 | 
					    meta: { title: '登录' },
 | 
				
			||||||
    beforeEnter(to, from, next) {
 | 
					    beforeEnter(to, from, next) {
 | 
				
			||||||
      if (Cookies.get('token')) {
 | 
					      if (Cookies.get('token')) {
 | 
				
			||||||
        Vue.prototype.$message({ message: '已经登录过了', type: 'error' })
 | 
					        Vue.prototype.$message({ message: $t('login.warning'), type: 'error' })
 | 
				
			||||||
        next(false)
 | 
					        next(false)
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        next()
 | 
					        next()
 | 
				
			||||||
@@ -45,9 +45,11 @@ export const moduleRoutes = {
 | 
				
			|||||||
  component: () => import('@/views/main'),
 | 
					  component: () => import('@/views/main'),
 | 
				
			||||||
  name: 'main',
 | 
					  name: 'main',
 | 
				
			||||||
  redirect: { name: 'home' },
 | 
					  redirect: { name: 'home' },
 | 
				
			||||||
 | 
					  // redirect: { name: 'sys-log-login' },
 | 
				
			||||||
  meta: { title: '主入口布局' },
 | 
					  meta: { title: '主入口布局' },
 | 
				
			||||||
  children: [
 | 
					  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 Vue from 'vue'
 | 
				
			||||||
import Vuex from 'vuex'
 | 
					import Vuex from 'vuex'
 | 
				
			||||||
import cloneDeep from 'lodash/cloneDeep'
 | 
					import cloneDeep from 'lodash/cloneDeep'
 | 
				
			||||||
@@ -9,7 +17,7 @@ export default new Vuex.Store({
 | 
				
			|||||||
  namespaced: true,
 | 
					  namespaced: true,
 | 
				
			||||||
  state: {
 | 
					  state: {
 | 
				
			||||||
    // 导航条, 布局风格, default(白色) / colorful(鲜艳)
 | 
					    // 导航条, 布局风格, default(白色) / colorful(鲜艳)
 | 
				
			||||||
    navbarLayoutType: 'colorful',
 | 
					    navbarLayoutType: '',
 | 
				
			||||||
    // 侧边栏, 布局皮肤, default(白色) / dark(黑色)
 | 
					    // 侧边栏, 布局皮肤, default(白色) / dark(黑色)
 | 
				
			||||||
    sidebarLayoutSkin: 'dark',
 | 
					    sidebarLayoutSkin: 'dark',
 | 
				
			||||||
    // 侧边栏, 折叠状态
 | 
					    // 侧边栏, 折叠状态
 | 
				
			||||||
@@ -23,11 +31,12 @@ export default new Vuex.Store({
 | 
				
			|||||||
    contentTabs: [
 | 
					    contentTabs: [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        ...window.SITE_CONFIG['contentTabDefault'],
 | 
					        ...window.SITE_CONFIG['contentTabDefault'],
 | 
				
			||||||
        'name': 'home',
 | 
					        // 这里显示/隐藏 main-content的home标签
 | 
				
			||||||
        'title': 'home'
 | 
					        // 'name': 'home',
 | 
				
			||||||
 | 
					        // 'title': 'home'
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    contentTabsActiveName: 'home'
 | 
					    // contentTabsActiveName: 'home'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  modules: {
 | 
					  modules: {
 | 
				
			||||||
    user
 | 
					    user
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,11 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Descripttion: 
 | 
				
			||||||
 | 
					 * @version: 
 | 
				
			||||||
 | 
					 * @Author: fzq
 | 
				
			||||||
 | 
					 * @Date: 2022-11-25 09:51:46
 | 
				
			||||||
 | 
					 * @LastEditors: fzq
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-02-01 09:39:37
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
/** filters */
 | 
					/** filters */
 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -8,5 +16,25 @@ export const dictFilter = dictTypeId => {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const timeFilter = (val) => {
 | 
					export const timeFilter = (val) => {
 | 
				
			||||||
	return moment(val).format('YYYY-MM-DD HH:mm:ss')
 | 
						return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '-'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const pick = (obj, paths) => {
 | 
				
			||||||
 | 
						let result = {}
 | 
				
			||||||
 | 
						paths.forEach(key => {
 | 
				
			||||||
 | 
							if (obj.hasOwnProperty(key)) {
 | 
				
			||||||
 | 
								result[key] = obj[key];
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								result[key] = null
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
						return result
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// export function timeFormatter(timeObj) {
 | 
				
			||||||
 | 
					// 	if (timeObj) {
 | 
				
			||||||
 | 
					// 	  return moment(timeObj).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
 | 
					// 	} else {
 | 
				
			||||||
 | 
					// 	  return '-'
 | 
				
			||||||
 | 
					// 	}
 | 
				
			||||||
 | 
					//   }
 | 
				
			||||||
@@ -114,3 +114,8 @@ export function calcMaxHeight(num) {
 | 
				
			|||||||
  const finalHeight = clientHeight - num - FIXED_HEIGHT
 | 
					  const finalHeight = clientHeight - num - FIXED_HEIGHT
 | 
				
			||||||
  return finalHeight > 0 ? finalHeight : -finalHeight
 | 
					  return finalHeight > 0 ? finalHeight : -finalHeight
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// tableHeight
 | 
				
			||||||
 | 
					export function tableHeight(n) {
 | 
				
			||||||
 | 
					  return window.innerHeight - n
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,7 @@ import merge from 'lodash/merge'
 | 
				
			|||||||
const http = axios.create({
 | 
					const http = axios.create({
 | 
				
			||||||
  // baseURL: window.SITE_CONFIG['apiURL'],
 | 
					  // baseURL: window.SITE_CONFIG['apiURL'],
 | 
				
			||||||
  baseURL: '/api',
 | 
					  baseURL: '/api',
 | 
				
			||||||
 | 
					  // baseURL: '/yd-monitor',
 | 
				
			||||||
  // baseURL: process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor',
 | 
					  // baseURL: process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor',
 | 
				
			||||||
  timeout: 1000 * 180,
 | 
					  timeout: 1000 * 180,
 | 
				
			||||||
  withCredentials: true
 | 
					  withCredentials: true
 | 
				
			||||||
@@ -18,7 +19,8 @@ const http = axios.create({
 | 
				
			|||||||
 * 请求拦截
 | 
					 * 请求拦截
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
http.interceptors.request.use(config => {
 | 
					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') || ''
 | 
					  config.headers['token'] = Cookies.get('token') || ''
 | 
				
			||||||
  // 默认参数
 | 
					  // 默认参数
 | 
				
			||||||
  var defaults = {}
 | 
					  var defaults = {}
 | 
				
			||||||
@@ -58,6 +60,7 @@ http.interceptors.response.use(response => {
 | 
				
			|||||||
    router.replace({ name: 'login' })
 | 
					    router.replace({ name: 'login' })
 | 
				
			||||||
    return Promise.reject(response.data.msg)
 | 
					    return Promise.reject(response.data.msg)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  // 下三行注释掉
 | 
				
			||||||
  //  else if (response.data.code === 500) {
 | 
					  //  else if (response.data.code === 500) {
 | 
				
			||||||
  //   return Promise.reject(response.data.msg)
 | 
					  //   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
 | 
					 * @param {*} s
 | 
				
			||||||
@@ -29,3 +37,11 @@ export function isPhone (s) {
 | 
				
			|||||||
export function isURL (s) {
 | 
					export function isURL (s) {
 | 
				
			||||||
  return /^http[s]?:\/\/.*/.test(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>
 | 
					<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展示内容 -->
 | 
							<!-- tab展示内容 -->
 | 
				
			||||||
		<template v-if="$route.meta.isTab">
 | 
							<template v-if="$route.meta.isTab">
 | 
				
			||||||
			<el-dropdown class="aui-content--tabs-tools">
 | 
								<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-item @click.native="tabsCloseAllHandle()">{{ $t('contentTabs.closeAll') }}</el-dropdown-item>
 | 
				
			||||||
				</el-dropdown-menu>
 | 
									</el-dropdown-menu>
 | 
				
			||||||
			</el-dropdown>
 | 
								</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
 | 
									<el-tab-pane
 | 
				
			||||||
					v-for="item in $store.state.contentTabs"
 | 
										v-for="item in $store.state.contentTabs"
 | 
				
			||||||
					:key="item.name"
 | 
										:key="item.name"
 | 
				
			||||||
					:name="item.name"
 | 
										:name="item.name"
 | 
				
			||||||
					:label="item.title"
 | 
										:label="item.title"
 | 
				
			||||||
					:closable="item.name !== 'home'"
 | 
										:closable="item.name !== ''"
 | 
				
			||||||
					:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }"
 | 
										:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }">
 | 
				
			||||||
				>
 | 
										<!-- <template v-if="item.name === 'home'">
 | 
				
			||||||
					<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>
 | 
											<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>
 | 
										<iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>
 | 
				
			||||||
					<keep-alive v-else>
 | 
										<keep-alive v-else>
 | 
				
			||||||
						<router-view v-if="item.name === $store.state.contentTabsActiveName" />
 | 
											<router-view v-if="item.name === $store.state.contentTabsActiveName" />
 | 
				
			||||||
@@ -44,6 +44,29 @@ export default {
 | 
				
			|||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {}
 | 
							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)
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// setTimeout(function() {
 | 
				
			||||||
 | 
							// 	// 执行代码块
 | 
				
			||||||
 | 
							// 	// 不加.bind(this) 因为使用的是function() 这样函数就不会从你的类组件继承this,所以this是undefined
 | 
				
			||||||
 | 
							// 	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'
 | 
				
			||||||
 | 
							// 	}
 | 
				
			||||||
 | 
							// }.bind(this),0)
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		// tabs, 是否通过iframe展示
 | 
							// tabs, 是否通过iframe展示
 | 
				
			||||||
		tabIsIframe(url) {
 | 
							tabIsIframe(url) {
 | 
				
			||||||
@@ -51,7 +74,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		// tabs, 选中tab
 | 
							// tabs, 选中tab
 | 
				
			||||||
		tabSelectedHandle(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) {
 | 
								if (tab) {
 | 
				
			||||||
				this.$router.push({
 | 
									this.$router.push({
 | 
				
			||||||
					name: tab.name,
 | 
										name: tab.name,
 | 
				
			||||||
@@ -65,10 +88,11 @@ export default {
 | 
				
			|||||||
			if (tabName === 'home') {
 | 
								if (tabName === 'home') {
 | 
				
			||||||
				return false
 | 
									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) {
 | 
								if (this.$store.state.contentTabs.length <= 0) {
 | 
				
			||||||
				this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
 | 
									this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
 | 
				
			||||||
				return false
 | 
									// return false
 | 
				
			||||||
 | 
									this.$router.push({ name: 'home' })
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			// 当前选中tab被删除
 | 
								// 当前选中tab被删除
 | 
				
			||||||
			if (tabName === this.$store.state.contentTabsActiveName) {
 | 
								if (tabName === this.$store.state.contentTabsActiveName) {
 | 
				
			||||||
@@ -82,13 +106,14 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		// tabs, 关闭其它
 | 
							// tabs, 关闭其它
 | 
				
			||||||
		tabsCloseOtherHandle() {
 | 
							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
 | 
									return item.name === 'home' || item.name === this.$store.state.contentTabsActiveName
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		// tabs, 关闭全部
 | 
							// tabs, 关闭全部
 | 
				
			||||||
		tabsCloseAllHandle() {
 | 
							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' })
 | 
								this.$router.push({ name: 'home' })
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<el-dialog :visible.sync="visible" :title="$t('updatePassword.title')" :close-on-click-modal="false" :close-on-press-escape="false" :append-to-body="true">
 | 
						<el-dialog :visible.sync="visible" :title="$t('updatePassword.title')" :close-on-click-modal="false" :close-on-press-escape="false" :append-to-body="true">
 | 
				
			||||||
		<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
							<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="170px">
 | 
				
			||||||
			<el-form-item :label="$t('updatePassword.username')">
 | 
								<el-form-item :label="$t('updatePassword.username')">
 | 
				
			||||||
				<span>{{ $store.state.user.name }}</span>
 | 
									<span>{{ $store.state.user.name }}</span>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,36 +1,55 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<nav
 | 
						<nav
 | 
				
			||||||
		class="aui-navbar"
 | 
							class="aui-navbar"
 | 
				
			||||||
		:class="`aui-navbar--${$store.state.navbarLayoutType}`"
 | 
							: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">
 | 
							<div class="aui-navbar__header">
 | 
				
			||||||
			<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
 | 
								<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
 | 
				
			||||||
				<a class="aui-navbar__brand-lg" href="javascript:;">{{
 | 
									<a class="aui-navbar__brand-lg" href="javascript:;">
 | 
				
			||||||
					$t('brand.lg')
 | 
										<!-- 36px -->
 | 
				
			||||||
				}}</a>
 | 
										<img src="../assets/img/logo2.png" style="width: 30.8px; height: 26px; position: relative; top: -0.075em; margin-right: 12px" alt="" />
 | 
				
			||||||
				<a class="aui-navbar__brand-mini" href="javascript:;">{{
 | 
										{{ $t('brand.lg') }}
 | 
				
			||||||
					$t('brand.mini')
 | 
									</a>
 | 
				
			||||||
				}}</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>
 | 
								</h1>
 | 
				
			||||||
		</div>
 | 
							</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 class="aui-navbar__menu mr-auto" mode="horizontal">
 | 
				
			||||||
				<el-menu-item
 | 
									<el-menu-item
 | 
				
			||||||
 | 
										v-if="this.$route.meta.hiddenSiderbar !== true"
 | 
				
			||||||
					index="1"
 | 
										index="1"
 | 
				
			||||||
					@click="$store.state.sidebarFold = !$store.state.sidebarFold"
 | 
										@click="$store.state.sidebarFold = !$store.state.sidebarFold"
 | 
				
			||||||
				>
 | 
										:style="{
 | 
				
			||||||
					<svg
 | 
											backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
 | 
				
			||||||
						class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
 | 
											color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
 | 
				
			||||||
						aria-hidden="true"
 | 
										}">
 | 
				
			||||||
					>
 | 
										<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true">
 | 
				
			||||||
						<use xlink:href="#icon-outdent"></use>
 | 
											<use xlink:href="#icon-outdent"></use>
 | 
				
			||||||
					</svg>
 | 
										</svg>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
				<el-menu-item index="2" @click="refresh()">
 | 
									<el-menu-item
 | 
				
			||||||
					<svg
 | 
										v-if="this.$route.meta.hiddenSiderbar !== true"
 | 
				
			||||||
						class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh"
 | 
										index="2"
 | 
				
			||||||
						aria-hidden="true"
 | 
										@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>
 | 
											<use xlink:href="#icon-sync"></use>
 | 
				
			||||||
					</svg>
 | 
										</svg>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
@@ -46,80 +65,251 @@
 | 
				
			|||||||
						<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#gitee"></use></svg>
 | 
											<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#gitee"></use></svg>
 | 
				
			||||||
					</a>
 | 
										</a>
 | 
				
			||||||
				</el-menu-item> -->
 | 
									</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-dropdown
 | 
										<el-badge :hidden="alarmNum > 0 ? false : true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm">
 | 
				
			||||||
						placement="bottom"
 | 
											<svg-icon style="width: 24px; height: 24px" class="item-icon" icon-class="alarm" />
 | 
				
			||||||
						:show-timeout="0"
 | 
										</el-badge>
 | 
				
			||||||
						@command="handleCommand"
 | 
										<el-dropdown-menu slot="dropdown">
 | 
				
			||||||
					>
 | 
											<el-dropdown-item>暂无数据</el-dropdown-item>
 | 
				
			||||||
						<span class="el-dropdown-link">
 | 
										</el-dropdown-menu>
 | 
				
			||||||
							<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
 | 
									</el-dropdown> -->
 | 
				
			||||||
								<use xlink:href="#icon-earth"></use>
 | 
									<!-- <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>
 | 
				
			||||||
 | 
												<!-- <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>
 | 
												</svg>
 | 
				
			||||||
							<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
 | 
												<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
 | 
				
			||||||
						</span>
 | 
											</span>
 | 
				
			||||||
						<el-dropdown-menu slot="dropdown">
 | 
											<el-dropdown-menu slot="dropdown">
 | 
				
			||||||
							<el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN"
 | 
												<el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN">中文</el-dropdown-item>
 | 
				
			||||||
								>中文</el-dropdown-item
 | 
												<el-dropdown-item :disabled="getLang() === 'en'" command="toEN">English</el-dropdown-item>
 | 
				
			||||||
							>
 | 
					 | 
				
			||||||
							<el-dropdown-item :disabled="getLang() === 'en'" command="toEN"
 | 
					 | 
				
			||||||
								>En</el-dropdown-item
 | 
					 | 
				
			||||||
							>
 | 
					 | 
				
			||||||
						</el-dropdown-menu>
 | 
											</el-dropdown-menu>
 | 
				
			||||||
					</el-dropdown>
 | 
										</el-dropdown>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
				<el-menu-item index="4" @click="fullscreenHandle()">
 | 
									<!-- <el-menu-item
 | 
				
			||||||
					<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'
 | 
				
			||||||
 | 
										}">
 | 
				
			||||||
 | 
										<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'
 | 
				
			||||||
 | 
										}">
 | 
				
			||||||
 | 
										<a href="google.exe" >
 | 
				
			||||||
 | 
											<!-- <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>
 | 
											<use xlink:href="#icon-fullscreen"></use>
 | 
				
			||||||
					</svg>
 | 
										</svg>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
				<el-menu-item index="5" class="aui-navbar__avatar">
 | 
									<el-menu-item
 | 
				
			||||||
					<el-dropdown placement="bottom" :show-timeout="0">
 | 
										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">
 | 
											<span class="el-dropdown-link">
 | 
				
			||||||
							<img src="~@/assets/img/avatar.png" />
 | 
												<img src="~@/assets/img/avatar.png" />
 | 
				
			||||||
							<span>{{ $store.state.user.name }}</span>
 | 
												<span>{{ $store.state.user.name }}</span>
 | 
				
			||||||
							<i class="el-icon-arrow-down"></i>
 | 
												<i class="el-icon-arrow-down"></i>
 | 
				
			||||||
						</span>
 | 
											</span>
 | 
				
			||||||
						<el-dropdown-menu slot="dropdown">
 | 
											<el-dropdown-menu slot="dropdown">
 | 
				
			||||||
							<el-dropdown-item @click.native="updatePasswordHandle()">{{
 | 
												<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
 | 
				
			||||||
								$t('updatePassword.title')
 | 
												<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
 | 
				
			||||||
							}}</el-dropdown-item>
 | 
					 | 
				
			||||||
							<el-dropdown-item @click.native="logoutHandle()">{{
 | 
					 | 
				
			||||||
								$t('logout')
 | 
					 | 
				
			||||||
							}}</el-dropdown-item>
 | 
					 | 
				
			||||||
						</el-dropdown-menu>
 | 
											</el-dropdown-menu>
 | 
				
			||||||
					</el-dropdown>
 | 
										</el-dropdown>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
			</el-menu>
 | 
								</el-menu>
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
		<!-- 弹窗, 修改密码 -->
 | 
							<!-- 弹窗, 修改密码 -->
 | 
				
			||||||
		<update-password
 | 
							<update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password>
 | 
				
			||||||
			v-if="updatePasswordVisible"
 | 
					 | 
				
			||||||
			ref="updatePassword"
 | 
					 | 
				
			||||||
		></update-password>
 | 
					 | 
				
			||||||
	</nav>
 | 
						</nav>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					// import Hamburger from '@/components/Hamburger'
 | 
				
			||||||
import Cookies from 'js-cookie'
 | 
					import Cookies from 'js-cookie'
 | 
				
			||||||
import screenfull from 'screenfull'
 | 
					import screenfull from 'screenfull'
 | 
				
			||||||
import UpdatePassword from './main-navbar-update-password'
 | 
					import UpdatePassword from './main-navbar-update-password'
 | 
				
			||||||
import { clearLoginInfo } from '@/utils'
 | 
					import { clearLoginInfo } from '@/utils'
 | 
				
			||||||
 | 
					import moment from 'moment'
 | 
				
			||||||
 | 
					// let logoutInterval = null
 | 
				
			||||||
 | 
					// const timeInterval = null
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
	inject: ['refresh'],
 | 
						// inject: ['refresh'],
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
 | 
								// logoutTime: 1800000,
 | 
				
			||||||
			updatePasswordVisible: false,
 | 
								updatePasswordVisible: false,
 | 
				
			||||||
			messageTip: 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: {
 | 
						components: {
 | 
				
			||||||
		UpdatePassword
 | 
							UpdatePassword
 | 
				
			||||||
 | 
							// Hamburger
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						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() {
 | 
							getLang() {
 | 
				
			||||||
			return Cookies.get('language')
 | 
								return Cookies.get('language')
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							refresh() {
 | 
				
			||||||
 | 
								this.$router.go(0)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 切换语言环境
 | 
							// 切换语言环境
 | 
				
			||||||
		handleCommand(command) {
 | 
							handleCommand(command) {
 | 
				
			||||||
			// 切换语言选项时,可能需要手动刷新页面
 | 
								// 切换语言选项时,可能需要手动刷新页面
 | 
				
			||||||
@@ -128,11 +318,11 @@ export default {
 | 
				
			|||||||
					this.$root.$i18n.locale = 'zh-CN'
 | 
										this.$root.$i18n.locale = 'zh-CN'
 | 
				
			||||||
					window.navigator.language = 'zh-cn'
 | 
										window.navigator.language = 'zh-cn'
 | 
				
			||||||
					break
 | 
										break
 | 
				
			||||||
					case 'toEN':
 | 
									case 'toEN':
 | 
				
			||||||
						console.log('root', this.$root.$i18n.locale)
 | 
										console.log('root', this.$root.$i18n.locale)
 | 
				
			||||||
						this.$root.$i18n.locale = 'en'
 | 
										this.$root.$i18n.locale = 'en'
 | 
				
			||||||
						location.reload()
 | 
										location.reload()
 | 
				
			||||||
						window.navigator.language = 'en-US'
 | 
										window.navigator.language = 'en-US'
 | 
				
			||||||
					break
 | 
										break
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -154,17 +344,16 @@ export default {
 | 
				
			|||||||
				this.$refs.updatePassword.init()
 | 
									this.$refs.updatePassword.init()
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							async toHome() {
 | 
				
			||||||
 | 
								this.$router.push('/')
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 退出
 | 
							// 退出
 | 
				
			||||||
		logoutHandle() {
 | 
							logoutHandle() {
 | 
				
			||||||
			this.$confirm(
 | 
								this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
 | 
				
			||||||
				this.$t('prompt.info', { handle: this.$t('logout') }),
 | 
									confirmButtonText: this.$t('confirm'),
 | 
				
			||||||
				this.$t('prompt.title'),
 | 
									cancelButtonText: this.$t('cancel'),
 | 
				
			||||||
				{
 | 
									type: 'warning'
 | 
				
			||||||
					confirmButtonText: this.$t('confirm'),
 | 
								})
 | 
				
			||||||
					cancelButtonText: this.$t('cancel'),
 | 
					 | 
				
			||||||
					type: 'warning'
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			)
 | 
					 | 
				
			||||||
				.then(() => {
 | 
									.then(() => {
 | 
				
			||||||
					this.$http
 | 
										this.$http
 | 
				
			||||||
						.post(this.$http.adornUrl('/logout'))
 | 
											.post(this.$http.adornUrl('/logout'))
 | 
				
			||||||
@@ -182,3 +371,4 @@ export default {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]">
 | 
						<!-- <aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]"> -->
 | 
				
			||||||
		<div class="aui-sidebar__inner">
 | 
						<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
 | 
								<el-menu
 | 
				
			||||||
				:default-active="$store.state.sidebarMenuActiveName"
 | 
									:default-active="$store.state.sidebarMenuActiveName"
 | 
				
			||||||
				:collapse="$store.state.sidebarFold"
 | 
									:collapse="$store.state.sidebarFold"
 | 
				
			||||||
@@ -28,7 +29,7 @@ export default {
 | 
				
			|||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
		// this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
 | 
							// this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
 | 
				
			||||||
		this.$nextTick(() => {
 | 
							this.$nextTick(() => {
 | 
				
			||||||
			console.log(`window.SITE_CONFIG['menuList']`, window.SITE_CONFIG['menuList'])
 | 
								// console.log(`window.SITE_CONFIG['menuList']`, window.SITE_CONFIG['menuList'])
 | 
				
			||||||
			this.unhiddenMenuList = this.getUnhiddenRoutesListFrom(window.SITE_CONFIG['menuList'])
 | 
								this.unhiddenMenuList = this.getUnhiddenRoutesListFrom(window.SITE_CONFIG['menuList'])
 | 
				
			||||||
			/** 本地保存一份,store保存一份,感觉 store 都不需要保存... */
 | 
								/** 本地保存一份,store保存一份,感觉 store 都不需要保存... */
 | 
				
			||||||
			this.$store.state.sidebarMenuList = this.unhiddenMenuList
 | 
								this.$store.state.sidebarMenuList = this.unhiddenMenuList
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,18 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div v-loading.fullscreen.lock="loading" :element-loading-text="$t('loading')" :class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]">
 | 
						<div v-loading.fullscreen.lock="loading" :element-loading-text="$t('loading')" :class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]">
 | 
				
			||||||
		<template v-if="!loading">
 | 
							<template v-if="!loading">
 | 
				
			||||||
			<main-navbar />
 | 
								<main-navbar/>
 | 
				
			||||||
			<main-sidebar />
 | 
								<main-sidebar v-if="this.$route.meta.hiddenSiderbar !== true"/>
 | 
				
			||||||
			<div class="aui-content__wrapper">
 | 
								<div :class="[this.$route.meta.hiddenSiderbar !== true? 'aui-content__wrapper':'aui-sidebar.close']">
 | 
				
			||||||
				<main-content v-if="!$store.state.contentIsNeedRefresh" />
 | 
									<main-content v-if="!$store.state.contentIsNeedRefresh" />
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
 | 
								<footerbar />
 | 
				
			||||||
		</template>
 | 
							</template>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					import Footerbar from './Footerbar'
 | 
				
			||||||
import MainNavbar from './main-navbar'
 | 
					import MainNavbar from './main-navbar'
 | 
				
			||||||
import MainSidebar from './main-sidebar'
 | 
					import MainSidebar from './main-sidebar'
 | 
				
			||||||
import MainContent from './main-content'
 | 
					import MainContent from './main-content'
 | 
				
			||||||
@@ -35,7 +37,8 @@ export default {
 | 
				
			|||||||
	components: {
 | 
						components: {
 | 
				
			||||||
		MainNavbar,
 | 
							MainNavbar,
 | 
				
			||||||
		MainSidebar,
 | 
							MainSidebar,
 | 
				
			||||||
		MainContent
 | 
							MainContent,
 | 
				
			||||||
 | 
							Footerbar
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	watch: {
 | 
						watch: {
 | 
				
			||||||
		$route: 'routeHandle'
 | 
							$route: 'routeHandle'
 | 
				
			||||||
@@ -50,11 +53,13 @@ export default {
 | 
				
			|||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		// 窗口改变大小
 | 
							// 窗口改变大小
 | 
				
			||||||
		windowResizeHandle() {
 | 
							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(
 | 
								window.addEventListener(
 | 
				
			||||||
				'resize',
 | 
									'resize',
 | 
				
			||||||
 | 
									// 防抖
 | 
				
			||||||
				debounce(() => {
 | 
									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)
 | 
									}, 150)
 | 
				
			||||||
			)
 | 
								)
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -63,6 +68,7 @@ export default {
 | 
				
			|||||||
			if (!route.meta.isTab) {
 | 
								if (!route.meta.isTab) {
 | 
				
			||||||
				return false
 | 
									return false
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								// console.log('tab',this.$store.state.contentTabs);
 | 
				
			||||||
			var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0]
 | 
								var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0]
 | 
				
			||||||
			if (!tab) {
 | 
								if (!tab) {
 | 
				
			||||||
				tab = {
 | 
									tab = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,32 +1,244 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<el-card shadow="never" class="aui-card--fill">
 | 
						<div class="choicepart-container">
 | 
				
			||||||
		<div class="mod-home">
 | 
							<!-- <div class="choicepat-navbar">
 | 
				
			||||||
			<h3>项目介绍</h3>
 | 
					      <navbar :showhome="false" :show-title="true" />
 | 
				
			||||||
			<ul>
 | 
					    </div> -->
 | 
				
			||||||
				<li>
 | 
							<div class="choicepart-box">
 | 
				
			||||||
					renren-ui基于vue、element-ui构建开发,实现<a href="https://gitee.com/renrenio/renren-ui" target="_blank">renren-security</a>后台管理前端功能,提供一套更优的前端解决方案
 | 
								<div v-for="(item, index) in routeList" :key="item.path" class="choicepart-item" @click="handelClick(item, index)">
 | 
				
			||||||
				</li>
 | 
									<!-- :style="{ background: colorArr.colorList[index % 9] }" -->
 | 
				
			||||||
				<li>前后端分离,通过token进行数据交互,可独立部署</li>
 | 
									<div class="choicepart-item-border">
 | 
				
			||||||
				<li>动态菜单,通过菜单管理统一管理访问路由</li>
 | 
										<img :src="require(`../../assets/img/choicepart/${item.name}.png`)" alt="" />
 | 
				
			||||||
				<li>演示地址:<a href="http://demo.open.renren.io/renren-security" target="_blank">http://demo.open.renren.io/renren-security</a> (账号密码:admin/admin)</li>
 | 
									</div>
 | 
				
			||||||
			</ul>
 | 
									<div class="choicepart-item-title" :title="item.name">{{ item.name }}</div>
 | 
				
			||||||
			<h3>获取帮助</h3>
 | 
								</div>
 | 
				
			||||||
			<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>
 | 
							</div>
 | 
				
			||||||
	</el-card>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style>
 | 
					<script>
 | 
				
			||||||
.mod-home {
 | 
					// import db from '@/utils/indexDB'
 | 
				
			||||||
	line-height: 1.5;
 | 
					// 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
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</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;
 | 
				
			||||||
 | 
					//   flex布局
 | 
				
			||||||
 | 
						.choicepart-box {
 | 
				
			||||||
 | 
							display: flex;
 | 
				
			||||||
 | 
							flex-flow: row wrap;
 | 
				
			||||||
 | 
							justify-content: center;
 | 
				
			||||||
 | 
							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, 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, 0.1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					::-webkit-scrollbar {
 | 
				
			||||||
 | 
						//滚动条的宽度
 | 
				
			||||||
 | 
						width: 9px;
 | 
				
			||||||
 | 
						height: 9px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					::-webkit-scrollbar-thumb {
 | 
				
			||||||
 | 
						//滚动条的设置
 | 
				
			||||||
 | 
						background-color: #dddddd;
 | 
				
			||||||
 | 
						background-clip: padding-box;
 | 
				
			||||||
 | 
						min-height: 28px;
 | 
				
			||||||
 | 
						border-radius: 9px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					::-webkit-scrollbar-thumb:hover {
 | 
				
			||||||
 | 
						background-color: #bbb;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
 | 
					  <el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
 | 
				
			||||||
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
					    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="170px">
 | 
				
			||||||
      <el-form-item prop="beanName" :label="$t('schedule.beanName')">
 | 
					      <el-form-item prop="beanName" :label="$t('schedule.beanName')">
 | 
				
			||||||
        <el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
 | 
					        <el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
@@ -58,6 +58,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
    init () {
 | 
					    init () {
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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>
 | 
					<template>
 | 
				
			||||||
  <el-dialog :visible.sync="visible" :title="$t('schedule.log')" :close-on-click-modal="false" :close-on-press-escape="false" width="75%">
 | 
					  <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-form-item>
 | 
				
			||||||
        <el-input v-model="dataForm.jobId" :placeholder="$t('schedule.jobId')" clearable></el-input>
 | 
					        <el-input v-model="dataForm.jobId" :placeholder="$t('schedule.jobId')" clearable></el-input>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <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-form>
 | 
					    </el-form>
 | 
				
			||||||
    <el-table
 | 
					    <el-table
 | 
				
			||||||
@@ -56,6 +67,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
    init () {
 | 
					    init () {
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      this.getDataList()
 | 
					      this.getDataList()
 | 
				
			||||||
@@ -72,3 +89,20 @@ export default {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</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,75 +1,72 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-card shadow="never" class="aui-card--fill">
 | 
						<el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
    <div class="mod-job__schedule">
 | 
							<div class="mod-job__schedule">
 | 
				
			||||||
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
 | 
								<el-form :inline="true" :model="dataForm" ref="form" @keyup.enter.native="currentChangeHandle(dataForm.beanName)" class="blueTip" size="small">
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
 | 
										{{ $t('schedule.beanName') }}
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
 | 
										<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
 | 
										<el-button class="buttonColor" @click="currentChangeHandle(dataForm.beanName)">{{ $t('query') }}</el-button>
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
 | 
										<el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
 | 
										<el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
 | 
										<el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
 | 
										<el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
									<el-form-item>
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:log')" type="success" @click="logHandle()">{{ $t('schedule.log') }}</el-button>
 | 
										<el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
 | 
				
			||||||
        </el-form-item>
 | 
									</el-form-item>
 | 
				
			||||||
      </el-form>
 | 
									<el-form-item>
 | 
				
			||||||
      <el-table
 | 
										<el-button v-if="$hasPermission('sys:schedule:log')" type="success" @click="logHandle()">{{ $t('schedule.log') }}</el-button>
 | 
				
			||||||
        v-loading="dataListLoading"
 | 
									</el-form-item>
 | 
				
			||||||
        :data="dataList"
 | 
								</el-form>
 | 
				
			||||||
        border
 | 
								<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%">
 | 
				
			||||||
        @selection-change="dataListSelectionChangeHandle"
 | 
									<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
 | 
				
			||||||
        @sort-change="dataListSortChangeHandle"
 | 
									<el-table-column prop="beanName" :label="$t('schedule.beanName')" header-align="center" align="center"></el-table-column>
 | 
				
			||||||
        style="width: 100%;">
 | 
									<el-table-column prop="params" :label="$t('schedule.params')" header-align="center" align="center"></el-table-column>
 | 
				
			||||||
        <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
 | 
									<el-table-column prop="cronExpression" :label="$t('schedule.cronExpression')" header-align="center" align="center"></el-table-column>
 | 
				
			||||||
        <el-table-column prop="beanName" :label="$t('schedule.beanName')" header-align="center" align="center"></el-table-column>
 | 
									<el-table-column prop="remark" :label="$t('schedule.remark')" header-align="center" align="center"></el-table-column>
 | 
				
			||||||
        <el-table-column prop="params" :label="$t('schedule.params')" header-align="center" align="center"></el-table-column>
 | 
									<el-table-column prop="status" :label="$t('schedule.status')" sortable="custom" header-align="center" align="center">
 | 
				
			||||||
        <el-table-column prop="cronExpression" :label="$t('schedule.cronExpression')" header-align="center" align="center"></el-table-column>
 | 
										<template slot-scope="scope">
 | 
				
			||||||
        <el-table-column prop="remark" :label="$t('schedule.remark')" header-align="center" align="center"></el-table-column>
 | 
											<el-tag v-if="scope.row.status === 1" size="small">{{ $t('schedule.status1') }}</el-tag>
 | 
				
			||||||
        <el-table-column prop="status" :label="$t('schedule.status')" sortable="custom" header-align="center" align="center">
 | 
											<el-tag v-else size="small" type="danger">{{ $t('schedule.status0') }}</el-tag>
 | 
				
			||||||
          <template slot-scope="scope">
 | 
										</template>
 | 
				
			||||||
            <el-tag v-if="scope.row.status === 1" size="small">{{ $t('schedule.status1') }}</el-tag>
 | 
									</el-table-column>
 | 
				
			||||||
            <el-tag v-else size="small" type="danger">{{ $t('schedule.status0') }}</el-tag>
 | 
									<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
 | 
				
			||||||
          </template>
 | 
										<template slot-scope="scope">
 | 
				
			||||||
        </el-table-column>
 | 
											<el-button v-if="$hasPermission('sys:schedule:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
 | 
				
			||||||
        <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
 | 
											<el-button v-if="$hasPermission('sys:schedule:pause')" type="text" size="small" @click="pauseHandle(scope.row.id)">{{ $t('schedule.pause') }}</el-button>
 | 
				
			||||||
          <template slot-scope="scope">
 | 
											<el-button v-if="$hasPermission('sys:schedule:resume')" type="text" size="small" @click="resumeHandle(scope.row.id)">{{ $t('schedule.resume') }}</el-button>
 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
 | 
											<el-button v-if="$hasPermission('sys:schedule:run')" type="text" size="small" @click="runHandle(scope.row.id)">{{ $t('schedule.run') }}</el-button>
 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:pause')" type="text" size="small" @click="pauseHandle(scope.row.id)">{{ $t('schedule.pause') }}</el-button>
 | 
											<el-button v-if="$hasPermission('sys:schedule:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:resume')" type="text" size="small" @click="resumeHandle(scope.row.id)">{{ $t('schedule.resume') }}</el-button>
 | 
										</template>
 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:run')" type="text" size="small" @click="runHandle(scope.row.id)">{{ $t('schedule.run') }}</el-button>
 | 
									</el-table-column>
 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
 | 
								</el-table>
 | 
				
			||||||
          </template>
 | 
								<el-pagination
 | 
				
			||||||
        </el-table-column>
 | 
									:current-page="page"
 | 
				
			||||||
      </el-table>
 | 
									:page-sizes="[10, 20, 50, 100]"
 | 
				
			||||||
      <el-pagination
 | 
									:page-size="limit"
 | 
				
			||||||
        :current-page="page"
 | 
									:total="total"
 | 
				
			||||||
        :page-sizes="[10, 20, 50, 100]"
 | 
									layout="total, sizes, prev, pager, next, jumper"
 | 
				
			||||||
        :page-size="limit"
 | 
									@size-change="pageSizeChangeHandle"
 | 
				
			||||||
        :total="total"
 | 
									@current-change="pageCurrentChangeHandle">
 | 
				
			||||||
        layout="total, sizes, prev, pager, next, jumper"
 | 
								</el-pagination>
 | 
				
			||||||
        @size-change="pageSizeChangeHandle"
 | 
								<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
        @current-change="pageCurrentChangeHandle">
 | 
								<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
 | 
				
			||||||
      </el-pagination>
 | 
								<!-- 弹窗, 日志列表 -->
 | 
				
			||||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
								<log v-if="logVisible" ref="log"></log>
 | 
				
			||||||
      <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
 | 
							</div>
 | 
				
			||||||
      <!-- 弹窗, 日志列表 -->
 | 
						</el-card>
 | 
				
			||||||
      <log v-if="logVisible" ref="log"></log>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  </el-card>
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
@@ -77,120 +74,169 @@ import mixinViewModule from '@/mixins/view-module'
 | 
				
			|||||||
import AddOrUpdate from './schedule-add-or-update'
 | 
					import AddOrUpdate from './schedule-add-or-update'
 | 
				
			||||||
import Log from './schedule-log'
 | 
					import Log from './schedule-log'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [mixinViewModule],
 | 
						mixins: [mixinViewModule],
 | 
				
			||||||
  data () {
 | 
						data() {
 | 
				
			||||||
    return {
 | 
							return {
 | 
				
			||||||
      mixinViewModuleOptions: {
 | 
								mixinViewModuleOptions: {
 | 
				
			||||||
        getDataListURL: '/sys/schedule/page',
 | 
									getDataListURL: '/sys/schedule/page',
 | 
				
			||||||
        getDataListIsPage: true,
 | 
									getDataListIsPage: true,
 | 
				
			||||||
        deleteURL: '/sys/schedule',
 | 
									deleteURL: '/sys/schedule',
 | 
				
			||||||
        deleteIsBatch: true
 | 
									deleteIsBatch: true
 | 
				
			||||||
      },
 | 
								},
 | 
				
			||||||
      dataForm: {
 | 
								dataForm: {
 | 
				
			||||||
        beanName: ''
 | 
									beanName: ''
 | 
				
			||||||
      },
 | 
								},
 | 
				
			||||||
      logVisible: false
 | 
								logVisible: false
 | 
				
			||||||
    }
 | 
							}
 | 
				
			||||||
  },
 | 
						},
 | 
				
			||||||
  components: {
 | 
						components: {
 | 
				
			||||||
    AddOrUpdate,
 | 
							AddOrUpdate,
 | 
				
			||||||
    Log
 | 
							Log
 | 
				
			||||||
  },
 | 
						},
 | 
				
			||||||
  methods: {
 | 
						methods: {
 | 
				
			||||||
    // 暂停
 | 
							// destroy dialog
 | 
				
			||||||
    pauseHandle (id) {
 | 
							handleDestroyDialog() {
 | 
				
			||||||
      if (!id && this.dataListSelections.length <= 0) {
 | 
								setTimeout(() => {
 | 
				
			||||||
        return this.$message({
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
          message: this.$t('prompt.deleteBatch'),
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
          type: 'warning',
 | 
							},
 | 
				
			||||||
          duration: 500
 | 
							// 暂停
 | 
				
			||||||
        })
 | 
							pauseHandle(id) {
 | 
				
			||||||
      }
 | 
								if (!id && this.dataListSelections.length <= 0) {
 | 
				
			||||||
      this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {
 | 
									return this.$message({
 | 
				
			||||||
        confirmButtonText: this.$t('confirm'),
 | 
										message: this.$t('prompt.deleteBatch'),
 | 
				
			||||||
        cancelButtonText: this.$t('cancel'),
 | 
										type: 'warning',
 | 
				
			||||||
        type: 'warning'
 | 
										duration: 500
 | 
				
			||||||
      }).then(() => {
 | 
									})
 | 
				
			||||||
        this.$http.put(this.$http.adornUrl('/sys/schedule/pause'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
 | 
								}
 | 
				
			||||||
          if (res.code !== 0) {
 | 
								this.$confirm(this.$t('prompt.info', { handle: this.$t('schedule.pause') }), this.$t('prompt.title'), {
 | 
				
			||||||
            return this.$message.error(res.msg)
 | 
									confirmButtonText: this.$t('confirm'),
 | 
				
			||||||
          }
 | 
									cancelButtonText: this.$t('cancel'),
 | 
				
			||||||
          this.$message({
 | 
									type: 'warning'
 | 
				
			||||||
            message: this.$t('prompt.success'),
 | 
								})
 | 
				
			||||||
            type: 'success',
 | 
									.then(() => {
 | 
				
			||||||
            duration: 500,
 | 
										this.$http
 | 
				
			||||||
            onClose: () => {
 | 
											.put(this.$http.adornUrl('/sys/schedule/pause'), id ? [id] : this.dataListSelections.map((item) => item.id))
 | 
				
			||||||
              this.getDataList()
 | 
											.then(({ data: res }) => {
 | 
				
			||||||
            }
 | 
												if (res.code !== 0) {
 | 
				
			||||||
          })
 | 
													return this.$message.error(res.msg)
 | 
				
			||||||
        }).catch(() => {})
 | 
												}
 | 
				
			||||||
      }).catch(() => {})
 | 
												this.$message({
 | 
				
			||||||
    },
 | 
													message: this.$t('prompt.success'),
 | 
				
			||||||
    // 恢复
 | 
													type: 'success',
 | 
				
			||||||
    resumeHandle (id) {
 | 
													duration: 500,
 | 
				
			||||||
      if (!id && this.dataListSelections.length <= 0) {
 | 
													onClose: () => {
 | 
				
			||||||
        return this.$message({
 | 
														this.getDataList()
 | 
				
			||||||
          message: this.$t('prompt.deleteBatch'),
 | 
													}
 | 
				
			||||||
          type: 'warning',
 | 
												})
 | 
				
			||||||
          duration: 500
 | 
											})
 | 
				
			||||||
        })
 | 
											.catch(() => {})
 | 
				
			||||||
      }
 | 
									})
 | 
				
			||||||
      this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {
 | 
									.catch(() => {})
 | 
				
			||||||
        confirmButtonText: this.$t('confirm'),
 | 
							},
 | 
				
			||||||
        cancelButtonText: this.$t('cancel'),
 | 
							// 恢复
 | 
				
			||||||
        type: 'warning'
 | 
							resumeHandle(id) {
 | 
				
			||||||
      }).then(() => {
 | 
								if (!id && this.dataListSelections.length <= 0) {
 | 
				
			||||||
        this.$http.put(this.$http.adornUrl('/sys/schedule/resume'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
 | 
									return this.$message({
 | 
				
			||||||
          if (res.code !== 0) {
 | 
										message: this.$t('prompt.deleteBatch'),
 | 
				
			||||||
            return this.$message.error(res.msg)
 | 
										type: 'warning',
 | 
				
			||||||
          }
 | 
										duration: 500
 | 
				
			||||||
          this.$message({
 | 
									})
 | 
				
			||||||
            message: this.$t('prompt.success'),
 | 
								}
 | 
				
			||||||
            type: 'success',
 | 
								this.$confirm(this.$t('prompt.info', { handle: this.$t('schedule.resume') }), this.$t('prompt.title'), {
 | 
				
			||||||
            duration: 500,
 | 
									confirmButtonText: this.$t('confirm'),
 | 
				
			||||||
            onClose: () => {
 | 
									cancelButtonText: this.$t('cancel'),
 | 
				
			||||||
              this.getDataList()
 | 
									type: 'warning'
 | 
				
			||||||
            }
 | 
								})
 | 
				
			||||||
          })
 | 
									.then(() => {
 | 
				
			||||||
        }).catch(() => {})
 | 
										this.$http
 | 
				
			||||||
      }).catch(() => {})
 | 
											.put(this.$http.adornUrl('/sys/schedule/resume'), id ? [id] : this.dataListSelections.map((item) => item.id))
 | 
				
			||||||
    },
 | 
											.then(({ data: res }) => {
 | 
				
			||||||
    // 执行
 | 
												if (res.code !== 0) {
 | 
				
			||||||
    runHandle (id) {
 | 
													return this.$message.error(res.msg)
 | 
				
			||||||
      if (!id && this.dataListSelections.length <= 0) {
 | 
												}
 | 
				
			||||||
        return this.$message({
 | 
												this.$message({
 | 
				
			||||||
          message: this.$t('prompt.deleteBatch'),
 | 
													message: this.$t('prompt.success'),
 | 
				
			||||||
          type: 'warning',
 | 
													type: 'success',
 | 
				
			||||||
          duration: 500
 | 
													duration: 500,
 | 
				
			||||||
        })
 | 
													onClose: () => {
 | 
				
			||||||
      }
 | 
														this.getDataList()
 | 
				
			||||||
      this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {
 | 
													}
 | 
				
			||||||
        confirmButtonText: this.$t('confirm'),
 | 
												})
 | 
				
			||||||
        cancelButtonText: this.$t('cancel'),
 | 
											})
 | 
				
			||||||
        type: 'warning'
 | 
											.catch(() => {})
 | 
				
			||||||
      }).then(() => {
 | 
									})
 | 
				
			||||||
        this.$http.put(this.$http.adornUrl('/sys/schedule/run'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
 | 
									.catch(() => {})
 | 
				
			||||||
          if (res.code !== 0) {
 | 
							},
 | 
				
			||||||
            return this.$message.error(res.msg)
 | 
							// 执行
 | 
				
			||||||
          }
 | 
							runHandle(id) {
 | 
				
			||||||
          this.$message({
 | 
								if (!id && this.dataListSelections.length <= 0) {
 | 
				
			||||||
            message: this.$t('prompt.success'),
 | 
									return this.$message({
 | 
				
			||||||
            type: 'success',
 | 
										message: this.$t('prompt.deleteBatch'),
 | 
				
			||||||
            duration: 500,
 | 
										type: 'warning',
 | 
				
			||||||
            onClose: () => {
 | 
										duration: 500
 | 
				
			||||||
              this.getDataList()
 | 
									})
 | 
				
			||||||
            }
 | 
								}
 | 
				
			||||||
          })
 | 
								this.$confirm(this.$t('prompt.info', { handle: this.$t('schedule.run') }), this.$t('prompt.title'), {
 | 
				
			||||||
        }).catch(() => {})
 | 
									confirmButtonText: this.$t('confirm'),
 | 
				
			||||||
      }).catch(() => {})
 | 
									cancelButtonText: this.$t('cancel'),
 | 
				
			||||||
    },
 | 
									type: 'warning'
 | 
				
			||||||
    // 日志列表
 | 
								})
 | 
				
			||||||
    logHandle () {
 | 
									.then(() => {
 | 
				
			||||||
      this.logVisible = true
 | 
										this.$http
 | 
				
			||||||
      this.$nextTick(() => {
 | 
											.put(this.$http.adornUrl('/sys/schedule/run'), id ? [id] : this.dataListSelections.map((item) => item.id))
 | 
				
			||||||
        this.$refs.log.init()
 | 
											.then(({ data: res }) => {
 | 
				
			||||||
      })
 | 
												if (res.code !== 0) {
 | 
				
			||||||
    }
 | 
													return this.$message.error(res.msg)
 | 
				
			||||||
  }
 | 
												}
 | 
				
			||||||
 | 
												this.$message({
 | 
				
			||||||
 | 
													message: this.$t('prompt.success'),
 | 
				
			||||||
 | 
													type: 'success',
 | 
				
			||||||
 | 
													duration: 500,
 | 
				
			||||||
 | 
													onClose: () => {
 | 
				
			||||||
 | 
														this.getDataList()
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
												})
 | 
				
			||||||
 | 
											})
 | 
				
			||||||
 | 
											.catch(() => {})
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
									.catch(() => {})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 日志列表
 | 
				
			||||||
 | 
							logHandle() {
 | 
				
			||||||
 | 
								this.logVisible = true
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.$refs.log.init()
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 当前页
 | 
				
			||||||
 | 
							currentChangeHandle(val) {
 | 
				
			||||||
 | 
								console.log('val', val)
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.dataForm.beanName = val
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
								this.getDataList()
 | 
				
			||||||
 | 
								// this.$refs['form'].resetFields()
 | 
				
			||||||
 | 
								this.dataForm.beanName = ''
 | 
				
			||||||
 | 
								console.log('this.dataForm', this.dataForm)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</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>
 | 
				
			||||||
							
								
								
									
										788
									
								
								src/views/modules/monitoring/equProductTimesequence.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,788 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
						<div class="mod-config">
 | 
				
			||||||
 | 
							<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('pl.name') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<!-- 产线 -->
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-select v-model="lineIds" :placeholder="$t('pl.name')" @change="handleProductLineChange" clearable filterable multiple>
 | 
				
			||||||
 | 
										<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.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="sectionIds" :placeholder="$t('pl.process')" clearable filterable multiple>
 | 
				
			||||||
 | 
										<el-option v-for="ws in wsList" :key="ws.id" :value="ws.id" :label="ws.name" />
 | 
				
			||||||
 | 
									</el-select>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<!-- 时间 -->
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('time') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<!-- type="datetimerange" -->
 | 
				
			||||||
 | 
									<!-- <el-date-picker
 | 
				
			||||||
 | 
										type="daterange"
 | 
				
			||||||
 | 
										v-model="datetime"
 | 
				
			||||||
 | 
										value-format="yyyy-MM-ddTHH:mm:ss"
 | 
				
			||||||
 | 
										:start-placeholder="$t('startTime')"
 | 
				
			||||||
 | 
										:end-placeholder="$t('endTime')"
 | 
				
			||||||
 | 
										:range-separator="$t('to')"
 | 
				
			||||||
 | 
										:default-time="['00:00:00', '23:59:59']"
 | 
				
			||||||
 | 
										:picker-options="quickOptions"
 | 
				
			||||||
 | 
										clearable /> -->
 | 
				
			||||||
 | 
									<el-date-picker v-model="datetime" type="date" :placeholder="$t('hints.date')" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<!-- 查询 -->
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<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-item>
 | 
				
			||||||
 | 
									<el-button type="success" @click="addEq()">{{ $t('pl.add2') }}</el-button>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
							</el-form>
 | 
				
			||||||
 | 
							<el-dialog :visible.sync="dialogVisible" :title="$t('pl.add')" width="30%">
 | 
				
			||||||
 | 
								<el-select v-model="eqId" style="width: 100%" :placeholder="$t('pl.choose')" clearable filterable>
 | 
				
			||||||
 | 
									<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">{{ $t('pl.cancel') }}</el-button>
 | 
				
			||||||
 | 
									<!-- @click="dialogConfirm" -->
 | 
				
			||||||
 | 
									<el-button type="primary" @click="dialogConfirm">{{ $t('pl.confirm') }}</el-button>
 | 
				
			||||||
 | 
								</div>
 | 
				
			||||||
 | 
							</el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<div class="quality-inspection-current base-container">
 | 
				
			||||||
 | 
								<!-- <el-row>
 | 
				
			||||||
 | 
									<el-col>
 | 
				
			||||||
 | 
										<small-title :size="'md'">{{ $t('inspect.ioTotal') }}</small-title>
 | 
				
			||||||
 | 
										<el-row style="margin-top: 12px;">
 | 
				
			||||||
 | 
											<base-table :data="dataListStatic" :table-head-configs="tableConfigStatic" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
				
			||||||
 | 
										</el-row>
 | 
				
			||||||
 | 
									</el-col>
 | 
				
			||||||
 | 
								</el-row> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<!-- style="margin-top: 28px;" -->
 | 
				
			||||||
 | 
								<el-row>
 | 
				
			||||||
 | 
									<el-col>
 | 
				
			||||||
 | 
										<el-row>
 | 
				
			||||||
 | 
											<small-title :size="'md'">{{ $t('diagram2'), }}</small-title>
 | 
				
			||||||
 | 
										</el-row>
 | 
				
			||||||
 | 
										<!-- <el-row style="margin-top: 8px">
 | 
				
			||||||
 | 
											<el-radio-group v-model="dataType" size="medium" @change="handleDataTypeChange">
 | 
				
			||||||
 | 
												<el-radio-button :label="$t('table2')"></el-radio-button>
 | 
				
			||||||
 | 
												<el-radio-button :label="$t('graph')"></el-radio-button>
 | 
				
			||||||
 | 
											</el-radio-group>
 | 
				
			||||||
 | 
										</el-row> -->
 | 
				
			||||||
 | 
										<!-- style="margin-top: 12px" -->
 | 
				
			||||||
 | 
										<!-- <el-row>
 | 
				
			||||||
 | 
											<base-table
 | 
				
			||||||
 | 
												:data="dataList"
 | 
				
			||||||
 | 
												:table-head-configs="tableConfigDynamic"
 | 
				
			||||||
 | 
												:max-height="500"
 | 
				
			||||||
 | 
												@operate-event="handleOperations"
 | 
				
			||||||
 | 
												@refreshDataList="getDataList" />
 | 
				
			||||||
 | 
										</el-row> -->
 | 
				
			||||||
 | 
										<!-- :series-data="echartsData"  -->
 | 
				
			||||||
 | 
										<!-- v-else -->
 | 
				
			||||||
 | 
										<el-row>
 | 
				
			||||||
 | 
											<fake-chart :categories="echartCategories" :type-list="echartCheckTypes" :series="series" :keys="keys" />
 | 
				
			||||||
 | 
										</el-row>
 | 
				
			||||||
 | 
									</el-col>
 | 
				
			||||||
 | 
								</el-row>
 | 
				
			||||||
 | 
							</div>
 | 
				
			||||||
 | 
						</div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
 | 
					import { timeFilter } from '@/utils/filters'
 | 
				
			||||||
 | 
					import moment from 'moment'
 | 
				
			||||||
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
 | 
					import BaseTable from '@/components/base-table'
 | 
				
			||||||
 | 
					import SmallTitle from '@/components/small-title'
 | 
				
			||||||
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
 | 
					import { keys } from 'lodash'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// const tableConfigStatic = [
 | 
				
			||||||
 | 
					// 	{ type: 'index', width: 100, name: i18n.t('index') },
 | 
				
			||||||
 | 
					// 	{ name: i18n.t('pl.title'), prop: 'lineName' },
 | 
				
			||||||
 | 
					// 	{ name: i18n.t('inspect.inTotal'), prop: 'sumUp' },
 | 
				
			||||||
 | 
					// 	{ name: i18n.t('inspect.outTotal'), prop: 'sumDown' },
 | 
				
			||||||
 | 
					// 	{ name: i18n.t('inspect.checkTotal'), prop: 'sumCheck' },
 | 
				
			||||||
 | 
					// 	{ name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: (val) => (val || val === 0 ? `${val}%` : '-') }
 | 
				
			||||||
 | 
					// ]
 | 
				
			||||||
 | 
					const tableConfigDynamic = [
 | 
				
			||||||
 | 
						{ type: 'index', width: 100, name: i18n.t('index') },
 | 
				
			||||||
 | 
						{ name: i18n.t('pl.name'), prop: '0' }
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const FakeChart = {
 | 
				
			||||||
 | 
						name: 'FakeChart',
 | 
				
			||||||
 | 
						props: {
 | 
				
			||||||
 | 
							categories: {
 | 
				
			||||||
 | 
								type: Array,
 | 
				
			||||||
 | 
								default: () => []
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							typeList: {
 | 
				
			||||||
 | 
								type: Array,
 | 
				
			||||||
 | 
								default: () => []
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							keys: {
 | 
				
			||||||
 | 
								type: Array,
 | 
				
			||||||
 | 
								default: () => []
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							series: {
 | 
				
			||||||
 | 
								type: Array,
 | 
				
			||||||
 | 
								default: () => []
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						data() {
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								calcMaxHeight,
 | 
				
			||||||
 | 
								chart: null,
 | 
				
			||||||
 | 
								lineIds: [],
 | 
				
			||||||
 | 
								// 新加
 | 
				
			||||||
 | 
								// keys: [],
 | 
				
			||||||
 | 
								values: [],
 | 
				
			||||||
 | 
								// finalVal: [],
 | 
				
			||||||
 | 
								defaultOpts: {
 | 
				
			||||||
 | 
									grid: {
 | 
				
			||||||
 | 
										left: '5%',
 | 
				
			||||||
 | 
										right: '12%',
 | 
				
			||||||
 | 
										top: '20%',
 | 
				
			||||||
 | 
										bottom: '10%'
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									title: {
 | 
				
			||||||
 | 
										text: i18n.t('eq.productQuantity')
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									tooltip: {
 | 
				
			||||||
 | 
										trigger: 'axis', //坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用
 | 
				
			||||||
 | 
										axisPointer: {
 | 
				
			||||||
 | 
											// 坐标轴指示器,坐标轴触发有效
 | 
				
			||||||
 | 
											type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									legend: {
 | 
				
			||||||
 | 
										orient: 'vertical',
 | 
				
			||||||
 | 
										type: 'scroll',
 | 
				
			||||||
 | 
										top: 10,
 | 
				
			||||||
 | 
										right: 0,
 | 
				
			||||||
 | 
										width: '12%',
 | 
				
			||||||
 | 
										/** 修复文本太长时显示问题 */
 | 
				
			||||||
 | 
										// formatter: function (name) {
 | 
				
			||||||
 | 
										// 	return echarts.format.truncateText(name, 120, '14px Microsoft Yahei', '...')
 | 
				
			||||||
 | 
										// },
 | 
				
			||||||
 | 
										tooltip: {
 | 
				
			||||||
 | 
											show: true
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										/** end */
 | 
				
			||||||
 | 
										data: []
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									xAxis: {
 | 
				
			||||||
 | 
										type: 'category',
 | 
				
			||||||
 | 
										data: [
 | 
				
			||||||
 | 
											'1:00',
 | 
				
			||||||
 | 
											'2:00',
 | 
				
			||||||
 | 
											'3:00',
 | 
				
			||||||
 | 
											'4:00',
 | 
				
			||||||
 | 
											'5:00',
 | 
				
			||||||
 | 
											'6:00',
 | 
				
			||||||
 | 
											'7:00',
 | 
				
			||||||
 | 
											'8:00',
 | 
				
			||||||
 | 
											'9:00',
 | 
				
			||||||
 | 
											'10:00',
 | 
				
			||||||
 | 
											'11:00',
 | 
				
			||||||
 | 
											'12:00',
 | 
				
			||||||
 | 
											'13:00',
 | 
				
			||||||
 | 
											'14:00',
 | 
				
			||||||
 | 
											'15:00',
 | 
				
			||||||
 | 
											'16:00',
 | 
				
			||||||
 | 
											'17:00',
 | 
				
			||||||
 | 
											'18:00',
 | 
				
			||||||
 | 
											'19:00',
 | 
				
			||||||
 | 
											'20:00',
 | 
				
			||||||
 | 
											'21:00',
 | 
				
			||||||
 | 
											'22:00',
 | 
				
			||||||
 | 
											'23:00',
 | 
				
			||||||
 | 
											'24:00'
 | 
				
			||||||
 | 
										],
 | 
				
			||||||
 | 
										// axisLine: {
 | 
				
			||||||
 | 
										// 	show: true,
 | 
				
			||||||
 | 
										// 	lineStyle: {
 | 
				
			||||||
 | 
										// 		color: 'rgba(219,225,255,1)',
 | 
				
			||||||
 | 
										// 		width: 1,
 | 
				
			||||||
 | 
										// 		type: 'solid'
 | 
				
			||||||
 | 
										// 	}
 | 
				
			||||||
 | 
										// },
 | 
				
			||||||
 | 
										axisLabel: {
 | 
				
			||||||
 | 
											//设置x轴的字
 | 
				
			||||||
 | 
											show: true,
 | 
				
			||||||
 | 
											rotate: 0,
 | 
				
			||||||
 | 
											interval: 0 //使x轴横坐标全部显示
 | 
				
			||||||
 | 
											// textStyle: {
 | 
				
			||||||
 | 
											// 	//x轴字体样式
 | 
				
			||||||
 | 
											// 	color: 'rgba(219,225,255,1)',
 | 
				
			||||||
 | 
											// 	margin: 15
 | 
				
			||||||
 | 
											// }
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										// data: ['下片1', '上片1', '磨边机1', '设备13', '钢化炉2', '磨边机2', '设备15', '清洗机1', '钢化炉3']
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									yAxis: {
 | 
				
			||||||
 | 
										type: 'value'
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									series: [
 | 
				
			||||||
 | 
										// dynamic
 | 
				
			||||||
 | 
										// {
 | 
				
			||||||
 | 
										// 	name: '',
 | 
				
			||||||
 | 
										// 	type: 'line',
 | 
				
			||||||
 | 
										// 	data: [],
 | 
				
			||||||
 | 
										// 	label: {
 | 
				
			||||||
 | 
										// 		normal: {
 | 
				
			||||||
 | 
										// 			show: true,
 | 
				
			||||||
 | 
										// 			position: 'top'
 | 
				
			||||||
 | 
										// 		},
 | 
				
			||||||
 | 
										// 		formatter: '{@value}'
 | 
				
			||||||
 | 
										// 	}
 | 
				
			||||||
 | 
										// }
 | 
				
			||||||
 | 
									]
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						watch: {
 | 
				
			||||||
 | 
							categories: {
 | 
				
			||||||
 | 
								handler: function (val, oldVal) {
 | 
				
			||||||
 | 
									if (val && val !== oldVal) {
 | 
				
			||||||
 | 
										// this.defaultOpts.xAxis.data.push(...val)
 | 
				
			||||||
 | 
										this.defaultOpts.xAxis.data = val
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								immediate: true
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							keys: {
 | 
				
			||||||
 | 
								handler: function (val, oldVal) {
 | 
				
			||||||
 | 
									if (val && val !== oldVal) {
 | 
				
			||||||
 | 
										// this.defaultOpts.legend.data.push(...val)
 | 
				
			||||||
 | 
										this.defaultOpts.legend.data = val
 | 
				
			||||||
 | 
										// this.defaultOpts.series.name = val
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								immediate: true
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							series: {
 | 
				
			||||||
 | 
								handler: function (val, oldVal) {
 | 
				
			||||||
 | 
									if (val && val !== oldVal) {
 | 
				
			||||||
 | 
										// this.defaultOpts.legend.data.push(...val)
 | 
				
			||||||
 | 
										this.defaultOpts.series = val
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								immediate: true
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							defaultOpts: {
 | 
				
			||||||
 | 
								handler: function (val) {
 | 
				
			||||||
 | 
									// console.log('defaullt options change: ', val)
 | 
				
			||||||
 | 
									this.setOptions()
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								immediate: true,
 | 
				
			||||||
 | 
								deep: true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						mounted() {
 | 
				
			||||||
 | 
							this.$nextTick(() => {
 | 
				
			||||||
 | 
								this.initChart()
 | 
				
			||||||
 | 
								// console.log('this.defaultOpts.xAxis.data', this.defaultOpts.xAxis.data)
 | 
				
			||||||
 | 
								// console.log('this.keys渲染', this.keys)
 | 
				
			||||||
 | 
								// console.log('this.series渲染', this.series)
 | 
				
			||||||
 | 
								this.setOptions()
 | 
				
			||||||
 | 
								window.addEventListener('resize', () => {
 | 
				
			||||||
 | 
									//监听浏览器窗口大小
 | 
				
			||||||
 | 
									this.chart.resize()
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							initChart() {
 | 
				
			||||||
 | 
								if (!this.chart) {
 | 
				
			||||||
 | 
									this.chart = echarts.init(document.getElementById('bar-chart'))
 | 
				
			||||||
 | 
									this.chart.resize()
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							setOptions(opts) {
 | 
				
			||||||
 | 
								/** prop options */
 | 
				
			||||||
 | 
								if (opts) {
 | 
				
			||||||
 | 
									// console.log('this.keys渲染', this.keys)
 | 
				
			||||||
 | 
									// console.log('this.finalVal渲染', this.finalVal)
 | 
				
			||||||
 | 
									// // 动态添加series
 | 
				
			||||||
 | 
									// for (let l = 0; l < this.finalVal.length; l++) {
 | 
				
			||||||
 | 
									// 	this.defaultOpts.series.push({
 | 
				
			||||||
 | 
									// 		name: this.keys[l],
 | 
				
			||||||
 | 
									// 		type: 'line',
 | 
				
			||||||
 | 
									// 		// stack: '总量',
 | 
				
			||||||
 | 
									// 		data: this.finalVal[l]
 | 
				
			||||||
 | 
									// 	})
 | 
				
			||||||
 | 
									// }
 | 
				
			||||||
 | 
									// console.log('之后的defaultOpts',this.defaultOpts);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (this.chart) this.chart.setOption(this.defaultOpts, true)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						render: function (h) {
 | 
				
			||||||
 | 
							return h('div', { attrs: { id: 'bar-chart' }, style: { background: '#eee', width: '100%', height: '300px', padding: '8px' } }, '')
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const dict = [i18n.t('table2'), i18n.t('graph')]
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
						name: 'QualityInspectionCurrent',
 | 
				
			||||||
 | 
						components: { BaseTable, SmallTitle, FakeChart },
 | 
				
			||||||
 | 
						data() {
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								// 新加
 | 
				
			||||||
 | 
								values: [],
 | 
				
			||||||
 | 
								values2: [],
 | 
				
			||||||
 | 
								keys: [], // 设备名动态series
 | 
				
			||||||
 | 
								finalVal: [],
 | 
				
			||||||
 | 
								series: [],
 | 
				
			||||||
 | 
								equipments: {},
 | 
				
			||||||
 | 
								wsList: [],
 | 
				
			||||||
 | 
								dialogVisible: false,
 | 
				
			||||||
 | 
								eqId: null,
 | 
				
			||||||
 | 
								dialogEqList: [],
 | 
				
			||||||
 | 
								count: 0,
 | 
				
			||||||
 | 
								// 产线默认产线1
 | 
				
			||||||
 | 
								// lineIds: ['1'],
 | 
				
			||||||
 | 
								lineIds: [],
 | 
				
			||||||
 | 
								sectionIds: [],
 | 
				
			||||||
 | 
								lineList: [],
 | 
				
			||||||
 | 
								// tableConfigStatic,
 | 
				
			||||||
 | 
								tableConfigDynamic,
 | 
				
			||||||
 | 
								datetime: new Date(),
 | 
				
			||||||
 | 
								dataListStatic: [],
 | 
				
			||||||
 | 
								dataListDynamic: [],
 | 
				
			||||||
 | 
								dataList: [],
 | 
				
			||||||
 | 
								dict,
 | 
				
			||||||
 | 
								dataType: dict[0], // 表格 | 图形
 | 
				
			||||||
 | 
								showGraph: false,
 | 
				
			||||||
 | 
								// quickOptions: {
 | 
				
			||||||
 | 
								// 	shortcuts: [
 | 
				
			||||||
 | 
								// 		{
 | 
				
			||||||
 | 
								// 			text: i18n.t('today'),
 | 
				
			||||||
 | 
								// 			onClick(picker) {
 | 
				
			||||||
 | 
								// 				const baseTime = moment().set({ hour: 0, minute: 0, second: 0, millisecond: 0 })
 | 
				
			||||||
 | 
								// 				const startTime = baseTime.format('yyyy-MM-DDTHH:mm:ss')
 | 
				
			||||||
 | 
								// 				const endTime = baseTime.set({ hour: 23, minute: 59, second: 59, millisecond: 999 }).format('yyyy-MM-DDTHH:mm:ss')
 | 
				
			||||||
 | 
								// 				picker.$emit('pick', [startTime, endTime])
 | 
				
			||||||
 | 
								// 			}
 | 
				
			||||||
 | 
								// 		}
 | 
				
			||||||
 | 
								// 	]
 | 
				
			||||||
 | 
								// },
 | 
				
			||||||
 | 
								echartCategories: null,
 | 
				
			||||||
 | 
								echartCheckTypes: [],
 | 
				
			||||||
 | 
								interval: null
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						computed: {
 | 
				
			||||||
 | 
							equipmentCount: function () {
 | 
				
			||||||
 | 
								return Object.keys(this.equipments).length
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						created() {
 | 
				
			||||||
 | 
							this.getEqList()
 | 
				
			||||||
 | 
							this.getLineList()
 | 
				
			||||||
 | 
							this.getWorksetionList()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.interval = setInterval(() => {
 | 
				
			||||||
 | 
								this.$message.info(i18n.t('refresh'))
 | 
				
			||||||
 | 
								// this.dataListStatic.splice(0)
 | 
				
			||||||
 | 
								this.series.splice(0)
 | 
				
			||||||
 | 
								this.getDataList()
 | 
				
			||||||
 | 
							}, 1000 * 5 * 60)
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						// activated() {
 | 
				
			||||||
 | 
						// 	this.getLineList()
 | 
				
			||||||
 | 
						// 	// this.handleProductLineChange(this.lineIds)
 | 
				
			||||||
 | 
						// 	// .then(() => {
 | 
				
			||||||
 | 
						// 	this.getWorksetionList()
 | 
				
			||||||
 | 
						// 	// })
 | 
				
			||||||
 | 
						// },
 | 
				
			||||||
 | 
						deactivated() {
 | 
				
			||||||
 | 
							if (this.interval) {
 | 
				
			||||||
 | 
								clearInterval(this.interval)
 | 
				
			||||||
 | 
								this.interval = null
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							// 产线
 | 
				
			||||||
 | 
							getLineList() {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
 | 
									method: 'get'
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
 | 
										this.lineList = data.data
 | 
				
			||||||
 | 
										// console.log('产线数组', this.lineList)
 | 
				
			||||||
 | 
										/** set default 默认*/
 | 
				
			||||||
 | 
										// if (this.lineList.length) {
 | 
				
			||||||
 | 
										// 	this.lineIds = [this.lineList[this.lineList.length - 1].id]
 | 
				
			||||||
 | 
										// }
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.lineList = []
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									// 这样可以出数据
 | 
				
			||||||
 | 
									this.getDataList()
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleOperations() {},
 | 
				
			||||||
 | 
							handleDataTypeChange(value) {
 | 
				
			||||||
 | 
								this.showGraph = value === dict[0] ? false : true
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取工序列表
 | 
				
			||||||
 | 
							getWorksetionList() {
 | 
				
			||||||
 | 
								// 分页列表才有根据产线过滤功能
 | 
				
			||||||
 | 
								// this.wsList = []
 | 
				
			||||||
 | 
								for (let i = 0; i < this.lineIds.length; i++) {
 | 
				
			||||||
 | 
									this.$http({
 | 
				
			||||||
 | 
										// url: this.$http.adornUrl('/monitoring/workshopSection/list'),
 | 
				
			||||||
 | 
										url: this.$http.adornUrl('/monitoring/workshopSection/page'),
 | 
				
			||||||
 | 
										method: 'get',
 | 
				
			||||||
 | 
										params: this.$http.adornParams({
 | 
				
			||||||
 | 
											limit: 99999,
 | 
				
			||||||
 | 
											page: 1,
 | 
				
			||||||
 | 
											lineId: this.lineIds[i]
 | 
				
			||||||
 | 
										})
 | 
				
			||||||
 | 
									}).then(({ data: res }) => {
 | 
				
			||||||
 | 
										if (res && res.code === 0) {
 | 
				
			||||||
 | 
											// this.wsList = res.data.list
 | 
				
			||||||
 | 
											// ES6 解构 数组合并
 | 
				
			||||||
 | 
											this.wsList = this.unique([...this.wsList, ...res.data.list])
 | 
				
			||||||
 | 
											// console.log('this.wsList',this.wsList);
 | 
				
			||||||
 | 
											/** select 默认选项set default  */
 | 
				
			||||||
 | 
											// if (this.wsList.length) {
 | 
				
			||||||
 | 
											// 	this.sectionIds = this.wsList.map((item) => item.id)
 | 
				
			||||||
 | 
											// 	// console.log('this.wsList',this.wsList)
 | 
				
			||||||
 | 
											// } else {
 | 
				
			||||||
 | 
											// 	this.sectionIds = null
 | 
				
			||||||
 | 
											// }
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.wsList.splice(0)
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleProductLineChange(val) {
 | 
				
			||||||
 | 
								this.wsList = []
 | 
				
			||||||
 | 
								this.getWorksetionList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							getDataList() {
 | 
				
			||||||
 | 
								// for (var z = 0; z < this.defaultOpts.series.length; z++) {
 | 
				
			||||||
 | 
								// 	this.defaultOpts.series[z].data = []
 | 
				
			||||||
 | 
								// }
 | 
				
			||||||
 | 
								// this.echartCategories = []
 | 
				
			||||||
 | 
								// 下面全部要初始化,清空数据
 | 
				
			||||||
 | 
								// this.series = []
 | 
				
			||||||
 | 
								this.dataList = []
 | 
				
			||||||
 | 
								this.finalVal = []
 | 
				
			||||||
 | 
								this.keys = []
 | 
				
			||||||
 | 
								this.values = []
 | 
				
			||||||
 | 
								this.count = 0
 | 
				
			||||||
 | 
								this.showGraph = false
 | 
				
			||||||
 | 
								this.dataType = i18n.t('table2')
 | 
				
			||||||
 | 
								this.echartCategories = null
 | 
				
			||||||
 | 
								this.echartCheckTypes.splice(0)
 | 
				
			||||||
 | 
								/** 设置默认日期 */
 | 
				
			||||||
 | 
								// const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss')
 | 
				
			||||||
 | 
								// const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss')
 | 
				
			||||||
 | 
								// console.log('this.datatime',this.datatime)
 | 
				
			||||||
 | 
								// const startTime = this.datetime ? this.datetime + '-01T00:00:00' : null
 | 
				
			||||||
 | 
								const startTime = this.datetime ? moment(this.datetime).format('YYYY-MM-DD') + 'T00:00:00' : null
 | 
				
			||||||
 | 
								const endTime = this.datetime ? moment(this.datetime).format('YYYY-MM-DD') + 'T23:59:59' : null
 | 
				
			||||||
 | 
								// const endTime = this.datetime ? this.getMonthSE(moment(this.datetime).format('YYYY-MM')) + 'T23:59:59' : null
 | 
				
			||||||
 | 
								const condition = {
 | 
				
			||||||
 | 
									startTime,
 | 
				
			||||||
 | 
									endTime,
 | 
				
			||||||
 | 
									// 加个判断防止为空时传参[]报错
 | 
				
			||||||
 | 
									lineIds: this.lineIds.length == 0 ? null : this.lineIds,
 | 
				
			||||||
 | 
									sectionIds: this.sectionIds.length == 0 ? null : this.sectionIds
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								/** 获取设备产量时序图数据 */
 | 
				
			||||||
 | 
								// this.fetchList(startTime, endTime, lineIds).then(({ data: res }) => {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/eqAnalysis/equProductAnalysis'),
 | 
				
			||||||
 | 
									method: 'POST',
 | 
				
			||||||
 | 
									data: condition
 | 
				
			||||||
 | 
								}).then((res) => {
 | 
				
			||||||
 | 
									if (res.code === 500) {
 | 
				
			||||||
 | 
										this.dataList.splice(0)
 | 
				
			||||||
 | 
										this.equipments = {} // 关闭 echarts 的显示
 | 
				
			||||||
 | 
										this.$message.error(res.msg)
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										/** handle actual data */
 | 
				
			||||||
 | 
										this.dataList = res.data.data
 | 
				
			||||||
 | 
										// console.log('this.dataList', this.dataList)
 | 
				
			||||||
 | 
										//遍历属性
 | 
				
			||||||
 | 
										this.keys = Object.keys(this.dataList)
 | 
				
			||||||
 | 
										// console.log('keys', this.keys)
 | 
				
			||||||
 | 
										this.values = Object.values(this.dataList)
 | 
				
			||||||
 | 
										for (let c = 0; c < this.values.length; c++) {
 | 
				
			||||||
 | 
											this.finalVal.push(
 | 
				
			||||||
 | 
												this.values[c].map((item) => {
 | 
				
			||||||
 | 
													return item.outputNum
 | 
				
			||||||
 | 
												})
 | 
				
			||||||
 | 
											)
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										// console.log('values', this.values)
 | 
				
			||||||
 | 
										// console.log('this.finalVal', this.finalVal)
 | 
				
			||||||
 | 
										this.buildGraphData()
 | 
				
			||||||
 | 
										/** test data */
 | 
				
			||||||
 | 
										// this.dataList = [
 | 
				
			||||||
 | 
										// 	{
 | 
				
			||||||
 | 
										// 		eqId: 'eq-001',
 | 
				
			||||||
 | 
										// 		eqName: 'A1预热机',
 | 
				
			||||||
 | 
										// 		startTime: '2022-05-04T00:30:34',
 | 
				
			||||||
 | 
										// 		endTime: '2022-05-04T08:30:34',
 | 
				
			||||||
 | 
										// 		status: 0
 | 
				
			||||||
 | 
										// 	},
 | 
				
			||||||
 | 
										// 	{
 | 
				
			||||||
 | 
										// 		eqId: 'eq-001',
 | 
				
			||||||
 | 
										// 		eqName: 'A1预热机',
 | 
				
			||||||
 | 
										// 		startTime: '2022-05-04T08:30:34',
 | 
				
			||||||
 | 
										// 		endTime: '2022-05-04T09:30:34',
 | 
				
			||||||
 | 
										// 		status: 1
 | 
				
			||||||
 | 
										// 	},
 | 
				
			||||||
 | 
										// 	{
 | 
				
			||||||
 | 
										// 		eqId: 'eq-001',
 | 
				
			||||||
 | 
										// 		eqName: 'A1预热机',
 | 
				
			||||||
 | 
										// 		startTime: '2022-05-04T09:30:34',
 | 
				
			||||||
 | 
										// 		endTime: '2022-05-04T11:30:34',
 | 
				
			||||||
 | 
										// 		status: 2
 | 
				
			||||||
 | 
										// 	},
 | 
				
			||||||
 | 
										// 	{
 | 
				
			||||||
 | 
										// 		eqId: 'eq-001',
 | 
				
			||||||
 | 
										// 		eqName: 'A1预热机',
 | 
				
			||||||
 | 
										// 		startTime: '2022-05-04T11:30:34',
 | 
				
			||||||
 | 
										// 		endTime: '2022-05-04T13:30:34',
 | 
				
			||||||
 | 
										// 		status: 1
 | 
				
			||||||
 | 
										// 	}
 | 
				
			||||||
 | 
										// ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										// this.equipments = this.transformDataToEquipments(this.dataList)
 | 
				
			||||||
 | 
										// this.chartOption.setYAxis(Object.keys(this.equipments).map((eId) => this.equipments[eId].name))
 | 
				
			||||||
 | 
										// console.log('(((set x axis))): ', this.dataList[0].startTime)
 | 
				
			||||||
 | 
										// this.chartOption.setXAxis(this.dataList[0].startTime)
 | 
				
			||||||
 | 
										// this.chartOption.setData(this.transformEquipmentsToSeries(this.equipments))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										// this.$nextTick(() => {
 | 
				
			||||||
 | 
										// 	this.renderChart()
 | 
				
			||||||
 | 
										// })
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}).catch((err) => {
 | 
				
			||||||
 | 
									// console.error(err)
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							setOptions(opts) {
 | 
				
			||||||
 | 
								/** prop options */
 | 
				
			||||||
 | 
								if (opts) {
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (this.chart) this.chart.setOption(this.defaultOpts, true)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 失效函数
 | 
				
			||||||
 | 
							// parseTableProps(nameData) {
 | 
				
			||||||
 | 
							// 	const subProps = []
 | 
				
			||||||
 | 
							// 	const labelNameMap = new Map()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 	// if (nameData.length) {
 | 
				
			||||||
 | 
							// 	// 	/** 处理 nameData */
 | 
				
			||||||
 | 
							// 	// 	nameData.forEach((item) => {
 | 
				
			||||||
 | 
							// 	// 		if (!labelNameMap.get(item.name)) {
 | 
				
			||||||
 | 
							// 	// 			labelNameMap.set(item.name, 1)
 | 
				
			||||||
 | 
							// 	// 			subProps.push({ name: item.name, prop: item.name })
 | 
				
			||||||
 | 
							// 	// 		}
 | 
				
			||||||
 | 
							// 	// 	})
 | 
				
			||||||
 | 
							// 	// }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 	this.tableConfigDynamic = [
 | 
				
			||||||
 | 
							// 		{ type: 'index', width: 100, name: i18n.t('index') },
 | 
				
			||||||
 | 
							// 		{ name: i18n.t('pl.name'), prop: '0' },
 | 
				
			||||||
 | 
							// 		...Array.from(new Set(res.data.data[0].records.map((item) => moment(item.recordTime).format('MM-DD')))).map((name) => ({ prop: String(++this.count), name }))
 | 
				
			||||||
 | 
							// 	]
 | 
				
			||||||
 | 
							// 	/** echarts related */
 | 
				
			||||||
 | 
							// 	// this.echartCategories = subProps.map((item) => item.name)
 | 
				
			||||||
 | 
							// 	this.echartCategories = this.dataListDynamic.map((item) => item.name)
 | 
				
			||||||
 | 
							// },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// parseDynamicData(data) {
 | 
				
			||||||
 | 
							// 	this.echartCheckTypes.splice(0)
 | 
				
			||||||
 | 
							// 	return data.map((item) => {
 | 
				
			||||||
 | 
							// 		/** echarts related */
 | 
				
			||||||
 | 
							// 		this.echartCheckTypes.push(item.inspectionContent)
 | 
				
			||||||
 | 
							// 		if (item.data.length) {
 | 
				
			||||||
 | 
							// 			/** 解析子数组 */
 | 
				
			||||||
 | 
							// 			item.data.forEach((subitem) => {
 | 
				
			||||||
 | 
							// 				item[subitem.dynamicName] = subitem.dynamicValue
 | 
				
			||||||
 | 
							// 			})
 | 
				
			||||||
 | 
							// 		}
 | 
				
			||||||
 | 
							// 		return item
 | 
				
			||||||
 | 
							// 	})
 | 
				
			||||||
 | 
							// },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							buildGraphData() {
 | 
				
			||||||
 | 
								/** 构造 echart 需要的数据 */
 | 
				
			||||||
 | 
								// 动态添加series
 | 
				
			||||||
 | 
								this.series = []
 | 
				
			||||||
 | 
								// console.log('this.finalVal', this.finalVal)
 | 
				
			||||||
 | 
								// console.log('this.keys', this.keys)		
 | 
				
			||||||
 | 
								for (let l = 0; l < this.finalVal.length; l++) {
 | 
				
			||||||
 | 
									this.series.push({
 | 
				
			||||||
 | 
										name: this.keys[l],
 | 
				
			||||||
 | 
										type: 'line',
 | 
				
			||||||
 | 
										// stack: '总量',
 | 
				
			||||||
 | 
										data: this.finalVal[l]
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								// console.log('第二部分的series', this.series)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							fetchList(startTime, endTime, lineIds) {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/eqAnalysis/equProductAnalysis'),
 | 
				
			||||||
 | 
									method: 'POST',
 | 
				
			||||||
 | 
									data: {
 | 
				
			||||||
 | 
										startTime,
 | 
				
			||||||
 | 
										endTime,
 | 
				
			||||||
 | 
										lineIds: this.lineIds
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}).catch((err) => {
 | 
				
			||||||
 | 
									console.error(err)
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							/**
 | 
				
			||||||
 | 
							 * 默认当前月
 | 
				
			||||||
 | 
							 * date 带月份的日期,例:2021-8
 | 
				
			||||||
 | 
							 * 返回月初至月末数组,例:[2021-8-1, 2021-8-31]
 | 
				
			||||||
 | 
							 */
 | 
				
			||||||
 | 
							getMonthSE(date) {
 | 
				
			||||||
 | 
								let nowdays = date ? new Date(date) : new Date()
 | 
				
			||||||
 | 
								let year = nowdays.getFullYear()
 | 
				
			||||||
 | 
								let month = nowdays.getMonth() + 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (month < 10) {
 | 
				
			||||||
 | 
									month = '0' + month
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let myDate = new Date(year, month, 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let startDate = year + '-' + month + '-01'
 | 
				
			||||||
 | 
								let endDate = year + '-' + month + '-' + myDate.getDate()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								// return [startDate, endDate]
 | 
				
			||||||
 | 
								return endDate
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 数组转对象
 | 
				
			||||||
 | 
							// toObject(pairs) {
 | 
				
			||||||
 | 
							// 	return Array.from(pairs).reduce((acc, [key, value]) => Object.assign(acc, { [key]: value }), {})
 | 
				
			||||||
 | 
							// },
 | 
				
			||||||
 | 
							// 获取对话框里的设备列表
 | 
				
			||||||
 | 
							getEqList() {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/equipment/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams({
 | 
				
			||||||
 | 
										page: 1,
 | 
				
			||||||
 | 
										limit: 99999
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
 | 
										this.dialogEqList = data.data.list
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.dialogEqList.splice(0)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 添加设备
 | 
				
			||||||
 | 
							addEq() {
 | 
				
			||||||
 | 
								// console.log('this.equipments',this.equipments);
 | 
				
			||||||
 | 
								if (this.series) {
 | 
				
			||||||
 | 
									this.dialogVisible = true
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									this.$message.warning(this.$t('pl.queryFirst'))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 确认添加设备
 | 
				
			||||||
 | 
							dialogConfirm() {
 | 
				
			||||||
 | 
								let startTime = this.datetime ? moment(this.datetime).format('YYYY-MM-DD') + 'T00:00:00' : null
 | 
				
			||||||
 | 
								let endTime = this.datetime ? moment(this.datetime).format('YYYY-MM-DD') + 'T23:59:59' : null
 | 
				
			||||||
 | 
								const condition = {
 | 
				
			||||||
 | 
									startTime,
 | 
				
			||||||
 | 
									endTime,
 | 
				
			||||||
 | 
									// productlines: [this.dataForm.productlines],
 | 
				
			||||||
 | 
									// wsId: this.dataForm.wsId,
 | 
				
			||||||
 | 
									equId: this.eqId
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								/** fetch data */
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/eqAnalysis/equProductAnalysis'),
 | 
				
			||||||
 | 
									method: 'post',
 | 
				
			||||||
 | 
									data: condition
 | 
				
			||||||
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
 | 
									if (res.code === 500) {
 | 
				
			||||||
 | 
										this.$message.error(res.msg)
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										// console.log('res',res)
 | 
				
			||||||
 | 
										//遍历属性
 | 
				
			||||||
 | 
										this.keys = [...Object.keys(res.data),...this.keys]
 | 
				
			||||||
 | 
										// console.log('this.finalVal', this.finalVal)
 | 
				
			||||||
 | 
										console.log('keys', this.keys)
 | 
				
			||||||
 | 
										this.values = Object.values(res.data)
 | 
				
			||||||
 | 
										// console.log('values', this.values)
 | 
				
			||||||
 | 
										// 初始化values2
 | 
				
			||||||
 | 
										this.values2 = []
 | 
				
			||||||
 | 
										for (let c = 0; c < this.values.length; c++) {
 | 
				
			||||||
 | 
											this.values2.push(
 | 
				
			||||||
 | 
												this.values[c].map((item) => {
 | 
				
			||||||
 | 
													return item.outputNum
 | 
				
			||||||
 | 
												})
 | 
				
			||||||
 | 
											)
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										console.log('values2', this.values2)
 | 
				
			||||||
 | 
										this.finalVal = [...this.values2,...this.finalVal]
 | 
				
			||||||
 | 
										console.log('this.finalVal', this.finalVal)
 | 
				
			||||||
 | 
										this.$message.success(this.$t('pl.success'))
 | 
				
			||||||
 | 
										this.$nextTick(() => {
 | 
				
			||||||
 | 
											this.dialogVisible = false
 | 
				
			||||||
 | 
											this.buildGraphData()
 | 
				
			||||||
 | 
										})
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 数组去重
 | 
				
			||||||
 | 
							unique(arr) {
 | 
				
			||||||
 | 
								return Array.from(new Set(arr))
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.base-container {
 | 
				
			||||||
 | 
						min-height: 60vh;
 | 
				
			||||||
 | 
						background: #fff;
 | 
				
			||||||
 | 
						padding: 12px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.buttonColor {
 | 
				
			||||||
 | 
						color: #fff;
 | 
				
			||||||
 | 
						background: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -1,17 +1,30 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="mod-config">
 | 
						<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-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('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<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:equipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</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-button v-if="$hasPermission('monitoring:equipment:export')" @click="exportHandle()">{{ $t('export') }}</el-button>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</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
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -22,7 +35,14 @@
 | 
				
			|||||||
			layout="total, sizes, prev, pager, next, jumper"
 | 
								layout="total, sizes, prev, pager, next, jumper"
 | 
				
			||||||
		></el-pagination>
 | 
							></el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update
 | 
				
			||||||
 | 
								v-if="addOrUpdateVisible"
 | 
				
			||||||
 | 
								ref="addOrUpdate"
 | 
				
			||||||
 | 
								:configs="addOrUpdateConfigs"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
								@select-change="handleDialogSelectChange"
 | 
				
			||||||
 | 
								@destory-dialog="handleDestroyDialog"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -37,10 +57,16 @@ import CKEditor from 'ckeditor4-vue'
 | 
				
			|||||||
import { calcMaxHeight } from '@/utils'
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
import { timeFilter } from '@/utils/filters'
 | 
					import { timeFilter } from '@/utils/filters'
 | 
				
			||||||
import Cookies from 'js-cookie'
 | 
					import Cookies from 'js-cookie'
 | 
				
			||||||
 | 
					const topBtnConfig = [
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							type: 'add',
 | 
				
			||||||
 | 
							btnName: i18n.t('add')
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
const tableConfigs = [
 | 
					const tableConfigs = [
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		type: 'index',
 | 
							type: 'index',
 | 
				
			||||||
 | 
							width: 100,
 | 
				
			||||||
		name: i18n.t('index')
 | 
							name: i18n.t('index')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -54,6 +80,8 @@ const tableConfigs = [
 | 
				
			|||||||
	{ prop: 'groupName', name: i18n.t('eq.group') },
 | 
						{ prop: 'groupName', name: i18n.t('eq.group') },
 | 
				
			||||||
	{ prop: 'enName', name: i18n.t('enname') },
 | 
						{ prop: 'enName', name: i18n.t('enname') },
 | 
				
			||||||
	{ prop: 'abbr', name: i18n.t('abbr') },
 | 
						{ prop: 'abbr', name: i18n.t('abbr') },
 | 
				
			||||||
 | 
						{ prop: 'lineName', name: i18n.t('pl.title') },
 | 
				
			||||||
 | 
						{ prop: 'sectionName', name: i18n.t('ws.title') },
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'details',
 | 
							prop: 'details',
 | 
				
			||||||
		name: i18n.t('detail'),
 | 
							name: i18n.t('detail'),
 | 
				
			||||||
@@ -75,7 +103,7 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	infoUrl: '/monitoring/equipment',
 | 
						infoUrl: '/monitoring/equipment',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		{ name: 'name', label: i18n.t('eq.name'), required: true },
 | 
							{ name: 'name', label: i18n.t('eq.name'), required: true },
 | 
				
			||||||
		{ name: 'code', label: i18n.t('eq.code'), api: '/monitoring/equipment/getCode' },
 | 
							{ name: 'code', label: i18n.t('eq.code'), required: true, api: '/monitoring/equipment/getCode' },
 | 
				
			||||||
		{ name: 'enName', label: i18n.t('enname') },
 | 
							{ name: 'enName', label: i18n.t('enname') },
 | 
				
			||||||
		{ name: 'abbr', label: i18n.t('abbr') },
 | 
							{ name: 'abbr', label: i18n.t('abbr') },
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -85,6 +113,27 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
			type: 'select',
 | 
								type: 'select',
 | 
				
			||||||
			options: []
 | 
								options: []
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								name: 'lineId',
 | 
				
			||||||
 | 
								label: i18n.t('pl.title'),
 | 
				
			||||||
 | 
								required: true,
 | 
				
			||||||
 | 
								type: 'select',
 | 
				
			||||||
 | 
								options: [],
 | 
				
			||||||
 | 
								relatedField: 'sectionId' // 关联下面的id,在更换lineId时,会清空相应的sectionId选择结果
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								name: 'sectionId',
 | 
				
			||||||
 | 
								label: i18n.t('ws.title'),
 | 
				
			||||||
 | 
								required: true,
 | 
				
			||||||
 | 
								type: 'select',
 | 
				
			||||||
 | 
								options: []
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								name: 'sort',
 | 
				
			||||||
 | 
								label: i18n.t('ws.sort'),
 | 
				
			||||||
 | 
								type: 'number',
 | 
				
			||||||
 | 
								rules: [{ type: 'number', message: i18n.t('hints.number'), trigger: 'blur', transform: val => Number(val) }]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'groupId',
 | 
								name: 'groupId',
 | 
				
			||||||
			label: i18n.t('eq.group'),
 | 
								label: i18n.t('eq.group'),
 | 
				
			||||||
@@ -240,6 +289,7 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
 | 
								topBtnConfig,
 | 
				
			||||||
			calcMaxHeight,
 | 
								calcMaxHeight,
 | 
				
			||||||
			tableConfigs,
 | 
								tableConfigs,
 | 
				
			||||||
			addOrUpdateConfigs,
 | 
								addOrUpdateConfigs,
 | 
				
			||||||
@@ -263,9 +313,52 @@ export default {
 | 
				
			|||||||
		console.log('activated')
 | 
							console.log('activated')
 | 
				
			||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
		this.getGroupList()
 | 
							this.getGroupList()
 | 
				
			||||||
 | 
							this.getPlList()
 | 
				
			||||||
		this.getTypeList()
 | 
							this.getTypeList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取产线列表,用于刷新工段列表
 | 
				
			||||||
 | 
							getPlList() {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
 | 
									method: 'get'
 | 
				
			||||||
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
 | 
									const plConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'lineId')
 | 
				
			||||||
 | 
									plConfig.options =
 | 
				
			||||||
 | 
										res.data?.map(item => ({
 | 
				
			||||||
 | 
											value: item.id,
 | 
				
			||||||
 | 
											label: item.name
 | 
				
			||||||
 | 
										})) || []
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取工段列表
 | 
				
			||||||
 | 
							getWsList(id) {
 | 
				
			||||||
 | 
								let params = {
 | 
				
			||||||
 | 
									page: 1,
 | 
				
			||||||
 | 
									limit: 999
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (id) {
 | 
				
			||||||
 | 
									params.lineId = id
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/workshopSection/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams(params)
 | 
				
			||||||
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
 | 
									const wsConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'sectionId')
 | 
				
			||||||
 | 
									wsConfig.options =
 | 
				
			||||||
 | 
										res.data?.list?.map(item => ({
 | 
				
			||||||
 | 
											value: item.id,
 | 
				
			||||||
 | 
											label: item.name
 | 
				
			||||||
 | 
										})) || []
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取设备类型列表
 | 
							// 获取设备类型列表
 | 
				
			||||||
		getTypeList() {
 | 
							getTypeList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
@@ -319,7 +412,7 @@ export default {
 | 
				
			|||||||
				if (data && data.code === 0) {
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
					this.dataList = data.data.list
 | 
										this.dataList = data.data.list
 | 
				
			||||||
					// this.dataList = new Array(20).fill('1')
 | 
										// this.dataList = new Array(20).fill('1')
 | 
				
			||||||
					// console.log('data list', this.dataList)
 | 
										console.log('data list', this.dataList)
 | 
				
			||||||
					this.totalPage = data.data.total
 | 
										this.totalPage = data.data.total
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.dataList = []
 | 
										this.dataList = []
 | 
				
			||||||
@@ -343,6 +436,13 @@ export default {
 | 
				
			|||||||
		selectionChangeHandle(val) {
 | 
							selectionChangeHandle(val) {
 | 
				
			||||||
			this.dataListSelections = val
 | 
								this.dataListSelections = val
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							// 对话框里的某个选择改变了
 | 
				
			||||||
 | 
							handleDialogSelectChange({ name, id }) {
 | 
				
			||||||
 | 
								switch (name) {
 | 
				
			||||||
 | 
									case 'lineId':
 | 
				
			||||||
 | 
										this.getWsList(id)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		handleOperations({ type, data: id }) {
 | 
							handleOperations({ type, data: id }) {
 | 
				
			||||||
			switch (type) {
 | 
								switch (type) {
 | 
				
			||||||
				case 'view-detail':
 | 
									case 'view-detail':
 | 
				
			||||||
@@ -407,6 +507,12 @@ export default {
 | 
				
			|||||||
			// 	}
 | 
								// 	}
 | 
				
			||||||
			// })
 | 
								// })
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							clickTopBtn() {
 | 
				
			||||||
 | 
								this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.$refs.addOrUpdate.init()
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 删除
 | 
							// 删除
 | 
				
			||||||
		deleteHandle(id) {
 | 
							deleteHandle(id) {
 | 
				
			||||||
			var ids = id
 | 
								var ids = id
 | 
				
			||||||
@@ -442,3 +548,20 @@ export default {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</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>
 | 
					<template>
 | 
				
			||||||
	<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
 | 
						<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
 | 
				
			||||||
		<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
 | 
							<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="170px">
 | 
				
			||||||
			<el-form-item label="报警信息ID,关联T_equipment_group_alarm表" prop="alarmId">
 | 
								<el-form-item label="报警信息ID,关联T_equipment_group_alarm表" prop="alarmId">
 | 
				
			||||||
				<el-input v-model="dataForm.alarmId" placeholder="报警信息ID,关联T_equipment_group_alarm表"></el-input>
 | 
									<el-input v-model="dataForm.alarmId" placeholder="报警信息ID,关联T_equipment_group_alarm表"></el-input>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,6 +77,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
 | 
						<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
 | 
				
			||||||
		<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
 | 
							<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="170px">
 | 
				
			||||||
			<el-form-item label="设备ID" prop="equipmentId">
 | 
								<el-form-item label="设备ID" prop="equipmentId">
 | 
				
			||||||
				<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
 | 
									<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,23 +1,36 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="mod-config">
 | 
						<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-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 filterable>
 | 
				
			||||||
					<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
 | 
										<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<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 filterable>
 | 
				
			||||||
					<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
 | 
										<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<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-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</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
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList" />
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -25,11 +38,10 @@
 | 
				
			|||||||
			:page-sizes="[10, 20, 50, 100]"
 | 
								:page-sizes="[10, 20, 50, 100]"
 | 
				
			||||||
			:page-size="pageSize"
 | 
								:page-size="pageSize"
 | 
				
			||||||
			:total="totalPage"
 | 
								:total="totalPage"
 | 
				
			||||||
			layout="total, sizes, prev, pager, next, jumper"
 | 
								layout="total, sizes, prev, pager, next, jumper">
 | 
				
			||||||
		>
 | 
					 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -46,31 +58,46 @@ import TableTextComponent from '@/components/base-table/components/detailCompone
 | 
				
			|||||||
const tableConfigs = [
 | 
					const tableConfigs = [
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		type: 'index',
 | 
							type: 'index',
 | 
				
			||||||
 | 
							width: 100,
 | 
				
			||||||
		name: i18n.t('index')
 | 
							name: i18n.t('index')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{ prop: 'equipmentName', name: i18n.t('realtime.eqName') },
 | 
						{ prop: 'equipmentName', name: i18n.t('realtime.eqName') },
 | 
				
			||||||
	{ prop: 'equipmentCode', name: i18n.t('realtime.eqCode') },
 | 
						{ prop: 'equipmentCode', name: i18n.t('realtime.eqCode') },
 | 
				
			||||||
	{ prop: 'inputNum', name: i18n.t('realtime.input') },
 | 
						{
 | 
				
			||||||
	{ prop: 'outputNum', name: i18n.t('realtime.output') },
 | 
							prop: 'inputNum',
 | 
				
			||||||
 | 
							name: i18n.t('realtime.input'),
 | 
				
			||||||
 | 
							filter: (val) => {
 | 
				
			||||||
 | 
								if (val !== null && val !== undefined) return val ? val : '-'
 | 
				
			||||||
 | 
								else return '-'
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							prop: 'outputNum',
 | 
				
			||||||
 | 
							name: i18n.t('realtime.output'),
 | 
				
			||||||
 | 
							filter: (val) => {
 | 
				
			||||||
 | 
								if (val !== null && val !== undefined) return val ? val : '-'
 | 
				
			||||||
 | 
								else return '-'
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'run',
 | 
							prop: 'run',
 | 
				
			||||||
		name: i18n.t('realtime.runState'),
 | 
							name: i18n.t('realtime.runState'),
 | 
				
			||||||
		filter: val => {
 | 
							filter: (val) => {
 | 
				
			||||||
			if (val !== null && val !== undefined) return val ? '是' : '否'
 | 
								if (val !== null && val !== undefined) return val ? i18n.t('yes') : i18n.t('no')
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'status',
 | 
							prop: 'status',
 | 
				
			||||||
		name: i18n.t('realtime.state'),
 | 
							name: i18n.t('realtime.state'),
 | 
				
			||||||
		filter: val => {
 | 
							filter: (val) => {
 | 
				
			||||||
			if (val !== null && val !== undefined) return ['正常', '计划停机', '故障'][+val]
 | 
								if (val !== null && val !== undefined) return [i18n.t('normal'), i18n.t('planStop'), i18n.t('malfunction')][+val]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'error',
 | 
							prop: 'error',
 | 
				
			||||||
		name: i18n.t('realtime.hasFault'),
 | 
							name: i18n.t('realtime.hasFault'),
 | 
				
			||||||
		filter: val => {
 | 
							filter: (val) => {
 | 
				
			||||||
			if (val !== null && val !== undefined) return val ? '是' : '否'
 | 
								if (val !== null && val !== undefined) return val ? i18n.t('yes') : i18n.t('no')
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{ prop: 'quantityTime', name: i18n.t('realtime.productionSnapshotTime'), filter: timeFilter },
 | 
						{ prop: 'quantityTime', name: i18n.t('realtime.productionSnapshotTime'), filter: timeFilter },
 | 
				
			||||||
@@ -128,11 +155,21 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 设备
 | 
							// 设备
 | 
				
			||||||
		getEqList() {
 | 
							getEqList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/equipment/page'),
 | 
									url: this.$http.adornUrl('/monitoring/equipment/page'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams({
 | 
				
			||||||
 | 
										limit: 99999,
 | 
				
			||||||
 | 
										page: 1
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}).then(({ data }) => {
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
					this.eqList = data.data.list
 | 
										this.eqList = data.data.list
 | 
				
			||||||
@@ -219,7 +256,7 @@ export default {
 | 
				
			|||||||
		deleteHandle(id) {
 | 
							deleteHandle(id) {
 | 
				
			||||||
			var ids = id
 | 
								var ids = id
 | 
				
			||||||
				? [id]
 | 
									? [id]
 | 
				
			||||||
				: this.dataListSelections.map(item => {
 | 
									: this.dataListSelections.map((item) => {
 | 
				
			||||||
						return item.id
 | 
											return item.id
 | 
				
			||||||
				  })
 | 
									  })
 | 
				
			||||||
			this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
 | 
								this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
 | 
				
			||||||
@@ -250,3 +287,20 @@ export default {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</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,31 +1,43 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<!-- 设备效率分析 -->
 | 
						<!-- 设备效率分析 -->
 | 
				
			||||||
	<div class="mod-config">
 | 
						<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-form-item>
 | 
				
			||||||
				<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
 | 
									<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
 | 
				
			||||||
				<el-select v-model="dataForm.ftId" :placeholder="'工厂'" clearable>
 | 
									<el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" @change="handleftIdChange" clearable filterable>
 | 
				
			||||||
					<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
 | 
										<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 产线 -->
 | 
								<!-- 产线 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="dataForm.productlines" :placeholder="'产线'" multiple clearable>
 | 
									{{ $t('pl.title') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable filterable> 
 | 
				
			||||||
					<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
										<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 时间类型 -->
 | 
								<!-- 时间类型 -->
 | 
				
			||||||
			<!-- 按时间段 -->
 | 
								<!-- 按时间段 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="timeType" :placeholder="'时间类型'" clearable>
 | 
									{{ $t('timetype') }}
 | 
				
			||||||
					<el-option value="range" label="按时间段" />
 | 
								</el-form-item>
 | 
				
			||||||
					<el-option value="date" label="按日期" />
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-select v-model="timeType" :placeholder="$t('timetype')" clearable>
 | 
				
			||||||
 | 
										<el-option value="range" :label="$t('reftimerange')" />
 | 
				
			||||||
 | 
										<el-option value="date" :label="$t('refdate')" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 日期选择 -->
 | 
								<!-- 日期选择 -->
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('time') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
			<el-form-item v-if="timeType === 'date'">
 | 
								<el-form-item v-if="timeType === 'date'">
 | 
				
			||||||
				<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="'请选择日期'" format="yyyy-MM-dd" />
 | 
									<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="$t('hints.date')" format="yyyy-MM-dd" />
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 时间段选择 -->
 | 
								<!-- 时间段选择 -->
 | 
				
			||||||
			<el-form-item v-else>
 | 
								<el-form-item v-else>
 | 
				
			||||||
@@ -33,22 +45,23 @@
 | 
				
			|||||||
					key="time-picker"
 | 
										key="time-picker"
 | 
				
			||||||
					v-model="rawTime"
 | 
										v-model="rawTime"
 | 
				
			||||||
					type="daterange"
 | 
										type="daterange"
 | 
				
			||||||
					:range-separator="'至'"
 | 
										:range-separator="$t('datePicker.range')"
 | 
				
			||||||
					:start-placeholder="'开始时间'"
 | 
										:start-placeholder="$t('datePicker.starttime')"
 | 
				
			||||||
					:end-placeholder="'结束时间'"
 | 
										:end-placeholder="$t('datePicker.endtime')"
 | 
				
			||||||
					format="yyyy-MM-dd"
 | 
										format="yyyy-MM-dd"
 | 
				
			||||||
				/>
 | 
									/>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 按钮 -->
 | 
								<!-- 按钮 -->
 | 
				
			||||||
			<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-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<transition mode="out-in" name="slide-to-left">
 | 
							<transition mode="out-in" name="slide-to-left">
 | 
				
			||||||
			<equipment-efficiency-graph v-if="showGraph" key="graph" ref="eegraph" @close-graph="showGraph = false" />
 | 
								<equipment-efficiency-graph v-if="showGraph" key="graph" ref="eegraph" @close-graph="showGraph = false" />
 | 
				
			||||||
			<base-table v-else :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
								<base-table v-else :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
									@operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
				
			||||||
			<!-- v-loading="dataIsLoading " -->
 | 
								<!-- v-loading="dataIsLoading " -->
 | 
				
			||||||
		</transition>
 | 
							</transition>
 | 
				
			||||||
		<!-- <el-pagination
 | 
							<!-- <el-pagination
 | 
				
			||||||
@@ -66,54 +79,55 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import i18n from '@/i18n'
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
import BaseTable from '@/components/base-table'
 | 
					import BaseTable from '@/components/base-table'
 | 
				
			||||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
 | 
					// import TableOperateComponent from '@/components/base-table/components/operationComponent'
 | 
				
			||||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
 | 
					import TableTextComponent from '@/components/base-table/components/detailComponent'
 | 
				
			||||||
import EquipmentEfficiencyGraph from './equipmentEfficiencyGraph.vue'
 | 
					import EquipmentEfficiencyGraph from './equipmentEfficiencyGraph.vue'
 | 
				
			||||||
import { calcMaxHeight } from '@/utils'
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
import { timeFilter } from '@/utils/filters'
 | 
					// import { timeFilter } from '@/utils/filters'
 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const tableConfigs = [
 | 
					const tableConfigs = [
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		type: 'index',
 | 
							type: 'index',
 | 
				
			||||||
 | 
							width: 100,
 | 
				
			||||||
		name: i18n.t('index')
 | 
							name: i18n.t('index')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		// name: i18n.t('createTime'),
 | 
							// name: i18n.t('createTime'),
 | 
				
			||||||
		prop: 'factoryName',
 | 
							prop: 'factoryName',
 | 
				
			||||||
		name: '工厂'
 | 
							name: i18n.t('factory.title')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{ prop: 'pdName', name: '产线' },
 | 
						{ prop: 'pdName', name: i18n.t('pl.title') },
 | 
				
			||||||
	{ prop: 'wsName', name: '工段' },
 | 
						{ prop: 'wsName', name: i18n.t('ws.title') },
 | 
				
			||||||
	{ prop: 'eqName', name: '设备' },
 | 
						{ prop: 'eqName', name: i18n.t('eq.title') },
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '有效时间(h)',
 | 
							name: i18n.t('eq.efficienttimeh'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'workTime', name: '工作时长(h)', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'workTime', name: i18n.t('eq.worktimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'workRate', name: '工作时长比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'workRate', name: i18n.t('eq.workdurationratio'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '关机时间(h)',
 | 
							name: i18n.t('eq.shutdowntimeh'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'stopTime', name: '停机时长(h)', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'stopTime', name: i18n.t('eq.stoptimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'stopRate', name: '停机比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'stopRate', name: i18n.t('eq.stopratio'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '中断损失',
 | 
							name: i18n.t('eq.stoplost'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'downTime', name: '故障时长(h)', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'downTime', name: i18n.t('eq.downtimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'downRate', name: '故障比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' },
 | 
								{ prop: 'downRate', name: i18n.t('eq.downrate'), width: 120, filter: val => (val * 100).toFixed(2) + '%' },
 | 
				
			||||||
			{ prop: 'timeEfficiency', name: '时间开动率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'timeEfficiency', name: i18n.t('eq.timeefficiency'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '速度损失',
 | 
							name: i18n.t('eq.speedlost'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'realYield', name: '实际加工速度', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'realYield', name: i18n.t('eq.realyield'), width: 120, filter: val => `${val} `+'/'+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'designYield', name: '理论加工速度', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'designYield', name: i18n.t('eq.designyield'), width: 120, filter: val => `${val} `+'/'+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'peEfficiency', name: '速度开动率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'peEfficiency', name: i18n.t('eq.speedefficiency'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -134,7 +148,7 @@ const tableConfigs = [
 | 
				
			|||||||
		subcomponent: TableTextComponent,
 | 
							subcomponent: TableTextComponent,
 | 
				
			||||||
		// options: ['edit', 'delete']
 | 
							// options: ['edit', 'delete']
 | 
				
			||||||
		// options: ['view-trend'] // 查看趋势
 | 
							// options: ['view-trend'] // 查看趋势
 | 
				
			||||||
		buttonContent: '查看趋势',
 | 
							buttonContent: i18n.t('eq.viewtrend'),
 | 
				
			||||||
		actionName: 'view-trend',
 | 
							actionName: 'view-trend',
 | 
				
			||||||
		emitFullData: true
 | 
							emitFullData: true
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -171,9 +185,10 @@ export default {
 | 
				
			|||||||
		EquipmentEfficiencyGraph
 | 
							EquipmentEfficiencyGraph
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	created() {
 | 
						activated() {
 | 
				
			||||||
		this.getFactoryList()
 | 
							this.getFactoryList().then(() => {
 | 
				
			||||||
		this.getProductLineList()
 | 
								this.getProductLineList()
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	watch: {
 | 
						watch: {
 | 
				
			||||||
		timeType() {
 | 
							timeType() {
 | 
				
			||||||
@@ -184,15 +199,15 @@ export default {
 | 
				
			|||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		// 获取工厂列表
 | 
							// 获取工厂列表
 | 
				
			||||||
		getFactoryList() {
 | 
							getFactoryList() {
 | 
				
			||||||
			this.$http({
 | 
								return this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/factory/page'),
 | 
									url: this.$http.adornUrl('/monitoring/factory/list'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get'
 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
									if (res && res.code === 0) {
 | 
				
			||||||
					this.factoryList = data.data.list
 | 
										this.factoryList = res.data
 | 
				
			||||||
					/** set default */
 | 
										/** set default */
 | 
				
			||||||
					if (this.factoryList.length) {
 | 
										if (this.factoryList.length) {
 | 
				
			||||||
						this.dataForm.ftId = this.factoryList[0].id
 | 
											// this.dataForm.ftId = this.factoryList[0].id
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.factoryList = []
 | 
										this.factoryList = []
 | 
				
			||||||
@@ -200,24 +215,37 @@ export default {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 选择工厂时
 | 
				
			||||||
 | 
							handleFactoryChange(val) {
 | 
				
			||||||
 | 
								this.getProductLineList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// 获取产线列表
 | 
							// 获取产线列表
 | 
				
			||||||
		getProductLineList() {
 | 
							getProductLineList() {
 | 
				
			||||||
			this.$http({
 | 
								const query = {
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/productionLine/page'),
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get'
 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
								if (this.dataForm.ftId) {
 | 
				
			||||||
					this.productLineList = data.data.list
 | 
									query.params = this.$http.adornParams({
 | 
				
			||||||
 | 
										factoryId: this.dataForm.ftId
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.$http(query).then(({ data: res }) => {
 | 
				
			||||||
 | 
									if (res && res.code === 0 && res.data.length) {
 | 
				
			||||||
 | 
										this.productLineList = res.data
 | 
				
			||||||
					/** set default */
 | 
										/** set default */
 | 
				
			||||||
					if (this.productLineList.length) {
 | 
										// this.dataForm.productlines = [this.productLineList[0].id]
 | 
				
			||||||
						this.dataForm.productlines = [this.productLineList[0].id]
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.productLineList = []
 | 
										this.productLineList = []
 | 
				
			||||||
 | 
										this.dataForm.productlines = []
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					        handleftIdChange() {
 | 
				
			||||||
 | 
								this.getProductLineList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 时间类型预处理
 | 
							// 时间类型预处理
 | 
				
			||||||
		getTimeRange() {
 | 
							getTimeRange() {
 | 
				
			||||||
			let startTime
 | 
								let startTime
 | 
				
			||||||
@@ -359,4 +387,18 @@ export default {
 | 
				
			|||||||
.slide-to-left-enter-to {
 | 
					.slide-to-left-enter-to {
 | 
				
			||||||
	transform: translateX(0);
 | 
						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>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,31 +2,31 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
* @Author: lb
 | 
					* @Author: lb
 | 
				
			||||||
* @Date: 2022-07-24 13:30:00
 | 
					* @Date: 2022-07-24 13:30:00
 | 
				
			||||||
* @LastEditTime: 2022-07-28 09:30:00
 | 
					 * @LastEditTime: 2023-02-09 15:25:13
 | 
				
			||||||
* @LastEditors: lb
 | 
					 * @LastEditors: fzq
 | 
				
			||||||
* @Description: 设备效率分析-echarts图
 | 
					* @Description: 设备效率分析-echarts图
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="graph-area">
 | 
						<div class="graph-area">
 | 
				
			||||||
		<span class="close-btn" @click="close">
 | 
							<span class="close-btn" @click="close">
 | 
				
			||||||
			<svg xmlns="http://www.w3.org/2000/svg" style="height: 100%; width: 100%;" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
 | 
								<svg xmlns="http://www.w3.org/2000/svg" style="height: 100%; width: 100%" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
 | 
				
			||||||
				<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
 | 
									<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
 | 
				
			||||||
			</svg>
 | 
								</svg>
 | 
				
			||||||
		</span>
 | 
							</span>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<div class="close-row">
 | 
							<div class="close-row">
 | 
				
			||||||
			<el-radio-group v-model="dataType" class="head-radio-group" size="small" @change="setLegend">
 | 
								<el-radio-group v-model="dataType" class="head-radio-group" size="small" @change="setLegend">
 | 
				
			||||||
				<el-radio-button label="百分比" />
 | 
									<el-radio-button :label="$t('eq.ratio')" />
 | 
				
			||||||
				<el-radio-button label="时间" />
 | 
									<el-radio-button :label="$t('eq.time')" />
 | 
				
			||||||
			</el-radio-group>
 | 
								</el-radio-group>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px;" size="small" @change="handleRadioGroupChanged">
 | 
								<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px" size="small" @change="handleRadioGroupChanged">
 | 
				
			||||||
				<el-radio-button v-for="(opt, index) in searchRadioOptions" :key="index" :label="opt" />
 | 
									<el-radio-button v-for="(opt, index) in searchRadioOptions" :key="index" :label="opt" />
 | 
				
			||||||
			</el-radio-group>
 | 
								</el-radio-group>
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<div id="trend-graph" class="real-graph" style="width: 100%; height: 500px;" />
 | 
							<div id="trend-graph" class="real-graph" style="width: 100%; height: 500px" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -34,12 +34,13 @@
 | 
				
			|||||||
import * as echarts from 'echarts'
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
import { pick } from 'lodash/object'
 | 
					import { pick } from 'lodash/object'
 | 
				
			||||||
 | 
					import i18n from '../../../i18n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EchartConfigs {
 | 
					class EchartConfigs {
 | 
				
			||||||
	constructor() {
 | 
						constructor() {
 | 
				
			||||||
		this.color = ['#e91e63', '#4caf50', '#3f51b5', '#ffc107', '#607d8b']
 | 
							this.color = ['#e91e63', '#4caf50', '#3f51b5', '#ffc107', '#607d8b']
 | 
				
			||||||
		this.title = {
 | 
							this.title = {
 | 
				
			||||||
			text: '时间区间走势',
 | 
								text: i18n.t('eq.timetrend'),
 | 
				
			||||||
			top: 0,
 | 
								top: 0,
 | 
				
			||||||
			left: 'center',
 | 
								left: 'center',
 | 
				
			||||||
			textStyle: {
 | 
								textStyle: {
 | 
				
			||||||
@@ -113,10 +114,10 @@ export default {
 | 
				
			|||||||
	props: {},
 | 
						props: {},
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
			searchType: '无间隔',
 | 
								searchType: i18n.t('eq.nogap'),
 | 
				
			||||||
			searchRadioOptions: ['无间隔', '按月', '按周', '按天'],
 | 
								searchRadioOptions: [i18n.t('eq.nogap'), i18n.t('eq.monthgap'), i18n.t('eq.weekgap'), i18n.t('eq.daygap')],
 | 
				
			||||||
			dataType: '时间',
 | 
								dataType: i18n.t('eq.time'),
 | 
				
			||||||
			dataRadioOptions: ['时间', '百分比'],
 | 
								dataRadioOptions: [i18n.t('eq.time'), i18n.t('eq.ratio')],
 | 
				
			||||||
			config: new EchartConfigs(),
 | 
								config: new EchartConfigs(),
 | 
				
			||||||
			chart: null,
 | 
								chart: null,
 | 
				
			||||||
			rateList: [], // 对请求来的数据分流
 | 
								rateList: [], // 对请求来的数据分流
 | 
				
			||||||
@@ -127,9 +128,10 @@ export default {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		async initChart() {
 | 
							async initChart() {
 | 
				
			||||||
			this.config.setTitle(this.injectData.equipmentName + '时间区间走势')
 | 
								this.config.setTitle(this.injectData.equipmentName + i18n.t('eq.timetrend'))
 | 
				
			||||||
			await this.getList()
 | 
								await this.getList()
 | 
				
			||||||
			this.setLegend()
 | 
								this.setLegend()
 | 
				
			||||||
 | 
								// console.log('this.dataType',this.dataType);
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		init(data) {
 | 
							init(data) {
 | 
				
			||||||
@@ -146,11 +148,11 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		makeQuerys() {
 | 
							makeQuerys() {
 | 
				
			||||||
			const searchTypeMap = {
 | 
								const searchTypeMap = {
 | 
				
			||||||
				无间隔: 1,
 | 
									[i18n.t('eq.nogap')]: 1,
 | 
				
			||||||
				按月: 2,
 | 
									[i18n.t('eq.monthgap')]: 2,
 | 
				
			||||||
				按周: 3,
 | 
									[i18n.t('eq.weekgap')]: 3,
 | 
				
			||||||
				按天: 4,
 | 
									[i18n.t('eq.daygap')]: 4,
 | 
				
			||||||
				按小时: 5
 | 
									[i18n.t('eq.hourgap')]: 5
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			return {
 | 
								return {
 | 
				
			||||||
@@ -180,20 +182,20 @@ export default {
 | 
				
			|||||||
		getList() {
 | 
							getList() {
 | 
				
			||||||
			const params = this.makeQuerys()
 | 
								const params = this.makeQuerys()
 | 
				
			||||||
			// 发起请求
 | 
								// 发起请求
 | 
				
			||||||
			return this.getOEE(params).then(datalist => {
 | 
								return this.getOEE(params).then((datalist) => {
 | 
				
			||||||
				console.log('getOEE res:', datalist)
 | 
									console.log('getOEE res:', datalist)
 | 
				
			||||||
				this.timeList.splice(0)
 | 
									this.timeList.splice(0)
 | 
				
			||||||
				this.rateList.splice(0)
 | 
									this.rateList.splice(0)
 | 
				
			||||||
				this.xAxis.splice(0)
 | 
									this.xAxis.splice(0)
 | 
				
			||||||
				if (datalist.length) {
 | 
									if (datalist.length) {
 | 
				
			||||||
					// 分流
 | 
										// 分流
 | 
				
			||||||
					datalist.map(item => {
 | 
										datalist.map((item) => {
 | 
				
			||||||
						const time = moment(item.time)
 | 
											const time = moment(item.time)
 | 
				
			||||||
						if (this.searchType === '按月') {
 | 
											if (this.searchType === i18n.t('eq.monthgap')) {
 | 
				
			||||||
							this.xAxis.push(`${time.year()}年${time.month() + 1}月`)
 | 
												this.xAxis.push(`${time.year()}${i18n.t('eq.year')}${time.month() + 1}${i18n.t('eq.month')}`)
 | 
				
			||||||
						} else if (this.searchType === '按周') {
 | 
											} else if (this.searchType === i18n.t('eq.weekgap')) {
 | 
				
			||||||
							this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
												this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
				
			||||||
						} else if (this.searchType === '按天') {
 | 
											} else if (this.searchType === i18n.t('eq.daygap')) {
 | 
				
			||||||
							this.xAxis.push(`${time.format('YY-M-D')}`)
 | 
												this.xAxis.push(`${time.format('YY-M-D')}`)
 | 
				
			||||||
						} else {
 | 
											} else {
 | 
				
			||||||
							this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
												this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
				
			||||||
@@ -218,8 +220,16 @@ export default {
 | 
				
			|||||||
		setLegend() {
 | 
							setLegend() {
 | 
				
			||||||
			// 设置legend
 | 
								// 设置legend
 | 
				
			||||||
			const legendMap = {
 | 
								const legendMap = {
 | 
				
			||||||
				百分比: ['工作时长比率', '停机时长比率', '故障时长比率', '速度开动率', '时间开动率', 'OEE', 'TEEP'],
 | 
									[i18n.t('eq.ratio')]: [
 | 
				
			||||||
				时间: ['工作时长', '停机时长', '故障时长']
 | 
										i18n.t('eq.workdurationratio'),
 | 
				
			||||||
 | 
										i18n.t('eq.stopdurationratio'),
 | 
				
			||||||
 | 
										i18n.t('eq.downdurationratio'),
 | 
				
			||||||
 | 
										i18n.t('eq.speedefficiency'),
 | 
				
			||||||
 | 
										i18n.t('eq.timeefficiency'),
 | 
				
			||||||
 | 
										'OEE',
 | 
				
			||||||
 | 
										'TEEP'
 | 
				
			||||||
 | 
									],
 | 
				
			||||||
 | 
									[i18n.t('eq.time')]: [i18n.t('eq.worktime'), i18n.t('eq.stoptime'), i18n.t('eq.downtime')]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			this.config.setLegend(legendMap[this.dataType])
 | 
								this.config.setLegend(legendMap[this.dataType])
 | 
				
			||||||
			this.setData()
 | 
								this.setData()
 | 
				
			||||||
@@ -228,19 +238,19 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		setData() {
 | 
							setData() {
 | 
				
			||||||
			if (this.dataType === '时间') {
 | 
								if (this.dataType === i18n.t('eq.time')) {
 | 
				
			||||||
				const workTimeList = []
 | 
									const workTimeList = []
 | 
				
			||||||
				const stopTimeList = []
 | 
									const stopTimeList = []
 | 
				
			||||||
				const downTimeList = []
 | 
									const downTimeList = []
 | 
				
			||||||
				this.timeList.map(item => {
 | 
									this.timeList.map((item) => {
 | 
				
			||||||
					workTimeList.push(item.workTime)
 | 
										workTimeList.push(item.workTime)
 | 
				
			||||||
					stopTimeList.push(item.stopTime)
 | 
										stopTimeList.push(item.stopTime)
 | 
				
			||||||
					downTimeList.push(item.downTime)
 | 
										downTimeList.push(item.downTime)
 | 
				
			||||||
				})
 | 
									})
 | 
				
			||||||
				this.config.setSeries([
 | 
									this.config.setSeries([
 | 
				
			||||||
					{ name: '工作时长', type: 'bar', data: workTimeList },
 | 
										{ name: i18n.t('eq.worktime'), type: 'bar', data: workTimeList },
 | 
				
			||||||
					{ name: '停机时长', type: 'bar', data: stopTimeList },
 | 
										{ name: i18n.t('eq.stoptime'), type: 'bar', data: stopTimeList },
 | 
				
			||||||
					{ name: '故障时长', type: 'bar', data: downTimeList }
 | 
										{ name: i18n.t('eq.downtime'), type: 'bar', data: downTimeList }
 | 
				
			||||||
				])
 | 
									])
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				// 百分比
 | 
									// 百分比
 | 
				
			||||||
@@ -251,7 +261,7 @@ export default {
 | 
				
			|||||||
				const timeEfficiencyList = []
 | 
									const timeEfficiencyList = []
 | 
				
			||||||
				const oeeList = []
 | 
									const oeeList = []
 | 
				
			||||||
				const teepList = []
 | 
									const teepList = []
 | 
				
			||||||
				this.rateList.map(item => {
 | 
									this.rateList.map((item) => {
 | 
				
			||||||
					workRateList.push(item.workRate)
 | 
										workRateList.push(item.workRate)
 | 
				
			||||||
					stopRateList.push(item.stopRate)
 | 
										stopRateList.push(item.stopRate)
 | 
				
			||||||
					downRateList.push(item.downRate)
 | 
										downRateList.push(item.downRate)
 | 
				
			||||||
@@ -261,11 +271,11 @@ export default {
 | 
				
			|||||||
					teepList.push(item.teep)
 | 
										teepList.push(item.teep)
 | 
				
			||||||
				})
 | 
									})
 | 
				
			||||||
				this.config.setSeries([
 | 
									this.config.setSeries([
 | 
				
			||||||
					{ name: '工作时长比率', type: 'bar', data: workRateList },
 | 
										{ name: i18n.t('eq.workdurationratio'), type: 'bar', data: workRateList },
 | 
				
			||||||
					{ name: '停机时长比率', type: 'bar', data: stopRateList },
 | 
										{ name: i18n.t('eq.stopdurationratio'), type: 'bar', data: stopRateList },
 | 
				
			||||||
					{ name: '故障时长比率', type: 'bar', data: downRateList },
 | 
										{ name: i18n.t('eq.downdurationratio'), type: 'bar', data: downRateList },
 | 
				
			||||||
					{ name: '速度开动率', type: 'bar', data: peEfficiencyList },
 | 
										{ name: i18n.t('eq.speedefficiency'), type: 'bar', data: peEfficiencyList },
 | 
				
			||||||
					{ name: '时间开动率', type: 'bar', data: timeEfficiencyList },
 | 
										{ name: i18n.t('eq.timeefficiency'), type: 'bar', data: timeEfficiencyList },
 | 
				
			||||||
					{ name: 'OEE', type: 'bar', data: oeeList },
 | 
										{ name: 'OEE', type: 'bar', data: oeeList },
 | 
				
			||||||
					{ name: 'TEEP', type: 'bar', data: teepList }
 | 
										{ name: 'TEEP', type: 'bar', data: teepList }
 | 
				
			||||||
				])
 | 
									])
 | 
				
			||||||
@@ -274,12 +284,24 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		// 重新绘制图形
 | 
							// 重新绘制图形
 | 
				
			||||||
		renderGraph() {
 | 
							renderGraph() {
 | 
				
			||||||
 | 
								if (this.dataType === i18n.t('eq.time')) {
 | 
				
			||||||
 | 
									this.config.yAxis = {
 | 
				
			||||||
 | 
										type: 'value',
 | 
				
			||||||
 | 
										name: i18n.t('yAxisTime')
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									this.config.yAxis = {
 | 
				
			||||||
 | 
										type: 'value',
 | 
				
			||||||
 | 
										name: i18n.t('yAxisRate')
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								console.log('this.dataType', this.dataType)
 | 
				
			||||||
			console.log('latest config: ', JSON.stringify(this.config))
 | 
								console.log('latest config: ', JSON.stringify(this.config))
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
				// this.chart.setOption(this.config)
 | 
									// this.chart.setOption(this.config)
 | 
				
			||||||
				this.chart.setOption(this.config, {
 | 
									this.chart.setOption(this.config, {
 | 
				
			||||||
          notMerge: true
 | 
										notMerge: true
 | 
				
			||||||
        })
 | 
									})
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -311,11 +333,14 @@ export default {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.close-btn:hover {
 | 
					.close-btn:hover {
 | 
				
			||||||
	color: #409eff;
 | 
						/* color: #409eff; */
 | 
				
			||||||
 | 
						color: #0B58FF;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.head-radio-group >>> .el-radio-button__orig-radio:checked + .el-radio-button__inner {
 | 
					.head-radio-group >>> .el-radio-button__orig-radio:checked + .el-radio-button__inner {
 | 
				
			||||||
	background-color: #409eff;
 | 
						/* background-color: #409eff;
 | 
				
			||||||
	border-color: #409eff;
 | 
						border-color: #409eff; */
 | 
				
			||||||
 | 
							background-color: #0B58FF;
 | 
				
			||||||
 | 
						border-color: #0B58FF;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,21 +1,27 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<!-- 设备效率分析 -->
 | 
						<!-- 设备效率分析 -->
 | 
				
			||||||
	<div class="mod-config">
 | 
						<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-form-item>
 | 
				
			||||||
				<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="'请选择月份'" format="yyyy-MM" />
 | 
									<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="$t('prompt.month')" format="yyyy-MM" />
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 产线 -->
 | 
								<!-- 产线 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="dataForm.productlines" :placeholder="'产线'" multiple clearable>
 | 
									{{ $t('pl.title') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable filterable>
 | 
				
			||||||
					<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
										<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<!-- 按钮 -->
 | 
								<!-- 按钮 -->
 | 
				
			||||||
			<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-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
@@ -46,17 +52,18 @@ import moment from 'moment'
 | 
				
			|||||||
const tableConfigs = [
 | 
					const tableConfigs = [
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		type: 'index',
 | 
							type: 'index',
 | 
				
			||||||
 | 
							width: 100,
 | 
				
			||||||
		name: i18n.t('index')
 | 
							name: i18n.t('index')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	// { prop: 'time', name: '时间', filter: timeFilter },
 | 
						// { prop: 'time', name: '时间', filter: timeFilter },
 | 
				
			||||||
	{ prop: 'pdName', name: '产线名称' },
 | 
						{ prop: 'pdlName', name: i18n.t('pl.name') },
 | 
				
			||||||
	{ prop: 'wsName', name: '工序' },
 | 
						{ prop: 'wsName', name: i18n.t('ws.title') },
 | 
				
			||||||
	{ prop: 'eqName', name: '设备' },
 | 
						{ prop: 'eqName', name: i18n.t('eq.title') },
 | 
				
			||||||
	{ prop: 'mtbf', name: '平均故障间隔时间[MTBF] (h)', width: 220 },
 | 
						{ prop: 'mtbf', name: i18n.t('eq.mtbf'), width: 220 },
 | 
				
			||||||
	{ prop: 'mttr', name: '平均维修时间[MTTR] (h)', width: 190 },
 | 
						{ prop: 'mttr', name: i18n.t('eq.mttr'), width: 190 },
 | 
				
			||||||
	{ prop: 'workTime', name: '工作时长 (h)' },
 | 
						{ prop: 'workTime', name: i18n.t('eq.worktimeh') },
 | 
				
			||||||
	{ prop: 'downTime', name: '故障时长 (h)' },
 | 
						{ prop: 'downTime', name: i18n.t('eq.downtimeh') },
 | 
				
			||||||
	{ prop: 'downCount', name: '故障次数' },
 | 
						{ prop: 'downCount', name: i18n.t('eq.downcount') }
 | 
				
			||||||
	// {
 | 
						// {
 | 
				
			||||||
	// 	prop: 'operations',
 | 
						// 	prop: 'operations',
 | 
				
			||||||
	// 	name: i18n.t('handle'),
 | 
						// 	name: i18n.t('handle'),
 | 
				
			||||||
@@ -96,7 +103,7 @@ export default {
 | 
				
			|||||||
		BaseTable
 | 
							BaseTable
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	created() {
 | 
						activated() {
 | 
				
			||||||
		// this.getFactoryList()
 | 
							// this.getFactoryList()
 | 
				
			||||||
		this.getProductLineList()
 | 
							this.getProductLineList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -123,17 +130,18 @@ export default {
 | 
				
			|||||||
		// 获取产线列表
 | 
							// 获取产线列表
 | 
				
			||||||
		getProductLineList() {
 | 
							getProductLineList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/productionLine/page'),
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get'
 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
									if (res && res.code === 0) {
 | 
				
			||||||
					this.productLineList = data.data.list
 | 
										this.productLineList = res.data
 | 
				
			||||||
					/** set default */
 | 
										/** set default 默认*/
 | 
				
			||||||
					if (this.productLineList.length) {
 | 
										// if (this.productLineList.length) {
 | 
				
			||||||
						this.dataForm.productlines = [this.productLineList[0].id]
 | 
										// 	this.dataForm.productlines = [this.productLineList[0].id]
 | 
				
			||||||
					}
 | 
										// }
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.productLineList = []
 | 
										this.productLineList = []
 | 
				
			||||||
 | 
										this.dataForm.productlines = []
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -201,3 +209,20 @@ export default {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</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>
 | 
				
			||||||