Compare commits
	
		
			84 Commits
		
	
	
		
			e8d566e121
			...
			projects/m
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| cbdae0f2eb | |||
| 787c994224 | |||
| cc1e237043 | |||
| 
						 | 
					45e1fe4b47 | ||
| 
						 | 
					e823dee9ff | ||
| 932d35c14c | |||
| ceeb853783 | |||
| 6ed21030f5 | |||
| 73feff0d8b | |||
| d49a698136 | |||
| 6e774dfc5d | |||
| 3eeded056f | |||
| 881eace12f | |||
| dad3b2da95 | |||
| f5cfc5d2bb | |||
| 235b0a6512 | |||
| 13bf1e0fd0 | |||
| 
						 | 
					97acb4faac | ||
| 
						 | 
					04a5359eda | ||
| 7ae7dfad95 | |||
| e202ac542e | |||
| eb8736178a | |||
| 580a66549c | |||
| 30c45e6f74 | |||
| e9c2917c77 | |||
| 0a9bd0c6de | |||
| 84dbd8d5b2 | |||
| 
						 | 
					00f54f3de6 | ||
| 
						 | 
					f26d7abc64 | ||
| 028c14a174 | |||
| b14abd39b6 | |||
| dfc8110410 | |||
| baede9ef34 | |||
| 2c44906bd6 | |||
| 466c822b0f | |||
| 031e3098b7 | |||
| d14dae86fc | |||
| 492b591fa9 | |||
| fc20e275f7 | |||
| 10fd959c9d | |||
| 342e83ab41 | |||
| df530abb90 | |||
| 8f1e5212e3 | |||
| 
						 | 
					5dd299e549 | ||
| 
						 | 
					511a00d0a3 | ||
| d5b71c4d7d | |||
| 
						 | 
					43d0a2668d | ||
| a492fe4c87 | |||
| 319e0ac90d | |||
| e11c71edf1 | |||
| 4bf610eeb1 | |||
| 8e0ac6f962 | |||
| d41ae3bc76 | |||
| f4eaddf6ae | |||
| 9699e90ab3 | |||
| 9fc6f013cc | |||
| cee303fd20 | |||
| 4b621a6699 | |||
| 916f99a852 | |||
| 
						 | 
					9581d91c52 | ||
| 
						 | 
					c847ba1595 | ||
| 
						 | 
					2ab8a99ff5 | ||
| 
						 | 
					d65dcb8712 | ||
| 5711468b10 | |||
| 1b82ff5a96 | |||
| 59f33a2ef5 | |||
| 3c620f4dfa | |||
| 
						 | 
					2213b93f0a | ||
| 
						 | 
					d6acfa4fd7 | ||
| ca08b46f77 | |||
| 54b3652c0e | |||
| 884fad3b0e | |||
| 7eb4fdb790 | |||
| 48c678d260 | |||
| 22ca86e0fa | |||
| 38145f08ac | |||
| ad0acc0f22 | |||
| ad7ef729d0 | |||
| b4b0446747 | |||
| 
						 | 
					0029af4ffa | ||
| 69aaacb1c7 | |||
| 
						 | 
					dbe784cec6 | ||
| 
						 | 
					2a801bf834 | ||
| 
						 | 
					a6fe9e654e | 
							
								
								
									
										19
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						@@ -1,8 +1,8 @@
 | 
			
		||||
###
 | 
			
		||||
 # @Author: Do not edit
 | 
			
		||||
 # @Date: 2023-08-29 09:40:39
 | 
			
		||||
 # @LastEditTime: 2024-07-29 15:00:13
 | 
			
		||||
 # @LastEditors: DY
 | 
			
		||||
 # @LastEditTime: 2024-11-07 09:29:23
 | 
			
		||||
 # @LastEditors: zwq
 | 
			
		||||
 # @Description:
 | 
			
		||||
###
 | 
			
		||||
# 开发环境配置
 | 
			
		||||
@@ -12,18 +12,13 @@ ENV = 'development'
 | 
			
		||||
VUE_APP_TITLE = MES系统
 | 
			
		||||
 | 
			
		||||
# 芋道管理系统/开发环境
 | 
			
		||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
 | 
			
		||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.1.164:48082'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.1.81:48082'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
 | 
			
		||||
# VUE_APP_BASE_API = 'http://172.16.21.222:48082'
 | 
			
		||||
VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 积木报表指向地址
 | 
			
		||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
			
		||||
VUE_APP_JIMU_API = 'http://mes2.kszny.picaiba.com'
 | 
			
		||||
 | 
			
		||||
# 路由懒加载
 | 
			
		||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								.env.prod
									
									
									
									
									
								
							
							
						
						@@ -1,8 +1,8 @@
 | 
			
		||||
###
 | 
			
		||||
 # @Author: zhp
 | 
			
		||||
 # @Date: 2023-11-07 19:11:40
 | 
			
		||||
 # @LastEditTime: 2023-11-16 16:40:59
 | 
			
		||||
 # @LastEditors: zhp
 | 
			
		||||
 # @LastEditTime: 2024-10-17 09:09:05
 | 
			
		||||
 # @LastEditors: zwq
 | 
			
		||||
 # @Description:
 | 
			
		||||
###
 | 
			
		||||
# 生产环境配置
 | 
			
		||||
@@ -12,15 +12,18 @@ ENV = 'production'
 | 
			
		||||
VUE_APP_TITLE = MES系统
 | 
			
		||||
 | 
			
		||||
# 芋道管理系统/生产环境
 | 
			
		||||
VUE_APP_BASE_API = '/prod-api'
 | 
			
		||||
# VUE_APP_BASE_API = '/prod-api'
 | 
			
		||||
VUE_APP_BASE_API = ''
 | 
			
		||||
 | 
			
		||||
# 积木报表指向地址
 | 
			
		||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
			
		||||
# VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
			
		||||
VUE_APP_JIMU_API = ''
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 根据服务器或域名修改
 | 
			
		||||
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
 | 
			
		||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
 | 
			
		||||
# PUBLIC_PATH = 'http://192.168.0.33:8889/'
 | 
			
		||||
PUBLIC_PATH = ''
 | 
			
		||||
 | 
			
		||||
# 二级部署路径
 | 
			
		||||
VUE_APP_APP_NAME ='yudao-admin'
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "local": "vue-cli-service serve --mode local",
 | 
			
		||||
    "dev": "vue-cli-service serve --mode dev",
 | 
			
		||||
    "dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
 | 
			
		||||
    "front": "vue-cli-service serve --mode front",
 | 
			
		||||
    "build:prod": "vue-cli-service build --mode prod",
 | 
			
		||||
    "build:stage": "vue-cli-service build --mode stage",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,10 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2024-06-28 17:03:29
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-09-27 09:24:09
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 获取走势分析数据
 | 
			
		||||
@@ -8,7 +15,24 @@ export function getEnergyTrend(data) {
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 导出走势分析数据
 | 
			
		||||
export function exportTrend(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/analysis/energy-analysis/exportTrend',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 导出对比分析数据
 | 
			
		||||
export function exportCompare(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/analysis/energy-analysis/exportCompare',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获取对比分析数据
 | 
			
		||||
export function getCompare(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
@@ -27,6 +51,24 @@ export function getYoy(data) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 导出同比分析数据
 | 
			
		||||
export function exportYoy(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/analysis/energy-analysis/exportYoy',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 导出环比分析数据
 | 
			
		||||
export function exportChain(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/analysis/energy-analysis/exportChain',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获取环比分析数据(1:月,2:周,3:日)
 | 
			
		||||
export function getQoq(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
 
 | 
			
		||||
@@ -66,3 +66,10 @@ export function getCoreDepartmentList(query) {
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
export function getDepartmentList(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/dept/list',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2023-10-21 11:50:46
 | 
			
		||||
 * @LastEditTime: 2023-11-15 17:19:19
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2024-12-27 15:20:14
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
@@ -16,6 +16,14 @@ export function createCoreWO(data) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取工艺模式工单预计消耗物料
 | 
			
		||||
export function getMaterialCostWorkOrder(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/process-retrospect/getMaterialCostWorkOrder',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 更新工单
 | 
			
		||||
export function updateCoreWO(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
@@ -153,3 +161,20 @@ export function createConCoreWOr(data) {
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新分配产量
 | 
			
		||||
export function updateBatch(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-order-con-work-order/updateBatch',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 更新订单表与工单关联表 多对多
 | 
			
		||||
export function updateConCoreWOr(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-order-con-work-order/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,13 @@ export function createGroupRule(data) {
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 作废排班规则
 | 
			
		||||
export function disableGroupRule(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/group-scheduling-rule/disable?id=' + id,
 | 
			
		||||
    method: 'post',
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 更新排班规则基础信息
 | 
			
		||||
export function updateGroupRule(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										72
									
								
								src/api/base/orderGroup.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,72 @@
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
// 获得集团订单分页
 | 
			
		||||
export function getOrderGroupPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-group/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得集团订单
 | 
			
		||||
export function getOrderGroup(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-group/get',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新集团订单
 | 
			
		||||
export function updateOrderGroup(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-group/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建集团订单
 | 
			
		||||
export function createOrderGroup(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-group/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 修改集团订单状态,结束-终止-作废用
 | 
			
		||||
export function groupOrderStatusSet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-group/groupOrderStatusSet',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得集团订单详情
 | 
			
		||||
export function orderGroupDetail(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-group/getDetail',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建集团订单与厂务订单表关联表 一对多
 | 
			
		||||
export function orderConGroupOrder(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-con-group-order/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 订单监控
 | 
			
		||||
export function orderGroupMonitor(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order-group/orderGroupMonitor',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
@@ -50,6 +50,22 @@ export function getOrderById(query) {
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 订单进度-获取普通模式订单剩余数量
 | 
			
		||||
export function getOrderRemainNum(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order/getOrderRemainNum?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 订单进度-获取工艺模式订单预计消耗物料(计算后)
 | 
			
		||||
export function getMaterialCostOrder(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/process-retrospect/getMaterialCostOrder',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得工艺流程列表
 | 
			
		||||
export function getProcessFlowList() {
 | 
			
		||||
@@ -59,6 +75,16 @@ export function getProcessFlowList() {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// 获得工艺流程列表
 | 
			
		||||
export function getProcessFlowPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/process-flow/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建订单
 | 
			
		||||
export function orderCreate(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
@@ -125,7 +151,7 @@ export function orderAssignmentList(query) {
 | 
			
		||||
// 获得所有客户列表
 | 
			
		||||
export function customerList() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-customer/listAll',
 | 
			
		||||
    url: 'base/core-customer/listAll',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
@@ -156,3 +182,43 @@ export function orderFinish(query) {
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 作废订单
 | 
			
		||||
export function orderVoid(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/order/invalid',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function orderSplit(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order/split',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getDetailTree(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/order/getDetailTree',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
export function getDetailTreeInfo(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/order/getDetailTreeInfoByIdNew',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function orderStop(data) {
 | 
			
		||||
 return request({
 | 
			
		||||
    url: 'base/order/stop',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    params: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,16 @@
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
// 获得产品列表
 | 
			
		||||
// 获得物料列表(包括产品)
 | 
			
		||||
export function getProductAll() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-product-material/listAll',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获得产品列表
 | 
			
		||||
export function getProductList() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-product-material/listAllProduct',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										54
									
								
								src/api/equipment/base/inspection/items.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,54 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-07-23 13:44:00
 | 
			
		||||
 * @LastEditTime: 2024-07-31 09:34:17
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export function deleteData(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-program/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getItemPageData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-program/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getItemData(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-check-program/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function updateItemData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-check-program/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function createItemData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-check-program/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function deleteProgramTypeData(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-check-program-type/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2023-11-08 15:56:52
 | 
			
		||||
 * @LastEditTime: 2023-11-16 20:15:02
 | 
			
		||||
 * @LastEditTime: 2024-02-28 18:16:56
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
@@ -52,6 +52,17 @@ export function exportCheckLogExcel(query) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 导出设备巡检单记录
 | 
			
		||||
export function exportCheckOrderExcel(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/export-excel',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// 根据设备获得所有巡检配置列表
 | 
			
		||||
export function getcheckConfigByEqList(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
@@ -68,3 +79,55 @@ export function deleteEqCheckLog(id) {
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备巡检单详情分页
 | 
			
		||||
export function getCheckOrderDetPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order-det/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建设备巡检单详情
 | 
			
		||||
export function createCheckOrderDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order-det/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新设备巡检单详情
 | 
			
		||||
export function updateCheckOrderDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order-det/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除设备巡检单详情
 | 
			
		||||
export function deleteCheckOrderDet(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order-det/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备巡检计划单
 | 
			
		||||
export function getEqCheckOrder(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备巡检单分页
 | 
			
		||||
export function getCheckOrderPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2023-11-08 15:56:52
 | 
			
		||||
 * @LastEditTime: 2023-11-25 16:22:49
 | 
			
		||||
 * @LastEditTime: 2024-02-25 22:23:54
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
@@ -100,3 +100,63 @@ export function updateCheckConfig(data) {
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建巡检单
 | 
			
		||||
export function createCheckOrder(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新巡检单
 | 
			
		||||
export function updateCheckOrder(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备巡检单code
 | 
			
		||||
export function getOrderCode() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/getCode',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得巡检单
 | 
			
		||||
export function getCheckOrder(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得巡检单详细
 | 
			
		||||
export function getCheckOrderDet(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order-det/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建巡检单详情
 | 
			
		||||
export function createCheckOrderDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order-det/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新巡检单详情
 | 
			
		||||
export function updateCheckOrderDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order-det/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										26
									
								
								src/api/equipment/base/maintain/confirm.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,26 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2024-02-26 15:01:48
 | 
			
		||||
 * @LastEditTime: 2024-02-26 18:09:39
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 获得设备保养记录分页
 | 
			
		||||
export function getLogDetPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备巡检单
 | 
			
		||||
export function getCheckOrder(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/get',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										61
									
								
								src/api/equipment/base/maintain/items.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,61 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-07-12 15:31:41
 | 
			
		||||
 * @LastEditTime: 2024-07-30 16:44:47
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 删除设备保养记录
 | 
			
		||||
export function deleteData(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-program/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getItemPageData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-program/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params:data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getByEquId(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-program/getByEquId?id=' + id,
 | 
			
		||||
    method: 'get',
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getItemData(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-maintain-program/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function updateItemData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-maintain-program/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function createItemData(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-maintain-program/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function deleteProgramTypeData(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: 'base/equipment-maintain-program-type/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										104
									
								
								src/api/equipment/base/maintain/logConfig.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,104 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2024-07-30 15:46:23
 | 
			
		||||
 * @LastEditTime: 2024-07-31 09:18:25
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 获得设备保养计划配置分页
 | 
			
		||||
export function getLogPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建设备保养计划
 | 
			
		||||
export function createLog(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新设备保养计划
 | 
			
		||||
export function updateLog(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得计划code
 | 
			
		||||
export function getCode() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/getCode',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得计划
 | 
			
		||||
export function getLog(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/get',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备保养计划配置详情分页
 | 
			
		||||
export function getLogDetPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建设备保养计划详情
 | 
			
		||||
export function createLogDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新设备保养计划详情
 | 
			
		||||
export function updateLogDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得计划详情
 | 
			
		||||
export function getLogDet(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/get',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除设备保养计划
 | 
			
		||||
export function deleteLog(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除设备保养计划详情
 | 
			
		||||
export function deleteLogDet(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										104
									
								
								src/api/equipment/base/maintain/planconfig.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,104 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2024-02-22 15:14:19
 | 
			
		||||
 * @LastEditTime: 2024-02-23 19:18:22
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 获得设备保养计划配置分页
 | 
			
		||||
export function getPlanPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建设备保养计划
 | 
			
		||||
export function createPlan(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新设备保养计划
 | 
			
		||||
export function updatePlan(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得计划code
 | 
			
		||||
export function getCode() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan/getCode',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得计划
 | 
			
		||||
export function getPlan(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan/get',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备保养计划配置详情分页
 | 
			
		||||
export function getPlanDetPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan-det/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建设备保养计划详情
 | 
			
		||||
export function createPlanDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan-det/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新设备保养计划详情
 | 
			
		||||
export function updatePlanDet(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan-det/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得计划详情
 | 
			
		||||
export function getPlanDet(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan-det/get',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除设备保养计划
 | 
			
		||||
export function deletePlan(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除设备保养计划详情
 | 
			
		||||
export function deletePlanDet(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-plan-det/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Do not edit
 | 
			
		||||
 * @Date: 2023-11-08 15:56:52
 | 
			
		||||
 * @LastEditTime: 2023-11-23 19:10:07
 | 
			
		||||
 * @LastEditTime: 2024-02-26 17:02:53
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
@@ -42,3 +42,47 @@ export function exportMaintainLogExcel(query) {
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 导出巡检单
 | 
			
		||||
export function exportCheckOrderExcel(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-check-order/export-excel',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得保养记录
 | 
			
		||||
export function getLog(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log/get',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得设备保养记录详情分页
 | 
			
		||||
export function getLogDetPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除设备保养记录详情
 | 
			
		||||
export function deleteLogDet(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getEqMaintainPlanPageData(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-maintain-log-det/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										54
									
								
								src/api/home.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,54 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2024-09-12 13:38:33
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-09-13 15:25:07
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
// 获得首页生产总览以及工单监控
 | 
			
		||||
export function getHomeOrder(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-work-order/homeOrder',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获得首页生产总览-完成订单数量
 | 
			
		||||
export function getHomeOrderNum(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/order/homeOrder',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 首页设备总览
 | 
			
		||||
export function getHomeEquipment() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/monitoring/equipment-monitor/homeEquipment',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 首页设备报警信息
 | 
			
		||||
export function getHomeEquipmentAlarmList() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/equipment-alarm-realtime/homeEquipmentAlarmList',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获取是否存在报警(右上角红点)
 | 
			
		||||
export function getHomeGetAlarm() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-alarm-log/homeGetAlarm',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 条件查询获得异常警告列表
 | 
			
		||||
export function getHomeAlarmList(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-alarm-log/listbyfilter',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
@@ -27,7 +27,7 @@ export function getWorkOrderList(query) {
 | 
			
		||||
 | 
			
		||||
export function getCoreProduct(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/base/core-product/get?id=' + id,
 | 
			
		||||
    url: '/base/core-product-material/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -44,11 +44,7 @@ export function updateRole(data) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 角色状态修改
 | 
			
		||||
export function changeRoleStatus(id, status) {
 | 
			
		||||
  const data = {
 | 
			
		||||
    id,
 | 
			
		||||
    status
 | 
			
		||||
  }
 | 
			
		||||
export function changeRoleStatus(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/role/update-status',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										84
									
								
								src/api/warehouse/warehouse-area-setup.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,84 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-11-02 16:20:15
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-08-09 09:55:56
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 创建库区设置
 | 
			
		||||
export function createWarehouseArea(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新库区设置
 | 
			
		||||
export function updateWarehouseArea(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除库区设置
 | 
			
		||||
export function deleteWarehouseArea(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库区设置
 | 
			
		||||
export function getWarehouseArea(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库区设置列表
 | 
			
		||||
export function getWarehouseAreaList(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/listAll?warehouseId=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库区设置列表
 | 
			
		||||
export function getWarehouseAreaListAll() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/listAll',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库区设置分页
 | 
			
		||||
export function getWarehouseAreaPage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得code
 | 
			
		||||
export function getCode() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/getCode',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 导出库区设置 Excel
 | 
			
		||||
export function exportWarehouseAreaExcel(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-area/export-excel',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								src/api/warehouse/warehouse-location-setup.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,91 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-11-02 16:20:15
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-08-21 11:03:14
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 创建库位设置
 | 
			
		||||
export function createWarehouseLocation(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新库位设置
 | 
			
		||||
export function updateWarehouseLocation(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除库位设置
 | 
			
		||||
export function deleteWarehouseLocation(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库位设置
 | 
			
		||||
export function getWarehouseLocation(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 库位存储详情
 | 
			
		||||
export function getStoreInfo(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/getStoreInfo?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获得库位设置列表
 | 
			
		||||
export function getWarehouseLocationTree() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/getTree',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库位设置列表
 | 
			
		||||
export function getWarehouseLocationList() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/listAll',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库位设置分页
 | 
			
		||||
export function getWarehouseLocationPage(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/page',
 | 
			
		||||
    method: 'POST',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得code
 | 
			
		||||
export function getCode() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/getCode',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 导出库位设置 Excel
 | 
			
		||||
export function exportWarehouseLocationExcel(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/export-excel',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										84
									
								
								src/api/warehouse/warehouse-setup.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,84 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-11-02 16:20:15
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-07-30 14:14:48
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 创建仓库设置
 | 
			
		||||
export function createWarehouse(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/create',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 更新仓库设置
 | 
			
		||||
export function updateWarehouse(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/update',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除仓库设置
 | 
			
		||||
export function deleteWarehouse(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/delete?id=' + id,
 | 
			
		||||
    method: 'delete'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得仓库设置
 | 
			
		||||
export function getWarehouse(id) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/get?id=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得仓库设置列表
 | 
			
		||||
export function getWarehouseList() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/listAll',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得仓库首页统计信息
 | 
			
		||||
export function getWarehouseAllInfo() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/getAllInfo',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得仓库设置分页
 | 
			
		||||
export function getWarehousePage(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/page',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得code
 | 
			
		||||
export function getCode() {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/getCode',
 | 
			
		||||
    method: 'get'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 导出仓库设置 Excel
 | 
			
		||||
export function exportWarehouseExcel(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse/export-excel',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
    responseType: 'blob'
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-11-02 14:31:42
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-11-04 14:56:10
 | 
			
		||||
 * @LastEditTime: 2024-08-02 15:51:37
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
@@ -41,10 +41,11 @@ export function getWarehouseLocation(id) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获得库位列表(通过仓库id)
 | 
			
		||||
export function listByWarehouse(id) {
 | 
			
		||||
export function listByWarehouse(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location/listByWarehouse?warehouseId=' + id,
 | 
			
		||||
    method: 'get'
 | 
			
		||||
    url: '/extend/warehouse-location/listByWarehouse',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获得库位列表(All)
 | 
			
		||||
 
 | 
			
		||||
@@ -63,6 +63,14 @@ export function getWarehouseRealtimePage(data) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得库存列表分页
 | 
			
		||||
export function inventoryPage(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-realtime/allPage',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 获得出入库-无库位-历史分页
 | 
			
		||||
export function getWarehouseRealtimeHisPage(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
 
 | 
			
		||||
@@ -25,6 +25,22 @@ export function outWarehouseRealtimeLocation(data) {
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 出入库-有库位 > 移库操作
 | 
			
		||||
export function moveWarehouseRealtimeLocation(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-realtime-location/move',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
// 出入库-有库位 > 批量出库操作
 | 
			
		||||
export function outWarehouseRealtimeLocationList(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-realtime-location/outList',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 出入库-有库位 > 入库操作
 | 
			
		||||
export function inWarehouseRealtimeLocation(data) {
 | 
			
		||||
@@ -68,7 +84,16 @@ export function getWarehouseRealtimeLocationPage(data) {
 | 
			
		||||
// 获得出入库历史-有库位分页
 | 
			
		||||
export function getWarehouseLocationHisPage(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location-his/page',
 | 
			
		||||
    url: '/extend/warehouse-location-his/inAndOutPage',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获得移库历史-有库位分页
 | 
			
		||||
export function getMoveHisPage(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/extend/warehouse-location-his/movePage',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								src/assets/icons/svg/alarm-home.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,12 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title>切片</title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.300397">
 | 
			
		||||
        <g id="异常警告" transform="translate(-1468.000000, -122.000000)" fill="#000000" fill-rule="nonzero">
 | 
			
		||||
            <g id="编组" transform="translate(1468.000000, 122.000000)">
 | 
			
		||||
                <rect id="矩形" opacity="0" x="0" y="0" width="20" height="20"></rect>
 | 
			
		||||
                <path d="M9.30923195,2.02433324 C9.77491134,1.74507539 10.3606909,1.77046228 10.8045305,2.10049178 L16.9348344,6.65833873 L17.0554341,6.75466057 C17.5620417,7.18880359 17.858553,7.83620671 17.858553,8.52258247 L17.858553,15.8725474 L17.8541939,16.0176907 C17.7819026,17.2175976 16.8194895,18.1676569 15.6429193,18.1676569 L4.35708075,18.1676569 L4.21696353,18.1631414 C3.05860736,18.088257 2.14144699,17.0913218 2.14144699,15.8725474 L2.14144699,8.52279895 L2.14667089,8.36514909 C2.19177438,7.68568874 2.52672869,7.05865465 3.06516484,6.65833926 L9.19546584,2.10049447 Z M10.0594243,2.9649471 C9.98106349,2.94811965 9.89748036,2.96494528 9.8295714,3.01542217 L3.69926285,7.57327258 L3.6053427,7.65125711 C3.36716077,7.8716339 3.22876238,8.18810985 3.22876238,8.52279895 L3.22876238,15.8725474 L3.2339275,15.9851099 C3.28860185,16.5778056 3.77058378,17.041339 4.35708075,17.041339 L9.37562475,17.0406466 L9.45894699,16.9543314 L9.45935013,12.0522655 L9.46519481,11.973647 C9.50370053,11.7169857 9.72785233,11.5189729 10,11.5189729 C10.2788031,11.5189729 10.5102651,11.7278709 10.5378921,11.998001 L10.5407652,12.056799 L10.5406137,16.9543234 L10.6239359,17.0406466 L15.6429082,17.041339 L15.7515746,17.0359886 C16.3237555,16.9793531 16.7712376,16.4800823 16.7712376,15.8725474 L16.7712376,8.52279895 L16.7648256,8.39829639 C16.7308293,8.06937748 16.5632607,7.76840693 16.3007289,7.57326642 L10.1704369,3.01542833 L10.1168893,2.98387768 Z" id="形状结合" stroke="#000000" stroke-width="0.1"></path>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
							
								
								
									
										15
									
								
								src/assets/icons/svg/alarm.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">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="3-设备管理-设备保养-保养项目设置" transform="translate(-1713.000000, -32.000000)">
 | 
			
		||||
            <g id="icon/banner/消息" transform="translate(1713.000000, 32.000000)">
 | 
			
		||||
                <g id="编组">
 | 
			
		||||
                    <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
 | 
			
		||||
                    <path d="M13.875,20.6585751 L13.9796526,20.6647179 C14.3523487,20.7094224 14.6,20.9943408 14.6,21.3949387 C14.6,21.793137 14.3546839,22.079785 13.9805499,22.1250542 L13.8720425,22.1313899 L10.125,22.1313023 L10.0203474,22.1251595 C9.64765132,22.080455 9.4,21.7955365 9.4,21.3949387 C9.4,20.9967404 9.64531608,20.7100924 10.0194501,20.6648232 L10.1279575,20.6584875 L13.875,20.6585751 Z M12,0.930991914 L12.114202,0.938656892 C12.4461465,0.982430206 12.6786924,1.21840343 12.7188472,1.56053658 L12.7250824,1.6705356 L12.724,2.83025932 L12.975759,2.90430031 L13.2244725,2.9413468 C16.687784,3.51732717 19.3536312,6.48703662 19.5838508,10.0724929 L19.5959741,10.3244915 L19.6000064,10.5775585 L19.6,18.0623023 L20.7499628,18.1131205 L20.8641749,18.1204751 C21.1961465,18.1642484 21.4286924,18.4002216 21.4688472,18.7423548 L21.4750824,18.8523538 L21.4678171,18.9675593 C21.4246486,19.3025982 21.1922705,19.5388574 20.8555499,19.5795997 L20.7470425,19.5859353 L3.25,19.5859353 L3.14534744,19.5797049 C2.77265132,19.5350005 2.525,19.250082 2.525,18.8494841 C2.525,18.4512975 2.77030543,18.1646386 3.1443756,18.1193685 L3.25285992,18.113033 L4.35003719,18.1123023 L4.4,10.5767569 L4.40403631,10.3246942 C4.524824,6.55675169 7.34298069,3.38911146 11.0266305,2.90405757 L11.229889,2.87995432 L11.275,1.66770897 L11.2823355,1.55103724 C11.3211556,1.24947788 11.5116242,1.02739927 11.7956288,0.955808301 L11.897531,0.937079811 L12,0.930991914 Z M12,4.31312051 C8.70150639,4.31312051 5.97362451,6.99932148 5.85407645,10.3480678 L5.85000794,10.5758657 L5.849,18.0622956 L18.099,18.1123023 L18.099,18.0619919 L18.1,17.9609919 L18.15,10.5767635 L18.1459233,10.3480647 C18.0266869,7.00812062 15.3071214,4.31312051 12,4.31312051 Z" id="形状结合" fill="#000000" fill-rule="nonzero"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
                <circle id="Oval-1-Copy-2" fill="#F5222D" cx="18" cy="6" r="3"></circle>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.5 KiB  | 
							
								
								
									
										27
									
								
								src/assets/icons/svg/back.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,27 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="72px" height="72px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title>rollback</title>
 | 
			
		||||
    <defs>
 | 
			
		||||
        <filter x="-1.1%" y="-5.8%" width="102.1%" height="115.3%" filterUnits="objectBoundingBox" id="filter-1">
 | 
			
		||||
            <feOffset dx="0" dy="5" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
 | 
			
		||||
            <feGaussianBlur stdDeviation="6" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
 | 
			
		||||
            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.0926573427 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
 | 
			
		||||
            <feMerge>
 | 
			
		||||
                <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
 | 
			
		||||
                <feMergeNode in="SourceGraphic"></feMergeNode>
 | 
			
		||||
            </feMerge>
 | 
			
		||||
        </filter>
 | 
			
		||||
    </defs>
 | 
			
		||||
    <g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="页内多种导航方式" transform="translate(-1914.000000, -745.000000)" fill-rule="nonzero">
 | 
			
		||||
            <g id="编组-16" filter="url(#filter-1)" transform="translate(94.000000, 641.000000)">
 | 
			
		||||
                <g id="编组-3备份" transform="translate(1816.000000, 96.000000)">
 | 
			
		||||
                    <g id="rollback" transform="translate(16.000000, 15.000000)">
 | 
			
		||||
                        <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="20" height="20"></rect>
 | 
			
		||||
                        <path d="M11.390625,3.78125 L5.71875,3.78125 L5.71875,2.625 C5.71875,2.5203125 5.5984375,2.4625 5.5171875,2.5265625 L3.2984375,4.2765625 C3.234375,4.3265625 3.234375,4.4234375 3.2984375,4.4734375 L5.5171875,6.2234375 C5.5984375,6.2875 5.71875,6.2296875 5.71875,6.125 L5.71875,4.96875 L11.203125,4.96875 C11.7554097,4.96875 12.203125,5.41646525 12.203125,5.96875 L12.203125,11.3125 C12.203125,11.8647847 11.7554097,12.3125 11.203125,12.3125 L2.93775156,12.3125 L2.93775156,12.3125 C2.55569144,12.3125 2.36466138,12.4938859 2.36466138,12.8566576 C2.36466138,13.5 2.93775156,13.5 2.93775156,13.5 C2.93775156,13.5 5.75537604,13.5 11.390625,13.5 C13,13.5 13.390625,12.8986083 13.390625,11.9909216 L13.390625,4.96875 C13.390625,4.06071182 13,3.78125 11.390625,3.78125 Z" id="路径" fill="#0B58FF"></path>
 | 
			
		||||
                    </g>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
							
								
								
									
										15
									
								
								src/assets/icons/svg/home-alarm-white-circle.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">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-1713.000000, -32.000000)">
 | 
			
		||||
            <g id="icon/banner/消息" transform="translate(1713.000000, 32.000000)">
 | 
			
		||||
                <g id="编组">
 | 
			
		||||
                    <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
 | 
			
		||||
                    <path d="M13.875,20.6585751 L13.9796526,20.6647179 C14.3523487,20.7094224 14.6,20.9943408 14.6,21.3949387 C14.6,21.793137 14.3546839,22.079785 13.9805499,22.1250542 L13.8720425,22.1313899 L10.125,22.1313023 L10.0203474,22.1251595 C9.64765132,22.080455 9.4,21.7955365 9.4,21.3949387 C9.4,20.9967404 9.64531608,20.7100924 10.0194501,20.6648232 L10.1279575,20.6584875 L13.875,20.6585751 Z M12,0.930991914 L12.114202,0.938656892 C12.4461465,0.982430206 12.6786924,1.21840343 12.7188472,1.56053658 L12.7250824,1.6705356 L12.724,2.83025932 L12.975759,2.90430031 L13.2244725,2.9413468 C16.687784,3.51732717 19.3536312,6.48703662 19.5838508,10.0724929 L19.5959741,10.3244915 L19.6000064,10.5775585 L19.6,18.0623023 L20.7499628,18.1131205 L20.8641749,18.1204751 C21.1961465,18.1642484 21.4286924,18.4002216 21.4688472,18.7423548 L21.4750824,18.8523538 L21.4678171,18.9675593 C21.4246486,19.3025982 21.1922705,19.5388574 20.8555499,19.5795997 L20.7470425,19.5859353 L3.25,19.5859353 L3.14534744,19.5797049 C2.77265132,19.5350005 2.525,19.250082 2.525,18.8494841 C2.525,18.4512975 2.77030543,18.1646386 3.1443756,18.1193685 L3.25285992,18.113033 L4.35003719,18.1123023 L4.4,10.5767569 L4.40403631,10.3246942 C4.524824,6.55675169 7.34298069,3.38911146 11.0266305,2.90405757 L11.229889,2.87995432 L11.275,1.66770897 L11.2823355,1.55103724 C11.3211556,1.24947788 11.5116242,1.02739927 11.7956288,0.955808301 L11.897531,0.937079811 L12,0.930991914 Z M12,4.31312051 C8.70150639,4.31312051 5.97362451,6.99932148 5.85407645,10.3480678 L5.85000794,10.5758657 L5.849,18.0622956 L18.099,18.1123023 L18.15,10.5767635 L18.1459233,10.3480647 C18.0266869,7.00812062 15.3071214,4.31312051 12,4.31312051 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
                <circle id="Oval-1-Copy-2" fill="#F5222D" cx="18" cy="6" r="3"></circle>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
							
								
								
									
										14
									
								
								src/assets/icons/svg/home-alarm-white.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,14 @@
 | 
			
		||||
<?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">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-1713.000000, -32.000000)">
 | 
			
		||||
            <g id="icon/banner/消息" transform="translate(1713.000000, 32.000000)">
 | 
			
		||||
                <g id="编组">
 | 
			
		||||
                    <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
 | 
			
		||||
                    <path d="M13.875,20.6585751 L13.9796526,20.6647179 C14.3523487,20.7094224 14.6,20.9943408 14.6,21.3949387 C14.6,21.793137 14.3546839,22.079785 13.9805499,22.1250542 L13.8720425,22.1313899 L10.125,22.1313023 L10.0203474,22.1251595 C9.64765132,22.080455 9.4,21.7955365 9.4,21.3949387 C9.4,20.9967404 9.64531608,20.7100924 10.0194501,20.6648232 L10.1279575,20.6584875 L13.875,20.6585751 Z M12,0.930991914 L12.114202,0.938656892 C12.4461465,0.982430206 12.6786924,1.21840343 12.7188472,1.56053658 L12.7250824,1.6705356 L12.724,2.83025932 L12.975759,2.90430031 L13.2244725,2.9413468 C16.687784,3.51732717 19.3536312,6.48703662 19.5838508,10.0724929 L19.5959741,10.3244915 L19.6000064,10.5775585 L19.6,18.0623023 L20.7499628,18.1131205 L20.8641749,18.1204751 C21.1961465,18.1642484 21.4286924,18.4002216 21.4688472,18.7423548 L21.4750824,18.8523538 L21.4678171,18.9675593 C21.4246486,19.3025982 21.1922705,19.5388574 20.8555499,19.5795997 L20.7470425,19.5859353 L3.25,19.5859353 L3.14534744,19.5797049 C2.77265132,19.5350005 2.525,19.250082 2.525,18.8494841 C2.525,18.4512975 2.77030543,18.1646386 3.1443756,18.1193685 L3.25285992,18.113033 L4.35003719,18.1123023 L4.4,10.5767569 L4.40403631,10.3246942 C4.524824,6.55675169 7.34298069,3.38911146 11.0266305,2.90405757 L11.229889,2.87995432 L11.275,1.66770897 L11.2823355,1.55103724 C11.3211556,1.24947788 11.5116242,1.02739927 11.7956288,0.955808301 L11.897531,0.937079811 L12,0.930991914 Z M12,4.31312051 C8.70150639,4.31312051 5.97362451,6.99932148 5.85407645,10.3480678 L5.85000794,10.5758657 L5.849,18.0622956 L18.099,18.1123023 L18.15,10.5767635 L18.1459233,10.3480647 C18.0266869,7.00812062 15.3071214,4.31312051 12,4.31312051 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										15
									
								
								src/assets/icons/svg/home-device-alarm.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,15 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-992.000000, -521.000000)">
 | 
			
		||||
            <g id="设备告警" transform="translate(992.000000, 521.000000)">
 | 
			
		||||
                <rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
 | 
			
		||||
                <g id="告警视图" transform="translate(8.196906, 8.196906)" fill-rule="nonzero">
 | 
			
		||||
                    <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="15.6061876" height="15.6061876"></rect>
 | 
			
		||||
                    <path d="M0,11.6800274 L0,1 C-1.78657678e-16,0.44771525 0.44771525,5.45542273e-16 1,0 L14.6061876,0 C15.1584723,-1.01453063e-16 15.6061876,0.44771525 15.6061876,1 L15.6061876,11.6800274 C15.6061876,12.2323122 15.1584723,12.6800274 14.6061876,12.6800274 L1,12.6800274 C0.44771525,12.6800274 -3.76453835e-16,12.2323122 0,11.6800274 Z M13.6554141,1.95077345 L1.95077345,1.95077345 L1.95077345,10.729254 L13.6554141,10.729254 L13.6554141,1.95077345 Z M7.80309379,6.82770706 C7.26440257,6.82770706 6.82770706,6.39101155 6.82770706,5.85232034 L6.82770706,3.90154689 C6.82770706,3.36285568 7.26440257,2.92616017 7.80309379,2.92616017 C8.341785,2.92616017 8.77848051,3.36285568 8.77848051,3.90154689 L8.77848051,5.85232034 C8.77848051,6.39101155 8.341785,6.82770706 7.80309379,6.82770706 Z M7.80309379,9.75386723 C7.26440257,9.75386723 6.82770706,9.31717172 6.82770706,8.77848051 C6.82770706,8.2397893 7.26440257,7.80309379 7.80309379,7.80309379 C8.341785,7.80309379 8.77848051,8.2397893 8.77848051,8.77848051 C8.77848051,9.31717172 8.341785,9.75386723 7.80309379,9.75386723 Z M11.7046407,15.6061876 L3.90154689,15.6061876 C3.36285568,15.6061876 2.92616017,15.1694921 2.92616017,14.6308009 C2.92616017,14.0921096 3.36285568,13.6554141 3.90154689,13.6554141 L11.7046407,13.6554141 C12.2433319,13.6554141 12.6800274,14.0921096 12.6800274,14.6308009 C12.6800274,15.1694921 12.2433319,15.6061876 11.7046407,15.6061876 Z" id="形状" fill="#FFFFFF"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
							
								
								
									
										33
									
								
								src/assets/icons/svg/home-device-menu.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,33 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-873.000000, -386.000000)">
 | 
			
		||||
            <g id="设备管理" transform="translate(873.000000, 386.000000)">
 | 
			
		||||
                <rect id="矩形备份-7" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
 | 
			
		||||
                <g id="编组-13" transform="translate(3.180289, 2.923263)">
 | 
			
		||||
                    <g id="编组-10" fill-rule="nonzero">
 | 
			
		||||
                        <g id="设备" fill="#0B58FF">
 | 
			
		||||
                            <rect id="矩形" opacity="0" x="2.00676053" y="1.65338444" width="46.1399529" height="46.1399529"></rect>
 | 
			
		||||
                            <g id="烧瓶,实验,化学,科学">
 | 
			
		||||
                                <rect id="矩形" opacity="0" x="4.42964393" y="4.42964393" width="41.294186" height="41.294186"></rect>
 | 
			
		||||
                                <g id="还原画布">
 | 
			
		||||
                                    <rect id="矩形" opacity="0" x="0" y="0" width="50.1534739" height="50.1534739"></rect>
 | 
			
		||||
                                    <path d="M1.72467326,45.9476439 C1.72467326,47.1152471 2.60037565,47.9909495 3.76797884,47.9909495 L46.3854951,47.9909495 C47.5530983,47.9909495 48.4288007,47.1152471 48.4288007,45.9476439 L48.4288007,13.8385563 L1.72467326,13.8385563 L1.72467326,45.9476439 Z M18.1370611,29.0173977 L38.650124,29.0173977 C39.6980043,29.0173977 40.5474792,29.8668726 40.5474792,30.9147529 C40.5474792,31.9626332 39.6980043,32.8121081 38.650124,32.8121081 L18.1370611,32.8121081 C17.0891807,32.8121081 16.2397059,31.9626332 16.2397059,30.9147529 C16.2397059,29.8668726 17.0891807,29.0173977 18.1370611,29.0173977 Z M10.2370348,36.6068184 L38.650124,36.6068184 C39.6980043,36.6068184 40.5474792,37.4562933 40.5474792,38.5041736 C40.5474792,39.5520539 39.6980043,40.4015288 38.650124,40.4015288 L10.2370348,40.4015288 C9.18915443,40.4015288 8.33967958,39.5520539 8.33967958,38.5041736 C8.33967958,37.4562933 9.18915443,36.6068184 10.2370348,36.6068184 Z M24.2010346,11.7952507 L1.72467326,11.7952507 L6.395086,3.62202844 C6.9788876,2.74632605 8.14649078,2.16252446 9.31409396,2.16252446 L23.9091338,2.16252446 L23.9091338,11.7952507 L24.2010346,11.7952507 Z M48.4288007,11.7952507 L26.2443401,11.7952507 L26.2443401,2.45442526 L40.8393799,2.45442526 C42.0069831,2.45442526 43.1745863,3.03822685 43.7583879,3.91392924 L48.4288007,11.7952507 Z" id="形状"></path>
 | 
			
		||||
                                </g>
 | 
			
		||||
                            </g>
 | 
			
		||||
                        </g>
 | 
			
		||||
                        <g id="还原画布" transform="translate(1.723618, 2.162524)" fill="#18104D">
 | 
			
		||||
                            <path d="M22.4763613,9.63272627 L0,9.63272627 L4.67041274,1.45950398 C5.25421433,0.583801592 6.42181752,0 7.5894207,0 L22.1844605,0 L22.1844605,9.63272627 L22.4763613,9.63272627 Z" id="形状"></path>
 | 
			
		||||
                        </g>
 | 
			
		||||
                        <g id="还原画布" transform="translate(26.191259, 2.454425)" fill="#18104D">
 | 
			
		||||
                            <path d="M22.1844605,9.34082548 L0,9.34082548 L0,0 L14.5950398,0 C15.762643,0 16.9302462,0.583801592 17.5140478,1.45950398 L22.1844605,9.34082548 Z" id="形状"></path>
 | 
			
		||||
                        </g>
 | 
			
		||||
                    </g>
 | 
			
		||||
                    <path d="M12.3066146,-5.29775726 L15.1753655,-3.62876956 C15.5740069,-3.25849694 15.8853072,-2.83209012 16.1092662,-2.34954908 C16.3332252,-1.86700804 16.4452047,-1.36084209 16.4452047,-0.831051217 L16.4452047,13.7613962 L12.3066146,13.7613962 L12.3066146,-5.29775726 Z" id="矩形" fill="#69F8AF" transform="translate(14.375910, 4.231819) rotate(-90.000000) translate(-14.375910, -4.231819) "></path>
 | 
			
		||||
                    <path d="M33.62186,-5.29775726 L36.4906108,-3.62876956 C36.8892523,-3.25849694 37.2005525,-2.83209012 37.4245115,-2.34954908 C37.6484705,-1.86700804 37.76045,-1.36084209 37.76045,-0.831051217 L37.76045,13.7613962 L33.62186,13.7613962 L33.62186,-5.29775726 Z" id="矩形备份-5" fill="#69F8AF" transform="translate(35.691155, 4.231819) scale(-1, 1) rotate(-90.000000) translate(-35.691155, -4.231819) "></path>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
							
								
								
									
										25
									
								
								src/assets/icons/svg/home-device.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,25 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-992.000000, -164.000000)">
 | 
			
		||||
            <g id="编组-8备份" transform="translate(968.000000, 140.000000)">
 | 
			
		||||
                <g id="设备总览" transform="translate(24.000000, 24.000000)">
 | 
			
		||||
                    <rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
 | 
			
		||||
                    <g id="烧瓶,实验,化学,科学" transform="translate(7.000000, 7.000000)" fill="#FFFFFF" fill-rule="nonzero">
 | 
			
		||||
                        <rect id="矩形" opacity="0" x="0.723623255" y="0.596198408" width="16.6377315" height="16.6377315"></rect>
 | 
			
		||||
                        <g>
 | 
			
		||||
                            <rect id="矩形" opacity="0" x="1.59729739" y="1.59729739" width="14.8903832" height="14.8903832"></rect>
 | 
			
		||||
                            <g id="还原画布">
 | 
			
		||||
                                <rect id="矩形" opacity="0" x="0" y="0" width="18.084978" height="18.084978"></rect>
 | 
			
		||||
                                <g id="玻璃" transform="translate(0.634017, 0.634017)">
 | 
			
		||||
                                    <path d="M13.2593143,16.8169433 L0.5,16.8169433 C0.223857625,16.8169433 2.55862292e-16,16.5930857 0,16.3169433 L0,0.5 C-3.38176876e-17,0.223857625 0.223857625,1.61748834e-16 0.5,0 L13.2593143,0 C13.5354566,-5.07265313e-17 13.7593143,0.223857625 13.7593143,0.5 L13.7593143,16.3169433 C13.7593143,16.5930857 13.5354566,16.8169433 13.2593143,16.8169433 Z M1.37593143,15.2881288 L12.3833828,15.2881288 L12.3833828,1.52881452 L1.37593143,1.52881452 L1.37593143,15.2881288 Z M16.3169433,15.2881288 L13.4949152,15.2881288 C13.2187728,15.2881288 12.9949152,15.0642712 12.9949152,14.7881288 L12.9949152,2.02881452 C12.9949152,1.75267215 13.2187728,1.52881452 13.4949152,1.52881452 L16.3169433,1.52881452 C16.5930857,1.52881452 16.8169433,1.75267215 16.8169433,2.02881452 L16.8169433,14.7881288 C16.8169433,15.0642712 16.5930857,15.2881288 16.3169433,15.2881288 Z M3.2320096,9.37531556 C2.97585886,9.13419414 2.9636752,8.7310754 3.20479662,8.47492467 C3.20919378,8.47025343 3.21366127,8.46564888 3.21819754,8.46111261 L9.1694159,2.50989424 C9.42803493,2.25127521 9.84535293,2.24497024 10.1116667,2.49565843 C10.3678175,2.73677985 10.3800011,3.13989859 10.1388797,3.39604932 C10.1344826,3.40072056 10.1300151,3.40532511 10.1254788,3.40986138 L4.17426043,9.36107975 C3.9156414,9.61969878 3.4983234,9.62600375 3.2320096,9.37531556 Z M4.03073192,13.7322196 C3.77458118,13.4910982 3.76239752,13.0879795 4.00351894,12.8318287 C4.00791611,12.8271575 4.01238359,12.8225529 4.01691986,12.8180167 L9.96813823,6.86679831 C10.2267573,6.60817928 10.6440753,6.60187431 10.9103891,6.85256249 C11.1665398,7.09368392 11.1787235,7.49680265 10.937602,7.75295339 C10.9332049,7.75762463 10.9287374,7.76222918 10.9242011,7.76676545 L4.97298275,13.7179838 C4.71436372,13.9766028 4.29704572,13.9829078 4.03073192,13.7322196 Z" id="形状"></path>
 | 
			
		||||
                                </g>
 | 
			
		||||
                            </g>
 | 
			
		||||
                        </g>
 | 
			
		||||
                    </g>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 3.3 KiB  | 
							
								
								
									
										17
									
								
								src/assets/icons/svg/home-order-menu.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,17 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-506.000000, -386.000000)">
 | 
			
		||||
            <g id="订单管理" transform="translate(506.000000, 386.000000)">
 | 
			
		||||
                <rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
 | 
			
		||||
                <g id="订单" transform="translate(0.499522, 1.000000)" fill-rule="nonzero">
 | 
			
		||||
                    <path d="M29.5269045,4.05189545 C43.5955288,4.05189545 55.0009567,15.4573234 55.0009567,29.5259477 C55.0009567,43.594572 43.5955288,55 29.5269045,55 C15.4582801,55 4.05285219,43.594572 4.05285219,29.5259477 C4.05285219,15.4573234 15.4582801,4.05189545 29.5269045,4.05189545 L29.5269045,4.05189545 Z M29.5269045,9.84145279 C18.6552737,9.84145279 9.84240952,18.654317 9.84240952,29.5259477 C9.84240952,40.3975785 18.6552737,49.2104427 29.5269045,49.2104427 C40.3985352,49.2104427 49.2113994,40.3975785 49.2113994,29.5259477 C49.2113994,18.654317 40.3985352,9.84145279 29.5269045,9.84145279 Z M29.5269045,13.3151872 C38.4798759,13.3151872 45.737665,20.5729763 45.737665,29.5259477 C45.737665,38.4789192 38.4798759,45.7367083 29.5269045,45.7367083 C20.573933,45.7367083 13.3161439,38.4789192 13.3161439,29.5259477 C13.3161439,20.5729763 20.573933,13.3151872 29.5269045,13.3151872 Z" id="形状" fill="#0B58FF"></path>
 | 
			
		||||
                    <path d="M29.5269045,17.9468331 C35.9220495,17.9468331 41.1060191,23.1308027 41.1060191,29.5259477 C41.1060191,35.9210928 35.9220495,41.1050624 29.5269045,41.1050624 C23.1317594,41.1050624 17.9477898,35.9210928 17.9477898,29.5259477 C17.9477898,23.1308027 23.1317594,17.9468331 29.5269045,17.9468331 Z M29.5269045,21.4205675 C25.0504265,21.4205675 21.4215242,25.0494698 21.4215242,29.5259477 C21.4215242,34.0024256 25.0504265,37.631328 29.5269045,37.631328 C34.0033824,37.631328 37.6322847,34.0024256 37.6322847,29.5259477 C37.6322847,25.0494698 34.0033824,21.4205675 29.5269045,21.4205675 Z" id="形状" fill="#69F8AF"></path>
 | 
			
		||||
                    <path d="M26.0531701,29.5259477 C26.0531701,30.7669935 26.7152601,31.9137671 27.7900372,32.53429 C28.8648144,33.154813 30.1889945,33.154813 31.2637717,32.53429 C32.3385489,31.9137671 33.0006389,30.7669935 33.0006389,29.5259477 C33.0006389,27.6074572 31.445395,26.0522133 29.5269045,26.0522133 C27.6084139,26.0522133 26.0531701,27.6074572 26.0531701,29.5259477 L26.0531701,29.5259477 Z" id="路径" fill="#69F8AF"></path>
 | 
			
		||||
                    <path d="M5.16097346,0.068680005 L11.4032742,6.31213864 C11.5452724,6.45390019 11.6069803,6.65727562 11.5676976,6.8540412 L10.9864261,9.75692525 L30.1405975,28.9122546 C30.4594387,29.2544288 30.4500307,29.787647 30.1193172,30.1183605 C29.7886037,30.449074 29.2553855,30.458482 28.9132114,30.1396408 L9.75788199,10.9854693 L6.85499794,11.5667409 C6.65823235,11.6060236 6.45485693,11.5443156 6.31309537,11.4023174 L0.070794654,5.16001673 C0.00785917816,5.09751387 -0.0154139259,5.00536463 0.010295925,4.92047361 C0.036005776,4.8355826 0.10649489,4.77182992 0.19353327,4.75474771 L3.60358254,4.07273786 C3.84074434,4.02516282 4.02611955,3.8397876 4.0736946,3.6026258 L4.75686236,0.192576532 C4.77415833,0.106307273 4.83733049,0.0364492466 4.92143088,0.0105907928 C5.00553127,-0.015267661 5.0970389,0.00703077709 5.15981555,0.068680005 L5.16097346,0.068680005 Z" id="路径" fill="#18104D"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 3.6 KiB  | 
							
								
								
									
										18
									
								
								src/assets/icons/svg/home-order-monitor.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,18 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-64.000000, -521.000000)">
 | 
			
		||||
            <g id="工单监控" transform="translate(64.000000, 521.000000)">
 | 
			
		||||
                <g id="监控" transform="translate(0.000000, 0.000000)" fill="#000000" fill-rule="nonzero" opacity="0">
 | 
			
		||||
                    <rect id="矩形" x="0" y="0" width="32" height="32"></rect>
 | 
			
		||||
                </g>
 | 
			
		||||
                <rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
 | 
			
		||||
                <path d="M7.95196014,15.04804 C7.95196014,17.9233277 9.4859078,20.5802032 11.97598,22.0178471 C14.4660522,23.455491 17.5339478,23.455491 20.02402,22.0178471 C22.5140922,20.5802032 24.0480399,17.9233277 24.0480399,15.04804 C24.0480399,12.1727522 22.5140922,9.51587679 20.02402,8.07823291 C17.5339477,6.64058903 14.4660523,6.64058903 11.97598,8.07823291 C9.48590782,9.51587679 7.95196014,12.1727522 7.95196014,15.04804 L7.95196014,15.04804 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
 | 
			
		||||
                <path d="M10.5399801,15.04804 C10.5399801,18.0635257 12.9845143,20.5080599 16,20.5080599 C19.0154857,20.5080599 21.4600199,18.0635257 21.4600199,15.04804 C21.4600199,12.0325543 19.0154857,9.58802008 16,9.58802008 C12.9845143,9.58802008 10.5399801,12.0325543 10.5399801,15.04804 L10.5399801,15.04804 Z" id="路径" fill="#0B58FF" fill-rule="nonzero"></path>
 | 
			
		||||
                <path d="M13.12154,13.60882 C13.12154,14.4036848 13.7659053,15.04805 14.56077,15.04805 C15.3556348,15.04805 16,14.4036848 16,13.60882 C16,12.8139552 15.3556348,12.16959 14.56077,12.16959 C13.7659053,12.16959 13.12154,12.8139552 13.12154,13.60882 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
 | 
			
		||||
                <path d="M11.4822601,22.9347398 L10.8368601,22.9347398 L10.1914601,24.9999998 L21.8085399,24.9999998 L21.1631399,22.9347398 L20.5177399,22.9347398 C17.7631022,24.6949766 14.2368978,24.6949766 11.4822601,22.9347398 L11.4822601,22.9347398 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										14
									
								
								src/assets/icons/svg/home-produce.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,14 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-64.000000, -164.000000)">
 | 
			
		||||
            <g id="编组-8" transform="translate(40.000000, 140.000000)">
 | 
			
		||||
                <g id="生产总览" transform="translate(24.000000, 24.000000)">
 | 
			
		||||
                    <rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
 | 
			
		||||
                    <path d="M8.37437968,12.8114326 L15.7504058,17.0898781 C15.8242411,17.1328167 15.9080324,17.1555207 15.9933456,17.1555207 C16.0810002,17.1555207 16.1670458,17.131811 16.2414377,17.0872002 L23.5609995,12.8417393 C23.7926594,12.7069596 23.8719923,12.4078775 23.7377553,12.1750584 C23.6941637,12.0993735 23.6311005,12.036866 23.5563023,11.9947862 L16.2647451,7.74687591 C16.1909326,7.70388503 16.1071411,7.68113461 16.0218216,7.68113461 C15.9265067,7.68101965 15.8332679,7.70910321 15.7537378,7.76188227 L8.44005972,12.0039794 C8.20831857,12.137714 8.12809173,12.4360124 8.26123967,12.6689293 C8.29129448,12.7215224 8.33087471,12.7680046 8.37793917,12.8059787 L8.37437968,12.8114326 Z M21.6810442,15.0685273 L21.2137792,15.3395552 L21.2137792,15.3395552 L16.4927009,18.0091478 C16.1870188,18.1819995 15.8130711,18.1818429 15.5075339,18.0087351 L10.3178102,15.0684002 C10.0088558,14.8933563 9.63024672,14.895282 9.32308895,15.0734597 L8.44007598,15.5856824 L8.44007598,15.5856824 C8.20833482,15.719417 8.12807547,16.017699 8.26125592,16.2505344 C8.29182536,16.3040667 8.33225083,16.351269 8.38037719,16.3896249 L8.37728903,16.3948175 L15.7504708,20.6715484 C15.9025556,20.7600033 16.0903428,20.7590041 16.2414864,20.6689358 L23.5609995,16.4234259 C23.7926756,16.2885809 23.8720085,15.9895315 23.7377716,15.7567777 C23.6940662,15.6810601 23.6310842,15.61852 23.556286,15.5764238 L22.6861859,15.0694958 C22.3756549,14.8885777 21.9919233,14.8882079 21.6810442,15.0685273 Z M21.6866857,18.6534468 L21.2195166,18.924426 L21.2195166,18.924426 L16.4950848,21.6207262 C16.1882146,21.7958614 15.8117014,21.7960578 15.5046487,21.6212428 L10.7829566,18.9330314 L10.7829566,18.9330314 L10.3151216,18.661704 C10.0048329,18.4817477 9.6219281,18.4817646 9.31165532,18.6617485 L8.44007598,19.1673364 L8.44007598,19.1673364 C8.20833482,19.3010546 8.12810798,19.5993693 8.26125592,19.8322047 C8.29148444,19.8851411 8.33137304,19.9318794 8.37883311,19.9699725 L8.37546865,19.9753448 L15.7504221,24.2531371 C15.8242543,24.2960928 15.9080429,24.3187608 15.9933618,24.3188656 C16.0806614,24.3189335 16.1663657,24.2953601 16.2414539,24.2506225 L23.5610157,20.0050799 C23.7926756,19.8702023 23.8720085,19.5710875 23.7377716,19.3384318 C23.6941799,19.2627141 23.6311817,19.2001577 23.5563023,19.1580778 L22.6918543,18.6544197 C22.3813173,18.4734898 21.9975724,18.4731184 21.6866857,18.6534468 Z" id="形状" fill="#FFFFFF" fill-rule="nonzero"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 3.1 KiB  | 
							
								
								
									
										19
									
								
								src/assets/icons/svg/home-quality-menu.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,19 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-1240.000000, -386.000000)">
 | 
			
		||||
            <g id="质量管理" transform="translate(1240.000000, 386.000000)">
 | 
			
		||||
                <rect id="矩形备份-10" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
 | 
			
		||||
                <g id="08质量" transform="translate(3.882568, 2.468968)">
 | 
			
		||||
                    <g id="编组-14" transform="translate(0.000000, 0.000000)">
 | 
			
		||||
                        <path d="M48.2348648,9.32705134 L48.2348648,23.3176283 C48.2348648,36.256626 39.5936261,48.3269278 28.0262536,51.2987824 C16.4131602,48.3726486 7.7719215,36.256626 7.7719215,23.3176283 L7.7719215,9.32705134 L28.0262536,0 L48.2348648,9.32705134 Z" id="路径" fill="#18104D" fill-rule="nonzero"></path>
 | 
			
		||||
                        <path d="M40.4629433,9.32705134 L40.4629433,23.3176283 C40.4629433,36.256626 31.8217046,48.3269278 20.2543321,51.2987824 C8.64123874,48.3726486 0,36.256626 0,23.3176283 L0,9.32705134 L20.2543321,0 L40.4629433,9.32705134 Z" id="形状" fill="#0B58FF" fill-rule="nonzero"></path>
 | 
			
		||||
                        <path d="M16.4804726,44.8381311 L23.9367499,44.8381311 C23.7967766,45.6009048 23.3406372,46.4633989 22.5683316,47.4256133 C21.4098731,48.8689349 20.2086112,49.4830135 20.2086112,49.4830135 C20.2086112,49.4830135 18.8612116,48.5451406 17.9626413,47.4256133 C17.3635945,46.6792617 16.8695382,45.8167676 16.4804726,44.8381311 Z" id="路径-2" fill="#69F8AF"></path>
 | 
			
		||||
                        <path d="M20.2086112,14.5392271 C26.2894829,14.5392271 31.1816128,19.431357 31.1816128,25.5122287 C31.1816128,28.84985 29.6728251,31.8217046 27.3410623,33.8334215 L28.7355479,35.2279071 C29.4551992,35.9475584 29.4551992,37.1143437 28.7355479,37.833995 C28.0158966,38.5536463 26.8491113,38.5536463 26.12946,37.833995 L24.0948826,35.7994176 C22.8604199,36.2109052 21.5802364,36.4852302 20.2086112,36.4852302 C14.1277395,36.4852302 9.23560966,31.5473795 9.23560966,25.5122287 C9.23560966,19.4770778 14.1277395,14.5392271 20.2086112,14.5392271 Z M20.2086112,18.1968943 C16.1851773,18.1968943 12.8932768,21.4887947 12.8932768,25.5122287 C12.8932768,29.5356626 16.1851773,32.827563 20.2086112,32.827563 C20.4829363,32.827563 20.8029821,32.827563 21.0773072,32.7818422 L20.9630051,32.6675401 C20.2433538,31.9478888 20.2433538,30.7811035 20.9630051,30.0614522 C21.6826564,29.3418009 22.8494417,29.3418009 23.569093,30.0614522 L24.7349744,31.2273336 C26.4266455,29.9014293 27.5239456,27.8439915 27.5239456,25.5122287 C27.5239456,21.4887947 24.2320451,18.1968943 20.2086112,18.1968943 Z" id="形状结合" fill="#FFFFFF"></path>
 | 
			
		||||
                    </g>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.9 KiB  | 
							
								
								
									
										15
									
								
								src/assets/icons/svg/home-store-menu.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,15 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="主页" transform="translate(-1607.000000, -386.000000)">
 | 
			
		||||
            <g id="仓库管理" transform="translate(1607.000000, 386.000000)">
 | 
			
		||||
                <rect id="矩形备份-11" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
 | 
			
		||||
                <g id="编组" transform="translate(4.828118, 3.724695)" fill-rule="nonzero">
 | 
			
		||||
                    <path d="M46.3437634,22.1260999 C46.3437634,20.5189711 45.6536539,18.9916368 44.4577566,17.9509367 L24.3260872,0.434356738 C23.6604711,-0.144785579 22.6832923,-0.144785579 22.0176762,0.434356738 L1.88600685,17.9509367 C0.689748793,18.9917824 0,20.5183296 0,22.1260999 L0,31.9992652 L23.1718817,30.7180576 L46.3437634,31.9992652 L46.3437634,22.1260999 Z" id="路径" fill="#18104D"></path>
 | 
			
		||||
                    <path d="M24.3260873,10.3527476 L46.3437634,28.9647616 L46.3437634,46.7765289 C46.3437634,47.7558213 45.5461328,48.5506093 44.560889,48.5506093 L29.4914859,48.5506093 L29.4914859,38.0698881 C29.4914859,34.5968826 26.6621028,31.7814554 23.1718819,31.7814554 C19.6816609,31.7814554 16.8522778,34.5968826 16.8522778,38.0698881 L16.8522778,48.5506093 L1.78287475,48.5506093 C1.3098369,48.5506093 0.856189467,48.363548 0.521804101,48.0306072 C0.187418735,47.6976665 0,47.2461416 0,46.7754371 L0,28.9636698 L22.0176764,10.3527476 C22.6832925,9.7901594 23.6604713,9.7901594 24.3260873,10.3527476 Z" id="路径" fill="#0B58FF"></path>
 | 
			
		||||
                </g>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.8 KiB  | 
							
								
								
									
										18
									
								
								src/assets/icons/svg/home-work-menu.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 7.7 KiB  | 
							
								
								
									
										12
									
								
								src/assets/icons/svg/menuIcon.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,12 @@
 | 
			
		||||
<?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">
 | 
			
		||||
    <title></title>
 | 
			
		||||
    <g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
			
		||||
        <g id="栏" transform="translate(-383.000000, -639.000000)" fill="#FFFFFF" fill-rule="nonzero">
 | 
			
		||||
            <g id="制度流程" transform="translate(383.000000, 639.000000)">
 | 
			
		||||
                <rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
 | 
			
		||||
                <path d="M4.37117174,17.071929 L2.37885068,17.071929 C2.0028361,17.071929 1.69692899,17.3771995 1.69692899,17.7524526 L1.69692899,19.7475474 C1.69692899,20.1227781 2.00283612,20.428071 2.37885068,20.428071 L4.37117174,20.428071 C4.74718632,20.428071 5.05307101,20.1228005 5.05307101,19.7475474 L5.05307101,17.7524526 C5.05307101,17.3771996 4.74718632,17.071929 4.37117174,17.071929 Z M7.36536289,6.40073051 L21.8846371,6.40073051 C22.2245029,6.40073051 22.5,6.06492662 22.5,5.65073051 C22.5,5.2365344 22.2245029,4.90073051 21.8846371,4.90073051 L7.36536289,4.90073051 C7.02549709,4.90073051 6.75,5.23653442 6.75,5.65073054 C6.75,6.06492665 7.02549711,6.40073051 7.36536289,6.40073051 Z M3.14077284,5.95492436 L2.03265569,4.84248673 C1.8767502,4.68597337 1.62348469,4.6854806 1.46697133,4.84138609 C1.4665023,4.8418533 1.46603442,4.84232168 1.46556772,4.84279121 L1.18448184,5.12557972 C1.0295067,5.28149361 1.02939503,5.5332514 1.1842318,5.6893027 L2.85590574,7.37408916 C3.01150401,7.53090793 3.26476807,7.53189735 3.42158685,7.37629907 C3.42263304,7.37526103 3.42367349,7.3742172 3.42470814,7.37316765 L5.7220224,5.04277966 C5.87599957,4.88658572 5.87547971,4.63552909 5.72085699,4.47997417 L5.4403523,4.19777835 C5.28461275,4.04109986 5.0313479,4.04033871 4.87466942,4.19607825 C4.87370895,4.19703297 4.87275333,4.19799256 4.8718026,4.19895698 L3.14077284,5.95492436 L3.14077284,5.95492436 Z M21.8846371,11.25 L7.36536289,11.25 C7.02549709,11.25 6.75,11.5857972 6.75,11.999985 C6.75,12.4141729 7.02552167,12.75 7.36536289,12.75 L21.8846371,12.75 C22.2245029,12.75 22.5,12.4142028 22.5,11.999985 C22.5,11.5857672 22.2245029,11.25 21.8846371,11.25 Z M21.8846371,17.972656 L7.36536289,17.972656 C7.02549709,17.972656 6.75,18.30843 6.75,18.722656 C6.75,19.1368821 7.02552167,19.472656 7.36536289,19.472656 L21.8846371,19.472656 C22.2245029,19.472656 22.5,19.1368821 22.5,18.722656 C22.5,18.30843 22.2245029,17.972656 21.8846371,17.972656 Z M4.37117174,10.321929 L2.37885068,10.321929 C2.0028361,10.321929 1.69692899,10.6271975 1.69692899,11.0024481 L1.69692899,12.9975519 C1.69692899,13.3727801 2.00283612,13.678071 2.37885068,13.678071 L4.37117174,13.678071 C4.74718632,13.678071 5.05307101,13.3728025 5.05307101,12.9975519 L5.05307101,11.0024481 C5.05307101,10.6271975 4.74718632,10.321929 4.37117174,10.321929 Z" id="形状"></path>
 | 
			
		||||
            </g>
 | 
			
		||||
        </g>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.9 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/assets/img/alarm-bg.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 75 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/assets/img/home-bg.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.2 MiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/assets/img/home-progress-bg.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 936 B  | 
@@ -80,7 +80,7 @@
 | 
			
		||||
    .submenu-title-noDropdown,
 | 
			
		||||
    .el-submenu__title {
 | 
			
		||||
      &:hover {
 | 
			
		||||
        background-color: rgba(0, 0, 0, 0.06) !important;
 | 
			
		||||
        background-color: #0b58ff !important;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -37,18 +37,18 @@ $base-sub-menu-hover:#001528;
 | 
			
		||||
*/
 | 
			
		||||
$base-menu-color: #fff;
 | 
			
		||||
$base-menu-color-active:#fff;
 | 
			
		||||
$base-menu-background:#001529;
 | 
			
		||||
$base-menu-background:#1E1651;
 | 
			
		||||
$base-logo-title-color: #ffffff;
 | 
			
		||||
 | 
			
		||||
$base-menu-light-color:rgba(0,0,0,.70);
 | 
			
		||||
$base-menu-light-background:#ffffff;
 | 
			
		||||
$base-logo-light-title-color: #001529;
 | 
			
		||||
 | 
			
		||||
$base-sub-menu-background:#0B253F;
 | 
			
		||||
$base-sub-menu-background:#15063C;
 | 
			
		||||
$base-sub-menu-hover:#0b50ff;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
$base-sidebar-width: 248px;
 | 
			
		||||
$base-sidebar-width: 282px;
 | 
			
		||||
 | 
			
		||||
// the :export directive is the magic sauce for webpack
 | 
			
		||||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										115
									
								
								src/components/ButtonNav/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,115 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <!-- 按钮切换 -->
 | 
			
		||||
  <div v-if="buttonMode" class="button-nav">
 | 
			
		||||
    <button
 | 
			
		||||
      v-for="m in menus"
 | 
			
		||||
      :key="m"
 | 
			
		||||
      @click="currentMenu = m"
 | 
			
		||||
      :class="[m === currentMenu ? 'active' : '']"
 | 
			
		||||
    >{{m}}</button>
 | 
			
		||||
  </div>
 | 
			
		||||
  <!-- 标签切换 -->
 | 
			
		||||
  <div v-else class="custom-tabs" style="height: 100%; width: 100%">
 | 
			
		||||
    <el-tabs class="tag-nav" v-model="currentMenu" style="height: 100%">
 | 
			
		||||
      <el-tab-pane
 | 
			
		||||
        v-for="(m, idx) in menus"
 | 
			
		||||
        :key="m"
 | 
			
		||||
        :label="idx == 0 ? `\u2002${m}\u2002` : `\u3000${m}\u3000`"
 | 
			
		||||
        :name="m"
 | 
			
		||||
      >
 | 
			
		||||
        <slot :name="`tab${idx + 1}`"></slot>
 | 
			
		||||
      </el-tab-pane>
 | 
			
		||||
    </el-tabs>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
  name: "ButtonNav",
 | 
			
		||||
  props: {
 | 
			
		||||
    menus: {
 | 
			
		||||
      type: Array,
 | 
			
		||||
      required: true,
 | 
			
		||||
      default: () => [],
 | 
			
		||||
      validator: (val) => {
 | 
			
		||||
        return val.length > 0;
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    buttonMode: {
 | 
			
		||||
      type: Boolean,
 | 
			
		||||
      default: true,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      currentMenu: "",
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.currentMenu = this.menus[0];
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    currentMenu(val) {
 | 
			
		||||
      this.$emit("change", val);
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.button-nav {
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  gap: 12px;
 | 
			
		||||
 | 
			
		||||
  * {
 | 
			
		||||
    user-select: none;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  button {
 | 
			
		||||
    height: 48px;
 | 
			
		||||
    line-height: 48px;
 | 
			
		||||
    cursor: pointer;
 | 
			
		||||
    appearance: none;
 | 
			
		||||
    outline: none;
 | 
			
		||||
    border: none;
 | 
			
		||||
    background: #fff;
 | 
			
		||||
    border-radius: 8px;
 | 
			
		||||
    font-size: 16px;
 | 
			
		||||
    font-weight: 500;
 | 
			
		||||
    color: rgba(22, 22, 22, 0.65);
 | 
			
		||||
    letter-spacing: 2px;
 | 
			
		||||
    flex: 1;
 | 
			
		||||
    box-sizing: padding-box;
 | 
			
		||||
    position: relative;
 | 
			
		||||
    &.active {
 | 
			
		||||
      color: rgba(22, 22, 22, 1);
 | 
			
		||||
      border-bottom: 4px solid #0b58ff;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
.custom-tabs >>> .el-tabs__header {
 | 
			
		||||
  margin-bottom: 8px;
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  /* transform: translateY(-12px); */
 | 
			
		||||
}
 | 
			
		||||
.custom-tabs >>> .el-tabs__item {
 | 
			
		||||
  padding-left: 0px !important;
 | 
			
		||||
  padding-right: 0px !important;
 | 
			
		||||
  line-height: 36px !important;
 | 
			
		||||
  height: 36px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.custom-tabs >>> .el-tabs__content {
 | 
			
		||||
  height: calc(100% - 42px);
 | 
			
		||||
}
 | 
			
		||||
.custom-tabs >>> .el-tab-pane {
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  padding: 20px;
 | 
			
		||||
  border: 10px solid #f002;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -6,105 +6,44 @@
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<el-form
 | 
			
		||||
		ref="form"
 | 
			
		||||
		:model="form"
 | 
			
		||||
		:label-width="`${labelWidth}px`"
 | 
			
		||||
		:size="size"
 | 
			
		||||
		:label-position="labelPosition"
 | 
			
		||||
  <el-form ref="form" :model="form" :label-width="`${labelWidth}px`" :size="size" :label-position="labelPosition"
 | 
			
		||||
    v-loading="formLoading">
 | 
			
		||||
    <el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
 | 
			
		||||
      <el-col v-for="col in row" :key="col.label" :span="24 / row.length">
 | 
			
		||||
        <el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-if="col.input"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						:placeholder="`请输入${col.label}`"
 | 
			
		||||
						:disabled="disabled"
 | 
			
		||||
						v-bind="col.bind" />
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-if="col.textarea"
 | 
			
		||||
						type="textarea"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						:disabled="disabled"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						:placeholder="`请输入${col.label}`"
 | 
			
		||||
						v-bind="col.bind" />
 | 
			
		||||
					<el-select
 | 
			
		||||
						v-if="col.select"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						:placeholder="`请选择${col.label}`"
 | 
			
		||||
						:disabled="disabled"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						v-bind="col.bind">
 | 
			
		||||
						<el-option
 | 
			
		||||
							v-for="opt in optionListOf[col.prop]"
 | 
			
		||||
							:key="opt.value"
 | 
			
		||||
							:label="opt.label"
 | 
			
		||||
							:value="opt.value" />
 | 
			
		||||
          <el-input v-if="col.input" v-model="form[col.prop]" @change="$emit('update', form)"
 | 
			
		||||
            :placeholder="`请输入${col.label}`" :disabled="disabled" v-bind="col.bind" />
 | 
			
		||||
          <el-input v-if="col.textarea" type="textarea" v-model="form[col.prop]" :disabled="disabled"
 | 
			
		||||
            @change="$emit('update', form)" :placeholder="`请输入${col.label}`" v-bind="col.bind" />
 | 
			
		||||
          <el-select v-if="col.select" v-model="form[col.prop]" :placeholder="`请选择${col.label}`" :disabled="disabled"
 | 
			
		||||
            @change="$emit('update', form)" v-bind="col.bind">
 | 
			
		||||
            <el-option v-for="opt in optionListOf[col.prop]" :key="opt.value" :label="opt.label" :value="opt.value" />
 | 
			
		||||
          </el-select>
 | 
			
		||||
					<el-date-picker
 | 
			
		||||
						v-if="col.datetime"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						type="datetime"
 | 
			
		||||
						:disabled="disabled"
 | 
			
		||||
						:placeholder="`请选择${col.label}`"
 | 
			
		||||
						value-format="timestamp"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						v-bind="col.bind"></el-date-picker>
 | 
			
		||||
					<el-switch
 | 
			
		||||
						v-if="col.switch"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						:disabled="disabled"
 | 
			
		||||
						active-color="#0b58ff"
 | 
			
		||||
						inactive-color="#e1e1e1"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						v-bind="col.bind"></el-switch>
 | 
			
		||||
					<component
 | 
			
		||||
						v-if="col.subcomponent"
 | 
			
		||||
						:key="col.key"
 | 
			
		||||
						:disabled="disabled"
 | 
			
		||||
						:read-only="disabled"
 | 
			
		||||
						:is="col.subcomponent"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						:inlineStyle="col.style"
 | 
			
		||||
						@on-change="$emit('update', form)"
 | 
			
		||||
          <el-date-picker v-if="col.datetime" v-model="form[col.prop]" type="datetime"
 | 
			
		||||
            :disabled="col.disabled ? col.disabled : disabled" :placeholder="`请选择${col.label}`" value-format="timestamp"
 | 
			
		||||
            @change="$emit('update', form)" v-bind="col.bind">
 | 
			
		||||
          </el-date-picker>
 | 
			
		||||
          <el-switch v-if="col.switch" v-model="form[col.prop]" :disabled="disabled" active-color="#0b58ff"
 | 
			
		||||
            inactive-color="#e1e1e1" @change="$emit('update', form)" v-bind="col.bind"></el-switch>
 | 
			
		||||
          <component v-if="col.subcomponent" :key="col.key" :disabled="disabled" :read-only="disabled"
 | 
			
		||||
            :is="col.subcomponent" v-model="form[col.prop]" :inlineStyle="col.style" @on-change="$emit('update', form)"
 | 
			
		||||
            v-bind="col.bind"></component>
 | 
			
		||||
 | 
			
		||||
					<div
 | 
			
		||||
						class="upload-area"
 | 
			
		||||
						:class="uploadOpen ? '' : 'height-48'"
 | 
			
		||||
						ref="uploadArea"
 | 
			
		||||
						:key="col.prop"
 | 
			
		||||
          <div class="upload-area" :class="uploadOpen ? '' : 'height-48'" ref="uploadArea" :key="col.prop"
 | 
			
		||||
            v-if="col.upload">
 | 
			
		||||
            <span class="close-icon" :class="uploadOpen ? 'open' : ''">
 | 
			
		||||
							<el-button
 | 
			
		||||
								type="text"
 | 
			
		||||
								icon="el-icon-arrow-right"
 | 
			
		||||
								@click="handleFilesOpen" />
 | 
			
		||||
              <el-button type="text" icon="el-icon-arrow-right" @click="handleFilesOpen" />
 | 
			
		||||
            </span>
 | 
			
		||||
            <!-- :file-list="uploadedFileList" -->
 | 
			
		||||
						<el-upload
 | 
			
		||||
							class="upload-in-dialog"
 | 
			
		||||
							v-if="col.upload"
 | 
			
		||||
							:key="col.prop + '__el-upload'"
 | 
			
		||||
							:action="uploadUrl"
 | 
			
		||||
							:headers="uploadHeaders"
 | 
			
		||||
							:show-file-list="false"
 | 
			
		||||
							icon="el-icon-upload2"
 | 
			
		||||
							:disabled="disabled"
 | 
			
		||||
							:before-upload="beforeUpload"
 | 
			
		||||
							:on-success="
 | 
			
		||||
            <el-upload class="upload-in-dialog" v-if="col.upload" :key="col.prop + '__el-upload'" :action="uploadUrl"
 | 
			
		||||
              :headers="uploadHeaders" :show-file-list="false" icon="el-icon-upload2" :disabled="disabled"
 | 
			
		||||
              :before-upload="beforeUpload" :on-success="
 | 
			
		||||
              	(response, file, fileList) => {
 | 
			
		||||
              		handleUploadSuccess(response, file, col.prop);
 | 
			
		||||
              	}
 | 
			
		||||
							"
 | 
			
		||||
							v-bind="col.bind">
 | 
			
		||||
              " v-bind="col.bind">
 | 
			
		||||
              <el-button size="mini" :disabled="col.bind?.disabled || false">
 | 
			
		||||
								<svg-icon
 | 
			
		||||
									icon-class="icon-upload"
 | 
			
		||||
									style="color: inherit"></svg-icon>
 | 
			
		||||
                <svg-icon icon-class="icon-upload" style="color: inherit"></svg-icon>
 | 
			
		||||
                上传文件
 | 
			
		||||
              </el-button>
 | 
			
		||||
              <div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
 | 
			
		||||
@@ -112,11 +51,7 @@
 | 
			
		||||
              </div>
 | 
			
		||||
            </el-upload>
 | 
			
		||||
 | 
			
		||||
						<uploadedFile
 | 
			
		||||
							class="file"
 | 
			
		||||
							v-for="file in form[col.prop]"
 | 
			
		||||
							:file="file"
 | 
			
		||||
							:key="file.fileUrl"
 | 
			
		||||
            <uploadedFile class="file" v-for="file in form[col.prop]" :file="file" :key="file.fileUrl"
 | 
			
		||||
              @delete="!disabled && handleDeleteFile(file, col.prop)" />
 | 
			
		||||
          </div>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
 
 | 
			
		||||
@@ -2,26 +2,39 @@
 | 
			
		||||
	<el-menu
 | 
			
		||||
		:default-active="activeMenu"
 | 
			
		||||
		mode="horizontal"
 | 
			
		||||
    @select="handleSelect"
 | 
			
		||||
  >
 | 
			
		||||
		@select="handleSelect">
 | 
			
		||||
		<template v-for="(item, index) in topMenus">
 | 
			
		||||
      <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber">
 | 
			
		||||
        <svg-icon :icon-class="item.meta.icon"/>
 | 
			
		||||
			<el-menu-item
 | 
			
		||||
				:style="{ '--theme': theme }"
 | 
			
		||||
				:index="item.path"
 | 
			
		||||
				:key="index"
 | 
			
		||||
				v-if="index < visibleNumber">
 | 
			
		||||
				<!-- <svg-icon :icon-class="item.meta.icon" /> -->
 | 
			
		||||
				<span class="menu-box" :class="{ active: item.path === currentIndex }">
 | 
			
		||||
					<span class="menu-dot"></span>
 | 
			
		||||
					{{ item.meta.title }}
 | 
			
		||||
				</span>
 | 
			
		||||
			</el-menu-item>
 | 
			
		||||
		</template>
 | 
			
		||||
 | 
			
		||||
		<!-- 顶部菜单超出数量折叠 -->
 | 
			
		||||
    <el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
 | 
			
		||||
		<el-submenu
 | 
			
		||||
			:style="{ '--theme': theme }"
 | 
			
		||||
			index="more"
 | 
			
		||||
			v-if="topMenus.length > visibleNumber">
 | 
			
		||||
			<template slot="title">更多菜单</template>
 | 
			
		||||
			<template v-for="(item, index) in topMenus">
 | 
			
		||||
				<el-menu-item
 | 
			
		||||
					:index="item.path"
 | 
			
		||||
					:key="index"
 | 
			
		||||
          v-if="index >= visibleNumber"
 | 
			
		||||
        >
 | 
			
		||||
          <svg-icon :icon-class="item.meta.icon"/>
 | 
			
		||||
					v-if="index >= visibleNumber">
 | 
			
		||||
					<!-- <svg-icon :icon-class="item.meta.icon" /> -->
 | 
			
		||||
					<span
 | 
			
		||||
						class="menu-box"
 | 
			
		||||
						:class="{ active: item.path === currentIndex }">
 | 
			
		||||
						<span class="menu-dot"></span>
 | 
			
		||||
						{{ item.meta.title }}
 | 
			
		||||
					</span>
 | 
			
		||||
				</el-menu-item>
 | 
			
		||||
			</template>
 | 
			
		||||
		</el-submenu>
 | 
			
		||||
@@ -29,7 +42,8 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { constantRoutes } from "@/router";
 | 
			
		||||
import { mapGetters } from 'vuex';
 | 
			
		||||
import { constantRoutes } from '@/router';
 | 
			
		||||
 | 
			
		||||
// 隐藏侧边栏路由
 | 
			
		||||
const hideList = ['/index', '/user/profile'];
 | 
			
		||||
@@ -39,11 +53,13 @@ export default {
 | 
			
		||||
		return {
 | 
			
		||||
			// 顶部栏初始数
 | 
			
		||||
			visibleNumber: 5,
 | 
			
		||||
      // 当前激活菜单的 index
 | 
			
		||||
      currentIndex: undefined
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		...mapGetters(['choicepart']),
 | 
			
		||||
		currentIndex() {
 | 
			
		||||
			return this.choicepart;
 | 
			
		||||
		},
 | 
			
		||||
		theme() {
 | 
			
		||||
			return this.$store.state.settings.theme;
 | 
			
		||||
		},
 | 
			
		||||
@@ -53,13 +69,14 @@ export default {
 | 
			
		||||
			this.routers.map((menu) => {
 | 
			
		||||
				if (menu.hidden !== true) {
 | 
			
		||||
					// 兼容顶部栏一级菜单内部跳转
 | 
			
		||||
          if (menu.path === "/") {
 | 
			
		||||
					if (menu.path === '/') {
 | 
			
		||||
						topMenus.push(menu.children[0]);
 | 
			
		||||
					} else {
 | 
			
		||||
						topMenus.push(menu);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			console.log('topMenus:', topMenus);
 | 
			
		||||
			return topMenus;
 | 
			
		||||
		},
 | 
			
		||||
		// 所有的路由信息
 | 
			
		||||
@@ -72,11 +89,12 @@ export default {
 | 
			
		||||
			this.routers.map((router) => {
 | 
			
		||||
				for (let item in router.children) {
 | 
			
		||||
					if (router.children[item].parentPath === undefined) {
 | 
			
		||||
            if(router.path === "/") {
 | 
			
		||||
              router.children[item].path = "/" + router.children[item].path;
 | 
			
		||||
						if (router.path === '/') {
 | 
			
		||||
							router.children[item].path = '/' + router.children[item].path;
 | 
			
		||||
						} else {
 | 
			
		||||
							if (!this.ishttp(router.children[item].path)) {
 | 
			
		||||
                router.children[item].path = router.path + "/" + router.children[item].path;
 | 
			
		||||
								router.children[item].path =
 | 
			
		||||
									router.path + '/' + router.children[item].path;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
						router.children[item].parentPath = router.path;
 | 
			
		||||
@@ -90,11 +108,15 @@ export default {
 | 
			
		||||
		activeMenu() {
 | 
			
		||||
			const path = this.$route.path;
 | 
			
		||||
			let activePath = path;
 | 
			
		||||
      if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) {
 | 
			
		||||
			if (
 | 
			
		||||
				path !== undefined &&
 | 
			
		||||
				path.lastIndexOf('/') > 0 &&
 | 
			
		||||
				hideList.indexOf(path) === -1
 | 
			
		||||
			) {
 | 
			
		||||
				const tmpPath = path.substring(1, path.length);
 | 
			
		||||
        activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"));
 | 
			
		||||
				activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/'));
 | 
			
		||||
				if (!this.$route.meta.link) {
 | 
			
		||||
          this.$store.dispatch('app/toggleSideBarHide', false)
 | 
			
		||||
					this.$store.dispatch('app/toggleSideBarHide', false);
 | 
			
		||||
				}
 | 
			
		||||
			} else if (!this.$route.children) {
 | 
			
		||||
				activePath = path;
 | 
			
		||||
@@ -105,10 +127,10 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	beforeMount() {
 | 
			
		||||
    window.addEventListener('resize', this.setVisibleNumber)
 | 
			
		||||
		window.addEventListener('resize', this.setVisibleNumber);
 | 
			
		||||
	},
 | 
			
		||||
	beforeDestroy() {
 | 
			
		||||
    window.removeEventListener('resize', this.setVisibleNumber)
 | 
			
		||||
		window.removeEventListener('resize', this.setVisibleNumber);
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.setVisibleNumber();
 | 
			
		||||
@@ -116,62 +138,93 @@ export default {
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 根据宽度计算设置显示栏数
 | 
			
		||||
		setVisibleNumber() {
 | 
			
		||||
      const width = document.body.getBoundingClientRect().width / 3;
 | 
			
		||||
      this.visibleNumber = parseInt(width / 85);
 | 
			
		||||
			const width = window.innerWidth - 700;
 | 
			
		||||
			console.log(width);
 | 
			
		||||
			console.log('window.innerWidth:', window.innerWidth);
 | 
			
		||||
			this.visibleNumber = parseInt(width / 120);
 | 
			
		||||
			console.log('this.visibleNumber:', this.visibleNumber);
 | 
			
		||||
		},
 | 
			
		||||
		// 菜单选择事件
 | 
			
		||||
		handleSelect(key, keyPath) {
 | 
			
		||||
      this.currentIndex = key;
 | 
			
		||||
      const route = this.routers.find(item => item.path === key);
 | 
			
		||||
      if (this.ishttp(key)) {
 | 
			
		||||
        // http(s):// 路径新窗口打开
 | 
			
		||||
        window.open(key, "_blank");
 | 
			
		||||
      } else if (!route || !route.children) {
 | 
			
		||||
        // 没有子路由路径内部打开
 | 
			
		||||
        this.$router.push({ path: key });
 | 
			
		||||
        this.$store.dispatch('app/toggleSideBarHide', true);
 | 
			
		||||
			// this.currentIndex = key;
 | 
			
		||||
			const route = this.routers.find((item) => item.path === key);
 | 
			
		||||
			console.log('route:', route);
 | 
			
		||||
			this.$store.dispatch('app/setChoicepart', key);
 | 
			
		||||
			this.toRouter(route);
 | 
			
		||||
			// if (this.ishttp(key)) {
 | 
			
		||||
			// 	// http(s):// 路径新窗口打开
 | 
			
		||||
			// 	window.open(key, '_blank');
 | 
			
		||||
			// 	console.log('aaaaaaaaaaaaaa');
 | 
			
		||||
			// } else if (!route || !route.children) {
 | 
			
		||||
			// 	// 没有子路由路径内部打开
 | 
			
		||||
			// 	this.$router.push({ path: key });
 | 
			
		||||
			// 	this.$store.dispatch('app/toggleSideBarHide', true);
 | 
			
		||||
			// 	console.log('bbbbbbbbbbbbbbb');
 | 
			
		||||
			// } else {
 | 
			
		||||
			// 	// 显示左侧联动菜单
 | 
			
		||||
			// 	this.activeRoutes(key);
 | 
			
		||||
			// 	if (!this.$route.meta.link) {
 | 
			
		||||
			// 		this.$store.dispatch('app/toggleSideBarHide', false);
 | 
			
		||||
			// 	}
 | 
			
		||||
			// 	console.log('cccccccccccccccc');
 | 
			
		||||
			// }
 | 
			
		||||
		},
 | 
			
		||||
		toRouter(item) {
 | 
			
		||||
			console.log(item);
 | 
			
		||||
			if (item.children) {
 | 
			
		||||
				this.toRouter(item.children[0]);
 | 
			
		||||
			} else {
 | 
			
		||||
        // 显示左侧联动菜单
 | 
			
		||||
        this.activeRoutes(key);
 | 
			
		||||
        if (!this.$route.meta.link) {
 | 
			
		||||
          this.$store.dispatch('app/toggleSideBarHide', false);
 | 
			
		||||
        }
 | 
			
		||||
				this.$router.push({ name: item.name });
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		// 当前激活的路由
 | 
			
		||||
		activeRoutes(key) {
 | 
			
		||||
      const routes = []
 | 
			
		||||
			this.$store.dispatch('app/setChoicepart', key);
 | 
			
		||||
			const routes = [];
 | 
			
		||||
			if (this.childrenMenus && this.childrenMenus.length > 0) {
 | 
			
		||||
				this.childrenMenus.map((item) => {
 | 
			
		||||
          if (key === item.parentPath || (key === "index" && "" === item.path)) {
 | 
			
		||||
					if (
 | 
			
		||||
						key === item.parentPath ||
 | 
			
		||||
						(key === 'index' && '' === item.path)
 | 
			
		||||
					) {
 | 
			
		||||
						routes.push(item);
 | 
			
		||||
					}
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			if (routes.length > 0) {
 | 
			
		||||
        this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
 | 
			
		||||
				this.$store.commit('SET_SIDEBAR_ROUTERS', routes);
 | 
			
		||||
			} else {
 | 
			
		||||
				this.$store.dispatch('app/toggleSideBarHide', true);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		ishttp(url) {
 | 
			
		||||
      return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
 | 
			
		||||
    }
 | 
			
		||||
			return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
.topmenu-container.el-menu.el-menu--horizontal {
 | 
			
		||||
	border-bottom: none;
 | 
			
		||||
}
 | 
			
		||||
.topmenu-container.el-menu.el-menu--horizontal > .el-menu-item.is-active {
 | 
			
		||||
	border-bottom: none !important;
 | 
			
		||||
}
 | 
			
		||||
.topmenu-container.el-menu.el-menu--horizontal > .el-submenu.is-active {
 | 
			
		||||
	--theme: none !important;
 | 
			
		||||
}
 | 
			
		||||
.topmenu-container.el-menu--horizontal > .el-menu-item {
 | 
			
		||||
	float: left;
 | 
			
		||||
  height: 50px !important;
 | 
			
		||||
  line-height: 50px !important;
 | 
			
		||||
  color: #999093 !important;
 | 
			
		||||
	height: 84px !important;
 | 
			
		||||
	line-height: 84px !important;
 | 
			
		||||
	color: transparent !important;
 | 
			
		||||
	padding: 0 5px !important;
 | 
			
		||||
  margin: 0 10px !important;
 | 
			
		||||
	font-size: 18px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.topmenu-container.el-menu--horizontal > .el-menu-item.is-active, .el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
 | 
			
		||||
.topmenu-container.el-menu--horizontal > .el-menu-item.is-active,
 | 
			
		||||
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
 | 
			
		||||
	border-bottom: 2px solid #{'var(--theme)'} !important;
 | 
			
		||||
	color: #303133;
 | 
			
		||||
}
 | 
			
		||||
@@ -179,10 +232,34 @@ export default {
 | 
			
		||||
/* submenu item */
 | 
			
		||||
.topmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {
 | 
			
		||||
	float: left;
 | 
			
		||||
  height: 50px !important;
 | 
			
		||||
  line-height: 50px !important;
 | 
			
		||||
  color: #999093 !important;
 | 
			
		||||
	height: 84px !important;
 | 
			
		||||
	line-height: 89px !important;
 | 
			
		||||
	color: #000 !important;
 | 
			
		||||
	padding: 0 5px !important;
 | 
			
		||||
	margin: 0 10px !important;
 | 
			
		||||
	font-size: 18px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.menu-box {
 | 
			
		||||
	padding: 7px 15px 9px 15px;
 | 
			
		||||
	border-radius: 32px;
 | 
			
		||||
	color: #000;
 | 
			
		||||
}
 | 
			
		||||
.active {
 | 
			
		||||
	background: #dce7ff;
 | 
			
		||||
	.menu-dot {
 | 
			
		||||
		opacity: 1;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
.menu-dot {
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	width: 5px;
 | 
			
		||||
	height: 5px;
 | 
			
		||||
	border-radius: 50%;
 | 
			
		||||
	background: #0b58ff;
 | 
			
		||||
	margin-right: 3px;
 | 
			
		||||
	margin-bottom: 2px;
 | 
			
		||||
	opacity: 0;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -10,26 +10,26 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import iframeToggle from "./IframeToggle/index"
 | 
			
		||||
import iframeToggle from './IframeToggle/index';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'AppMain',
 | 
			
		||||
	components: { iframeToggle },
 | 
			
		||||
	computed: {
 | 
			
		||||
		cachedViews() {
 | 
			
		||||
      return this.$store.state.tagsView.cachedViews
 | 
			
		||||
			return this.$store.state.tagsView.cachedViews;
 | 
			
		||||
		},
 | 
			
		||||
		key() {
 | 
			
		||||
      return this.$route.path
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
			return this.$route.path;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.app-main {
 | 
			
		||||
	/* 48= navbar  48  */
 | 
			
		||||
  min-height: calc(100vh - 56px);
 | 
			
		||||
	// min-height: calc(100vh - 84px);
 | 
			
		||||
	min-width: calc(100vh - 280px);
 | 
			
		||||
	position: relative;
 | 
			
		||||
	overflow: visible;
 | 
			
		||||
@@ -39,13 +39,13 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.fixed-header + .app-main {
 | 
			
		||||
  padding-top: 56px;
 | 
			
		||||
	padding-top: 84px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.hasTagsView {
 | 
			
		||||
	.app-main {
 | 
			
		||||
		/* 84 = navbar + tags-view = 50 + 34 */
 | 
			
		||||
    min-height: calc(100vh - 120px - 8px);
 | 
			
		||||
		min-height: calc(100vh - 164px);
 | 
			
		||||
		display: flex;
 | 
			
		||||
		flex-direction: column;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,62 +1,34 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="navbar">
 | 
			
		||||
    <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
 | 
			
		||||
		<hamburger
 | 
			
		||||
			id="hamburger-container"
 | 
			
		||||
			:is-active="sidebar.opened"
 | 
			
		||||
			class="hamburger-container"
 | 
			
		||||
			@toggleClick="toggleSideBar" />
 | 
			
		||||
 | 
			
		||||
    <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
 | 
			
		||||
		<breadcrumb
 | 
			
		||||
			id="breadcrumb-container"
 | 
			
		||||
			class="breadcrumb-container"
 | 
			
		||||
			v-if="!topNav" />
 | 
			
		||||
		<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
 | 
			
		||||
 | 
			
		||||
    <div style="padding-top: 5px; padding-right: 38px;">
 | 
			
		||||
      <navbar-right :blackTitle='true'/>
 | 
			
		||||
		<div style="padding-top: 5px; padding-right: 24px">
 | 
			
		||||
			<navbar-right :blackTitle="true" />
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
    <!-- <div class="right-menu"> -->
 | 
			
		||||
      <!-- <template v-if="device!=='mobile'"> -->
 | 
			
		||||
        <!-- <search id="header-search" class="right-menu-item" /> -->
 | 
			
		||||
 | 
			
		||||
        <!-- 站内信 -->
 | 
			
		||||
        <!-- <notify-message class="right-menu-item hover-effect" /> -->
 | 
			
		||||
 | 
			
		||||
        <!-- <screenfull id="screenfull" class="right-menu-item hover-effect" /> -->
 | 
			
		||||
 | 
			
		||||
        <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
 | 
			
		||||
          <size-select id="size-select" class="right-menu-item hover-effect" />
 | 
			
		||||
        </el-tooltip> -->
 | 
			
		||||
 | 
			
		||||
      <!-- </template> -->
 | 
			
		||||
 | 
			
		||||
      <!-- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
 | 
			
		||||
        <div class="avatar-wrapper"> -->
 | 
			
		||||
          <!-- <img :src="avatar" class="user-avatar"> -->
 | 
			
		||||
          <!-- <span v-if="nickname" class="user-nickname">{{ nickname }}</span>
 | 
			
		||||
          <i class="el-icon-caret-bottom" />
 | 
			
		||||
        </div>
 | 
			
		||||
        <el-dropdown-menu slot="dropdown">
 | 
			
		||||
          <router-link to="/user/profile">
 | 
			
		||||
            <el-dropdown-item>个人中心</el-dropdown-item>
 | 
			
		||||
          </router-link> -->
 | 
			
		||||
          <!-- <el-dropdown-item @click.native="setting = true">
 | 
			
		||||
            <span>布局设置</span>
 | 
			
		||||
          </el-dropdown-item> -->
 | 
			
		||||
          <!-- <el-dropdown-item divided @click.native="logout">
 | 
			
		||||
            <span>退出登录</span>
 | 
			
		||||
          </el-dropdown-item>
 | 
			
		||||
        </el-dropdown-menu>
 | 
			
		||||
      </el-dropdown> -->
 | 
			
		||||
    <!-- </div> -->
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapGetters } from 'vuex'
 | 
			
		||||
import Breadcrumb from '@/components/Breadcrumb'
 | 
			
		||||
import TopNav from '@/components/TopNav'
 | 
			
		||||
import Hamburger from '@/components/Hamburger'
 | 
			
		||||
import Screenfull from '@/components/Screenfull'
 | 
			
		||||
import SizeSelect from '@/components/SizeSelect'
 | 
			
		||||
import Search from '@/components/HeaderSearch'
 | 
			
		||||
import NotifyMessage from '@/layout/components/Message'
 | 
			
		||||
import { mapGetters } from 'vuex';
 | 
			
		||||
import Breadcrumb from '@/components/Breadcrumb';
 | 
			
		||||
import TopNav from '@/components/TopNav';
 | 
			
		||||
import Hamburger from '@/components/Hamburger';
 | 
			
		||||
import Screenfull from '@/components/Screenfull';
 | 
			
		||||
import SizeSelect from '@/components/SizeSelect';
 | 
			
		||||
import Search from '@/components/HeaderSearch';
 | 
			
		||||
import NotifyMessage from '@/layout/components/Message';
 | 
			
		||||
// import {getPath} from "@/utils/ruoyi";
 | 
			
		||||
import NavbarRight from './NavbarRight.vue'
 | 
			
		||||
import NavbarRight from './NavbarRight.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: {
 | 
			
		||||
@@ -67,65 +39,63 @@ export default {
 | 
			
		||||
		SizeSelect,
 | 
			
		||||
		Search,
 | 
			
		||||
		NotifyMessage,
 | 
			
		||||
    NavbarRight
 | 
			
		||||
		NavbarRight,
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
    ...mapGetters([
 | 
			
		||||
      'sidebar',
 | 
			
		||||
      'avatar',
 | 
			
		||||
      'nickname',
 | 
			
		||||
      'device'
 | 
			
		||||
    ]),
 | 
			
		||||
		...mapGetters(['sidebar', 'avatar', 'nickname', 'device']),
 | 
			
		||||
		setting: {
 | 
			
		||||
			get() {
 | 
			
		||||
        return this.$store.state.settings.showSettings
 | 
			
		||||
				return this.$store.state.settings.showSettings;
 | 
			
		||||
			},
 | 
			
		||||
			set(val) {
 | 
			
		||||
				this.$store.dispatch('settings/changeSetting', {
 | 
			
		||||
					key: 'showSettings',
 | 
			
		||||
          value: val
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
					value: val,
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		topNav: {
 | 
			
		||||
			get() {
 | 
			
		||||
        return this.$store.state.settings.topNav
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
				return this.$store.state.settings.topNav;
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		toggleSideBar() {
 | 
			
		||||
      this.$store.dispatch('app/toggleSideBar')
 | 
			
		||||
			this.$store.dispatch('app/toggleSideBar');
 | 
			
		||||
		},
 | 
			
		||||
		async logout() {
 | 
			
		||||
      this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('确定注销并退出系统吗?', '提示')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.$store.dispatch('LogOut').then(() => {
 | 
			
		||||
						location.href = getPath('/');
 | 
			
		||||
					});
 | 
			
		||||
				})
 | 
			
		||||
      }).catch(() => {});
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.navbar {
 | 
			
		||||
  height: 48px; // 56
 | 
			
		||||
	height: 84px;
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
	position: relative;
 | 
			
		||||
	background: #fff;
 | 
			
		||||
  box-shadow: 0 1px 4px rgba(0,21,41,.08);
 | 
			
		||||
	box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
 | 
			
		||||
 | 
			
		||||
	.hamburger-container {
 | 
			
		||||
    line-height: 52px;
 | 
			
		||||
		line-height: 84px;
 | 
			
		||||
		height: 100%;
 | 
			
		||||
		float: left;
 | 
			
		||||
		cursor: pointer;
 | 
			
		||||
    transition: background .3s;
 | 
			
		||||
		transition: background 0.3s;
 | 
			
		||||
		-webkit-tap-highlight-color: transparent;
 | 
			
		||||
 | 
			
		||||
		&:hover {
 | 
			
		||||
      background: rgba(0, 0, 0, .025)
 | 
			
		||||
			background: rgba(0, 0, 0, 0.025);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -162,10 +132,10 @@ export default {
 | 
			
		||||
 | 
			
		||||
			&.hover-effect {
 | 
			
		||||
				cursor: pointer;
 | 
			
		||||
        transition: background .3s;
 | 
			
		||||
				transition: background 0.3s;
 | 
			
		||||
 | 
			
		||||
				&:hover {
 | 
			
		||||
          background: rgba(0, 0, 0, .025)
 | 
			
		||||
					background: rgba(0, 0, 0, 0.025);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,37 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
 | 
			
		||||
      <div class="home-icon" v-if='blackTitle'>
 | 
			
		||||
        <svg-icon icon-class="home" style="font-size: 24px; cursor: pointer;" @click="toHome"/>
 | 
			
		||||
		<div class="home-icon" v-if="blackTitle">
 | 
			
		||||
			<!-- <svg-icon
 | 
			
		||||
				icon-class="home"
 | 
			
		||||
				style="font-size: 24px; cursor: pointer"
 | 
			
		||||
				@click="toHome" /> -->
 | 
			
		||||
			<svg-icon
 | 
			
		||||
				icon-class="alarm"
 | 
			
		||||
				style="font-size: 24px; cursor: pointer"
 | 
			
		||||
				@click="toAlarm" />
 | 
			
		||||
		</div>
 | 
			
		||||
      <div class="time-msg">
 | 
			
		||||
		<!-- <div class="time-msg">
 | 
			
		||||
        <div class="line1">{{timeZone}}    {{topTime}}</div>
 | 
			
		||||
        <div class="line2">{{topDate}}</div>
 | 
			
		||||
      </div>
 | 
			
		||||
      </div> -->
 | 
			
		||||
		<div class="base-msg">
 | 
			
		||||
			<div class="avatar">
 | 
			
		||||
				<el-dropdown>
 | 
			
		||||
            <img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" />
 | 
			
		||||
					<img
 | 
			
		||||
						:src="require(`../../assets/images/choicepart/avatar.png`)"
 | 
			
		||||
						alt=""
 | 
			
		||||
						width="42"
 | 
			
		||||
						height="42"
 | 
			
		||||
						style="position: relative; top: 4px" />
 | 
			
		||||
					<el-dropdown-menu slot="dropdown">
 | 
			
		||||
              <el-dropdown-item><svg-icon icon-class="helpbtn"/>帮助文档</el-dropdown-item>
 | 
			
		||||
              <el-dropdown-item @click.native="logout"><svg-icon icon-class="exitbtn"/>退出登录</el-dropdown-item>
 | 
			
		||||
						<!-- <el-dropdown-item>
 | 
			
		||||
							<svg-icon icon-class="helpbtn" />
 | 
			
		||||
							帮助文档
 | 
			
		||||
						</el-dropdown-item> -->
 | 
			
		||||
						<el-dropdown-item @click.native="logout">
 | 
			
		||||
							<svg-icon icon-class="exitbtn" />
 | 
			
		||||
							退出登录
 | 
			
		||||
						</el-dropdown-item>
 | 
			
		||||
					</el-dropdown-menu>
 | 
			
		||||
				</el-dropdown>
 | 
			
		||||
			</div>
 | 
			
		||||
@@ -25,66 +43,69 @@
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment'
 | 
			
		||||
import { getUser } from "@/api/system/user.js";
 | 
			
		||||
import {getPath} from "@/utils/ruoyi";
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import { getUser } from '@/api/system/user.js';
 | 
			
		||||
import { getPath } from '@/utils/ruoyi';
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'navRight',
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
      topDate: '',
 | 
			
		||||
      topTime: '',
 | 
			
		||||
      timeZone: '',
 | 
			
		||||
			// topDate: '',
 | 
			
		||||
			// topTime: '',
 | 
			
		||||
			// timeZone: '',
 | 
			
		||||
			timer: '',
 | 
			
		||||
			dept: ' ',
 | 
			
		||||
      nickname: this.$store.getters.nickname
 | 
			
		||||
    }
 | 
			
		||||
			nickname: this.$store.getters.nickname,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	props: {
 | 
			
		||||
		blackTitle: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
			default: () => {
 | 
			
		||||
        return false
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
				return false;
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
    this.getUserMsg()
 | 
			
		||||
    this.getTime()
 | 
			
		||||
		this.getUserMsg();
 | 
			
		||||
		// this.getTime();
 | 
			
		||||
	},
 | 
			
		||||
	beforeDestroy() {
 | 
			
		||||
    clearInterval(this.timer)
 | 
			
		||||
		clearInterval(this.timer);
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
    getTime() {
 | 
			
		||||
      let _this = this
 | 
			
		||||
      this.timer = setInterval(function () {
 | 
			
		||||
        _this.topDate = moment().format('YYYY/MM/DD')
 | 
			
		||||
        let temp = moment().format('A-hh:mm').split('-')
 | 
			
		||||
        _this.timeZone = temp[0]
 | 
			
		||||
        _this.topTime = temp[1]
 | 
			
		||||
      }, 1000)
 | 
			
		||||
    },
 | 
			
		||||
		// getTime() {
 | 
			
		||||
		// 	let _this = this;
 | 
			
		||||
		// 	this.timer = setInterval(function () {
 | 
			
		||||
		// 		_this.topDate = moment().format('YYYY/MM/DD');
 | 
			
		||||
		// 		let temp = moment().format('A-hh:mm').split('-');
 | 
			
		||||
		// 		_this.timeZone = temp[0];
 | 
			
		||||
		// 		_this.topTime = temp[1];
 | 
			
		||||
		// 	}, 1000);
 | 
			
		||||
		// },
 | 
			
		||||
		getUserMsg() {
 | 
			
		||||
      let id = this.$store.getters.userId
 | 
			
		||||
      getUser(id).then(res => {
 | 
			
		||||
        this.dept = res.data.dept ? res.data.dept.name : ''
 | 
			
		||||
      })
 | 
			
		||||
			let id = this.$store.getters.userId;
 | 
			
		||||
			getUser(id).then((res) => {
 | 
			
		||||
				this.dept = res.data.dept ? res.data.dept.name : '';
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		async logout() {
 | 
			
		||||
      this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('确定注销并退出系统吗?', '提示')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.$store.dispatch('LogOut').then(() => {
 | 
			
		||||
						location.href = getPath('/');
 | 
			
		||||
					});
 | 
			
		||||
				})
 | 
			
		||||
      }).catch(() => {})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
    toHome() {
 | 
			
		||||
      this.$router.push({ path: "/" })
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		toAlarm() {
 | 
			
		||||
			this.$router.push({ path: '/abnormalWarning' });
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang='scss' scoped>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.right-msg {
 | 
			
		||||
	float: right;
 | 
			
		||||
	height: 100%;
 | 
			
		||||
@@ -95,12 +116,13 @@ export default {
 | 
			
		||||
	}
 | 
			
		||||
	.home-icon {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
    margin-right: 30px;
 | 
			
		||||
		margin-right: 20px;
 | 
			
		||||
		vertical-align: top;
 | 
			
		||||
    padding-top: 7px;
 | 
			
		||||
		line-height: 84px;
 | 
			
		||||
	}
 | 
			
		||||
	.base-msg {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		padding-top: 10px;
 | 
			
		||||
		.avatar {
 | 
			
		||||
			display: inline-block;
 | 
			
		||||
			margin-right: 10px;
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@ export default {
 | 
			
		||||
    const vnodes = []
 | 
			
		||||
 | 
			
		||||
    if (icon) {
 | 
			
		||||
      vnodes.push(<svg-icon icon-class={icon}/>)
 | 
			
		||||
      vnodes.push(<svg-icon style="font-size: 18px;margin-right: 10px;vertical-align: middle;" icon-class={icon}/>)
 | 
			
		||||
    } else {
 | 
			
		||||
      vnodes.push(<span style="display: inline-block; width: 10px;"/>)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (title) {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
		:class="{ collapse: collapse }"
 | 
			
		||||
		:style="{
 | 
			
		||||
			backgroundColor:
 | 
			
		||||
				sideTheme === 'theme-dark' ? '#1f2d3d' : variables.menuLightBackground,
 | 
			
		||||
				sideTheme === 'theme-dark' ? '#1E1651' : variables.menuLightBackground,
 | 
			
		||||
		}">
 | 
			
		||||
		<!-- sideTheme === 'theme-dark'
 | 
			
		||||
					? variables.menuBackground
 | 
			
		||||
@@ -46,7 +46,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import logoImg from '@/assets/logo/logo.png';
 | 
			
		||||
import logoImg from '@/assets/logo/cnbm.png';
 | 
			
		||||
import variables from '@/assets/styles/variables.scss';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
@@ -67,7 +67,7 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			title: '中建材智能化院',
 | 
			
		||||
			title: 'MES产品化重构',
 | 
			
		||||
			logo: logoImg,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
@@ -87,8 +87,8 @@ export default {
 | 
			
		||||
.sidebar-logo-container {
 | 
			
		||||
	position: relative;
 | 
			
		||||
	width: 100%;
 | 
			
		||||
	height: 56px;
 | 
			
		||||
	line-height: 56px;
 | 
			
		||||
	height: 84px;
 | 
			
		||||
	line-height: 84px;
 | 
			
		||||
	background: #1445cc;
 | 
			
		||||
	text-align: center;
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
@@ -98,20 +98,19 @@ export default {
 | 
			
		||||
		width: 100%;
 | 
			
		||||
 | 
			
		||||
		& .sidebar-logo {
 | 
			
		||||
			width: 32px;
 | 
			
		||||
			height: 40px;
 | 
			
		||||
			width: 34px;
 | 
			
		||||
			height: 34px;
 | 
			
		||||
			vertical-align: middle;
 | 
			
		||||
			margin-right: 12px;
 | 
			
		||||
			margin-right: 8px;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		& .sidebar-title {
 | 
			
		||||
			display: inline-block;
 | 
			
		||||
			margin: 0;
 | 
			
		||||
			color: #fff;
 | 
			
		||||
			font-weight: 600;
 | 
			
		||||
			font-weight: 500;
 | 
			
		||||
			line-height: 50px;
 | 
			
		||||
			font-size: 18px;
 | 
			
		||||
			letter-spacing: 1px;
 | 
			
		||||
			font-size: 26px;
 | 
			
		||||
			font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
 | 
			
		||||
			vertical-align: middle;
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,96 +0,0 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div v-if="!item.hidden">
 | 
			
		||||
    <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
 | 
			
		||||
      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
 | 
			
		||||
        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
 | 
			
		||||
          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
 | 
			
		||||
        </el-menu-item>
 | 
			
		||||
      </app-link>
 | 
			
		||||
    </template>
 | 
			
		||||
 | 
			
		||||
    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
 | 
			
		||||
      <template slot="title">
 | 
			
		||||
        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
 | 
			
		||||
      </template>
 | 
			
		||||
      <sidebar-item
 | 
			
		||||
        v-for="(child, index) in item.children"
 | 
			
		||||
        :key="child.path + index"
 | 
			
		||||
        :is-nest="true"
 | 
			
		||||
        :item="child"
 | 
			
		||||
        :base-path="resolvePath(child.path)"
 | 
			
		||||
        class="nest-menu"
 | 
			
		||||
      />
 | 
			
		||||
    </el-submenu>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import path from 'path'
 | 
			
		||||
import { isExternal } from '@/utils/validate'
 | 
			
		||||
import Item from './Item'
 | 
			
		||||
import AppLink from './Link'
 | 
			
		||||
import FixiOSBug from './FixiOSBug'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'SidebarItem',
 | 
			
		||||
  components: { Item, AppLink },
 | 
			
		||||
  mixins: [FixiOSBug],
 | 
			
		||||
  props: {
 | 
			
		||||
    // route object
 | 
			
		||||
    item: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      required: true
 | 
			
		||||
    },
 | 
			
		||||
    isNest: {
 | 
			
		||||
      type: Boolean,
 | 
			
		||||
      default: false
 | 
			
		||||
    },
 | 
			
		||||
    basePath: {
 | 
			
		||||
      type: String,
 | 
			
		||||
      default: ''
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    this.onlyOneChild = null
 | 
			
		||||
    return {}
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    hasOneShowingChild(children = [], parent) {
 | 
			
		||||
      if (!children) {
 | 
			
		||||
        children = [];
 | 
			
		||||
      }
 | 
			
		||||
      const showingChildren = children.filter(item => {
 | 
			
		||||
        if (item.hidden) {
 | 
			
		||||
          return false
 | 
			
		||||
        } else {
 | 
			
		||||
          // Temp set(will be used if only has one showing child)
 | 
			
		||||
          this.onlyOneChild = item
 | 
			
		||||
          return true
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      // When there is only one child router, the child router is displayed by default
 | 
			
		||||
      if (showingChildren.length === 1) {
 | 
			
		||||
        return true
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      // Show parent if there are no child router to display
 | 
			
		||||
      if (showingChildren.length === 0) {
 | 
			
		||||
        this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
 | 
			
		||||
        return true
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return false
 | 
			
		||||
    },
 | 
			
		||||
    resolvePath(routePath) {
 | 
			
		||||
      if (isExternal(routePath)) {
 | 
			
		||||
        return routePath
 | 
			
		||||
      }
 | 
			
		||||
      if (isExternal(this.basePath)) {
 | 
			
		||||
        return this.basePath
 | 
			
		||||
      }
 | 
			
		||||
      return path.resolve(this.basePath, routePath)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@@ -1,96 +1,107 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div v-if="!item.hidden">
 | 
			
		||||
    <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
 | 
			
		||||
		<template
 | 
			
		||||
			v-if="
 | 
			
		||||
				hasOneShowingChild(item.children, item) &&
 | 
			
		||||
				(!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
 | 
			
		||||
				!item.alwaysShow
 | 
			
		||||
			">
 | 
			
		||||
			<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
 | 
			
		||||
        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
 | 
			
		||||
          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
 | 
			
		||||
				<el-menu-item
 | 
			
		||||
					:index="resolvePath(onlyOneChild.path)"
 | 
			
		||||
					:class="{ 'submenu-title-noDropdown': !isNest }">
 | 
			
		||||
					<item icon="menuIcon" :title="onlyOneChild.meta.title" />
 | 
			
		||||
				</el-menu-item>
 | 
			
		||||
			</app-link>
 | 
			
		||||
		</template>
 | 
			
		||||
 | 
			
		||||
    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
 | 
			
		||||
		<el-submenu
 | 
			
		||||
			v-else
 | 
			
		||||
			ref="subMenu"
 | 
			
		||||
			:index="resolvePath(item.path)"
 | 
			
		||||
			popper-append-to-body>
 | 
			
		||||
			<template slot="title">
 | 
			
		||||
        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
 | 
			
		||||
				<item v-if="item.meta" icon="menuIcon" :title="item.meta.title" />
 | 
			
		||||
			</template>
 | 
			
		||||
      <sidebar-item
 | 
			
		||||
			<sidebar-item-sub
 | 
			
		||||
				v-for="(child, index) in item.children"
 | 
			
		||||
				:key="child.path + index"
 | 
			
		||||
				:is-nest="true"
 | 
			
		||||
				:item="child"
 | 
			
		||||
				:base-path="resolvePath(child.path)"
 | 
			
		||||
        class="nest-menu"
 | 
			
		||||
      />
 | 
			
		||||
				class="nest-menu" />
 | 
			
		||||
		</el-submenu>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import path from 'path'
 | 
			
		||||
import { isExternal } from '@/utils/validate'
 | 
			
		||||
import Item from './Item'
 | 
			
		||||
import AppLink from './Link'
 | 
			
		||||
import FixiOSBug from './FixiOSBug'
 | 
			
		||||
import path from 'path';
 | 
			
		||||
import { isExternal } from '@/utils/validate';
 | 
			
		||||
import Item from './Item';
 | 
			
		||||
import AppLink from './Link';
 | 
			
		||||
import FixiOSBug from './FixiOSBug';
 | 
			
		||||
import SidebarItemSub from './SidebarItemSub';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SidebarItem',
 | 
			
		||||
  components: { Item, AppLink },
 | 
			
		||||
	components: { Item, AppLink, SidebarItemSub },
 | 
			
		||||
	mixins: [FixiOSBug],
 | 
			
		||||
	props: {
 | 
			
		||||
		// route object
 | 
			
		||||
		item: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
      required: true
 | 
			
		||||
			required: true,
 | 
			
		||||
		},
 | 
			
		||||
		isNest: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
      default: false
 | 
			
		||||
			default: false,
 | 
			
		||||
		},
 | 
			
		||||
		basePath: {
 | 
			
		||||
			type: String,
 | 
			
		||||
      default: ''
 | 
			
		||||
    }
 | 
			
		||||
			default: '',
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
    this.onlyOneChild = null
 | 
			
		||||
    return {}
 | 
			
		||||
		this.onlyOneChild = null;
 | 
			
		||||
		return {};
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		hasOneShowingChild(children = [], parent) {
 | 
			
		||||
			if (!children) {
 | 
			
		||||
				children = [];
 | 
			
		||||
			}
 | 
			
		||||
      const showingChildren = children.filter(item => {
 | 
			
		||||
			const showingChildren = children.filter((item) => {
 | 
			
		||||
				if (item.hidden) {
 | 
			
		||||
          return false
 | 
			
		||||
					return false;
 | 
			
		||||
				} else {
 | 
			
		||||
					// Temp set(will be used if only has one showing child)
 | 
			
		||||
          this.onlyOneChild = item
 | 
			
		||||
          return true
 | 
			
		||||
					this.onlyOneChild = item;
 | 
			
		||||
					return true;
 | 
			
		||||
				}
 | 
			
		||||
      })
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			// When there is only one child router, the child router is displayed by default
 | 
			
		||||
			if (showingChildren.length === 1) {
 | 
			
		||||
        return true
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Show parent if there are no child router to display
 | 
			
		||||
			if (showingChildren.length === 0) {
 | 
			
		||||
        this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
 | 
			
		||||
        return true
 | 
			
		||||
				this.onlyOneChild = { ...parent, path: '', noShowingChildren: true };
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
      return false
 | 
			
		||||
			return false;
 | 
			
		||||
		},
 | 
			
		||||
		resolvePath(routePath) {
 | 
			
		||||
			if (isExternal(routePath)) {
 | 
			
		||||
        return routePath
 | 
			
		||||
				return routePath;
 | 
			
		||||
			}
 | 
			
		||||
			if (isExternal(this.basePath)) {
 | 
			
		||||
        return this.basePath
 | 
			
		||||
      }
 | 
			
		||||
      return path.resolve(this.basePath, routePath)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
				return this.basePath;
 | 
			
		||||
			}
 | 
			
		||||
			return path.resolve(this.basePath, routePath);
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										106
									
								
								src/layout/components/Sidebar/SidebarItemSub.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,106 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div v-if="!item.hidden">
 | 
			
		||||
		<template
 | 
			
		||||
			v-if="
 | 
			
		||||
				hasOneShowingChild(item.children, item) &&
 | 
			
		||||
				(!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
 | 
			
		||||
				!item.alwaysShow
 | 
			
		||||
			">
 | 
			
		||||
			<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
 | 
			
		||||
				<el-menu-item
 | 
			
		||||
					:index="resolvePath(onlyOneChild.path)"
 | 
			
		||||
					:class="{ 'submenu-title-noDropdown': !isNest }">
 | 
			
		||||
					<item icon="" :title="onlyOneChild.meta.title" />
 | 
			
		||||
				</el-menu-item>
 | 
			
		||||
			</app-link>
 | 
			
		||||
		</template>
 | 
			
		||||
 | 
			
		||||
		<el-submenu
 | 
			
		||||
			v-else
 | 
			
		||||
			ref="subMenu"
 | 
			
		||||
			:index="resolvePath(item.path)"
 | 
			
		||||
			popper-append-to-body>
 | 
			
		||||
			<template slot="title">
 | 
			
		||||
				<item v-if="item.meta" icon="" :title="item.meta.title" />
 | 
			
		||||
			</template>
 | 
			
		||||
			<sidebar-item-sub
 | 
			
		||||
				v-for="(child, index) in item.children"
 | 
			
		||||
				:key="child.path + index"
 | 
			
		||||
				:is-nest="true"
 | 
			
		||||
				:item="child"
 | 
			
		||||
				:base-path="resolvePath(child.path)"
 | 
			
		||||
				class="nest-menu" />
 | 
			
		||||
		</el-submenu>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import path from 'path';
 | 
			
		||||
import { isExternal } from '@/utils/validate';
 | 
			
		||||
import Item from './Item';
 | 
			
		||||
import AppLink from './Link';
 | 
			
		||||
import FixiOSBug from './FixiOSBug';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'SidebarItemSub',
 | 
			
		||||
	components: { Item, AppLink },
 | 
			
		||||
	mixins: [FixiOSBug],
 | 
			
		||||
	props: {
 | 
			
		||||
		// route object
 | 
			
		||||
		item: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
			required: true,
 | 
			
		||||
		},
 | 
			
		||||
		isNest: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
			default: false,
 | 
			
		||||
		},
 | 
			
		||||
		basePath: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: '',
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		this.onlyOneChild = null;
 | 
			
		||||
		return {};
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		hasOneShowingChild(children = [], parent) {
 | 
			
		||||
			if (!children) {
 | 
			
		||||
				children = [];
 | 
			
		||||
			}
 | 
			
		||||
			const showingChildren = children.filter((item) => {
 | 
			
		||||
				if (item.hidden) {
 | 
			
		||||
					return false;
 | 
			
		||||
				} else {
 | 
			
		||||
					// Temp set(will be used if only has one showing child)
 | 
			
		||||
					this.onlyOneChild = item;
 | 
			
		||||
					return true;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			// When there is only one child router, the child router is displayed by default
 | 
			
		||||
			if (showingChildren.length === 1) {
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Show parent if there are no child router to display
 | 
			
		||||
			if (showingChildren.length === 0) {
 | 
			
		||||
				this.onlyOneChild = { ...parent, path: '', noShowingChildren: true };
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			return false;
 | 
			
		||||
		},
 | 
			
		||||
		resolvePath(routePath) {
 | 
			
		||||
			if (isExternal(routePath)) {
 | 
			
		||||
				return routePath;
 | 
			
		||||
			}
 | 
			
		||||
			if (isExternal(this.basePath)) {
 | 
			
		||||
				return this.basePath;
 | 
			
		||||
			}
 | 
			
		||||
			return path.resolve(this.basePath, routePath);
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -1,71 +0,0 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div
 | 
			
		||||
		:class="{ 'has-logo': showLogo }"
 | 
			
		||||
		:style="{
 | 
			
		||||
			backgroundColor:
 | 
			
		||||
				settings.sideTheme === 'theme-dark'
 | 
			
		||||
					? variables.menuBackground
 | 
			
		||||
					: variables.menuLightBackground,
 | 
			
		||||
		}">
 | 
			
		||||
		<logo v-if="showLogo" :collapse="isCollapse" />
 | 
			
		||||
		<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
 | 
			
		||||
			<el-menu
 | 
			
		||||
				:default-active="activeMenu"
 | 
			
		||||
				:collapse="isCollapse"
 | 
			
		||||
				:background-color="
 | 
			
		||||
					settings.sideTheme === 'theme-dark'
 | 
			
		||||
						? variables.menuBackground
 | 
			
		||||
						: variables.menuLightBackground
 | 
			
		||||
				"
 | 
			
		||||
				:text-color="
 | 
			
		||||
					settings.sideTheme === 'theme-dark'
 | 
			
		||||
						? variables.menuColor
 | 
			
		||||
						: variables.menuLightColor
 | 
			
		||||
				"
 | 
			
		||||
				:unique-opened="true"
 | 
			
		||||
				active-text-color="#fff"
 | 
			
		||||
				:collapse-transition="false"
 | 
			
		||||
				mode="vertical">
 | 
			
		||||
				<!-- 根据 sidebarRouters 路由,生成菜单 -->
 | 
			
		||||
				<sidebar-item
 | 
			
		||||
					v-for="(route, index) in sidebarRouters"
 | 
			
		||||
					:key="route.path + index"
 | 
			
		||||
					:item="route"
 | 
			
		||||
					:base-path="route.path" />
 | 
			
		||||
			</el-menu>
 | 
			
		||||
		</el-scrollbar>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapGetters, mapState } from 'vuex';
 | 
			
		||||
import Logo from './Logo';
 | 
			
		||||
import SidebarItem from './SidebarItem';
 | 
			
		||||
import variables from '@/assets/styles/variables.scss';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: { SidebarItem, Logo },
 | 
			
		||||
	computed: {
 | 
			
		||||
		...mapState(['settings']),
 | 
			
		||||
		...mapGetters(['sidebarRouters', 'sidebar']),
 | 
			
		||||
		activeMenu() {
 | 
			
		||||
			const route = this.$route;
 | 
			
		||||
			const { meta, path } = route;
 | 
			
		||||
			// if set path, the sidebar will highlight the path you set
 | 
			
		||||
			if (meta.activeMenu) {
 | 
			
		||||
				return meta.activeMenu;
 | 
			
		||||
			}
 | 
			
		||||
			return path;
 | 
			
		||||
		},
 | 
			
		||||
		showLogo() {
 | 
			
		||||
			return this.$store.state.settings.sidebarLogo;
 | 
			
		||||
		},
 | 
			
		||||
		variables() {
 | 
			
		||||
			return variables;
 | 
			
		||||
		},
 | 
			
		||||
		isCollapse() {
 | 
			
		||||
			return !this.sidebar.opened;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div
 | 
			
		||||
		:class="{ 'has-logo': showLogo }"
 | 
			
		||||
		class="left-menu-box"
 | 
			
		||||
		:style="{
 | 
			
		||||
			backgroundColor:
 | 
			
		||||
				settings.sideTheme === 'theme-dark'
 | 
			
		||||
@@ -49,9 +50,7 @@ export default {
 | 
			
		||||
		...mapState(['settings']),
 | 
			
		||||
		...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
 | 
			
		||||
		routeList() {
 | 
			
		||||
      // return [this.partList[this.choicepart]]
 | 
			
		||||
			// return [this.sidebarRouters[29]]
 | 
			
		||||
			return [this.sidebarRouters[this.choicepart]]
 | 
			
		||||
			return this.sidebarRouters;
 | 
			
		||||
		},
 | 
			
		||||
		activeMenu() {
 | 
			
		||||
			const route = this.$route;
 | 
			
		||||
@@ -74,3 +73,10 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
.left-menu-box {
 | 
			
		||||
	.el-menu-item.is-active {
 | 
			
		||||
		background-color: #0b58ff !important;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										121
									
								
								src/mixins/basic-add.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,121 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-24 11:19:43
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-11-02 15:33:39
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
import { listData } from "@/api/system/dict/data";
 | 
			
		||||
export default {
 | 
			
		||||
  data() {
 | 
			
		||||
    /* eslint-disable */
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        createURL: '',
 | 
			
		||||
        updateURL: '',
 | 
			
		||||
        infoURL: '',
 | 
			
		||||
        codeURL: '',
 | 
			
		||||
        getOption: false, //是否加载获取下拉框方法
 | 
			
		||||
        isGetCode: false, //是否加载获取code方法
 | 
			
		||||
        getDictList: false, //是否加载获取数据字典方法
 | 
			
		||||
        optionArrUrl: [], //需要获取下拉框的方法数组
 | 
			
		||||
        optionArr: {}, //需要获取下拉框的方法数组的返回结果
 | 
			
		||||
        dictList: {}, //需要获取数据字典的方法数组的返回结果
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      setData: false
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id) {
 | 
			
		||||
      this.dataForm.id = id || "";
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      if (this.urlOptions.getOption) {
 | 
			
		||||
        this.getArr()
 | 
			
		||||
      }
 | 
			
		||||
      if (this.urlOptions.getDictList) {
 | 
			
		||||
        this.getDict()
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.urlOptions.infoURL(id).then(response => {
 | 
			
		||||
            this.dataForm = response.data;
 | 
			
		||||
            if (this.setData) {
 | 
			
		||||
              this.setDataForm()
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
        } else {
 | 
			
		||||
          if (this.urlOptions.isGetCode) {
 | 
			
		||||
            this.getCode()
 | 
			
		||||
          }
 | 
			
		||||
				}
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
		getCode() {
 | 
			
		||||
			this.urlOptions.codeURL()
 | 
			
		||||
				.then(({ data: res }) => {
 | 
			
		||||
					this.dataForm.code = res;
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
    getArr() {
 | 
			
		||||
      const params = {
 | 
			
		||||
        pageSize: 100,
 | 
			
		||||
        pageNo: 1,
 | 
			
		||||
      }
 | 
			
		||||
      this.urlOptions.optionArrUrl.forEach((item, index) => {
 | 
			
		||||
        item(params).then(({ data: res }) => {
 | 
			
		||||
          this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
 | 
			
		||||
        })
 | 
			
		||||
          .catch(() => {
 | 
			
		||||
          });
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    /** 查询字典数据列表 */
 | 
			
		||||
    getDict() {
 | 
			
		||||
      this.nameList.forEach((item,index)=>{
 | 
			
		||||
        const queryParams = {
 | 
			
		||||
          pageNo: 1,
 | 
			
		||||
          pageSize: 99,
 | 
			
		||||
          dictType: item,
 | 
			
		||||
        }
 | 
			
		||||
        listData(queryParams).then(response => {
 | 
			
		||||
          this.$set(this.urlOptions.dictList, `dict${index}`, response.data.list)
 | 
			
		||||
        });
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmit() {
 | 
			
		||||
      this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
        if (!valid) {
 | 
			
		||||
          return false;
 | 
			
		||||
        }
 | 
			
		||||
        // 修改的提交
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.urlOptions.updateURL(this.dataForm).then(response => {
 | 
			
		||||
            this.$modal.msgSuccess("修改成功");
 | 
			
		||||
            this.visible = false;
 | 
			
		||||
            this.$emit("refreshDataList");
 | 
			
		||||
          });
 | 
			
		||||
          return;
 | 
			
		||||
        }
 | 
			
		||||
        // 添加的提交
 | 
			
		||||
        this.urlOptions.createURL(this.dataForm).then(response => {
 | 
			
		||||
          this.$modal.msgSuccess("新增成功");
 | 
			
		||||
          this.visible = false;
 | 
			
		||||
          this.$emit("refreshDataList");
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    formClear() {
 | 
			
		||||
      if (this.$refs.dataForm!==undefined) {
 | 
			
		||||
          this.$refs.dataForm.resetFields();
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										175
									
								
								src/mixins/basic-page.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,175 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-24 11:19:43
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-08-14 15:17:01
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
export default {
 | 
			
		||||
  data() {
 | 
			
		||||
    /* eslint-disable */
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: '',
 | 
			
		||||
        deleteURL: '',
 | 
			
		||||
        statusUrl: '',
 | 
			
		||||
        exportURL: ''
 | 
			
		||||
      },
 | 
			
		||||
      tableData: [],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        pageSize: 20,
 | 
			
		||||
        pageNo: 1,
 | 
			
		||||
        total: 1,
 | 
			
		||||
      },
 | 
			
		||||
      exportLoading: false,
 | 
			
		||||
      dataListLoading: false,
 | 
			
		||||
      addOrEditTitle: '',
 | 
			
		||||
      addOrUpdateVisible: false,
 | 
			
		||||
      addOrUpdate: 'addOrUpdate'
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getDataList()
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 获取数据列表
 | 
			
		||||
    getDataList() {
 | 
			
		||||
      this.dataListLoading = true;
 | 
			
		||||
      this.urlOptions.getDataListURL(this.listQuery).then(response => {
 | 
			
		||||
        if (response.hasOwnProperty('data')) {
 | 
			
		||||
          this.tableData = response.data.list;
 | 
			
		||||
          this.listQuery.total = response.data.total;
 | 
			
		||||
        } else {
 | 
			
		||||
          this.tableData = []
 | 
			
		||||
        }
 | 
			
		||||
        this.dataListLoading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // 每页数
 | 
			
		||||
    sizeChangeHandle(val) {
 | 
			
		||||
      this.listQuery.pageSize = val;
 | 
			
		||||
      this.listQuery.pageNo = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
    },
 | 
			
		||||
    // 当前页
 | 
			
		||||
    currentChangeHandle(val) {
 | 
			
		||||
      this.listQuery.pageNo = val;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
    },
 | 
			
		||||
    // 新增 / 修改
 | 
			
		||||
    addOrUpdateHandle(id) {
 | 
			
		||||
      this.addOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.addOrUpdate.init(id);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    cancel(id) {
 | 
			
		||||
      this.$refs["popover-" + id].showPopper = false;
 | 
			
		||||
    },
 | 
			
		||||
    //改变状态
 | 
			
		||||
    changeStatus(id) {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.statusUrl, { id })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.$refs["popover-" + id].showPopper = false;
 | 
			
		||||
          this.$message({
 | 
			
		||||
            message: this.$t("prompt.success"),
 | 
			
		||||
            type: "success",
 | 
			
		||||
            duration: 500,
 | 
			
		||||
            onClose: () => {
 | 
			
		||||
              this.getDataList();
 | 
			
		||||
            },
 | 
			
		||||
          });
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { });
 | 
			
		||||
    },
 | 
			
		||||
    //tableBtn点击
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      if (val.type === "edit") {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.addOrEditTitle = "编辑";
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === "delete") {
 | 
			
		||||
        if (val.data.name) {
 | 
			
		||||
          this.deleteHandle(val.data.id, val.data.name)
 | 
			
		||||
        } else {
 | 
			
		||||
          this.setDelete(val.data)
 | 
			
		||||
        }
 | 
			
		||||
      } else if (val.type === "change") {
 | 
			
		||||
        this.changeStatus(val.data.id)
 | 
			
		||||
      } else {
 | 
			
		||||
        this.otherMethods(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // 删除
 | 
			
		||||
    deleteHandle(id, name) {
 | 
			
		||||
      this.$modal
 | 
			
		||||
        .delConfirm(name)
 | 
			
		||||
        .then(() => {
 | 
			
		||||
          this.urlOptions.deleteURL(id).then(({ data }) => {
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: "操作成功",
 | 
			
		||||
              type: "success",
 | 
			
		||||
              duration: 1500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.getDataList();
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          });
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { });
 | 
			
		||||
    },
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          this.listQuery.xm1 = val.xm1;
 | 
			
		||||
          this.listQuery.xm2 = val.xm2;
 | 
			
		||||
          this.listQuery.pageNo = 1;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    handleCancel() {
 | 
			
		||||
      this.$refs[this.addOrUpdate].formClear()
 | 
			
		||||
      this.addOrUpdateVisible = false
 | 
			
		||||
      this.addOrEditTitle = ''
 | 
			
		||||
      this.addOrUpdate = 'addOrUpdate'
 | 
			
		||||
    },
 | 
			
		||||
    handleConfirm() {
 | 
			
		||||
      this.$refs[this.addOrUpdate].dataFormSubmit()
 | 
			
		||||
    },
 | 
			
		||||
    successSubmit() {
 | 
			
		||||
      this.handleCancel()
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
    },
 | 
			
		||||
    /** 导出按钮操作 */
 | 
			
		||||
    handleExport() {
 | 
			
		||||
      // 处理查询参数
 | 
			
		||||
      let params = { ...this.queryParams };
 | 
			
		||||
      params.pageNo = undefined;
 | 
			
		||||
      params.pageSize = undefined;
 | 
			
		||||
      this.$modal.confirm('是否确认导出所有数据项?').then(() => {
 | 
			
		||||
        this.exportLoading = true;
 | 
			
		||||
        return this.urlOptions.exportURL(params);
 | 
			
		||||
      }).then(response => {
 | 
			
		||||
        this.$download.excel(response, '报表.xls');
 | 
			
		||||
        this.exportLoading = false;
 | 
			
		||||
      }).catch(() => { });
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										73
									
								
								src/mixins/code-filter.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,73 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * @Date: 2020-12-29 16:49:28
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-08-21 11:14:58
 | 
			
		||||
 * @FilePath: \basic-admin\src\filters\basicData\index.js
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
const table = {
 | 
			
		||||
  lineStatus: {
 | 
			
		||||
    1: '生产中',
 | 
			
		||||
    2: '停止',
 | 
			
		||||
    3: '未知',
 | 
			
		||||
  },
 | 
			
		||||
  deactivate: {
 | 
			
		||||
    1: '启用',
 | 
			
		||||
    0: '停用',
 | 
			
		||||
  },
 | 
			
		||||
  reportType: {
 | 
			
		||||
    1: '日',
 | 
			
		||||
    2: '周',
 | 
			
		||||
    3: '月'
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 日期格式化
 | 
			
		||||
export function parseTime(time, pattern) {
 | 
			
		||||
  if (arguments.length === 0 || !time) {
 | 
			
		||||
    return null
 | 
			
		||||
  }
 | 
			
		||||
  const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
 | 
			
		||||
  let date
 | 
			
		||||
  if (typeof time === 'object') {
 | 
			
		||||
    date = time
 | 
			
		||||
  } else {
 | 
			
		||||
    if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
 | 
			
		||||
      time = parseInt(time)
 | 
			
		||||
    } else if (typeof time === 'string') {
 | 
			
		||||
      time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),'');
 | 
			
		||||
    }
 | 
			
		||||
    if ((typeof time === 'number') && (time.toString().length === 10)) {
 | 
			
		||||
      time = time * 1000
 | 
			
		||||
    }
 | 
			
		||||
    date = new Date(time)
 | 
			
		||||
  }
 | 
			
		||||
  const formatObj = {
 | 
			
		||||
    y: date.getFullYear(),
 | 
			
		||||
    m: date.getMonth() + 1,
 | 
			
		||||
    d: date.getDate(),
 | 
			
		||||
    h: date.getHours(),
 | 
			
		||||
    i: date.getMinutes(),
 | 
			
		||||
    s: date.getSeconds(),
 | 
			
		||||
    a: date.getDay()
 | 
			
		||||
  }
 | 
			
		||||
  const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
 | 
			
		||||
    let value = formatObj[key]
 | 
			
		||||
    // Note: getDay() returns 0 on Sunday
 | 
			
		||||
    if (key === 'a') {
 | 
			
		||||
      return ['日', '一', '二', '三', '四', '五', '六'][value]
 | 
			
		||||
    }
 | 
			
		||||
    if (result.length > 0 && value < 10) {
 | 
			
		||||
      value = '0' + value
 | 
			
		||||
    }
 | 
			
		||||
    return value || 0
 | 
			
		||||
  })
 | 
			
		||||
  return time_str
 | 
			
		||||
}
 | 
			
		||||
export default function (dictTable) {
 | 
			
		||||
  return function (val) {
 | 
			
		||||
    return table?.[dictTable]?.[val]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -110,6 +110,8 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		// 处理搜索栏按钮
 | 
			
		||||
    handleSearchBarBtnClick(btn) {
 | 
			
		||||
      console.log(btn);
 | 
			
		||||
 | 
			
		||||
			// const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代
 | 
			
		||||
      switch (btn.btnName) {
 | 
			
		||||
				case 'search':
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,11 @@
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			tableH: this.tableHeight(260),
 | 
			
		||||
			tableH: this.tableHeight(296),
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260);
 | 
			
		||||
		this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(296);
 | 
			
		||||
		window.addEventListener('resize', this._setTableHeight);
 | 
			
		||||
	},
 | 
			
		||||
	destroyed() {
 | 
			
		||||
@@ -13,7 +13,7 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		_setTableHeight() {
 | 
			
		||||
			this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260);
 | 
			
		||||
			this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(296);
 | 
			
		||||
			// this.tableH = this.tableHeight(260);
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,8 @@ export const constantRoutes = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    path: '/',
 | 
			
		||||
    component: () => import('@/views/choicePart'),
 | 
			
		||||
    // component: () => import('@/views/choicePart'),
 | 
			
		||||
    component: () => import('@/views/home'),
 | 
			
		||||
    hidden: true,
 | 
			
		||||
    meta: { requireToken: true }
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ module.exports = {
 | 
			
		||||
  /**
 | 
			
		||||
   * 是否显示顶部导航
 | 
			
		||||
   */
 | 
			
		||||
  topNav: false,
 | 
			
		||||
  topNav: true,
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 是否显示 tagsView
 | 
			
		||||
 
 | 
			
		||||
@@ -23,10 +23,15 @@ const permission = {
 | 
			
		||||
      state.topbarRouters = routes
 | 
			
		||||
    },
 | 
			
		||||
    SET_SIDEBAR_ROUTERS: (state, routes) => {
 | 
			
		||||
      // console.log('==SET_SIDEBAR_ROUTERS==:',routes)
 | 
			
		||||
      state.sidebarRouters = routes
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  actions: {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // 生成路由
 | 
			
		||||
    GenerateRoutes({commit}) {
 | 
			
		||||
      return new Promise(resolve => {
 | 
			
		||||
 
 | 
			
		||||
@@ -224,6 +224,10 @@ input, textarea{
 | 
			
		||||
      left:20px;
 | 
			
		||||
      font-size:21px !important
 | 
			
		||||
    }
 | 
			
		||||
    .el-message-box__input {
 | 
			
		||||
      padding-left: 57px;
 | 
			
		||||
      padding-right: 15px;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  .el-message-box__btns {
 | 
			
		||||
    padding-right: 32px;
 | 
			
		||||
 
 | 
			
		||||
@@ -89,6 +89,7 @@ export const DICT_TYPE = {
 | 
			
		||||
 | 
			
		||||
  // ============== ENERGY - 能源模块 =============
 | 
			
		||||
  ENERGY_UNIT: 'energy_unit',
 | 
			
		||||
  ENERGY_TYPE: 'energy_type',
 | 
			
		||||
  EQU_ALARM_LEVEL: 'equ_alarm_level',
 | 
			
		||||
  MONITOR_INDEX_TYPE: 'monitor_index_type',
 | 
			
		||||
  OBJECT_TYPE: 'object_type',
 | 
			
		||||
 
 | 
			
		||||
@@ -1,41 +1,23 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Date: 2020-12-14 09:07:03
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-11-14 10:11:09
 | 
			
		||||
 * @LastEditTime: 2024-09-05 09:50:14
 | 
			
		||||
 * @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="visual-base-table-container">
 | 
			
		||||
    <el-table
 | 
			
		||||
      v-loading="isLoading"
 | 
			
		||||
      :header-cell-style="{background:'rgba(4, 74, 132, .19)',color:'#fff'}"
 | 
			
		||||
      :row-style="setRowStyle"
 | 
			
		||||
      :data="renderData"
 | 
			
		||||
      border
 | 
			
		||||
      style="width: 100%; background: transparent"
 | 
			
		||||
    >
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        v-if="page && limit && showIndex"
 | 
			
		||||
        prop="_pageIndex"
 | 
			
		||||
        :label="'tableHeader.index' | i18nFilter"
 | 
			
		||||
        :width="70"
 | 
			
		||||
        align="center"
 | 
			
		||||
      />
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        v-for="item in renderTableHeadList"
 | 
			
		||||
        :key="item.prop"
 | 
			
		||||
        :show-overflow-tooltip="showOverflow"
 | 
			
		||||
        v-bind="item"
 | 
			
		||||
      >
 | 
			
		||||
    <el-table v-loading="isLoading"
 | 
			
		||||
      :header-cell-style="{background:'rgba(4, 74, 132, .19)',color:'#fff'}" :row-style="setRowStyle" :data="renderData"
 | 
			
		||||
      border style="width: 100%; background: transparent">
 | 
			
		||||
      <el-table-column v-if="page && limit && showIndex" prop="_pageIndex" :label="'tableHeader.index' | i18nFilter"
 | 
			
		||||
        :width="70" align="center" />
 | 
			
		||||
      <el-table-column v-for="item in renderTableHeadList" :key="item.prop" :show-overflow-tooltip="showOverflow"
 | 
			
		||||
        v-bind="item">
 | 
			
		||||
        <template slot-scope="scope">
 | 
			
		||||
 | 
			
		||||
          <component
 | 
			
		||||
            :is="item.subcomponent"
 | 
			
		||||
            v-if="item.subcomponent"
 | 
			
		||||
            :inject-data="{...scope.row, ...item}"
 | 
			
		||||
            @emitData="emitData"
 | 
			
		||||
          />
 | 
			
		||||
          <component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}"
 | 
			
		||||
            @emitData="emitData" />
 | 
			
		||||
          <span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
 | 
			
		||||
 | 
			
		||||
        </template>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								src/views/abnormalWarning/alarmGrade.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,22 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2024-09-12 14:55:26
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-09-12 15:00:14
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <dict-tag
 | 
			
		||||
    :type="DICT_TYPE.EQU_ALARM_LEVEL"
 | 
			
		||||
    :value="injectData.alarmGrade" />
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	props: {
 | 
			
		||||
		injectData: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
			default: () => ({}),
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										168
									
								
								src/views/abnormalWarning/components/Navbar.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,168 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="navbar">
 | 
			
		||||
		<div class="logo-container">
 | 
			
		||||
			<img
 | 
			
		||||
				src="../../../assets/images/cnbm.png"
 | 
			
		||||
				style="
 | 
			
		||||
					width: 34px;
 | 
			
		||||
					height: 34px;
 | 
			
		||||
					position: relative;
 | 
			
		||||
					top: 9px;
 | 
			
		||||
					margin-right: 8px;
 | 
			
		||||
				"
 | 
			
		||||
				alt="" />
 | 
			
		||||
			MES产品化重构
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		<top-nav id="warnmenu-container" class="warnmenu-container" v-if="topNav" />
 | 
			
		||||
 | 
			
		||||
		<div style="padding-top: 5px; padding-right: 38px">
 | 
			
		||||
			<navbar-right :blackTitle="true" />
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapGetters } from 'vuex';
 | 
			
		||||
import TopNav from './TopNav';
 | 
			
		||||
import Hamburger from '@/components/Hamburger';
 | 
			
		||||
import Screenfull from '@/components/Screenfull';
 | 
			
		||||
import SizeSelect from '@/components/SizeSelect';
 | 
			
		||||
import Search from '@/components/HeaderSearch';
 | 
			
		||||
import NotifyMessage from '@/layout/components/Message';
 | 
			
		||||
// import {getPath} from "@/utils/ruoyi";
 | 
			
		||||
import NavbarRight from './NavbarRight.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: {
 | 
			
		||||
		TopNav,
 | 
			
		||||
		Hamburger,
 | 
			
		||||
		Screenfull,
 | 
			
		||||
		SizeSelect,
 | 
			
		||||
		Search,
 | 
			
		||||
		NotifyMessage,
 | 
			
		||||
		NavbarRight,
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		...mapGetters(['sidebar', 'avatar', 'nickname', 'device']),
 | 
			
		||||
		setting: {
 | 
			
		||||
			get() {
 | 
			
		||||
				return this.$store.state.settings.showSettings;
 | 
			
		||||
			},
 | 
			
		||||
			set(val) {
 | 
			
		||||
				this.$store.dispatch('settings/changeSetting', {
 | 
			
		||||
					key: 'showSettings',
 | 
			
		||||
					value: val,
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		topNav: {
 | 
			
		||||
			get() {
 | 
			
		||||
				return this.$store.state.settings.topNav;
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		toggleSideBar() {
 | 
			
		||||
			this.$store.dispatch('app/toggleSideBar');
 | 
			
		||||
		},
 | 
			
		||||
		async logout() {
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('确定注销并退出系统吗?', '提示')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.$store.dispatch('LogOut').then(() => {
 | 
			
		||||
						location.href = getPath('/');
 | 
			
		||||
					});
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.navbar {
 | 
			
		||||
	height: 84px; // 56/48
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
	position: relative;
 | 
			
		||||
	background-color: #fff;
 | 
			
		||||
	.logo-container {
 | 
			
		||||
		line-height: 84px;
 | 
			
		||||
		height: 100%;
 | 
			
		||||
		float: left;
 | 
			
		||||
		cursor: pointer;
 | 
			
		||||
		font-size: 26px;
 | 
			
		||||
		padding-left: 40px;
 | 
			
		||||
		font-weight: 500;
 | 
			
		||||
		color: #0c0030;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.warnmenu-container {
 | 
			
		||||
		position: absolute;
 | 
			
		||||
		left: 290px;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.errLog-container {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		vertical-align: top;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.right-menu {
 | 
			
		||||
		float: right;
 | 
			
		||||
		height: 100%;
 | 
			
		||||
		line-height: 56px;
 | 
			
		||||
 | 
			
		||||
		&:focus {
 | 
			
		||||
			outline: none;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		.right-menu-item {
 | 
			
		||||
			display: inline-block;
 | 
			
		||||
			padding: 0 8px;
 | 
			
		||||
			height: 100%;
 | 
			
		||||
			font-size: 18px;
 | 
			
		||||
			color: #5a5e66;
 | 
			
		||||
			vertical-align: text-bottom;
 | 
			
		||||
 | 
			
		||||
			&.hover-effect {
 | 
			
		||||
				cursor: pointer;
 | 
			
		||||
				transition: background 0.3s;
 | 
			
		||||
 | 
			
		||||
				&:hover {
 | 
			
		||||
					background: rgba(0, 0, 0, 0.025);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		.avatar-container {
 | 
			
		||||
			margin-right: 30px;
 | 
			
		||||
 | 
			
		||||
			.avatar-wrapper {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				justify-content: center;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				position: relative;
 | 
			
		||||
 | 
			
		||||
				.user-avatar {
 | 
			
		||||
					cursor: pointer;
 | 
			
		||||
					width: 35px;
 | 
			
		||||
					height: 35px;
 | 
			
		||||
					border-radius: 50%;
 | 
			
		||||
				}
 | 
			
		||||
				.user-nickname {
 | 
			
		||||
					margin-left: 5px;
 | 
			
		||||
					font-size: 14px;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				.el-icon-caret-bottom {
 | 
			
		||||
					cursor: pointer;
 | 
			
		||||
					position: absolute;
 | 
			
		||||
					right: -20px;
 | 
			
		||||
					top: 25px;
 | 
			
		||||
					font-size: 12px;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										138
									
								
								src/views/abnormalWarning/components/NavbarRight.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,138 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
 | 
			
		||||
		<!-- <div class="home-icon" v-if="blackTitle">
 | 
			
		||||
			<svg-icon
 | 
			
		||||
				icon-class="alarm"
 | 
			
		||||
				style="font-size: 24px; cursor: pointer"
 | 
			
		||||
				@click="toHome" />
 | 
			
		||||
		</div> -->
 | 
			
		||||
		<!-- <div class="time-msg">
 | 
			
		||||
        <div class="line1">{{timeZone}}    {{topTime}}</div>
 | 
			
		||||
        <div class="line2">{{topDate}}</div>
 | 
			
		||||
      </div> -->
 | 
			
		||||
		<div class="base-msg">
 | 
			
		||||
			<div class="avatar">
 | 
			
		||||
				<el-dropdown>
 | 
			
		||||
					<img
 | 
			
		||||
						:src="require(`../../../assets/images/choicepart/avatar.png`)"
 | 
			
		||||
						alt=""
 | 
			
		||||
						width="42"
 | 
			
		||||
						height="42"
 | 
			
		||||
						style="position: relative; top: 4px" />
 | 
			
		||||
					<el-dropdown-menu slot="dropdown">
 | 
			
		||||
						<!-- <el-dropdown-item>
 | 
			
		||||
							<svg-icon icon-class="helpbtn" />
 | 
			
		||||
							帮助文档
 | 
			
		||||
						</el-dropdown-item> -->
 | 
			
		||||
						<el-dropdown-item @click.native="logout">
 | 
			
		||||
							<svg-icon icon-class="exitbtn" />
 | 
			
		||||
							退出登录
 | 
			
		||||
						</el-dropdown-item>
 | 
			
		||||
					</el-dropdown-menu>
 | 
			
		||||
				</el-dropdown>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div class="use-msg">
 | 
			
		||||
				<div class="line1">{{ nickname }}</div>
 | 
			
		||||
				<div class="line2">{{ dept }}</div>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import { getUser } from '@/api/system/user.js';
 | 
			
		||||
import { getPath } from '@/utils/ruoyi';
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'navRight',
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			// topDate: '',
 | 
			
		||||
			// topTime: '',
 | 
			
		||||
			// timeZone: '',
 | 
			
		||||
			timer: '',
 | 
			
		||||
			dept: ' ',
 | 
			
		||||
			nickname: this.$store.getters.nickname,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	props: {
 | 
			
		||||
		blackTitle: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
			default: () => {
 | 
			
		||||
				return false;
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		this.getUserMsg();
 | 
			
		||||
		// this.getTime();
 | 
			
		||||
	},
 | 
			
		||||
	beforeDestroy() {
 | 
			
		||||
		clearInterval(this.timer);
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// getTime() {
 | 
			
		||||
		// 	let _this = this;
 | 
			
		||||
		// 	this.timer = setInterval(function () {
 | 
			
		||||
		// 		_this.topDate = moment().format('YYYY/MM/DD');
 | 
			
		||||
		// 		let temp = moment().format('A-hh:mm').split('-');
 | 
			
		||||
		// 		_this.timeZone = temp[0];
 | 
			
		||||
		// 		_this.topTime = temp[1];
 | 
			
		||||
		// 	}, 1000);
 | 
			
		||||
		// },
 | 
			
		||||
		getUserMsg() {
 | 
			
		||||
			let id = this.$store.getters.userId;
 | 
			
		||||
			getUser(id).then((res) => {
 | 
			
		||||
				this.dept = res.data.dept ? res.data.dept.name : '';
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		async logout() {
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('确定注销并退出系统吗?', '提示')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.$store.dispatch('LogOut').then(() => {
 | 
			
		||||
						location.href = getPath('/');
 | 
			
		||||
					});
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
		toHome() {
 | 
			
		||||
			this.$router.push({ path: '/' });
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.right-msg {
 | 
			
		||||
	float: right;
 | 
			
		||||
	height: 84px;
 | 
			
		||||
	font-size: 14px;
 | 
			
		||||
	.time-msg {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		margin-right: 30px;
 | 
			
		||||
	}
 | 
			
		||||
	.home-icon {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		margin-right: 20px;
 | 
			
		||||
		vertical-align: top;
 | 
			
		||||
		line-height: 84px;
 | 
			
		||||
	}
 | 
			
		||||
	.base-msg {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		padding-top: 10px;
 | 
			
		||||
		.avatar {
 | 
			
		||||
			display: inline-block;
 | 
			
		||||
			margin-right: 10px;
 | 
			
		||||
		}
 | 
			
		||||
		.use-msg {
 | 
			
		||||
			display: inline-block;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.line1 {
 | 
			
		||||
		height: 19px;
 | 
			
		||||
	}
 | 
			
		||||
	.line2 {
 | 
			
		||||
		height: 19px;
 | 
			
		||||
		opacity: 0.65;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										273
									
								
								src/views/abnormalWarning/components/TopNav.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,273 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<el-menu
 | 
			
		||||
		:default-active="activeMenu"
 | 
			
		||||
		mode="horizontal"
 | 
			
		||||
		@select="handleSelect">
 | 
			
		||||
		<template v-for="(item, index) in topMenus">
 | 
			
		||||
			<el-menu-item
 | 
			
		||||
				:style="{ '--theme': theme }"
 | 
			
		||||
				:index="item.path"
 | 
			
		||||
				:key="index"
 | 
			
		||||
				v-if="index < visibleNumber">
 | 
			
		||||
				<!-- <svg-icon :icon-class="item.meta.icon" /> -->
 | 
			
		||||
				<span class="menu-box">
 | 
			
		||||
					<span class="menu-dot"></span>
 | 
			
		||||
					{{ item.meta.title }}
 | 
			
		||||
				</span>
 | 
			
		||||
			</el-menu-item>
 | 
			
		||||
		</template>
 | 
			
		||||
 | 
			
		||||
		<!-- 顶部菜单超出数量折叠 -->
 | 
			
		||||
		<el-submenu
 | 
			
		||||
			:style="{ '--theme': theme }"
 | 
			
		||||
			index="more"
 | 
			
		||||
			v-if="topMenus.length > visibleNumber">
 | 
			
		||||
			<template slot="title">更多菜单</template>
 | 
			
		||||
			<template v-for="(item, index) in topMenus">
 | 
			
		||||
				<el-menu-item
 | 
			
		||||
					:index="item.path"
 | 
			
		||||
					:key="index"
 | 
			
		||||
					v-if="index >= visibleNumber">
 | 
			
		||||
					<!-- <svg-icon :icon-class="item.meta.icon" /> -->
 | 
			
		||||
					<span class="menu-box">
 | 
			
		||||
						<span class="menu-dot"></span>
 | 
			
		||||
						{{ item.meta.title }}
 | 
			
		||||
					</span>
 | 
			
		||||
				</el-menu-item>
 | 
			
		||||
			</template>
 | 
			
		||||
		</el-submenu>
 | 
			
		||||
	</el-menu>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapGetters } from 'vuex';
 | 
			
		||||
import { constantRoutes } from '@/router';
 | 
			
		||||
 | 
			
		||||
// 隐藏侧边栏路由
 | 
			
		||||
const hideList = ['/index', '/user/profile'];
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			// 顶部栏初始数
 | 
			
		||||
			visibleNumber: 5,
 | 
			
		||||
			// 当前激活菜单的 index
 | 
			
		||||
			// currentIndex: undefined,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		...mapGetters(['choicepart']),
 | 
			
		||||
		currentIndex() {
 | 
			
		||||
			return this.choicepart;
 | 
			
		||||
		},
 | 
			
		||||
		theme() {
 | 
			
		||||
			return this.$store.state.settings.theme;
 | 
			
		||||
		},
 | 
			
		||||
		// 顶部显示菜单
 | 
			
		||||
		topMenus() {
 | 
			
		||||
			let topMenus = [];
 | 
			
		||||
			this.routers.map((menu) => {
 | 
			
		||||
				if (menu.hidden !== true) {
 | 
			
		||||
					// 兼容顶部栏一级菜单内部跳转
 | 
			
		||||
					if (menu.path === '/') {
 | 
			
		||||
						topMenus.push(menu.children[0]);
 | 
			
		||||
					} else {
 | 
			
		||||
						topMenus.push(menu);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			console.log('topMenus:', topMenus);
 | 
			
		||||
			return topMenus;
 | 
			
		||||
		},
 | 
			
		||||
		// 所有的路由信息
 | 
			
		||||
		routers() {
 | 
			
		||||
			return this.$store.state.permission.topbarRouters;
 | 
			
		||||
		},
 | 
			
		||||
		// 设置子路由
 | 
			
		||||
		childrenMenus() {
 | 
			
		||||
			const childrenMenus = [];
 | 
			
		||||
			this.routers.map((router) => {
 | 
			
		||||
				for (let item in router.children) {
 | 
			
		||||
					if (router.children[item].parentPath === undefined) {
 | 
			
		||||
						if (router.path === '/') {
 | 
			
		||||
							router.children[item].path = '/' + router.children[item].path;
 | 
			
		||||
						} else {
 | 
			
		||||
							if (!this.ishttp(router.children[item].path)) {
 | 
			
		||||
								router.children[item].path =
 | 
			
		||||
									router.path + '/' + router.children[item].path;
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
						router.children[item].parentPath = router.path;
 | 
			
		||||
					}
 | 
			
		||||
					childrenMenus.push(router.children[item]);
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			return constantRoutes.concat(childrenMenus);
 | 
			
		||||
		},
 | 
			
		||||
		// 默认激活的菜单
 | 
			
		||||
		activeMenu() {
 | 
			
		||||
			const path = this.$route.path;
 | 
			
		||||
			let activePath = path;
 | 
			
		||||
			if (
 | 
			
		||||
				path !== undefined &&
 | 
			
		||||
				path.lastIndexOf('/') > 0 &&
 | 
			
		||||
				hideList.indexOf(path) === -1
 | 
			
		||||
			) {
 | 
			
		||||
				const tmpPath = path.substring(1, path.length);
 | 
			
		||||
				activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/'));
 | 
			
		||||
				if (!this.$route.meta.link) {
 | 
			
		||||
					this.$store.dispatch('app/toggleSideBarHide', false);
 | 
			
		||||
				}
 | 
			
		||||
			} else if (!this.$route.children) {
 | 
			
		||||
				activePath = path;
 | 
			
		||||
				this.$store.dispatch('app/toggleSideBarHide', true);
 | 
			
		||||
			}
 | 
			
		||||
			this.activeRoutes(activePath);
 | 
			
		||||
			return activePath;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	beforeMount() {
 | 
			
		||||
		window.addEventListener('resize', this.setVisibleNumber);
 | 
			
		||||
	},
 | 
			
		||||
	beforeDestroy() {
 | 
			
		||||
		window.removeEventListener('resize', this.setVisibleNumber);
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.setVisibleNumber();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 根据宽度计算设置显示栏数
 | 
			
		||||
		setVisibleNumber() {
 | 
			
		||||
			const width = window.innerWidth - 700;
 | 
			
		||||
			console.log(width);
 | 
			
		||||
			console.log('window.innerWidth:', window.innerWidth);
 | 
			
		||||
			this.visibleNumber = parseInt(width / 110);
 | 
			
		||||
			console.log('this.visibleNumber:', this.visibleNumber);
 | 
			
		||||
		},
 | 
			
		||||
		// 菜单选择事件
 | 
			
		||||
		handleSelect(key, keyPath) {
 | 
			
		||||
			// this.currentIndex = key;
 | 
			
		||||
			const route = this.routers.find((item) => item.path === key);
 | 
			
		||||
			console.log('route:', route);
 | 
			
		||||
			this.$store.dispatch('app/setChoicepart', key);
 | 
			
		||||
			this.toRouter(route);
 | 
			
		||||
			// if (this.ishttp(key)) {
 | 
			
		||||
			// 	// http(s):// 路径新窗口打开
 | 
			
		||||
			// 	window.open(key, '_blank');
 | 
			
		||||
			// 	console.log('aaaaaaaaaaaaaa');
 | 
			
		||||
			// } else if (!route || !route.children) {
 | 
			
		||||
			// 	// 没有子路由路径内部打开
 | 
			
		||||
			// 	this.$router.push({ path: key });
 | 
			
		||||
			// 	this.$store.dispatch('app/toggleSideBarHide', true);
 | 
			
		||||
			// 	console.log('bbbbbbbbbbbbbbb');
 | 
			
		||||
			// } else {
 | 
			
		||||
			// 	// 显示左侧联动菜单
 | 
			
		||||
			// 	this.activeRoutes(key);
 | 
			
		||||
			// 	if (!this.$route.meta.link) {
 | 
			
		||||
			// 		this.$store.dispatch('app/toggleSideBarHide', false);
 | 
			
		||||
			// 	}
 | 
			
		||||
			// 	console.log('cccccccccccccccc');
 | 
			
		||||
			// }
 | 
			
		||||
		},
 | 
			
		||||
		toRouter(item) {
 | 
			
		||||
			console.log(item);
 | 
			
		||||
			if (item.children) {
 | 
			
		||||
				this.toRouter(item.children[0]);
 | 
			
		||||
			} else {
 | 
			
		||||
				this.$router.push({ name: item.name });
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		// 当前激活的路由
 | 
			
		||||
		activeRoutes(key) {
 | 
			
		||||
			const routes = [];
 | 
			
		||||
			if (this.childrenMenus && this.childrenMenus.length > 0) {
 | 
			
		||||
				this.childrenMenus.map((item) => {
 | 
			
		||||
					if (
 | 
			
		||||
						key === item.parentPath ||
 | 
			
		||||
						(key === 'index' && '' === item.path)
 | 
			
		||||
					) {
 | 
			
		||||
						routes.push(item);
 | 
			
		||||
					}
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			if (routes.length > 0) {
 | 
			
		||||
				this.$store.commit('SET_SIDEBAR_ROUTERS', routes);
 | 
			
		||||
			} else {
 | 
			
		||||
				this.$store.dispatch('app/toggleSideBarHide', true);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		ishttp(url) {
 | 
			
		||||
			return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
.warnmenu-container.el-menu.el-menu--horizontal > .el-menu-item.is-active {
 | 
			
		||||
	border-bottom: none !important;
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu.el-menu--horizontal > .el-submenu.is-active {
 | 
			
		||||
	--theme: none !important;
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu--horizontal > .el-menu-item {
 | 
			
		||||
	float: left;
 | 
			
		||||
	height: 84px !important;
 | 
			
		||||
	line-height: 84px !important;
 | 
			
		||||
	color: #000 !important;
 | 
			
		||||
	padding: 0 5px !important;
 | 
			
		||||
	font-size: 18px;
 | 
			
		||||
	.menu-box {
 | 
			
		||||
		// color: #fff;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu--horizontal
 | 
			
		||||
	> .el-menu-item:not(.is-disabled):hover {
 | 
			
		||||
	background-color: transparent;
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu {
 | 
			
		||||
	background-color: transparent;
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu.el-menu--horizontal {
 | 
			
		||||
	border: none;
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu--horizontal > .el-menu-item.is-active,
 | 
			
		||||
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
 | 
			
		||||
	border-bottom: 2px solid #{'var(--theme)'} !important;
 | 
			
		||||
	color: #303133;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* submenu item */
 | 
			
		||||
.warnmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {
 | 
			
		||||
	float: left;
 | 
			
		||||
	height: 84px !important;
 | 
			
		||||
	line-height: 91px !important;
 | 
			
		||||
	color: #000 !important;
 | 
			
		||||
	padding: 0 5px !important;
 | 
			
		||||
	margin: 0 10px !important;
 | 
			
		||||
	font-size: 18px;
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
 | 
			
		||||
	background-color: transparent;
 | 
			
		||||
}
 | 
			
		||||
.warnmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title i {
 | 
			
		||||
	// color: #fff;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.menu-box {
 | 
			
		||||
	padding: 3px 10px 5px 10px;
 | 
			
		||||
	border-radius: 30px;
 | 
			
		||||
	color: #000;
 | 
			
		||||
}
 | 
			
		||||
.menu-dot {
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	width: 5px;
 | 
			
		||||
	height: 5px;
 | 
			
		||||
	border-radius: 50%;
 | 
			
		||||
	background: #0b58ff;
 | 
			
		||||
	margin-right: 3px;
 | 
			
		||||
	margin-bottom: 2px;
 | 
			
		||||
	opacity: 0;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										224
									
								
								src/views/abnormalWarning/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,224 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="warning-page">
 | 
			
		||||
		<navbar />
 | 
			
		||||
		<div class="main-box">
 | 
			
		||||
			<div class="title">
 | 
			
		||||
				<span></span>
 | 
			
		||||
				异常警告
 | 
			
		||||
				<div class="return-home" @click="toHome">
 | 
			
		||||
					<svg-icon
 | 
			
		||||
						icon-class="alarm-home"
 | 
			
		||||
						style="font-size: 20px; position: relative; top: 2px" />
 | 
			
		||||
					返回首页
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			<search-bar
 | 
			
		||||
				:formConfigs="formConfig"
 | 
			
		||||
				removeBlue
 | 
			
		||||
				ref="searchBarForm"
 | 
			
		||||
				@headBtnClick="buttonClick" />
 | 
			
		||||
			<base-table
 | 
			
		||||
				:page="1"
 | 
			
		||||
				:limit="100000"
 | 
			
		||||
				:table-props="tableProps"
 | 
			
		||||
				:table-data="list"
 | 
			
		||||
				:max-height="tableH" />
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class="footer">
 | 
			
		||||
			<img src="../../assets/img/alarm-bg.png" alt="" />
 | 
			
		||||
			<div>© 中建材智能自动化研究院有限公司</div>
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import Navbar from './components/Navbar';
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
 | 
			
		||||
import { listData } from '@/api/system/dict/data';
 | 
			
		||||
import alarmGrade from './alarmGrade.vue'
 | 
			
		||||
import {
 | 
			
		||||
	getHomeAlarmList
 | 
			
		||||
} from '@/api/home';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'AbnormalWarning',
 | 
			
		||||
	mixins: [tableHeightMixin],
 | 
			
		||||
	components: { Navbar },
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			formConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '报警来源',
 | 
			
		||||
					placeholder: '报警来源',
 | 
			
		||||
					param: 'alarmSource',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'datePicker',
 | 
			
		||||
					label: '时间段',
 | 
			
		||||
					dateType: 'daterange',
 | 
			
		||||
					format: 'yyyy-MM-dd',
 | 
			
		||||
					valueFormat: 'timestamp',
 | 
			
		||||
					rangeSeparator: '-',
 | 
			
		||||
					startPlaceholder: '开始时间',
 | 
			
		||||
					endPlaceholder: '结束时间',
 | 
			
		||||
					param: 'alarmTime',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
					label: '报警级别',
 | 
			
		||||
					selectOptions: [],
 | 
			
		||||
					param: 'alarmGrade',
 | 
			
		||||
					defaultSelect: '',
 | 
			
		||||
					filterable: true,
 | 
			
		||||
					labelField: 'label',
 | 
			
		||||
					valueField: 'value',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
			heightNum: 280,
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'alarmTime',
 | 
			
		||||
					label: '报警时间',
 | 
			
		||||
					width: 180,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'alarmSource',
 | 
			
		||||
					label: '报警来源',
 | 
			
		||||
					showOverflowtooltip: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'alarmType',
 | 
			
		||||
					label: '报警类型',
 | 
			
		||||
					showOverflowtooltip: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'alarmGrade',
 | 
			
		||||
					label: '报警级别',
 | 
			
		||||
					showOverflowtooltip: true,
 | 
			
		||||
          subcomponent: alarmGrade
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'alarmReason',
 | 
			
		||||
					label: '报警原因',
 | 
			
		||||
					showOverflowtooltip: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'alarmContent',
 | 
			
		||||
					label: '报警详情',
 | 
			
		||||
					showOverflowtooltip: true,
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
			list: [],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        alarmSource: undefined,
 | 
			
		||||
        alarmTime: undefined,
 | 
			
		||||
        alarmGrade: undefined,
 | 
			
		||||
      }
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		const queryParams = {
 | 
			
		||||
			pageNo: 1,
 | 
			
		||||
			pageSize: 99,
 | 
			
		||||
			dictType: 'equ_alarm_level',
 | 
			
		||||
		};
 | 
			
		||||
		listData(queryParams).then((response) => {
 | 
			
		||||
			this.formConfig[2].selectOptions = response.data.list;
 | 
			
		||||
		});
 | 
			
		||||
    this.getDataList()
 | 
			
		||||
  },
 | 
			
		||||
	methods: {
 | 
			
		||||
		buttonClick(val) {
 | 
			
		||||
			switch (val.btnName) {
 | 
			
		||||
				case 'search':
 | 
			
		||||
					this.listQuery.alarmSource = val.alarmSource;
 | 
			
		||||
					this.listQuery.alarmGrade = val.alarmGrade;
 | 
			
		||||
					this.listQuery.alarmTime = val.alarmTime ? val.alarmTime : null;
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					break;
 | 
			
		||||
				default:
 | 
			
		||||
					console.log(val);
 | 
			
		||||
			}
 | 
			
		||||
    },
 | 
			
		||||
    getDataList(){
 | 
			
		||||
      getHomeAlarmList(this.listQuery).then(response => {
 | 
			
		||||
        if(response.hasOwnProperty('data')){
 | 
			
		||||
          this.list = response.data;
 | 
			
		||||
        }else{
 | 
			
		||||
          this.list = []
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
		toHome() {
 | 
			
		||||
			this.$router.push({ path: '/' });
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.warning-page {
 | 
			
		||||
	width: 100%;
 | 
			
		||||
	height: 100vh;
 | 
			
		||||
	.main-box {
 | 
			
		||||
		position: relative;
 | 
			
		||||
		width: 64.58%;
 | 
			
		||||
		height: calc(100vh - 160px);
 | 
			
		||||
		background-color: #fff;
 | 
			
		||||
		border-radius: 24px;
 | 
			
		||||
		margin: 16px auto 0;
 | 
			
		||||
		z-index: 10;
 | 
			
		||||
		padding: 24px 32px;
 | 
			
		||||
		.title {
 | 
			
		||||
			font-size: 16px;
 | 
			
		||||
			color: #000000;
 | 
			
		||||
			position: relative;
 | 
			
		||||
			cursor: pointer;
 | 
			
		||||
			span {
 | 
			
		||||
				display: inline-block;
 | 
			
		||||
				float: left;
 | 
			
		||||
				width: 4px;
 | 
			
		||||
				height: 16px;
 | 
			
		||||
				background-color: #0b58ff;
 | 
			
		||||
				border-radius: 1px;
 | 
			
		||||
				margin-right: 8px;
 | 
			
		||||
				margin-top: 4px;
 | 
			
		||||
			}
 | 
			
		||||
			.return-home {
 | 
			
		||||
				position: absolute;
 | 
			
		||||
				color: rgba(0, 0, 0, 0.3);
 | 
			
		||||
				font-size: 14px;
 | 
			
		||||
				right: 0px;
 | 
			
		||||
				top: 0px;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.footer {
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		bottom: -3px;
 | 
			
		||||
		z-index: 8;
 | 
			
		||||
		img {
 | 
			
		||||
			width: 100%;
 | 
			
		||||
			height: 220px;
 | 
			
		||||
		}
 | 
			
		||||
		div {
 | 
			
		||||
			width: 100%;
 | 
			
		||||
			color: red;
 | 
			
		||||
			position: absolute;
 | 
			
		||||
			bottom: 10px;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
			font-size: 12px;
 | 
			
		||||
			color: #c7c7c7;
 | 
			
		||||
			letter-spacing: 1px;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -53,7 +53,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicAdd from '../../core/mixins/basic-add';
 | 
			
		||||
import basicAdd from '@/mixins/basic-add';
 | 
			
		||||
import { createCustomer, updateCustomer, getCustomer, getCode } from "@/api/base/coreCustomer";
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,7 @@
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="listQuery.pageNo"
 | 
			
		||||
			:limit="listQuery.pageSize"
 | 
			
		||||
				:max-height="tableH"
 | 
			
		||||
			:table-data="tableData">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
@@ -39,18 +40,20 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import AddOrUpdate from './add-or-updata';
 | 
			
		||||
import basicPage from '../../core/mixins/basic-page';
 | 
			
		||||
import basicPage from '@/mixins/basic-page';
 | 
			
		||||
import { parseTime } from '../../core/mixins/code-filter';
 | 
			
		||||
import {
 | 
			
		||||
	getCustomerPage,
 | 
			
		||||
	deleteCustomer
 | 
			
		||||
} from '@/api/base/coreCustomer';
 | 
			
		||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
 | 
			
		||||
 | 
			
		||||
const tableProps = [
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'createTime',
 | 
			
		||||
		label: '添加时间',
 | 
			
		||||
		filter: parseTime
 | 
			
		||||
		filter: parseTime,
 | 
			
		||||
    width: 150
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'name',
 | 
			
		||||
@@ -58,7 +61,8 @@ const tableProps = [
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'code',
 | 
			
		||||
		label: '客户编码'
 | 
			
		||||
		label: '客户编码',
 | 
			
		||||
    width: 150
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'contact',
 | 
			
		||||
@@ -79,7 +83,7 @@ const tableProps = [
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicPage],
 | 
			
		||||
	mixins: [basicPage,tableHeightMixin],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
@@ -133,27 +137,18 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	created() {},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 获取数据列表
 | 
			
		||||
    // getDataList() {
 | 
			
		||||
    //   this.dataListLoading = true;
 | 
			
		||||
    //   this.urlOptions.getDataListURL(this.listQuery).then(response => {
 | 
			
		||||
    //     this.tableData = response.data.list;
 | 
			
		||||
    //     this.listQuery.total = response.data.total;
 | 
			
		||||
    //     this.dataListLoading = false;
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
		buttonClick(val) {
 | 
			
		||||
			switch (val.btnName) {
 | 
			
		||||
				case 'search':
 | 
			
		||||
					this.listQuery.pageNo = 1;
 | 
			
		||||
					this.listQuery.pageSize = 10;
 | 
			
		||||
					this.listQuery.pageSize = 20;
 | 
			
		||||
					this.listQuery.name = val.name ? val.name : undefined;
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'reset':
 | 
			
		||||
					this.$refs.searchBarForm.resetForm();
 | 
			
		||||
					this.listQuery = {
 | 
			
		||||
						pageSize: 10,
 | 
			
		||||
						pageSize: 20,
 | 
			
		||||
						pageNo: 1,
 | 
			
		||||
						total: 1,
 | 
			
		||||
					};
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-22 10:27:43
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-08-14 15:15:45
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -53,7 +53,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicAdd from '../../core/mixins/basic-add';
 | 
			
		||||
import basicAdd from '@/mixins/basic-add';
 | 
			
		||||
import { createCoreSupplier, updateCoreSupplier, getCoreSupplier, getCode } from "@/api/base/coreSupplier";
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,7 @@
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="listQuery.pageNo"
 | 
			
		||||
			:limit="listQuery.pageSize"
 | 
			
		||||
			:max-height="tableH"
 | 
			
		||||
			:table-data="tableData">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
@@ -39,52 +40,55 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import AddOrUpdate from './add-or-updata';
 | 
			
		||||
import basicPage from '../../core/mixins/basic-page';
 | 
			
		||||
import basicPage from '@/mixins/basic-page';
 | 
			
		||||
import { parseTime } from '../../core/mixins/code-filter';
 | 
			
		||||
import {
 | 
			
		||||
	getCoreSupplierPage,
 | 
			
		||||
	deleteCoreSupplier
 | 
			
		||||
	deleteCoreSupplier,
 | 
			
		||||
} from '@/api/base/coreSupplier';
 | 
			
		||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
 | 
			
		||||
 | 
			
		||||
const tableProps = [
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'createTime',
 | 
			
		||||
		label: '添加时间',
 | 
			
		||||
		filter: parseTime
 | 
			
		||||
		filter: parseTime,
 | 
			
		||||
		width: 150,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'code',
 | 
			
		||||
		label: '供应商编码'
 | 
			
		||||
		label: '供应商编码',
 | 
			
		||||
		width: 150,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'name',
 | 
			
		||||
		label: '供应商名称'
 | 
			
		||||
		label: '供应商名称',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'contact',
 | 
			
		||||
		label: '联系人'
 | 
			
		||||
		label: '联系人',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'telephone',
 | 
			
		||||
		label: '联系电话'
 | 
			
		||||
		label: '联系电话',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'address',
 | 
			
		||||
		label: '地址'
 | 
			
		||||
		label: '地址',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'remark',
 | 
			
		||||
		label: '备注'
 | 
			
		||||
		label: '备注',
 | 
			
		||||
	},
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicPage],
 | 
			
		||||
	mixins: [basicPage, tableHeightMixin],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
				getDataListURL: getCoreSupplierPage,
 | 
			
		||||
				deleteURL: deleteCoreSupplier
 | 
			
		||||
				deleteURL: deleteCoreSupplier,
 | 
			
		||||
			},
 | 
			
		||||
			tableProps,
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
@@ -119,11 +123,13 @@ export default {
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-supplier:create') ? 'button' : '',
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-supplier:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					color: 'success',
 | 
			
		||||
					plain: true
 | 
			
		||||
					plain: true,
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
		};
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-24 11:19:43
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-09-21 16:02:07
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-07-22 11:15:10
 | 
			
		||||
 * @Description:
 | 
			
		||||
 */
 | 
			
		||||
export default {
 | 
			
		||||
@@ -17,7 +17,7 @@ export default {
 | 
			
		||||
      },
 | 
			
		||||
      tableData: [],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        pageSize: 10,
 | 
			
		||||
        pageSize: 20,
 | 
			
		||||
        pageNo: 1,
 | 
			
		||||
        total: 1,
 | 
			
		||||
      },
 | 
			
		||||
@@ -101,11 +101,8 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    // 删除
 | 
			
		||||
    deleteHandle(id, name, index) {
 | 
			
		||||
      this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", {
 | 
			
		||||
        confirmButtonText: "确定",
 | 
			
		||||
        cancelButtonText: "取消",
 | 
			
		||||
        type: "warning",
 | 
			
		||||
      })
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.delConfirm(name ? '名称: ' + name : '序号: ' + index)
 | 
			
		||||
        .then(() => {
 | 
			
		||||
          this.urlOptions.deleteURL(id).then(({ data }) => {
 | 
			
		||||
            this.$message({
 | 
			
		||||
 
 | 
			
		||||
@@ -38,15 +38,8 @@
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row :gutter="20">
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
        <el-form-item label="发货负责人" prop="deliveryPersonId">
 | 
			
		||||
          <el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;" filterable>
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in personList"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id">
 | 
			
		||||
            </el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
        <el-form-item label="发货负责人" prop="deliveryPerson">
 | 
			
		||||
          <el-input v-model="form.deliveryPerson"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='6'>
 | 
			
		||||
@@ -75,7 +68,6 @@
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import { getWorkerList } from '@/api/base/worker'
 | 
			
		||||
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'AddOrUpdate',
 | 
			
		||||
@@ -87,7 +79,7 @@ export default {
 | 
			
		||||
        name: '',
 | 
			
		||||
        code: '',
 | 
			
		||||
        deliveryTime: null,
 | 
			
		||||
        deliveryPersonId: '',
 | 
			
		||||
        deliveryPerson: '',
 | 
			
		||||
        principal: '',
 | 
			
		||||
        principalCall: '',
 | 
			
		||||
        principalCost: 0.00,
 | 
			
		||||
@@ -100,7 +92,6 @@ export default {
 | 
			
		||||
        code: [{ required: true, message: "发货单号不能为空", trigger: "blur" }]
 | 
			
		||||
      },
 | 
			
		||||
      orderList: [],
 | 
			
		||||
      personList: []
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
@@ -118,9 +109,6 @@ export default {
 | 
			
		||||
      listOrderList().then(res => {
 | 
			
		||||
        this.orderList = res.data || []
 | 
			
		||||
      })
 | 
			
		||||
      getWorkerList().then(res => {
 | 
			
		||||
        this.personList = res.data || []
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    submitForm() {
 | 
			
		||||
      this.$refs['addOrUpdate'].validate((valid) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -93,6 +93,16 @@ const tableProps = [
 | 
			
		||||
    label: '装箱规格(片/箱)',
 | 
			
		||||
    width: 150
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'contactPerson',
 | 
			
		||||
    label: '车辆联系人',
 | 
			
		||||
    width: 150
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'contactPersonCall',
 | 
			
		||||
    label: '联系方式',
 | 
			
		||||
    width: 150
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingNum',
 | 
			
		||||
    label: '箱数'
 | 
			
		||||
 
 | 
			
		||||
@@ -8,26 +8,29 @@
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
        <el-form-item label="装车时间" prop="loadTime">
 | 
			
		||||
          <el-date-picker
 | 
			
		||||
            v-model="form.loadTime"
 | 
			
		||||
            type="datetime"
 | 
			
		||||
            format='yyyy-MM-dd HH:mm:ss'
 | 
			
		||||
            value-format="timestamp"
 | 
			
		||||
            style="width: 100%;"
 | 
			
		||||
            placeholder="选择日期">
 | 
			
		||||
          <el-date-picker v-model="form.loadTime" type="datetime" format='yyyy-MM-dd HH:mm:ss' value-format="timestamp"
 | 
			
		||||
            style="width: 100%;" placeholder="选择日期">
 | 
			
		||||
          </el-date-picker>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row :gutter="24">
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
        <el-form-item label="车辆联系人" prop="contactPerson">
 | 
			
		||||
          <el-input v-model="form.contactPerson"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
        <el-form-item label="联系方式" prop="contactPersonCall">
 | 
			
		||||
          <el-input v-model="form.contactPersonCall"></el-input>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <el-col :span='12'>
 | 
			
		||||
        <el-form-item label="装车产品" prop="productId">
 | 
			
		||||
          <el-select v-model="form.productId" disabled placeholder="请选择" style="width: 100%;">
 | 
			
		||||
            <el-option
 | 
			
		||||
              v-for="item in productList"
 | 
			
		||||
              :key="item.id"
 | 
			
		||||
              :label="item.name"
 | 
			
		||||
              :value="item.id">
 | 
			
		||||
            <el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
            </el-option>
 | 
			
		||||
          </el-select>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
 
 | 
			
		||||
@@ -44,14 +44,14 @@
 | 
			
		||||
              :table-data="tableData"
 | 
			
		||||
              :max-height="tableH"
 | 
			
		||||
            >
 | 
			
		||||
              <method-btn
 | 
			
		||||
              <!-- <method-btn
 | 
			
		||||
                v-if="tableBtn.length"
 | 
			
		||||
                slot="handleBtn"
 | 
			
		||||
                :width="80"
 | 
			
		||||
                label="操作"
 | 
			
		||||
                :method-list="tableBtn"
 | 
			
		||||
                @clickBtn="viewDetDetail"
 | 
			
		||||
              />
 | 
			
		||||
              /> -->
 | 
			
		||||
            </base-table>
 | 
			
		||||
            <pagination
 | 
			
		||||
              :page.sync="queryParams.pageNo"
 | 
			
		||||
@@ -73,51 +73,14 @@
 | 
			
		||||
      </el-tabs>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- 详情抽屉 -->
 | 
			
		||||
    <el-drawer
 | 
			
		||||
      title="发货详情"
 | 
			
		||||
      size="50%"
 | 
			
		||||
      :append-to-body="true"
 | 
			
		||||
      :visible.sync="innerDrawer"
 | 
			
		||||
      @close='closeB'
 | 
			
		||||
      :show-close='false'>
 | 
			
		||||
      <div class="box3">
 | 
			
		||||
        <el-row>
 | 
			
		||||
          <el-col :span='12'>
 | 
			
		||||
            <span class="title">订单名:</span>
 | 
			
		||||
            <span class="text">{{orderMsg.orderName ? orderMsg.orderName : '-'}}</span>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span='12'>
 | 
			
		||||
            <span class="title">发货单号:</span>
 | 
			
		||||
            <span class="text">{{logCode ? logCode : '-'}}</span>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="box4">
 | 
			
		||||
        <div class="boxTitle">
 | 
			
		||||
          <span class="blueTitle"></span>
 | 
			
		||||
          <span>详情</span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <base-table
 | 
			
		||||
          :page="queryParams2.pageNo"
 | 
			
		||||
          :limit="queryParams2.pageSize"
 | 
			
		||||
          :table-props="tableProps2"
 | 
			
		||||
          :table-data="tableData2"
 | 
			
		||||
          :max-height="tableH2"
 | 
			
		||||
        />
 | 
			
		||||
        <pagination
 | 
			
		||||
          :page.sync="queryParams2.pageNo"
 | 
			
		||||
          :limit.sync="queryParams2.pageSize"
 | 
			
		||||
          :total="total2"
 | 
			
		||||
          @pagination="getList2"
 | 
			
		||||
        />
 | 
			
		||||
      </div>
 | 
			
		||||
    </el-drawer>
 | 
			
		||||
  </el-drawer>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import { deliveryLogPage, deliveryLogDetPage } from '@/api/base/delivery'
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
import * as echarts from 'echarts'
 | 
			
		||||
import detailButton from './detailButton';
 | 
			
		||||
 | 
			
		||||
import resize from '@/utils/chartMixins/resize'
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
@@ -142,55 +105,21 @@ const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'rate',
 | 
			
		||||
    label: '发货比列(%)',
 | 
			
		||||
    width: 110
 | 
			
		||||
    width: 110,
 | 
			
		||||
    filter: (val) =>
 | 
			
		||||
      val != null ? `${(val).toFixed(2)}%` : '',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'principalCost',
 | 
			
		||||
    label: '运输费用'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'desc',
 | 
			
		||||
    label: '装车详情',
 | 
			
		||||
    subcomponent: detailButton,
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const tableProps2 = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'createTime',
 | 
			
		||||
    label: '添加时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'deliveryCarCode',
 | 
			
		||||
    label: '装车单号',
 | 
			
		||||
    showOverflowtooltip: true
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'loadTime',
 | 
			
		||||
    label: '装车时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productName',
 | 
			
		||||
    label: '装车产品',
 | 
			
		||||
    showOverflowtooltip: true
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingSize',
 | 
			
		||||
    label: '装箱规格(片/箱)',
 | 
			
		||||
    minWidth: 140
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingNum',
 | 
			
		||||
    label: '箱数'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'quantity',
 | 
			
		||||
    label: '装车总量'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productDate',
 | 
			
		||||
    label: '产品批次',
 | 
			
		||||
    showOverflowtooltip: true
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'DeliveryLogDetDetail',
 | 
			
		||||
  mixins: [resize],
 | 
			
		||||
@@ -224,7 +153,6 @@ export default {
 | 
			
		||||
        pageSize: 20,
 | 
			
		||||
        logId: ''
 | 
			
		||||
      },
 | 
			
		||||
      tableProps2,
 | 
			
		||||
      tableData2: [],
 | 
			
		||||
      tableH2: this.tableHeight(275),
 | 
			
		||||
      total2: 0,
 | 
			
		||||
@@ -288,7 +216,7 @@ export default {
 | 
			
		||||
        for (let i = 0; i < this.tableData.length; i++) {
 | 
			
		||||
          let obj = {}
 | 
			
		||||
          obj.value = this.tableData[i].num
 | 
			
		||||
          obj.name = this.tableData[i].name
 | 
			
		||||
          obj.name = this.tableData[i].code
 | 
			
		||||
          seriesData.push(obj)
 | 
			
		||||
          if (i < 5) {
 | 
			
		||||
            colorList.push(color[i])
 | 
			
		||||
@@ -394,14 +322,7 @@ export default {
 | 
			
		||||
        this.total2 = res.data.total || 0
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    closeB() {
 | 
			
		||||
      this.logCode = ''
 | 
			
		||||
      this.queryParams2.pageNo = 1
 | 
			
		||||
      this.queryParams2.pageSize = 20
 | 
			
		||||
      this.queryParams2.logId = ''
 | 
			
		||||
      this.tableData2 = []
 | 
			
		||||
      this.total2 = 0
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										253
									
								
								src/views/delivery/deliveryLogDet/components/detailButton.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,253 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-08-03 14:09:18
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-10-13 16:47:25
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="tableInner">
 | 
			
		||||
      <el-button @click="viewDetDetail" type="text" style="margin: 5px 0; padding: 0" >
 | 
			
		||||
        <span class="iconfont" :class="'icon-detail' +
 | 
			
		||||
                      ' primary-color'
 | 
			
		||||
                "></span>
 | 
			
		||||
      </el-button>
 | 
			
		||||
    <el-drawer title="发货详情" size="50%" :append-to-body="true" :visible.sync="innerDrawer" @close='closeB'
 | 
			
		||||
      :show-close='false'>
 | 
			
		||||
      <div class="box3">
 | 
			
		||||
        <el-row>
 | 
			
		||||
          <el-col :span='12'>
 | 
			
		||||
            <span class="title">订单名:</span>
 | 
			
		||||
            <span class="text">{{ orderMsg.orderName ? orderMsg.orderName : '-' }}</span>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span='12'>
 | 
			
		||||
            <span class="title">发货单号:</span>
 | 
			
		||||
            <span class="text">{{ logCode ? logCode : '-' }}</span>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="box4">
 | 
			
		||||
        <div class="boxTitle">
 | 
			
		||||
          <span class="blueTitle"></span>
 | 
			
		||||
          <span>详情</span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <base-table :page="queryParams2.pageNo" :limit="queryParams2.pageSize" :table-props="tableProps2"
 | 
			
		||||
          :table-data="tableData2" :max-height="tableH2" />
 | 
			
		||||
        <pagination :page.sync="queryParams2.pageNo" :limit.sync="queryParams2.pageSize" :total="total2"
 | 
			
		||||
          @pagination="getList2" />
 | 
			
		||||
      </div>
 | 
			
		||||
    </el-drawer>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import { deliveryLogDetPage } from '@/api/base/delivery'
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
 | 
			
		||||
const tableProps2 = [
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'createTime',
 | 
			
		||||
  //   label: '添加时间',
 | 
			
		||||
  //   filter: parseTime,
 | 
			
		||||
  //   minWidth: 160
 | 
			
		||||
  // },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'deliveryCarCode',
 | 
			
		||||
    label: '装车单号',
 | 
			
		||||
    showOverflowtooltip: true
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'loadTime',
 | 
			
		||||
    label: '装车时间',
 | 
			
		||||
    filter: parseTime,
 | 
			
		||||
    minWidth: 160
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productName',
 | 
			
		||||
    label: '装车产品',
 | 
			
		||||
    showOverflowtooltip: true
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingSize',
 | 
			
		||||
    label: '装箱规格(片/箱)',
 | 
			
		||||
    minWidth: 140
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'packagingNum',
 | 
			
		||||
    label: '箱数'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'quantity',
 | 
			
		||||
    label: '装车总量'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productDate',
 | 
			
		||||
    label: '产品批次',
 | 
			
		||||
    showOverflowtooltip: true
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
export default {
 | 
			
		||||
	props: {
 | 
			
		||||
		injectData: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
			default: () => ({}),
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			list: this.injectData,
 | 
			
		||||
      visible: false,
 | 
			
		||||
      tableProps2,
 | 
			
		||||
      logCode:'',
 | 
			
		||||
      orderMsg: {},
 | 
			
		||||
      tableData2: [],
 | 
			
		||||
      tableH2: this.tableHeight(275),
 | 
			
		||||
      total2: 0,
 | 
			
		||||
      innerDrawer:false,
 | 
			
		||||
      queryParams2: {
 | 
			
		||||
        pageNo: 1,
 | 
			
		||||
        pageSize: 20,
 | 
			
		||||
        logId: ''
 | 
			
		||||
      },
 | 
			
		||||
		};
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    window.addEventListener('resize', () => {
 | 
			
		||||
      this.tableH2 = this.tableHeight(275)
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
	methods: {
 | 
			
		||||
    viewDetDetail() {
 | 
			
		||||
      console.log(this.list);
 | 
			
		||||
 | 
			
		||||
      this.logCode = this.list.code
 | 
			
		||||
      this.orderMsg.orderName = this.list.orderName
 | 
			
		||||
      this.innerDrawer = true
 | 
			
		||||
      this.queryParams2.logId = this.list.id
 | 
			
		||||
      this.getList2()
 | 
			
		||||
    },
 | 
			
		||||
    closeB() {
 | 
			
		||||
      this.logCode = ''
 | 
			
		||||
      this.queryParams2.pageNo = 1
 | 
			
		||||
      this.queryParams2.pageSize = 20
 | 
			
		||||
      this.queryParams2.logId = ''
 | 
			
		||||
      this.tableData2 = []
 | 
			
		||||
      this.total2 = 0
 | 
			
		||||
    },
 | 
			
		||||
    getList2() {
 | 
			
		||||
      deliveryLogDetPage({ ...this.queryParams2 }).then(res => {
 | 
			
		||||
        this.tableData2 = res.data.list || []
 | 
			
		||||
        this.total2 = res.data.total || 0
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style scoped lang='scss'>
 | 
			
		||||
.box1 {
 | 
			
		||||
  height: 76px;
 | 
			
		||||
  border-bottom: 1px solid #E9E9E9;
 | 
			
		||||
  margin: 0px 8px 20px 30px;
 | 
			
		||||
 | 
			
		||||
  .box_col {
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    width: 20%;
 | 
			
		||||
    padding: 8px 8px 8px 8px;
 | 
			
		||||
 | 
			
		||||
    .blodTip {
 | 
			
		||||
      height: 16px;
 | 
			
		||||
      font-size: 14px;
 | 
			
		||||
      font-weight: 600;
 | 
			
		||||
      color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
      margin-bottom: 8px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .lightTip {
 | 
			
		||||
      height: 16px;
 | 
			
		||||
      font-size: 14px;
 | 
			
		||||
      font-weight: 400;
 | 
			
		||||
      color: rgba(102, 102, 102, 0.75);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.box2 {
 | 
			
		||||
  padding: 0px 32px 30px 30px;
 | 
			
		||||
  height: calc(100vh - 150px);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.boxTitle {
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  font-size: 16px;
 | 
			
		||||
  font-weight: 400;
 | 
			
		||||
  color: #000000;
 | 
			
		||||
  margin: 0 10px 10px 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.blueTitle {
 | 
			
		||||
  content: '';
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  width: 4px;
 | 
			
		||||
  height: 18px;
 | 
			
		||||
  background-color: #0B58FF;
 | 
			
		||||
  border-radius: 1px;
 | 
			
		||||
  margin-right: 8px;
 | 
			
		||||
  vertical-align: bottom;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.box3 {
 | 
			
		||||
  padding: 8px 8px 8px 40px;
 | 
			
		||||
 | 
			
		||||
  .title {
 | 
			
		||||
    height: 16px;
 | 
			
		||||
    font-size: 14px;
 | 
			
		||||
    font-weight: 600;
 | 
			
		||||
    color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .text {
 | 
			
		||||
    height: 16px;
 | 
			
		||||
    font-size: 14px;
 | 
			
		||||
    font-weight: 400;
 | 
			
		||||
    color: rgba(102, 102, 102, 0.75);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.box4 {
 | 
			
		||||
  padding: 32px 32px 30px 30px;
 | 
			
		||||
  height: calc(100vh - 125px);
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<style lang='scss'>
 | 
			
		||||
.deliveryLogDetail {
 | 
			
		||||
  .el-tabs__nav::after {
 | 
			
		||||
    content: "";
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    left: 0;
 | 
			
		||||
    bottom: 0;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    height: 2px;
 | 
			
		||||
    background-color: #e4e7ed;
 | 
			
		||||
    /* z-index: 1; */
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__nav-wrap::after {
 | 
			
		||||
    width: 0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item {
 | 
			
		||||
    padding: 0 10px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item:hover {
 | 
			
		||||
    color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item.is-active {
 | 
			
		||||
    color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item {
 | 
			
		||||
    color: rgba(0, 0, 0, 0.45);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										153
									
								
								src/views/delivery/deliveryLogDet/components/shippingBtn.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,153 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-08-03 14:09:18
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-10-13 16:47:25
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="tableInner">
 | 
			
		||||
    <el-button @click="handleClick" type="text" style="margin: 5px 0; padding: 0">
 | 
			
		||||
      <span class="iconfont" :class="'icon-detail' +
 | 
			
		||||
                      ' primary-color'
 | 
			
		||||
                "></span>
 | 
			
		||||
    </el-button>
 | 
			
		||||
    <delivery-log-det-detail ref='deliveryLogDetail' />
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import DeliveryLogDetDetail from './deliveryLogDetDetail.vue'
 | 
			
		||||
export default {
 | 
			
		||||
	props: {
 | 
			
		||||
		injectData: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
			default: () => ({}),
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			list: this.injectData,
 | 
			
		||||
		};
 | 
			
		||||
  },
 | 
			
		||||
  components: { DeliveryLogDetDetail },
 | 
			
		||||
 | 
			
		||||
  mounted() {
 | 
			
		||||
  },
 | 
			
		||||
	methods: {
 | 
			
		||||
    handleClick() {
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.deliveryLogDetail.init(this.list)
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style scoped lang='scss'>
 | 
			
		||||
.box1 {
 | 
			
		||||
  height: 76px;
 | 
			
		||||
  border-bottom: 1px solid #E9E9E9;
 | 
			
		||||
  margin: 0px 8px 20px 30px;
 | 
			
		||||
 | 
			
		||||
  .box_col {
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    width: 20%;
 | 
			
		||||
    padding: 8px 8px 8px 8px;
 | 
			
		||||
 | 
			
		||||
    .blodTip {
 | 
			
		||||
      height: 16px;
 | 
			
		||||
      font-size: 14px;
 | 
			
		||||
      font-weight: 600;
 | 
			
		||||
      color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
      margin-bottom: 8px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .lightTip {
 | 
			
		||||
      height: 16px;
 | 
			
		||||
      font-size: 14px;
 | 
			
		||||
      font-weight: 400;
 | 
			
		||||
      color: rgba(102, 102, 102, 0.75);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.box2 {
 | 
			
		||||
  padding: 0px 32px 30px 30px;
 | 
			
		||||
  height: calc(100vh - 150px);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.boxTitle {
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  font-size: 16px;
 | 
			
		||||
  font-weight: 400;
 | 
			
		||||
  color: #000000;
 | 
			
		||||
  margin: 0 10px 10px 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.blueTitle {
 | 
			
		||||
  content: '';
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  width: 4px;
 | 
			
		||||
  height: 18px;
 | 
			
		||||
  background-color: #0B58FF;
 | 
			
		||||
  border-radius: 1px;
 | 
			
		||||
  margin-right: 8px;
 | 
			
		||||
  vertical-align: bottom;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.box3 {
 | 
			
		||||
  padding: 8px 8px 8px 40px;
 | 
			
		||||
 | 
			
		||||
  .title {
 | 
			
		||||
    height: 16px;
 | 
			
		||||
    font-size: 14px;
 | 
			
		||||
    font-weight: 600;
 | 
			
		||||
    color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .text {
 | 
			
		||||
    height: 16px;
 | 
			
		||||
    font-size: 14px;
 | 
			
		||||
    font-weight: 400;
 | 
			
		||||
    color: rgba(102, 102, 102, 0.75);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.box4 {
 | 
			
		||||
  padding: 32px 32px 30px 30px;
 | 
			
		||||
  height: calc(100vh - 125px);
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<style lang='scss'>
 | 
			
		||||
.deliveryLogDetail {
 | 
			
		||||
  .el-tabs__nav::after {
 | 
			
		||||
    content: "";
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    left: 0;
 | 
			
		||||
    bottom: 0;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    height: 2px;
 | 
			
		||||
    background-color: #e4e7ed;
 | 
			
		||||
    /* z-index: 1; */
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__nav-wrap::after {
 | 
			
		||||
    width: 0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item {
 | 
			
		||||
    padding: 0 10px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item:hover {
 | 
			
		||||
    color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item.is-active {
 | 
			
		||||
    color: rgba(0, 0, 0, 0.85);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .el-tabs__item {
 | 
			
		||||
    color: rgba(0, 0, 0, 0.45);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -14,14 +14,14 @@
 | 
			
		||||
      :table-data="list"
 | 
			
		||||
      :max-height="tableH"
 | 
			
		||||
    >
 | 
			
		||||
      <method-btn
 | 
			
		||||
      <!-- <method-btn
 | 
			
		||||
        v-if="tableBtn.length"
 | 
			
		||||
        slot="handleBtn"
 | 
			
		||||
        :width="80"
 | 
			
		||||
        label="操作"
 | 
			
		||||
        :method-list="tableBtn"
 | 
			
		||||
        @clickBtn="handleClick"
 | 
			
		||||
      />
 | 
			
		||||
      /> -->
 | 
			
		||||
    </base-table>
 | 
			
		||||
    <pagination
 | 
			
		||||
      :page.sync="queryParams.pageNo"
 | 
			
		||||
@@ -30,12 +30,13 @@
 | 
			
		||||
      @pagination="getList"
 | 
			
		||||
    />
 | 
			
		||||
    <!-- 详情抽屉 -->
 | 
			
		||||
    <delivery-log-det-detail ref='deliveryLogDetail'/>
 | 
			
		||||
    <!-- <delivery-log-det-detail ref='deliveryLogDetail'/> -->
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import { deliveryProgressPage } from '@/api/base/delivery'
 | 
			
		||||
import DeliveryLogDetDetail from './components/deliveryLogDetDetail.vue'
 | 
			
		||||
 | 
			
		||||
import shippingBtn from './components/shippingBtn.vue';
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'orderName',
 | 
			
		||||
@@ -61,7 +62,12 @@ const tableProps = [
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'rate',
 | 
			
		||||
    label: '累计发货比例(%)'
 | 
			
		||||
    label: '发货进度(%)'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'desc',
 | 
			
		||||
    label: '发货详情',
 | 
			
		||||
    subcomponent: shippingBtn,
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
export default {
 | 
			
		||||
@@ -101,7 +107,7 @@ export default {
 | 
			
		||||
      ].filter((v) => v)
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  components: { DeliveryLogDetDetail },
 | 
			
		||||
  // components: { DeliveryLogDetDetail },
 | 
			
		||||
  created() {
 | 
			
		||||
    window.addEventListener('resize', () => {
 | 
			
		||||
      this.tableH = this.tableHeight(260)
 | 
			
		||||
@@ -119,12 +125,12 @@ export default {
 | 
			
		||||
      this.queryParams.orderName = val.orderName
 | 
			
		||||
      this.getList()
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val)
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.deliveryLogDetail.init(val.data)
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
    // handleClick(val) {
 | 
			
		||||
    //   console.log(val)
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs.deliveryLogDetail.init(val.data)
 | 
			
		||||
    //   })
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@@ -0,0 +1,399 @@
 | 
			
		||||
<!--
 | 
			
		||||
    filename: AssetsUpload.vue
 | 
			
		||||
    author: liubin
 | 
			
		||||
    date: 2023-10-12 16:40:14
 | 
			
		||||
    description: 上传资料/图片 组件
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="assets-upload">
 | 
			
		||||
		<section class="operations">
 | 
			
		||||
			<el-button type="text" class="expand-btn" @click="expand = !expand">
 | 
			
		||||
				<i class="el-icon-folder-opened" v-if="expand"></i>
 | 
			
		||||
				<i class="el-icon-folder" v-else></i>
 | 
			
		||||
				展开
 | 
			
		||||
			</el-button>
 | 
			
		||||
			<!-- <div class="preview-btn">
 | 
			
		||||
				<i class="el-icon-view"></i>
 | 
			
		||||
				预览
 | 
			
		||||
			</div> -->
 | 
			
		||||
		</section>
 | 
			
		||||
		<section
 | 
			
		||||
			class="file-area"
 | 
			
		||||
			:style="{
 | 
			
		||||
				height: expand ? 'auto' : isPicMode ? '180px' : '152px',
 | 
			
		||||
				gap: isPicMode ? '0 24px' : '24px',
 | 
			
		||||
				gridAutoRows: isPicMode ? '180px' : '152px',
 | 
			
		||||
			}">
 | 
			
		||||
			<el-upload
 | 
			
		||||
				class="equipment-upload"
 | 
			
		||||
				:disabled="disabled"
 | 
			
		||||
				drag
 | 
			
		||||
				:action="uploadUrl"
 | 
			
		||||
				:headers="headers"
 | 
			
		||||
				multiple
 | 
			
		||||
				:show-file-list="false"
 | 
			
		||||
				:before-upload="beforeUpload"
 | 
			
		||||
				:on-success="handleSuccess">
 | 
			
		||||
				<i class="el-icon-upload"></i>
 | 
			
		||||
				<div class="el-upload__text">
 | 
			
		||||
					<span>将文件拖到此处或</span>
 | 
			
		||||
					<em>点击上传</em>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="el-upload__tip" slot="tip">
 | 
			
		||||
					{{
 | 
			
		||||
						isPicMode ? '仅支持上传 .jpg .png 格式文件, 且' : ''
 | 
			
		||||
					}}文件大小不超过2MB
 | 
			
		||||
				</div>
 | 
			
		||||
			</el-upload>
 | 
			
		||||
			<div
 | 
			
		||||
				v-for="(file, index) in files"
 | 
			
		||||
				:key="file.fileName"
 | 
			
		||||
				style="width: 100%">
 | 
			
		||||
				<div
 | 
			
		||||
					class="file-list__item"
 | 
			
		||||
					v-if="!isPicMode"
 | 
			
		||||
					:style="{
 | 
			
		||||
						background: isPicMode
 | 
			
		||||
							? `url(${file.fileUrl}) no-repeat`
 | 
			
		||||
							: `url(${defaultBg}) no-repeat`,
 | 
			
		||||
						backgroundSize: isPicMode ? '100% 100%' : '64px',
 | 
			
		||||
						backgroundPosition: isPicMode ? '0% 0%' : 'center',
 | 
			
		||||
					}"
 | 
			
		||||
					@click="handleDownload(file)"
 | 
			
		||||
					:data-name="file.fileName">
 | 
			
		||||
					<el-button
 | 
			
		||||
						v-if="!disabled"
 | 
			
		||||
						type="text"
 | 
			
		||||
						class="el-icon-delete"
 | 
			
		||||
						style="padding: 0"
 | 
			
		||||
						@click="(e) => handleDelete(file)" />
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<el-image
 | 
			
		||||
					v-else
 | 
			
		||||
					class="file-list__item"
 | 
			
		||||
					style="width: 100%"
 | 
			
		||||
					:src="file.fileUrl"
 | 
			
		||||
					:preview-src-list="files.map((item) => item.fileUrl)"></el-image>
 | 
			
		||||
			</div>
 | 
			
		||||
		</section>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { getAccessToken } from '@/utils/auth';
 | 
			
		||||
import defaultBg from '@/assets/images/default-file-icon.png';
 | 
			
		||||
 | 
			
		||||
function checkSize(file, message) {
 | 
			
		||||
	const isLt2M = file.size / 1024 / 1024 < 2;
 | 
			
		||||
	if (!isLt2M) {
 | 
			
		||||
		message.error('上传文件大小不能超过 2MB!');
 | 
			
		||||
	}
 | 
			
		||||
	return isLt2M;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function checkPic(file, message) {
 | 
			
		||||
	const isJPG = file.type === 'image/jpeg';
 | 
			
		||||
	const isPNG = file.type === 'image/png';
 | 
			
		||||
	const isPic = isJPG || isPNG;
 | 
			
		||||
	if (!isPic) {
 | 
			
		||||
		message.error('上传图片只能是 JPG/PNG 格式!');
 | 
			
		||||
	}
 | 
			
		||||
	return isPic;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'AssetsUpload',
 | 
			
		||||
	components: {},
 | 
			
		||||
	model: {
 | 
			
		||||
		prop: 'dataSource',
 | 
			
		||||
		event: 'update',
 | 
			
		||||
	},
 | 
			
		||||
	props: {
 | 
			
		||||
		type: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: 'image',
 | 
			
		||||
		},
 | 
			
		||||
		dataSource: {
 | 
			
		||||
			type: Array,
 | 
			
		||||
			default: () => [],
 | 
			
		||||
		},
 | 
			
		||||
		equipmentId: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: '',
 | 
			
		||||
		},
 | 
			
		||||
		isPicMode: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
			default: false,
 | 
			
		||||
		},
 | 
			
		||||
		disabled: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
			default: false,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	emits: ['update-filelist'],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			defaultBg,
 | 
			
		||||
			expand: false,
 | 
			
		||||
			headers: { Authorization: 'Bearer ' + getAccessToken() }, // 设置上传的请求头部
 | 
			
		||||
			fileList: [],
 | 
			
		||||
			uploadUrl: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload',
 | 
			
		||||
			files: [],
 | 
			
		||||
			updateTimer: null,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		dataSource: {
 | 
			
		||||
			handler(val) {
 | 
			
		||||
				this.files = JSON.parse(JSON.stringify(val));
 | 
			
		||||
			},
 | 
			
		||||
			immediate: true,
 | 
			
		||||
			deep: true,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// handle success, per file!
 | 
			
		||||
		handleSuccess(response, file, fileList) {
 | 
			
		||||
			this.$notify({
 | 
			
		||||
				title: '成功',
 | 
			
		||||
				message: '上传成功! 点击确认保存上传结果',
 | 
			
		||||
				type: 'success',
 | 
			
		||||
			});
 | 
			
		||||
			if (
 | 
			
		||||
				response == null ||
 | 
			
		||||
				!('data' in response) ||
 | 
			
		||||
				response.data == null ||
 | 
			
		||||
				response.data.trim() == ''
 | 
			
		||||
			) {
 | 
			
		||||
				this.$message.error('上传出错了!');
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			this.files.push({
 | 
			
		||||
				fileName: file.name,
 | 
			
		||||
				fileUrl: response.data,
 | 
			
		||||
				fileType: this.isPicMode ? 1 : 2,
 | 
			
		||||
			});
 | 
			
		||||
			// debugger;
 | 
			
		||||
 | 
			
		||||
			// 延时更新
 | 
			
		||||
			if (this.updateTimer) {
 | 
			
		||||
				clearTimeout(this.updateTimer);
 | 
			
		||||
			}
 | 
			
		||||
			this.updateTimer = setTimeout(() => {
 | 
			
		||||
				// console.log('[AssetsUpload] 更新上传列表');
 | 
			
		||||
				this.emitFilelist();
 | 
			
		||||
				clearTimeout(this.updateTimer);
 | 
			
		||||
				this.updateTimer = null;
 | 
			
		||||
			}, 500);
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		async handleDownload(file) {
 | 
			
		||||
			if (this.isPicMode) {
 | 
			
		||||
				// this.$emit('preview', file);
 | 
			
		||||
				const link = document.createElement('a');
 | 
			
		||||
				link.href = file.fileUrl;
 | 
			
		||||
				link.target = '_blank';
 | 
			
		||||
				document.body.appendChild(link);
 | 
			
		||||
				link.click();
 | 
			
		||||
				document.body.removeChild(link);
 | 
			
		||||
			} else {
 | 
			
		||||
				// this.$emit('download', file);
 | 
			
		||||
				const data = await this.$axios({
 | 
			
		||||
					url: file.fileUrl,
 | 
			
		||||
					method: 'get',
 | 
			
		||||
					responseType: 'blob',
 | 
			
		||||
				});
 | 
			
		||||
				const link = document.createElement('a');
 | 
			
		||||
				link.href = window.URL.createObjectURL(new Blob([data]));
 | 
			
		||||
				link.download = file.fileName;
 | 
			
		||||
				document.body.appendChild(link);
 | 
			
		||||
				link.click();
 | 
			
		||||
				document.body.removeChild(link);
 | 
			
		||||
				window.URL.revokeObjectURL(link.href);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		emitFilelist() {
 | 
			
		||||
			this.$emit('update', this.files);
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleRemove(file, fileList) {
 | 
			
		||||
			debugger;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleDelete(file) {
 | 
			
		||||
			// fileName fileType 都可能一样,但 fileUrl 一定不一样
 | 
			
		||||
			this.files = this.files.filter((item) => item.fileUrl != file.fileUrl);
 | 
			
		||||
			this.$notify({
 | 
			
		||||
				title: '成功',
 | 
			
		||||
				message: '删除成功! 需点击确认保存删除结果',
 | 
			
		||||
				type: 'success',
 | 
			
		||||
			});
 | 
			
		||||
			this.emitFilelist();
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		beforeUpload(file) {
 | 
			
		||||
			if (this.isPicMode) {
 | 
			
		||||
				return checkPic(file, this.$message) && checkSize(file, this.$message);
 | 
			
		||||
			}
 | 
			
		||||
			return checkSize(file, this.$message);
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleUpload() {
 | 
			
		||||
			switch (this.type) {
 | 
			
		||||
				case 'image':
 | 
			
		||||
					break;
 | 
			
		||||
				case 'asset':
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		updateFileList(appendFilelist) {
 | 
			
		||||
			// Array
 | 
			
		||||
			this.$emit('update-filelist', this.appendFilelist);
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.assets-upload {
 | 
			
		||||
	position: relative;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.operations {
 | 
			
		||||
	position: absolute;
 | 
			
		||||
	top: -36px;
 | 
			
		||||
	right: 0;
 | 
			
		||||
	display: flex;
 | 
			
		||||
	align-items: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.expand-btn,
 | 
			
		||||
.preview-btn {
 | 
			
		||||
	font-size: 14px;
 | 
			
		||||
	line-height: 1.2;
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	padding-left: 20px;
 | 
			
		||||
	cursor: pointer;
 | 
			
		||||
	z-index: 1000;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.expand-btn {
 | 
			
		||||
	margin-right: 12px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.preview-btn {
 | 
			
		||||
	color: #ccc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.expand-btn,
 | 
			
		||||
.preview-btn:hover,
 | 
			
		||||
.preview-btn.active {
 | 
			
		||||
	// color: #0042d0;
 | 
			
		||||
	color: #0b58ff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
:deep(.equipment-upload) {
 | 
			
		||||
	.el-upload-dragger {
 | 
			
		||||
		width: 188px;
 | 
			
		||||
		height: 128px;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.el-icon-upload {
 | 
			
		||||
		margin: 12px 0;
 | 
			
		||||
		font-size: 48px;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.el-upload__text {
 | 
			
		||||
		font-size: 12px;
 | 
			
		||||
		line-height: 2px;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		flex-direction: column;
 | 
			
		||||
 | 
			
		||||
		em {
 | 
			
		||||
			margin-top: 12px;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.el-upload__tip {
 | 
			
		||||
		font-size: 12px;
 | 
			
		||||
		line-height: 1.5;
 | 
			
		||||
		color: #d1d1d1;
 | 
			
		||||
		margin: 0 0 12px;
 | 
			
		||||
		transform: translateY(-12px);
 | 
			
		||||
		user-select: none;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.equipment-upload {
 | 
			
		||||
	margin-bottom: 24px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.file-list {
 | 
			
		||||
	padding: 12px;
 | 
			
		||||
	border: 1px solid #ccc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// custom
 | 
			
		||||
.file-area {
 | 
			
		||||
	display: grid;
 | 
			
		||||
	grid-template-columns: repeat(auto-fill, 188px);
 | 
			
		||||
	grid-auto-rows: 152px;
 | 
			
		||||
	gap: 48px 24px;
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.file-list__item {
 | 
			
		||||
	height: 128px;
 | 
			
		||||
	background-color: #fff;
 | 
			
		||||
	border: 1px dashed #d9d9d9;
 | 
			
		||||
	border-radius: 6px;
 | 
			
		||||
	-webkit-box-sizing: border-box;
 | 
			
		||||
	box-sizing: border-box;
 | 
			
		||||
	text-align: center;
 | 
			
		||||
	cursor: pointer;
 | 
			
		||||
	position: relative;
 | 
			
		||||
	// overflow: hidden;
 | 
			
		||||
 | 
			
		||||
	&:hover {
 | 
			
		||||
		.el-icon-delete {
 | 
			
		||||
			display: block;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.el-icon-delete {
 | 
			
		||||
		color: #ccc;
 | 
			
		||||
		position: absolute;
 | 
			
		||||
		top: 8px;
 | 
			
		||||
		right: 8px;
 | 
			
		||||
		display: none;
 | 
			
		||||
 | 
			
		||||
		&:hover {
 | 
			
		||||
			color: rgb(210, 41, 41);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.file-list__item:hover {
 | 
			
		||||
	border-color: #0b58ff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.file-list__item::after {
 | 
			
		||||
	content: attr(data-name);
 | 
			
		||||
	position: absolute;
 | 
			
		||||
	left: 0;
 | 
			
		||||
	bottom: -26px;
 | 
			
		||||
	font-size: 14px;
 | 
			
		||||
	line-height: 2;
 | 
			
		||||
	color: #616161;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.default-icon {
 | 
			
		||||
	background: url(../../../../../assets/images/default-file-icon.png) no-repeat;
 | 
			
		||||
	background-position: center;
 | 
			
		||||
	background-size: 64px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										313
									
								
								src/views/devConfig/base/coreEquipment/components/DialogForm.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,313 @@
 | 
			
		||||
<!-- 
 | 
			
		||||
    filename: dialogForm.vue
 | 
			
		||||
    author: liubin
 | 
			
		||||
    date: 2023-08-15 10:32:36
 | 
			
		||||
    description: 弹窗的表单组件
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<el-form
 | 
			
		||||
		ref="form"
 | 
			
		||||
		:model="form"
 | 
			
		||||
		:label-width="`${labelWidth}px`"
 | 
			
		||||
		:size="size"
 | 
			
		||||
		:label-position="labelPosition"
 | 
			
		||||
		v-loading="formLoading">
 | 
			
		||||
		<el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
 | 
			
		||||
			<el-col v-for="col in row" :key="col.label" :span="24 / row.length">
 | 
			
		||||
				<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-if="col.input"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						:placeholder="`请输入${col.label}`"
 | 
			
		||||
						v-bind="col.bind" />
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-if="col.textarea"
 | 
			
		||||
						type="textarea"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						:placeholder="`请输入${col.label}`"
 | 
			
		||||
						v-bind="col.bind" />
 | 
			
		||||
					<el-select
 | 
			
		||||
						v-if="col.select"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						:placeholder="`请选择${col.label}`"
 | 
			
		||||
						@change="$emit('update', form)"
 | 
			
		||||
						v-bind="col.bind">
 | 
			
		||||
						<el-option
 | 
			
		||||
							v-for="opt in optionListOf[col.prop]"
 | 
			
		||||
							:key="opt.value"
 | 
			
		||||
							:label="opt.label"
 | 
			
		||||
							:value="opt.value" />
 | 
			
		||||
					</el-select>
 | 
			
		||||
					<el-date-picker
 | 
			
		||||
						v-if="col.datetime"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						type="datetime"
 | 
			
		||||
						:placeholder="`请选择${col.label}`"
 | 
			
		||||
						value-format="timestamp"
 | 
			
		||||
						v-bind="col.bind"></el-date-picker>
 | 
			
		||||
					<el-upload
 | 
			
		||||
						class="upload-in-dialog"
 | 
			
		||||
						v-if="col.upload"
 | 
			
		||||
						:file-list="uploadedFileList"
 | 
			
		||||
						:action="col.url"
 | 
			
		||||
						:on-success="handleUploadSuccess"
 | 
			
		||||
						v-bind="col.bind">
 | 
			
		||||
						<el-button
 | 
			
		||||
							size="small"
 | 
			
		||||
							type="primary"
 | 
			
		||||
							:disabled="col.bind?.disabled || false">
 | 
			
		||||
							点击上传
 | 
			
		||||
						</el-button>
 | 
			
		||||
						<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
 | 
			
		||||
							{{ col.uploadTips || '只能上传jpg/png文件,大小不超过2MB' }}
 | 
			
		||||
						</div>
 | 
			
		||||
					</el-upload>
 | 
			
		||||
					<el-switch
 | 
			
		||||
						v-if="col.switch"
 | 
			
		||||
						v-model="form[col.prop]"
 | 
			
		||||
						active-color="#0b58ff"
 | 
			
		||||
						inactive-color="#e1e1e1"
 | 
			
		||||
						v-bind="col.bind"></el-switch>
 | 
			
		||||
					<component
 | 
			
		||||
						v-if="col.subcomponent"
 | 
			
		||||
						:key="col.key"
 | 
			
		||||
						:is="col.subcomponent"
 | 
			
		||||
						v-bind="col.bind"
 | 
			
		||||
						:inlineStyle="col.style"></component>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
	</el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
/**
 | 
			
		||||
 * 找到最长的label
 | 
			
		||||
 * @param {*} options
 | 
			
		||||
 */
 | 
			
		||||
function findMaxLabelWidth(rows) {
 | 
			
		||||
	let max = 0;
 | 
			
		||||
	rows.forEach((row) => {
 | 
			
		||||
		row.forEach((opt) => {
 | 
			
		||||
			// debugger;
 | 
			
		||||
			if (!opt.label) return 0;
 | 
			
		||||
			if (opt.label.length > max) {
 | 
			
		||||
				max = opt.label.length;
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	});
 | 
			
		||||
	return max;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'DialogForm',
 | 
			
		||||
	model: {
 | 
			
		||||
		prop: 'dataForm',
 | 
			
		||||
		event: 'update',
 | 
			
		||||
	},
 | 
			
		||||
	emits: ['update'],
 | 
			
		||||
	components: {},
 | 
			
		||||
	props: {
 | 
			
		||||
		rows: {
 | 
			
		||||
			type: Array,
 | 
			
		||||
			default: () => [],
 | 
			
		||||
		},
 | 
			
		||||
		dataForm: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
			default: () => ({}),
 | 
			
		||||
		},
 | 
			
		||||
		disabled: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
			default: false,
 | 
			
		||||
		},
 | 
			
		||||
		labelPosition: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: 'right',
 | 
			
		||||
		},
 | 
			
		||||
		size: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			default: '',
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			formLoading: true,
 | 
			
		||||
			optionListOf: {},
 | 
			
		||||
			uploadedFileList: [],
 | 
			
		||||
			dataLoaded: false,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		labelWidth() {
 | 
			
		||||
			let max = findMaxLabelWidth(this.rows);
 | 
			
		||||
			// 每个汉字占20px
 | 
			
		||||
			return max * 20;
 | 
			
		||||
			// return max * 20 + 'px';
 | 
			
		||||
		},
 | 
			
		||||
		form: {
 | 
			
		||||
			get() {
 | 
			
		||||
				// if (this.dataLoaded) return this.dataForm;
 | 
			
		||||
				// else return {}
 | 
			
		||||
				return this.dataForm;
 | 
			
		||||
			},
 | 
			
		||||
			set(val) {
 | 
			
		||||
				console.log('set form', val);
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		rows: {
 | 
			
		||||
			handler() {
 | 
			
		||||
				console.log('watch triggered!');
 | 
			
		||||
				this.$nextTick(() => {
 | 
			
		||||
					this.handleOptions('watch');
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			deep: true,
 | 
			
		||||
			immediate: false,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		// 处理 options
 | 
			
		||||
		this.handleOptions();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		/** 模拟透传 ref  */
 | 
			
		||||
		validate(cb) {
 | 
			
		||||
			return this.$refs.form.validate(cb);
 | 
			
		||||
		},
 | 
			
		||||
		resetFields(args) {
 | 
			
		||||
			return this.$refs.form.resetFields(args);
 | 
			
		||||
		},
 | 
			
		||||
		// getCode
 | 
			
		||||
		async getCode(url) {
 | 
			
		||||
			const response = await this.$axios(url);
 | 
			
		||||
			return response.data;
 | 
			
		||||
		},
 | 
			
		||||
		async handleOptions(trigger = 'monuted') {
 | 
			
		||||
			console.log('[dialogForm:handleOptions]');
 | 
			
		||||
			const promiseList = [];
 | 
			
		||||
			this.rows.forEach((cols) => {
 | 
			
		||||
				cols.forEach((opt) => {
 | 
			
		||||
					if (opt.value && !this.form[opt.prop]) {
 | 
			
		||||
						// 默认值
 | 
			
		||||
						this.form[opt.prop] = opt.value;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					if (opt.options) {
 | 
			
		||||
						this.$set(this.optionListOf, opt.prop, opt.options);
 | 
			
		||||
					} else if (opt.url) {
 | 
			
		||||
						// 如果有 depends,则暂时先不获取,注册一个watcher
 | 
			
		||||
						if (opt.depends) {
 | 
			
		||||
							console.log('[handleOptions] setting watch');
 | 
			
		||||
							this.$watch(
 | 
			
		||||
								() => this.form[opt.depends],
 | 
			
		||||
								(id) => {
 | 
			
		||||
									console.log('<', opt.depends, '>', 'changed', id);
 | 
			
		||||
									if (id == null) return;
 | 
			
		||||
									// 清空原有选项
 | 
			
		||||
									this.form[opt.prop] = null;
 | 
			
		||||
									// 获取新的选项
 | 
			
		||||
									this.$axios({
 | 
			
		||||
										url: `${opt.url}?id=${id}`,
 | 
			
		||||
									}).then((res) => {
 | 
			
		||||
										this.$set(
 | 
			
		||||
											this.optionListOf,
 | 
			
		||||
											opt.prop,
 | 
			
		||||
											res.data.map((item) => ({
 | 
			
		||||
												label: item[opt.labelKey ?? 'name'],
 | 
			
		||||
												value: item[opt.valueKey ?? 'id'],
 | 
			
		||||
											}))
 | 
			
		||||
										);
 | 
			
		||||
									});
 | 
			
		||||
								},
 | 
			
		||||
								{
 | 
			
		||||
									immediate: true,
 | 
			
		||||
								}
 | 
			
		||||
							);
 | 
			
		||||
							return;
 | 
			
		||||
						}
 | 
			
		||||
						// 如果是下拉框,或者新增模式下的输入框,才去请求
 | 
			
		||||
						if (opt.select || (opt.input && !this.form?.id)) {
 | 
			
		||||
							promiseList.push(async () => {
 | 
			
		||||
								const response = await this.$axios(opt.url, {
 | 
			
		||||
									method: opt.method ?? 'get',
 | 
			
		||||
								});
 | 
			
		||||
								console.log('[dialogForm:handleOptions:response]', response);
 | 
			
		||||
								if (opt.select) {
 | 
			
		||||
									// 处理下拉框选项
 | 
			
		||||
									const list =
 | 
			
		||||
										'list' in response.data
 | 
			
		||||
											? response.data.list
 | 
			
		||||
											: response.data;
 | 
			
		||||
									this.$set(
 | 
			
		||||
										this.optionListOf,
 | 
			
		||||
										opt.prop,
 | 
			
		||||
										list.map((item) => ({
 | 
			
		||||
											label: item[opt.labelKey ?? 'name'],
 | 
			
		||||
											value: item[opt.valueKey ?? 'id'],
 | 
			
		||||
										}))
 | 
			
		||||
									);
 | 
			
		||||
								} else if (opt.input) {
 | 
			
		||||
									console.log('setting code: ', response.data);
 | 
			
		||||
									// 处理输入框数据
 | 
			
		||||
									this.form[opt.prop] = response.data;
 | 
			
		||||
								}
 | 
			
		||||
							});
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			console.log('[dialogForm:handleOptions] done!');
 | 
			
		||||
 | 
			
		||||
			// 如果是 watch 触发的,不需要执行进一步的请求
 | 
			
		||||
			if (trigger == 'watch') {
 | 
			
		||||
				this.formLoading = false;
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			try {
 | 
			
		||||
				await Promise.all(promiseList.map((fn) => fn()));
 | 
			
		||||
				this.formLoading = false;
 | 
			
		||||
				this.dataLoaded = true;
 | 
			
		||||
				// console.log("[dialogForm:handleOptions:optionListOf]", this.optionListOf)
 | 
			
		||||
			} catch (error) {
 | 
			
		||||
				console.log('[dialogForm:handleOptions:error]', error);
 | 
			
		||||
				this.formLoading = false;
 | 
			
		||||
			}
 | 
			
		||||
			if (!promiseList.length) this.formLoading = false;
 | 
			
		||||
		},
 | 
			
		||||
		// 上传成功的特殊处理
 | 
			
		||||
		beforeUpload() {},
 | 
			
		||||
		// 上传前的验证规则可通过 bind 属性传入
 | 
			
		||||
		handleUploadSuccess(response, file, fileList) {
 | 
			
		||||
			console.log(
 | 
			
		||||
				'[dialogForm:handleUploadSuccess]',
 | 
			
		||||
				response,
 | 
			
		||||
				file,
 | 
			
		||||
				fileList,
 | 
			
		||||
				this.form
 | 
			
		||||
			);
 | 
			
		||||
			// 保存原始文件名
 | 
			
		||||
			if ('fileNames' in this.form) this.form.fileNames.push(file.name);
 | 
			
		||||
			// 保存完整地址
 | 
			
		||||
			if ('fileUrls' in this.form) this.form.fileUrls.push(response.data);
 | 
			
		||||
			this.$modal.msgSuccess('上传成功');
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		getFileName(fileUrl) {
 | 
			
		||||
			return fileUrl.split('/').pop();
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.el-date-editor,
 | 
			
		||||
.el-select {
 | 
			
		||||
	width: 100%;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -0,0 +1,550 @@
 | 
			
		||||
<!-- 
 | 
			
		||||
    filename: EquipmentDrawer.vue
 | 
			
		||||
    author: liubin
 | 
			
		||||
    date: 2023-08-22 14:38:56
 | 
			
		||||
    description: 
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<el-drawer
 | 
			
		||||
		:visible="visible"
 | 
			
		||||
		:show-close="false"
 | 
			
		||||
		:wrapper-closable="false"
 | 
			
		||||
		class="drawer"
 | 
			
		||||
		custom-class="mes-drawer"
 | 
			
		||||
		size="60%"
 | 
			
		||||
		@closed="$emit('destroy')">
 | 
			
		||||
		<SmallTitle slot="title">
 | 
			
		||||
			{{
 | 
			
		||||
				mode.includes('detail')
 | 
			
		||||
					? '详情'
 | 
			
		||||
					: mode.includes('edit')
 | 
			
		||||
					? '编辑'
 | 
			
		||||
					: '新增'
 | 
			
		||||
			}}
 | 
			
		||||
		</SmallTitle>
 | 
			
		||||
 | 
			
		||||
		<div class="drawer-body flex">
 | 
			
		||||
			<div class="drawer-body__content">
 | 
			
		||||
				<section v-for="(section, index) in sections" :key="section.key">
 | 
			
		||||
					<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
 | 
			
		||||
 | 
			
		||||
					<div
 | 
			
		||||
						class="form-part"
 | 
			
		||||
						v-if="section.key == 'base'"
 | 
			
		||||
						style="margin-bottom: 32px">
 | 
			
		||||
						<el-skeleton v-if="!showForm" animated />
 | 
			
		||||
						<EquipmentInfoForm
 | 
			
		||||
							key="drawer-dialog-form"
 | 
			
		||||
							v-if="showForm"
 | 
			
		||||
							:disabled="mode.includes('detail')"
 | 
			
		||||
							:sync-filelist="syncFileListFlag"
 | 
			
		||||
							v-model="form" />
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div
 | 
			
		||||
						v-if="section.key == 'attrs'"
 | 
			
		||||
						style="margin-top: 12px; position: relative">
 | 
			
		||||
						<div
 | 
			
		||||
							v-if="!mode.includes('detail')"
 | 
			
		||||
							style="position: absolute; top: -40px; right: 0">
 | 
			
		||||
							<el-button @click="handleAddAttr" type="text">
 | 
			
		||||
								<i class="el-icon-plus"></i>
 | 
			
		||||
								添加属性
 | 
			
		||||
							</el-button>
 | 
			
		||||
						</div>
 | 
			
		||||
						<base-table
 | 
			
		||||
							v-loading="attrListLoading"
 | 
			
		||||
							:table-props="section.props"
 | 
			
		||||
							:page="attrQuery?.params.pageNo || 1"
 | 
			
		||||
							:limit="attrQuery?.params.pageSize || 10"
 | 
			
		||||
							:table-data="list"
 | 
			
		||||
							@emitFun="handleEmitFun">
 | 
			
		||||
							<!-- :add-button-show="mode.includes('detail') ? null : '添加属性'"
 | 
			
		||||
							@emitButtonClick="handleAddAttr" -->
 | 
			
		||||
							<method-btn
 | 
			
		||||
								v-if="section.tableBtn"
 | 
			
		||||
								slot="handleBtn"
 | 
			
		||||
								label="操作"
 | 
			
		||||
								:method-list="tableBtn"
 | 
			
		||||
								@clickBtn="handleTableBtnClick" />
 | 
			
		||||
						</base-table>
 | 
			
		||||
 | 
			
		||||
						<!-- 分页组件 -->
 | 
			
		||||
						<pagination
 | 
			
		||||
							v-show="total > 0"
 | 
			
		||||
							:total="total"
 | 
			
		||||
							:page.sync="attrQuery.params.pageNo"
 | 
			
		||||
							:limit.sync="attrQuery.params.pageSize"
 | 
			
		||||
							@pagination="getAttrList" />
 | 
			
		||||
					</div>
 | 
			
		||||
				</section>
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
			<div class="drawer-body__footer">
 | 
			
		||||
				<el-button style="" @click="handleCancel">取消</el-button>
 | 
			
		||||
				<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
 | 
			
		||||
					编辑
 | 
			
		||||
				</el-button>
 | 
			
		||||
				<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
 | 
			
		||||
				<!-- sections的第二项必须是 属性列表  -->
 | 
			
		||||
				<!-- <el-button
 | 
			
		||||
						v-if="sections[1].allowAdd"
 | 
			
		||||
						type="primary"
 | 
			
		||||
						@click="handleAddAttr">
 | 
			
		||||
						添加属性
 | 
			
		||||
					</el-button> -->
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		<!-- 属性对话框 -->
 | 
			
		||||
		<base-dialog
 | 
			
		||||
			v-if="sections[1].allowAdd"
 | 
			
		||||
			:dialogTitle="attrTitle"
 | 
			
		||||
			:dialogVisible="attrFormVisible"
 | 
			
		||||
			width="35%"
 | 
			
		||||
			:append-to-body="true"
 | 
			
		||||
			custom-class="baseDialog"
 | 
			
		||||
			@close="closeAttrForm"
 | 
			
		||||
			@cancel="closeAttrForm"
 | 
			
		||||
			@confirm="submitAttrForm">
 | 
			
		||||
			<DialogForm
 | 
			
		||||
				v-if="attrFormVisible"
 | 
			
		||||
				ref="attrForm"
 | 
			
		||||
				:dataForm="attrForm"
 | 
			
		||||
				:rows="attrRows" />
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</el-drawer>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import DialogForm from './DialogForm';
 | 
			
		||||
import EquipmentInfoForm from './EquipmentInfoForm.vue';
 | 
			
		||||
 | 
			
		||||
const SmallTitle = {
 | 
			
		||||
	name: 'SmallTitle',
 | 
			
		||||
	props: ['size'],
 | 
			
		||||
	components: {},
 | 
			
		||||
	data() {
 | 
			
		||||
		return {};
 | 
			
		||||
	},
 | 
			
		||||
	methods: {},
 | 
			
		||||
	render: function (h) {
 | 
			
		||||
		return h(
 | 
			
		||||
			'span',
 | 
			
		||||
			{
 | 
			
		||||
				class: 'small-title',
 | 
			
		||||
				style: {
 | 
			
		||||
					fontSize: '18px',
 | 
			
		||||
					lineHeight:
 | 
			
		||||
						this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
 | 
			
		||||
					fontWeight: 500,
 | 
			
		||||
					fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
			this.$slots.default
 | 
			
		||||
		);
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	components: { SmallTitle, DialogForm, EquipmentInfoForm },
 | 
			
		||||
	props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			visible: false,
 | 
			
		||||
			showForm: false,
 | 
			
		||||
			btnLoading: false,
 | 
			
		||||
			total: 0,
 | 
			
		||||
			form: {},
 | 
			
		||||
			list: [],
 | 
			
		||||
			attrTitle: '',
 | 
			
		||||
			attrForm: {
 | 
			
		||||
				id: null,
 | 
			
		||||
				equipmentId: null,
 | 
			
		||||
				name: '',
 | 
			
		||||
				value: '',
 | 
			
		||||
			},
 | 
			
		||||
			attrFormVisible: false,
 | 
			
		||||
			attrRows: [
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '属性名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '属性名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '属性值',
 | 
			
		||||
						prop: 'value',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			],
 | 
			
		||||
			attrQuery: {
 | 
			
		||||
				params: {
 | 
			
		||||
					pageNo: 1,
 | 
			
		||||
					pageSize: 10,
 | 
			
		||||
				},
 | 
			
		||||
			}, // 属性列表的请求
 | 
			
		||||
			infoQuery: null, // 基本信息的请求
 | 
			
		||||
			attrFormSubmitting: false,
 | 
			
		||||
			attrListLoading: false,
 | 
			
		||||
			syncFileListFlag: null,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		formRows() {
 | 
			
		||||
			return this.sections[0].rows.map((row) => {
 | 
			
		||||
				return row.map((col) => {
 | 
			
		||||
					if (col.key == 'eq-pics') {
 | 
			
		||||
						// 重置图片的位置
 | 
			
		||||
						return {
 | 
			
		||||
							...col,
 | 
			
		||||
							bind: {
 | 
			
		||||
								...col.bind,
 | 
			
		||||
							},
 | 
			
		||||
							style: {
 | 
			
		||||
								left: 0,
 | 
			
		||||
								right: 'unset',
 | 
			
		||||
							},
 | 
			
		||||
						};
 | 
			
		||||
					}
 | 
			
		||||
					return {
 | 
			
		||||
						...col,
 | 
			
		||||
						bind: {
 | 
			
		||||
							...col.bind,
 | 
			
		||||
							// 详情 模式下,禁用各种输入
 | 
			
		||||
							disabled: this.mode == 'detail',
 | 
			
		||||
						},
 | 
			
		||||
					};
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		tableBtn() {
 | 
			
		||||
			return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		for (const section of this.sections) {
 | 
			
		||||
			// 请求具体信息
 | 
			
		||||
			if ('url' in section) {
 | 
			
		||||
				const query = {
 | 
			
		||||
					url: section.url,
 | 
			
		||||
					method: section.method || 'get',
 | 
			
		||||
					params: section.queryParams || null,
 | 
			
		||||
					data: section.data || null,
 | 
			
		||||
				};
 | 
			
		||||
				this.$axios(query).then(({ data }) => {
 | 
			
		||||
					if (section.key == 'base') {
 | 
			
		||||
						this.form = data;
 | 
			
		||||
						// this.form = {
 | 
			
		||||
						// 	code: 'gj',
 | 
			
		||||
						// 	name: '下片机',
 | 
			
		||||
						// 	enName: 'unload',
 | 
			
		||||
						// 	abbr: '',
 | 
			
		||||
						// 	equipmentTypeId: 21084,
 | 
			
		||||
						// 	remark: '备注',
 | 
			
		||||
						// 	id: '1712367395052384257',
 | 
			
		||||
						// 	createTime: 1697095176000,
 | 
			
		||||
						// 	enterTime: 0,
 | 
			
		||||
						// 	productionTime: 0,
 | 
			
		||||
						// 	files: [
 | 
			
		||||
						// 		{
 | 
			
		||||
						// 			fileName: '测试.xlsx',
 | 
			
		||||
						// 			fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0108%2F0f0c6f30j00r5cle9000sc000hs00gtc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
 | 
			
		||||
						// 			fileType: 1
 | 
			
		||||
						// 		},
 | 
			
		||||
						// 		{
 | 
			
		||||
						// 			fileName: '测试2.xlsx',
 | 
			
		||||
						// 			fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0415%2F2cd23619j00racb96000kc000hs00hsc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
 | 
			
		||||
						// 			fileType: 1
 | 
			
		||||
						// 		},
 | 
			
		||||
						// 		{
 | 
			
		||||
						// 			fileName: '测试3.xlsx',
 | 
			
		||||
						// 			fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1fea91a0-d088-409e-b145-e0e61254b28b%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=2e0fe7d1de7f54adff3007efe133d67c',
 | 
			
		||||
						// 			fileType: 1
 | 
			
		||||
						// 		},
 | 
			
		||||
						// 		{
 | 
			
		||||
						// 			fileName: '测试4.xlsx',
 | 
			
		||||
						// 			fileUrl: 'https://pics5.baidu.com/feed/b7003af33a87e950cdfb4b4546eed044faf2b40d.jpeg?token=1d7484cfe4b014dd201f8c8725cab945',
 | 
			
		||||
						// 			fileType: 2
 | 
			
		||||
						// 		},
 | 
			
		||||
						// 		{
 | 
			
		||||
						// 			fileName: '测试5.xlsx',
 | 
			
		||||
						// 			fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fe3500876-9c46-4b70-8d37-4799520cdd13%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=4abc1df930e62730e5361a7d3765e0f2',
 | 
			
		||||
						// 			fileType: 2
 | 
			
		||||
						// 		},
 | 
			
		||||
						// 	],
 | 
			
		||||
						// 	tvalue: 0,
 | 
			
		||||
						// 	processingTime: 0,
 | 
			
		||||
						// 	manufacturer: '',
 | 
			
		||||
						// 	spec: '',
 | 
			
		||||
						// 	description: '描述',
 | 
			
		||||
						// };
 | 
			
		||||
						this.showForm = true;
 | 
			
		||||
						this.infoQuery = query;
 | 
			
		||||
					} else if (section.key == 'attrs') {
 | 
			
		||||
						this.attrQuery = query;
 | 
			
		||||
						this.list = data.list;
 | 
			
		||||
						this.total = data.total;
 | 
			
		||||
					}
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		handleTableBtnClick({ type, data }) {
 | 
			
		||||
			switch (type) {
 | 
			
		||||
				case 'edit':
 | 
			
		||||
					this.handleEditAttr(data.id);
 | 
			
		||||
					break;
 | 
			
		||||
				case 'delete':
 | 
			
		||||
					this.handleDeleteAttr(data.id);
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		async handleConfirm() {
 | 
			
		||||
			this.btnLoading = true;
 | 
			
		||||
			this.syncFileListFlag = Math.random();
 | 
			
		||||
 | 
			
		||||
			this.$nextTick(async () => {
 | 
			
		||||
				const { code, data } = await this.$axios({
 | 
			
		||||
					url: this.sections[0].urlUpdate,
 | 
			
		||||
					method: 'put',
 | 
			
		||||
					data: this.form,
 | 
			
		||||
				});
 | 
			
		||||
				if (code == 0) {
 | 
			
		||||
					this.$modal.msgSuccess('更新成功');
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				this.btnLoading = false;
 | 
			
		||||
				this.handleCancel();
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleEmitFun(val) {
 | 
			
		||||
			console.log('handleEmitFun', val);
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		init() {
 | 
			
		||||
			this.visible = true;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		async getAttrList() {
 | 
			
		||||
			this.attrListLoading = true;
 | 
			
		||||
			const res = await this.$axios(this.attrQuery);
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.list = res.data.list;
 | 
			
		||||
				this.total = res.data.total;
 | 
			
		||||
			}
 | 
			
		||||
			this.attrListLoading = false;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 保存表单
 | 
			
		||||
		handleSave() {
 | 
			
		||||
			this.$refs['form'][0].validate(async (valid) => {
 | 
			
		||||
				if (valid) {
 | 
			
		||||
					const isEdit = this.mode == 'edit';
 | 
			
		||||
					await this.$axios({
 | 
			
		||||
						url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
 | 
			
		||||
						method: isEdit ? 'put' : 'post',
 | 
			
		||||
						data: this.form,
 | 
			
		||||
					});
 | 
			
		||||
					this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
 | 
			
		||||
					this.visible = false;
 | 
			
		||||
					this.$emit('refreshDataList');
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleCancel() {
 | 
			
		||||
			this.visible = false;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 开启编辑
 | 
			
		||||
		toggleEdit() {
 | 
			
		||||
			this.$emit('update-mode', 'edit');
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 新增属性
 | 
			
		||||
		handleAddAttr() {
 | 
			
		||||
			if (!this.dataId) return this.$message.error('请先创建设备信息');
 | 
			
		||||
			this.attrForm = {
 | 
			
		||||
				id: null,
 | 
			
		||||
				equipmentId: this.dataId,
 | 
			
		||||
				name: '',
 | 
			
		||||
				value: '',
 | 
			
		||||
			};
 | 
			
		||||
			this.attrTitle = '添加设备属性';
 | 
			
		||||
			this.attrFormVisible = true;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 编辑属性
 | 
			
		||||
		async handleEditAttr(attrId) {
 | 
			
		||||
			const res = await this.$axios({
 | 
			
		||||
				url: this.sections[1].urlDetail,
 | 
			
		||||
				method: 'get',
 | 
			
		||||
				params: { id: attrId },
 | 
			
		||||
			});
 | 
			
		||||
			if (res.code == 0) {
 | 
			
		||||
				this.attrForm = res.data;
 | 
			
		||||
				this.attrTitle = '编辑设备属性';
 | 
			
		||||
				this.attrFormVisible = true;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 删除属性
 | 
			
		||||
		handleDeleteAttr(attrId) {
 | 
			
		||||
			this.$confirm('确定删除该属性?', '提示', {
 | 
			
		||||
				confirmButtonText: '确定',
 | 
			
		||||
				cancelButtonText: '取消',
 | 
			
		||||
				type: 'warning',
 | 
			
		||||
			})
 | 
			
		||||
				.then(async () => {
 | 
			
		||||
					const res = await this.$axios({
 | 
			
		||||
						url: this.sections[1].urlDelete,
 | 
			
		||||
						method: 'delete',
 | 
			
		||||
						params: { id: attrId },
 | 
			
		||||
					});
 | 
			
		||||
					if (res.code == 0) {
 | 
			
		||||
						this.$message({
 | 
			
		||||
							message: '删除成功',
 | 
			
		||||
							type: 'success',
 | 
			
		||||
							duration: 1500,
 | 
			
		||||
							onClose: () => {
 | 
			
		||||
								this.getAttrList();
 | 
			
		||||
							},
 | 
			
		||||
						});
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		// 提交属性表
 | 
			
		||||
		submitAttrForm() {
 | 
			
		||||
			this.$refs['attrForm'].validate(async (valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				try {
 | 
			
		||||
					const isEdit = this.attrForm.id != null;
 | 
			
		||||
					this.attrFormSubmitting = true;
 | 
			
		||||
					const res = await this.$axios({
 | 
			
		||||
						url: isEdit
 | 
			
		||||
							? this.sections[1].urlUpdate
 | 
			
		||||
							: this.sections[1].urlCreate,
 | 
			
		||||
						method: isEdit ? 'put' : 'post',
 | 
			
		||||
						data: this.attrForm,
 | 
			
		||||
					});
 | 
			
		||||
 | 
			
		||||
					if (res.code == 0) {
 | 
			
		||||
						this.closeAttrForm();
 | 
			
		||||
						this.$message({
 | 
			
		||||
							message: `${isEdit ? '更新' : '创建'}成功`,
 | 
			
		||||
							type: 'success',
 | 
			
		||||
							duration: 1500,
 | 
			
		||||
							onClose: () => {
 | 
			
		||||
								this.getAttrList();
 | 
			
		||||
							},
 | 
			
		||||
						});
 | 
			
		||||
					}
 | 
			
		||||
					this.attrFormSubmitting = false;
 | 
			
		||||
				} catch (err) {
 | 
			
		||||
					this.$message({
 | 
			
		||||
						message: err,
 | 
			
		||||
						type: 'error',
 | 
			
		||||
						duration: 1500,
 | 
			
		||||
					});
 | 
			
		||||
					this.attrFormSubmitting = false;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		closeAttrForm() {
 | 
			
		||||
			this.attrFormVisible = false;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		handleClick(raw) {
 | 
			
		||||
			if (raw.type === 'delete') {
 | 
			
		||||
				this.$confirm(
 | 
			
		||||
					`确定对${
 | 
			
		||||
						raw.data.name
 | 
			
		||||
							? '[名称=' + raw.data.name + ']'
 | 
			
		||||
							: '[序号=' + raw.data._pageIndex + ']'
 | 
			
		||||
					}进行删除操作?`,
 | 
			
		||||
					'提示',
 | 
			
		||||
					{
 | 
			
		||||
						confirmButtonText: '确定',
 | 
			
		||||
						cancelButtonText: '取消',
 | 
			
		||||
						type: 'warning',
 | 
			
		||||
					}
 | 
			
		||||
				)
 | 
			
		||||
					.then(() => {
 | 
			
		||||
						deleteProductAttr(raw.data.id).then(({ data }) => {
 | 
			
		||||
							this.$message({
 | 
			
		||||
								message: '操作成功',
 | 
			
		||||
								type: 'success',
 | 
			
		||||
								duration: 1500,
 | 
			
		||||
								onClose: () => {
 | 
			
		||||
									this.getList();
 | 
			
		||||
								},
 | 
			
		||||
							});
 | 
			
		||||
						});
 | 
			
		||||
					})
 | 
			
		||||
					.catch(() => {});
 | 
			
		||||
			} else {
 | 
			
		||||
				this.addNew(raw.data.id);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
.drawer >>> .el-drawer {
 | 
			
		||||
	border-radius: 8px 0 0 8px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer >>> .el-drawer__header {
 | 
			
		||||
	margin: 0;
 | 
			
		||||
	padding: 32px 32px 24px;
 | 
			
		||||
	border-bottom: 1px solid #dcdfe6;
 | 
			
		||||
	margin-bottom: 0px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.small-title::before {
 | 
			
		||||
	content: '';
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	vertical-align: top;
 | 
			
		||||
	width: 4px;
 | 
			
		||||
	height: 22px;
 | 
			
		||||
	border-radius: 1px;
 | 
			
		||||
	margin-right: 8px;
 | 
			
		||||
	background-color: #0b58ff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer-body {
 | 
			
		||||
	display: flex;
 | 
			
		||||
	flex-direction: column;
 | 
			
		||||
	height: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer-body__content {
 | 
			
		||||
	flex: 1;
 | 
			
		||||
	/* background: #eee; */
 | 
			
		||||
	padding: 20px 30px;
 | 
			
		||||
	overflow-y: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.drawer-body__footer {
 | 
			
		||||
	display: flex;
 | 
			
		||||
	justify-content: flex-end;
 | 
			
		||||
	padding: 18px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@@ -0,0 +1,288 @@
 | 
			
		||||
<!-- 
 | 
			
		||||
    filename: dialogForm.vue
 | 
			
		||||
    author: liubin
 | 
			
		||||
    date: 2023-08-15 10:32:36
 | 
			
		||||
    description: 弹窗的表单组件
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<el-form class="equipment-info-form" ref="form" :model="form" label-width="200px" label-position="top"
 | 
			
		||||
		v-loading="formLoading">
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="设备名称" prop="name" :rules="[{ required: true, message: '设备名称不能为空', trigger: 'blur' }]">
 | 
			
		||||
					<el-input v-model="form.name" :disabled="disabled" placeholder="请输入设备名称"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="设备编码" prop="code" :rules="[]">
 | 
			
		||||
					<el-input v-model="form.code" :disabled="disabled" placeholder="请输入设备编码"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="英文名称" prop="enName" :rules="[]">
 | 
			
		||||
					<el-input v-model="form.enName" :disabled="disabled" placeholder="请输入英文名称"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="缩写" prop="abbr" :rules="[]">
 | 
			
		||||
					<el-input v-model="form.abbr" :disabled="disabled" placeholder="请输入名称缩写"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="设备类型" prop="equipmentTypeId"
 | 
			
		||||
					:rules="[{ required: true, message: '设备类型不能为空', trigger: 'blur' }]">
 | 
			
		||||
					<el-select v-model="form.equipmentTypeId" :disabled="disabled" filterable placeholder="请选择设备类型">
 | 
			
		||||
						<el-option v-for="eqType in eqTypeList" :key="eqType.id" :label="eqType.name"
 | 
			
		||||
							:value="eqType.id"></el-option>
 | 
			
		||||
					</el-select>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="预计生产时间(min/天)" prop="workTime" :rules="[
 | 
			
		||||
					{ required: true, message: '预计生产时间不能为空', trigger: 'blur' },
 | 
			
		||||
					{
 | 
			
		||||
						type: 'number',
 | 
			
		||||
						message: '请输入正确的数字值',
 | 
			
		||||
						trigger: 'blur',
 | 
			
		||||
						transform: (val) => Number(val),
 | 
			
		||||
					},
 | 
			
		||||
				]">
 | 
			
		||||
					<el-input v-model="form.workTime" :disabled="disabled" placeholder="请输入预计生产时间"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="生产日期" prop="productionTime" :rules="[]">
 | 
			
		||||
					<el-date-picker v-model="form.enterTime" :disabled="disabled" type="datetime" placeholder="请选择生产日期"
 | 
			
		||||
						value-format="timestamp"></el-date-picker>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="进场日期" prop="enterTime" :rules="[]">
 | 
			
		||||
					<el-date-picker v-model="form.enterTime" :disabled="disabled" type="datetime" placeholder="请选择进场日期"
 | 
			
		||||
						value-format="timestamp"></el-date-picker>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="设备TT值" prop="tvalue" :rules="[
 | 
			
		||||
					{ required: true, message: '设备TT值不能为空', trigger: 'blur' },
 | 
			
		||||
					{
 | 
			
		||||
						type: 'number',
 | 
			
		||||
						message: '请输入正确的数字值',
 | 
			
		||||
						trigger: 'blur',
 | 
			
		||||
						transform: (val) => Number(val),
 | 
			
		||||
					},
 | 
			
		||||
				]">
 | 
			
		||||
					<el-input v-model="form.tvalue" :disabled="disabled" placeholder="请输入设备TT值"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="产品加工时间(s)" prop="processingTime" :rules="[
 | 
			
		||||
					{ required: true, message: '产品加工时间不能为空', trigger: 'blur' },
 | 
			
		||||
					{
 | 
			
		||||
						type: 'number',
 | 
			
		||||
						message: '请输入正确的数字值',
 | 
			
		||||
						trigger: 'blur',
 | 
			
		||||
						transform: (val) => Number(val),
 | 
			
		||||
					},
 | 
			
		||||
				]">
 | 
			
		||||
					<el-input v-model="form.processingTime" :disabled="disabled" placeholder="请输入产品加工时间"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="制造商" prop="manufacturer" :rules="[]">
 | 
			
		||||
					<el-input v-model="form.manufacturer" :disabled="disabled" placeholder="请输入制造商"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="8">
 | 
			
		||||
				<el-form-item label="设备规格" prop="spec" :rules="[]">
 | 
			
		||||
					<el-input v-model="form.spec" :disabled="disabled" placeholder="请输入设备规格"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<!-- 功能描述  -->
 | 
			
		||||
			<el-col>
 | 
			
		||||
				<el-form-item label="功能描述" prop="description" :rules="[]">
 | 
			
		||||
					<el-input type="textarea" :disabled="disabled" v-model="form.description"
 | 
			
		||||
						placeholder="请填写功能描述"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<!-- 功能描述  -->
 | 
			
		||||
			<el-col>
 | 
			
		||||
				<el-form-item label="备注" prop="remark" :rules="[]">
 | 
			
		||||
					<el-input v-model="form.remark" :disabled="disabled" placeholder="请输入备注"></el-input>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<!-- 上传资料  -->
 | 
			
		||||
			<el-col>
 | 
			
		||||
				<el-form-item label="上传资料" prop="assets" :rules="[]">
 | 
			
		||||
					<AssetsUpload v-model="form.assets" :disabled="disabled" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<!-- 上传图片  -->
 | 
			
		||||
			<el-col>
 | 
			
		||||
				<el-form-item label="上传图片" prop="pics" :rules="[]">
 | 
			
		||||
					<AssetsUpload :is-pic-mode="true" v-model="form.pics" :disabled="disabled" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
	</el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import AssetsUpload from './AssetsUpload.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'EquipmentInfoForm',
 | 
			
		||||
 | 
			
		||||
	model: {
 | 
			
		||||
		prop: 'dataForm',
 | 
			
		||||
		event: 'update',
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	emits: ['update'],
 | 
			
		||||
 | 
			
		||||
	components: { AssetsUpload },
 | 
			
		||||
 | 
			
		||||
	props: {
 | 
			
		||||
		dataForm: {
 | 
			
		||||
			type: Object,
 | 
			
		||||
			default: () => ({}),
 | 
			
		||||
		},
 | 
			
		||||
		disabled: {
 | 
			
		||||
			type: Boolean,
 | 
			
		||||
			default: false,
 | 
			
		||||
		},
 | 
			
		||||
		syncFilelist: {
 | 
			
		||||
			type: Number,
 | 
			
		||||
			default: null,
 | 
			
		||||
			required: false,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			formLoading: false,
 | 
			
		||||
			form: {
 | 
			
		||||
				name: '',
 | 
			
		||||
				code: '',
 | 
			
		||||
				enName: '',
 | 
			
		||||
				abbr: '',
 | 
			
		||||
				equipmentTypeId: '',
 | 
			
		||||
				remark: '',
 | 
			
		||||
				productionTime: '',
 | 
			
		||||
				workTime: '',
 | 
			
		||||
				enterTime: '',
 | 
			
		||||
				tvalue: '',
 | 
			
		||||
				processingTime: '',
 | 
			
		||||
				manufacturer: '',
 | 
			
		||||
				spec: '',
 | 
			
		||||
				description: '',
 | 
			
		||||
				assets: [],
 | 
			
		||||
				pics: [],
 | 
			
		||||
			},
 | 
			
		||||
			eqTypeList: [],
 | 
			
		||||
			dataLoaded: false,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	watch: {
 | 
			
		||||
		dataForm: {
 | 
			
		||||
			handler(val) {
 | 
			
		||||
				// debugger;
 | 
			
		||||
				this.form = JSON.parse(JSON.stringify(val));
 | 
			
		||||
				this.form.assets =
 | 
			
		||||
					this.form.files?.filter((item) => item.fileType == '2') || [];
 | 
			
		||||
				this.form.pics =
 | 
			
		||||
					this.form.files?.filter((item) => item.fileType == '1') || [];
 | 
			
		||||
				delete this.form.files;
 | 
			
		||||
			},
 | 
			
		||||
			immediate: true,
 | 
			
		||||
			deep: true,
 | 
			
		||||
		},
 | 
			
		||||
		syncFilelist: {
 | 
			
		||||
			handler(val) {
 | 
			
		||||
				if (val != null) {
 | 
			
		||||
					this.updateForm();
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			immediate: true,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getEqTypeList();
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	methods: {
 | 
			
		||||
		updateForm() {
 | 
			
		||||
			console.log('update form ==> ');
 | 
			
		||||
			this.form.files = [...this.form.assets, ...this.form.pics];
 | 
			
		||||
			delete this.form.assets;
 | 
			
		||||
			delete this.form.pics;
 | 
			
		||||
			this.$emit('update', this.form);
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		async getEqTypeList() {
 | 
			
		||||
			this.formLoading = true;
 | 
			
		||||
			const { code, data } = await this.$axios(
 | 
			
		||||
				'/base/core-equipment-type/page?pageNo=1&pageSize=100'
 | 
			
		||||
			);
 | 
			
		||||
			// debugger;
 | 
			
		||||
			if (code == 0) {
 | 
			
		||||
				this.eqTypeList = data.list;
 | 
			
		||||
			}
 | 
			
		||||
			this.formLoading = false;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		/** 模拟透传 ref  */
 | 
			
		||||
		validate(cb) {
 | 
			
		||||
			return this.$refs.form.validate(cb);
 | 
			
		||||
		},
 | 
			
		||||
		resetFields(args) {
 | 
			
		||||
			return this.$refs.form.resetFields(args);
 | 
			
		||||
		},
 | 
			
		||||
		// getCode
 | 
			
		||||
		async getCode(url) {
 | 
			
		||||
			const response = await this.$axios(url);
 | 
			
		||||
			return response.data;
 | 
			
		||||
		},
 | 
			
		||||
		// 上传成功的特殊处理
 | 
			
		||||
		beforeUpload() { },
 | 
			
		||||
		// 上传前的验证规则可通过 bind 属性传入
 | 
			
		||||
		handleUploadSuccess(response, file, fileList) {
 | 
			
		||||
			// 保存原始文件名
 | 
			
		||||
			if ('fileNames' in this.form) this.form.fileNames.push(file.name);
 | 
			
		||||
			// 保存完整地址
 | 
			
		||||
			if ('fileUrls' in this.form) this.form.fileUrls.push(response.data);
 | 
			
		||||
			this.$modal.msgSuccess('上传成功');
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		getFileName(fileUrl) {
 | 
			
		||||
			return fileUrl.split('/').pop();
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.el-date-editor,
 | 
			
		||||
.el-select {
 | 
			
		||||
	width: 100%;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										689
									
								
								src/views/devConfig/base/coreEquipment/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,689 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="app-container">
 | 
			
		||||
		<!-- 搜索工作栏 -->
 | 
			
		||||
		<SearchBar
 | 
			
		||||
			:formConfigs="searchBarFormConfig"
 | 
			
		||||
			ref="search-bar"
 | 
			
		||||
			@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
 | 
			
		||||
		<!-- 列表 -->
 | 
			
		||||
		<base-table
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="queryParams.pageNo"
 | 
			
		||||
			:limit="queryParams.pageSize"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
			@emitFun="handleEmitFun">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				:width="120"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleTableBtnClick" />
 | 
			
		||||
		</base-table>
 | 
			
		||||
 | 
			
		||||
		<!-- 分页组件 -->
 | 
			
		||||
		<pagination
 | 
			
		||||
			v-show="total > 0"
 | 
			
		||||
			:total="total"
 | 
			
		||||
			:page.sync="queryParams.pageNo"
 | 
			
		||||
			:limit.sync="queryParams.pageSize"
 | 
			
		||||
			@pagination="getList" />
 | 
			
		||||
 | 
			
		||||
		<!-- 对话框(添加) -->
 | 
			
		||||
		<base-dialog
 | 
			
		||||
			:dialogTitle="title"
 | 
			
		||||
			:dialogVisible="open"
 | 
			
		||||
			@close="cancel"
 | 
			
		||||
			@cancel="cancel"
 | 
			
		||||
			width="60%"
 | 
			
		||||
			@confirm="submitForm">
 | 
			
		||||
			<DialogForm
 | 
			
		||||
				v-if="open"
 | 
			
		||||
				key="index-dialog-form"
 | 
			
		||||
				ref="form"
 | 
			
		||||
				label-position="top"
 | 
			
		||||
				size="small"
 | 
			
		||||
				v-model="form"
 | 
			
		||||
				:has-files="['files', 'files2']"
 | 
			
		||||
				:rows="computedRows" />
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
 | 
			
		||||
		<!-- 设备 详情 - 编辑 -->
 | 
			
		||||
		<EquipmentDrawer
 | 
			
		||||
			v-if="editVisible"
 | 
			
		||||
			ref="drawer"
 | 
			
		||||
			:mode="editMode"
 | 
			
		||||
			@update-mode="editMode = $event"
 | 
			
		||||
			:data-id="form.id"
 | 
			
		||||
			:sections="[
 | 
			
		||||
				{
 | 
			
		||||
					name: '基本信息',
 | 
			
		||||
					key: 'base',
 | 
			
		||||
					rows: computedRows,
 | 
			
		||||
					url: '/base/core-equipment/get',
 | 
			
		||||
					urlUpdate: '/base/core-equipment/update',
 | 
			
		||||
					urlCreate: '/base/core-equipment/create',
 | 
			
		||||
					queryParams: { id: form.id },
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					name: '属性列表',
 | 
			
		||||
					key: 'attrs',
 | 
			
		||||
					props: drawerListProps,
 | 
			
		||||
					url: '/base/core-equipment-attr/page',
 | 
			
		||||
					urlCreate: '/base/core-equipment-attr/create',
 | 
			
		||||
					urlUpdate: '/base/core-equipment-attr/update',
 | 
			
		||||
					urlDelete: '/base/core-equipment-attr/delete',
 | 
			
		||||
					urlDetail: '/base/core-equipment-attr/get',
 | 
			
		||||
					queryParams: {
 | 
			
		||||
						equipmentId: form.id,
 | 
			
		||||
						pageNo: 1,
 | 
			
		||||
						pageSize: 10,
 | 
			
		||||
					},
 | 
			
		||||
					tableBtn: [
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:update')
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'edit',
 | 
			
		||||
									btnName: '修改',
 | 
			
		||||
							  }
 | 
			
		||||
							: undefined,
 | 
			
		||||
						this.$auth.hasPermi('base:core-equipment-attr:delete')
 | 
			
		||||
							? {
 | 
			
		||||
									type: 'delete',
 | 
			
		||||
									btnName: '删除',
 | 
			
		||||
							  }
 | 
			
		||||
							: undefined,
 | 
			
		||||
					].filter((v) => v),
 | 
			
		||||
					allowAdd: true,
 | 
			
		||||
				},
 | 
			
		||||
			]"
 | 
			
		||||
			@refreshDataList="getList"
 | 
			
		||||
			@cancel="cancelEdit"
 | 
			
		||||
			@destroy="cancelEdit" />
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import EquipmentDrawer from './components/EquipmentDrawer';
 | 
			
		||||
 | 
			
		||||
import {
 | 
			
		||||
	createEquipment,
 | 
			
		||||
	updateEquipment,
 | 
			
		||||
	deleteEquipment,
 | 
			
		||||
	getEquipment,
 | 
			
		||||
	getEquipmentPage,
 | 
			
		||||
	exportEquipmentExcel,
 | 
			
		||||
} from '@/api/base/equipment';
 | 
			
		||||
import Editor from '@/components/Editor';
 | 
			
		||||
import AssetsUpload from './components/AssetsUpload.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'Equipment',
 | 
			
		||||
	components: {
 | 
			
		||||
		Editor,
 | 
			
		||||
		EquipmentDrawer,
 | 
			
		||||
	},
 | 
			
		||||
	mixins: [basicPageMixin],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['name', 'code'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi(`base:core-equipment:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'detail',
 | 
			
		||||
							btnName: '详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'createTime',
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 180,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'name', label: '设备名称' },
 | 
			
		||||
				{ width: 256, prop: 'code', label: '设备编码' },
 | 
			
		||||
				{ prop: 'equipmentTypeName', label: '设备类型' },
 | 
			
		||||
				{ prop: 'enName', label: '英文名称' },
 | 
			
		||||
				{ prop: 'abbr', label: '缩写' },
 | 
			
		||||
				// {
 | 
			
		||||
				// 	action: 'show-detail',
 | 
			
		||||
				// 	label: '详情',
 | 
			
		||||
				// 	subcomponent: {
 | 
			
		||||
				// 		props: ['injectData'],
 | 
			
		||||
				// 		render: function (h) {
 | 
			
		||||
				// 			const _this = this;
 | 
			
		||||
				// 			return h(
 | 
			
		||||
				// 				'el-button',
 | 
			
		||||
				// 				{
 | 
			
		||||
				// 					props: { type: 'text', size: 'mini' },
 | 
			
		||||
				// 					on: {
 | 
			
		||||
				// 						click: function () {
 | 
			
		||||
				// 							console.log('inejctdata', _this.injectData);
 | 
			
		||||
				// 							_this.$emit('emitData', {
 | 
			
		||||
				// 								action: _this.injectData.action,
 | 
			
		||||
				// 								value: _this.injectData.id,
 | 
			
		||||
				// 							});
 | 
			
		||||
				// 						},
 | 
			
		||||
				// 					},
 | 
			
		||||
				// 				},
 | 
			
		||||
				// 				'查看详情'
 | 
			
		||||
				// 			);
 | 
			
		||||
				// 		},
 | 
			
		||||
				// 	},
 | 
			
		||||
				// },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '名称',
 | 
			
		||||
					placeholder: '请输入设备名称',
 | 
			
		||||
					param: 'name',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '编码',
 | 
			
		||||
					placeholder: '请输入设备编码',
 | 
			
		||||
					param: 'code',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
			rows: [
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '设备名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
						// bind: {
 | 
			
		||||
						// 	disabled: this.editMode == 'detail', // some condition, like detail mode...
 | 
			
		||||
						// }
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '设备编码',
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/core-equipment/getCode',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '英文名称',
 | 
			
		||||
						prop: 'enName',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '缩写',
 | 
			
		||||
						prop: 'abbr',
 | 
			
		||||
					},
 | 
			
		||||
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '设备类型',
 | 
			
		||||
						prop: 'equipmentTypeId',
 | 
			
		||||
						url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备类型不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
						bind: {
 | 
			
		||||
							filterable: true,
 | 
			
		||||
						},
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '预计生产时间(min/天)',
 | 
			
		||||
						prop: 'workTime',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{
 | 
			
		||||
								required: true,
 | 
			
		||||
								message: '预计生产时间不能为空',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
							},
 | 
			
		||||
							{
 | 
			
		||||
								type: 'number',
 | 
			
		||||
								message: '请输入正确的数字值',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
								transform: (val) => Number(val),
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					// {
 | 
			
		||||
					// 	select: true,
 | 
			
		||||
					// 	label: '设备分组',
 | 
			
		||||
					// 	prop: 'groupId',
 | 
			
		||||
					// 	url: '/base/core-equipment-group/page?pageNo=1&pageSize=100',
 | 
			
		||||
					// },
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						datetime: true,
 | 
			
		||||
						label: '生产日期',
 | 
			
		||||
						prop: 'productionTime',
 | 
			
		||||
						bind: {
 | 
			
		||||
							format: 'yyyy-MM-dd',
 | 
			
		||||
							clearable: true,
 | 
			
		||||
						},
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						datetime: true,
 | 
			
		||||
						label: '进厂日期',
 | 
			
		||||
						prop: 'enterTime',
 | 
			
		||||
						bind: {
 | 
			
		||||
							format: 'yyyy-MM-dd',
 | 
			
		||||
							clearable: true,
 | 
			
		||||
						},
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						prop: 'tvalue',
 | 
			
		||||
						label: '设备TT值',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备TT值不能为空', trigger: 'blur' },
 | 
			
		||||
							{
 | 
			
		||||
								type: 'number',
 | 
			
		||||
								message: '请输入正确的数字值',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
								transform: (val) => Number(val),
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '单件产品加工时间(s)',
 | 
			
		||||
						prop: 'processingTime',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{
 | 
			
		||||
								required: true,
 | 
			
		||||
								message: '单件产品加工时间不能为空',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
							},
 | 
			
		||||
							{
 | 
			
		||||
								type: 'number',
 | 
			
		||||
								message: '请输入正确的数字值',
 | 
			
		||||
								trigger: 'blur',
 | 
			
		||||
								transform: (val) => Number(val),
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '制造商',
 | 
			
		||||
						prop: 'manufacturer',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '规格描述',
 | 
			
		||||
						prop: 'spec',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						textarea: true,
 | 
			
		||||
						label: '功能描述',
 | 
			
		||||
						prop: 'description',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						upload: true,
 | 
			
		||||
						label: '设备资料',
 | 
			
		||||
						prop: 'files',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						upload: true,
 | 
			
		||||
						label: '设备图片',
 | 
			
		||||
						prop: 'files2',
 | 
			
		||||
						fileType: 1,
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[{ input: true, label: '备注', prop: 'remark' }],
 | 
			
		||||
				// [
 | 
			
		||||
				// 	{
 | 
			
		||||
				// 		assetUpload: true,
 | 
			
		||||
				// 		label: '上传资料',
 | 
			
		||||
				// 		fieldName: 'assets',
 | 
			
		||||
				// 		subcomponent: AssetsUpload
 | 
			
		||||
				// 	},
 | 
			
		||||
				// ],
 | 
			
		||||
				// [
 | 
			
		||||
				// 	{
 | 
			
		||||
				// 		assetUpload: true,
 | 
			
		||||
				// 		label: '上传图片',
 | 
			
		||||
				// 		fieldName: 'images',
 | 
			
		||||
				// 		subcomponent: AssetsUpload
 | 
			
		||||
				// 	},
 | 
			
		||||
				// ],
 | 
			
		||||
				// [
 | 
			
		||||
				// 	{
 | 
			
		||||
				// 		upload: true,
 | 
			
		||||
				// 		label: '上传资料',
 | 
			
		||||
				// 		prop: 'uploadFiles',
 | 
			
		||||
				// 		url: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 请求地址
 | 
			
		||||
				// 		uploadFnName: 'assetsUpload', // 上传方法名
 | 
			
		||||
				// 		bind: {
 | 
			
		||||
				// 			headers: { Authorization: 'Bearer ' + getAccessToken() },
 | 
			
		||||
				// 			'show-file-list': false,
 | 
			
		||||
				// 		},
 | 
			
		||||
				// 	},
 | 
			
		||||
				// 	{
 | 
			
		||||
				// 		diy: true,
 | 
			
		||||
				// 		key: 'eq-assets',
 | 
			
		||||
				// 		label: '设备资料',
 | 
			
		||||
				// 		prop: 'fileNames',
 | 
			
		||||
				// 		subcomponent: EquipmentAssets,
 | 
			
		||||
				// 	},
 | 
			
		||||
				// ],
 | 
			
		||||
				// [
 | 
			
		||||
				// {
 | 
			
		||||
				// 		upload: true,
 | 
			
		||||
				// 		label: '上传图片',
 | 
			
		||||
				// 		prop: 'uploadImages',
 | 
			
		||||
				// 		url: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 请求地址
 | 
			
		||||
				// 		uploadFnName: 'imagesUpload', // 上传方法名
 | 
			
		||||
				// 		bind: {
 | 
			
		||||
				// 			headers: { Authorization: 'Bearer ' + getAccessToken() },
 | 
			
		||||
				// 			'show-file-list': false,
 | 
			
		||||
				// 		},
 | 
			
		||||
				// 	},
 | 
			
		||||
				// 	{
 | 
			
		||||
				// 		diy: true,
 | 
			
		||||
				// 		key: 'eq-pics',
 | 
			
		||||
				// 		label: '设备图片',
 | 
			
		||||
				// 		prop: 'fileUrls',
 | 
			
		||||
				// 		subcomponent: EquipmentPics,
 | 
			
		||||
				// 		pictures: async () => {
 | 
			
		||||
				// 			// some async request
 | 
			
		||||
				// 			return [];
 | 
			
		||||
				// 		},
 | 
			
		||||
				// 	},
 | 
			
		||||
				// ],
 | 
			
		||||
				// [
 | 
			
		||||
				// 	{
 | 
			
		||||
				// 		diy: true,
 | 
			
		||||
				// 		key: 'eq-pics',
 | 
			
		||||
				// 		label: '设备图片',
 | 
			
		||||
				// 		prop: 'fileUrls',
 | 
			
		||||
				// 		subcomponent: EquipmentPics,
 | 
			
		||||
				// 		pictures: async () => {
 | 
			
		||||
				// 			// some async request
 | 
			
		||||
				// 			return [];
 | 
			
		||||
				// 		},
 | 
			
		||||
				// 	},
 | 
			
		||||
				// ],
 | 
			
		||||
			],
 | 
			
		||||
			editVisible: false,
 | 
			
		||||
			editMode: 'edit', // 'edit', 'detail'
 | 
			
		||||
			// drawer 里的设备属性列表配置项
 | 
			
		||||
			drawerListProps: [
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'createTime',
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 180,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'name', label: '属性名称' },
 | 
			
		||||
				{ prop: 'value', label: '属性值' },
 | 
			
		||||
			],
 | 
			
		||||
			// 是否显示弹出层
 | 
			
		||||
			open: false,
 | 
			
		||||
			// 查询参数
 | 
			
		||||
			queryParams: {
 | 
			
		||||
				pageNo: 1,
 | 
			
		||||
				pageSize: 10,
 | 
			
		||||
				code: '',
 | 
			
		||||
				name: '',
 | 
			
		||||
			},
 | 
			
		||||
			// 表单参数
 | 
			
		||||
			form: {
 | 
			
		||||
				id: null,
 | 
			
		||||
				files: [],
 | 
			
		||||
			},
 | 
			
		||||
			showUploadComponents: false, // 是否显示上传组件
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		this.getList();
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		computedRows() {
 | 
			
		||||
			return this.showUploadComponents
 | 
			
		||||
				? [
 | 
			
		||||
						...this.rows,
 | 
			
		||||
						[
 | 
			
		||||
							{
 | 
			
		||||
								assetUpload: true,
 | 
			
		||||
								key: 'eq-assets', // 用于区分不同的上传组件
 | 
			
		||||
								label: '上传资料',
 | 
			
		||||
								fieldName: 'assets',
 | 
			
		||||
								subcomponent: AssetsUpload,
 | 
			
		||||
								prop: 'uploadedAssets',
 | 
			
		||||
								default: [],
 | 
			
		||||
								bind: {
 | 
			
		||||
									'is-pic-mode': false,
 | 
			
		||||
								},
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
						[
 | 
			
		||||
							{
 | 
			
		||||
								assetUpload: true,
 | 
			
		||||
								key: 'eq-pics', // 用于区分不同的上传组件
 | 
			
		||||
								label: '上传图片',
 | 
			
		||||
								fieldName: 'images',
 | 
			
		||||
								subcomponent: AssetsUpload,
 | 
			
		||||
								// prop: '',
 | 
			
		||||
								// default: [],
 | 
			
		||||
								bind: {
 | 
			
		||||
									'is-pic-mode': true,
 | 
			
		||||
								},
 | 
			
		||||
							},
 | 
			
		||||
						],
 | 
			
		||||
				  ]
 | 
			
		||||
				: this.rows;
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		/** 查询列表 */
 | 
			
		||||
		getList() {
 | 
			
		||||
			this.loading = true;
 | 
			
		||||
			// 执行查询
 | 
			
		||||
			getEquipmentPage(this.queryParams).then((response) => {
 | 
			
		||||
				this.list = response.data.list;
 | 
			
		||||
				this.total = response.data.total;
 | 
			
		||||
				this.loading = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 取消按钮 */
 | 
			
		||||
		cancel() {
 | 
			
		||||
			this.open = false;
 | 
			
		||||
			this.reset();
 | 
			
		||||
		},
 | 
			
		||||
		cancelEdit() {
 | 
			
		||||
			this.showUploadComponents = false;
 | 
			
		||||
			this.editVisible = false;
 | 
			
		||||
		},
 | 
			
		||||
		/** 表单重置 */
 | 
			
		||||
		reset() {
 | 
			
		||||
			this.form = {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
				code: undefined,
 | 
			
		||||
				name: undefined,
 | 
			
		||||
				enName: undefined,
 | 
			
		||||
				abbr: undefined,
 | 
			
		||||
				enterTime: undefined,
 | 
			
		||||
				productionTime: undefined,
 | 
			
		||||
				equipmentTypeId: undefined,
 | 
			
		||||
				groupId: undefined,
 | 
			
		||||
				tvalue: undefined,
 | 
			
		||||
				processingTime: undefined,
 | 
			
		||||
				manufacturer: undefined,
 | 
			
		||||
				spec: undefined,
 | 
			
		||||
				description: undefined,
 | 
			
		||||
				remark: undefined,
 | 
			
		||||
				files: [],
 | 
			
		||||
				files2: [],
 | 
			
		||||
			};
 | 
			
		||||
			this.resetForm('form');
 | 
			
		||||
		},
 | 
			
		||||
		/** 新增按钮操作 */
 | 
			
		||||
		handleAdd() {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			this.open = true;
 | 
			
		||||
			this.showUploadComponents = false;
 | 
			
		||||
			this.title = '添加设备';
 | 
			
		||||
		},
 | 
			
		||||
		/** 修改按钮操作 */
 | 
			
		||||
		handleUpdate(row) {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			this.showUploadComponents = true;
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			getEquipment(id).then((response) => {
 | 
			
		||||
				this.form = response.data;
 | 
			
		||||
				this.open = true;
 | 
			
		||||
				this.title = '修改设备';
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 提交按钮 */
 | 
			
		||||
		submitForm() {
 | 
			
		||||
			this.$refs['form'].validate((valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				const payload = Object.assign({}, this.form);
 | 
			
		||||
				payload.files = [...payload.files, ...payload.files2];
 | 
			
		||||
				delete payload.files2;
 | 
			
		||||
				// 修改的提交
 | 
			
		||||
				if (this.form.id != null) {
 | 
			
		||||
					updateEquipment(payload).then((response) => {
 | 
			
		||||
						this.$modal.msgSuccess('修改成功');
 | 
			
		||||
						this.open = false;
 | 
			
		||||
						this.getList();
 | 
			
		||||
					});
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				// 添加的提交
 | 
			
		||||
				createEquipment(payload).then((response) => {
 | 
			
		||||
					this.$modal.msgSuccess('新增成功');
 | 
			
		||||
					this.open = false;
 | 
			
		||||
					this.getList();
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 删除按钮操作 */
 | 
			
		||||
		handleDelete(row) {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
      this.$modal
 | 
			
		||||
        .delConfirm(row.name)
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return deleteEquipment(id);
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
					this.$modal.msgSuccess('删除成功');
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
		/** 导出按钮操作 */
 | 
			
		||||
		handleExport() {
 | 
			
		||||
			// 处理查询参数
 | 
			
		||||
			let params = { ...this.queryParams };
 | 
			
		||||
			params.pageNo = undefined;
 | 
			
		||||
			params.pageSize = undefined;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认导出所有设备数据项?')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.exportLoading = true;
 | 
			
		||||
					return exportEquipmentExcel(params);
 | 
			
		||||
				})
 | 
			
		||||
				.then((response) => {
 | 
			
		||||
					this.$download.excel(response, '设备.xls');
 | 
			
		||||
					this.exportLoading = false;
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
		// 查看详情
 | 
			
		||||
		viewDetail(id) {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			this.editMode = 'detail';
 | 
			
		||||
			this.showUploadComponents = true;
 | 
			
		||||
			this.form.id = id;
 | 
			
		||||
			this.editVisible = true;
 | 
			
		||||
			this.$nextTick(() => {
 | 
			
		||||
				this.$refs['drawer'].init();
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		// overwrite basicPageMixin 里的 处理表格按钮 方法
 | 
			
		||||
		handleTableBtnClick({ data, type }) {
 | 
			
		||||
			switch (type) {
 | 
			
		||||
				case 'edit':
 | 
			
		||||
					this.reset();
 | 
			
		||||
					this.editMode = 'edit';
 | 
			
		||||
					this.showUploadComponents = true;
 | 
			
		||||
					this.form.id = data.id;
 | 
			
		||||
					this.editVisible = true;
 | 
			
		||||
					this.$nextTick(() => {
 | 
			
		||||
						this.$refs['drawer'].init();
 | 
			
		||||
					});
 | 
			
		||||
					break;
 | 
			
		||||
				case 'delete':
 | 
			
		||||
					this.handleDelete(data);
 | 
			
		||||
					break;
 | 
			
		||||
				case 'detail':
 | 
			
		||||
					const { id } = data;
 | 
			
		||||
					this.viewDetail(id);
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										370
									
								
								src/views/devConfig/base/coreEquipmentLineBind/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,370 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="app-container">
 | 
			
		||||
		<!-- 搜索工作栏 -->
 | 
			
		||||
		<SearchBar
 | 
			
		||||
			:formConfigs="searchBarFormConfig"
 | 
			
		||||
			ref="search-bar"
 | 
			
		||||
			@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
 | 
			
		||||
		<!-- 列表 -->
 | 
			
		||||
		<base-table
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="queryParams.pageNo"
 | 
			
		||||
			:limit="queryParams.pageSize"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
			@emitFun="handleEmitFun">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:width="100"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleTableBtnClick" />
 | 
			
		||||
		</base-table>
 | 
			
		||||
 | 
			
		||||
		<!-- 分页组件 -->
 | 
			
		||||
		<pagination
 | 
			
		||||
			v-show="total > 0"
 | 
			
		||||
			:total="total"
 | 
			
		||||
			:page.sync="queryParams.pageNo"
 | 
			
		||||
			:limit.sync="queryParams.pageSize"
 | 
			
		||||
			@pagination="getList" />
 | 
			
		||||
 | 
			
		||||
		<!-- 对话框(添加 / 修改) -->
 | 
			
		||||
		<base-dialog
 | 
			
		||||
			:dialogTitle="title"
 | 
			
		||||
			:dialogVisible="open"
 | 
			
		||||
			@close="cancel"
 | 
			
		||||
			@cancel="cancel"
 | 
			
		||||
			@confirm="submitForm">
 | 
			
		||||
			<DialogForm
 | 
			
		||||
				v-if="open"
 | 
			
		||||
				ref="form"
 | 
			
		||||
				v-model="form"
 | 
			
		||||
				:has-files="false"
 | 
			
		||||
				:rows="rows" />
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
 | 
			
		||||
// import { getAccessToken } from '@/utils/auth';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'EquipmentLineBind',
 | 
			
		||||
	components: {},
 | 
			
		||||
	mixins: [basicPageMixin],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			basePath: '/base/core-equipment-bind-section',
 | 
			
		||||
			searchBarKeys: ['equipmentName', 'productionLineId'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment-bind-section:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment-bind-section:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'createTime',
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 150,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'productionLineName', label: '产线名称' },
 | 
			
		||||
				{ prop: 'workshopSectionName', label: '工段名称' },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备名称' },
 | 
			
		||||
				{ prop: 'sort', label: '工段中排序' },
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'lineDataType',
 | 
			
		||||
					label: '产线统计类型',
 | 
			
		||||
          width:120,
 | 
			
		||||
					filter: (val) =>
 | 
			
		||||
						val != null ? ['无类型', '进片数量统计', '出片数量统计'][val] : '',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'sectionDataType',
 | 
			
		||||
					label: '工段统计类型',
 | 
			
		||||
          width:120,
 | 
			
		||||
					filter: (val) =>
 | 
			
		||||
						val != null ? ['无类型', '进片数量统计', '出片数量统计'][val] : '',
 | 
			
		||||
				},
 | 
			
		||||
				// { prop: 'remark', label: '备注' },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'select',
 | 
			
		||||
					label: '产线',
 | 
			
		||||
					placeholder: '请选择产线',
 | 
			
		||||
					param: 'productionLineId',
 | 
			
		||||
					selectOptions: [],
 | 
			
		||||
					filterable: true,
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '设备名',
 | 
			
		||||
					placeholder: '请输入设备名称',
 | 
			
		||||
					param: 'equipmentName',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment-bind-section:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('base:quality-inspection-type:export')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '导出',
 | 
			
		||||
				// 	name: 'export',
 | 
			
		||||
				// 	color: 'warning',
 | 
			
		||||
				// },
 | 
			
		||||
			],
 | 
			
		||||
			rows: [
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '产线',
 | 
			
		||||
						prop: 'productionLineId',
 | 
			
		||||
						rules: [{ required: true, message: '产线名不能为空', trigger: 'blur' }],
 | 
			
		||||
						url: '/base/core-production-line/listAll',
 | 
			
		||||
						bind: { clearable: true, filterable: true },
 | 
			
		||||
						// watch: 'workshopSectionId'
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '工段',
 | 
			
		||||
						prop: 'workshopSectionId',
 | 
			
		||||
						depends: 'productionLineId',
 | 
			
		||||
						rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
 | 
			
		||||
						bind: { clearable: true, filterable: true },
 | 
			
		||||
						url: '/base/core-workshop-section/listByParentId',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '设备',
 | 
			
		||||
						prop: 'equipmentId',
 | 
			
		||||
						rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
 | 
			
		||||
						bind: { clearable: true, filterable: true },
 | 
			
		||||
						url: '/base/core-equipment/listAll',
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '工段排序',
 | 
			
		||||
						prop: 'sort',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						options: [
 | 
			
		||||
							{ label: '无类型', value: 0 },
 | 
			
		||||
							{ label: '进片数量统计', value: 1 },
 | 
			
		||||
							{ label: '出片数量统计', value: 2 },
 | 
			
		||||
						],
 | 
			
		||||
						label: '产线统计类型',
 | 
			
		||||
						prop: 'lineDataType',
 | 
			
		||||
						bind: {
 | 
			
		||||
							clearable: true, filterable: true
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '产线统计类型不能为空', trigger: 'change' }],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						options: [
 | 
			
		||||
							{ label: '无类型', value: 0 },
 | 
			
		||||
							{ label: '进片数量统计', value: 1 },
 | 
			
		||||
							{ label: '出片数量统计', value: 2 },
 | 
			
		||||
						],
 | 
			
		||||
						label: '工段统计类型',
 | 
			
		||||
						prop: 'sectionDataType',
 | 
			
		||||
						bind: {
 | 
			
		||||
							clearable: true, filterable: true
 | 
			
		||||
						},
 | 
			
		||||
						rules: [{ required: true, message: '工段统计类型不能为空', trigger: 'change' }],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			],
 | 
			
		||||
			// 是否显示弹出层
 | 
			
		||||
			open: false,
 | 
			
		||||
			// 查询参数
 | 
			
		||||
			queryParams: {
 | 
			
		||||
				pageNo: 1,
 | 
			
		||||
				pageSize: 10,
 | 
			
		||||
				equipmentName: null,
 | 
			
		||||
				productionLineId: null,
 | 
			
		||||
			},
 | 
			
		||||
			// 表单参数
 | 
			
		||||
			form: {},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		this.initSearchOptions();
 | 
			
		||||
		this.getList();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		/** 初始化查询条件 */
 | 
			
		||||
		async initSearchOptions() {
 | 
			
		||||
			this.http('/base/core-production-line/listAll', 'get').then(
 | 
			
		||||
				({ code, data }) => {
 | 
			
		||||
					if (code == 0) {
 | 
			
		||||
						this.searchBarFormConfig[0].selectOptions = data.map((item) => {
 | 
			
		||||
							return {
 | 
			
		||||
								name: item.name,
 | 
			
		||||
								id: item.id,
 | 
			
		||||
							};
 | 
			
		||||
						});
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			);
 | 
			
		||||
		},
 | 
			
		||||
		/** 查询列表 */
 | 
			
		||||
		getList() {
 | 
			
		||||
			this.loading = true;
 | 
			
		||||
			// 执行查询
 | 
			
		||||
			this.recv(this.queryParams).then(({ code, data }) => {
 | 
			
		||||
				// if (code == 0) {
 | 
			
		||||
				this.list = data.list;
 | 
			
		||||
				this.total = data.total;
 | 
			
		||||
				this.loading = false;
 | 
			
		||||
				// }
 | 
			
		||||
			});
 | 
			
		||||
			// .catch(err => {
 | 
			
		||||
			// 	this.list = [];
 | 
			
		||||
			// 	this.total = 0;
 | 
			
		||||
			// 	this.loading = false;
 | 
			
		||||
			// })
 | 
			
		||||
		},
 | 
			
		||||
		/** 取消按钮 */
 | 
			
		||||
		cancel() {
 | 
			
		||||
			this.open = false;
 | 
			
		||||
			this.reset();
 | 
			
		||||
		},
 | 
			
		||||
		/** 表单重置 */
 | 
			
		||||
		reset() {
 | 
			
		||||
			this.form = {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
				productionLineId: undefined,
 | 
			
		||||
				// 工段
 | 
			
		||||
				workshopSectionId: undefined,
 | 
			
		||||
				// 设备
 | 
			
		||||
				equipmentId: undefined,
 | 
			
		||||
				// 工段排序
 | 
			
		||||
				sort: undefined,
 | 
			
		||||
				// 产线统计类型
 | 
			
		||||
				lineDataType: undefined,
 | 
			
		||||
				// 工段统计类型
 | 
			
		||||
				sectionDataType: undefined,
 | 
			
		||||
			};
 | 
			
		||||
			this.resetForm('form');
 | 
			
		||||
		},
 | 
			
		||||
		/** 搜索按钮操作 */
 | 
			
		||||
		handleQuery() {
 | 
			
		||||
			this.queryParams.pageNo = 1;
 | 
			
		||||
			this.getList();
 | 
			
		||||
		},
 | 
			
		||||
		/** 重置按钮操作 */
 | 
			
		||||
		resetQuery() {
 | 
			
		||||
			this.resetForm('queryForm');
 | 
			
		||||
			this.handleQuery();
 | 
			
		||||
		},
 | 
			
		||||
		/** 新增按钮操作 */
 | 
			
		||||
		handleAdd() {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			this.open = true;
 | 
			
		||||
			this.title = '添加设备工段绑定';
 | 
			
		||||
		},
 | 
			
		||||
		/** 修改按钮操作 */
 | 
			
		||||
		handleUpdate(row) {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.info({ id }).then(({ code, data }) => {
 | 
			
		||||
				this.form = data;
 | 
			
		||||
				this.open = true;
 | 
			
		||||
				this.title = '修改设备工段绑定';
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 提交按钮 */
 | 
			
		||||
		submitForm() {
 | 
			
		||||
			this.$refs['form'].validate((valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				// 修改的提交
 | 
			
		||||
				if (this.form.id != null) {
 | 
			
		||||
					this.put(this.form).then(({ code, data }) => {
 | 
			
		||||
						this.$modal.msgSuccess('修改成功');
 | 
			
		||||
						this.open = false;
 | 
			
		||||
						this.getList();
 | 
			
		||||
					});
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				this.post(this.form).then(({ code, data }) => {
 | 
			
		||||
					this.$modal.msgSuccess('修改成功');
 | 
			
		||||
					this.open = false;
 | 
			
		||||
					this.getList();
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 删除按钮操作 */
 | 
			
		||||
		handleDelete(row) {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
      this.$modal
 | 
			
		||||
        .delConfirm(row.equipmentName)
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return deleteEquipmentType(id);
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
					this.$modal.msgSuccess('删除成功');
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
		/** 导出按钮操作 */
 | 
			
		||||
		handleExport() {
 | 
			
		||||
			// 处理查询参数
 | 
			
		||||
			let params = { ...this.queryParams };
 | 
			
		||||
			params.pageNo = undefined;
 | 
			
		||||
			params.pageSize = undefined;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认导出所有设备工段绑定?')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.exportLoading = true;
 | 
			
		||||
					// return exportEquipmentTypeExcel(params);
 | 
			
		||||
				})
 | 
			
		||||
				.then((response) => {
 | 
			
		||||
					this.$download.excel(response, '设备工段绑定.xls');
 | 
			
		||||
					this.exportLoading = false;
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										312
									
								
								src/views/devConfig/base/coreEquipmentType/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,312 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="app-container">
 | 
			
		||||
		<!-- 搜索工作栏 -->
 | 
			
		||||
		<SearchBar
 | 
			
		||||
			:formConfigs="searchBarFormConfig"
 | 
			
		||||
			ref="search-bar"
 | 
			
		||||
			@headBtnClick="handleSearchBarBtnClick" />
 | 
			
		||||
 | 
			
		||||
		<!-- 列表 -->
 | 
			
		||||
		<base-table
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="queryParams.pageNo"
 | 
			
		||||
			:limit="queryParams.pageSize"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
			@emitFun="handleEmitFun">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:width="120"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleTableBtnClick" />
 | 
			
		||||
		</base-table>
 | 
			
		||||
 | 
			
		||||
		<!-- 分页组件 -->
 | 
			
		||||
		<pagination
 | 
			
		||||
			v-show="total > 0"
 | 
			
		||||
			:total="total"
 | 
			
		||||
			:page.sync="queryParams.pageNo"
 | 
			
		||||
			:limit.sync="queryParams.pageSize"
 | 
			
		||||
			@pagination="getList" />
 | 
			
		||||
 | 
			
		||||
		<!-- 对话框(添加 / 修改) -->
 | 
			
		||||
		<base-dialog
 | 
			
		||||
			:dialogTitle="title"
 | 
			
		||||
			:dialogVisible="open"
 | 
			
		||||
			@close="cancel"
 | 
			
		||||
			@cancel="cancel"
 | 
			
		||||
			@confirm="submitForm">
 | 
			
		||||
			<DialogForm
 | 
			
		||||
				v-if="open"
 | 
			
		||||
				ref="form"
 | 
			
		||||
				v-model="form"
 | 
			
		||||
				:has-files="true"
 | 
			
		||||
				:rows="rows" />
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import moment from 'moment';
 | 
			
		||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
 | 
			
		||||
import {
 | 
			
		||||
	createEquipmentType,
 | 
			
		||||
	updateEquipmentType,
 | 
			
		||||
	deleteEquipmentType,
 | 
			
		||||
	getEquipmentType,
 | 
			
		||||
	getEquipmentTypePage,
 | 
			
		||||
	exportEquipmentTypeExcel,
 | 
			
		||||
} from '@/api/base/equipmentType';
 | 
			
		||||
 | 
			
		||||
// import { getAccessToken } from '@/utils/auth';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'EquipmentType',
 | 
			
		||||
	components: {},
 | 
			
		||||
	mixins: [basicPageMixin],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			searchBarKeys: ['name'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment-type:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '修改',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('base:core-equipment-type:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'createTime',
 | 
			
		||||
					label: '添加时间',
 | 
			
		||||
					fixed: true,
 | 
			
		||||
					width: 150,
 | 
			
		||||
					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
 | 
			
		||||
				},
 | 
			
		||||
				{ prop: 'name', label: '类型名称' },
 | 
			
		||||
				{ prop: 'code', label: '类型编号', width: 210 },
 | 
			
		||||
				{ prop: 'remark', label: '备注' },
 | 
			
		||||
			],
 | 
			
		||||
			searchBarFormConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '设备类型',
 | 
			
		||||
					placeholder: '设备类型',
 | 
			
		||||
					param: 'name',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-equipment-type:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	type: this.$auth.hasPermi('base:quality-inspection-type:export')
 | 
			
		||||
				// 		? 'button'
 | 
			
		||||
				// 		: '',
 | 
			
		||||
				// 	btnName: '导出',
 | 
			
		||||
				// 	name: 'export',
 | 
			
		||||
				// 	color: 'warning',
 | 
			
		||||
				// },
 | 
			
		||||
			],
 | 
			
		||||
			rows: [
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '类型名称',
 | 
			
		||||
						prop: 'name',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '类型名称不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
						// bind: {
 | 
			
		||||
						// 	disabled: true, // some condition, like detail mode...
 | 
			
		||||
						// }
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
						label: '类型编号',
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/core-equipment-type/getCode',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '类型编号不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						select: true,
 | 
			
		||||
						label: '父类',
 | 
			
		||||
						prop: 'parentId',
 | 
			
		||||
						url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
 | 
			
		||||
					},
 | 
			
		||||
					{},
 | 
			
		||||
				],
 | 
			
		||||
				[
 | 
			
		||||
					{
 | 
			
		||||
						upload: true,
 | 
			
		||||
						label: '上传资料',
 | 
			
		||||
						prop: 'files',
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				[{ input: true, label: '备注', prop: 'remark' }],
 | 
			
		||||
			],
 | 
			
		||||
			// 是否显示弹出层
 | 
			
		||||
			open: false,
 | 
			
		||||
			// 查询参数
 | 
			
		||||
			queryParams: {
 | 
			
		||||
				pageNo: 1,
 | 
			
		||||
				pageSize: 10,
 | 
			
		||||
				name: '',
 | 
			
		||||
			},
 | 
			
		||||
			// 表单参数
 | 
			
		||||
			form: {
 | 
			
		||||
				code: undefined,
 | 
			
		||||
				name: undefined,
 | 
			
		||||
				id: undefined,
 | 
			
		||||
				parentId: undefined,
 | 
			
		||||
				remark: undefined,
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		// form: {
 | 
			
		||||
		// 	handler: function (val, oldVal) {
 | 
			
		||||
		// 		console.log('[watch:form]', val, oldVal);
 | 
			
		||||
		// 	},
 | 
			
		||||
		// 	deep: true,
 | 
			
		||||
		// },
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		this.getList();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		/** 查询列表 */
 | 
			
		||||
		getList() {
 | 
			
		||||
			this.loading = true;
 | 
			
		||||
			// 执行查询
 | 
			
		||||
			getEquipmentTypePage(this.queryParams).then((response) => {
 | 
			
		||||
				this.list = response.data.list;
 | 
			
		||||
				this.total = response.data.total;
 | 
			
		||||
				this.loading = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 取消按钮 */
 | 
			
		||||
		cancel() {
 | 
			
		||||
			this.open = false;
 | 
			
		||||
			this.reset();
 | 
			
		||||
		},
 | 
			
		||||
		/** 表单重置 */
 | 
			
		||||
		reset() {
 | 
			
		||||
			this.form = {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
				code: undefined,
 | 
			
		||||
				name: undefined,
 | 
			
		||||
				parentId: undefined,
 | 
			
		||||
				remark: undefined,
 | 
			
		||||
			};
 | 
			
		||||
			this.resetForm('form');
 | 
			
		||||
		},
 | 
			
		||||
		/** 搜索按钮操作 */
 | 
			
		||||
		handleQuery() {
 | 
			
		||||
			this.queryParams.pageNo = 1;
 | 
			
		||||
			this.getList();
 | 
			
		||||
		},
 | 
			
		||||
		/** 重置按钮操作 */
 | 
			
		||||
		resetQuery() {
 | 
			
		||||
			this.resetForm('queryForm');
 | 
			
		||||
			this.handleQuery();
 | 
			
		||||
		},
 | 
			
		||||
		/** 新增按钮操作 */
 | 
			
		||||
		handleAdd() {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			this.open = true;
 | 
			
		||||
			this.title = '添加设备类型';
 | 
			
		||||
		},
 | 
			
		||||
		/** 修改按钮操作 */
 | 
			
		||||
		handleUpdate(row) {
 | 
			
		||||
			this.reset();
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			getEquipmentType(id).then((response) => {
 | 
			
		||||
				this.form = response.data;
 | 
			
		||||
				this.open = true;
 | 
			
		||||
				this.title = '修改设备类型';
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 提交按钮 */
 | 
			
		||||
		submitForm() {
 | 
			
		||||
			this.$refs['form'].validate((valid) => {
 | 
			
		||||
				if (!valid) {
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				// 修改的提交
 | 
			
		||||
				if (this.form.id != null) {
 | 
			
		||||
					updateEquipmentType(this.form).then((response) => {
 | 
			
		||||
						this.$modal.msgSuccess('修改成功');
 | 
			
		||||
						this.open = false;
 | 
			
		||||
						this.getList();
 | 
			
		||||
					});
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				// 添加的提交
 | 
			
		||||
				createEquipmentType(this.form).then((response) => {
 | 
			
		||||
					this.$modal.msgSuccess('新增成功');
 | 
			
		||||
					this.open = false;
 | 
			
		||||
					this.getList();
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		/** 删除按钮操作 */
 | 
			
		||||
		handleDelete(row) {
 | 
			
		||||
			const id = row.id;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.delConfirm(row.name)
 | 
			
		||||
				.then(function () {
 | 
			
		||||
					return deleteEquipmentType(id);
 | 
			
		||||
				})
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.getList();
 | 
			
		||||
					this.$modal.msgSuccess('删除成功');
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
		/** 导出按钮操作 */
 | 
			
		||||
		handleExport() {
 | 
			
		||||
			// 处理查询参数
 | 
			
		||||
			let params = { ...this.queryParams };
 | 
			
		||||
			params.pageNo = undefined;
 | 
			
		||||
			params.pageSize = undefined;
 | 
			
		||||
			this.$modal
 | 
			
		||||
				.confirm('是否确认导出所有设备类型数据项?')
 | 
			
		||||
				.then(() => {
 | 
			
		||||
					this.exportLoading = true;
 | 
			
		||||
					return exportEquipmentTypeExcel(params);
 | 
			
		||||
				})
 | 
			
		||||
				.then((response) => {
 | 
			
		||||
					this.$download.excel(response, '设备类型.xls');
 | 
			
		||||
					this.exportLoading = false;
 | 
			
		||||
				})
 | 
			
		||||
				.catch(() => {});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										163
									
								
								src/views/devConfig/base/coreProductionLine/add-or-updata.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,163 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-09-25 10:24:33
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
	<el-form
 | 
			
		||||
		:model="dataForm"
 | 
			
		||||
		:rules="dataRule"
 | 
			
		||||
		ref="dataForm"
 | 
			
		||||
		@keyup.enter.native="dataFormSubmit()"
 | 
			
		||||
		label-width="100px">
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="产线名称" prop="name">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-model="dataForm.name"
 | 
			
		||||
						clearable
 | 
			
		||||
						placeholder="请输入产线名称" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="产线编号" prop="code">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-model="dataForm.code"
 | 
			
		||||
						clearable
 | 
			
		||||
						placeholder="请输入产线编号" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="工厂名称" prop="factoryId">
 | 
			
		||||
					<el-select
 | 
			
		||||
						v-model="dataForm.factoryId"
 | 
			
		||||
						filterable
 | 
			
		||||
						placeholder="请选择工厂"
 | 
			
		||||
						style="width: 100%">
 | 
			
		||||
						<el-option
 | 
			
		||||
							v-for="dict in factoryList"
 | 
			
		||||
							:key="dict.id"
 | 
			
		||||
							:label="dict.name"
 | 
			
		||||
							:value="dict.id" />
 | 
			
		||||
					</el-select>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="归属部门" prop="deptId">
 | 
			
		||||
					<treeselect
 | 
			
		||||
						v-model="dataForm.deptId"
 | 
			
		||||
						:options="deptOptions"
 | 
			
		||||
						:show-count="true"
 | 
			
		||||
						:clearable="false"
 | 
			
		||||
						placeholder="请选择归属部门"
 | 
			
		||||
						:normalizer="normalizer" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="产线TT值(h)" prop="tvalue">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-model.number="dataForm.tvalue"
 | 
			
		||||
						type="number"
 | 
			
		||||
						placeholder="TT值" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="描述信息" prop="description">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-model="dataForm.description"
 | 
			
		||||
						placeholder="请输入描述信息" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="备注" prop="remark">
 | 
			
		||||
					<el-input v-model="dataForm.remark" placeholder="请输入备注" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
	</el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicAdd from '@/mixins/basic-add';
 | 
			
		||||
import {
 | 
			
		||||
	createCorePL,
 | 
			
		||||
	updateCorePL,
 | 
			
		||||
	getCorePL,
 | 
			
		||||
	getCode,
 | 
			
		||||
} from '@/api/base/coreProductionLine';
 | 
			
		||||
import { getFactoryList } from '@/api/core/base/factory';
 | 
			
		||||
import { listSimpleDepts } from '@/api/system/dept';
 | 
			
		||||
import Treeselect from '@riophae/vue-treeselect';
 | 
			
		||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicAdd],
 | 
			
		||||
	components: { Treeselect },
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
				isGetCode: true,
 | 
			
		||||
				codeURL: getCode,
 | 
			
		||||
				createURL: createCorePL,
 | 
			
		||||
				updateURL: updateCorePL,
 | 
			
		||||
				infoURL: getCorePL,
 | 
			
		||||
			},
 | 
			
		||||
			// 部门树选项
 | 
			
		||||
			deptOptions: undefined,
 | 
			
		||||
			dataForm: {
 | 
			
		||||
				id: undefined,
 | 
			
		||||
				code: undefined,
 | 
			
		||||
				name: undefined,
 | 
			
		||||
				description: undefined,
 | 
			
		||||
				tvalue: 0,
 | 
			
		||||
				factoryId: undefined,
 | 
			
		||||
				deptId: undefined,
 | 
			
		||||
				remark: undefined,
 | 
			
		||||
			},
 | 
			
		||||
			factoryList: [],
 | 
			
		||||
			dataRule: {
 | 
			
		||||
				code: [
 | 
			
		||||
					{ required: true, message: '产线编号不能为空', trigger: 'blur' },
 | 
			
		||||
				],
 | 
			
		||||
				name: [
 | 
			
		||||
					{ required: true, message: '产线名称不能为空', trigger: 'blur' },
 | 
			
		||||
				],
 | 
			
		||||
				factoryId: [
 | 
			
		||||
					{ required: true, message: '工厂不能为空', trigger: 'blur' },
 | 
			
		||||
				],
 | 
			
		||||
			},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getDict();
 | 
			
		||||
    this.getTreeselect()
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		async getDict() {
 | 
			
		||||
			// 工厂列表
 | 
			
		||||
			const factoryRes = await getFactoryList();
 | 
			
		||||
			this.factoryList = factoryRes.data;
 | 
			
		||||
		},
 | 
			
		||||
		/** 查询部门下拉树结构 */
 | 
			
		||||
		getTreeselect() {
 | 
			
		||||
			listSimpleDepts().then((response) => {
 | 
			
		||||
				// 处理 deptOptions 参数
 | 
			
		||||
				this.deptOptions = [];
 | 
			
		||||
				this.deptOptions.push(...this.handleTree(response.data, 'id'));
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		// 格式化部门的下拉框
 | 
			
		||||
		normalizer(node) {
 | 
			
		||||
			return {
 | 
			
		||||
				id: node.id,
 | 
			
		||||
				label: node.name,
 | 
			
		||||
				children: node.children,
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										204
									
								
								src/views/devConfig/base/coreProductionLine/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,204 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="app-container">
 | 
			
		||||
		<search-bar
 | 
			
		||||
			:formConfigs="formConfig"
 | 
			
		||||
			ref="searchBarForm"
 | 
			
		||||
			@headBtnClick="buttonClick" />
 | 
			
		||||
		<base-table
 | 
			
		||||
			v-loading="dataListLoading"
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="listQuery.pageNo"
 | 
			
		||||
			:limit="listQuery.pageSize"
 | 
			
		||||
			:table-data="tableData">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				:width="120"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleClick" />
 | 
			
		||||
		</base-table>
 | 
			
		||||
		<pagination
 | 
			
		||||
			:limit.sync="listQuery.pageSize"
 | 
			
		||||
			:page.sync="listQuery.pageNo"
 | 
			
		||||
			:total="listQuery.total"
 | 
			
		||||
			@pagination="getDataList" />
 | 
			
		||||
		<base-dialog
 | 
			
		||||
			:dialogTitle="addOrEditTitle"
 | 
			
		||||
			:dialogVisible="addOrUpdateVisible"
 | 
			
		||||
			@cancel="handleCancel"
 | 
			
		||||
			@confirm="handleConfirm"
 | 
			
		||||
			:before-close="handleCancel"
 | 
			
		||||
			width="50%">
 | 
			
		||||
			<add-or-update
 | 
			
		||||
				ref="addOrUpdate"
 | 
			
		||||
				@refreshDataList="successSubmit"></add-or-update>
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import AddOrUpdate from './add-or-updata';
 | 
			
		||||
import basicPage from '@/mixins/basic-page';
 | 
			
		||||
import { parseTime } from '@/mixins/code-filter';
 | 
			
		||||
import codeFilter from '@/mixins/code-filter';
 | 
			
		||||
import { getCorePLPage, deleteCorePL } from '@/api/base/coreProductionLine';
 | 
			
		||||
import { getStatus } from '@/api/core/base/productionLine';
 | 
			
		||||
 | 
			
		||||
const tableProps = [
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'createTime',
 | 
			
		||||
		label: '添加时间',
 | 
			
		||||
		filter: parseTime,
 | 
			
		||||
		width: 150,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'factoryName',
 | 
			
		||||
		label: '工厂',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'departmentName',
 | 
			
		||||
		label: '归属部门',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'name',
 | 
			
		||||
		label: '产线名称',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'code',
 | 
			
		||||
		label: '产线编码',
 | 
			
		||||
		width: 150,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'enabled',
 | 
			
		||||
		label: '当前状态',
 | 
			
		||||
		filter: codeFilter('lineStatus'),
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'tvalue',
 | 
			
		||||
		label: '产线TT值(h)',
 | 
			
		||||
		width: 100,
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'description',
 | 
			
		||||
		label: '描述',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'remark',
 | 
			
		||||
		label: '备注',
 | 
			
		||||
	},
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicPage],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
				getDataListURL: getCorePLPage,
 | 
			
		||||
				deleteURL: deleteCorePL,
 | 
			
		||||
			},
 | 
			
		||||
			tableProps,
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi(`base:core-production-line:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '编辑',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi(`base:core-production-line:delete`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableData: [],
 | 
			
		||||
			formConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '产线名称',
 | 
			
		||||
					placeholder: '产线名称',
 | 
			
		||||
					param: 'name',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-production-line:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					color: 'success',
 | 
			
		||||
					plain: true,
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	components: {
 | 
			
		||||
		AddOrUpdate,
 | 
			
		||||
	},
 | 
			
		||||
	created() {},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 获取数据列表
 | 
			
		||||
		getDataList() {
 | 
			
		||||
			this.dataListLoading = true;
 | 
			
		||||
			this.urlOptions.getDataListURL(this.listQuery).then((response) => {
 | 
			
		||||
				// this.tableData = response.data.list;
 | 
			
		||||
				this.getStatus(response.data.list);
 | 
			
		||||
				this.listQuery.total = response.data.total;
 | 
			
		||||
				this.dataListLoading = false;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		getStatus(list) {
 | 
			
		||||
			const ids = list.map((i) => {
 | 
			
		||||
				return i.id;
 | 
			
		||||
			});
 | 
			
		||||
			console.log('111', ids);
 | 
			
		||||
			getStatus(ids).then((response) => {
 | 
			
		||||
				response.forEach((a) => {
 | 
			
		||||
					list.forEach((b) => {
 | 
			
		||||
						if (b.id === a.id) b.enabled = a.status;
 | 
			
		||||
					});
 | 
			
		||||
				});
 | 
			
		||||
				this.tableData = list;
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		buttonClick(val) {
 | 
			
		||||
			switch (val.btnName) {
 | 
			
		||||
				case 'search':
 | 
			
		||||
					this.listQuery.pageNo = 1;
 | 
			
		||||
					this.listQuery.pageSize = 10;
 | 
			
		||||
					this.listQuery.name = val.name ? val.name : undefined;
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'reset':
 | 
			
		||||
					this.$refs.searchBarForm.resetForm();
 | 
			
		||||
					this.listQuery = {
 | 
			
		||||
						pageSize: 10,
 | 
			
		||||
						pageNo: 1,
 | 
			
		||||
						total: 1,
 | 
			
		||||
					};
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'add':
 | 
			
		||||
					this.addOrEditTitle = '新增';
 | 
			
		||||
					this.addOrUpdateVisible = true;
 | 
			
		||||
					this.addOrUpdateHandle();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'export':
 | 
			
		||||
					this.handleExport();
 | 
			
		||||
					break;
 | 
			
		||||
				default:
 | 
			
		||||
					console.log(val);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										105
									
								
								src/views/devConfig/base/coreWorkshopSection/add-or-updata.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,105 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2024-09-24 14:49:25
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
	<el-form
 | 
			
		||||
		:model="dataForm"
 | 
			
		||||
		:rules="dataRule"
 | 
			
		||||
		ref="dataForm"
 | 
			
		||||
		@keyup.enter.native="dataFormSubmit()"
 | 
			
		||||
		label-width="80px">
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="工段名称" prop="name">
 | 
			
		||||
					<el-input v-model="dataForm.name" clearable placeholder="请输入工段名称" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="工段编号" prop="code">
 | 
			
		||||
					<el-input v-model="dataForm.code" clearable placeholder="请输入工段编号" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="产线" prop="productionLineId">
 | 
			
		||||
					<el-select
 | 
			
		||||
						v-model="dataForm.productionLineId"
 | 
			
		||||
						filterable
 | 
			
		||||
						placeholder="请选择产线">
 | 
			
		||||
						<el-option
 | 
			
		||||
							v-for="dict in proLineList"
 | 
			
		||||
							:key="dict.id"
 | 
			
		||||
							:label="dict.name"
 | 
			
		||||
							:value="dict.id" />
 | 
			
		||||
					</el-select>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="排序" prop="sort">
 | 
			
		||||
					<el-input-number
 | 
			
		||||
						v-model="dataForm.sort"
 | 
			
		||||
						controls-position="right"
 | 
			
		||||
						placeholder="排序"
 | 
			
		||||
						style="width: 100%" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-form-item label="备注" prop="remark">
 | 
			
		||||
			<el-input
 | 
			
		||||
				v-model="dataForm.remark"
 | 
			
		||||
				placeholder="请输入备注" />
 | 
			
		||||
		</el-form-item>
 | 
			
		||||
	</el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicAdd from '@/mixins/basic-add';
 | 
			
		||||
import { createCWSection, updateCWSection, getCWSection, getCode } from "@/api/base/coreWorkshopSection";
 | 
			
		||||
import { getCorePLList } from '@/api/base/coreProductionLine';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicAdd],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
			  isGetCode: true,
 | 
			
		||||
        codeURL: getCode,
 | 
			
		||||
				createURL: createCWSection,
 | 
			
		||||
				updateURL: updateCWSection,
 | 
			
		||||
				infoURL: getCWSection
 | 
			
		||||
			},
 | 
			
		||||
			dataForm: {
 | 
			
		||||
        id: undefined,
 | 
			
		||||
        code: undefined,
 | 
			
		||||
        name: undefined,
 | 
			
		||||
        description: undefined,
 | 
			
		||||
				sort: 0,
 | 
			
		||||
				productionLineId: undefined,
 | 
			
		||||
        remark: undefined,
 | 
			
		||||
			},
 | 
			
		||||
			proLineList: [],
 | 
			
		||||
			dataRule: {
 | 
			
		||||
        code: [{ required: true, message: "工段编号不能为空", trigger: "blur" }],
 | 
			
		||||
        name: [{ required: true, message: "工段名称不能为空", trigger: "blur" }],
 | 
			
		||||
				productionLineId: [{ required: true, message: "产线不能为空", trigger: "blur" }],
 | 
			
		||||
        sort: [{ required: true, message: "排序不能为空", trigger: "blur" }]
 | 
			
		||||
      }
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getDict()
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		async getDict() {
 | 
			
		||||
			// 产线列表
 | 
			
		||||
			const res = await getCorePLList();
 | 
			
		||||
			this.proLineList = res.data;
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										165
									
								
								src/views/devConfig/base/coreWorkshopSection/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,165 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="app-container">
 | 
			
		||||
		<search-bar
 | 
			
		||||
			:formConfigs="formConfig"
 | 
			
		||||
			ref="searchBarForm"
 | 
			
		||||
			@headBtnClick="buttonClick" />
 | 
			
		||||
		<base-table
 | 
			
		||||
			v-loading="dataListLoading"
 | 
			
		||||
			:table-props="tableProps"
 | 
			
		||||
			:page="listQuery.pageNo"
 | 
			
		||||
			:limit="listQuery.pageSize"
 | 
			
		||||
			:table-data="tableData">
 | 
			
		||||
			<method-btn
 | 
			
		||||
				v-if="tableBtn.length"
 | 
			
		||||
				slot="handleBtn"
 | 
			
		||||
				:width="120"
 | 
			
		||||
				label="操作"
 | 
			
		||||
				:method-list="tableBtn"
 | 
			
		||||
				@clickBtn="handleClick" />
 | 
			
		||||
		</base-table>
 | 
			
		||||
		<pagination
 | 
			
		||||
			:limit.sync="listQuery.pageSize"
 | 
			
		||||
			:page.sync="listQuery.pageNo"
 | 
			
		||||
			:total="listQuery.total"
 | 
			
		||||
			@pagination="getDataList" />
 | 
			
		||||
		<base-dialog
 | 
			
		||||
			:dialogTitle="addOrEditTitle"
 | 
			
		||||
			:dialogVisible="addOrUpdateVisible"
 | 
			
		||||
			@cancel="handleCancel"
 | 
			
		||||
			@confirm="handleConfirm"
 | 
			
		||||
			:before-close="handleCancel"
 | 
			
		||||
			width="40%">
 | 
			
		||||
			<add-or-update
 | 
			
		||||
				ref="addOrUpdate"
 | 
			
		||||
				@refreshDataList="successSubmit"></add-or-update>
 | 
			
		||||
		</base-dialog>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import AddOrUpdate from './add-or-updata';
 | 
			
		||||
import basicPage from '@/mixins/basic-page';
 | 
			
		||||
import { parseTime } from '@/mixins/code-filter';
 | 
			
		||||
import {
 | 
			
		||||
	getCWSectionPage,
 | 
			
		||||
	deleteCWSection
 | 
			
		||||
} from '@/api/base/coreWorkshopSection';
 | 
			
		||||
 | 
			
		||||
const tableProps = [
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'createTime',
 | 
			
		||||
		label: '添加时间',
 | 
			
		||||
		filter: parseTime,
 | 
			
		||||
    width:150
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'code',
 | 
			
		||||
		label: '工段编码',
 | 
			
		||||
    width:150
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'name',
 | 
			
		||||
		label: '工段名称'
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'productionLineName',
 | 
			
		||||
		label: '产线名'
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'sort',
 | 
			
		||||
		label: '排序'
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		prop: 'remark',
 | 
			
		||||
		label: '备注'
 | 
			
		||||
	},
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicPage],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
				getDataListURL: getCWSectionPage,
 | 
			
		||||
				deleteURL: deleteCWSection
 | 
			
		||||
			},
 | 
			
		||||
			tableProps,
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi(`base:core-workshop-section:update`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
							btnName: '编辑',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
          this.$auth.hasPermi(`base:core-workshop-section:delete`)
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
							btnName: '删除',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v)=>v),
 | 
			
		||||
			tableData: [],
 | 
			
		||||
			formConfig: [
 | 
			
		||||
				{
 | 
			
		||||
					type: 'input',
 | 
			
		||||
					label: '工段名称',
 | 
			
		||||
					placeholder: '工段名称',
 | 
			
		||||
					param: 'name'
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '查询',
 | 
			
		||||
					name: 'search',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('base:core-workshop-section:create') ? 'button' : '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
					name: 'add',
 | 
			
		||||
					color: 'success',
 | 
			
		||||
					plain: true
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	components: {
 | 
			
		||||
		AddOrUpdate,
 | 
			
		||||
	},
 | 
			
		||||
	created() {},
 | 
			
		||||
	methods: {
 | 
			
		||||
		buttonClick(val) {
 | 
			
		||||
			switch (val.btnName) {
 | 
			
		||||
				case 'search':
 | 
			
		||||
					this.listQuery.pageNo = 1;
 | 
			
		||||
					this.listQuery.pageSize = 10;
 | 
			
		||||
					this.listQuery.name = val.name ? val.name : undefined;
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'reset':
 | 
			
		||||
					this.$refs.searchBarForm.resetForm();
 | 
			
		||||
					this.listQuery = {
 | 
			
		||||
						pageSize: 10,
 | 
			
		||||
						pageNo: 1,
 | 
			
		||||
						total: 1,
 | 
			
		||||
					};
 | 
			
		||||
					this.getDataList();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'add':
 | 
			
		||||
					this.addOrEditTitle = '新增';
 | 
			
		||||
					this.addOrUpdateVisible = true;
 | 
			
		||||
					this.addOrUpdateHandle();
 | 
			
		||||
					break;
 | 
			
		||||
				case 'export':
 | 
			
		||||
					this.handleExport();
 | 
			
		||||
					break;
 | 
			
		||||
				default:
 | 
			
		||||
					console.log(val);
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										90
									
								
								src/views/devConfig/base/factory/add-or-updata.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,90 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-03 16:32:52
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
	<el-form
 | 
			
		||||
		:model="dataForm"
 | 
			
		||||
		:rules="dataRule"
 | 
			
		||||
		ref="dataForm"
 | 
			
		||||
		@keyup.enter.native="dataFormSubmit()"
 | 
			
		||||
		label-width="80px">
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="工厂名称" prop="name">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-model="dataForm.name"
 | 
			
		||||
						clearable
 | 
			
		||||
						placeholder="请输入工厂名称" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="工厂编码" prop="code">
 | 
			
		||||
					<el-input
 | 
			
		||||
						v-model="dataForm.code"
 | 
			
		||||
						clearable
 | 
			
		||||
						placeholder="请输入工厂编码" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
		<el-row :gutter="20">
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="地址" prop="address">
 | 
			
		||||
					<el-input v-model="dataForm.address" clearable placeholder="请输入地址" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		<!-- <el-form-item label="启用状态" prop="enabled">
 | 
			
		||||
			<el-select
 | 
			
		||||
				v-model="dataForm.enabled"
 | 
			
		||||
				placeholder="请选择启用状态">
 | 
			
		||||
				<el-option
 | 
			
		||||
					v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
 | 
			
		||||
					:key="dict.value"
 | 
			
		||||
					:label="dict.label"
 | 
			
		||||
					:value="dict.value" />
 | 
			
		||||
			</el-select>
 | 
			
		||||
		</el-form-item> -->
 | 
			
		||||
			<el-col :span="12">
 | 
			
		||||
				<el-form-item label="备注" prop="remark">
 | 
			
		||||
					<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-col>
 | 
			
		||||
		</el-row>
 | 
			
		||||
	</el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicAdd from '@/mixins/basic-add';
 | 
			
		||||
import { createFactory, updateFactory, getFactory, getCode } from "@/api/core/base/factory";
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	mixins: [basicAdd],
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			urlOptions: {
 | 
			
		||||
			  isGetCode: true,
 | 
			
		||||
        codeURL: getCode,
 | 
			
		||||
				createURL: createFactory,
 | 
			
		||||
				updateURL: updateFactory,
 | 
			
		||||
				infoURL: getFactory,
 | 
			
		||||
			},
 | 
			
		||||
			dataForm: {
 | 
			
		||||
        id: undefined,
 | 
			
		||||
        code: undefined,
 | 
			
		||||
        name: undefined,
 | 
			
		||||
        address: undefined,
 | 
			
		||||
        remark: undefined,
 | 
			
		||||
			},
 | 
			
		||||
			dataRule: {
 | 
			
		||||
        code: [{ required: true, message: "工厂编码不能为空", trigger: "blur" }],
 | 
			
		||||
        name: [{ required: true, message: "工厂名称不能为空", trigger: "blur" }],
 | 
			
		||||
      }
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||