diff --git a/klp-ui/package.json b/klp-ui/package.json index e3a14843..827e0372 100644 --- a/klp-ui/package.json +++ b/klp-ui/package.json @@ -42,6 +42,7 @@ "bpmn-js-token-simulation": "0.10.0", "clipboard": "2.0.8", "core-js": "3.25.3", + "dayjs": "^1.11.18", "dom-to-image": "^2.6.0", "echarts": "5.4.0", "element-ui": "2.15.12", @@ -72,6 +73,7 @@ "vue-router": "3.4.9", "vuedraggable": "2.24.3", "vuex": "3.6.0", + "xlsx": "^0.18.5", "xml-js": "1.6.11" }, "devDependencies": { diff --git a/klp-ui/src/api/l2/pdo.js b/klp-ui/src/api/l2/pdo.js new file mode 100644 index 00000000..f621540d --- /dev/null +++ b/klp-ui/src/api/l2/pdo.js @@ -0,0 +1,52 @@ +import axios from 'axios' + +export default function createFetch(url) { + const l2Request = axios.create({ + baseURL: url, + headers: { + 'Content-Type': 'application/json' + }, + timeout: 10000, + // 自定义响应数据转换,处理大整数ID精度问题 + transformResponse: [data => { + // 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失 + const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"'); + return JSON.parse(modifiedData); + }] + }) + + l2Request.interceptors.response.use(response => { + return response.data + }) + + return { + updatePdo: (data) => l2Request({ + method: 'put', + url: '/api/pdo/update', + data + }), + getPdoList: (params) => l2Request({ + method: 'post', + url: '/api/pdo/list', + data: params + }), + addPdo: (data) => l2Request({ + method: 'post', + url: '/api/pdo/add', + data + }), + getPdo: (excoilid, operid) => l2Request({ + method: 'get', + url: `/api/pdo/get/${excoilid}/${operid}` + }), + deletePdo: (excoilid, planId) => l2Request({ + method: 'delete', + url: `/api/pdo/delete/${excoilid}/${planId}` + }), + getSegmentList: (query) => l2Request({ + method: 'get', + url: '/api/segment/getSegmentHistory', + params: query + }), + } +} \ No newline at end of file diff --git a/klp-ui/src/api/l2/plan.js b/klp-ui/src/api/l2/plan.js new file mode 100644 index 00000000..e1fef910 --- /dev/null +++ b/klp-ui/src/api/l2/plan.js @@ -0,0 +1,191 @@ +import axios from 'axios' + +// 格式化日期字段 +function formatDateFields(data) { + const dateFields = ['timestamp', 'onlineDate', 'startDate', 'endDate', 'furInDate', 'furOutDate', 'createTime', 'updateTime']; + + // 对每个日期字段进行格式化 + dateFields.forEach(field => { + // 处理空值情况 + if (!data[field] || data[field] === '') { + data[field] = null; + return; + } + + // 如果已经是ISO格式的日期字符串,保持不变 + if (typeof data[field] === 'string' && data[field].includes('T')) { + return; + } + + // 如果是日期对象,转换为ISO格式字符串 + if (data[field] instanceof Date) { + data[field] = data[field].toISOString().slice(0, 19); + return; + } + + // 如果是其他格式的日期字符串,转换为ISO格式 + if (typeof data[field] === 'string') { + try { + const date = new Date(data[field]); + if (!isNaN(date.getTime())) { + data[field] = date.toISOString().slice(0, 19); + } else { + data[field] = null; + } + } catch (e) { + console.error(`日期格式化错误 (${field}):`, e); + data[field] = null; + } + } + }); + + return data; +} + +export default function createFetch(url) { + const l2Request = axios.create({ + baseURL: url, + headers: { + 'Content-Type': 'application/json' + }, + timeout: 10000, + // 自定义响应数据转换,处理大整数ID精度问题 + transformResponse: [data => { + // 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失 + const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"'); + return JSON.parse(modifiedData); + }] + }) + + l2Request.interceptors.response.use(response => { + return response.data + }) + + return { + listPlan: (query) => { + // 确保查询参数格式正确 + const params = { + coilid: query.coilid || '', + entryThick: query.entryThick || null, + entryWidth: query.entryWidth || null, + status: query.status || '', + // 使用ISO格式的日期时间,不添加额外的时间部分 + startDate: query.startDate || '', + endDate: query.endDate || '' + }; + + return l2Request({ + url: '/api/pdi/list', + method: 'post', + data: params + }) + }, + getPlan: (coilId) => l2Request({ + url: '/api/pdi/getByCoilId', + method: 'get', + params: { + coilId: coilId + } + }), + addPlan: (data) => { + // 深拷贝数据,避免修改原始对象 + const formattedData = JSON.parse(JSON.stringify(data)); + + // 处理日期字段,确保格式正确 + formatDateFields(formattedData); + + return l2Request({ + url: '/api/pdi/add', + method: 'post', + data: formattedData + }) + }, + updatePlan: (data) => { + // 深拷贝数据,避免修改原始对象 + const formattedData = JSON.parse(JSON.stringify(data)); + // 处理日期字段,确保格式正确 + formatDateFields(formattedData); + return l2Request({ + url: '/api/pdi/update', + method: 'put', + data: formattedData + }) + }, + delPlan: (data) => { + // 确保ids是数组 + const idArray = Array.isArray(ids) ? ids : [ids]; + + // 始终保持ID为字符串类型,避免大整数精度问题 + const processedIds = idArray.map(id => String(id)); + + console.log('删除的ID:', processedIds); + + return l2Request({ + url: '/api/pdi/delete', + method: 'post', + data: processedIds + }) + }, + getSetup: (ID) => { + return l2Request({ + url: '/business/setup/' + ID, + method: 'get', + }) + }, + addSetup: (data) => { + return l2Request({ + url: '/business/setup', + method: 'post', + data: data + }) + }, + listSetup: (query) => { + return l2Request({ + url: '/business/setup/list', + method: 'post', + data: query + }) + }, + getBendforce: (query) => { + return l2Request({ + url: '/business/bendforce', + method: 'get', + params: query + }) + }, + getFur: (steelGrade) => { + return l2Request({ + url: '/business/fur/' + steelGrade, + method: 'get' + }) + }, + getMesh: (query) => { + return l2Request({ + url: '/business/mesh', + method: 'get', + params: query + }) + }, + getRollforce: (query) => { + return l2Request({ + url: '/business/rollforce', + method: 'get', + params: query + }) + }, + getTension: (query) => { + return l2Request({ + url: '/business/tension', + method: 'get', + params: query + }) + }, + getTl: (query) => { + return l2Request({ + url: '/business/tl', + method: 'get', + params: query + }) + } + } +} \ No newline at end of file diff --git a/klp-ui/src/api/l2/report.js b/klp-ui/src/api/l2/report.js new file mode 100644 index 00000000..c425a27a --- /dev/null +++ b/klp-ui/src/api/l2/report.js @@ -0,0 +1,38 @@ +import axios from 'axios' + +export default function createFetch(url) { + const l2Request = axios.create({ + baseURL: url, + headers: { + 'Content-Type': 'application/json' + }, + timeout: 10000, + // 自定义响应数据转换,处理大整数ID精度问题 + transformResponse: [data => { + // 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失 + const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"'); + return JSON.parse(modifiedData); + }] + }) + + l2Request.interceptors.response.use(response => { + return response.data + }) + + return { + getReportSummary: (params) => { + return l2Request({ + method: 'get', + url: '/api/report/summary', + params + }) + }, + getReportDetail: (params) => { + return l2Request({ + method: 'get', + url: '/api/report/details', + params + }) + } + } +} \ No newline at end of file diff --git a/klp-ui/src/api/l2/roller.js b/klp-ui/src/api/l2/roller.js new file mode 100644 index 00000000..c672f2b8 --- /dev/null +++ b/klp-ui/src/api/l2/roller.js @@ -0,0 +1,75 @@ +import axios from 'axios' + +export default function createFetch(url) { + const l2Request = axios.create({ + baseURL: url, + headers: { + 'Content-Type': 'application/json' + }, + timeout: 10000, + // 自定义响应数据转换,处理大整数ID精度问题 + transformResponse: [data => { + // 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失 + const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"'); + return JSON.parse(modifiedData); + }] + }) + + l2Request.interceptors.response.use(response => { + return response.data + }) + + return { + getRollIdList: () => { + return l2Request({ + method: 'get', + url: '/api/roller/history/rollid' + }) + }, + getChangeIdList: () => { + return l2Request({ + method: 'get', + url: '/api/roller/history/changeid' + }) + }, + getRollHistorytList: (params) => { + return l2Request({ + method: 'post', + data: params, + url: '/api/roller/history/list' + }) + }, + backupRoll: (data) => { + return l2Request({ + method: 'post', + data, + url: '/api/roller/change/standby' + }) + }, + onlineRoll: (data) => { + return l2Request({ + method: 'post', + data, + url: '/api/roller/change/online' + }) + }, + getOnlineRollList: () => { + return l2Request({ + method: 'get', + url: '/api/roller/data/online' + }) + }, + getOfflineRollList: (position, type) => { + return l2Request({ + method: 'get', + url: `/api/roller/data/ready/${position}/${type}` + }) + }, + getReadyRollList: () => { + return l2Request({ + method: 'get', + url: '/api/roller/data/standby' + }) + } + } +} \ No newline at end of file diff --git a/klp-ui/src/api/l2/steelGrade.js b/klp-ui/src/api/l2/steelGrade.js new file mode 100644 index 00000000..08169fcf --- /dev/null +++ b/klp-ui/src/api/l2/steelGrade.js @@ -0,0 +1,58 @@ +import axios from 'axios' + +export default function createFetch(url) { + const l2Request = axios.create({ + baseURL: url, + headers: { + 'Content-Type': 'application/json' + }, + timeout: 10000, + // 自定义响应数据转换,处理大整数ID精度问题 + transformResponse: [data => { + // 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失 + const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"'); + return JSON.parse(modifiedData); + }] + }) + + l2Request.interceptors.response.use(response => { + return response.data + }) + + return { + updateSteelGrade: (data) => { + return l2Request({ + method: 'put', + url: '/api/steelGrade/update', + data + }) + }, + addSteelGrade: (data) => { + return l2Request({ + method: 'post', + url: '/api/steelGrade/add', + data + }) + }, + getSteelGradeList: () => { + return l2Request({ + method: 'get', + url: '/api/steelGrade/list' + }) + }, + + getSteelGradeInfo: (gradeid) => { + return l2Request({ + method: 'get', + url: '/api/steelGrade/info', + params: { gradeid } + }) + }, + deleteSteelGrade: (id) => { + return l2Request({ + method: 'delete', + url: `/l2-api/api/steelGrade/delete/${id}` + }) + } + } +} \ No newline at end of file diff --git a/klp-ui/src/api/l2/stop.js b/klp-ui/src/api/l2/stop.js new file mode 100644 index 00000000..43e430cc --- /dev/null +++ b/klp-ui/src/api/l2/stop.js @@ -0,0 +1,43 @@ +import axios from 'axios' + +export default function createFetch(url) { + const l2Request = axios.create({ + baseURL: url, + headers: { + 'Content-Type': 'application/json' + }, + timeout: 10000, + // 自定义响应数据转换,处理大整数ID精度问题 + transformResponse: [data => { + // 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失 + const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"'); + return JSON.parse(modifiedData); + }] + }) + + l2Request.interceptors.response.use(response => { + return response.data + }) + + return { + updateStoppage: (params) => l2Request({ + method: 'put', + data: params, + url: '/api/stoppage/update' + }), + listStoppage: (data) => l2Request({ + method: 'post', + data, + url: '/api/stoppage/list' + }), + deleteStoppage: (stopid) => l2Request({ + method: 'delete', + url: `/api/stoppage/delete/${stopid}` + }), + getStoppageSummary: (data) => l2Request({ + method: 'post', + data, + url: '/api/stoppage/calc' + }) + } +} \ No newline at end of file diff --git a/klp-ui/src/api/l2/track.js b/klp-ui/src/api/l2/track.js index 3e73adf4..856e87dc 100644 --- a/klp-ui/src/api/l2/track.js +++ b/klp-ui/src/api/l2/track.js @@ -6,7 +6,13 @@ export default function createFetch(url) { headers: { 'Content-Type': 'application/json' }, - timeout: 10000 + timeout: 10000, + // 自定义响应数据转换,处理大整数ID精度问题 + transformResponse: [data => { + // 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失 + const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"'); + return JSON.parse(modifiedData); + }] }) l2Request.interceptors.response.use(response => { diff --git a/klp-ui/src/assets/styles/element-ui.scss b/klp-ui/src/assets/styles/element-ui.scss index e5a12d8e..6cb98fdf 100644 --- a/klp-ui/src/assets/styles/element-ui.scss +++ b/klp-ui/src/assets/styles/element-ui.scss @@ -1,5 +1,6 @@ // ====================== 1. 基础颜色变量(Sass直接处理)====================== $primary-base: #5F7BA0; +// $primary-base: #2bf; /* 工业蓝灰(主色原始值) */ $success-base: #2ECC71; /* 成功色原始值 */ @@ -1382,7 +1383,7 @@ body { // ====================== 描述列表组件(el-descriptions)- 深色模式 ====================== .el-descriptions { width: 100%; - background: $--color-background !important; // 黑色背景 + // background: $--color-background !important; // 黑色背景 box-shadow: $--metal-shadow; overflow: hidden; color: $--color-text-primary; // 白色文字 @@ -1391,7 +1392,7 @@ body { &__header { padding: $--spacing-base $--spacing-lg; border-bottom: 1px solid $--border-color-lighter; - background: $--metal-gradient-dark; + // background: $--metal-gradient-dark; color: $--color-text-primary; // 白色标题 font-weight: 600; font-size: 14px; @@ -1400,6 +1401,7 @@ body { // 描述列表主体容器 &__body { width: 100%; + background-color: transparent; } // 描述列表行 @@ -1416,11 +1418,11 @@ body { // 描述列表标签项(左侧) .el-descriptions-item__label { - padding: $--spacing-lg; - background: $--color-background !important; // 极浅灰背景区分标签 + // padding: $--spacing-lg; + // background: $--color-background !important; // 极浅灰背景区分标签 color: $--color-text-secondary; // 浅灰文字 font-weight: 500; - border-right: 1px solid $--border-color-lighter; + // border-right: 1px solid $--border-color-lighter; box-sizing: border-box; white-space: nowrap; font-size: 13px; @@ -1428,8 +1430,8 @@ body { // 描述列表内容项(右侧) &-item__content { - padding: $--spacing-lg; - background: $--color-background-light; + // padding: $--spacing-lg; + // background: $--color-background-light; color: $--color-text-primary; // 白色文字 flex: 1; box-sizing: border-box; @@ -1472,12 +1474,12 @@ body { .el-descriptions__label, .el-descriptions__content { - padding: $--spacing-lg $--spacing-lg * 1.5; + padding: $--spacing-lg $--spacing-lg; font-size: 14px; } .el-descriptions__header { - padding: $--spacing-base $--spacing-lg * 1.5; + padding: $--spacing-base $--spacing-lg; font-size: 15px; } } diff --git a/klp-ui/src/assets/styles/element-variables.scss b/klp-ui/src/assets/styles/element-variables.scss index da51038f..4b530180 100644 --- a/klp-ui/src/assets/styles/element-variables.scss +++ b/klp-ui/src/assets/styles/element-variables.scss @@ -5,6 +5,7 @@ /* theme color */ $--color-primary: #5F7BA0; +// $--color-primary: #2bf; $--color-success: #13ce66; $--color-warning: #ffba00; $--color-danger: #ff4949; diff --git a/klp-ui/src/views/lines/index.vue b/klp-ui/src/views/lines/index.vue new file mode 100644 index 00000000..7df42676 --- /dev/null +++ b/klp-ui/src/views/lines/index.vue @@ -0,0 +1,62 @@ + + + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/analysis/components/body.vue b/klp-ui/src/views/lines/panels/analysis/components/body.vue new file mode 100644 index 00000000..3854fe1a --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/components/body.vue @@ -0,0 +1,112 @@ + + + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/analysis/components/pdo.vue b/klp-ui/src/views/lines/panels/analysis/components/pdo.vue new file mode 100644 index 00000000..23664a1b --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/components/pdo.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/analysis/components/roller.vue b/klp-ui/src/views/lines/panels/analysis/components/roller.vue new file mode 100644 index 00000000..8b403749 --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/components/roller.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/analysis/components/stop.vue b/klp-ui/src/views/lines/panels/analysis/components/stop.vue new file mode 100644 index 00000000..abd6475c --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/components/stop.vue @@ -0,0 +1,49 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/analysis/index.vue b/klp-ui/src/views/lines/panels/analysis/index.vue new file mode 100644 index 00000000..295b0b2b --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/index.vue @@ -0,0 +1,343 @@ + + + + + diff --git a/klp-ui/src/views/lines/panels/analysis/pdo.vue b/klp-ui/src/views/lines/panels/analysis/pdo.vue new file mode 100644 index 00000000..3917d37c --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/pdo.vue @@ -0,0 +1,98 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/analysis/roller.vue b/klp-ui/src/views/lines/panels/analysis/roller.vue new file mode 100644 index 00000000..921bb397 --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/roller.vue @@ -0,0 +1,84 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/analysis/stop.vue b/klp-ui/src/views/lines/panels/analysis/stop.vue new file mode 100644 index 00000000..eea51ce5 --- /dev/null +++ b/klp-ui/src/views/lines/panels/analysis/stop.vue @@ -0,0 +1,89 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/plan/components/setupForm.vue b/klp-ui/src/views/lines/panels/plan/components/setupForm.vue new file mode 100644 index 00000000..2bea4e42 --- /dev/null +++ b/klp-ui/src/views/lines/panels/plan/components/setupForm.vue @@ -0,0 +1,258 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/plan/components/setupPane.vue b/klp-ui/src/views/lines/panels/plan/components/setupPane.vue new file mode 100644 index 00000000..fb241505 --- /dev/null +++ b/klp-ui/src/views/lines/panels/plan/components/setupPane.vue @@ -0,0 +1,118 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/plan/index.vue b/klp-ui/src/views/lines/panels/plan/index.vue new file mode 100644 index 00000000..79ee3be2 --- /dev/null +++ b/klp-ui/src/views/lines/panels/plan/index.vue @@ -0,0 +1,774 @@ + + + + + diff --git a/klp-ui/src/views/lines/panels/quality/components/DataCorrection.vue b/klp-ui/src/views/lines/panels/quality/components/DataCorrection.vue new file mode 100644 index 00000000..d91cddf8 --- /dev/null +++ b/klp-ui/src/views/lines/panels/quality/components/DataCorrection.vue @@ -0,0 +1,310 @@ + + + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/quality/components/LabelPrint.vue b/klp-ui/src/views/lines/panels/quality/components/LabelPrint.vue new file mode 100644 index 00000000..f829b07f --- /dev/null +++ b/klp-ui/src/views/lines/panels/quality/components/LabelPrint.vue @@ -0,0 +1,271 @@ + + + + + diff --git a/klp-ui/src/views/lines/panels/quality/components/PdoSummary.vue b/klp-ui/src/views/lines/panels/quality/components/PdoSummary.vue new file mode 100644 index 00000000..ec9f1f4a --- /dev/null +++ b/klp-ui/src/views/lines/panels/quality/components/PdoSummary.vue @@ -0,0 +1,68 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/quality/components/line.vue b/klp-ui/src/views/lines/panels/quality/components/line.vue new file mode 100644 index 00000000..5f82c16e --- /dev/null +++ b/klp-ui/src/views/lines/panels/quality/components/line.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/klp-ui/src/views/lines/panels/quality/components/print.vue b/klp-ui/src/views/lines/panels/quality/components/print.vue new file mode 100644 index 00000000..e69de29b diff --git a/klp-ui/src/views/lines/panels/quality/index.vue b/klp-ui/src/views/lines/panels/quality/index.vue new file mode 100644 index 00000000..36fb86b1 --- /dev/null +++ b/klp-ui/src/views/lines/panels/quality/index.vue @@ -0,0 +1,282 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/lines/panels/stop/index.vue b/klp-ui/src/views/lines/panels/stop/index.vue new file mode 100644 index 00000000..ef90d919 --- /dev/null +++ b/klp-ui/src/views/lines/panels/stop/index.vue @@ -0,0 +1,351 @@ + + + + + diff --git a/klp-ui/src/views/lines/panels/track/index.vue b/klp-ui/src/views/lines/panels/track/index.vue new file mode 100644 index 00000000..8cf4d5b5 --- /dev/null +++ b/klp-ui/src/views/lines/panels/track/index.vue @@ -0,0 +1,469 @@ + + + + + diff --git a/klp-ui/src/views/lines/panels/track/rects.js b/klp-ui/src/views/lines/panels/track/rects.js new file mode 100644 index 00000000..ecf8b9d5 --- /dev/null +++ b/klp-ui/src/views/lines/panels/track/rects.js @@ -0,0 +1,356 @@ +export const rects = [ + // 左侧:开卷机 + { + id: 'POR1', + config: { + x: 40, + y: 110, + width: 200, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '1#开卷机[POR1]' } + }, + { + id: 'POR2', + config: { + x: 40, + y: 220, + width: 200, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '2#开卷机[POR2]' } + }, + + // 中上部:焊机、入口活套 + { + id: 'WELDER', + config: { + x: 300, + y: 30, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '焊机[WELDER]' } + }, + { + id: 'ENL1', + config: { + x: 300, + y: 110, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '入口活套1[ENL1]' } + }, + { + id: 'ENL2', + config: { + x: 300, + y: 160, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '入口活套2[ENL2]' } + }, + + // 中下部:清洗段 + { + id: 'CLEAN', + config: { + x: 300, + y: 240, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '清洗段[CLEAN]' } + }, + + // 右侧上:退火炉1-4 + { + id: 'FUR1', + config: { + x: 600, + y: 70, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '退火炉[FUR1]' } + }, + { + id: 'FUR2', + config: { + x: 600, + y: 120, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '退火炉[FUR2]' } + }, + { + id: 'FUR3', + config: { + x: 600, + y: 170, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '退火炉[FUR3]' } + }, + { + id: 'FUR4', + config: { + x: 600, + y: 220, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '退火炉[FUR4]' } + }, + + // 右侧中:光整机 + { + id: 'TM', + config: { + x: 600, + y: 400, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '光整机[TM]' } + }, + + // 右侧下:拉矫机 + { + id: 'TL', + config: { + x: 600, + y: 480, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '拉矫机[TL]' } + }, + + // 中下:后处理 + { + id: 'COAT', + config: { + x: 300, + y: 360, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '后处理[COAT]' } + }, + + // 中下:出口活套 + { + id: 'CXL1', + config: { + x: 300, + y: 440, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '出口活套[CXL1]' } + }, + { + id: 'CXL2', + config: { + x: 300, + y: 490, + width: 220, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '出口活套[CXL2]' } + }, + + // 左下:卷取机、称重位 + { + id: 'TR', + config: { + x: 40, + y: 380, + width: 200, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '卷取机[TR]' } + }, + { + id: 'WEIT', + config: { + x: 40, + y: 460, + width: 200, + height: 50, + fill: '#d3d3d3', + stroke: 'black', + strokeWidth: 1, + cursor: 'pointer' + }, + textConfig: { text: '称重位[WEIT]' } + } +] + +export const lines = [ + // 1#开卷机 → 焊机 + { + id: 'line-por1-welder', + config: { + points: [ + 40 + 200, 110 + 25, + 40 + 200 + 30, 110 + 25, + 40 + 200 + 30, 30 + 25, + 300, 30 + 25 + ], + stroke: '#686868', + strokeWidth: 2, + lineCap: 'round', + lineJoin: 'round' + } + }, + // 2#开卷机 → 焊机 + { + id: 'line-por2-welder', + config: { + points: [ + 40 + 200, 220 + 25, + 40 + 200 + 30, 220 + 25, + 40 + 200 + 30, 30 + 25, + 300, 30 + 25 + ], + stroke: '#686868', + strokeWidth: 2, + lineCap: 'round', + lineJoin: 'round' + } + }, + // 清洗段 → 退火炉1 + { + id: 'line-clean-fur1', + config: { + points: [ + 300 + 220, 240 + 25, + 300 + 220 + 40, 240 + 25, + 300 + 220 + 40, 70 + 25, + 600, 70 + 25 + ], + stroke: '#686868', + strokeWidth: 2, + lineCap: 'round', + lineJoin: 'round' + } + }, + // 退火炉4 → 光整机 + { + id: 'line-fur4-tm', + config: { + points: [ + 600 + 220, 220 + 25, + 600 + 220 + 40, 220 + 25, + 600 + 220 + 40, 400 + 25, + 600 + 220, 400 + 25 + ], + stroke: '#686868', + strokeWidth: 2, + lineCap: 'round', + lineJoin: 'round' + } + }, + // 拉矫机 → 后处理 + { + id: 'line-tl-coat', + config: { + points: [ + 600, 480 + 25, + 600 - 40, 480 + 25, + 600 - 40, 360 + 25, + 600 - 80, 360 + 25 + ], + stroke: '#686868', + strokeWidth: 2, + lineCap: 'round', + lineJoin: 'round' + } + }, + // 出口活套2 → 卷取机 + { + id: 'line-cxl2-tr', + config: { + points: [ + 300, 490 + 25, + 300 - 30, 490 + 25, + 300 - 30, 380 + 25, + 300 - 60, 380 + 25 + ], + stroke: '#686868', + strokeWidth: 2, + lineCap: 'round', + lineJoin: 'round' + } + } +] \ No newline at end of file diff --git a/klp-ui/src/views/lines/zine.vue b/klp-ui/src/views/lines/zine.vue index 3eb3109b..ca8b9ced 100644 --- a/klp-ui/src/views/lines/zine.vue +++ b/klp-ui/src/views/lines/zine.vue @@ -202,7 +202,7 @@ import createFetch from '@/api/l2/track' import { getConfigKey } from '@/api/system/config' import KnovaStage from './components/knovaStage.vue' -import { rects, lines } from './rects' +import { rects, lines } from './panels/track/rects' export default { components: {