Compare commits
186 Commits
projects/m
...
projects/m
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c7c10205e | |||
|
|
74003e9d89 | ||
|
|
cb72e2b68a | ||
| 025b061ec2 | |||
|
|
f2912eaee1 | ||
|
|
8025d00709 | ||
| 60edd8f2c4 | |||
| c0214c9eb7 | |||
| da85e5211a | |||
| 23afb0db0d | |||
| d0adf3a63e | |||
|
|
b81c95f796 | ||
| e7f21456a3 | |||
|
|
1537b1be58 | ||
|
|
b2304941a4 | ||
| 14b2a49053 | |||
|
|
6adac714f0 | ||
|
|
0349f3cde0 | ||
|
|
4cafa78908 | ||
| 61ef172534 | |||
|
|
19d913a49e | ||
|
|
70c3fd44d6 | ||
| 78d6f0bb23 | |||
|
|
cf51eff0b7 | ||
|
|
539dddf217 | ||
|
|
317d01934b | ||
|
|
cdfe5c9c1b | ||
| c1ea5157a5 | |||
| 41ceefc20e | |||
| 54425859b5 | |||
| a2a4f8dccd | |||
|
|
fd3b054108 | ||
|
|
dacae0cbd8 | ||
|
|
be83c8196e | ||
|
|
ef3f5d3fe7 | ||
|
|
ec550f22ec | ||
|
|
60633ac581 | ||
|
|
9351b82d11 | ||
| 5e4227ba25 | |||
| 82f63dc4ff | |||
| 9a29185410 | |||
| 43e824f958 | |||
|
|
de831b339f | ||
|
|
f0105c377c | ||
| 3ba5574669 | |||
|
|
082988d6d7 | ||
|
|
7acb861919 | ||
| c41153a946 | |||
| 6d658d9212 | |||
| bf4bab2f3c | |||
| 20f0efa413 | |||
|
|
c48f81b1d9 | ||
|
|
7233720c2e | ||
| 6a491ff498 | |||
|
|
be607e4bf3 | ||
|
|
87ef42e277 | ||
| aa65a7e97e | |||
|
|
b8d26c87d8 | ||
| b89f510e61 | |||
|
|
0e60f426bc | ||
|
|
21f4879394 | ||
| 067cd4765e | |||
| 3c4fe6daaa | |||
|
|
e24f9c1079 | ||
|
|
61567ce86a | ||
| 2ee66714ca | |||
| ab5867c4fd | |||
| 9a53391999 | |||
| ec0c09a674 | |||
|
|
90e9b179eb | ||
|
|
8e2b332c7b | ||
| f37a12d2e1 | |||
| cb19872012 | |||
|
|
8ba79185d4 | ||
|
|
104cda5a41 | ||
|
|
151c5708c4 | ||
| 837735b7e8 | |||
|
|
e00a08385f | ||
|
|
a8c3d2c585 | ||
| eb097e77bd | |||
|
|
30eecb8bd1 | ||
|
|
f4a6229170 | ||
| ab593bff20 | |||
| 4b01dd3ec3 | |||
| ed3ea7dde8 | |||
| 1d9e272f99 | |||
|
|
43c9153777 | ||
|
|
c6d504583b | ||
|
|
22f3c87f02 | ||
|
|
1f54c9179d | ||
| f7247f5161 | |||
|
|
c8856f34b5 | ||
|
|
42c42abc08 | ||
| 0fffed9b0e | |||
|
|
d251daa3f5 | ||
|
|
ed5120ca97 | ||
|
|
becf34d089 | ||
| f0d64de77b | |||
| 56819176b3 | |||
| d302179f6f | |||
| 8c117fae8e | |||
|
|
b6cf7b2ddc | ||
|
|
2f98b42bd2 | ||
| fb8ae9226a | |||
| 3d3763c4ef | |||
| ea675b9dea | |||
| bda065e4be | |||
|
|
5ea4c219ed | ||
|
|
16186667da | ||
|
|
c7cd6e7b1e | ||
|
|
29c3a9fb72 | ||
|
|
1e1313d090 | ||
| d0eb1d84c8 | |||
|
|
445d8f4818 | ||
|
|
46ce982cfc | ||
| 391e06a382 | |||
| 72e1b4e8f9 | |||
| b41ba04cb4 | |||
|
|
4482ce0433 | ||
|
|
ecf6745c8a | ||
| c9128ce946 | |||
| ba08175de8 | |||
|
|
22f8322baf | ||
|
|
6f8abc9758 | ||
| 59d53b60c7 | |||
| d448280782 | |||
| 0337b54202 | |||
|
|
9dec81e0b2 | ||
|
|
64de2c50b6 | ||
|
|
bd0f9e24fd | ||
|
|
f3043ee11f | ||
| 5584a47575 | |||
| b0078cb099 | |||
| e5acd497b5 | |||
| 6b452dce36 | |||
| aacf87f6d3 | |||
|
|
bfa17e422d | ||
|
|
e25f872589 | ||
| 83b834d2fc | |||
| 1b2c16fcdb | |||
| 475ec35ec5 | |||
| 1328da9616 | |||
| 92b9ec7da7 | |||
| c1af47db81 | |||
| 15afbcd612 | |||
|
|
dabbc6b63a | ||
|
|
cfab3353d3 | ||
|
|
2298fc56b6 | ||
| bb77d0f8c6 | |||
|
|
e8938a62eb | ||
|
|
2a599d96b3 | ||
|
|
6050eb4df5 | ||
| 02c3b3db0d | |||
| 3308fcbef9 | |||
| cb7135bad5 | |||
| 4a56f92961 | |||
|
|
8f11c2f47c | ||
|
|
b41dc9593c | ||
| 862fe20760 | |||
| 1ed409a98e | |||
| 68e738cf12 | |||
|
|
4866198a98 | ||
|
|
49df8a72bd | ||
|
|
087af452de | ||
|
|
63a753d7d6 | ||
| b1cdf083dd | |||
| 673ddcb996 | |||
| a9e60dbe82 | |||
|
|
92d197a513 | ||
|
|
e7f440a142 | ||
| 5d3622bf62 | |||
| 5ccb9297e1 | |||
| ce528f18b6 | |||
|
|
024060182e | ||
|
|
4f111a95d6 | ||
| 8fc6b73179 | |||
| 7f504e5cdd | |||
| 7c5d8bde0b | |||
|
|
0b1761e83c | ||
|
|
cafa156d72 | ||
| ed46ed7d09 | |||
|
|
f89c6dfe14 | ||
|
|
a3b2eae33f | ||
| e70ff40554 | |||
| 93236f9828 | |||
|
|
fef8824844 |
@@ -1,3 +1,3 @@
|
||||
.dockerignore
|
||||
dist
|
||||
#dist
|
||||
node_modules
|
||||
|
||||
59
.drone.yml
Normal file
59
.drone.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node:16-alpine
|
||||
pull: if_not_exists
|
||||
environment:
|
||||
NODE_ENV: ""
|
||||
commands:
|
||||
#- yarn install --frozen-lockfile
|
||||
- yarn install
|
||||
- env ${NODE_ENV} yarn build:prod
|
||||
|
||||
- name: publish
|
||||
image: docker:dind
|
||||
pull: if_not_exists
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
- name: dockerconfig
|
||||
path: /root/.docker
|
||||
commands:
|
||||
- docker build -t hub.kszny.picaiba.com/kszny/xcac-ui ./
|
||||
- docker push hub.kszny.picaiba.com/kszny/xcac-ui
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
pull: if-not-exists
|
||||
settings:
|
||||
host:
|
||||
- 172.24.145.74
|
||||
username: root
|
||||
password: Root@123
|
||||
port: 22
|
||||
command_timeout: 2m
|
||||
script:
|
||||
- docker pull hub.kszny.picaiba.com/kszny/xcac-ui
|
||||
- docker run --rm -v /data/www/xcac:/tmp hub.kszny.picaiba.com/kszny/xcac-ui sh -c "rm -rf /tmp/* && mv -f /html /tmp"
|
||||
depends_on:
|
||||
- publish
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
- name: dockerconfig
|
||||
host:
|
||||
path: /root/.docker
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- projects/mesxc-test
|
||||
event:
|
||||
- push
|
||||
37
.env.dev
37
.env.dev
@@ -1,8 +1,8 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2024-04-08 16:46:49
|
||||
# @LastEditors: DY
|
||||
# @Author: zhp
|
||||
# @Date: 2024-04-12 14:30:48
|
||||
# @LastEditTime: 2024-04-25 10:07:02
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
# 开发环境配置
|
||||
@@ -12,26 +12,19 @@ ENV = 'development'
|
||||
VUE_APP_TITLE = MES系统
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
||||
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.20:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.173:9001'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
|
||||
# socket地址
|
||||
# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
# VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
|
||||
VUE_APP_Socket_Dcs_API = 'ws://192.168.0.33:8080'
|
||||
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
|
||||
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
|
||||
|
||||
# socket地址(现场)
|
||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
# socket地址(公司线上)
|
||||
# VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
|
||||
# socket dcs地址(只有现场)
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
###
|
||||
# @Author: zhp
|
||||
# @Date: 2023-11-07 19:11:40
|
||||
# @LastEditTime: 2023-11-16 16:40:59
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
# 生产环境配置
|
||||
# 生产环境配置(许昌现场)
|
||||
ENV = 'production'
|
||||
|
||||
# 页面标题
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# 生产环境配置
|
||||
# 公司线上环境(33服务器)
|
||||
ENV = 'production'
|
||||
|
||||
# 页面标题
|
||||
@@ -7,15 +7,12 @@ VUE_APP_TITLE = MES系统
|
||||
# 芋道管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# dcs地址
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
|
||||
# dcs地址(只有现场的)
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
|
||||
|
||||
# 根据服务器或域名修改
|
||||
|
||||
24
Dockerfile
24
Dockerfile
@@ -1,21 +1,3 @@
|
||||
FROM node:16-alpine as build-stage
|
||||
|
||||
WORKDIR /admim
|
||||
|
||||
COPY .npmrc package.json yarn.lock ./
|
||||
RUN --mount=type=cache,id=yarn-store,target=/root/.yarn-store \
|
||||
yarn install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
ARG NODE_ENV=""
|
||||
RUN env ${NODE_ENV} yarn build:prod
|
||||
|
||||
## -- stage: dist => nginx --
|
||||
FROM nginx:alpine
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build-stage /admim/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
FROM busybox
|
||||
LABEL maintainer thomas.hairong@gmail.com
|
||||
COPY dist /html/
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
"bpmn-js-token-simulation": "0.10.0",
|
||||
"clipboard": "2.0.8",
|
||||
"code-brick-zj": "^1.0.5",
|
||||
"code-brick-zj": "^1.1.0",
|
||||
"core-js": "^3.26.0",
|
||||
"crypto-js": "^4.0.0",
|
||||
"diagram-js": "^12.3.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-10-30 14:37:28
|
||||
* @LastEditTime: 2024-04-19 17:13:24
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -65,4 +65,13 @@ export function getCoreDepartmentList(query) {
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 设备获得所有列表
|
||||
export function getDepartmentList(query) {
|
||||
return request({
|
||||
url: '/system/dept/list-all-simple',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:38:12
|
||||
* @LastEditTime: 2023-12-15 15:29:16
|
||||
* @LastEditTime: 2024-04-11 14:57:02
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ export function getWorkerList(query) {
|
||||
|
||||
export function getMaterialCheckList(query) {
|
||||
return request({
|
||||
url: '/base/core-hot-material-check/listByMaterial',
|
||||
url: 'base/quality-hot-material-det/filterList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -102,7 +102,7 @@ export function getMaterialCheckList(query) {
|
||||
|
||||
export function createQualityHotMaterialDet(query){
|
||||
return request({
|
||||
url: '/base/quality-hot-material-det/create',
|
||||
url: 'base/quality-hot-material-det/createBatch',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
@@ -110,7 +110,7 @@ export function createQualityHotMaterialDet(query){
|
||||
|
||||
export function updateQualityHotMaterialDet(query){
|
||||
return request({
|
||||
url: '/base/quality-hot-material-det/listbyfilter',
|
||||
url: 'base/quality-hot-material-det/updateBatch',
|
||||
method: 'put',
|
||||
data: query
|
||||
})
|
||||
@@ -118,7 +118,7 @@ export function updateQualityHotMaterialDet(query){
|
||||
|
||||
export function getQualityHotMaterialDetList(query){
|
||||
return request({
|
||||
url: '/base/quality-hot-material-det/listbyfilter',
|
||||
url: '/base/quality-hot-material-det/filterList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-07 15:02:37
|
||||
* @LastEditTime: 2023-11-07 18:32:07
|
||||
* @LastEditTime: 2024-04-09 15:14:42
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-07 14:10:18
|
||||
* @LastEditTime: 2023-11-16 17:49:52
|
||||
* @LastEditTime: 2024-04-11 16:16:05
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@@ -18,14 +18,14 @@ export function getStatisticalDataPage(query) {
|
||||
|
||||
export function getWorkOrderList(query) {
|
||||
return request({
|
||||
url: '/base/core-work-order/listbyfilter',
|
||||
url: 'base/core-work-order/listbyfilter',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
export function getProductList(query) {
|
||||
return request({
|
||||
url: '/base/core-product/listAll',
|
||||
url: 'base/core-product/listAll',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-10-31 10:55:20
|
||||
* @LastEditTime: 2023-12-06 14:09:14
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-04-25 15:28:44
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
@@ -34,11 +34,11 @@ export function exportEnergyPlcExcel(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getOriginalGlassRetrace(query) {
|
||||
export function getOriginalGlassRetrace(data) {
|
||||
return request({
|
||||
url: '/base/original-glass-statistics/originalGlassRetrace',
|
||||
method: 'get',
|
||||
params: query,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
45
src/api/report/customizedReports.js
Normal file
45
src/api/report/customizedReports.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request'
|
||||
// 原片工段数据
|
||||
export function originalSection(data) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/originalSection',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 原片产线数据
|
||||
export function getOriginalLine(query) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/getOriginalLine',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 深加工产线数据
|
||||
export function getProcessingLine(query) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/getProcessingLine',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 深加工工段数据
|
||||
export function processing(data) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/processing',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// isra数据记录
|
||||
export function israData(data) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/isra',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-12-08 10:26:48
|
||||
* @LastEditTime: 2023-12-13 17:16:00
|
||||
* @LastEditTime: 2024-04-24 16:31:37
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -59,3 +59,39 @@ export function exportGlasscExcel(query) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 生产月报查询--冷端生产线
|
||||
export function productionMonthY(data) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/productionMonthY',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 生产月报查询--深加工生产线
|
||||
export function productionMonthD(data) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/productionMonthD',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 生产年报查询--冷端生产线
|
||||
export function productionYearY(data) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/productionYearY',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 生产年报查询--冷端生产线
|
||||
export function productionYearD(data) {
|
||||
return request({
|
||||
url: '/extend/customized-reports/productionYearD',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
96
src/api/report/qcReport.js
Normal file
96
src/api/report/qcReport.js
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 09:27:54
|
||||
* @LastEditTime: 2024-04-23 15:16:12
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 更新质量检测类型基础
|
||||
export function getOriginalData(data) {
|
||||
return request({
|
||||
url: 'extend/customized-reports/original',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getIngredientData(data) {
|
||||
return request({
|
||||
url: 'extend/customized-reports/materialCost',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getCuttingtData(data) {
|
||||
return request({
|
||||
url: 'extend/customized-reports/cutting',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getAutoDailyData(data) {
|
||||
return request({
|
||||
url: 'base/report-auto-daily/listAll',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getQualityRecordReport(data) {
|
||||
return request({
|
||||
url: 'base/quality-inspection-record/qualityRecordReport',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProductChildData(data) {
|
||||
return request({
|
||||
url: 'base/report-auto-ydaily-det/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateAutoDailyData(data) {
|
||||
return request({
|
||||
url: 'base/report-auto-daily/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getCWSectionList(query) {
|
||||
return request({
|
||||
url: 'base/core-production-line/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getCuttingReportDataList(data) {
|
||||
return request({
|
||||
url: 'extend/customized-reports/cuttingReport',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProcessingLineDataList(data) {
|
||||
return request({
|
||||
url: 'extend/customized-reports/getProcessingLine',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getOriginalLineDataList(data) {
|
||||
return request({
|
||||
url: 'extend/customized-reports/getOriginalLine',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
138
src/components/ButtonNav/index.vue
Normal file
138
src/components/ButtonNav/index.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<!--
|
||||
filename: index.vue
|
||||
author: liubin
|
||||
date: 2024-04-02 09:49:36
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<!-- 按钮切换 -->
|
||||
<div
|
||||
v-if="buttonMode"
|
||||
class="button-nav">
|
||||
<button
|
||||
v-for="m in menus"
|
||||
:key="m"
|
||||
@click="currentMenu = m"
|
||||
:data-text="m"
|
||||
:class="[m === currentMenu ? 'active' : '']"></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%;
|
||||
// padding: 12px 0;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
|
||||
* {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
color: #888;
|
||||
letter-spacing: 2px;
|
||||
flex: 1;
|
||||
box-sizing: padding-box;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: attr(data-text);
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 50%;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: #111;
|
||||
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>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 16:50:26
|
||||
* @LastEditTime: 2024-04-07 16:05:59
|
||||
* @LastEditTime: 2024-04-25 09:03:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -34,7 +34,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||
<base-container :no-content-padding="true" :title="'产量及良率统计'" :size="'small'"
|
||||
<base-container :show-time="true" :no-content-padding="true" :title="'产量及良率统计'" :size="'small'"
|
||||
:title-icon="'energyMonitoring'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
@@ -53,7 +53,8 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||
<base-container :no-content-padding="true" :title="'ISRA 缺陷数据'" :size="'small'" :title-icon="'scrap'">
|
||||
<base-container :show-time="true" :no-content-padding="true" :title="'ISRA 缺陷数据'" :size="'small'"
|
||||
:title-icon="'scrap'">
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="ISRATableProps"
|
||||
:table-data="ISRAList" /> -->
|
||||
<ISRAChart ref="ISRAChart" />
|
||||
@@ -64,8 +65,8 @@
|
||||
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="10" type="flex" class="flex-1">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :no-content-padding="true" :height="256" :title="'废片 缺陷数据'" :size="'eqStatus'"
|
||||
:title-icon="'scrap'">
|
||||
<base-container :show-time="true" :no-content-padding="true" :height="256" :title="'废片 缺陷数据'"
|
||||
:size="'eqStatus'" :title-icon="'scrap'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
@@ -98,7 +99,8 @@
|
||||
</base-container>
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
|
||||
<base-container :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'" :title-icon="'eqMonitoring'">
|
||||
<base-container :show-time="false" :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'"
|
||||
:title-icon="'eqMonitoring'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
@@ -625,8 +627,8 @@ export default {
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.getSize(item.size) || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</span>`,
|
||||
`<div style = "${(item.product * 100).toFixed(0) > 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
|
||||
<div style = "${(item.product * 100).toFixed(0) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>`
|
||||
`<div style = "${(item.product * 100).toFixed(0) >= 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
|
||||
<div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
||||
])
|
||||
this.cutConfig.data = cutArr
|
||||
// this.$nextTick(() => {
|
||||
@@ -635,32 +637,34 @@ export default {
|
||||
// this.cutConfig.data = cutArr
|
||||
// this.$refs['cutScrollBoard'].updateRows(cutArr)
|
||||
} else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') {
|
||||
let nameList = []
|
||||
let nameWasteList = []
|
||||
let topNameList = []
|
||||
let productList = []
|
||||
let wasteList = []
|
||||
let sumAreaList = []
|
||||
let yieldList = []
|
||||
this.coldDetData = this.cutWsData.coldDetData
|
||||
// this.cutTableDataList =
|
||||
this.cutWsData.coldDetData.forEach((ele, index) => {
|
||||
nameList.push(ele.lineName)
|
||||
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡')
|
||||
productList.push(ele.productArea)
|
||||
wasteList.push(ele.wastArea)
|
||||
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡')
|
||||
sumAreaList.push(ele.sumArea)
|
||||
yieldList.push(parseFloat((ele.yield * 100).toFixed(0)))
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
|
||||
this.$refs.secondPileChart.initChart(nameList, [topNameList[1]], [nameWasteList[1]], [productList[1]], [wasteList[1]])
|
||||
this.$refs.thirdPileChart.initChart(nameList, [topNameList[2]], [nameWasteList[2]], [productList[2]], [wasteList[2]])
|
||||
this.$refs.fourthPileChart.initChart(nameList, [topNameList[3]], [nameWasteList[3]], [productList[3]], [wasteList[3]])
|
||||
this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]])
|
||||
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
|
||||
})
|
||||
if (this.cutWsData.coldDetData.length !== 0) {
|
||||
let nameList = []
|
||||
let nameWasteList = []
|
||||
let topNameList = []
|
||||
let productList = []
|
||||
let wasteList = []
|
||||
let sumAreaList = []
|
||||
let yieldList = []
|
||||
this.coldDetData = this.cutWsData.coldDetData
|
||||
// this.cutTableDataList =
|
||||
this.cutWsData.coldDetData.forEach((ele, index) => {
|
||||
nameList.push(ele.lineName)
|
||||
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea + '㎡')
|
||||
productList.push(ele.productArea)
|
||||
wasteList.push(ele.wastArea)
|
||||
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡')
|
||||
sumAreaList.push(ele.sumArea)
|
||||
yieldList.push(parseFloat((ele.yield * 100).toFixed(2)))
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
|
||||
this.$refs.secondPileChart.initChart(nameList, [topNameList[1]], [nameWasteList[1]], [productList[1]], [wasteList[1]])
|
||||
this.$refs.thirdPileChart.initChart(nameList, [topNameList[2]], [nameWasteList[2]], [productList[2]], [wasteList[2]])
|
||||
this.$refs.fourthPileChart.initChart(nameList, [topNameList[3]], [nameWasteList[3]], [productList[3]], [wasteList[3]])
|
||||
this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]])
|
||||
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
// if (typeof (WebSocket) === 'undefined') {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 13:45:56
|
||||
* @LastEditTime: 2024-03-13 08:58:01
|
||||
* @LastEditTime: 2024-04-24 15:48:32
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -13,6 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { position } from '@antv/x6-common/lib/dom/position';
|
||||
import * as echarts from 'echarts';
|
||||
// import resize from './../mixins/resize'
|
||||
// import NotMsg from './../components/NotMsg'
|
||||
@@ -26,7 +27,7 @@ export default {
|
||||
return {
|
||||
chart: null,
|
||||
// notMsg:true,
|
||||
colors:['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
|
||||
colors: ['#2760ff', '#518eec', '#49FBD6', '#ddb523'],
|
||||
chartData: []
|
||||
};
|
||||
},
|
||||
@@ -45,8 +46,49 @@ export default {
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
mounted() {
|
||||
this.chartData = [
|
||||
{
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
},
|
||||
{
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
},
|
||||
{
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
},
|
||||
{
|
||||
name: '0904褶皱/严重',
|
||||
num: 1112,
|
||||
yield: 0.97,
|
||||
}
|
||||
]
|
||||
this.updateChart()
|
||||
},
|
||||
methods: {
|
||||
getEqualNewlineString(params, length) {
|
||||
let text = ''
|
||||
let count = Math.ceil(params.length / length) // 向上取整数
|
||||
// 一行展示length个
|
||||
if (count > 1) {
|
||||
for (let z = 1; z <= count; z++) {
|
||||
text += params.substr((z - 1) * length, length)
|
||||
if (z < count) {
|
||||
text += '\n'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
text += params.substr(0, length)
|
||||
}
|
||||
return text
|
||||
},
|
||||
updateChart() {
|
||||
console.log('update')
|
||||
let num = 0
|
||||
@@ -71,7 +113,7 @@ export default {
|
||||
color:this.colors,
|
||||
title:{
|
||||
text: num,
|
||||
subtext: '总数',
|
||||
subtext: '总数/个',
|
||||
top: '32%',
|
||||
left: '49%',
|
||||
textAlign: 'center',
|
||||
@@ -83,45 +125,77 @@ export default {
|
||||
fontSize: 20,
|
||||
color: '#fff00',
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
bottom: '10%',
|
||||
left: 'center',
|
||||
itemWidth: 12,
|
||||
itemHeight:12,
|
||||
icon: 'rect',
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
},
|
||||
data:this.chartData && this.chartData.length > 0 && this.chartData.map((item,index)=>({
|
||||
name:item.name,
|
||||
itemStyle:{
|
||||
color: this.colors[index%4]
|
||||
}
|
||||
}))
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '0',
|
||||
containLabel: true
|
||||
},
|
||||
// legend: {
|
||||
// bottom: '10%',
|
||||
// left: 'center',
|
||||
// itemWidth: 12,
|
||||
// itemHeight:12,
|
||||
// icon: 'roundRect',
|
||||
// textStyle: {
|
||||
// color: '#fff'
|
||||
// },
|
||||
// data:this.chartData && this.chartData.length > 0 && this.chartData.map((item,index)=>({
|
||||
// name:item.name,
|
||||
// itemStyle:{
|
||||
// color: this.colors[index%4]
|
||||
// }
|
||||
// }))
|
||||
// },
|
||||
series:[{
|
||||
name: 'ISRA缺陷检测',
|
||||
type: 'pie',
|
||||
type: 'pie',
|
||||
// position:outerHeight,
|
||||
center: ['50%', '40%'],
|
||||
radius: ['45%', '70%'],
|
||||
avoidLabelOverlap: true,
|
||||
label: {
|
||||
show: false
|
||||
label: {
|
||||
show: true,
|
||||
normal: {
|
||||
alignTo: 'labelLine',
|
||||
margin: 10,
|
||||
edgeDistance: 10,
|
||||
lineHeight: 16,
|
||||
// 各分区的提示内容
|
||||
// params: 即下面传入的data数组,通过自定义函数,展示你想要的内容和格式
|
||||
formatter: function (params) {
|
||||
console.log(params);
|
||||
return ;
|
||||
},
|
||||
formatter: (params) => {
|
||||
//调用自定义显示格式
|
||||
return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%");
|
||||
},
|
||||
textStyle: { // 提示文字的样式
|
||||
// color: '#595959',
|
||||
fontSize: 16
|
||||
}
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: true,
|
||||
show: true,
|
||||
length: 25,
|
||||
length2: 10,
|
||||
},
|
||||
data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({
|
||||
name:item.name,
|
||||
value: item.num,
|
||||
value: item.num,
|
||||
label: {
|
||||
color: this.colors[index % 4]
|
||||
},
|
||||
itemStyle:{
|
||||
color:{
|
||||
type: 'linear',
|
||||
x: 1,
|
||||
y: 1,
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 0,
|
||||
y2: 1,
|
||||
global: false,
|
||||
colorStops:[
|
||||
{offset: 0,color: this.colors[index%4]},
|
||||
@@ -145,15 +219,19 @@ export default {
|
||||
.isra-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 7%;
|
||||
}
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: gtz
|
||||
* @Date: 2022-01-19 15:58:17
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-29 14:47:29
|
||||
* @LastEditTime: 2024-04-22 09:41:21
|
||||
* @Description: file content
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||
-->
|
||||
@@ -30,7 +30,7 @@
|
||||
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||
{{ time2 +'-'+ time }}
|
||||
</span> -->
|
||||
<span style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||
<span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||
{{ startTime + '-' + endTime }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -56,6 +56,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showTime: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
noPadding: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-21 09:06:28
|
||||
* @LastEditTime: 2024-04-03 16:28:40
|
||||
* @LastEditTime: 2024-04-23 15:34:56
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -83,6 +83,9 @@ export default {
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
// getNumLength(num) {
|
||||
// return num.toString().length;
|
||||
// },
|
||||
initChart(nameList, passRateList, outputNumList) {
|
||||
console.log(nameList, passRateList)
|
||||
let series= [
|
||||
@@ -97,7 +100,7 @@ export default {
|
||||
{ offset: 0.3, color: '#1295FF' }
|
||||
]),
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
show: false, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||
@@ -156,6 +159,8 @@ export default {
|
||||
this.chart.setOption({
|
||||
// color: colors,
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
className: "isra-chart-tooltip",
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
@@ -216,15 +221,17 @@ export default {
|
||||
// },
|
||||
yAxis: [
|
||||
{
|
||||
min: function() { // 取最小值向下取整为最小刻度
|
||||
min: function () { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function(value) { // 取最大值向上取整为最大刻度
|
||||
return Math.ceil(value.max)
|
||||
max: function (value) { // 取最大值向上取整为最大刻度
|
||||
},
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '良品率/%',
|
||||
max: 100,//最大值
|
||||
min: 0,//最小值
|
||||
interval: 20,//间隔
|
||||
nameTextStyle: {// y轴上方单位的颜色
|
||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||
align: "left",
|
||||
@@ -261,12 +268,17 @@ export default {
|
||||
// },
|
||||
},
|
||||
{
|
||||
min: function() { // 取最小值向下取整为最小刻度
|
||||
min: function () { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function(value) { // 取最大值向上取整为最大刻度
|
||||
return Math.ceil(value.max)
|
||||
max: function (value) { // 取最大值向上取整为最大刻度
|
||||
|
||||
// console.log(value.max.toString().length)
|
||||
// String(value.max)[0]
|
||||
// for
|
||||
// return String(value.max)[0] +
|
||||
},
|
||||
minInterval: 5,//间隔
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '产量/㎡', // y轴上方的单位
|
||||
@@ -315,8 +327,16 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.coldProductChart{
|
||||
top: -10px;
|
||||
}
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-21 09:06:28
|
||||
* @LastEditTime: 2024-04-03 17:09:12
|
||||
* @LastEditTime: 2024-04-23 15:36:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -162,6 +162,8 @@ export default {
|
||||
this.chart.setOption({
|
||||
// color: colors,
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
className: "isra-chart-tooltip",
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
@@ -215,15 +217,17 @@ export default {
|
||||
// },
|
||||
yAxis: [
|
||||
{
|
||||
// min: function() { // 取最小值向下取整为最小刻度
|
||||
// return 0
|
||||
// },
|
||||
// max: function(value) { // 取最大值向上取整为最大刻度
|
||||
// return Math.ceil(value.max)
|
||||
// },
|
||||
min: function () { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function (value) { // 取最大值向上取整为最大刻度
|
||||
},
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '良品率/%',
|
||||
max: 100,//最大值
|
||||
min: 0,//最小值
|
||||
interval: 20,//间隔
|
||||
nameTextStyle: {// y轴上方单位的颜色
|
||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||
align: "left",
|
||||
@@ -260,12 +264,17 @@ export default {
|
||||
// },
|
||||
},
|
||||
{
|
||||
// min: function() { // 取最小值向下取整为最小刻度
|
||||
// return 0
|
||||
// },
|
||||
// max: function(value) { // 取最大值向上取整为最大刻度
|
||||
// return Math.ceil(value.max)
|
||||
// },
|
||||
min: function () { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function (value) { // 取最大值向上取整为最大刻度
|
||||
|
||||
// console.log(value.max.toString().length)
|
||||
// String(value.max)[0]
|
||||
// for
|
||||
// return String(value.max)[0] +
|
||||
},
|
||||
minInterval: 5,//间隔
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '产量/片', // y轴上方的单位
|
||||
@@ -324,4 +333,13 @@ export default {
|
||||
width: 100%;
|
||||
top: -30px;
|
||||
}
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -128,6 +128,8 @@ export default {
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
trigger: 'item',
|
||||
className: "isra-chart-tooltip",
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
@@ -226,4 +228,13 @@ export default {
|
||||
width: 100%;
|
||||
top: -30px;
|
||||
}
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-27 13:54:52
|
||||
* @LastEditTime: 2024-04-03 18:12:18
|
||||
* @LastEditTime: 2024-04-19 15:43:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -101,11 +101,14 @@ export default {
|
||||
});;
|
||||
},
|
||||
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
|
||||
let rawData = []
|
||||
let colors = ['#0fdedb', '#2359ec']
|
||||
if (topNameList.length === 0 && nameWasteList.length === 0 && passRateList === 0 && wasteList === 0) {
|
||||
return
|
||||
} else {
|
||||
let rawData = []
|
||||
let colors = ['#0fdedb', '#2359ec']
|
||||
rawData.push(passRateList, wasteList)
|
||||
const totalData = [];
|
||||
// if (rawData.length != 0 && raw,Data,length != 0) {
|
||||
const totalData = [];
|
||||
// if (rawData.length != 0 && raw,Data,length != 0) {
|
||||
for (let i = 0; i < rawData[0].length; ++i) {
|
||||
let sum = 0;
|
||||
for (let j = 0; j < rawData.length; ++j) {
|
||||
@@ -113,150 +116,152 @@ export default {
|
||||
}
|
||||
totalData.push(sum);
|
||||
}
|
||||
// }
|
||||
// rawData[1].map((d, did) =>
|
||||
// console.log((d / totalData[did]).toFixed(3))
|
||||
// // totalData[did] <= 0 ? 0 : d / totalData[did]
|
||||
// )
|
||||
console.log('total', totalData)
|
||||
const series = [
|
||||
'良品',
|
||||
'废品',
|
||||
// 'Affiliate Ad',
|
||||
// 'Video Ad',
|
||||
// 'Search Engine'
|
||||
].map((name, sid) => {
|
||||
// console.log(sid)
|
||||
return {
|
||||
name,
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
barWidth: 12,
|
||||
// label: {
|
||||
// show: true,
|
||||
// formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
|
||||
// },
|
||||
color:colors[sid],
|
||||
data: rawData.length != 0 ? rawData[sid].map((d, did) =>
|
||||
totalData[did] <= 0 ? 0 : (d / totalData[did]).toFixed(4)
|
||||
) : []
|
||||
};
|
||||
});
|
||||
// this.charts.resize({
|
||||
// //width: width,
|
||||
// //height: height,
|
||||
// // es6解构
|
||||
// width,
|
||||
// height
|
||||
// })
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
let isFinished = false //标记 isFinished
|
||||
this.chart.on('finished', _ => {
|
||||
if (!isFinished) {
|
||||
console.log('我只执行一次')
|
||||
isFinished = true
|
||||
// this.isLoading = false //关闭loading
|
||||
this.chart.resize() //重新渲染charts大小
|
||||
}
|
||||
console.log(113, 'finished')
|
||||
})
|
||||
this.chart.setOption({
|
||||
legend: {
|
||||
formatter: function (name) {
|
||||
//通过name获取到数组对象中的单个对象
|
||||
let singleData = series.filter(function (item) {
|
||||
return item.name == name
|
||||
})
|
||||
return name + parseFloat((singleData[0].data * 100).toFixed(0)) + '%'
|
||||
},
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
bottom: '20',
|
||||
left: '20',
|
||||
icon: 'roundRect',
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,.9)',
|
||||
fontSize:12,
|
||||
// }
|
||||
// rawData[1].map((d, did) =>
|
||||
// console.log((d / totalData[did]).toFixed(3))
|
||||
// // totalData[did] <= 0 ? 0 : d / totalData[did]
|
||||
// )
|
||||
console.log('total', totalData)
|
||||
const series = [
|
||||
'良品',
|
||||
'废品',
|
||||
// 'Affiliate Ad',
|
||||
// 'Video Ad',
|
||||
// 'Search Engine'
|
||||
].map((name, sid) => {
|
||||
// console.log(sid)
|
||||
return {
|
||||
name,
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
barWidth: 12,
|
||||
// label: {
|
||||
// show: true,
|
||||
// formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
|
||||
// },
|
||||
color: colors[sid],
|
||||
data: rawData.length != 0 ? rawData[sid].map((d, did) =>
|
||||
totalData[did] <= 0 ? 0 : (d / totalData[did]).toFixed(4)
|
||||
) : []
|
||||
};
|
||||
});
|
||||
// this.charts.resize({
|
||||
// //width: width,
|
||||
// //height: height,
|
||||
// // es6解构
|
||||
// width,
|
||||
// height
|
||||
// })
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
let isFinished = false //标记 isFinished
|
||||
this.chart.on('finished', _ => {
|
||||
if (!isFinished) {
|
||||
console.log('我只执行一次')
|
||||
isFinished = true
|
||||
// this.isLoading = false //关闭loading
|
||||
this.chart.resize() //重新渲染charts大小
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top:'0',
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
// bottom: '3%',
|
||||
width: 'auto',
|
||||
height: '95',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
splitLine: {
|
||||
show: false
|
||||
console.log(113, 'finished')
|
||||
})
|
||||
this.chart.setOption({
|
||||
legend: {
|
||||
formatter: function (name) {
|
||||
//通过name获取到数组对象中的单个对象
|
||||
let singleData = series.filter(function (item) {
|
||||
return item.name == name
|
||||
})
|
||||
return name + parseFloat((singleData[0].data * 100).toFixed(2)) + '%'
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
inside: true,
|
||||
interval: 0, //横轴信息全部显
|
||||
splitNumber: 50,
|
||||
// boundaryGap: [20, 20],
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,.9)',
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 16,
|
||||
align: 'left',
|
||||
padding: [0, 0, 10, -5]
|
||||
}
|
||||
},
|
||||
data: topNameList
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
bottom: '20',
|
||||
left: '20',
|
||||
icon: 'roundRect',
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,.9)',
|
||||
fontSize: 12,
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
splitLine: {
|
||||
show: false
|
||||
grid: {
|
||||
top: '0',
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
// bottom: '3%',
|
||||
width: 'auto',
|
||||
height: '95',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
inside: true,
|
||||
interval: 0, //横轴信息全部显
|
||||
splitNumber: 50,
|
||||
// boundaryGap: [20, 20],
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,.9)',
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 16,
|
||||
align: 'left',
|
||||
padding: [0, 0, 10, -5]
|
||||
}
|
||||
},
|
||||
data: topNameList
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
inside: true,
|
||||
interval: 0, //横轴信息全部显
|
||||
splitNumber: 50,
|
||||
// boundaryGap: [20, 20],
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,.9)',
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 16,
|
||||
align: 'right',
|
||||
padding: [0, 0, 10, -5]
|
||||
}
|
||||
},
|
||||
data: nameWasteList
|
||||
}
|
||||
],
|
||||
xAxis: {
|
||||
// max: 120,
|
||||
show: false,
|
||||
},
|
||||
series:series
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.resize()
|
||||
},1000);
|
||||
})
|
||||
{
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
inside: true,
|
||||
interval: 0, //横轴信息全部显
|
||||
splitNumber: 50,
|
||||
// boundaryGap: [20, 20],
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,.9)',
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 16,
|
||||
align: 'right',
|
||||
padding: [0, 0, 10, -5]
|
||||
}
|
||||
},
|
||||
data: nameWasteList
|
||||
}
|
||||
],
|
||||
xAxis: {
|
||||
// max: 120,
|
||||
show: false,
|
||||
},
|
||||
series: series
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.resize()
|
||||
}, 1000);
|
||||
})
|
||||
}
|
||||
|
||||
// this.chart.resize({
|
||||
// width: 'auto',
|
||||
// height: 90
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-04-03 17:14:03
|
||||
* @LastEditTime: 2024-04-26 09:57:41
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div id="container" ref="container" class="visual-container" :style="styles">
|
||||
<el-row class="container-title" :style="{
|
||||
height: 88 + 'px',
|
||||
lineHeight: 88 + 'px',
|
||||
fontSize: 31 + 'px',
|
||||
}">
|
||||
height: 88 + 'px',
|
||||
lineHeight: 88 + 'px',
|
||||
fontSize: 31 + 'px',
|
||||
}">
|
||||
<img src="../../assets/img/logo.png" style="width: 1.1em; position: relative; top: 0.22em" alt="" />
|
||||
许昌安彩深加工看板
|
||||
<h3 class="unit">单位:河南汇融数字科技有限公司</h3>
|
||||
@@ -25,25 +25,46 @@
|
||||
<el-row class="container-main flex-col" type="flex">
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
||||
<base-container :show-time="true" :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
||||
<dv-scroll-board class="eqTable" :config="eqConfig" style="width: 100%; height: 350px"
|
||||
ref="eqScrollBoard" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
||||
<base-container :show-time="true" :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
||||
<dv-scroll-board :config="processConfig" style="width: 100%; height: 350px" ref="processScrollBoard" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
|
||||
<base-container :show-time="false" :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
|
||||
<div class="order" style="width: 100%; overflow: hidden scroll; height: 350px">
|
||||
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em">
|
||||
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
|
||||
<!-- <el-col :span="12"> -->
|
||||
|
||||
<p class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</p>
|
||||
<el-progress style="width: 620px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10"
|
||||
<!-- <div style="height: 34px;"> -->
|
||||
<span style="display: inline-block;width: 400px">
|
||||
<span v-if="op.name" class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name
|
||||
}}</span>
|
||||
<el-divider v-if="op.specifications" class="split" direction="vertical"></el-divider>
|
||||
<!-- <span v-if="op.size" class="split"></span> -->
|
||||
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
|
||||
op.specifications }}</span>
|
||||
<el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider>
|
||||
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
|
||||
op.planQuantity }}</span>
|
||||
<span v-if="op.planQuantity" class="orderFinishTwo"
|
||||
style="font-size: 14px;opacity: calc(.6);">片</span>
|
||||
</span>
|
||||
<!-- <span style="overflow: hidden;"> -->
|
||||
<span class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
|
||||
op.actualQuantity
|
||||
}}</span>
|
||||
<span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px">片</span>
|
||||
<el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
|
||||
direction="vertical"></el-divider>
|
||||
<!-- </span> -->
|
||||
<!-- </div> -->
|
||||
<el-progress style="width: 620px;" text-color="rgba(0, 255, 247, 1)" :stroke-width="10"
|
||||
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -54,8 +75,8 @@
|
||||
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :show-yes-time="true" :no-content-padding="true" :height="256" :size="'eqStatus'"
|
||||
:title="'能源监控'" :title-icon="'energyMonitoring'">
|
||||
<base-container :show-time="true" :show-yes-time="true" :no-content-padding="true" :height="256"
|
||||
:size="'eqStatus'" :title="'能源监控'" :title-icon="'energyMonitoring'">
|
||||
<el-row :gutter="9">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||
<linear-bar-chart ref="EnergyMonitoringChart" :name-list="EnergyMonitoringNameList"
|
||||
@@ -67,7 +88,7 @@
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'"
|
||||
:title="'产线产量及良品率'" :title-icon="'productLine'">
|
||||
<div class="myLegend">
|
||||
<div class="myLegend">
|
||||
<div class=" barCircleLegend"></div>
|
||||
<div class=" barCircle"></div>
|
||||
<h4 class="barText">产线良品率</h4>
|
||||
@@ -96,79 +117,79 @@ const qualityYearList = [
|
||||
name: '翻转机',
|
||||
code: 'EQ20240110112358000235',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '烘干炉',
|
||||
code: 'EQ20240110112537000241',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '停机',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '清洗机',
|
||||
code: ' EQ20240110112310000232',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '故障',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '钢化清洗机',
|
||||
code: 'EQ20240110111700000208',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '故障',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '固化机',
|
||||
code: 'EQ20240110111700000201',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '停机',
|
||||
error: false,
|
||||
},
|
||||
{
|
||||
name: '磨边清洗机',
|
||||
code: ' EQ20240110111700000208',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '停机',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '预热机',
|
||||
code: 'EQ20240110111700000205',
|
||||
status: '故障',
|
||||
error: '是',
|
||||
status: '运行',
|
||||
error: false,
|
||||
},
|
||||
{
|
||||
name: '下片机',
|
||||
code: 'EQ20240115151435000279',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
code: 'EQ20240115151435000279',
|
||||
status: '故障',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '冷却机',
|
||||
code: 'EQ20240110111700000203',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '运行',
|
||||
error: false,
|
||||
},
|
||||
{
|
||||
name: 'A储片机106',
|
||||
code: 'EQ20240110111700000202',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '停机',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '二次清洗机',
|
||||
code: 'EQ20240110111700000209',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '停机',
|
||||
error: true,
|
||||
},
|
||||
{
|
||||
name: '二次磨边机',
|
||||
code: ' EQ20240110110927000181',
|
||||
status: '故障',
|
||||
error: '是',
|
||||
status: '停机',
|
||||
error: false,
|
||||
},
|
||||
{
|
||||
name: '测试设备',
|
||||
code: 'EQ20240110111700000201',
|
||||
status: '运行',
|
||||
error: '否',
|
||||
status: '运行',
|
||||
error: true,
|
||||
},
|
||||
];
|
||||
const qualityMonthList = [
|
||||
@@ -217,37 +238,37 @@ const qualityMonthList = [
|
||||
];
|
||||
const orderProcessList = [
|
||||
{
|
||||
id: '1',
|
||||
id: 1,
|
||||
outRate: '.8',
|
||||
name: '凯盛0322',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
id: 2,
|
||||
outRate: '.4',
|
||||
name: '光伏玻璃4.0',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
id: 3,
|
||||
outRate: '.5',
|
||||
name: '光伏玻璃3.0',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
id: 4,
|
||||
outRate: '.3',
|
||||
name: '光伏玻璃2.0',
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
id: 5,
|
||||
outRate: '.5',
|
||||
name: '光伏玻璃1.0',
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
id: 6,
|
||||
outRate: '.8',
|
||||
name: '光伏玻璃',
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
id: 7,
|
||||
outRate: '.8',
|
||||
name: '统计订单',
|
||||
},
|
||||
@@ -278,11 +299,11 @@ export default {
|
||||
// equipmentList:[],
|
||||
EnergyMonitoringList: [],
|
||||
eqConfig: {
|
||||
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
|
||||
header: ['序号', '产线名', '设备名称', '设备状态'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [70, 100, 200, 90, 90],
|
||||
columnWidth: [70, 150, 200, 120],
|
||||
align: ['center'],
|
||||
data: [],
|
||||
// index:true,
|
||||
@@ -359,47 +380,71 @@ export default {
|
||||
this.websocketClose();
|
||||
this.SJGWebsocketClose();
|
||||
},
|
||||
mounted() {
|
||||
mounted() {
|
||||
let detData = [
|
||||
{
|
||||
id: '1',
|
||||
name: '测试工单',
|
||||
progressRate: 0.933333,
|
||||
name: '镀釉光伏玻璃GW',
|
||||
progressRate: 0.933333,
|
||||
specifications: '1100*5554*22',
|
||||
plan: 111111111111,
|
||||
actualQuantity:1000000111111,
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '测试工单2',
|
||||
progressRate: 0.932323,
|
||||
progressRate: 0.932323,
|
||||
size: '1100*5554*22',
|
||||
plan: 11111,
|
||||
actualQuantity: 111,
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '测试工单3',
|
||||
progressRate: 0.23232,
|
||||
progressRate: 0.23232,
|
||||
size: '1100*5554*22',
|
||||
plan: 11111,
|
||||
actualQuantity: 111,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: '测试工单4',
|
||||
progressRate: 0.32323,
|
||||
progressRate: 0.32323,
|
||||
size: '1100*5554*22',
|
||||
plan: 11111,
|
||||
actualQuantity: 111,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
id: '5',
|
||||
name: '测试工单4',
|
||||
progressRate: 0.32323,
|
||||
size: '1100*5554*22',
|
||||
plan: 11111,
|
||||
actualQuantity: 111,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
id: '6',
|
||||
name: '测试工单4',
|
||||
size: '1100*5554*22',
|
||||
progressRate: 0.32323,
|
||||
plan: 11111,
|
||||
actualQuantity: 111,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
id: '7',
|
||||
name: '测试工单4',
|
||||
size: '1100*5554*22',
|
||||
progressRate: 0.32323,
|
||||
plan: 11111,
|
||||
actualQuantity: 111,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
id: '8',
|
||||
name: '测试工单4',
|
||||
progressRate: 0.32323,
|
||||
size: '1100*5554*22',
|
||||
plan: 11111,
|
||||
actualQuantity: 111,
|
||||
},
|
||||
// {
|
||||
// id: '5',
|
||||
@@ -414,9 +459,12 @@ export default {
|
||||
this.orderList = detData.map((ele, index) => {
|
||||
if (ele.progressRate && ele.progressRate != 1) {
|
||||
return {
|
||||
id: ele.id,
|
||||
name: ele.name,
|
||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||
id: ele.id,
|
||||
name: this.getStr(String(ele.name), 8),
|
||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||
specifications: ele.specifications ? '规格' + ele.specifications : '',
|
||||
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan), 6) : '',
|
||||
actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
|
||||
};
|
||||
}
|
||||
});
|
||||
@@ -432,16 +480,14 @@ export default {
|
||||
this.EnergyMonitoringNameList,
|
||||
this.EnergyMonitoringList
|
||||
);
|
||||
let eqArr = this.qualityYearList.map((item, index) => [
|
||||
let eqArr = this.qualityYearList.map((item, index) => [
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''}</span>`,`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
|
||||
]);
|
||||
this.eqConfig.data = eqArr;
|
||||
let data = [
|
||||
@@ -520,6 +566,15 @@ export default {
|
||||
// removeEventListener('resize', resizeFun)
|
||||
// },
|
||||
methods: {
|
||||
getStr(str,num) {
|
||||
//你要处理的字符串
|
||||
if (str.length > num) { //如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
|
||||
str = str.substr(0, num) + "..." //截取从第一个字符开始,往后取10个字符,剩余的用...代替
|
||||
return str
|
||||
} else {
|
||||
return str
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let processArr = qualityMonthList.map((item, index) => [
|
||||
// console.log(item)
|
||||
@@ -688,9 +743,12 @@ export default {
|
||||
this.orderList = this.SJGWsData.detData.map((ele, index) => {
|
||||
if (ele.progressRate && ele.progressRate != 1) {
|
||||
return {
|
||||
id: ele.id,
|
||||
name: ele.name,
|
||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||
id: ele.id,
|
||||
name: this.getStr(String(ele.name), 8),
|
||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||
specifications: ele.specifications ? '规格' + ele.specifications : '',
|
||||
planQuantity: ele.planQuantity ? '计划' + this.getStr(String(ele.planQuantity),6) : '',
|
||||
actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
|
||||
};
|
||||
}
|
||||
});
|
||||
@@ -699,17 +757,13 @@ export default {
|
||||
let eqArr = this.SJGWsData.detData.map((item, index) => [
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''
|
||||
}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${
|
||||
item.code || ''
|
||||
}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)"><span style="color:rgba(255,255,255,0.5)"></span> ${
|
||||
item.status || ''
|
||||
}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${
|
||||
item.error || ''
|
||||
}</span>`,
|
||||
|
||||
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
|
||||
]);
|
||||
this.eqConfig.data = eqArr;
|
||||
// this.$nextTick(() => {
|
||||
@@ -751,7 +805,23 @@ export default {
|
||||
outputNumList
|
||||
);
|
||||
})
|
||||
} else if (this.SJGInitWebSocket === 'inspection') {
|
||||
} else if (this.SJGWsData.type === 'inspection') {
|
||||
let processArr = this.SJGWsData.detData.map((item, index) => [
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''
|
||||
}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''
|
||||
}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''
|
||||
}</span>`,
|
||||
]);
|
||||
this.processConfig.data = processArr;
|
||||
// this.$nextTick(() => {
|
||||
this.$refs['processScrollBoard'].updateRows(processArr);
|
||||
// })
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -802,6 +872,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.split{
|
||||
width: 1px;
|
||||
// display: inline-block;
|
||||
height: 14px;
|
||||
// margin-top: 2px;
|
||||
// line-height: 0;
|
||||
margin-left: 8px;
|
||||
opacity:calc(.6);
|
||||
margin-right: 8px;
|
||||
background-color: #C8CDD7;
|
||||
// border: 1px solid #C8CDD7;
|
||||
}
|
||||
.myLegend {
|
||||
position: absolute;
|
||||
top: -28px;
|
||||
@@ -902,12 +984,50 @@ export default {
|
||||
}
|
||||
|
||||
.now-secondary-title {
|
||||
display: inline-block;
|
||||
width: 110px;
|
||||
margin: 0;
|
||||
font-size: 1em;
|
||||
font-size: 14px;
|
||||
line-height: 2em;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.orderSize {
|
||||
display: inline-block;
|
||||
width: 120px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 2em;
|
||||
color: #fff;
|
||||
}
|
||||
.orderFinish {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
text-align: right;
|
||||
color: rgba(0, 255, 247, 1);
|
||||
}
|
||||
.orderFinishTwo{
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 2em;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// overflow: hidden;
|
||||
text-align: right;
|
||||
color: rgba(0, 255, 247, 1);
|
||||
}
|
||||
.orderPlan {
|
||||
display: inline-block;
|
||||
// width: 80px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
// line-height: 2em;
|
||||
color: #fff;
|
||||
text-align: left;
|
||||
}
|
||||
.now-team-content {
|
||||
font-size: 3em;
|
||||
line-height: 1em;
|
||||
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-customer:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-customer:create') ? 'button' : '',
|
||||
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-department:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-department:create') ? 'button' : '',
|
||||
|
||||
@@ -156,11 +156,11 @@ export default {
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
fixed: true,
|
||||
width: 180,
|
||||
minWidth: 180,
|
||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
},
|
||||
{ prop: 'name', label: '设备名称', width: 180, showOverflowtooltip: true },
|
||||
{ width: 250, prop: 'code', label: '设备编码' },
|
||||
{ prop: 'name', label: '设备名称', minWidth: 180, showOverflowtooltip: true },
|
||||
{ minWidth: 250, prop: 'code', label: '设备编码' },
|
||||
{ prop: 'equipmentTypeName', label: '设备类型' },
|
||||
{ prop: 'enName', label: '英文名称' },
|
||||
{ prop: 'abbr', label: '缩写' },
|
||||
@@ -211,7 +211,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: (this.$auth.hasPermi('base:core-equipment:export') || this.$auth.hasPermi('base:core-equipment:create')) ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-equipment:export')
|
||||
|
||||
@@ -126,7 +126,8 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-equipment-bind-section:create')
|
||||
? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-equipment-bind-section:create')
|
||||
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
fixed: true,
|
||||
width: 180,
|
||||
minWidth: 180,
|
||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
},
|
||||
{ prop: 'name', label: '类型名称' },
|
||||
@@ -111,7 +111,8 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-equipment-type:create')
|
||||
? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-equipment-type:create')
|
||||
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-hot-material-check:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-hot-material-check:create') ? 'button' : '',
|
||||
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-major:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-major:create') ? 'button' : '',
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
:Width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@@ -48,45 +48,45 @@ const tableProps = [
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '产品名称',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '产品编码',
|
||||
width: 190,
|
||||
minWidth: 190,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'productType',
|
||||
label: '产品类型',
|
||||
filter: publicFormatter('product_type'),
|
||||
width: 180,
|
||||
minWidth: 180,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'specifications',
|
||||
label: '规格',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
filter: publicFormatter('unit_dict'),
|
||||
width: 90,
|
||||
minWidth: 90,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
width: 120,
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
];
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-product:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-product:create') ? 'button' : '',
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
:minWidth="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@@ -30,7 +30,7 @@
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="50%">
|
||||
minWidth="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"></add-or-update>
|
||||
@@ -56,39 +56,39 @@ const tableProps = [
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'roomNameDict',
|
||||
label: '车间名称',
|
||||
filter: publicFormatter('workshop'),
|
||||
width: 120,
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '产线名称',
|
||||
width: 120,
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '产线编码',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'enabled',
|
||||
label: '当前状态',
|
||||
filter: codeFilter('lineStatus'),
|
||||
width: 120,
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
// {
|
||||
@@ -98,13 +98,13 @@ const tableProps = [
|
||||
{
|
||||
prop: 'description',
|
||||
label: '描述',
|
||||
width: 120,
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
width: 120,
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
}
|
||||
];
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-production-line:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-production-line:create') ? 'button' : '',
|
||||
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-supplier:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-supplier:create') ? 'button' : '',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-04-08 14:27:29
|
||||
* @LastEditTime: 2024-04-10 16:16:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -201,24 +201,26 @@
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding-bottom: 16px;">
|
||||
<div class="boxTitle">
|
||||
<span class="blueTitle"></span>
|
||||
<span>预计用料信息</span>
|
||||
<div v-if="$auth.hasPermiAnd(['base:material-product-bom-det:query', 'extend:process-flow:query'])">
|
||||
<div class="card" style="padding-bottom: 16px;">
|
||||
<div class="boxTitle">
|
||||
<span class="blueTitle"></span>
|
||||
<span>预计用料信息</span>
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps1"
|
||||
:page="listQuery1.pageNo"
|
||||
:limit="listQuery1.pageSize"
|
||||
:table-data="materialList"
|
||||
:max-height="tableH" />
|
||||
<!-- <pagination
|
||||
v-show="listQuery1.total > 0"
|
||||
:total="listQuery1.total"
|
||||
:page.sync="listQuery1.pageNo"
|
||||
:limit.sync="listQuery1.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps1"
|
||||
:page="listQuery1.pageNo"
|
||||
:limit="listQuery1.pageSize"
|
||||
:table-data="materialList"
|
||||
:max-height="tableH" />
|
||||
<!-- <pagination
|
||||
v-show="listQuery1.total > 0"
|
||||
:total="listQuery1.total"
|
||||
:page.sync="listQuery1.pageNo"
|
||||
:limit.sync="listQuery1.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="drawer-body__footer">
|
||||
@@ -461,7 +463,7 @@ export default {
|
||||
});
|
||||
// 获取预使用原料列表
|
||||
console.log('111我看看', this.dataForm.materialMethod)
|
||||
if (this.dataForm.id) {
|
||||
if (this.dataForm.id && this.$auth.hasPermiAnd(['base:material-product-bom-det:query', 'extend:process-flow:query'])) {
|
||||
if (this.dataForm.materialMethod === 1) {
|
||||
// 产品
|
||||
getlistByProductId({
|
||||
|
||||
@@ -157,92 +157,105 @@ export default {
|
||||
// showTip: '预使用原料信息'
|
||||
// }
|
||||
// : undefined,
|
||||
{
|
||||
type: 'active',
|
||||
btnName: '激活',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
this.$auth.hasPermi(`base:core-work-order:update`)
|
||||
? {
|
||||
type: 'active',
|
||||
btnName: '激活',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'pause',
|
||||
btnName: '暂停',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-work-order:update`)
|
||||
? {
|
||||
type: 'pause',
|
||||
btnName: '暂停',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'nullify',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-work-order:update`)
|
||||
? {
|
||||
type: 'nullify',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'finish',
|
||||
btnName: '完成',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-work-order:update`)
|
||||
? {
|
||||
type: 'finish',
|
||||
btnName: '完成',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'stop',
|
||||
btnName: '终止',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-work-order:update`)
|
||||
? {
|
||||
type: 'stop',
|
||||
btnName: '终止',
|
||||
showParam: {
|
||||
type: '|',
|
||||
data: [
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
this.$auth.hasPermi(`base:core-work-order:detail`)
|
||||
: undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:core-work-order:query',
|
||||
'base:order:query'
|
||||
])
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '查看详情',
|
||||
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-worker:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-worker:create') ? 'button' : '',
|
||||
|
||||
@@ -52,8 +52,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
filter: parseTime,
|
||||
|
||||
filter: parseTime
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
@@ -116,7 +115,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-workshop-section:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-workshop-section:create') ? 'button' : '',
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
<template>
|
||||
<el-drawer :visible.sync="drawer" :append-to-body="true" size="80%" >
|
||||
<small-title slot="title" :no-padding="true">
|
||||
<!-- <template v-for="demo in demoList"> -->
|
||||
<!-- <el-button :key="demo.name" :type="demo.name === curDemo ? 'primary' : ' '" @click="curDemo = demo.name"> -->
|
||||
<!-- {{ $t('module.packingManage.printModelDesign') }} -->
|
||||
模板设计
|
||||
<!-- </el-button> -->
|
||||
<!-- </template> -->
|
||||
</small-title>
|
||||
<el-card>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-col :span="4">
|
||||
<!-- 模板选择 -->
|
||||
<el-drawer
|
||||
:visible.sync="drawer"
|
||||
:append-to-body="true"
|
||||
size="80%">
|
||||
<small-title
|
||||
slot="title"
|
||||
:no-padding="true">
|
||||
<!-- <template v-for="demo in demoList"> -->
|
||||
<!-- <el-button :key="demo.name" :type="demo.name === curDemo ? 'primary' : ' '" @click="curDemo = demo.name"> -->
|
||||
<!-- {{ $t('module.packingManage.printModelDesign') }} -->
|
||||
模板设计
|
||||
<!-- </el-button> -->
|
||||
<!-- </template> -->
|
||||
</small-title>
|
||||
<el-card>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<!-- <el-col :span="4"> -->
|
||||
<!-- 模板选择 -->
|
||||
|
||||
<!-- <el-select
|
||||
<!-- <el-select
|
||||
v-model="mode"
|
||||
filterable
|
||||
:default-value="0"
|
||||
@@ -25,393 +30,469 @@
|
||||
{{ opt.name }}
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<!-- 纸张设置 -->
|
||||
<el-button-group style="margin:0 10px">
|
||||
<el-button v-for="(value,type) in paperTypes" :key="type" :type="curPaperType === type ? 'primary' : ' '"
|
||||
@click="setPaper(type,value)">
|
||||
{{ type }}
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<el-input-number style="margin:0 10px" :value="scaleValue " :precision="2" :step="0.1" :min="scaleMin"
|
||||
:max="scaleMax" @change="changeScale" />
|
||||
<el-popover v-model="paperPopVisible" placement="bottom" width="300" title="设置纸张宽高(mm)">
|
||||
<div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px">
|
||||
<el-input v-model="paperWidth" type="number" style=" width: 100px; text-align: center" place="宽(mm)" />~
|
||||
<el-input v-model="paperHeight" type="number" style=" width: 100px; text-align: center" place="高(mm)" />
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" style="width: 100%" size="mini" @click="otherPaper">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" type="primary" style="margin:0 10px">自定义宽高</el-button>
|
||||
</el-popover>
|
||||
<!-- </el-col> -->
|
||||
<el-col :span="24">
|
||||
<!-- 纸张设置 -->
|
||||
<el-button-group style="margin: 0 10px">
|
||||
<el-button
|
||||
v-for="(value, type) in paperTypes"
|
||||
:key="type"
|
||||
:type="curPaperType === type ? 'primary' : ' '"
|
||||
@click="setPaper(type, value)">
|
||||
{{ type }}
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<el-input-number
|
||||
style="margin: 0 10px; width: 140px"
|
||||
:value="scaleValue"
|
||||
:precision="2"
|
||||
:step="0.1"
|
||||
:min="scaleMin"
|
||||
:max="scaleMax"
|
||||
@change="changeScale" />
|
||||
<el-popover
|
||||
v-model="paperPopVisible"
|
||||
placement="bottom"
|
||||
width="300"
|
||||
title="设置纸张宽高(mm)">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
">
|
||||
<el-input
|
||||
v-model="paperWidth"
|
||||
type="number"
|
||||
style="width: 100px; text-align: center"
|
||||
place="宽(mm)" />
|
||||
~
|
||||
<el-input
|
||||
v-model="paperHeight"
|
||||
type="number"
|
||||
style="width: 100px; text-align: center"
|
||||
place="高(mm)" />
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
@click="otherPaper">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button
|
||||
slot="reference"
|
||||
type="primary"
|
||||
style="margin: 0 10px">
|
||||
自定义宽高
|
||||
</el-button>
|
||||
</el-popover>
|
||||
|
||||
<!-- <a-button-group>-->
|
||||
<!-- <template v-for="(value,type) in paperTypes">-->
|
||||
<!-- <a-button :type="curPaperType === type ? 'primary' : 'info'" @click="setPaper(type,value)" :key="type">-->
|
||||
<!-- {{ type }}-->
|
||||
<!-- </a-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- <a-popover v-model="paperPopVisible" title="设置纸张宽高(mm)" trigger="click">-->
|
||||
<!-- <div slot="content">-->
|
||||
<!-- <a-input-group compact style="margin: 10px 10px">-->
|
||||
<!-- <a-input type="number" v-model="paperWidth" style=" width: 100px; text-align: center"-->
|
||||
<!-- placeholder="宽(mm)"/>-->
|
||||
<!-- <a-input style=" width: 30px; border-left: 0; pointer-events: none; backgroundColor: #fff"-->
|
||||
<!-- placeholder="~" disabled-->
|
||||
<!-- />-->
|
||||
<!-- <a-input type="number" v-model="paperHeight" style="width: 100px; text-align: center; border-left: 0"-->
|
||||
<!-- placeholder="高(mm)"/>-->
|
||||
<!-- </a-input-group>-->
|
||||
<!-- <a-button type="primary" style="width: 100%" @click="otherPaper">确定</a-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-button :type="'other'==curPaperType?'primary':''">自定义纸张</a-button>-->
|
||||
<!-- </a-popover>-->
|
||||
<!-- </a-button-group>-->
|
||||
<!-- <a-button-group>-->
|
||||
<!-- <template v-for="(value,type) in paperTypes">-->
|
||||
<!-- <a-button :type="curPaperType === type ? 'primary' : 'info'" @click="setPaper(type,value)" :key="type">-->
|
||||
<!-- {{ type }}-->
|
||||
<!-- </a-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- <a-popover v-model="paperPopVisible" title="设置纸张宽高(mm)" trigger="click">-->
|
||||
<!-- <div slot="content">-->
|
||||
<!-- <a-input-group compact style="margin: 10px 10px">-->
|
||||
<!-- <a-input type="number" v-model="paperWidth" style=" width: 100px; text-align: center"-->
|
||||
<!-- placeholder="宽(mm)"/>-->
|
||||
<!-- <a-input style=" width: 30px; border-left: 0; pointer-events: none; backgroundColor: #fff"-->
|
||||
<!-- placeholder="~" disabled-->
|
||||
<!-- />-->
|
||||
<!-- <a-input type="number" v-model="paperHeight" style="width: 100px; text-align: center; border-left: 0"-->
|
||||
<!-- placeholder="高(mm)"/>-->
|
||||
<!-- </a-input-group>-->
|
||||
<!-- <a-button type="primary" style="width: 100%" @click="otherPaper">确定</a-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-button :type="'other'==curPaperType?'primary':''">自定义纸张</a-button>-->
|
||||
<!-- </a-popover>-->
|
||||
<!-- </a-button-group>-->
|
||||
|
||||
<!-- 预览/打印 -->
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="redo" @click="rotatePaper()">旋转</el-button>
|
||||
<el-button type="primary" icon="el-icon-view" @click="preView">
|
||||
预览
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" icon="el-icon-printer" @click="print">
|
||||
<!-- 预览/打印 -->
|
||||
<el-button-group>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="redo"
|
||||
@click="rotatePaper()">
|
||||
旋转
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-view"
|
||||
@click="preView">
|
||||
预览
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" icon="el-icon-printer" @click="print">
|
||||
直接打印
|
||||
</el-button> -->
|
||||
<el-button type="primary" icon="el-icon-s-management" @click="save">
|
||||
保存
|
||||
</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" @click="clearPaper">
|
||||
清空
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<!-- 保存/清空 -->
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-card style="height: 100vh">
|
||||
<el-row>
|
||||
<el-col :span="24" class="rect-printElement-types hiprintEpContainer" />
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-card class="card-design">
|
||||
<div id="hiprint-printTemplate" class="hiprint-printTemplate" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4" class="params_setting_container">
|
||||
<el-card>
|
||||
<el-row class="hinnn-layout-sider">
|
||||
<div id="PrintElementOptionSetting" />
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 预览 -->
|
||||
<print-preview ref="preView" />
|
||||
</el-card>
|
||||
</el-drawer>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-s-management"
|
||||
@click="save">
|
||||
保存
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="clearPaper">
|
||||
清空
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<!-- 保存/清空 -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-card style="height: 100vh">
|
||||
<el-row>
|
||||
<el-col
|
||||
:span="24"
|
||||
class="rect-printElement-types hiprintEpContainer" />
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-card class="card-design">
|
||||
<div
|
||||
id="hiprint-printTemplate"
|
||||
class="hiprint-printTemplate" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="4"
|
||||
class="params_setting_container">
|
||||
<el-card>
|
||||
<el-row class="hinnn-layout-sider">
|
||||
<div id="PrintElementOptionSetting" />
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 预览 -->
|
||||
<print-preview ref="preView" />
|
||||
</el-card>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import printPreview from './preview'
|
||||
import { MessageBox } from 'element-ui'
|
||||
import { hiprint } from 'vue-plugin-hiprint'
|
||||
import providers from './providers'
|
||||
import printPreview from './preview';
|
||||
import { MessageBox } from 'element-ui';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import providers from './providers';
|
||||
// import printData from './print-data'
|
||||
import $ from 'jquery'
|
||||
import SmallTitle from './SmallTitle.vue'
|
||||
let hiprintTemplate = null
|
||||
import $ from 'jquery';
|
||||
import SmallTitle from './SmallTitle.vue';
|
||||
let hiprintTemplate = null;
|
||||
export default {
|
||||
name: 'PrintCustom',
|
||||
components: { printPreview, SmallTitle },
|
||||
// props: {
|
||||
// modelData: {
|
||||
// type: String,
|
||||
// default: ''
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
// paperPopVisible: false,
|
||||
// 模板选择
|
||||
mode: 0,
|
||||
template: null,
|
||||
modeList: [],
|
||||
// 当前纸张
|
||||
curPaper: {
|
||||
// type: 'other',
|
||||
// width: 220,
|
||||
// height: 80
|
||||
},
|
||||
printData:{},
|
||||
drawer: false,
|
||||
// 纸张类型
|
||||
paperTypes: {
|
||||
'A3': {
|
||||
width: 420,
|
||||
height: 296.6
|
||||
},
|
||||
'A4': {
|
||||
width: 210,
|
||||
height: 297
|
||||
},
|
||||
'A5': {
|
||||
width: 210,
|
||||
height: 147.6
|
||||
},
|
||||
'B3': {
|
||||
width: 500,
|
||||
height: 352.6
|
||||
},
|
||||
'B4': {
|
||||
width: 250,
|
||||
height: 352.6
|
||||
},
|
||||
'B5': {
|
||||
width: 250,
|
||||
height: 175.6
|
||||
}
|
||||
},
|
||||
scaleValue: 1,
|
||||
scaleMax: 5,
|
||||
scaleMin: 0.5,
|
||||
// 自定义纸张
|
||||
paperPopVisible: false,
|
||||
paperWidth: '210',
|
||||
paperHeight: '297'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
curPaperType() {
|
||||
let type = 'other'
|
||||
const types = this.paperTypes
|
||||
for (const key in types) {
|
||||
const item = types[key]
|
||||
const { width, height } = this.curPaper
|
||||
if (item.width === width && item.height === height) {
|
||||
type = key
|
||||
}
|
||||
}
|
||||
return type
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// $('.hiprintEpContainer').empty()
|
||||
},
|
||||
destroyed () {
|
||||
$('.hiprintEpContainer').empty()
|
||||
console.log(11111)
|
||||
},
|
||||
methods: {
|
||||
// handleClose() {
|
||||
// $('.hiprintEpContainer').empty()
|
||||
// },
|
||||
closed() {
|
||||
$('.hiprintEpContainer').empty()
|
||||
$('.hiprint-printTemplate').empty()
|
||||
},
|
||||
init(data) {
|
||||
this.drawer = true
|
||||
this.modelData = data
|
||||
this.modeList = providers.map((e) => {
|
||||
return { type: e.type, name: e.name, value: e.value }
|
||||
})
|
||||
this.changeMode()
|
||||
},
|
||||
changeMode() {
|
||||
// hiprintTemplate.clear()
|
||||
// console.log(this.modelData)
|
||||
this.$nextTick(() => {
|
||||
const { mode } = this
|
||||
const provider = providers[mode]
|
||||
hiprint.init({
|
||||
providers: [provider.f]
|
||||
})
|
||||
name: 'PrintCustom',
|
||||
components: { printPreview, SmallTitle },
|
||||
// props: {
|
||||
// modelData: {
|
||||
// type: String,
|
||||
// default: ''
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
// paperPopVisible: false,
|
||||
// 模板选择
|
||||
mode: 0,
|
||||
template: null,
|
||||
modeList: [],
|
||||
// 当前纸张
|
||||
curPaper: {
|
||||
// type: 'other',
|
||||
// width: 220,
|
||||
// height: 80
|
||||
},
|
||||
printData: {},
|
||||
drawer: false,
|
||||
// 纸张类型
|
||||
paperTypes: {
|
||||
A3: {
|
||||
width: 420,
|
||||
height: 296.6,
|
||||
},
|
||||
A4: {
|
||||
width: 210,
|
||||
height: 297,
|
||||
},
|
||||
A5: {
|
||||
width: 210,
|
||||
height: 147.6,
|
||||
},
|
||||
A6: {
|
||||
width: 95,
|
||||
height: 125,
|
||||
},
|
||||
B3: {
|
||||
width: 500,
|
||||
height: 352.6,
|
||||
},
|
||||
B4: {
|
||||
width: 250,
|
||||
height: 352.6,
|
||||
},
|
||||
B5: {
|
||||
width: 250,
|
||||
height: 175.6,
|
||||
},
|
||||
},
|
||||
scaleValue: 1,
|
||||
scaleMax: 5,
|
||||
scaleMin: 0.5,
|
||||
// 自定义纸张
|
||||
paperPopVisible: false,
|
||||
paperWidth: '210',
|
||||
paperHeight: '297',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
curPaperType() {
|
||||
let type = 'other';
|
||||
const types = this.paperTypes;
|
||||
for (const key in types) {
|
||||
const item = types[key];
|
||||
const { width, height } = this.curPaper;
|
||||
if (item.width === width && item.height === height) {
|
||||
type = key;
|
||||
}
|
||||
}
|
||||
return type;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// $('.hiprintEpContainer').empty()
|
||||
},
|
||||
destroyed() {
|
||||
$('.hiprintEpContainer').empty();
|
||||
console.log(11111);
|
||||
},
|
||||
methods: {
|
||||
// handleClose() {
|
||||
// $('.hiprintEpContainer').empty()
|
||||
// },
|
||||
closed() {
|
||||
$('.hiprintEpContainer').empty();
|
||||
$('.hiprint-printTemplate').empty();
|
||||
},
|
||||
init(data) {
|
||||
this.drawer = true;
|
||||
this.modelData = data;
|
||||
this.modeList = providers.map((e) => {
|
||||
return { type: e.type, name: e.name, value: e.value };
|
||||
});
|
||||
this.changeMode();
|
||||
},
|
||||
changeMode() {
|
||||
// hiprintTemplate.clear()
|
||||
// console.log(this.modelData)
|
||||
this.$nextTick(() => {
|
||||
const { mode } = this;
|
||||
const provider = providers[mode];
|
||||
hiprint.init({
|
||||
providers: [provider.f],
|
||||
});
|
||||
|
||||
// $('#hiprint-printTemplate').empty()
|
||||
// console.log(JSON.parse(this.modelData))
|
||||
hiprint.setConfig()
|
||||
// 替换配置
|
||||
hiprint.setConfig({
|
||||
movingDistance: 2.5,
|
||||
text: {
|
||||
supportOptions: [
|
||||
{
|
||||
name: 'styler',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
name: 'formatter',
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
// $('#hiprint-printTemplate').empty()
|
||||
// console.log(JSON.parse(this.modelData))
|
||||
hiprint.setConfig();
|
||||
// 替换配置
|
||||
hiprint.setConfig({
|
||||
movingDistance: 2.5,
|
||||
text: {
|
||||
supportOptions: [
|
||||
{
|
||||
name: 'styler',
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
name: 'formatter',
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
// console.log(this.modelData)
|
||||
// console.log($('#hiprint-printTemplate').empty())
|
||||
// if () {
|
||||
// console.log(this.modelData);
|
||||
// $('.hiprintEpContainer').empty()
|
||||
// hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
||||
// $('.hiprint-printTemplate').empty()
|
||||
// hiprintTemplate = new hiprint.PrintTemplate({
|
||||
// template: JSON.parse(this.modelData),
|
||||
// settingContainer: '#PrintElementOptionSetting',
|
||||
// paginationContainer: '.hiprint-printPagination'
|
||||
// })
|
||||
// } else {
|
||||
$('.hiprintEpContainer').empty()
|
||||
console.log(this.modelData || {});
|
||||
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
||||
$('.hiprint-printTemplate').empty()
|
||||
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
||||
const template = provider.value
|
||||
// console.log(template)
|
||||
if (this.modelData) {
|
||||
hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: JSON.parse(this.modelData),
|
||||
settingContainer: '#PrintElementOptionSetting',
|
||||
paginationContainer: '.hiprint-printPagination'
|
||||
})
|
||||
} else {
|
||||
hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template:{},
|
||||
settingContainer: '#PrintElementOptionSetting',
|
||||
paginationContainer: '.hiprint-printPagination'
|
||||
})
|
||||
}
|
||||
// }
|
||||
hiprintTemplate.design('#hiprint-printTemplate')
|
||||
// console.log(hiprintTemplate)
|
||||
console.log(hiprintTemplate);
|
||||
// hiprintTemplate.design('#hiprint-printTemplate', { grid: true })
|
||||
// 获取当前放大比例, 当zoom时传true 才会有
|
||||
this.scaleValue = hiprintTemplate.editingPanel.scale || 1
|
||||
// this.scaleValue = hiprintTemplate.editingPanel.scale || 1
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 设置纸张大小
|
||||
* @param type [A3, A4, A5, B3, B4, B5, other]
|
||||
* @param value {width,height} mm
|
||||
*/
|
||||
setPaper(type, value) {
|
||||
try {
|
||||
if (Object.keys(this.paperTypes).includes(type)) {
|
||||
this.curPaper = { type: type, width: value.width, height: value.height }
|
||||
hiprintTemplate.setPaper(value.width, value.height)
|
||||
} else {
|
||||
this.curPaper = { type: 'other', width: value.width, height: value.height }
|
||||
hiprintTemplate.setPaper(value.width, value.height)
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.error(`操作失败: ${error}`)
|
||||
}
|
||||
},
|
||||
changeScale(currentValue, oldValue) {
|
||||
let big = false
|
||||
currentValue <= oldValue ? big = false : big = true
|
||||
let scaleValue = this.scaleValue
|
||||
if (big) {
|
||||
scaleValue += 0.1
|
||||
if (scaleValue > this.scaleMax) scaleValue = 5
|
||||
} else {
|
||||
scaleValue -= 0.1
|
||||
if (scaleValue < this.scaleMin) scaleValue = 0.5
|
||||
}
|
||||
if (hiprintTemplate) {
|
||||
// scaleValue: 放大缩小值, false: 不保存(不传也一样), 如果传 true, 打印时也会放大
|
||||
hiprintTemplate.zoom(scaleValue)
|
||||
this.scaleValue = scaleValue
|
||||
}
|
||||
},
|
||||
clearPaper() {
|
||||
MessageBox.confirm('是否确认清空模板信息?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
try {
|
||||
hiprintTemplate.clear()
|
||||
} catch (error) {
|
||||
this.$message.error(`操作失败: ${error}`)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
otherPaper() {
|
||||
const value = {}
|
||||
value.width = this.paperWidth
|
||||
value.height = this.paperHeight
|
||||
this.paperPopVisible = false
|
||||
this.setPaper('other', value)
|
||||
},
|
||||
rotatePaper() {
|
||||
if (hiprintTemplate) {
|
||||
hiprintTemplate.rotatePaper()
|
||||
}
|
||||
},
|
||||
preView() {
|
||||
const { width } = this.curPaper
|
||||
this.$refs.preView.show(hiprintTemplate, this.printData, width)
|
||||
},
|
||||
print() {
|
||||
// if (window.hiwebSocket.opened) {
|
||||
const printerList = hiprintTemplate.getPrinterList()
|
||||
console.log(printerList)
|
||||
hiprintTemplate.print2(this.printData, { printer: '', title: '预览打印' })
|
||||
// return
|
||||
// }
|
||||
// this.$message.error('客户端未连接,无法直接打印')
|
||||
},
|
||||
save() {
|
||||
// console.log(hiprintTemplate.getJson())
|
||||
const { mode } = this
|
||||
const provider = providers[mode]
|
||||
// console.log(hiprintTemplate.getJson())
|
||||
this.setTemplate({
|
||||
name: provider.value,
|
||||
json: hiprintTemplate.getJson()
|
||||
})
|
||||
},
|
||||
setTemplate(payload) {
|
||||
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
||||
// console.log(payload.json)
|
||||
// templates[payload.name] = payload.json
|
||||
// this.$ls.set('KEY_TEMPLATES', templates)
|
||||
this.$message.info('保存成功')
|
||||
// console.log(JSON.stringify(payload.json))
|
||||
this.drawer = false
|
||||
this.$emit('saveData', payload.json)
|
||||
$('.hiprintEpContainer').empty()
|
||||
// this.$parent.$parent.getModelData(payload.json)
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log(this.modelData)
|
||||
// console.log($('#hiprint-printTemplate').empty())
|
||||
// if () {
|
||||
// console.log(this.modelData);
|
||||
// $('.hiprintEpContainer').empty()
|
||||
// hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
||||
// $('.hiprint-printTemplate').empty()
|
||||
// hiprintTemplate = new hiprint.PrintTemplate({
|
||||
// template: JSON.parse(this.modelData),
|
||||
// settingContainer: '#PrintElementOptionSetting',
|
||||
// paginationContainer: '.hiprint-printPagination'
|
||||
// })
|
||||
// } else {
|
||||
$('.hiprintEpContainer').empty();
|
||||
console.log(this.modelData || {});
|
||||
hiprint.PrintElementTypeManager.build(
|
||||
'.hiprintEpContainer',
|
||||
provider.value
|
||||
);
|
||||
$('.hiprint-printTemplate').empty();
|
||||
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
||||
const template = provider.value;
|
||||
// console.log(template)
|
||||
if (this.modelData) {
|
||||
hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: JSON.parse(this.modelData),
|
||||
settingContainer: '#PrintElementOptionSetting',
|
||||
paginationContainer: '.hiprint-printPagination',
|
||||
});
|
||||
} else {
|
||||
hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: {},
|
||||
settingContainer: '#PrintElementOptionSetting',
|
||||
paginationContainer: '.hiprint-printPagination',
|
||||
});
|
||||
}
|
||||
// }
|
||||
hiprintTemplate.design('#hiprint-printTemplate');
|
||||
// console.log(hiprintTemplate)
|
||||
console.log(hiprintTemplate);
|
||||
// hiprintTemplate.design('#hiprint-printTemplate', { grid: true })
|
||||
// 获取当前放大比例, 当zoom时传true 才会有
|
||||
this.scaleValue = hiprintTemplate.editingPanel.scale || 1;
|
||||
// this.scaleValue = hiprintTemplate.editingPanel.scale || 1
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 设置纸张大小
|
||||
* @param type [A3, A4, A5, B3, B4, B5, other]
|
||||
* @param value {width,height} mm
|
||||
*/
|
||||
setPaper(type, value) {
|
||||
try {
|
||||
if (Object.keys(this.paperTypes).includes(type)) {
|
||||
this.curPaper = {
|
||||
type: type,
|
||||
width: value.width,
|
||||
height: value.height,
|
||||
};
|
||||
hiprintTemplate.setPaper(value.width, value.height);
|
||||
} else {
|
||||
this.curPaper = {
|
||||
type: 'other',
|
||||
width: value.width,
|
||||
height: value.height,
|
||||
};
|
||||
hiprintTemplate.setPaper(value.width, value.height);
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.error(`操作失败: ${error}`);
|
||||
}
|
||||
},
|
||||
changeScale(currentValue, oldValue) {
|
||||
let big = false;
|
||||
currentValue <= oldValue ? (big = false) : (big = true);
|
||||
let scaleValue = this.scaleValue;
|
||||
if (big) {
|
||||
scaleValue += 0.1;
|
||||
if (scaleValue > this.scaleMax) scaleValue = 5;
|
||||
} else {
|
||||
scaleValue -= 0.1;
|
||||
if (scaleValue < this.scaleMin) scaleValue = 0.5;
|
||||
}
|
||||
if (hiprintTemplate) {
|
||||
// scaleValue: 放大缩小值, false: 不保存(不传也一样), 如果传 true, 打印时也会放大
|
||||
hiprintTemplate.zoom(scaleValue);
|
||||
this.scaleValue = scaleValue;
|
||||
}
|
||||
},
|
||||
clearPaper() {
|
||||
MessageBox.confirm('是否确认清空模板信息?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
try {
|
||||
hiprintTemplate.clear();
|
||||
} catch (error) {
|
||||
this.$message.error(`操作失败: ${error}`);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
otherPaper() {
|
||||
const value = {};
|
||||
value.width = this.paperWidth;
|
||||
value.height = this.paperHeight;
|
||||
this.paperPopVisible = false;
|
||||
this.setPaper('other', value);
|
||||
},
|
||||
rotatePaper() {
|
||||
if (hiprintTemplate) {
|
||||
hiprintTemplate.rotatePaper();
|
||||
}
|
||||
},
|
||||
preView() {
|
||||
const { width } = this.curPaper;
|
||||
this.$refs.preView.show(hiprintTemplate, this.printData, width);
|
||||
},
|
||||
print() {
|
||||
// if (window.hiwebSocket.opened) {
|
||||
const printerList = hiprintTemplate.getPrinterList();
|
||||
console.log(printerList);
|
||||
hiprintTemplate.print2(this.printData, {
|
||||
printer: '',
|
||||
title: '预览打印',
|
||||
});
|
||||
// return
|
||||
// }
|
||||
// this.$message.error('客户端未连接,无法直接打印')
|
||||
},
|
||||
save() {
|
||||
// console.log(hiprintTemplate.getJson())
|
||||
const { mode } = this;
|
||||
const provider = providers[mode];
|
||||
// console.log(hiprintTemplate.getJson())
|
||||
this.setTemplate({
|
||||
name: provider.value,
|
||||
json: hiprintTemplate.getJson(),
|
||||
});
|
||||
},
|
||||
setTemplate(payload) {
|
||||
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
||||
// console.log(payload.json)
|
||||
// templates[payload.name] = payload.json
|
||||
// this.$ls.set('KEY_TEMPLATES', templates)
|
||||
this.$message.info('保存成功');
|
||||
// console.log(JSON.stringify(payload.json))
|
||||
this.drawer = false;
|
||||
this.$emit('saveData', payload.json);
|
||||
$('.hiprintEpContainer').empty();
|
||||
// this.$parent.$parent.getModelData(payload.json)
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// build 拖拽
|
||||
::v-deep .hiprint-printElement-type >li>ul>li>a {
|
||||
padding: 4px 4px;
|
||||
color: #1296db;
|
||||
line-height: 1;
|
||||
height: auto;
|
||||
text-overflow: ellipsis;
|
||||
::v-deep .hiprint-printElement-type > li > ul > li > a {
|
||||
padding: 4px 4px;
|
||||
color: #1296db;
|
||||
line-height: 1;
|
||||
height: auto;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
// 设计容器
|
||||
.card-design {
|
||||
// overflow: hidden;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
// overflow: hidden;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-21 15:21:32
|
||||
* @LastEditTime: 2024-04-11 16:22:19
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -121,15 +121,15 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="attr-list" v-if="idAttrShow">
|
||||
|
||||
<div class="attr-list" v-if="idAttrShow && this.$auth.hasPermi('base:material-attr:query')">
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
物料属性
|
||||
</small-title>
|
||||
|
||||
<div v-if="!isdetail" class="action_btn">
|
||||
<div v-if="!isdetail && this.$auth.hasPermi('base:material-attr:create')" class="action_btn">
|
||||
<template>
|
||||
<span style="display: inline-block;">
|
||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
|
||||
@@ -182,16 +182,23 @@ import { parseTime } from '../../core/mixins/code-filter';
|
||||
import attrAdd from './attr-add';
|
||||
import { getDictDatas } from "@/utils/dict";
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
];
|
||||
// const tableBtn = [
|
||||
// this.$auth.hasPermiAnd([
|
||||
// 'base:material-attr:create',
|
||||
// 'base:material-attr:update'
|
||||
// ]) ?
|
||||
// {
|
||||
// type: 'edit',
|
||||
// btnName: '编辑',
|
||||
// }
|
||||
// : undefined,
|
||||
// this.$auth.hasPermi('base:material-attr:delete') ?
|
||||
// {
|
||||
// type: 'delete',
|
||||
// btnName: '删除',
|
||||
// }
|
||||
// : undefined,
|
||||
// ];
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
@@ -213,7 +220,23 @@ export default {
|
||||
components: { SmallTitle, attrAdd },
|
||||
data() {
|
||||
return {
|
||||
tableBtn,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:material-attr:create',
|
||||
'base:material-attr:update'
|
||||
]) ?
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:material-attr:delete') ?
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
],
|
||||
tableProps,
|
||||
addOrUpdateVisible: false,
|
||||
urlOptions: {
|
||||
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:material:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:material:create') ? 'button' : '',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-21 14:39:52
|
||||
* @LastEditTime: 2024-04-11 16:44:41
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -56,14 +56,14 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="attr-list" v-if="idAttrShow">
|
||||
<div class="attr-list" v-if="idAttrShow && $auth.hasPermiAnd(['base:material-product-bom:query', 'base:material-product-bom-det:query'])">
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
BOM明细
|
||||
</small-title>
|
||||
|
||||
<div v-if="!isdetail" class="action_btn">
|
||||
<div v-if="!isdetail && $auth.hasPermi('base:material-product-bom:create')" class="action_btn">
|
||||
<template>
|
||||
<span style="display: inline-block;">
|
||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
||||
@@ -116,16 +116,16 @@ import { parseTime } from '../../core/mixins/code-filter';
|
||||
import attrAdd from './attr-add';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
];
|
||||
// const tableBtn = [
|
||||
// {
|
||||
// type: 'edit',
|
||||
// btnName: '编辑',
|
||||
// },
|
||||
// {
|
||||
// type: 'delete',
|
||||
// btnName: '删除',
|
||||
// },
|
||||
// ];
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
@@ -160,7 +160,24 @@ export default {
|
||||
components: { SmallTitle, attrAdd },
|
||||
data() {
|
||||
return {
|
||||
tableBtn,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:material-product-bom:update',
|
||||
'base:material-product-bom-det:create',
|
||||
'base:material-product-bom-det:update'
|
||||
]) ?
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:material-product-bom:delete') ?
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
],
|
||||
tableProps,
|
||||
addOrUpdateVisible: false,
|
||||
urlOptions: {
|
||||
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:material:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:material:create') ? 'button' : '',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-04-08 11:49:33
|
||||
* @LastEditTime: 2024-04-10 16:34:40
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -141,8 +141,8 @@ export default {
|
||||
// btnName: '重置',
|
||||
// name: 'reset',
|
||||
// },
|
||||
{
|
||||
type: 'separate',
|
||||
{
|
||||
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'button' : '',
|
||||
|
||||
45
src/views/base/packagingPrintLog2/components/InputArea.vue
Normal file
45
src/views/base/packagingPrintLog2/components/InputArea.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="tableInner">
|
||||
<el-input
|
||||
v-if="list.isEdit"
|
||||
type="number"
|
||||
v-model="list[itemProp]"
|
||||
@blur="changeInput" />
|
||||
<span v-else>{{ list[itemProp] }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'InputArea',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
itemProp: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
watch: {
|
||||
injectData() {
|
||||
this.initData();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.list = this.injectData;
|
||||
},
|
||||
changeInput() {
|
||||
this.$emit('emitData', this.list);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
226
src/views/base/packagingPrintLog2/components/OtherMsg.vue
Normal file
226
src/views/base/packagingPrintLog2/components/OtherMsg.vue
Normal file
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<div class="other-msg-box">
|
||||
<el-radio-group
|
||||
v-model="chooseMsg"
|
||||
@change="changeChoose">
|
||||
<el-radio :label="1">
|
||||
<div style="display: inline-block">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="printMsg1"
|
||||
class="demo-form-inline">
|
||||
<el-form-item label="客户">
|
||||
<el-select
|
||||
size="small"
|
||||
v-model="printMsg1.customerId"
|
||||
filterable
|
||||
placeholder="客户">
|
||||
<el-option
|
||||
v-for="item in customerList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="封箱人员工号">
|
||||
<el-input
|
||||
v-model="printMsg1.sealWorker"
|
||||
size="small"
|
||||
placeholder="封箱人员工号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打包人员工号">
|
||||
<el-input
|
||||
v-model="printMsg1.packWorker"
|
||||
size="small"
|
||||
placeholder="打包人员工号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程卡号">
|
||||
<el-input
|
||||
v-model="printMsg1.processCard"
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
placeholder="流程卡号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘规格">
|
||||
<el-input
|
||||
v-model="printMsg1.pallet"
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
placeholder="托盘规格"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="printMsg1.remark"
|
||||
size="small"
|
||||
placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-radio>
|
||||
<el-radio :label="2">
|
||||
<div style="display: inline-block">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="printMsg2"
|
||||
class="demo-form-inline">
|
||||
<el-form-item label="客户">
|
||||
<el-select
|
||||
size="small"
|
||||
v-model="printMsg2.customerId"
|
||||
filterable
|
||||
placeholder="客户">
|
||||
<el-option
|
||||
v-for="item in customerList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="封箱人员工号">
|
||||
<el-input
|
||||
v-model="printMsg2.sealWorker"
|
||||
size="small"
|
||||
placeholder="封箱人员工号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打包人员工号">
|
||||
<el-input
|
||||
v-model="printMsg2.packWorker"
|
||||
size="small"
|
||||
placeholder="打包人员工号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程卡号">
|
||||
<el-input
|
||||
v-model="printMsg2.processCard"
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
placeholder="流程卡号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘规格">
|
||||
<el-input
|
||||
v-model="printMsg2.pallet"
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
placeholder="托盘规格"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="printMsg2.remark"
|
||||
size="small"
|
||||
placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-radio>
|
||||
<el-radio :label="3">
|
||||
<div style="display: inline-block">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="printMsg3"
|
||||
class="demo-form-inline">
|
||||
<el-form-item label="客户">
|
||||
<el-select
|
||||
size="small"
|
||||
v-model="printMsg3.customerId"
|
||||
filterable
|
||||
placeholder="客户">
|
||||
<el-option
|
||||
v-for="item in customerList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="封箱人员工号">
|
||||
<el-input
|
||||
v-model="printMsg3.sealWorker"
|
||||
size="small"
|
||||
placeholder="封箱人员工号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打包人员工号">
|
||||
<el-input
|
||||
v-model="printMsg3.packWorker"
|
||||
size="small"
|
||||
placeholder="打包人员工号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程卡号">
|
||||
<el-input
|
||||
v-model="printMsg3.processCard"
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
placeholder="流程卡号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘规格">
|
||||
<el-input
|
||||
v-model="printMsg3.pallet"
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
placeholder="托盘规格"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="printMsg3.remark"
|
||||
size="small"
|
||||
placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getCustomerList } from '@/api/base/packingInfo';
|
||||
export default {
|
||||
name: 'OtherMsg',
|
||||
props: {
|
||||
printMsg1: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
printMsg2: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
printMsg3: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chooseMsg: 1,
|
||||
customerList: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getCList();
|
||||
},
|
||||
methods: {
|
||||
getCList() {
|
||||
getCustomerList().then((res) => {
|
||||
console.log(res);
|
||||
console.log('customer');
|
||||
this.customerList = res.data;
|
||||
});
|
||||
},
|
||||
changeChoose(val) {
|
||||
this.$emit('changeChoose', val);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.other-msg-box {
|
||||
.el-radio {
|
||||
display: block;
|
||||
line-height: 36px;
|
||||
.demo-form-inline {
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
182
src/views/base/packagingPrintLog2/components/Printed.vue
Normal file
182
src/views/base/packagingPrintLog2/components/Printed.vue
Normal file
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<div class="show-box">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick2" />
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:page="queryParams2.pageNo"
|
||||
:limit="queryParams2.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list2">
|
||||
<method-btn
|
||||
v-if="tableBtn2.length"
|
||||
slot="handleBtn"
|
||||
:width="240"
|
||||
label="操作"
|
||||
:method-list="tableBtn2"
|
||||
@clickBtn="handleClick2" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:page.sync="queryParams2.pageNo"
|
||||
:limit.sync="queryParams2.pageSize"
|
||||
:total="total2"
|
||||
@pagination="getList2" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import { getPackingPage } from '@/api/base/packingInfo';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'packagingCode',
|
||||
label: '成品周转编号',
|
||||
minWidth: 180,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'lineId',
|
||||
label: '产线',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'specifications',
|
||||
label: '规格',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'check',
|
||||
label: '判定',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'workStation',
|
||||
label: '工位号',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '片数',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注1',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'printStatus',
|
||||
label: '打印状态',
|
||||
filter: (val) => (val == 1 ? '未打印' : '已打印'),
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'groupClass',
|
||||
label: '班次',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
name: 'Printed',
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'lineId',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 350,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
// 查询参数
|
||||
queryParams2: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
printStatus: '2',
|
||||
lineId: '',
|
||||
createTime: [],
|
||||
},
|
||||
total2: 0,
|
||||
tableProps,
|
||||
list2: [],
|
||||
tableBtn2: [
|
||||
this.$auth.hasPermi('base:order-group:update')
|
||||
? {
|
||||
type: 'reprint',
|
||||
btnName: '重打',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-group:query')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:order-group:update',
|
||||
'base:core-product:query',
|
||||
'base:core-customer:query',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getLineList();
|
||||
},
|
||||
methods: {
|
||||
getLineList() {
|
||||
getCorePLList().then((res) => {
|
||||
console.log(res);
|
||||
this.formConfig[0].selectOptions = res.data;
|
||||
});
|
||||
},
|
||||
getList2() {
|
||||
getPackingPage({ ...this.queryParams2 }).then((res) => {
|
||||
console.log(res);
|
||||
this.list2 = res.data.records || [];
|
||||
this.total2 = res.data.total;
|
||||
});
|
||||
},
|
||||
buttonClick2(val) {
|
||||
console.log(val);
|
||||
this.queryParams2.lineId = val.lineId;
|
||||
this.queryParams2.createTime = val.timeVal;
|
||||
this.getList2();
|
||||
},
|
||||
handleClick2() {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
332
src/views/base/packagingPrintLog2/components/UnPrint.vue
Normal file
332
src/views/base/packagingPrintLog2/components/UnPrint.vue
Normal file
@@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<div class="show-box">
|
||||
<!-- 单选 -->
|
||||
<other-msg
|
||||
:printMsg1="printMsg1"
|
||||
:printMsg2="printMsg2"
|
||||
:printMsg3="printMsg3"
|
||||
@changeChoose="changeChoose" />
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
@emitFun="inputChange">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="260"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList" />
|
||||
<!-- 预览 -->
|
||||
<print-preview ref="preView" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import inputArea from './InputArea.vue';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'packagingCode',
|
||||
label: '成品周转编号',
|
||||
minWidth: 160,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'lineId',
|
||||
label: '产线',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'specifications',
|
||||
label: '规格',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'check',
|
||||
label: '判定',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'workStation',
|
||||
label: '工位号',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '片数',
|
||||
subcomponent: inputArea,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注1',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'printStatus',
|
||||
label: '打印状态',
|
||||
filter: (val) => (val == 1 ? '未打印' : '已打印'),
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '时间',
|
||||
filter: parseTime,
|
||||
minWidth: 160,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'groupClass',
|
||||
label: '班次',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
];
|
||||
import OtherMsg from './OtherMsg';
|
||||
import { getPackingPage, updatePacking } from '@/api/base/packingInfo';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
import printPreview from './preview';
|
||||
import printTemplate from '../print-template';
|
||||
export default {
|
||||
name: 'UnPrint',
|
||||
components: { OtherMsg, printPreview },
|
||||
data() {
|
||||
return {
|
||||
printMsg1: {
|
||||
customerId: '',
|
||||
sealWorker: '',
|
||||
packWorker: '',
|
||||
processCard: '',
|
||||
pallet: '',
|
||||
remark: '',
|
||||
},
|
||||
printMsg2: {
|
||||
customerId: '',
|
||||
sealWorker: '',
|
||||
packWorker: '',
|
||||
processCard: '',
|
||||
pallet: '',
|
||||
remark: '',
|
||||
},
|
||||
printMsg3: {
|
||||
customerId: '',
|
||||
sealWorker: '',
|
||||
packWorker: '',
|
||||
processCard: '',
|
||||
pallet: '',
|
||||
remark: '',
|
||||
},
|
||||
chooseMsg: 1, //单选
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'lineId',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 350,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
printStatus: '1',
|
||||
lineId: '',
|
||||
createTime: [],
|
||||
},
|
||||
total: 0,
|
||||
tableProps,
|
||||
list: [],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:order:query',
|
||||
'base:order-con-group-order:create',
|
||||
])
|
||||
? {
|
||||
type: 'view',
|
||||
btnName: '预览',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-group:update')
|
||||
? {
|
||||
type: 'print',
|
||||
btnName: '打印',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-group:update')
|
||||
? {
|
||||
type: 'printed',
|
||||
btnName: '已打印',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:order-group:update',
|
||||
'base:core-product:query',
|
||||
'base:core-customer:query',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'isEdit',
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:order-group:update',
|
||||
'base:core-product:query',
|
||||
'base:core-customer:query',
|
||||
])
|
||||
? {
|
||||
type: 'save',
|
||||
btnName: '保存',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'isEdit',
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-group:query')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
printData: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getLineList();
|
||||
console.log(printTemplate);
|
||||
console.log('================printTemplate');
|
||||
},
|
||||
methods: {
|
||||
getLineList() {
|
||||
getCorePLList().then((res) => {
|
||||
this.formConfig[0].selectOptions = res.data;
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
getPackingPage({ ...this.queryParams }).then((res) => {
|
||||
this.list = res.data.records || [];
|
||||
this.total = res.data.total;
|
||||
});
|
||||
},
|
||||
// 单选
|
||||
changeChoose(val) {
|
||||
this.chooseMsg = val;
|
||||
},
|
||||
buttonClick(val) {
|
||||
this.queryParams.lineId = val.lineId;
|
||||
this.queryParams.createTime = val.timeVal;
|
||||
this.getList();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
switch (val.type) {
|
||||
case 'edit':
|
||||
this.editNum(val.data);
|
||||
break;
|
||||
case 'save':
|
||||
this.saveNum(val.data);
|
||||
break;
|
||||
case 'view':
|
||||
this.preView();
|
||||
break;
|
||||
case 'print':
|
||||
this.printTemp();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
},
|
||||
// 编辑
|
||||
editNum(val) {
|
||||
let obj = this.list[val._pageIndex - 1];
|
||||
obj.isEdit = true;
|
||||
this.$set(this.list, val._pageIndex - 1, obj);
|
||||
},
|
||||
// 保存
|
||||
saveNum(val) {
|
||||
// 调用修改接口
|
||||
updatePacking({ id: val.id, num: val.num }).then(() => {
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
// 输入框改变num
|
||||
inputChange(val) {
|
||||
this.list[val._pageIndex - 1][val.prop] = val[val.prop];
|
||||
},
|
||||
// 预览
|
||||
preView() {
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: printTemplate,
|
||||
});
|
||||
this.$refs.preView.show(hiprintTemplate);
|
||||
},
|
||||
// 打印
|
||||
printTemp() {
|
||||
console.log('11');
|
||||
var printData = {};
|
||||
let hiprintTemplate = this.$print(
|
||||
undefined,
|
||||
printTemplate,
|
||||
printData,
|
||||
{},
|
||||
{
|
||||
styleHandler: () => {
|
||||
let css =
|
||||
'<link href="http://hiprint.io/Content/hiprint/css/print-lock.css" media="print" rel="stylesheet">';
|
||||
return css;
|
||||
},
|
||||
}
|
||||
);
|
||||
console.log(hiprintTemplate);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
69
src/views/base/packagingPrintLog2/components/UnPrintEdit.vue
Normal file
69
src/views/base/packagingPrintLog2/components/UnPrintEdit.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="unPrintEdit"
|
||||
:rules="rules"
|
||||
label-width="130px"
|
||||
:model="form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="成品周转编号"
|
||||
prop="packagingCode">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="form.packagingCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="片数"
|
||||
prop="num">
|
||||
<el-input-number
|
||||
v-model="form.num"
|
||||
:min="0"
|
||||
:max="999999"
|
||||
style="width: 100%"
|
||||
label="片数"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getPacking } from '@/api/base/packingInfo';
|
||||
export default {
|
||||
name: 'UnPrintEdit',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
id: '',
|
||||
packagingCode: '',
|
||||
num: null,
|
||||
},
|
||||
rules: {
|
||||
num: [{ required: true, message: '片数不能为空', trigger: 'blur' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
console.log('init');
|
||||
this.form.id = id;
|
||||
getPacking(id).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['unPrintEdit'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log('保存');
|
||||
this.$emit('successSubmit');
|
||||
}
|
||||
});
|
||||
},
|
||||
formClear() {
|
||||
this.$refs.unPrintEdit.resetFields();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
100
src/views/base/packagingPrintLog2/components/preview.vue
Normal file
100
src/views/base/packagingPrintLog2/components/preview.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
dialogTitle="预览"
|
||||
:dialogVisible="visible"
|
||||
width="50%"
|
||||
@cancel="hideModal"
|
||||
:before-close="hideModal">
|
||||
<!-- <div>
|
||||
<el-button
|
||||
:loading="waitShowPrinter"
|
||||
type="primary"
|
||||
icon="printer"
|
||||
@click.stop="print">
|
||||
打印
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="printer"
|
||||
@click.stop="toPdf">
|
||||
pdf
|
||||
</el-button>
|
||||
</div> -->
|
||||
<div id="preview_content" />
|
||||
<template slot="footer">
|
||||
<el-button
|
||||
key="close"
|
||||
@click="hideModal">
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
</base-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PrintPreview',
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
spinning: true,
|
||||
waitShowPrinter: false,
|
||||
// 纸张宽 mm
|
||||
width: 0,
|
||||
// 模板
|
||||
hiprintTemplate: {},
|
||||
// 数据
|
||||
printData: {},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
hideModal() {
|
||||
this.visible = false;
|
||||
},
|
||||
show(hiprintTemplate, printData, width = '210') {
|
||||
this.visible = true;
|
||||
this.spinning = true;
|
||||
this.width = width;
|
||||
this.hiprintTemplate = hiprintTemplate;
|
||||
this.printData = printData;
|
||||
console.log(hiprintTemplate);
|
||||
console.log(printData);
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
$('#preview_content').html(hiprintTemplate.getHtml(printData));
|
||||
this.spinning = false;
|
||||
}, 500);
|
||||
},
|
||||
print() {
|
||||
this.waitShowPrinter = true;
|
||||
this.hiprintTemplate.print(
|
||||
this.printData,
|
||||
{},
|
||||
{
|
||||
callback: () => {
|
||||
console.log('callback');
|
||||
this.waitShowPrinter = false;
|
||||
},
|
||||
}
|
||||
);
|
||||
},
|
||||
toPdf() {
|
||||
this.hiprintTemplate.toPdf({}, '打印预览');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<!-- <style lang="less" scoped>
|
||||
/deep/ .ant-modal-body {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/deep/ .ant-modal-content {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
</style> -->
|
||||
47
src/views/base/packagingPrintLog2/index.vue
Normal file
47
src/views/base/packagingPrintLog2/index.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="packagingPrintLog-box">
|
||||
<div style="width: 100%">
|
||||
<ButtonNav
|
||||
:menus="['未打印', '已打印']"
|
||||
:button-mode="true"
|
||||
@change="currentMenu"></ButtonNav>
|
||||
</div>
|
||||
<!-- 未打印 -->
|
||||
<UnPrint v-if="activeMenu == '未打印'" />
|
||||
<!-- 已打印 -->
|
||||
<Printed v-else />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ButtonNav from '@/components/ButtonNav';
|
||||
import UnPrint from './components/UnPrint';
|
||||
import Printed from './components/Printed';
|
||||
export default {
|
||||
name: 'packagingPrintLog',
|
||||
components: { ButtonNav, UnPrint, Printed },
|
||||
data() {
|
||||
return {
|
||||
activeMenu: '未打印',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
currentMenu(val) {
|
||||
console.log(val);
|
||||
this.activeMenu = val;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.packagingPrintLog-box {
|
||||
min-height: calc(100vh - 120px - 8px);
|
||||
background-color: #f2f4f9;
|
||||
.show-box {
|
||||
min-height: calc(100vh - 128px - 52px);
|
||||
margin-top: 8px;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
554
src/views/base/packagingPrintLog2/print-template.js
Normal file
554
src/views/base/packagingPrintLog2/print-template.js
Normal file
@@ -0,0 +1,554 @@
|
||||
export default {
|
||||
panels: [
|
||||
{
|
||||
index: 0,
|
||||
name: 1,
|
||||
height: 125,
|
||||
width: 95,
|
||||
paperHeader: 0,
|
||||
paperFooter: 354.33070866141736,
|
||||
printElements: [
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 5,
|
||||
height: 30,
|
||||
width: 256.5,
|
||||
right: 262.2421875,
|
||||
bottom: 34.9921875,
|
||||
vCenter: 133.9921875,
|
||||
hCenter: 19.9921875,
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
borderColor: 'green',
|
||||
backgroundColor: 'green',
|
||||
},
|
||||
printElementType: { title: '矩形', type: 'rect' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 35,
|
||||
top: 15,
|
||||
height: 20,
|
||||
width: 195,
|
||||
title: '厂内镀膜/钢化片周转标签',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 16.5,
|
||||
color: '#ffffff',
|
||||
qrCodeLevel: 0,
|
||||
right: 232.9921875,
|
||||
bottom: 35.24609375,
|
||||
vCenter: 135.4921875,
|
||||
hCenter: 25.24609375,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: { left: 50, top: 35, height: 52.5, width: 9 },
|
||||
printElementType: { title: '竖线', type: 'vline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 35,
|
||||
height: 309,
|
||||
width: 256.5,
|
||||
right: 261.4921875,
|
||||
bottom: 343.9921875,
|
||||
vCenter: 133.2421875,
|
||||
hCenter: 189.4921875,
|
||||
},
|
||||
printElementType: { title: '矩形', type: 'rect' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 10,
|
||||
top: 42.5,
|
||||
height: 18,
|
||||
width: 36,
|
||||
title: '线别',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 45.99609375,
|
||||
bottom: 60.4921875,
|
||||
vCenter: 27.99609375,
|
||||
hCenter: 51.4921875,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 55,
|
||||
top: 42.5,
|
||||
height: 18,
|
||||
width: 200,
|
||||
title: '判定:良品/保留/再检',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 93.4921875,
|
||||
bottom: 59.25,
|
||||
vCenter: 75.4921875,
|
||||
hCenter: 50.25,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 62.5,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 259.9921875,
|
||||
bottom: 72.4921875,
|
||||
vCenter: 132.4921875,
|
||||
hCenter: 67.9921875,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 55,
|
||||
top: 70,
|
||||
height: 18,
|
||||
width: 46,
|
||||
title: '备注:',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 91.2421875,
|
||||
bottom: 86.25,
|
||||
vCenter: 73.2421875,
|
||||
hCenter: 77.25,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 190,
|
||||
top: 87.5,
|
||||
height: 169.5,
|
||||
width: 9,
|
||||
right: 199.74609375,
|
||||
bottom: 255.75,
|
||||
vCenter: 195.24609375,
|
||||
hCenter: 171,
|
||||
},
|
||||
printElementType: { title: '竖线', type: 'vline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 87.5,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 260.7421875,
|
||||
bottom: 96.75,
|
||||
vCenter: 132.4921875,
|
||||
hCenter: 92.25,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 77.5,
|
||||
top: 90,
|
||||
height: 15,
|
||||
width: 36,
|
||||
title: '规格',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 113.49609375,
|
||||
bottom: 105.4921875,
|
||||
vCenter: 95.49609375,
|
||||
hCenter: 97.9921875,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 207.5,
|
||||
top: 100,
|
||||
height: 18,
|
||||
width: 36,
|
||||
title: '用户',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 242.7421875,
|
||||
bottom: 116.25,
|
||||
vCenter: 224.7421875,
|
||||
hCenter: 107.25,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 25,
|
||||
top: 102.5,
|
||||
height: 15,
|
||||
width: 156,
|
||||
title: '长*宽*厚度(单位:mm)',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 179.25,
|
||||
bottom: 117.4921875,
|
||||
vCenter: 101.25,
|
||||
hCenter: 109.9921875,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 117.5,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 263.7421875,
|
||||
bottom: 125.7421875,
|
||||
vCenter: 135.4921875,
|
||||
hCenter: 121.2421875,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 130,
|
||||
top: 145,
|
||||
height: 55.5,
|
||||
width: 9,
|
||||
right: 138.99609375,
|
||||
bottom: 199.5,
|
||||
vCenter: 134.49609375,
|
||||
hCenter: 171.75,
|
||||
},
|
||||
printElementType: { title: '竖线', type: 'vline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 145,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 260.25,
|
||||
bottom: 154.2421875,
|
||||
vCenter: 132,
|
||||
hCenter: 149.7421875,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 45,
|
||||
top: 155,
|
||||
height: 18,
|
||||
width: 36,
|
||||
title: '编号',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 82.2421875,
|
||||
bottom: 171.75,
|
||||
vCenter: 64.2421875,
|
||||
hCenter: 162.75,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 135,
|
||||
top: 155,
|
||||
height: 18,
|
||||
width: 49.5,
|
||||
title: '工位号',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 186,
|
||||
bottom: 172.9921875,
|
||||
vCenter: 161.25,
|
||||
hCenter: 163.9921875,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 197.5,
|
||||
top: 155,
|
||||
height: 18,
|
||||
width: 60,
|
||||
title: '流程卡号',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 256.74609375,
|
||||
bottom: 143.7421875,
|
||||
vCenter: 226.74609375,
|
||||
hCenter: 134.7421875,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 175,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 259.2421875,
|
||||
bottom: 183.75,
|
||||
vCenter: 130.9921875,
|
||||
hCenter: 179.25,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 50,
|
||||
top: 200,
|
||||
height: 58.5,
|
||||
width: 9,
|
||||
right: 58.9921875,
|
||||
bottom: 259.5,
|
||||
vCenter: 54.4921875,
|
||||
hCenter: 230.25,
|
||||
},
|
||||
printElementType: { title: '竖线', type: 'vline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 110,
|
||||
top: 200,
|
||||
height: 58.5,
|
||||
width: 9,
|
||||
right: 117.75,
|
||||
bottom: 256.9921875,
|
||||
vCenter: 113.25,
|
||||
hCenter: 227.7421875,
|
||||
},
|
||||
printElementType: { title: '竖线', type: 'vline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 200,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 262.9921875,
|
||||
bottom: 210.24609375,
|
||||
vCenter: 134.7421875,
|
||||
hCenter: 205.74609375,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 10,
|
||||
top: 210,
|
||||
height: 18,
|
||||
width: 36,
|
||||
title: '日期',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 45.99609375,
|
||||
bottom: 228,
|
||||
vCenter: 27.99609375,
|
||||
hCenter: 219,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 67.5,
|
||||
top: 210,
|
||||
height: 18,
|
||||
width: 36,
|
||||
title: '班次',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 103.5,
|
||||
bottom: 228,
|
||||
vCenter: 85.5,
|
||||
hCenter: 219,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 207.5,
|
||||
top: 210,
|
||||
height: 18,
|
||||
width: 36,
|
||||
title: '片数',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 243.4921875,
|
||||
bottom: 228,
|
||||
vCenter: 225.4921875,
|
||||
hCenter: 219,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 230,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 261.4921875,
|
||||
bottom: 239.25,
|
||||
vCenter: 133.2421875,
|
||||
hCenter: 234.75,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 257.5,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 261.4921875,
|
||||
bottom: 266.49609375,
|
||||
vCenter: 133.2421875,
|
||||
hCenter: 261.99609375,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 10,
|
||||
top: 262.5,
|
||||
height: 18,
|
||||
width: 87,
|
||||
title: '封箱人员工号:',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 46.9921875,
|
||||
bottom: 279.24609375,
|
||||
vCenter: 28.9921875,
|
||||
hCenter: 270.24609375,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 280,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 262.2421875,
|
||||
bottom: 289.2421875,
|
||||
vCenter: 133.9921875,
|
||||
hCenter: 284.7421875,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 10,
|
||||
top: 285,
|
||||
height: 18,
|
||||
width: 87,
|
||||
title: '打包人员工号:',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 96.4921875,
|
||||
bottom: 301.74609375,
|
||||
vCenter: 52.9921875,
|
||||
hCenter: 292.74609375,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 300,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 264.4921875,
|
||||
bottom: 308.49609375,
|
||||
vCenter: 136.2421875,
|
||||
hCenter: 303.99609375,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 10,
|
||||
top: 305,
|
||||
height: 18,
|
||||
width: 247.5,
|
||||
title: '备注1:单层镀/双层镀/丝印打孔/打孔钢片',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 96.99609375,
|
||||
bottom: 322.9921875,
|
||||
vCenter: 53.49609375,
|
||||
hCenter: 313.9921875,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 5,
|
||||
top: 322.5,
|
||||
height: 9,
|
||||
width: 256.5,
|
||||
right: 262.2421875,
|
||||
bottom: 332.7421875,
|
||||
vCenter: 133.9921875,
|
||||
hCenter: 328.2421875,
|
||||
},
|
||||
printElementType: { title: '横线', type: 'hline' },
|
||||
},
|
||||
{
|
||||
options: {
|
||||
left: 10,
|
||||
top: 327.5,
|
||||
height: 18,
|
||||
width: 87,
|
||||
title: '备注2:',
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
fontSize: 12,
|
||||
qrCodeLevel: 0,
|
||||
right: 97.9921875,
|
||||
bottom: 343.74609375,
|
||||
vCenter: 54.4921875,
|
||||
hCenter: 334.74609375,
|
||||
},
|
||||
printElementType: { title: '文本', type: 'text' },
|
||||
},
|
||||
],
|
||||
paperNumberLeft: 372.5,
|
||||
paperNumberTop: 337.5,
|
||||
paperNumberContinue: true,
|
||||
watermarkOptions: {},
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -6,138 +6,130 @@
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="30%" show-close="true">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
<el-dialog
|
||||
class="baseDialog"
|
||||
:visible.sync="visible"
|
||||
:show-close="true"
|
||||
:wrapper-closable="false"
|
||||
width="50%">
|
||||
<small-title
|
||||
slot="title"
|
||||
:no-padding="true">
|
||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<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="typeId">
|
||||
<el-select v-model="dataForm.typeId" style="width: 100%;" placeholder="请选择标签类型" clearable>
|
||||
<el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="打印方式" prop="printModel">
|
||||
<el-select v-model="dataForm.printModel" style="width: 100%;" placeholder="请选择打印方式" clearable>
|
||||
<el-option v-for="dict in printModelList" :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="remark">
|
||||
<el-input v-model="dataForm.remark" clearable placeholder="请输入标签备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="模板设计" prop="content">
|
||||
<el-button icon="el-icon-edit" @click="btnClickDesign()">模板设计</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="单位平方数" prop="area">
|
||||
<el-input v-model="dataForm.area" placeholder="请输入单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="完成单位产品用时" prop="processTime">
|
||||
<el-input v-model="dataForm.processTime" placeholder="请输入完成单位产品用时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
|
||||
<!-- <small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
产品属性列表
|
||||
</small-title>
|
||||
|
||||
<div class="attr-list">
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:add-button-show="isdetail ? null : '添加属性'"
|
||||
@emitButtonClick="addNew()"
|
||||
:table-data="productAttributeList">
|
||||
<method-btn
|
||||
v-if="!isdetail"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="listQuery.total > 0"
|
||||
:total="listQuery.total"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" />
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
||||
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="模板名称"
|
||||
prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
placeholder="请输入模板名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="标签类型"
|
||||
prop="typeId">
|
||||
<el-select
|
||||
v-model="dataForm.typeId"
|
||||
style="width: 100%"
|
||||
placeholder="请选择标签类型"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="dict in typeList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="打印方式"
|
||||
prop="printModel">
|
||||
<el-select
|
||||
v-model="dataForm.printModel"
|
||||
style="width: 100%"
|
||||
placeholder="请选择打印方式"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="dict in printModelList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="标签备注"
|
||||
prop="remark">
|
||||
<el-input
|
||||
v-model="dataForm.remark"
|
||||
clearable
|
||||
placeholder="请输入标签备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="模板设计"
|
||||
prop="content">
|
||||
<el-button
|
||||
icon="el-icon-edit"
|
||||
@click="btnClickDesign()">
|
||||
模板设计
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<template slot="footer">
|
||||
<el-button
|
||||
style=""
|
||||
@click="goback()">
|
||||
取消
|
||||
</el-button>
|
||||
<span v-if="!isdetail">
|
||||
<el-button type="primary" @click="dataFormSubmit()">保存</el-button>
|
||||
<el-button
|
||||
v-if="dataForm.id && !isdetail"
|
||||
type="primary"
|
||||
@click="addNew()">
|
||||
添加属性
|
||||
</el-button>
|
||||
</span>
|
||||
</div> -->
|
||||
<template slot="footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
</el-button> -->
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</template>
|
||||
<print-model-design v-if="modelShow" ref="printModelDesign" @saveData="getModelData" />
|
||||
</el-dialog>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="dataFormSubmit()">
|
||||
确定
|
||||
</el-button>
|
||||
</template>
|
||||
<print-model-design
|
||||
v-if="modelShow"
|
||||
ref="printModelDesign"
|
||||
@saveData="getModelData" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
createPackingModel,
|
||||
updatePackingModel,
|
||||
getPackingModel,
|
||||
// getWorkOrderList,
|
||||
// getCode,
|
||||
// getCustomerList,
|
||||
getTypeList
|
||||
createPackingModel,
|
||||
updatePackingModel,
|
||||
getPackingModel,
|
||||
getTypeList,
|
||||
} from '@/api/base/printModel.js';
|
||||
// import productAttrAdd from './attr-add';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import SmallTitle from './SmallTitle';
|
||||
import printModelDesign from '../custom/index'
|
||||
import printModelDesign from '../custom/index';
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
@@ -166,42 +158,42 @@ const tableProps = [
|
||||
];
|
||||
|
||||
export default {
|
||||
components: { SmallTitle, printModelDesign },
|
||||
components: { SmallTitle, printModelDesign },
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
tableProps,
|
||||
modelShow:false,
|
||||
typeList:[],
|
||||
tableProps,
|
||||
modelShow: false,
|
||||
typeList: [],
|
||||
dataForm: {
|
||||
id: null,
|
||||
// name: '', // 产品名称
|
||||
name: '', // 产品编码
|
||||
name: '', // 产品编码
|
||||
// area: 0, // 单位平方数(float only)
|
||||
typeId: null, // 产品类型id
|
||||
printModel: null, // 单位产品用时 (s)
|
||||
content: '', // 规格
|
||||
remark: '', // 单位id
|
||||
},
|
||||
printModelList: [
|
||||
{
|
||||
id: 1,
|
||||
name:'自动'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '手动'
|
||||
},
|
||||
],
|
||||
typeId: null, // 产品类型id
|
||||
printModel: null, // 单位产品用时 (s)
|
||||
content: '', // 规格
|
||||
remark: '', // 单位id
|
||||
},
|
||||
printModelList: [
|
||||
{
|
||||
id: 1,
|
||||
name: '自动',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '手动',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
},
|
||||
dataRule: {
|
||||
typeId: [
|
||||
typeId: [
|
||||
{
|
||||
required: true,
|
||||
message: '打印类型不能为空',
|
||||
@@ -221,7 +213,7 @@ export default {
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
printModel: [
|
||||
printModel: [
|
||||
{
|
||||
required: true,
|
||||
message: '模板类型不能为空',
|
||||
@@ -229,11 +221,11 @@ export default {
|
||||
},
|
||||
],
|
||||
content: [
|
||||
{
|
||||
required: true,
|
||||
message: '模板不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: '模板不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
processTime: [
|
||||
{
|
||||
@@ -251,30 +243,30 @@ export default {
|
||||
},
|
||||
// isdetail: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getModelData(data) {
|
||||
console.log(data)
|
||||
this.content = JSON.stringify(data)
|
||||
this.dataForm.content = JSON.stringify(data)
|
||||
},
|
||||
btnClickDesign() {
|
||||
console.log(11111)
|
||||
this.modelShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.printModelDesign.init(this.dataForm.content)
|
||||
console.log(this.dataForm.content)
|
||||
})
|
||||
// this.$router.push({
|
||||
// path: '/printModelDesign'
|
||||
// })
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getModelData(data) {
|
||||
console.log(data);
|
||||
this.content = JSON.stringify(data);
|
||||
this.dataForm.content = JSON.stringify(data);
|
||||
},
|
||||
btnClickDesign() {
|
||||
console.log(11111);
|
||||
this.modelShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.printModelDesign.init(this.dataForm.content);
|
||||
console.log(this.dataForm.content);
|
||||
});
|
||||
// this.$router.push({
|
||||
// path: '/printModelDesign'
|
||||
// })
|
||||
},
|
||||
// initData() {
|
||||
// this.productAttributeList.splice(0);
|
||||
// this.listQuery.total = 0;
|
||||
// },
|
||||
init(id) {
|
||||
this.getDict()
|
||||
init(id) {
|
||||
this.getDict();
|
||||
// this.initData();
|
||||
// this.isdetail = isdetail || false;
|
||||
this.dataForm.id = id || null;
|
||||
@@ -284,34 +276,34 @@ export default {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
// 获取产品详情
|
||||
getPackingModel(id).then((response) => {
|
||||
getPackingModel(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
});
|
||||
// 获取产品的属性列表
|
||||
// this.getList();
|
||||
} else {
|
||||
// getCode().then((res) => {
|
||||
// this.dataForm.packagingCode = res.data;
|
||||
// this.dataForm.packagingCode = res.data;
|
||||
// });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDict() {
|
||||
// 获取产品的属性列表
|
||||
// getCustomerList().then((response) => {
|
||||
// console.log(response);
|
||||
// this.customerList = response.data
|
||||
// // this.listQuery.total = response.data.total;
|
||||
// })
|
||||
getTypeList().then((response) => {
|
||||
console.log(response);
|
||||
this.typeList = response.data
|
||||
// this.listQuery.total = response.data.total;
|
||||
})
|
||||
// getWorkOrderList().then((response) => {
|
||||
// // console.log(response);
|
||||
// this.workOrderList = response.data
|
||||
// 获取产品的属性列表
|
||||
// getCustomerList().then((response) => {
|
||||
// console.log(response);
|
||||
// this.customerList = response.data
|
||||
// // this.listQuery.total = response.data.total;
|
||||
// })
|
||||
getTypeList().then((response) => {
|
||||
console.log(response);
|
||||
this.typeList = response.data;
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
// getWorkOrderList().then((response) => {
|
||||
// // console.log(response);
|
||||
// this.workOrderList = response.data
|
||||
// // this.listQuery.total = response.data.total;
|
||||
// })
|
||||
},
|
||||
@@ -353,7 +345,7 @@ export default {
|
||||
if (valid) {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
updatePackingModel(this.dataForm).then((response) => {
|
||||
updatePackingModel(this.dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
@@ -361,7 +353,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createPackingModel(this.dataForm).then((response) => {
|
||||
createPackingModel(this.dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
@@ -439,35 +431,31 @@ export default {
|
||||
}
|
||||
</style> -->
|
||||
<style>
|
||||
|
||||
|
||||
.baseDialog .el-dialog__header {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-weight: 500;
|
||||
padding: 13px 24px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-weight: 500;
|
||||
padding: 13px 24px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
.baseDialog .el-dialog__header .titleStyle::before{
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
.baseDialog .el-dialog__header .titleStyle::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
.baseDialog .el-dialog__body {
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
}
|
||||
.baseDialog .btnTextStyle {
|
||||
letter-spacing:6px;
|
||||
padding: 9px 10px 9px 16px;
|
||||
font-size: 14px;
|
||||
letter-spacing: 6px;
|
||||
padding: 9px 10px 9px 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -6,106 +6,72 @@
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%" show-close="true">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
<el-dialog
|
||||
class="baseDialog"
|
||||
:visible.sync="visible"
|
||||
:show-close="true"
|
||||
:wrapper-closable="false"
|
||||
width="50%">
|
||||
<small-title
|
||||
slot="title"
|
||||
:no-padding="true">
|
||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="auto"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<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="description">
|
||||
<el-input v-model="dataForm.description" clearable placeholder="类型描述" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="完成单位产品用时" prop="processTime">
|
||||
<el-input v-model="dataForm.processTime" placeholder="请输入完成单位产品用时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
|
||||
<!-- <small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
产品属性列表
|
||||
</small-title>
|
||||
|
||||
<div class="attr-list">
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:add-button-show="isdetail ? null : '添加属性'"
|
||||
@emitButtonClick="addNew()"
|
||||
:table-data="productAttributeList">
|
||||
<method-btn
|
||||
v-if="!isdetail"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="listQuery.total > 0"
|
||||
:total="listQuery.total"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" />
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
||||
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="auto"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="名称"
|
||||
prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
placeholder="名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
label="类型描述"
|
||||
prop="description">
|
||||
<el-input
|
||||
v-model="dataForm.description"
|
||||
clearable
|
||||
placeholder="类型描述" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<template slot="footer">
|
||||
<el-button
|
||||
style=""
|
||||
@click="goback()">
|
||||
取消
|
||||
</el-button>
|
||||
<span v-if="!isdetail">
|
||||
<el-button type="primary" @click="dataFormSubmit()">保存</el-button>
|
||||
<el-button
|
||||
v-if="dataForm.id && !isdetail"
|
||||
type="primary"
|
||||
@click="addNew()">
|
||||
添加属性
|
||||
</el-button>
|
||||
</span>
|
||||
</div> -->
|
||||
<template slot="footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
</el-button> -->
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="dataFormSubmit()">
|
||||
确定
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
createPackingType,
|
||||
updatePackingType,
|
||||
getPackingType,
|
||||
// getWorkOrderList,
|
||||
// getCode,
|
||||
// getCustomerList,
|
||||
// getModelList
|
||||
createPackingType,
|
||||
updatePackingType,
|
||||
getPackingType,
|
||||
} from '@/api/base/modelType.js';
|
||||
// import productAttrAdd from './attr-add';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import SmallTitle from './SmallTitle';
|
||||
|
||||
@@ -142,20 +108,15 @@ export default {
|
||||
visible: false,
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
tableProps,
|
||||
customerList: [],
|
||||
modelList:[],
|
||||
workOrderList:[],
|
||||
tableProps,
|
||||
customerList: [],
|
||||
modelList: [],
|
||||
workOrderList: [],
|
||||
productAttributeList: [],
|
||||
dataForm: {
|
||||
id: null,
|
||||
// name: '', // 产品名称
|
||||
name: '', // 产品编码
|
||||
// area: 0, // 单位平方数(float only)
|
||||
description: null, // 产品类型id
|
||||
// workOrderId: null, // 单位产品用时 (s)
|
||||
// customerId: '', // 规格
|
||||
// content: '', // 单位id
|
||||
name: '', // 产品编码
|
||||
description: null, // 产品类型id
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
@@ -171,18 +132,10 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
// isdetail: false,
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// initData() {
|
||||
// this.productAttributeList.splice(0);
|
||||
// this.listQuery.total = 0;
|
||||
// },
|
||||
init(id) {
|
||||
// this.getDict()
|
||||
// this.initData();
|
||||
// this.isdetail = isdetail || false;
|
||||
init(id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
|
||||
@@ -191,76 +144,20 @@ export default {
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取产品详情
|
||||
getPackingType(id).then((response) => {
|
||||
getPackingType(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
});
|
||||
// 获取产品的属性列表
|
||||
// this.getList();
|
||||
} else {
|
||||
// getCode().then((res) => {
|
||||
// this.dataForm.packagingCode = res.data;
|
||||
// });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// getDict() {
|
||||
// // 获取产品的属性列表
|
||||
// getCustomerList().then((response) => {
|
||||
// console.log(response);
|
||||
// this.customerList = response.data
|
||||
// // this.listQuery.total = response.data.total;
|
||||
// })
|
||||
// getModelList().then((response) => {
|
||||
// console.log(response);
|
||||
// this.modelList = response.data
|
||||
// // this.listQuery.total = response.data.total;
|
||||
// })
|
||||
// getWorkOrderList().then((response) => {
|
||||
// // console.log(response);
|
||||
// this.workOrderList = response.data
|
||||
// // this.listQuery.total = response.data.total;
|
||||
// })
|
||||
// },
|
||||
// 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);
|
||||
// }
|
||||
// },
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
updatePackingType(this.dataForm).then((response) => {
|
||||
updatePackingType(this.dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
@@ -268,7 +165,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createPackingType(this.dataForm).then((response) => {
|
||||
createPackingType(this.dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
@@ -294,88 +191,32 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- <style scoped>
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
.drawer >>> .el-drawer__body {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .content {
|
||||
padding: 30px 24px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* height: 100%; */
|
||||
}
|
||||
|
||||
.drawer >>> .visual-part {
|
||||
flex: 1 auto;
|
||||
max-height: 76vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
</style> -->
|
||||
<style>
|
||||
|
||||
|
||||
.baseDialog .el-dialog__header {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-weight: 500;
|
||||
padding: 13px 24px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-weight: 500;
|
||||
padding: 13px 24px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
.baseDialog .el-dialog__header .titleStyle::before{
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
.baseDialog .el-dialog__header .titleStyle::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
.baseDialog .el-dialog__body {
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
}
|
||||
.baseDialog .btnTextStyle {
|
||||
letter-spacing:6px;
|
||||
padding: 9px 10px 9px 16px;
|
||||
font-size: 14px;
|
||||
letter-spacing: 6px;
|
||||
padding: 9px 10px 9px 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,348 +1,368 @@
|
||||
<template>
|
||||
<div class="choicepart-container">
|
||||
<navbar />
|
||||
<div class="choicepart-wrapper">
|
||||
<div class="choicepart-box" id="choicepartBox" :style="'transform:scale('+scale+');width:1710px;height:538px;'" v-show="showItem">
|
||||
<div class="choicepart-line1">
|
||||
<div
|
||||
v-for="(item, index) in menuArr1"
|
||||
:key="index"
|
||||
class="choicepart-item"
|
||||
@click="handelClick(item, item.choicepart)"
|
||||
:style="{opacity: item.visible?1:0.4, pointerEvents:item.visible?'auto':'none'}"
|
||||
>
|
||||
<div>
|
||||
<img :src="require(`../../assets/images/choicepart/${item.name}.png`)" alt="">
|
||||
</div>
|
||||
<div class="choicepart-item-title">{{item.meta.title}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="choicepart-line2">
|
||||
<div
|
||||
v-for="(item, index) in menuArr2"
|
||||
:key="index"
|
||||
class="choicepart-item"
|
||||
@click="handelClick(item, item.choicepart)"
|
||||
:style="{opacity: item.visible?1:0.4, pointerEvents:item.visible?'auto':'none'}"
|
||||
>
|
||||
<div>
|
||||
<img :src="require(`../../assets/images/choicepart/${item.name}.png`)" alt="">
|
||||
</div>
|
||||
<div class="choicepart-item-title">{{item.meta.title}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="choicepart-footer">© 中建材智能自动化研究院有限公司</div>
|
||||
</div>
|
||||
<div class="choicepart-container">
|
||||
<navbar />
|
||||
<div class="choicepart-wrapper">
|
||||
<div
|
||||
class="choicepart-box"
|
||||
id="choicepartBox"
|
||||
:style="'transform:scale(' + scale + ')'"
|
||||
style="width: 1710px; height: 538px"
|
||||
v-show="showItem">
|
||||
<div class="choicepart-line1">
|
||||
<div
|
||||
v-for="(item, index) in menuArr1"
|
||||
:key="index"
|
||||
class="choicepart-item"
|
||||
@click="handelClick(item, item.choicepart)"
|
||||
:style="{
|
||||
opacity: item.visible ? 1 : 0.4,
|
||||
pointerEvents: item.visible ? 'auto' : 'none',
|
||||
}">
|
||||
<div>
|
||||
<img
|
||||
:src="
|
||||
require(`../../assets/images/choicepart/${item.name}.png`)
|
||||
"
|
||||
alt="" />
|
||||
</div>
|
||||
<div class="choicepart-item-title">{{ item.meta.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="choicepart-line2">
|
||||
<div
|
||||
v-for="(item, index) in menuArr2"
|
||||
:key="index"
|
||||
class="choicepart-item"
|
||||
@click="handelClick(item, item.choicepart)"
|
||||
:style="{
|
||||
opacity: item.visible ? 1 : 0.4,
|
||||
pointerEvents: item.visible ? 'auto' : 'none',
|
||||
}">
|
||||
<div>
|
||||
<img
|
||||
:src="
|
||||
require(`../../assets/images/choicepart/${item.name}.png`)
|
||||
"
|
||||
alt="" />
|
||||
</div>
|
||||
<div class="choicepart-item-title">{{ item.meta.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="choicepart-footer">© 中建材智能自动化研究院有限公司</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Navbar from './components/Navbar'
|
||||
import { debounce } from '@/utils/debounce'
|
||||
import Navbar from './components/Navbar';
|
||||
import { debounce } from '@/utils/debounce';
|
||||
export default {
|
||||
components: { Navbar },
|
||||
name: 'choicePart',
|
||||
data() {
|
||||
return {
|
||||
boxReset: '',
|
||||
scale: 1,
|
||||
menuArr1: [
|
||||
{
|
||||
name: 'Core',
|
||||
title: '基础核心',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Order',
|
||||
title: '订单管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Equipment',
|
||||
title: '设备管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Group',
|
||||
title: '班组管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Quality',
|
||||
title: '质量管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Warehouse',
|
||||
title: '仓库管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Energy',
|
||||
title: '能源管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Packaging',
|
||||
title: '包装管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
}
|
||||
],
|
||||
menuArr2: [
|
||||
{
|
||||
name: 'Material',
|
||||
title: '物料管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Extend',
|
||||
title: '工艺管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'Delivery',
|
||||
// title: '成品发货',
|
||||
// visible: false,
|
||||
// meta: {
|
||||
// title: ''
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'Report',
|
||||
title: '报表管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Cost',
|
||||
title: '成本管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'SafetyEnvironmental',
|
||||
title: '安环管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Databoard',
|
||||
title: '数据驾驶舱',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'System',
|
||||
title: '系统管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: ''
|
||||
}
|
||||
}
|
||||
],
|
||||
showItem: false
|
||||
}
|
||||
},
|
||||
// computed:{
|
||||
// ...mapGetters(['sidebarRouters'])
|
||||
// },
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
this.boxReset = debounce(() => {
|
||||
this.resetSize()
|
||||
}, 300)
|
||||
this.boxReset()
|
||||
window.addEventListener('resize', () => {
|
||||
this.boxReset()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getMsg() {
|
||||
let menuList = this.$store.state.permission.sidebarRouters
|
||||
console.log(menuList)
|
||||
if (menuList.length > 0) {
|
||||
for (let i = 0; i < menuList.length; i ++) {
|
||||
for (let k = 0; k < 8; k++) {
|
||||
if (menuList[i].name === this.menuArr1[k].name) {
|
||||
this.menuArr1[k].visible = true
|
||||
this.menuArr1[k].id = menuList[i].id
|
||||
this.menuArr1[k].choicepart = i
|
||||
this.menuArr1[k].children = menuList[i].children
|
||||
this.menuArr1[k].meta = menuList[i].meta
|
||||
}
|
||||
}
|
||||
for (let j = 0; j < 7; j++) {
|
||||
if (menuList[i].name === this.menuArr2[j].name) {
|
||||
this.menuArr2[j].visible = true
|
||||
this.menuArr2[j].id = menuList[i].id
|
||||
this.menuArr2[j].choicepart = i
|
||||
this.menuArr2[j].children = menuList[i].children
|
||||
this.menuArr2[j].meta = menuList[i].meta
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(this.menuArr1)
|
||||
console.log(this.menuArr2)
|
||||
},
|
||||
handelClick(item, index) {
|
||||
// this.$router.push({name: 'SystemUser'})
|
||||
this.$store.dispatch('app/setChoicepart', index)
|
||||
this.toRouter(item)
|
||||
// if (item.meta.unuse) {
|
||||
// this.$message.warning(this.$t('暂无数据'))
|
||||
// } else {
|
||||
// this.toRouter(item)
|
||||
// }
|
||||
},
|
||||
toRouter(item) {
|
||||
console.log(item)
|
||||
if (item.children) {
|
||||
this.toRouter(item.children[0])
|
||||
} else {
|
||||
this.$router.push({ name: item.name })
|
||||
}
|
||||
},
|
||||
resetSize() {
|
||||
let _this = this
|
||||
_this.showItem = false
|
||||
_this.loading = true
|
||||
let choicepartBox = document.querySelector('#choicepartBox')
|
||||
let rw = parseFloat(window.innerWidth)
|
||||
let rh = parseFloat(window.innerHeight)
|
||||
let bw = parseFloat(choicepartBox.style.width)
|
||||
let bh = parseFloat(choicepartBox.style.height)
|
||||
let wx = 0.82/(bw / rw)
|
||||
let hx = 0.56/(bh / rh)
|
||||
_this.scale = wx > hx ? hx : wx
|
||||
setTimeout(_this.showItemFun, 700)
|
||||
},
|
||||
showItemFun() {
|
||||
this.loading = false
|
||||
this.showItem = true
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.showItem = false
|
||||
}
|
||||
}
|
||||
components: { Navbar },
|
||||
name: 'choicePart',
|
||||
data() {
|
||||
return {
|
||||
scale: 1,
|
||||
menuArr1: [
|
||||
{
|
||||
name: 'Core',
|
||||
title: '基础核心',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Order',
|
||||
title: '订单管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Equipment',
|
||||
title: '设备管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Group',
|
||||
title: '班组管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Quality',
|
||||
title: '质量管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Warehouse',
|
||||
title: '仓库管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Energy',
|
||||
title: '能源管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Packaging',
|
||||
title: '包装管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
menuArr2: [
|
||||
{
|
||||
name: 'Material',
|
||||
title: '物料管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Extend',
|
||||
title: '工艺管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// name: 'Delivery',
|
||||
// title: '成品发货',
|
||||
// visible: false,
|
||||
// meta: {
|
||||
// title: ''
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'Report',
|
||||
title: '报表管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Cost',
|
||||
title: '成本管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'SafetyEnvironmental',
|
||||
title: '安环管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Databoard',
|
||||
title: '数据驾驶舱',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'System',
|
||||
title: '系统管理',
|
||||
visible: false,
|
||||
meta: {
|
||||
title: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
showItem: false,
|
||||
};
|
||||
},
|
||||
// computed:{
|
||||
// ...mapGetters(['sidebarRouters'])
|
||||
// },
|
||||
mounted() {
|
||||
this.getMsg();
|
||||
this.boxReset();
|
||||
window.addEventListener('resize', this.boxReset);
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('resize', this.boxReset);
|
||||
},
|
||||
methods: {
|
||||
boxReset() {
|
||||
debounce(() => {
|
||||
this.resetSize();
|
||||
}, 300)();
|
||||
},
|
||||
getMsg() {
|
||||
let menuList = this.$store.state.permission.sidebarRouters;
|
||||
console.log(menuList);
|
||||
if (menuList.length > 0) {
|
||||
for (let i = 0; i < menuList.length; i++) {
|
||||
for (let k = 0; k < 8; k++) {
|
||||
if (menuList[i].name === this.menuArr1[k].name) {
|
||||
this.menuArr1[k].visible = true;
|
||||
this.menuArr1[k].id = menuList[i].id;
|
||||
this.menuArr1[k].choicepart = i;
|
||||
this.menuArr1[k].children = menuList[i].children;
|
||||
this.menuArr1[k].meta = menuList[i].meta;
|
||||
}
|
||||
}
|
||||
for (let j = 0; j < 7; j++) {
|
||||
if (menuList[i].name === this.menuArr2[j].name) {
|
||||
this.menuArr2[j].visible = true;
|
||||
this.menuArr2[j].id = menuList[i].id;
|
||||
this.menuArr2[j].choicepart = i;
|
||||
this.menuArr2[j].children = menuList[i].children;
|
||||
this.menuArr2[j].meta = menuList[i].meta;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(this.menuArr1);
|
||||
console.log(this.menuArr2);
|
||||
},
|
||||
handelClick(item, index) {
|
||||
// this.$router.push({name: 'SystemUser'})
|
||||
this.$store.dispatch('app/setChoicepart', index);
|
||||
this.toRouter(item);
|
||||
// if (item.meta.unuse) {
|
||||
// this.$message.warning(this.$t('暂无数据'))
|
||||
// } else {
|
||||
// this.toRouter(item)
|
||||
// }
|
||||
},
|
||||
toRouter(item) {
|
||||
console.log(item);
|
||||
if (item.children) {
|
||||
this.toRouter(item.children[0]);
|
||||
} else {
|
||||
this.$router.push({ name: item.name });
|
||||
}
|
||||
},
|
||||
resetSize() {
|
||||
let _this = this;
|
||||
_this.showItem = false;
|
||||
_this.loading = true;
|
||||
let choicepartBox = document.querySelector('#choicepartBox');
|
||||
let rw = parseFloat(window.innerWidth);
|
||||
let rh = parseFloat(window.innerHeight);
|
||||
let bw = parseFloat(choicepartBox.style.width);
|
||||
let bh = parseFloat(choicepartBox.style.height);
|
||||
let wx = 0.82 / (bw / rw);
|
||||
let hx = 0.56 / (bh / rh);
|
||||
_this.scale = wx > hx ? hx : wx;
|
||||
setTimeout(_this.showItemFun, 700);
|
||||
},
|
||||
showItemFun() {
|
||||
this.loading = false;
|
||||
this.showItem = true;
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.showItem = false;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.choicepart-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('../../assets/images/choicepart/choicepart-back.png') repeat;
|
||||
background-size: 100% 100%;
|
||||
.choicepart-wrapper {
|
||||
width: 100vw;
|
||||
height: calc(100vh - 94px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.choicepart-box {
|
||||
// transition: all 0.3s linear;
|
||||
.choicepart-line1 {
|
||||
width: 100%;
|
||||
margin-bottom: 80px;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
.choicepart-line2 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
}
|
||||
.choicepart-item {
|
||||
width: 184px;
|
||||
height: 224px;
|
||||
background: url('../../assets/images/choicepart/choice-item-back.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
margin: 0 20px;
|
||||
img {
|
||||
width: 184px;
|
||||
height: 224px;
|
||||
}
|
||||
.choicepart-item-title {
|
||||
overflow: hidden;
|
||||
padding: 0 10px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 2px;
|
||||
right: 2px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
letter-spacing: 2px;
|
||||
background-color: rgba($color: #0b58ff, $alpha: 0.45);
|
||||
}
|
||||
}
|
||||
.choicepart-item:hover {
|
||||
.choicepart-item-title {
|
||||
background-color: rgba($color: #0b58ff, $alpha: 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.choicepart-footer {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
color: #C7C7C7;
|
||||
user-select: none;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
height: 30px;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
bottom: 0;
|
||||
opacity: 0.5;
|
||||
}
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('../../assets/images/choicepart/choicepart-back.png') repeat;
|
||||
background-size: 100% 100%;
|
||||
.choicepart-wrapper {
|
||||
width: 100vw;
|
||||
height: calc(100vh - 94px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.choicepart-box {
|
||||
// transition: all 0.3s linear;
|
||||
.choicepart-line1 {
|
||||
width: 100%;
|
||||
margin-bottom: 80px;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
.choicepart-line2 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
}
|
||||
.choicepart-item {
|
||||
width: 184px;
|
||||
height: 224px;
|
||||
background: url('../../assets/images/choicepart/choice-item-back.png')
|
||||
no-repeat;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
margin: 0 20px;
|
||||
img {
|
||||
width: 184px;
|
||||
height: 224px;
|
||||
}
|
||||
.choicepart-item-title {
|
||||
overflow: hidden;
|
||||
padding: 0 10px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 2px;
|
||||
right: 2px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
letter-spacing: 2px;
|
||||
background-color: rgba($color: #0b58ff, $alpha: 0.45);
|
||||
}
|
||||
}
|
||||
.choicepart-item:hover {
|
||||
.choicepart-item-title {
|
||||
background-color: rgba($color: #0b58ff, $alpha: 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.choicepart-footer {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
color: #c7c7c7;
|
||||
user-select: none;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
height: 30px;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
bottom: 0;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
// name: 'reset',
|
||||
// },
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:core-factory:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-factory:create') ? 'button' : '',
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id='gasChart' class="gas-chart" style="width:600px;height:200px;" v-show='!notMsg'></div>
|
||||
<NotMsg v-show="notMsg" />
|
||||
<div
|
||||
id="gasChart"
|
||||
class="gas-chart"
|
||||
style="width: 600px; height: 200px"
|
||||
v-show="!notMsg"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import resize from './../mixins/resize'
|
||||
import NotMsg from './../components/NotMsg'
|
||||
import resize from './../mixins/resize';
|
||||
import NotMsg from './../components/NotMsg';
|
||||
|
||||
export default {
|
||||
name: 'GasChart',
|
||||
mixins: [resize],
|
||||
components:{ NotMsg },
|
||||
components: { NotMsg },
|
||||
props: {
|
||||
chartType: '', // 能源类型
|
||||
chartTime: ''
|
||||
chartTime: '',
|
||||
},
|
||||
data() {
|
||||
const colors = [
|
||||
@@ -31,159 +35,170 @@ export default {
|
||||
];
|
||||
return {
|
||||
chart: null,
|
||||
notMsg:false
|
||||
notMsg: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
gasChartMsg() {
|
||||
return this.$store.state.websocket.sumGasInfo
|
||||
return this.$store.state.websocket.sumGasInfo;
|
||||
},
|
||||
energyWeekTrend() {
|
||||
return this.$store.state.websocket.energyWeekTrend
|
||||
return this.$store.state.websocket.energyWeekTrend;
|
||||
},
|
||||
energyMonthTrend() {
|
||||
return this.$store.state.websocket.energyMonthTrend
|
||||
return this.$store.state.websocket.energyMonthTrend;
|
||||
},
|
||||
energyYearTrend() {
|
||||
return this.$store.state.websocket.energyYearTrend
|
||||
}
|
||||
return this.$store.state.websocket.energyYearTrend;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
energyWeekTrend: {// 监听周电能,更新图
|
||||
energyWeekTrend: {
|
||||
// 监听周电能,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
this.updateChart();
|
||||
this.$emit('emitFun');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
energyMonthTrend: {// 监听月电能,更新图
|
||||
energyMonthTrend: {
|
||||
// 监听月电能,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
this.updateChart();
|
||||
this.$emit('emitFun');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
energyYearTrend: {// 监听年电能,更新图
|
||||
energyYearTrend: {
|
||||
// 监听年电能,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
this.updateChart();
|
||||
this.$emit('emitFun');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
gasChartMsg: {// 监听天然气,更新图
|
||||
gasChartMsg: {
|
||||
// 监听天然气,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartType === '天然气I' || this.chartType === '天然气II') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
this.updateChart();
|
||||
this.$emit('emitFun');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
chartTime: {// 监听时间变化,更新图
|
||||
chartTime: {
|
||||
// 监听时间变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
this.updateChart()
|
||||
}
|
||||
this.updateChart();
|
||||
},
|
||||
},
|
||||
chartType: {// 监听能源类型变化,更新图
|
||||
chartType: {
|
||||
// 监听能源类型变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
this.updateChart()
|
||||
}
|
||||
}
|
||||
this.updateChart();
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$el.addEventListener('resize', () => {
|
||||
console.log('resziing.....');
|
||||
});
|
||||
this.updateChart()
|
||||
this.updateChart();
|
||||
},
|
||||
methods: {
|
||||
updateChart() {
|
||||
let gasName = ''
|
||||
let gasName = '';
|
||||
const colors = ['#FFCB59'];
|
||||
let temp = []
|
||||
let seriesData = []
|
||||
let xData = []
|
||||
let yData = []
|
||||
let temp = [];
|
||||
let seriesData = [];
|
||||
let xData = [];
|
||||
let yData = [];
|
||||
switch (this.chartType) {
|
||||
case '电耗能':{
|
||||
gasName = '电耗能'
|
||||
case '电耗能': {
|
||||
gasName = '电耗能';
|
||||
if (this.chartTime === '周') {
|
||||
temp = this.energyWeekTrend || []
|
||||
}else if(this.chartTime === '月') {
|
||||
temp = this.energyMonthTrend || []
|
||||
}else{
|
||||
temp = this.energyYearTrend || []
|
||||
temp = this.energyWeekTrend || [];
|
||||
} else if (this.chartTime === '月') {
|
||||
temp = this.energyMonthTrend || [];
|
||||
} else {
|
||||
temp = this.energyYearTrend || [];
|
||||
}
|
||||
temp && temp.map(i => {
|
||||
xData.push(i.time)
|
||||
yData.push(i.qty)
|
||||
})
|
||||
temp &&
|
||||
temp.map((i) => {
|
||||
xData.push(i.time);
|
||||
yData.push(i.qty);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case '天然气I':{
|
||||
case '天然气I': {
|
||||
if (this.chartTime === '周') {
|
||||
yData = this.gasChartMsg.hisSumGas1For7Day || []
|
||||
}else if(this.chartTime === '月') {
|
||||
yData = this.gasChartMsg.sumGas1ForMonth || []
|
||||
}else{
|
||||
yData = this.gasChartMsg.sumGas1ForYear || []
|
||||
yData = this.gasChartMsg.hisSumGas1For7Day || [];
|
||||
} else if (this.chartTime === '月') {
|
||||
yData = this.gasChartMsg.sumGas1ForMonth || [];
|
||||
} else {
|
||||
yData = this.gasChartMsg.sumGas1ForYear || [];
|
||||
}
|
||||
gasName = '天然气I'
|
||||
xData = this.getXdata()
|
||||
gasName = '天然气I';
|
||||
xData = this.getXdata();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
gasName = '天然气II'
|
||||
if (this.chartTime === '周') {
|
||||
yData = this.gasChartMsg.hisSumGas2For7Day || []
|
||||
}else if(this.chartTime === '月') {
|
||||
yData = this.gasChartMsg.sumGas2ForMonth || []
|
||||
}else{
|
||||
yData = this.gasChartMsg.sumGas2ForYear || []
|
||||
gasName = '天然气II';
|
||||
if (this.chartTime === '周') {
|
||||
yData = this.gasChartMsg.hisSumGas2For7Day || [];
|
||||
} else if (this.chartTime === '月') {
|
||||
yData = this.gasChartMsg.sumGas2ForMonth || [];
|
||||
} else {
|
||||
yData = this.gasChartMsg.sumGas2ForYear || [];
|
||||
}
|
||||
xData = this.getXdata()
|
||||
xData = this.getXdata();
|
||||
}
|
||||
if (yData.length === 0) {
|
||||
this.notMsg = true
|
||||
return
|
||||
} else {
|
||||
this.notMsg = false
|
||||
}
|
||||
this.notMsg = true;
|
||||
return;
|
||||
} else {
|
||||
this.notMsg = false;
|
||||
}
|
||||
if (yData.length == 0) {
|
||||
seriesData = []
|
||||
}else {
|
||||
seriesData = [{
|
||||
name: gasName,
|
||||
data: yData,
|
||||
type: "line",
|
||||
areaStyle: {
|
||||
seriesData = [];
|
||||
} else {
|
||||
yData = yData.map((item) => {
|
||||
return (item = Number(item.toFixed(2)));
|
||||
});
|
||||
seriesData = [
|
||||
{
|
||||
name: gasName,
|
||||
data: yData,
|
||||
type: 'line',
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#FFCB59' + "40" },
|
||||
{ offset: 0.5, color: '#FFCB59' + "20" },
|
||||
{ offset: 1, color: '#FFCB59' + "00" },
|
||||
{ offset: 0, color: '#FFCB59' + '40' },
|
||||
{ offset: 0.5, color: '#FFCB59' + '20' },
|
||||
{ offset: 1, color: '#FFCB59' + '00' },
|
||||
]),
|
||||
},
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
},
|
||||
symbol: 'circle',
|
||||
symbolSize: 5,
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
},
|
||||
},
|
||||
lineStyle: {
|
||||
width: 1
|
||||
},
|
||||
symbol: 'circle',
|
||||
symbolSize: 5,
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
}
|
||||
}]
|
||||
|
||||
];
|
||||
}
|
||||
// 绘图
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
|
||||
}
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose(); // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('gasChart'));
|
||||
var option = {
|
||||
color: colors,
|
||||
@@ -204,7 +219,7 @@ export default {
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: this.chartType === '电耗能'?'单位kwh':'单位Nm³',
|
||||
name: this.chartType === '电耗能' ? '单位kwh' : '单位Nm³',
|
||||
nameTextStyle: {
|
||||
color: '#fff',
|
||||
fontSize: 10,
|
||||
@@ -230,10 +245,10 @@ export default {
|
||||
series: seriesData,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
className: "gas-tooltip"
|
||||
className: 'gas-tooltip',
|
||||
},
|
||||
}
|
||||
option && this.chart.setOption(option)
|
||||
};
|
||||
option && this.chart.setOption(option);
|
||||
},
|
||||
getXdata() {
|
||||
const today = new Date();
|
||||
@@ -242,31 +257,39 @@ export default {
|
||||
let days = 30;
|
||||
if (this.chartTime === '周') {
|
||||
return Array(7)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
const today = new Date();
|
||||
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
|
||||
return `${new Date(dtimestamp).getMonth()+1}.${new Date(dtimestamp).getDate()}`;}).reverse()
|
||||
}else if (this.chartTime == "月") {
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
const today = new Date();
|
||||
const dtimestamp = today - (index + 1) * 24 * 60 * 60 * 1000;
|
||||
return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
|
||||
dtimestamp
|
||||
).getDate()}`;
|
||||
})
|
||||
.reverse();
|
||||
} else if (this.chartTime == '月') {
|
||||
if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
|
||||
days = 31;
|
||||
} else if (currentMonth == 2) {
|
||||
days = this.isLeapYear(currentYear) ? 29 : 28;
|
||||
}
|
||||
return Array(days)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${currentMonth}.${days - index}`;}).reverse()
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${currentMonth}.${days - index}`;
|
||||
})
|
||||
.reverse();
|
||||
} else {
|
||||
return Array(12)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${12 - index}`;}).reverse()
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${12 - index}`;
|
||||
})
|
||||
.reverse();
|
||||
}
|
||||
},
|
||||
isLeapYear(year) {
|
||||
return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -278,12 +301,12 @@ export default {
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.gas-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.gas-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
.gas-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.gas-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,70 +1,91 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id="israChart" class="isra-chart" style="width:600px;height:390px;" v-show='!notMsg'></div>
|
||||
<NotMsg v-show="notMsg" />
|
||||
<div
|
||||
id="israChart"
|
||||
class="isra-chart"
|
||||
style="width: 600px; height: 390px"
|
||||
v-show="!notMsg"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import resize from './../mixins/resize'
|
||||
import NotMsg from './../components/NotMsg'
|
||||
import resize from './../mixins/resize';
|
||||
import NotMsg from './../components/NotMsg';
|
||||
|
||||
export default {
|
||||
name: 'ISRAChart',
|
||||
mixins: [resize],
|
||||
components:{ NotMsg },
|
||||
components: { NotMsg },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
notMsg:true,
|
||||
colors:['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
|
||||
chartData: []
|
||||
notMsg: true,
|
||||
colors: ['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
|
||||
chartData: [],
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
},
|
||||
activated() {},
|
||||
computed: {
|
||||
israChartMsg() {
|
||||
return this.$store.state.websocket.israKiln
|
||||
}
|
||||
return this.$store.state.websocket.israKiln;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
israChartMsg: {
|
||||
handler(newVal, oldVal) {
|
||||
this.chartData = newVal || []
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
this.chartData = newVal || [];
|
||||
this.updateChart();
|
||||
this.$emit('emitFun');
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getEqualNewlineString(params, length) {
|
||||
let text = '';
|
||||
let count = Math.ceil(params.length / length); // 向上取整数
|
||||
// 一行展示length个
|
||||
if (count > 1) {
|
||||
for (let z = 1; z <= count; z++) {
|
||||
text += params.substr((z - 1) * length, length);
|
||||
if (z < count) {
|
||||
text += '\n';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
text += params.substr(0, length);
|
||||
}
|
||||
return text;
|
||||
},
|
||||
updateChart() {
|
||||
console.log('update')
|
||||
let num = 0
|
||||
this.chartData && this.chartData.length > 0 && this.chartData.map(i => {
|
||||
num+=i.num
|
||||
})
|
||||
console.log('update');
|
||||
let num = 0;
|
||||
this.chartData &&
|
||||
this.chartData.length > 0 &&
|
||||
this.chartData.map((i) => {
|
||||
num += i.num;
|
||||
});
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose()
|
||||
}
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose();
|
||||
}
|
||||
if (this.chartData && this.chartData.length > 0) {
|
||||
this.notMsg = false
|
||||
} else {
|
||||
this.notMsg = true
|
||||
return
|
||||
}
|
||||
this.notMsg = false;
|
||||
} else {
|
||||
this.notMsg = true;
|
||||
return;
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('israChart'));
|
||||
var option = {
|
||||
color:this.colors,
|
||||
title:{
|
||||
color: this.colors,
|
||||
title: {
|
||||
text: num,
|
||||
subtext: '总数',
|
||||
subtext: '总数/个',
|
||||
top: '32%',
|
||||
left: '49%',
|
||||
textAlign: 'center',
|
||||
@@ -81,55 +102,92 @@ export default {
|
||||
bottom: '2%',
|
||||
left: 'center',
|
||||
itemWidth: 18,
|
||||
itemHeight:18,
|
||||
itemHeight: 18,
|
||||
icon: 'circle',
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
color: '#fff',
|
||||
},
|
||||
data:this.chartData && this.chartData.length > 0 && this.chartData.map((item,index)=>({
|
||||
name:item.name,
|
||||
itemStyle:{
|
||||
color: this.colors[index%4]
|
||||
}
|
||||
}))
|
||||
data:
|
||||
this.chartData &&
|
||||
this.chartData.length > 0 &&
|
||||
this.chartData.map((item, index) => ({
|
||||
name: item.name,
|
||||
itemStyle: {
|
||||
color: this.colors[index % 4],
|
||||
},
|
||||
})),
|
||||
},
|
||||
series:[{
|
||||
series: [
|
||||
{
|
||||
name: 'ISRA缺陷检测',
|
||||
type: 'pie',
|
||||
center: ['50%', '40%'],
|
||||
radius: ['45%', '70%'],
|
||||
avoidLabelOverlap: true,
|
||||
// label: {
|
||||
// show: true,
|
||||
// },
|
||||
// labelLine: {
|
||||
// show: true,
|
||||
// },
|
||||
label: {
|
||||
show: false
|
||||
show: true,
|
||||
normal: {
|
||||
alignTo: 'labelLine',
|
||||
margin: 10,
|
||||
edgeDistance: 10,
|
||||
lineHeight: 16,
|
||||
formatter: (params) => {
|
||||
//调用自定义显示格式
|
||||
return this.getEqualNewlineString(
|
||||
params.value + ' | ' + params.percent.toFixed(0) + '%'
|
||||
);
|
||||
},
|
||||
textStyle: {
|
||||
// 提示文字的样式
|
||||
// color: '#595959',
|
||||
fontSize: 16,
|
||||
},
|
||||
},
|
||||
},
|
||||
labelLine: {
|
||||
show: true,
|
||||
length: 25,
|
||||
length2: 10,
|
||||
},
|
||||
data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({
|
||||
name:item.name,
|
||||
value: item.num,
|
||||
itemStyle:{
|
||||
color:{
|
||||
type: 'linear',
|
||||
x: 1,
|
||||
y: 1,
|
||||
x2: 0,
|
||||
y2: 0,
|
||||
global: false,
|
||||
colorStops:[
|
||||
{offset: 0,color: this.colors[index%4]},
|
||||
{offset: 1,color: this.colors[index%4]+'33'}
|
||||
]
|
||||
}
|
||||
}
|
||||
}))}],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
className: "isra-chart-tooltip"
|
||||
data:
|
||||
this.chartData &&
|
||||
this.chartData.length > 0 &&
|
||||
this.chartData.map((item, index) => ({
|
||||
name: item.name,
|
||||
value: item.num,
|
||||
label: {
|
||||
color: this.colors[index % 4],
|
||||
},
|
||||
itemStyle: {
|
||||
color: {
|
||||
type: 'linear',
|
||||
x: 1,
|
||||
y: 1,
|
||||
x2: 0,
|
||||
y2: 0,
|
||||
global: false,
|
||||
colorStops: [
|
||||
{ offset: 0, color: this.colors[index % 4] },
|
||||
{ offset: 1, color: this.colors[index % 4] + '33' },
|
||||
],
|
||||
},
|
||||
},
|
||||
})),
|
||||
},
|
||||
}
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
className: 'isra-chart-tooltip',
|
||||
},
|
||||
};
|
||||
this.chart.setOption(option);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -141,12 +199,12 @@ export default {
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,77 +1,95 @@
|
||||
<template>
|
||||
<div style="flex: 1;">
|
||||
<Container name="设备报警" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;">
|
||||
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='eqScrollBoard'/>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<Container
|
||||
name="设备报警"
|
||||
size="middle"
|
||||
style="">
|
||||
<TimePrompt
|
||||
class="timeShow"
|
||||
:timestr="timestr" />
|
||||
<div style="padding: 5px 10px">
|
||||
<dv-scroll-board
|
||||
:config="config"
|
||||
style="width: 575px; height: 380px"
|
||||
ref="eqScrollBoard" />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container.vue';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
import { switchShowTime } from '../utils';
|
||||
export default {
|
||||
name: 'EqAlarm',
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
sjgEquipment() {
|
||||
return this.$store.state.websocket.sjgEquipment
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [60, 150, 190],
|
||||
align: ['center'],
|
||||
data: [],
|
||||
// data: [
|
||||
// [1, '四大线3小线铺纸机', 'EQ20240110130909000255', '正常', '否'],
|
||||
// [2, '四大线2小线铺纸机', 'EQ20240110130848000254', '正常', '否'],
|
||||
// [3, '四大线1小线铺纸机', 'EQ20240110130832000253', '正常', '否'],
|
||||
// [4, '12线下片台', 'EQ20240110130817000252', '正常', '否'],
|
||||
// [5, '11线下片台', ' EQ20240110130743000250', '正常', '否'],
|
||||
// [6, '10线下片台', ' EQ20240110130743000250', '正常', '否'],
|
||||
// [7, '4大线五区自动连线柜', 'EQ20240110130731000249', '正常', '否'],
|
||||
// [8, '四大线四区2小线清洗机', 'EQ20240110112716000248', '正常', '否'],
|
||||
// [9, '四大线四区1小线清洗机', 'EQ20240110112700000247', '正常', '否'],
|
||||
// [10, '4大线四区自动连线柜', 'EQ20240110112646000246', '正常', '否']
|
||||
// ],
|
||||
rowNum: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
sjgEquipment: {
|
||||
name: 'EqAlarm',
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
sjgEquipment() {
|
||||
return this.$store.state.websocket.sjgEquipment;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['序号', '产线名', '设备名称', '设备状态'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [60, 120, 280],
|
||||
align: ['center'],
|
||||
data: [],
|
||||
// data: [
|
||||
// [1, '四大线3小线铺纸机', 'EQ20240110130909000255', '正常', '否'],
|
||||
// [2, '四大线2小线铺纸机', 'EQ20240110130848000254', '正常', '否'],
|
||||
// [3, '四大线1小线铺纸机', 'EQ20240110130832000253', '正常', '否'],
|
||||
// [4, '12线下片台', 'EQ20240110130817000252', '正常', '否'],
|
||||
// [5, '11线下片台', ' EQ20240110130743000250', '正常', '否'],
|
||||
// [6, '10线下片台', ' EQ20240110130743000250', '正常', '否'],
|
||||
// [7, '4大线五区自动连线柜', 'EQ20240110130731000249', '正常', '否'],
|
||||
// [8, '四大线四区2小线清洗机', 'EQ20240110112716000248', '正常', '否'],
|
||||
// [9, '四大线四区1小线清洗机', 'EQ20240110112700000247', '正常', '否'],
|
||||
// [10, '4大线四区自动连线柜', 'EQ20240110112646000246', '正常', '否']
|
||||
// ],
|
||||
rowNum: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日');
|
||||
},
|
||||
watch: {
|
||||
sjgEquipment: {
|
||||
handler(newVal, oldVal) {
|
||||
let outArr = this.sjgEquipment.map((item, index) => [
|
||||
index+1,
|
||||
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
||||
`<span title=${item.code || ''}>${item.code || ''}</span>`,
|
||||
item.status,
|
||||
item.error? '是': '否'
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['eqScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let outArr = this.sjgEquipment.map((item, index) => [
|
||||
index + 1,
|
||||
`<span title=${item.lineName || ''}>${item.lineName || ''}</span>`,
|
||||
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
||||
`<span><div style="${
|
||||
item.status == '运行'
|
||||
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
||||
: item.status == '故障'
|
||||
? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
|
||||
: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
|
||||
}"></div> ${item.status || ''}</span>`,
|
||||
// `<span"><div style="${
|
||||
// item.error == false
|
||||
// ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
||||
// : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
|
||||
// }"></div> ${item.error == true ? '是' : '否' || ''}</span>`,
|
||||
]);
|
||||
this.config.data = outArr;
|
||||
this.$refs['eqScrollBoard'].updateRows(outArr);
|
||||
this.timestr = switchShowTime('日');
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,67 +1,88 @@
|
||||
<template>
|
||||
<Container name="工单监控" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;" class="WOMonitoring">
|
||||
<dv-scroll-board :config="config" style="width:900px;height:380px" ref='worderScrollBoard'/>
|
||||
</div>
|
||||
</Container>
|
||||
<Container
|
||||
name="工单监控"
|
||||
size="middle"
|
||||
style="">
|
||||
<TimePrompt
|
||||
class="timeShow"
|
||||
:timestr="timestr" />
|
||||
<div
|
||||
style="padding: 5px 10px"
|
||||
class="WOMonitoring">
|
||||
<dv-scroll-board
|
||||
:config="config"
|
||||
style="width: 900px; height: 380px"
|
||||
ref="worderScrollBoard" />
|
||||
</div>
|
||||
</Container>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container.vue';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
import { formatDate } from '@/utils'
|
||||
import { switchShowTime } from '../utils';
|
||||
import { formatDate } from '@/utils';
|
||||
export default {
|
||||
name: 'WorkOrderMonitoring',
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
order() {
|
||||
return this.$store.state.websocket.workOrder
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间','计划产量','实际产量'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [60, 120, 120, 60, 100, 150],
|
||||
align: ['center'],
|
||||
data: [],
|
||||
rowNum:10
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
order: {
|
||||
name: 'WorkOrderMonitoring',
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
order() {
|
||||
return this.$store.state.websocket.workOrder;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: [
|
||||
'序号',
|
||||
'工单名称',
|
||||
'规格',
|
||||
'产线',
|
||||
'工单状态',
|
||||
'计划完成时间',
|
||||
'计划产量',
|
||||
'实际产量',
|
||||
'完成进度',
|
||||
],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [60, 120, 120, 60, 100, 150],
|
||||
align: ['center'],
|
||||
data: [],
|
||||
rowNum: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日');
|
||||
},
|
||||
watch: {
|
||||
order: {
|
||||
handler(newVal, oldVal) {
|
||||
let outArr = this.order.map((item, index) => [
|
||||
index+1,
|
||||
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
||||
item.specifications,
|
||||
item.lines,
|
||||
this.getDictDatas(this.DICT_TYPE.ORDER_STATUS)[item.status]?.label,
|
||||
formatDate(item.planFinishTime),
|
||||
item.planQuantity,
|
||||
item.planAssignQuantity
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['worderScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let outArr = this.order.map((item, index) => [
|
||||
index + 1,
|
||||
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
||||
item.specifications,
|
||||
item.lines,
|
||||
this.getDictDatas(this.DICT_TYPE.ORDER_STATUS)[item.status]?.label,
|
||||
formatDate(item.planFinishTime),
|
||||
item.planQuantity,
|
||||
item.actualQuantity,
|
||||
(item.progressRate * 100).toFixed(0) + '%',
|
||||
]);
|
||||
this.config.data = outArr;
|
||||
this.$refs['worderScrollBoard'].updateRows(outArr);
|
||||
this.timestr = switchShowTime('日');
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div id='deepProcessingContainerB' ref='deepProcessingContainerB' style="width: 100%;height: 100%;">
|
||||
<div
|
||||
id="deepProcessingContainerB"
|
||||
ref="deepProcessingContainerB"
|
||||
style="width: 100%; height: 100%">
|
||||
<div
|
||||
id='deepProcessingContainer'
|
||||
ref='deepProcessingContainer'
|
||||
id="deepProcessingContainer"
|
||||
ref="deepProcessingContainer"
|
||||
class="deepProcessingBoard"
|
||||
style="
|
||||
position: absolute;
|
||||
@@ -16,15 +19,14 @@
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
"
|
||||
:style="{transform:'scale('+scaleNum+')'}">
|
||||
<KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='深加工生产运行驾驶舱'/>
|
||||
:style="{ transform: 'scale(' + scaleNum + ')' }">
|
||||
<KHeader
|
||||
:isFullScreen="isFullScreen"
|
||||
@screenfullChange="screenfullChange"
|
||||
topTitle="深加工生产运行驾驶舱" />
|
||||
<div
|
||||
class="main-body"
|
||||
style="
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
grid-template-rows: 462px 462px;
|
||||
">
|
||||
style="display: grid; gap: 16px; grid-template-rows: 462px 462px">
|
||||
<TopThree />
|
||||
<BottomTwo />
|
||||
</div>
|
||||
@@ -47,16 +49,16 @@
|
||||
import KHeader from '../components/Header';
|
||||
import TopThree from './TopThree';
|
||||
import BottomTwo from './BottomTwo';
|
||||
import screenfull from 'screenfull'
|
||||
import { debounce } from '@/utils/debounce'
|
||||
import { getDcsMsg, getMesMsg } from './../utils/wsInterface'
|
||||
import screenfull from 'screenfull';
|
||||
import { debounce } from '@/utils/debounce';
|
||||
import { getDcsMsg, getMesMsg } from './../utils/wsInterface';
|
||||
|
||||
export default {
|
||||
name: 'deepProcessingBoard',
|
||||
components: {
|
||||
KHeader,
|
||||
TopThree,
|
||||
BottomTwo
|
||||
BottomTwo,
|
||||
},
|
||||
// provide() {
|
||||
// return {
|
||||
@@ -66,83 +68,90 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isFullScreen: false,
|
||||
scaleNum: 0.8
|
||||
scaleNum: 0.8,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.init();
|
||||
},
|
||||
destroy() {
|
||||
this.destroy()
|
||||
this.destroy();
|
||||
},
|
||||
mounted() {
|
||||
this.boxReset = debounce(() => {
|
||||
this.resetSize()
|
||||
}, 300)
|
||||
this.boxReset()
|
||||
window.addEventListener('resize', () => {
|
||||
this.boxReset()
|
||||
})
|
||||
this.resetSize();
|
||||
}, 300);
|
||||
this.boxReset();
|
||||
window.addEventListener('resize', () => {
|
||||
this.boxReset();
|
||||
});
|
||||
// closeWebsocket()
|
||||
// getDcsMsg()
|
||||
// getMesMsg()
|
||||
console.log('mounted...........')
|
||||
},
|
||||
mounted() {
|
||||
this.boxReset();
|
||||
window.addEventListener('resize', this.boxReset);
|
||||
},
|
||||
destroyed() {
|
||||
console.log('destroyed...........')
|
||||
window.removeEventListener('resize', this.boxReset);
|
||||
this.destroy();
|
||||
},
|
||||
methods: {
|
||||
boxReset() {
|
||||
debounce(() => {
|
||||
this.resetSize();
|
||||
}, 300)();
|
||||
},
|
||||
change() {
|
||||
this.isFullScreen = screenfull.isFullscreen
|
||||
},
|
||||
init() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.on('change', this.change)
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.off('change', this.change)
|
||||
}
|
||||
},
|
||||
this.isFullScreen = screenfull.isFullscreen;
|
||||
},
|
||||
init() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.on('change', this.change);
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.off('change', this.change);
|
||||
}
|
||||
},
|
||||
// 全屏
|
||||
screenfullChange() {
|
||||
if (!screenfull.isEnabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
}
|
||||
screenfull.toggle(this.$refs.deepProcessingContainerB)
|
||||
},
|
||||
if (!screenfull.isEnabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
screenfull.toggle(this.$refs.deepProcessingContainerB);
|
||||
},
|
||||
resetSize() {
|
||||
let deepProcessingContainer = document.getElementById('deepProcessingContainer')
|
||||
let rw = parseFloat(window.innerWidth)
|
||||
let rh = parseFloat(window.innerHeight)
|
||||
let bw = parseFloat(deepProcessingContainer.style.width)
|
||||
let bh = parseFloat(deepProcessingContainer.style.height)
|
||||
let wx = 0
|
||||
let hx = 0
|
||||
let deepProcessingContainer = document.getElementById(
|
||||
'deepProcessingContainer'
|
||||
);
|
||||
let rw = parseFloat(window.innerWidth);
|
||||
let rh = parseFloat(window.innerHeight);
|
||||
let bw = parseFloat(deepProcessingContainer.style.width);
|
||||
let bh = parseFloat(deepProcessingContainer.style.height);
|
||||
let wx = 0;
|
||||
let hx = 0;
|
||||
if (screenfull.isFullscreen) {
|
||||
console.log('全屏')
|
||||
wx = rw / bw
|
||||
hx = rh / bh
|
||||
console.log(this.scaleNum)
|
||||
}else{
|
||||
console.log('非全屏')
|
||||
console.log(this.$store.state.app.sidebar.opened)
|
||||
wx = rw / bw;
|
||||
hx = rh / bh;
|
||||
} else {
|
||||
if (this.$store.state.app.sidebar.opened) {
|
||||
wx = (rw-280) / bw
|
||||
hx = (rh-116) / bh
|
||||
}else{
|
||||
wx = (rw-85) / bw
|
||||
hx = (rh-116) / bh
|
||||
wx = (rw - 280) / bw;
|
||||
hx = (rh - 116) / bh;
|
||||
} else {
|
||||
wx = (rw - 85) / bw;
|
||||
hx = (rh - 116) / bh;
|
||||
}
|
||||
}
|
||||
this.scaleNum = wx
|
||||
}
|
||||
}
|
||||
this.scaleNum = wx;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
<!--
|
||||
filename: MaterialCost.vue
|
||||
author: liubin
|
||||
date: 2023-12-06 09:09:27
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<Container name="能耗" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<Container
|
||||
name="能耗"
|
||||
size="middle"
|
||||
style="">
|
||||
<EnergeTop />
|
||||
<SplitLine :horizontal="true" />
|
||||
<div class="" style="flex: 2; padding: 8px">
|
||||
<div
|
||||
class=""
|
||||
style="flex: 2; padding: 8px">
|
||||
<div
|
||||
class="header-line"
|
||||
style="margin: 8px 0 16px; display: flex; align-items: center">
|
||||
<h2 class="" style="margin: 0; color: #0ee8fe; margin-right: 12px">
|
||||
<h2
|
||||
class=""
|
||||
style="margin: 0; color: #0ee8fe; margin-right: 12px">
|
||||
能耗趋势图
|
||||
</h2>
|
||||
<TimePrompt
|
||||
class="timeShow"
|
||||
:timestr="timestr" />
|
||||
<!-- <Switcher /> -->
|
||||
<div>
|
||||
<!-- <span class="lgd lgd-total">总量</span> -->
|
||||
@@ -32,11 +34,21 @@
|
||||
justify-content: space-between;
|
||||
">
|
||||
<SelectorBtnGroup
|
||||
:options="['电耗能', '天然气I', '天然气II']" @emitFun='toggleType' :active='chartType'/>
|
||||
<SelectorBtnGroup :options="['周', '月', '年']" @emitFun='toggleDate' :active='chartTime'/>
|
||||
:options="['电耗能', '天然气I', '天然气II']"
|
||||
@emitFun="toggleType"
|
||||
:active="chartType" />
|
||||
<SelectorBtnGroup
|
||||
:options="['周', '月', '年']"
|
||||
@emitFun="toggleDate"
|
||||
:active="chartTime" />
|
||||
</div>
|
||||
<div class="chart" style="height: 200px; margin-top: 8px;">
|
||||
<GasChart :chartType='chartType' :chartTime='chartTime' @emitFun='dateUpdate'/>
|
||||
<div
|
||||
class="chart"
|
||||
style="height: 200px; margin-top: 8px">
|
||||
<GasChart
|
||||
:chartType="chartType"
|
||||
:chartTime="chartTime"
|
||||
@emitFun="dateUpdate" />
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
@@ -51,7 +63,7 @@ import EnergeTop from './EnergeTop';
|
||||
import GasChart from '../components/GasChart.vue';
|
||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
import { switchShowTime } from '../utils';
|
||||
export default {
|
||||
name: 'EnergeCost',
|
||||
components: {
|
||||
@@ -61,48 +73,43 @@ export default {
|
||||
EnergeTop,
|
||||
GasChart,
|
||||
SelectorBtnGroup,
|
||||
TimePrompt
|
||||
TimePrompt,
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
chartType:'电耗能',
|
||||
chartTime:'周',
|
||||
timestr: ''
|
||||
chartType: '电耗能',
|
||||
chartTime: '周',
|
||||
timestr: '',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
},
|
||||
this.timestr = switchShowTime(this.chartTime);
|
||||
},
|
||||
computed: {
|
||||
gasInfoMsg() {
|
||||
return this.$store.state.websocket.gasInfo
|
||||
return this.$store.state.websocket.gasInfo;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 切换能源
|
||||
toggleType(val) {
|
||||
this.chartType = val
|
||||
this.chartType = val;
|
||||
},
|
||||
// 切换时间
|
||||
toggleDate(val) {
|
||||
this.chartTime = val
|
||||
this.timestr = switchShowTime(val)
|
||||
this.chartTime = val;
|
||||
this.timestr = switchShowTime(val);
|
||||
},
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
}
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 120px;
|
||||
}
|
||||
.lgd {
|
||||
color: #fff;
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<div class="gas-handle" style="flex: 2">
|
||||
<Container name="烟气处理" size="large" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div
|
||||
class="gas-handle"
|
||||
style="flex: 2">
|
||||
<Container
|
||||
name="烟气处理"
|
||||
size="large"
|
||||
style="">
|
||||
<div
|
||||
class=""
|
||||
style="
|
||||
@@ -24,7 +28,13 @@
|
||||
">
|
||||
氧气含量
|
||||
</span>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1">{{exhaustGasInfo?.O2_float ? (Number(exhaustGasInfo.O2_float)).toFixed(2) : ''}}%</span>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1">
|
||||
{{
|
||||
exhaustGasInfo?.O2_float
|
||||
? Number(exhaustGasInfo.O2_float).toFixed(2)
|
||||
: ''
|
||||
}}%
|
||||
</span>
|
||||
</ShadowRect>
|
||||
<ShadowRect>
|
||||
<div
|
||||
@@ -33,13 +43,19 @@
|
||||
line-height: 1.24;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
padding:5px 8px 5px 0;
|
||||
padding: 5px 8px 5px 0;
|
||||
letter-spacing: 3px;
|
||||
">
|
||||
<p style="margin: 0; line-height: inherit">氮氧化物</p>
|
||||
<p style="margin: 0; line-height: inherit">排放浓度</p>
|
||||
</div>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1.2">{{exhaustGasInfo?.NOX_float ? (Number(exhaustGasInfo.NOX_float)).toFixed(2) : ''}}mg/m³</span>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1.2">
|
||||
{{
|
||||
exhaustGasInfo?.NOX_float
|
||||
? Number(exhaustGasInfo.NOX_float).toFixed(2)
|
||||
: ''
|
||||
}}mg/m³
|
||||
</span>
|
||||
</ShadowRect>
|
||||
|
||||
<ShadowRect>
|
||||
@@ -49,16 +65,22 @@
|
||||
line-height: 1.24;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
padding:5px 8px 5px 0;
|
||||
padding: 5px 8px 5px 0;
|
||||
letter-spacing: 3px;
|
||||
">
|
||||
<p style="margin: 0; line-height: inherit">二氧化硫</p>
|
||||
<p style="margin: 0; line-height: inherit">排放浓度</p>
|
||||
</div>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1">{{exhaustGasInfo?.SO2_float ? (Number(exhaustGasInfo.SO2_float)).toFixed(2) : ''}}mg/m³</span>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1">
|
||||
{{
|
||||
exhaustGasInfo?.SO2_float
|
||||
? Number(exhaustGasInfo.SO2_float).toFixed(2)
|
||||
: ''
|
||||
}}mg/m³
|
||||
</span>
|
||||
</ShadowRect>
|
||||
|
||||
<ShadowRect>
|
||||
<!-- <ShadowRect>
|
||||
<span
|
||||
style="
|
||||
font-size: 20px;
|
||||
@@ -70,17 +92,30 @@
|
||||
">
|
||||
颗粒物浓度
|
||||
</span>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1.2">{{exhaustGasInfo?.dust_float ? (Number(exhaustGasInfo.dust_float)).toFixed(2) : ''}}mg/m³</span>
|
||||
</ShadowRect>
|
||||
<span style="font-size: 20px; line-height: 1.24; flex: 1.2">
|
||||
{{
|
||||
exhaustGasInfo?.dust_float
|
||||
? Number(exhaustGasInfo.dust_float).toFixed(2)
|
||||
: ''
|
||||
}}mg/m³
|
||||
</span>
|
||||
</ShadowRect> -->
|
||||
</div>
|
||||
<KilnLine :horizontal="true" />
|
||||
<div class="" style="flex: 2; padding: 8px">
|
||||
<div
|
||||
class=""
|
||||
style="flex: 2; padding: 8px">
|
||||
<div
|
||||
class="header-line"
|
||||
style="margin-bottom: 10px; display: flex; align-items: center">
|
||||
<h2 class="" style="margin: 5px 0; color: #0ee8fe; margin-right: 12px">
|
||||
<h2
|
||||
class=""
|
||||
style="margin: 5px 0; color: #0ee8fe; margin-right: 12px">
|
||||
烟气趋势图
|
||||
</h2>
|
||||
<TimePrompt
|
||||
class="timeShow"
|
||||
:timestr="timestr" />
|
||||
<!-- <Switcher /> -->
|
||||
<div>
|
||||
<!-- <span class="lgd lgd-total">总量</span> -->
|
||||
@@ -95,12 +130,23 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
">
|
||||
<!-- :options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']" -->
|
||||
<SelectorBtnGroup
|
||||
:options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']" @emitFun='toggleType' :active='chartType'/>
|
||||
<SelectorBtnGroup :options="['日', '周', '月', '年']" @emitFun='toggleDate' :active='chartTime' />
|
||||
:options="['氧气含量', '二氧化硫', '氮氧化物']"
|
||||
@emitFun="toggleType"
|
||||
:active="chartType" />
|
||||
<SelectorBtnGroup
|
||||
:options="['日', '周', '月', '年']"
|
||||
@emitFun="toggleDate"
|
||||
:active="chartTime" />
|
||||
</div>
|
||||
<div class="chart" style="height: 250px;margin-top: 10px;">
|
||||
<FlueGasChart :chartType='chartType' :chartTime='chartTime' @emitFun='dateUpdate'/>
|
||||
<div
|
||||
class="chart"
|
||||
style="height: 250px; margin-top: 10px">
|
||||
<FlueGasChart
|
||||
:chartType="chartType"
|
||||
:chartTime="chartTime"
|
||||
@emitFun="dateUpdate" />
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
@@ -115,7 +161,7 @@ import KilnLine from '../components/line';
|
||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
|
||||
import FlueGasChart from '../components/FlueGasChart';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
import { switchShowTime } from '../utils';
|
||||
|
||||
export default {
|
||||
name: 'GasHandle',
|
||||
@@ -125,49 +171,44 @@ export default {
|
||||
KilnLine,
|
||||
SelectorBtnGroup,
|
||||
FlueGasChart,
|
||||
TimePrompt
|
||||
TimePrompt,
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
chartType:'氧气含量',
|
||||
chartTime:'日',
|
||||
timestr: ''
|
||||
chartType: '氧气含量',
|
||||
chartTime: '日',
|
||||
timestr: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
exhaustGasInfo() {
|
||||
return this.$store.state.websocket.exhaustGasInfo
|
||||
}
|
||||
return this.$store.state.websocket.exhaustGasInfo;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
},
|
||||
this.timestr = switchShowTime(this.chartTime);
|
||||
},
|
||||
methods: {
|
||||
// 烟气
|
||||
toggleType(val) {
|
||||
console.log('烟气' + val)
|
||||
this.chartType = val
|
||||
console.log('烟气' + val);
|
||||
this.chartType = val;
|
||||
},
|
||||
// 切换时间
|
||||
toggleDate(val) {
|
||||
this.chartTime = val
|
||||
this.timestr = switchShowTime(val)
|
||||
this.chartTime = val;
|
||||
this.timestr = switchShowTime(val);
|
||||
},
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
}
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
}
|
||||
.gas-handle {
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
name="原料用量统计"
|
||||
size="middle"
|
||||
style="">
|
||||
<TimePrompt
|
||||
class="timeShow"
|
||||
:timestr="timestr" />
|
||||
<div style="flex: 1; display: flex; gap: 8px; flex-direction: column">
|
||||
<div
|
||||
class="absolute"
|
||||
@@ -10,8 +13,8 @@
|
||||
flex: 2;
|
||||
padding: 12px 12px 0 12px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-auto-rows: repeat(4, 1fr);
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-auto-rows: repeat(3, 1fr);
|
||||
gap: 8px;
|
||||
">
|
||||
<ShadowRect
|
||||
@@ -22,7 +25,8 @@
|
||||
class="material"
|
||||
style="
|
||||
flex: 1;
|
||||
padding-bottom: 3px;
|
||||
padding-bottom: 18px;
|
||||
padding-top: 18px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
@@ -53,20 +57,33 @@
|
||||
<script>
|
||||
import Container from '../components/Container';
|
||||
import ShadowRect from '../components/ShadowRect.vue';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils';
|
||||
export default {
|
||||
name: 'MaterialCost',
|
||||
components: { Container, ShadowRect },
|
||||
components: { Container, ShadowRect, TimePrompt },
|
||||
props: {},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
timestr: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
materialMsg() {
|
||||
return this.$store.state.websocket.material;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日');
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<style lang="scss" scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 210px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div id='kilnContainerB' ref='kilnContainerB' style="width: 100%;height: 100%;">
|
||||
<div
|
||||
id="kilnContainerB"
|
||||
ref="kilnContainerB"
|
||||
style="width: 100%; height: 100%">
|
||||
<div
|
||||
id='kilnContainer'
|
||||
ref='kilnContainer'
|
||||
id="kilnContainer"
|
||||
ref="kilnContainer"
|
||||
class="KilnDataBoard"
|
||||
style="
|
||||
position: absolute;
|
||||
@@ -16,15 +19,22 @@
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
"
|
||||
:style="{transform:'scale('+scaleNum+')'}">
|
||||
<KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='窑炉生产运行驾驶舱'/>
|
||||
:style="{ transform: 'scale(' + scaleNum + ')' }">
|
||||
<KHeader
|
||||
:isFullScreen="isFullScreen"
|
||||
@screenfullChange="screenfullChange"
|
||||
topTitle="窑炉生产运行驾驶舱" />
|
||||
<div
|
||||
class="main-body"
|
||||
style="flex: 1; display: flex; gap: 20px; padding: 0px 16px">
|
||||
<div class="left-side" style="flex: 2">
|
||||
<div
|
||||
class="left-side"
|
||||
style="flex: 2">
|
||||
<LeftFour />
|
||||
</div>
|
||||
<div class="right-side" style="flex: 1">
|
||||
<div
|
||||
class="right-side"
|
||||
style="flex: 1">
|
||||
<RightTwo />
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,8 +46,8 @@
|
||||
import KHeader from '../components/Header';
|
||||
import LeftFour from './LeftFour';
|
||||
import RightTwo from './RightTwo.vue';
|
||||
import screenfull from 'screenfull'
|
||||
import { debounce } from '@/utils/debounce'
|
||||
import screenfull from 'screenfull';
|
||||
import { debounce } from '@/utils/debounce';
|
||||
|
||||
export default {
|
||||
name: 'Kiln',
|
||||
@@ -46,10 +56,10 @@ export default {
|
||||
LeftFour,
|
||||
RightTwo,
|
||||
},
|
||||
computed:{
|
||||
computed: {
|
||||
sidebarStatus() {
|
||||
return this.$store.state.app.sidebar.opened;
|
||||
}
|
||||
},
|
||||
},
|
||||
// provide() {
|
||||
// return {
|
||||
@@ -59,84 +69,80 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isFullScreen: false,
|
||||
scaleNum: 0.8
|
||||
scaleNum: 0.8,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
sidebarStatus() {
|
||||
this.boxReset()
|
||||
this.boxReset();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
destroy() {
|
||||
this.destroy()
|
||||
this.init();
|
||||
},
|
||||
mounted() {
|
||||
this.boxReset = debounce(() => {
|
||||
this.resetSize()
|
||||
}, 300)
|
||||
this.boxReset()
|
||||
window.addEventListener('resize', () => {
|
||||
this.boxReset()
|
||||
})
|
||||
this.boxReset();
|
||||
window.addEventListener('resize', this.boxReset);
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('resize', this.boxReset);
|
||||
this.destroy();
|
||||
},
|
||||
methods: {
|
||||
boxReset() {
|
||||
debounce(() => {
|
||||
this.resetSize();
|
||||
}, 300)();
|
||||
},
|
||||
change() {
|
||||
this.isFullScreen = screenfull.isFullscreen
|
||||
},
|
||||
this.isFullScreen = screenfull.isFullscreen;
|
||||
},
|
||||
|
||||
init() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.on('change', this.change)
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.on('change', this.change);
|
||||
}
|
||||
},
|
||||
|
||||
destroy() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.off('change', this.change)
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.off('change', this.change);
|
||||
}
|
||||
},
|
||||
// 全屏
|
||||
screenfullChange() {
|
||||
if (!screenfull.isEnabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
}
|
||||
screenfull.toggle(this.$refs.kilnContainerB)
|
||||
},
|
||||
if (!screenfull.isEnabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
screenfull.toggle(this.$refs.kilnContainerB);
|
||||
},
|
||||
resetSize() {
|
||||
let kilnContainerBox = document.getElementById('kilnContainer')
|
||||
console.log(kilnContainerBox)
|
||||
let rw = parseFloat(window.innerWidth)
|
||||
let rh = parseFloat(window.innerHeight)
|
||||
let bw = parseFloat(kilnContainerBox.style.width)
|
||||
let bh = parseFloat(kilnContainerBox.style.height)
|
||||
let wx = 0
|
||||
let hx = 0
|
||||
let kilnContainerBox = document.getElementById('kilnContainer');
|
||||
let rw = parseFloat(window.innerWidth);
|
||||
let rh = parseFloat(window.innerHeight);
|
||||
let bw = parseFloat(kilnContainerBox.style.width);
|
||||
let bh = parseFloat(kilnContainerBox.style.height);
|
||||
let wx = 0;
|
||||
let hx = 0;
|
||||
if (screenfull.isFullscreen) {
|
||||
console.log('全屏')
|
||||
wx = rw / bw
|
||||
hx = rh / bh
|
||||
console.log(this.scaleNum)
|
||||
}else{
|
||||
console.log('非全屏')
|
||||
console.log(this.$store.state.app.sidebar.opened)
|
||||
wx = rw / bw;
|
||||
hx = rh / bh;
|
||||
} else {
|
||||
if (this.$store.state.app.sidebar.opened) {
|
||||
wx = (rw-280) / bw
|
||||
hx = (rh-116) / bh
|
||||
}else{
|
||||
wx = (rw-85) / bw
|
||||
hx = (rh-116) / bh
|
||||
wx = (rw - 280) / bw;
|
||||
hx = (rh - 116) / bh;
|
||||
} else {
|
||||
wx = (rw - 85) / bw;
|
||||
hx = (rh - 116) / bh;
|
||||
}
|
||||
}
|
||||
this.scaleNum = wx
|
||||
}
|
||||
}
|
||||
this.scaleNum = wx;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ export const switchShowTime = (type) => {
|
||||
}
|
||||
if (lastMonth === 12) {
|
||||
startYear = currentYear - 1
|
||||
}else{
|
||||
startYear = currentYear
|
||||
}
|
||||
startTime = startYear+'.'+lastMonth+'.'+day
|
||||
endTime = currentYear+'.'+(nowTime.getMonth()+1)+'.28'
|
||||
|
||||
@@ -1,70 +1,94 @@
|
||||
<template>
|
||||
<div style="flex: 1;" class="orderContainer">
|
||||
<Container name="订单完成情况" size="small" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;">
|
||||
<dv-scroll-board :config="config" style="width:575px;height:230px" ref='orderScrollBoard'/>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
<div
|
||||
style="flex: 1"
|
||||
class="orderContainer">
|
||||
<Container
|
||||
name="订单完成情况"
|
||||
size="small"
|
||||
style="">
|
||||
<TimePrompt
|
||||
class="timeShow"
|
||||
:timestr="timestr" />
|
||||
<div style="padding: 5px 10px">
|
||||
<dv-scroll-board
|
||||
:config="config"
|
||||
style="width: 575px; height: 230px"
|
||||
ref="orderScrollBoard" />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container'
|
||||
import Container from '../components/Container';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { formatDate } from '@/utils'
|
||||
import { switchShowTime } from '../utils'
|
||||
import { formatDate } from '@/utils';
|
||||
import { switchShowTime } from '../utils';
|
||||
export default {
|
||||
name: 'OrderStatus',
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
order() {
|
||||
return this.$store.state.websocket.order
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['上线时间', '客户名称', '规格','完成度'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [155, 160, 150],
|
||||
data: [],
|
||||
rowNum: 6
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
order:{
|
||||
handler() {
|
||||
let outArr = this.order.map((item) => [
|
||||
formatDate(item.planStartTime) || '',
|
||||
`<span title=${item.customerName || ''}>${item.customerName || ''}</span>`,
|
||||
`<span title=${item.specifications || ''}>${item.specifications || ''}</span>`,
|
||||
`<span style="display:inline-block;width:60px;">${item.completeRate?(item.completeRate*100).toFixed(2)+'%':'0%'}</span>
|
||||
name: 'OrderStatus',
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
order() {
|
||||
return this.$store.state.websocket.order;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['上线时间', '客户名称', '规格', '完成度'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [155, 160, 150],
|
||||
data: [],
|
||||
rowNum: 6,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日');
|
||||
},
|
||||
watch: {
|
||||
order: {
|
||||
handler() {
|
||||
let outArr = this.order.map((item) => [
|
||||
formatDate(item.planStartTime) || '',
|
||||
`<span title=${item.customerName || ''}>${
|
||||
item.customerName || ''
|
||||
}</span>`,
|
||||
`<span title=${item.specifications || ''}>${
|
||||
item.specifications || ''
|
||||
}</span>`,
|
||||
`<span style="display:inline-block;width:60px;">${
|
||||
item.completeRate
|
||||
? (item.completeRate * 100).toFixed(2) + '%'
|
||||
: '0%'
|
||||
}</span>
|
||||
<div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
|
||||
<svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
|
||||
<circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
|
||||
<circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${item.completeRate?item.completeRate.toFixed(2)*37.68+','+((1-item.completeRate.toFixed(2))*37.68):(0+','+37.68)}"/>
|
||||
<circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${
|
||||
item.completeRate
|
||||
? item.completeRate.toFixed(2) * 37.68 +
|
||||
',' +
|
||||
(1 - item.completeRate.toFixed(2)) * 37.68
|
||||
: 0 + ',' + 37.68
|
||||
}"/>
|
||||
</svg>
|
||||
</div>`
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['orderScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>`,
|
||||
]);
|
||||
this.config.data = outArr;
|
||||
this.$refs['orderScrollBoard'].updateRows(outArr);
|
||||
this.timestr = switchShowTime('日');
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 210px;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 210px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div id='wholePlantContainerB' ref='wholePlantContainerB' style="width: 100%;height: 100%;">
|
||||
<div
|
||||
id="wholePlantContainerB"
|
||||
ref="wholePlantContainerB"
|
||||
style="width: 100%; height: 100%">
|
||||
<div
|
||||
id='wholePlantContainer'
|
||||
ref='wholePlantContainer'
|
||||
id="wholePlantContainer"
|
||||
ref="wholePlantContainer"
|
||||
class="wholePlantBoard"
|
||||
style="
|
||||
position: absolute;
|
||||
@@ -16,18 +19,27 @@
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
"
|
||||
:style="{transform:'scale('+scaleNum+')'}">
|
||||
<KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='全厂总览驾驶舱'/>
|
||||
:style="{ transform: 'scale(' + scaleNum + ')' }">
|
||||
<KHeader
|
||||
:isFullScreen="isFullScreen"
|
||||
@screenfullChange="screenfullChange"
|
||||
topTitle="全厂总览驾驶舱" />
|
||||
<div
|
||||
class="main-body"
|
||||
style="flex: 1; display: flex; gap: 20px; padding: 0px 16px">
|
||||
<div class="left-side" style="flex: 1">
|
||||
<div
|
||||
class="left-side"
|
||||
style="flex: 1">
|
||||
<LeftTwo />
|
||||
</div>
|
||||
<div class="middle-side" style="flex: 1">
|
||||
<div
|
||||
class="middle-side"
|
||||
style="flex: 1">
|
||||
<MiddleTwo />
|
||||
</div>
|
||||
<div class="right-side" style="flex: 1">
|
||||
<div
|
||||
class="right-side"
|
||||
style="flex: 1">
|
||||
<RightTwo />
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,8 +52,8 @@ import KHeader from '../components/Header';
|
||||
import LeftTwo from './LeftTwo';
|
||||
import MiddleTwo from './MiddleTwo';
|
||||
import RightTwo from './RightTwo';
|
||||
import screenfull from 'screenfull'
|
||||
import { debounce } from '@/utils/debounce'
|
||||
import screenfull from 'screenfull';
|
||||
import { debounce } from '@/utils/debounce';
|
||||
|
||||
export default {
|
||||
name: 'wholePlantBoard',
|
||||
@@ -49,7 +61,7 @@ export default {
|
||||
KHeader,
|
||||
LeftTwo,
|
||||
MiddleTwo,
|
||||
RightTwo
|
||||
RightTwo,
|
||||
},
|
||||
// provide() {
|
||||
// return {
|
||||
@@ -59,80 +71,77 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isFullScreen: false,
|
||||
scaleNum: 0.8
|
||||
scaleNum: 0.8,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.init();
|
||||
},
|
||||
destroy() {
|
||||
this.destroy()
|
||||
this.destroy();
|
||||
},
|
||||
mounted() {
|
||||
this.boxReset = debounce(() => {
|
||||
this.resetSize()
|
||||
}, 300)
|
||||
this.boxReset()
|
||||
window.addEventListener('resize', () => {
|
||||
this.boxReset()
|
||||
})
|
||||
console.log('mounted...........')
|
||||
this.boxReset();
|
||||
window.addEventListener('resize', this.boxReset);
|
||||
},
|
||||
destroyed() {
|
||||
console.log('destroyed...........')
|
||||
window.removeEventListener('resize', this.boxReset);
|
||||
},
|
||||
methods: {
|
||||
boxReset() {
|
||||
debounce(() => {
|
||||
this.resetSize();
|
||||
}, 300)();
|
||||
},
|
||||
change() {
|
||||
this.isFullScreen = screenfull.isFullscreen
|
||||
},
|
||||
init() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.on('change', this.change)
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.off('change', this.change)
|
||||
}
|
||||
},
|
||||
this.isFullScreen = screenfull.isFullscreen;
|
||||
},
|
||||
init() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.on('change', this.change);
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.off('change', this.change);
|
||||
}
|
||||
},
|
||||
// 全屏
|
||||
screenfullChange() {
|
||||
if (!screenfull.isEnabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
}
|
||||
screenfull.toggle(this.$refs.wholePlantContainerB)
|
||||
},
|
||||
if (!screenfull.isEnabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
screenfull.toggle(this.$refs.wholePlantContainerB);
|
||||
},
|
||||
resetSize() {
|
||||
let wholePlantContainerBox = document.getElementById('wholePlantContainer')
|
||||
let rw = parseFloat(window.innerWidth)
|
||||
let rh = parseFloat(window.innerHeight)
|
||||
let bw = parseFloat(wholePlantContainerBox.style.width)
|
||||
let bh = parseFloat(wholePlantContainerBox.style.height)
|
||||
let wx = 0
|
||||
let hx = 0
|
||||
let wholePlantContainerBox = document.getElementById(
|
||||
'wholePlantContainer'
|
||||
);
|
||||
let rw = parseFloat(window.innerWidth);
|
||||
let rh = parseFloat(window.innerHeight);
|
||||
let bw = parseFloat(wholePlantContainerBox.style.width);
|
||||
let bh = parseFloat(wholePlantContainerBox.style.height);
|
||||
let wx = 0;
|
||||
let hx = 0;
|
||||
if (screenfull.isFullscreen) {
|
||||
console.log('全屏')
|
||||
wx = rw / bw
|
||||
hx = rh / bh
|
||||
console.log(this.scaleNum)
|
||||
}else{
|
||||
console.log('非全屏')
|
||||
console.log(this.$store.state.app.sidebar.opened)
|
||||
wx = rw / bw;
|
||||
hx = rh / bh;
|
||||
} else {
|
||||
if (this.$store.state.app.sidebar.opened) {
|
||||
wx = (rw-280) / bw
|
||||
hx = (rh-116) / bh
|
||||
}else{
|
||||
wx = (rw-85) / bw
|
||||
hx = (rh-116) / bh
|
||||
wx = (rw - 280) / bw;
|
||||
hx = (rh - 116) / bh;
|
||||
} else {
|
||||
wx = (rw - 85) / bw;
|
||||
hx = (rh - 116) / bh;
|
||||
}
|
||||
}
|
||||
this.scaleNum = wx
|
||||
}
|
||||
}
|
||||
this.scaleNum = wx;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -76,10 +76,6 @@ export default {
|
||||
name: this.chartData[i].objName + this.chartData[i].objCode,
|
||||
type: 'bar',
|
||||
barMaxWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
},
|
||||
data: [],
|
||||
};
|
||||
legendData.push(this.chartData[i].objName + this.chartData[i].objCode);
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="searchBarBox divHeight"
|
||||
ref="searchBarRef"
|
||||
:style="{ paddingRight: isFold ? '55px' : '0px' }">
|
||||
ref="searchBarRef">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline">
|
||||
@@ -200,13 +199,6 @@
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span
|
||||
v-if="isFold"
|
||||
class="foldClass"
|
||||
@click="switchMode">
|
||||
{{ isExpand ? '收起' : '展开' }}
|
||||
<svg-icon :icon-class="isExpand ? 'upward' : 'downward'" />
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -217,16 +209,8 @@ import { getFactoryList } from '@/api/core/base/factory';
|
||||
import moment from 'moment';
|
||||
export default {
|
||||
name: 'searchArea',
|
||||
props: {
|
||||
isFold: {
|
||||
// 多行模式(默认否)
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isExpand: false, // 展开收起
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
energyTypeId: null,
|
||||
@@ -525,16 +509,6 @@ export default {
|
||||
let value = new Date(newData).getTime();
|
||||
return value;
|
||||
},
|
||||
switchMode() {
|
||||
// 展开和收起切换
|
||||
this.isExpand = !this.isExpand;
|
||||
const element = this.$refs.searchBarRef;
|
||||
if (this.isExpand) {
|
||||
element.classList.remove('divHeight');
|
||||
} else {
|
||||
element.classList.add('divHeight');
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -573,21 +547,6 @@ export default {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
.searchBarBox .foldClass {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
color: #0b58ff;
|
||||
}
|
||||
.searchBarBox .foldClass .iconfont {
|
||||
font-size: 14px;
|
||||
}
|
||||
.divHeight {
|
||||
height: 45px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.separateStyle {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
id="contrastAnalysisBox">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area
|
||||
:isFold="isFold"
|
||||
@submit="getList"
|
||||
@export="exportExl" />
|
||||
<div v-show="chartData.length">
|
||||
@@ -38,7 +37,6 @@ export default {
|
||||
mixins: [tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
isFold: false,
|
||||
chartData: [],
|
||||
timeDim: '',
|
||||
tableProps: [],
|
||||
@@ -46,13 +44,6 @@ export default {
|
||||
tableH: this.tableHeight(250) / 2,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437);
|
||||
// console.log(document.getElementById("contrastAnalysisBox").offsetWidth)
|
||||
});
|
||||
this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437);
|
||||
},
|
||||
methods: {
|
||||
_setTableHeight() {
|
||||
this.tableH = this.tableHeight(250) / 2;
|
||||
|
||||
@@ -1,138 +1,131 @@
|
||||
<template>
|
||||
<div
|
||||
id="analysischartLine"
|
||||
style="width: 100%"
|
||||
:style="{ height: chartHeight + 'px' }"
|
||||
></div>
|
||||
<div
|
||||
id="analysischartLine"
|
||||
style="width: 100%"
|
||||
:style="{ height: chartHeight + 'px' }"></div>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import resize from '@/utils/chartMixins/resize'
|
||||
import * as echarts from 'echarts';
|
||||
import resize from '@/utils/chartMixins/resize';
|
||||
export default {
|
||||
name: "LineChart",
|
||||
mixins: [resize],
|
||||
data() {
|
||||
return {
|
||||
chartDom: '',
|
||||
chart: '',
|
||||
chartHeight: this.tableHeight(370)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
chartData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
chartData: function () {
|
||||
this.getChart()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.chartHeight = this.tableHeight(370)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getChart() {
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
|
||||
}
|
||||
this.chartDom = document.getElementById('analysischartLine')
|
||||
this.chart = echarts.init(this.chartDom)
|
||||
if (this.chartData.length === 0) {
|
||||
return false
|
||||
}
|
||||
let arr = this.chartData[0].type // [水,电,煤]
|
||||
let keys = Object.keys(this.chartData[0])
|
||||
let yData = [
|
||||
{
|
||||
name: '本期',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '上期',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top'
|
||||
}
|
||||
}
|
||||
]
|
||||
for (let j = 0; j < arr.length; j++) {
|
||||
for (let k = 0; k < keys.length; k++) {
|
||||
if (keys[k].indexOf(arr[j]+'_上期') > -1) {
|
||||
yData[1].data.push(this.chartData[0][keys[k]])
|
||||
}
|
||||
if (keys[k].indexOf(arr[j]+'_能源消耗') > -1) {
|
||||
yData[0].data.push(this.chartData[0][keys[k]])
|
||||
}
|
||||
}
|
||||
}
|
||||
var option = {
|
||||
color:['#288AFF','#8EF0AB'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
formatter: function(params) {
|
||||
return (
|
||||
params[0].axisValue +
|
||||
`<br>` +
|
||||
params.map((item) => {
|
||||
let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${item.color};"></span>`
|
||||
let seriesNameStr = `<span style="display:inline-block;">${item.seriesName}</span>`
|
||||
let value = item.value ? item.value : '-'
|
||||
let valueStr = `<span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${value}</span>`
|
||||
return `<span style="display:flex; justify-content:space-between; margin-bottom: 2px">
|
||||
name: 'LineChart',
|
||||
mixins: [resize],
|
||||
data() {
|
||||
return {
|
||||
chartDom: '',
|
||||
chart: '',
|
||||
chartHeight: this.tableHeight(370),
|
||||
};
|
||||
},
|
||||
props: {
|
||||
chartData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
chartData: function () {
|
||||
this.getChart();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.chartHeight = this.tableHeight(370);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getChart() {
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose(); // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
|
||||
}
|
||||
this.chartDom = document.getElementById('analysischartLine');
|
||||
this.chart = echarts.init(this.chartDom);
|
||||
if (this.chartData.length === 0) {
|
||||
return false;
|
||||
}
|
||||
let arr = this.chartData[0].type; // [水,电,煤]
|
||||
let keys = Object.keys(this.chartData[0]);
|
||||
let yData = [
|
||||
{
|
||||
name: '本期',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 20,
|
||||
},
|
||||
{
|
||||
name: '上期',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 20,
|
||||
},
|
||||
];
|
||||
for (let j = 0; j < arr.length; j++) {
|
||||
for (let k = 0; k < keys.length; k++) {
|
||||
if (keys[k].indexOf(arr[j] + '_上期') > -1) {
|
||||
yData[1].data.push(this.chartData[0][keys[k]]);
|
||||
}
|
||||
if (keys[k].indexOf(arr[j] + '_能源消耗') > -1) {
|
||||
yData[0].data.push(this.chartData[0][keys[k]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
var option = {
|
||||
color: ['#288AFF', '#8EF0AB'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
},
|
||||
formatter: function (params) {
|
||||
return (
|
||||
params[0].axisValue +
|
||||
`<br>` +
|
||||
params
|
||||
.map((item) => {
|
||||
let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${item.color};"></span>`;
|
||||
let seriesNameStr = `<span style="display:inline-block;">${item.seriesName}</span>`;
|
||||
let value = item.value ? item.value : '-';
|
||||
let valueStr = `<span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${value}</span>`;
|
||||
return `<span style="display:flex; justify-content:space-between; margin-bottom: 2px">
|
||||
<span>${str}${seriesNameStr}</span>
|
||||
<span>${valueStr}</span>
|
||||
</span>`
|
||||
}).join(``)
|
||||
)
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
right: '1%',
|
||||
icon: 'rect',
|
||||
itemHeight: 8,
|
||||
itemWidth: 8
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
boundaryGap: [0, 0.01]
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: arr
|
||||
},
|
||||
series: yData
|
||||
}
|
||||
option && this.chart.setOption(option);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</span>`;
|
||||
})
|
||||
.join(``)
|
||||
);
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
right: '1%',
|
||||
icon: 'rect',
|
||||
itemHeight: 8,
|
||||
itemWidth: 8,
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
boundaryGap: [0, 0.01],
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: arr,
|
||||
},
|
||||
series: yData,
|
||||
};
|
||||
option && this.chart.setOption(option);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -68,9 +68,9 @@ export default {
|
||||
|
||||
var option = {
|
||||
color: ['#288AFF'],
|
||||
// tooltip: {
|
||||
// trigger: 'axis'
|
||||
// },
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
},
|
||||
grid: {
|
||||
left: '4%',
|
||||
right: '1%',
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="searchBarBox divHeight"
|
||||
ref="searchBarRef"
|
||||
:style="{ paddingRight: isFold ? '55px' : '0px' }">
|
||||
class="searchBarBox"
|
||||
ref="searchBarRef">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline">
|
||||
@@ -172,9 +171,9 @@
|
||||
</el-button>
|
||||
<span
|
||||
class="separateStyle"
|
||||
v-hasPermi="['analysis:trend-analysis:export']"></span>
|
||||
v-hasPermi="['analysis:energy-analysis:query']"></span>
|
||||
<el-button
|
||||
v-hasPermi="['analysis:trend-analysis:export']"
|
||||
v-hasPermi="['analysis:energy-analysis:query']"
|
||||
type="primary"
|
||||
size="small"
|
||||
plain
|
||||
@@ -183,13 +182,6 @@
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span
|
||||
v-if="isFold"
|
||||
class="foldClass"
|
||||
@click="switchMode">
|
||||
{{ isExpand ? '收起' : '展开' }}
|
||||
<svg-icon :icon-class="isExpand ? 'upward' : 'downward'" />
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -198,16 +190,8 @@ import { getEnergyTypeListAll } from '@/api/base/energyType';
|
||||
import moment from 'moment';
|
||||
export default {
|
||||
name: 'searchArea',
|
||||
props: {
|
||||
isFold: {
|
||||
// 多行模式(默认否)
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isExpand: false, // 展开收起
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
energyTypeId: null,
|
||||
@@ -509,16 +493,6 @@ export default {
|
||||
let value = new Date(newData).getTime();
|
||||
return value;
|
||||
},
|
||||
switchMode() {
|
||||
// 展开和收起切换
|
||||
this.isExpand = !this.isExpand;
|
||||
const element = this.$refs.searchBarRef;
|
||||
if (this.isExpand) {
|
||||
element.classList.remove('divHeight');
|
||||
} else {
|
||||
element.classList.add('divHeight');
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -557,21 +531,6 @@ export default {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
.searchBarBox .foldClass {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
color: #0b58ff;
|
||||
}
|
||||
.searchBarBox .foldClass .iconfont {
|
||||
font-size: 14px;
|
||||
}
|
||||
.divHeight {
|
||||
height: 45px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.separateStyle {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
id="trendAnalysisBox">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area
|
||||
:isFold="isFold"
|
||||
@submit="getList"
|
||||
@export="exportExl" />
|
||||
<div v-show="chartData.length">
|
||||
@@ -33,20 +32,12 @@ export default {
|
||||
components: { SearchArea, LineChart },
|
||||
data() {
|
||||
return {
|
||||
isFold: false,
|
||||
chartData: [],
|
||||
timeDim: '',
|
||||
tableProps: [],
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260);
|
||||
this.isFold = this.searchBarWidth('trendAnalysisBox', 1480);
|
||||
});
|
||||
this.isFold = this.searchBarWidth('trendAnalysisBox', 1480);
|
||||
},
|
||||
methods: {
|
||||
getList(params) {
|
||||
this.timeDim = params.timeDim;
|
||||
@@ -66,8 +57,14 @@ export default {
|
||||
let listObj = { useNum: '消耗量' }; // 数据
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let obj = {};
|
||||
if (this.timeDim === '3') {
|
||||
let fName = arr[i].time.slice(0, 4);
|
||||
let lName = arr[i].time.slice(4, 6);
|
||||
obj.label = fName + ' 第 ' + lName + ' 周';
|
||||
} else {
|
||||
obj.label = arr[i].time;
|
||||
}
|
||||
obj.prop = arr[i].time;
|
||||
obj.label = arr[i].time;
|
||||
obj.minWidth = 100;
|
||||
tempX.push(obj);
|
||||
listObj[arr[i].time] = arr[i].useNum || null;
|
||||
@@ -77,37 +74,20 @@ export default {
|
||||
},
|
||||
// 导出excel
|
||||
exportExl(params) {
|
||||
exportTrend({ ...params }).then((res) => {
|
||||
// let fileName = '';
|
||||
// const contentDisposition = res.headers['content-disposition'];
|
||||
// if (contentDisposition) {
|
||||
// fileName = decodeURIComponent(
|
||||
// contentDisposition.slice(
|
||||
// contentDisposition.indexOf('filename=') + 9
|
||||
// )
|
||||
// );
|
||||
// }
|
||||
const blob = new Blob([res.data]);
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(blob);
|
||||
reader.onload = (e) => {
|
||||
const a = document.createElement('a');
|
||||
a.download = '走势分析';
|
||||
a.href = e.target.result;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
exportTrend({ ...params })
|
||||
.then((response) => {
|
||||
this.$download.excel(response, '走势分析.xls');
|
||||
this.$message.success('导出成功');
|
||||
};
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style lang="scss">
|
||||
.trendAnalysisBox {
|
||||
.trend-out-table {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -89,13 +89,13 @@ export default {
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('base:energy-plc:query') ? 'button' : '',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:energy-plc:create') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:energy-plc:create') ? 'button' : '',
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
},
|
||||
selectObj(val) {
|
||||
this.form.bindObjectId = val[val.length - 1];
|
||||
this.form.bindObjectType = val.length - 1;
|
||||
this.form.bindObjectType = val.length;
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
@@ -152,4 +152,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
readonly
|
||||
style="width: 250px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showBtn">
|
||||
<el-form-item
|
||||
v-if="showBtn"
|
||||
v-hasPermi="['base:energy-plc-param:create']">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -160,15 +162,19 @@ export default {
|
||||
this.drawerTitle = '参数绑定';
|
||||
this.showBtn = true;
|
||||
this.tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
];
|
||||
this.$auth.hasPermi('base:energy-plc-param:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:energy-plc-param:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v);
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
|
||||
@@ -107,13 +107,17 @@ export default {
|
||||
param: 'cnName',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('base:energy-plc-connect:query')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:energy-plc-connect:create')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:energy-plc-connect:create')
|
||||
@@ -127,17 +131,25 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:energy-plc-connect:bind')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:energy-plc-param:query',
|
||||
'base:energy-type:query',
|
||||
])
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定',
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
},
|
||||
this.$auth.hasPermi('base:energy-plc-connect:update')
|
||||
this.$auth.hasPermi('base:energy-plc-param:query')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:energy-plc-connect:update',
|
||||
'base:energy-plc-connect:query',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button
|
||||
v-show="!isEdit"
|
||||
class="addButton"
|
||||
icon="el-icon-plus"
|
||||
@click="emitButtonClick">
|
||||
@@ -70,6 +71,13 @@ export default {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: () => {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<add-table
|
||||
:table-data="tableData"
|
||||
:table-name-list="tableNameList"
|
||||
:isEdit="isEdit"
|
||||
@emitFun="inputChange"
|
||||
@emitButtonClick="emitButtonClick" />
|
||||
</el-col>
|
||||
|
||||
@@ -114,13 +114,20 @@ export default {
|
||||
defaultSelect: [],
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('base:energy-quantity-manual:query')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermiOr([
|
||||
'base:energy-quantity-manual:export',
|
||||
'base:energy-quantity-manual:create',
|
||||
])
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:energy-quantity-manual:export')
|
||||
@@ -147,13 +154,19 @@ export default {
|
||||
// 班次基础信息列表
|
||||
list: [],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:energy-quantity-manual:query',
|
||||
'base:energy-quantity-manual:create',
|
||||
])
|
||||
? {
|
||||
type: 'meterReading',
|
||||
btnName: '抄表',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:energy-quantity-manual:update',
|
||||
'base:energy-quantity-manual:query',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
|
||||
@@ -90,7 +90,9 @@ export default {
|
||||
width: 350,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('base:energy-quantity-realtime:query')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
|
||||
@@ -52,7 +52,10 @@ export default {
|
||||
return {
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:table-name-config:edit')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:energy-table:query',
|
||||
'base:energy-table:update',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
placeholder="请选择"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in getDictDatas(DICT_TYPE.TABLE_NAME)"
|
||||
v-for="item in tableNameList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
@@ -154,6 +154,7 @@ import {
|
||||
createEnergyLimit,
|
||||
getEnergyParamList,
|
||||
} from '@/api/monitoring/energyLimit';
|
||||
import { energyTableGet } from '@/api/base/energyQuantityManual';
|
||||
export default {
|
||||
name: 'energyLimitAdd',
|
||||
props: {
|
||||
@@ -203,6 +204,7 @@ export default {
|
||||
{ required: true, message: '指标类型不能为空', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
tableNameList: [],
|
||||
detailList: [],
|
||||
};
|
||||
},
|
||||
@@ -214,10 +216,10 @@ export default {
|
||||
getEnergyLimit(id).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data;
|
||||
this.form.plcParamId = res.data.plcParamId || '';
|
||||
this.form.tableName = this.form.tableName
|
||||
? this.form.tableName + ''
|
||||
: '';
|
||||
this.form.plcParamId = res.data.plcParamId || '';
|
||||
this.form.method = this.form.method ? this.form.method + '' : '';
|
||||
this.form.limitType = this.form.limitType
|
||||
? this.form.limitType + ''
|
||||
@@ -229,6 +231,9 @@ export default {
|
||||
if (this.form.type === 2) {
|
||||
this.getDetailList();
|
||||
}
|
||||
if (this.form.energyTypeId) {
|
||||
this.getTableNameList(this.form.energyTypeId);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -267,11 +272,22 @@ export default {
|
||||
}
|
||||
},
|
||||
toggleType() {
|
||||
if (this.form.energyTypeId && this.form.type) {
|
||||
this.getDetailList();
|
||||
this.form.plcParamId = '';
|
||||
if (this.form.energyTypeId && this.form.method == 2) {
|
||||
this.form.tableName = '';
|
||||
this.getTableNameList(this.form.energyTypeId);
|
||||
}
|
||||
},
|
||||
// 获取能源表名list
|
||||
getTableNameList(id) {
|
||||
energyTableGet({ energyTypeId: id }).then((res) => {
|
||||
this.tableNameList = res.data.tableObjs || [];
|
||||
if (this.tableNameList.length === 0) {
|
||||
this.$modal.msgWarning(
|
||||
'当前能源类型暂无配置表名,请先到《表名配置》页面配置'
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 递归处理分类回显问题
|
||||
changeDetSelect(key, treeData) {
|
||||
let arr = []; // 递归时操作的数组
|
||||
|
||||
@@ -125,13 +125,17 @@ export default {
|
||||
param: 'limitType',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('monitoring:energy-limit:query')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('monitoring:energy-limit:create')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('monitoring:energy-limit:create')
|
||||
@@ -262,8 +266,9 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
this.$modal
|
||||
.confirm('是否确认删除监控对象为"' + row.objName + '"的数据项?')
|
||||
.confirm('是否确认删除第"' + row._pageIndex + '"条数据项?')
|
||||
.then(function () {
|
||||
return deleteEnergyLimit(row.id);
|
||||
})
|
||||
|
||||
@@ -113,7 +113,9 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('monitoring:energy-report:export')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('monitoring:energy-report:export')
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
v-hasPermi="['monitoring:energy-statistics-det:query']"
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="showBtn"
|
||||
@@ -30,6 +31,7 @@
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasPermi="['monitoring:energy-statistics-det:delete']"
|
||||
type="danger"
|
||||
size="small"
|
||||
v-if="showBtn"
|
||||
@@ -161,11 +163,13 @@ export default {
|
||||
this.drawerTitle = '参数绑定';
|
||||
this.showBtn = true;
|
||||
this.tableBtn = [
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
];
|
||||
this.$auth.hasPermi('monitoring:energy-statistics-det:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v);
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
|
||||
@@ -88,7 +88,9 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('monitoring:energy-statistics-det:create')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '关联',
|
||||
name: 'add',
|
||||
color: 'primary',
|
||||
|
||||
@@ -103,8 +103,11 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('monitoring:energy-statistics:create')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('monitoring:energy-statistics:create')
|
||||
@@ -118,17 +121,22 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('monitoring:energy-statistics:bind')
|
||||
this.$auth.hasPermi('monitoring:energy-statistics-det:query')
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定',
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
},
|
||||
this.$auth.hasPermi('monitoring:energy-statistics:update')
|
||||
this.$auth.hasPermi('monitoring:energy-statistics:query')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'monitoring:energy-statistics:update',
|
||||
'monitoring:energy-statistics:query',
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
|
||||
@@ -130,8 +130,20 @@ export default {
|
||||
{ prop: 'createTime', label: '报警时间', filter: timeFilter, width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'alarmCode', label: '设备报警码', width: 180, showOverflowtooltip: true },
|
||||
{ prop: 'alarmContent', label: '报警内容', width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn },
|
||||
this.$auth.hasPermiAnd([
|
||||
'monitoring:equipment-alarm-log:query',
|
||||
'base:equipment-alarm-hand:query'
|
||||
]) ?
|
||||
{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn } : undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'monitoring:equipment-alarm-log:query',
|
||||
'base:equipment-alarm-hand:query',
|
||||
'base:core-worker:query',
|
||||
'base:equipment-alarm-hand:create',
|
||||
'base:equipment-alarm-hand:update',
|
||||
'monitoring:equipment-alarm-log:update'
|
||||
]) ?
|
||||
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn } : undefined,
|
||||
// { prop: 'remark', label: '备注' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
|
||||
@@ -122,19 +122,30 @@ export default {
|
||||
editMode: '',
|
||||
searchBarKeys: ['name', 'code'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('equipment:alarm-group:update')
|
||||
? {
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:equipment-group:query',
|
||||
'base:equipment-group-alarm:query'
|
||||
])
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '查看报警',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:alarm-group:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:equipment-group:update',
|
||||
'base:equipment-group:query',
|
||||
'base:equipment-group-alarm:create',
|
||||
'base:equipment-group-alarm:delete',
|
||||
'base:equipment-group-alarm:update',
|
||||
'base:equipment-group-alarm:query',
|
||||
'base:equipment-group-alarm:query'
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:alarm-group:delete')
|
||||
this.$auth.hasPermi('base:equipment-group:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@@ -244,10 +255,11 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:equipment-group:create')
|
||||
? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:alarm-group:create')
|
||||
type: this.$auth.hasPermi('base:equipment-group:create')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
|
||||
@@ -123,13 +123,23 @@ export default {
|
||||
return {
|
||||
searchBarKeys: ['groupId', 'equipmentName'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('equipment:bind-group:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:equipment-group-alarm:query',
|
||||
'base:core-equipment:query'
|
||||
])
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '查看报警',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:bind-group:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'equipment:bind-group:update',
|
||||
'base:core-equipment:query',
|
||||
'base:equipment-group-alarm:create',
|
||||
'base:equipment-group-alarm:update',
|
||||
'base:equipment-group-alarm:delete',
|
||||
'base:equipment-group-alarm:query'
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
@@ -201,11 +211,16 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:bind-group:create',
|
||||
'base:core-equipment:query'
|
||||
]) ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:bind-group:create')
|
||||
? 'button'
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:bind-group:create',
|
||||
'base:core-equipment:query'
|
||||
]) ? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
|
||||
@@ -140,17 +140,28 @@ export default {
|
||||
// tableBtn: [
|
||||
// ].filter((v) => v),
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '参数绑定',
|
||||
},
|
||||
this.$auth.hasPermi('equipment:collection-config:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:equipment-plc-connect:query',
|
||||
'base:equipment-plc-param:query'
|
||||
])
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '参数绑定',
|
||||
} : undefined,
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:equipment-plc-connect:update',
|
||||
'base:equipment-plc-connect:query',
|
||||
'base:equipment-plc-param:create',
|
||||
'base:equipment-plc-param:update',
|
||||
'base:equipment-plc-param:delete',
|
||||
'base:equipment-plc-param:query'
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:collection-config:delete')
|
||||
this.$auth.hasPermi('base:equipment-plc-connect:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@@ -158,14 +169,14 @@ export default {
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{ prop: 'productionLine', label: '产线', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'workshopSection', label: '工段', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备名', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentCode', label: '设备编码', width: 200, showOverflowtooltip: true },
|
||||
{ prop: 'plcCode', label: '关联表编码', width: 220, showOverflowtooltip: true },
|
||||
{ prop: 'plcTableName', label: '关联表名', width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'plcName', label: '标识名称', width: 150, showOverflowtooltip: true },
|
||||
{ prop: 'bindingParameters', label: '绑定参数数量', width: 120, showOverflowtooltip: true },
|
||||
{ prop: 'productionLine', label: '产线', minWidth: 120, showOverflowtooltip: true },
|
||||
{ prop: 'workshopSection', label: '工段', minWidth: 120, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备名', minWidth: 120, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentCode', label: '设备编码', minWidth: 200, showOverflowtooltip: true },
|
||||
{ prop: 'plcCode', label: '关联表编码', minWidth: 220, showOverflowtooltip: true },
|
||||
{ prop: 'plcTableName', label: '关联表名', minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'plcName', label: '标识名称', minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'bindingParameters', label: '绑定参数数量', minWidth: 120, showOverflowtooltip: true },
|
||||
// {
|
||||
// _action: 'params-bind',
|
||||
// label: '查看绑定',
|
||||
@@ -217,10 +228,11 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:equipment-plc-connect:create')
|
||||
? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:collection-config:create')
|
||||
type: this.$auth.hasPermi('base:equipment-plc-connect:create')
|
||||
? 'button'
|
||||
: '',
|
||||
// type: 'button',
|
||||
|
||||
@@ -108,13 +108,16 @@ export default {
|
||||
tableKey: Math.random(),
|
||||
searchBarKeys: ['name', 'plcTableName'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('equipment:realtime-table-config:update')
|
||||
this.$auth.hasPermiAnd([
|
||||
'base:equipment-plc:update',
|
||||
'base:equipment-plc:query'
|
||||
])
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:realtime-table-config:delete')
|
||||
this.$auth.hasPermi('base:equipment-plc:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@@ -160,13 +163,12 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('base:equipment-plc:create')
|
||||
? 'separate' : '',
|
||||
},
|
||||
{
|
||||
// type: this.$auth.hasPermi('equipment:realtime-table-config:create')
|
||||
// ? 'button'
|
||||
// : '',
|
||||
type: 'button',
|
||||
type: this.$auth.hasPermi('base:equipment-plc:create')
|
||||
? 'button' : '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
plain: true,
|
||||
@@ -194,7 +196,7 @@ export default {
|
||||
input: true,
|
||||
label: '编码',
|
||||
prop: 'code',
|
||||
url: '/base/equipment-group/getCode',
|
||||
url: '/base/energy-plc/getCode',
|
||||
rules: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<!-- btns -->
|
||||
<el-table-column width="188" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip content="确认" placement="top">
|
||||
<el-tooltip v-if="$auth.hasPermi('equipment:check:update')" content="确认" placement="top">
|
||||
<el-button
|
||||
type="text"
|
||||
style="margin: 5px 0; padding: 0"
|
||||
@@ -101,8 +101,8 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- line -->
|
||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
<span v-if="$auth.hasPermi('equipment:check:query')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<el-tooltip v-if="$auth.hasPermi('equipment:check:query')" content="查看详情" placement="top">
|
||||
<el-button
|
||||
type="text"
|
||||
style="margin: 5px 0; padding: 0"
|
||||
@@ -111,8 +111,26 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- line -->
|
||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<span v-if="$auth.hasPermiAnd([
|
||||
'equipment:check:update',
|
||||
'base:core-worker:query',
|
||||
'base:group-classes:query',
|
||||
'base:core-department:query',
|
||||
'equipment:check:query',
|
||||
'equipment:check:create',
|
||||
'equipment:check:delete',
|
||||
'base:core-equipment:query'
|
||||
])" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<el-tooltip v-if="$auth.hasPermiAnd([
|
||||
'equipment:check:update',
|
||||
'base:core-worker:query',
|
||||
'base:group-classes:query',
|
||||
'base:core-department:query',
|
||||
'equipment:check:query',
|
||||
'equipment:check:create',
|
||||
'equipment:check:delete',
|
||||
'base:core-equipment:query'
|
||||
])" content="编辑" placement="top">
|
||||
<el-button
|
||||
type="text"
|
||||
style="margin: 5px 0; padding: 0"
|
||||
@@ -121,8 +139,8 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- line -->
|
||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<span v-if="$auth.hasPermi('equipment:check:delete')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||
<el-tooltip v-if="$auth.hasPermi('equipment:check:delete')" content="删除" placement="top">
|
||||
<el-button
|
||||
type="text"
|
||||
style="margin: 5px 0; padding: 0"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-25 15:44:49
|
||||
* @LastEditTime: 2024-04-22 15:04:40
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -165,7 +165,7 @@ import SmallTitle from './SmallTitle';
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import attrAdd from './attr-add';
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
||||
import { getDepartmentList } from "@/api/base/coreDepartment";
|
||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
||||
import { getDictDataLabel } from '@/utils/dict';
|
||||
|
||||
@@ -289,7 +289,7 @@ export default {
|
||||
return item
|
||||
}) || [];
|
||||
// 部门列表
|
||||
const res1 = await getCoreDepartmentList();
|
||||
const res1 = await getDepartmentList();
|
||||
this.departmentOptions = res1.data || []
|
||||
// 巡检人
|
||||
let inspectorList = [];
|
||||
|
||||
@@ -101,10 +101,23 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: (this.$auth.hasPermiAnd([
|
||||
'equipment:check:create',
|
||||
'base:core-worker:query',
|
||||
'base:group-classes:query',
|
||||
'base:core-department:query'
|
||||
]) ||
|
||||
this.$auth.hasPermi('equipment:check:update') ||
|
||||
this.$auth.hasPermi('equipment:check:export'))
|
||||
? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:inspection-confirm:create')
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:check:create',
|
||||
'base:core-worker:query',
|
||||
'base:group-classes:query',
|
||||
'base:core-department:query'
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
@@ -113,7 +126,7 @@ export default {
|
||||
color: 'success',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:inspection-confirm:confirm')
|
||||
type: this.$auth.hasPermi('equipment:check:update')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '批量确认',
|
||||
@@ -122,7 +135,7 @@ export default {
|
||||
plain: true,
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:inspection-confirm:export')
|
||||
type: this.$auth.hasPermi('equipment:check:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
addContent: false,
|
||||
searchBarKeys: ['name', 'actualCheckTime'],
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('equipment:check-record:detail')
|
||||
this.$auth.hasPermi('equipment:check:query')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
@@ -166,10 +166,11 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
type: this.$auth.hasPermi('equipment:check:export')
|
||||
? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('equipment:check-record:export')
|
||||
type: this.$auth.hasPermi('equipment:check:export')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '导出',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user