| | |
| | | // serverUrl2: "10.153.19.150:88" |
| | | // serverUrl2: "192.168.2.100:88" |
| | | serverUrl2: "127.0.0.1:88" |
| | | |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | <script setup> |
| | | import {onMounted} from 'vue' |
| | | import DevicePixelRatio from '@/utils/evicePixelRatio.js'; |
| | | |
| | | // 定义一个函数来调整 body 的缩放比例 |
| | | // function bodyScale() { |
| | | // const deviceheight = document.documentElement.clientHeight; |
| | | // const scale = deviceheight / 740; |
| | | // document.body.style.zoom = scale; |
| | | // } |
| | | |
| | | // 在组件挂载时执行 |
| | | // onMounted(() => { |
| | | // new DevicePixelRatio().init(); |
| | |
| | | quit:"退出", |
| | | }, |
| | | basicData:{ |
| | | printing:'自动打印', |
| | | laserprinting:'打标机就绪状态:', |
| | | cuttingmachine:'切割机就绪状态:', |
| | | machine:'上片机联机状态:', |
| | |
| | | cancel:'取消', |
| | | }, |
| | | order:{ |
| | | projectnumber:'请输入工程号', |
| | | dilapidation:'破损', |
| | | takeaway:'人工拿走', |
| | | takeon:'摆片完成', |
| | | }, |
| | | searchOrder:{ |
| | | deleteTask:'删除工程', |
| | | pdeleteTask:'是否删除工程?', |
| | | processcard:'指定流程卡', |
| | | filminformation:'人工下片信息', |
| | | currentglassinformation:'扫码枪当前玻璃信息', |
| | | printlabels:'打印标签', |
| | | deleteTask:'删除工程', |
| | | pdeleteTask:'是否删除工程?', |
| | | searchlayout:'非钢化流程卡查询', |
| | | fullfurnaces:'满炉数量', |
| | | specifiedproject:'当前指定工程', |
| | |
| | | finegrinding: '精磨', |
| | | }, |
| | | hellow: { |
| | | line: '线路', |
| | | line1: '线路一', |
| | | line2: '线路二', |
| | | line3: '线路三', |
| | | createtask: '创建任务', |
| | | starttask: '开始任务', |
| | | pstarttask: '是否开始任务?', |
| | |
| | | import deepClone from '@/utils/deepClone' |
| | | import { useRouter } from 'vue-router'; |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const store = userInfo() |
| | | const isCollapse = ref(false); |
| | | // const { $i18n } = useI18n(); // 获取 i18n 实例 |
| | | const router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | // const user = userStore.user.userName |
| | | |
| | | let userInfoStr = window.localStorage.getItem('userInfo') |
| | | console.log(userInfoStr); |
| | | // const userInfoStr = localStorage.getItem('userInfo'); |
| | |
| | | } |
| | | function replaceChineseWithRussian(menuData) { |
| | | // 定义中英文对照关系对象 |
| | | const translation = { |
| | | const translation = { |
| | | '上片机': 'Loading Machine', |
| | | '上片': 'Start showing a movie', |
| | | '掰片/识别': 'Breaking /Identification', |
| | |
| | | } |
| | | //提取菜单模块列表 |
| | | let menuList = $ref([]) |
| | | |
| | | request.get('/loadGlass/sys/menu/getMenuTree').then((res) => { |
| | | if (res.code == 200) { |
| | | menuList = res.data |
| | |
| | | }) |
| | | const menu = ref(null) |
| | | let indexKey = ref(null) |
| | | |
| | | function handleOpen(key) { |
| | | indexKey.value = key |
| | | } |
| | |
| | | }, |
| | | {deep: true} |
| | | ) |
| | | |
| | | router.beforeEach((to, from) => { |
| | | //return false |
| | | }) |
| | | |
| | | let openFlag = $ref(null) |
| | | //原始菜单打开 |
| | | const openMenu = (menuID) => { |
| | |
| | | isCollapse.value = !isCollapse.value; |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="all"> |
| | | <el-container> |
| | |
| | | </el-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | .el-menu-vertical-demo:not(.el-menu--collapse) { |
| | | width: 200px; |
| | | min-height: 400px; |
| | | text-align: left; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | #all { |
| | | background-color: #eee; |
| | | height: 100%; |
| | | } |
| | | |
| | | .el-container { |
| | | height: 100vh; |
| | | width: 99vw; |
| | | } |
| | | |
| | | * { |
| | | padding: 0; |
| | | margin: 0; |
| | | } |
| | | |
| | | :deep(.sys-quit) { |
| | | float: right; |
| | | margin-right: 1rem; |
| | | width: 5rem; |
| | | } |
| | | |
| | | /* 横线 */ |
| | | #line { |
| | | float: right; |
| | |
| | | position: relative; |
| | | text-align: center; |
| | | } |
| | | |
| | | :deep(span) { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | .el-collapse { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | #main { |
| | | width: 99%; |
| | | float: right; |
| | |
| | | background-color: #fff; |
| | | } |
| | | /*------------*/ |
| | | |
| | | /* .menu div div{ |
| | | |
| | | width: 138px; |
| | | height: 35px; |
| | | line-height: 35px; |
| | |
| | | /* background-color:#5CADFE; */ |
| | | /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */ |
| | | /* } */ |
| | | |
| | | .menu { |
| | | width: 138px; |
| | | height: 33px; |
| | | line-height: 25px; |
| | | |
| | | color: #000000; |
| | | font-size: 16px; |
| | | padding-left: 15px; |
| | | padding-right: 2px; |
| | | } |
| | | |
| | | ul { |
| | | height: auto; |
| | | margin: 1px auto; |
| | | text-align: center; |
| | | } |
| | | |
| | | ul li { |
| | | height: 28px; |
| | | width: 180px; |
| | |
| | | text-align: left; |
| | | /* border-radius:8px; */ |
| | | /* outline: none; */ |
| | | |
| | | /* background: #5CADFE; */ |
| | | /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */ |
| | | } |
| | | |
| | | ul li:hover { |
| | | /* background:#5CADFE ; */ |
| | | color: #ffffff; |
| | | } |
| | | |
| | | ul li a { |
| | | text-decoration: none; |
| | | color: #000000; |
| | |
| | | ul li a:hover { |
| | | color: #1087ff; |
| | | } |
| | | |
| | | .item_divider { |
| | | width: 118px; |
| | | height: 0px; |
| | |
| | | opacity: 0.8; */ |
| | | margin-bottom: 2px; |
| | | } |
| | | |
| | | .item a { |
| | | width: 138px; |
| | | height: 35px; |
| | |
| | | font-size: 14px; |
| | | text-decoration: none; |
| | | } |
| | | |
| | | .menu_title { |
| | | width: 180px; |
| | | /* white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; */ |
| | | |
| | | height: 45px; |
| | | line-height: 55px; |
| | | /* background: #fafafa; */ |
| | |
| | | font-weight: bold; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .menu_title:hover { |
| | | /* background: #dedede; */ |
| | | color: #3b9af9; |
| | | } |
| | | |
| | | .indicator { |
| | | display: block; |
| | | width: 40px; |
| | |
| | | transition: all 0.3s ease; |
| | | text-align: center; |
| | | } |
| | | |
| | | /* 动画效果 */ |
| | | .enter-x-left { |
| | | z-index: 9; |
| | |
| | | transform: translateX(-50px); |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .enter-x-left:nth-child(1) { |
| | | animation-delay: 0.1s; |
| | | } |
| | | |
| | | .enter-x-left:nth-child(2) { |
| | | animation-delay: 0.2s; |
| | | } |
| | | |
| | | .enter-x-left:nth-child(3) { |
| | | animation-delay: 0.3s; |
| | | } |
| | | |
| | | .enter-x-left:nth-child(4) { |
| | | animation-delay: 0.4s; |
| | | } |
| | |
| | | // app.config.globalProperties.$echarts = echarts |
| | | import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
| | | import 'babel-polyfill' |
| | | |
| | | const app = createApp(App) |
| | | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
| | | app.component(key, component) |
| | |
| | | locale: zhCn, |
| | | }) |
| | | app.use(i18n) |
| | | app.mount('#app') |
| | | app.mount('#app') |
| | |
| | | name: 'main', |
| | | component: () => import('../layout/MainErpView.vue'), |
| | | children:[ |
| | | |
| | | |
| | | { |
| | | path: 'Temperedlayout', |
| | | name: 'Temperedlayout', |
| | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | /*----------- 用户列表 ----------------*/ |
| | | // { |
| | | // path: 'User', |
| | | // name: 'User', |
| | | // component: () => import('../views/User/userlist.vue'), |
| | | // children:[ |
| | | // { |
| | | // path: '/User/userlist', |
| | | // name: 'userlist', |
| | | // component: () => import('../views/User/userlist.vue') |
| | | // }, |
| | | // ] |
| | | // }, |
| | | |
| | | /*----------- 权限列表 ----------------*/ |
| | | // { |
| | | // path: 'Permissions', |
| | | // name: 'Permissions', |
| | | // component: () => import('../views/Permissions/permissionslist.vue'), |
| | | // children:[ |
| | | // { |
| | | // path: '/Permissions/permissionslist', |
| | | // name: 'permissionslist', |
| | | // component: () => import('../views/Permissions/permissionslist.vue') |
| | | // }, |
| | | // ] |
| | | // }, |
| | | /*----------- 上片机 ----------------*/ |
| | | { |
| | | path: 'Returns', |
| | |
| | | name: 'register', |
| | | component: () => import('../views/RegisterView.vue') |
| | | } |
| | | |
| | | ] |
| | | }) |
| | | |
| | | // 导航守卫 |
| | | router.beforeEach((to, from, next) => { |
| | | const isAuthenticated = !!localStorage.getItem('authToken'); // 假设这是你的登录状态检查逻辑 |
| | |
| | | export const WebSocketHost = "192.168.2.100"; |
| | | // export const WebSocketHost = "192.168.2.100"; |
| | | // export const WebSocketHost = "192.168.0.39"; |
| | | // export const WebSocketHost = "10.153.19.150"; |
| | | // export const WebSocketHost = "127.0.0.1"; |
| | | export const WebSocketHost = "127.0.0.1"; |
| | | export const host = "88"; |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | import {onBeforeUnmount, onMounted, onUnmounted, ref} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | |
| | | import request from "@/utils/request" |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | import {useI18n} from 'vue-i18n' |
| | | |
| | | const router = useRouter() |
| | | const adda = ref(false) |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const tableData = ref([]) |
| | |
| | | const adjustedRects = ref([]); |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.post('/cacheGlass/edgStorageCage/selectEdgStorageCage'); // 替换为你的API端点 |
| | | const response = await request.post('/cacheGlass/edgStorageCage/selectEdgStorageCage'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | const rawRects = response.data; |
| | | tableData.value = response.data |
| | | console.log(response.data); |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | width: rect.width * 0.5 , |
| | | id: rect.id * 10, |
| | | })); |
| | | console.log(adjustedRects.value); |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | width: rect.width * 0.5 , |
| | | id: rect.id * 10, |
| | | })); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | }); |
| | | const toggleEnableState = async (row) => { |
| | | const newState = row.enable_state === 1 ? 0 : 1; |
| | | // 发送请求到后端更新状态(这里省略了实际的请求逻辑) |
| | | const response = await request.post('/cacheGlass/edgStorageCage/updateEdgStorageCage', { id: row.id, enableState: newState }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id; |
| | | console.log(row); |
| | | const response = await request.post(url, { |
| | | glassId:row.glass_id |
| | | }) |
| | |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.EdgStorageCageinfos[0] |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0] |
| | | adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | width: rect.width * 0.5 , |
| | | id: rect.id * 10, |
| | | })); |
| | | |
| | | ...rect, |
| | | width: rect.width * 0.5 , |
| | | id: rect.id * 10, |
| | | })); |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | |
| | | > |
| | | {{ scope.row.enable_state === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | <!-- <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.enable_state==1?"启用":"未启用" }}</el-tag> |
| | | </template> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('sorter.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <!-- <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">报缺</el-button> --> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('sorter.deficiencieste') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | width: 1500px; |
| | | max-width: 100%; |
| | | } |
| | | |
| | | </style> |
| | |
| | | {{ scope.row.enable_state === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | <!-- <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.enable_state==1?"启用":"未启用" }}</el-tag> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('sorter.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | |
| | | import { reactive } from "vue"; |
| | | import { useRouter } from "vue-router" |
| | | const router = useRouter() |
| | | const adda = ref(false) |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted, onBeforeUnmount, onUnmounted } from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | // import i18n from '@/i18n'; |
| | | const tableData = reactive([]); |
| | | const slot = ref('') |
| | | const adjustedRects = ref([]); |
| | | |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.get('/unLoadGlass/downStorage/selectStorageCage'); // 替换为你的API端点 |
| | | const response = await request.get('/unLoadGlass/downStorage/selectStorageCage'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | const rawRects = response.data; |
| | | tableData.value = response.data |
| | | console.log(response.data); |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | ...rect, |
| | | width: rect.width * 0.5, |
| | | id: rect.id * 10, |
| | | })); |
| | |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | var url = "/unLoadGlass/downStorage/deleteDownStorageCage"; |
| | | console.log(url); |
| | | const response = await request.post(url, { |
| | |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | ElMessage.error(response.message); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | ElMessage.error(response.message); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // const open = async(row) => { |
| | | // const { t } = useI18n(); |
| | | // try { |
| | | // const confirmMessage = t('sorter.prompt'); // 使用 $t 翻译文本 |
| | | // const confirmResult = await ElMessageBox.confirm( |
| | | // confirmMessage, |
| | | // t('sorter.information'), |
| | | // { |
| | | // confirmButtonText: t('sorter.yes'), |
| | | // cancelButtonText: t('sorter.cancel'), |
| | | // type: 'warning', |
| | | // } |
| | | // ); |
| | | // if (confirmResult === 'confirm') { |
| | | // // 用户点击了“是”,现在调用删除接口 |
| | | // var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id; |
| | | // console.log(url); |
| | | // const response = await request.post(url, { |
| | | // esdId: row.esdId |
| | | // }) |
| | | // if (response.code === 200) { |
| | | // ElMessage.success(response.message); |
| | | // } else { |
| | | // // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | // ElMessage.error(response.msg); |
| | | // // alert('删除失败:' + deleteResponse.message); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | |
| | | // catch (error) { |
| | | // // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | // console.error('发生错误:', error); |
| | | // } |
| | | // }; |
| | | const toggleEnableState = async (row) => { |
| | | const newState = row.enable_state === 1 ? 0 : 1; |
| | | // 发送请求到后端更新状态(这里省略了实际的请求逻辑) |
| | | const response = await request.post('/unLoadGlass/downStorage/updateDownStorageCage', { id: row.id, enableState: newState }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | } |
| | | row.enable_state = newState; |
| | | }; |
| | | |
| | | |
| | | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/downcache`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.splice(0, tableData.length, ...data.params2[0]); |
| | | // tableData.value = data.params[0] |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0] |
| | | adjustedRects.value = data.params2[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | ...rect, |
| | | width: rect.width * 0.5, |
| | | id: rect.id * 10, |
| | | })); |
| | | |
| | | }; |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | |
| | | line-height: 20px; |
| | | margin-left: 100px; |
| | | } |
| | | |
| | | #dta { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 80%; |
| | | } |
| | | |
| | | #dialog-footer { |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | |
| | | #message { |
| | | text-align: center; |
| | | align-items: center; |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | |
| | | .awatch { |
| | | height: 460px; |
| | | width: 1500px; |
| | |
| | | |
| | | import request from "@/utils/request" |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | import {useI18n} from 'vue-i18n' |
| | | |
| | | const router = useRouter() |
| | | const adda = ref(false) |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const tableData = ref([]) |
| | |
| | | const adjustedRects = ref([]); |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.post('/cacheGlass/edgStorageCage/selectEdgStorageCage'); // 替换为你的API端点 |
| | | const response = await request.post('/cacheGlass/edgStorageCage/selectEdgStorageCage'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | const rawRects = response.data; |
| | | tableData.value = response.data |
| | | console.log(response.data); |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | ...rect, |
| | | width: rect.width * 0.5, |
| | | id: rect.id * 10, |
| | | })); |
| | |
| | | }); |
| | | const toggleEnableState = async (row) => { |
| | | const newState = row.enable_state === 1 ? 0 : 1; |
| | | // 发送请求到后端更新状态(这里省略了实际的请求逻辑) |
| | | const response = await request.post('/cacheGlass/edgStorageCage/updateEdgStorageCage', { |
| | | id: row.id, |
| | | enableState: newState |
| | |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.EdgStorageCageinfos[0] |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0] |
| | | adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | ...rect, |
| | | width: rect.width * 0.5, |
| | | id: rect.id * 10, |
| | | })); |
| | | |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="340" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="slot" align="center" :label="$t('sorter.gridnumber')" min-width="80"/> |
| | | <el-table-column prop="glass_id" align="center" :label="$t('sorter.glassnumber')" min-width="80"/> |
| | | <el-table-column prop="width" align="center" :label="$t('sorter.width')" min-width="120"/> |
| | |
| | | {{ scope.row.enable_state === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | <!-- <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.enable_state==1?"启用":"未启用" }}</el-tag> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('sorter.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <!-- <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">报缺</el-button> --> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ |
| | | $t('sorter.deficiencieste') |
| | | }} |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 100px; |
| | | } |
| | | |
| | | #dta { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 80%; |
| | | } |
| | | |
| | | #dialog-footer { |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | |
| | | #message { |
| | | text-align: center; |
| | | align-items: center; |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | |
| | | .awatch { |
| | | height: 460px; |
| | | width: 1500px; |
| | | max-width: 100%; |
| | | } |
| | | |
| | | </style> |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | |
| | | <el-select v-model="formData2.dzw" placeholder="请选择吊装位">
|
| | | <el-option label="吊装位1" value="吊装位1"></el-option>
|
| | | <el-option label="吊装位2" value="吊装位2"></el-option>
|
| | | <!-- 根据实际情况添加更多选项 -->
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | </div>
|
| | |
| | | </el-tag>
|
| | | </template>
|
| | | </el-table-column>
|
| | |
|
| | | <!-- 操作列 -->
|
| | | <el-table-column label="操作" width="250">
|
| | | <template #default="{ row }">
|
| | |
| | | </el-tag>
|
| | | </template>
|
| | | </el-table-column>
|
| | |
|
| | | <!-- 操作列 -->
|
| | | <el-table-column label="操作" width="350">
|
| | | <template #default="{ row }">
|
| | |
| | | </el-table-column>
|
| | | </el-table>
|
| | | </el-card>
|
| | |
|
| | | <div class="img-ypcc">
|
| | | <div
|
| | | class="img-car1"
|
| | |
| | | ></div>
|
| | | </div>
|
| | | </div>
|
| | |
|
| | | <!-- 入库对话框 -->
|
| | | <el-dialog
|
| | | title="入库"
|
| | |
| | | const handleCurrentChange = (val) => {
|
| | | currentPage.value = val;
|
| | | };
|
| | |
|
| | | const formatTaskType = (row, column) => {
|
| | | if (row.taskType === "从仓位到吊装位") {
|
| | | return `从仓位${row.shelfRack}到吊装位${row.loadRack}`;
|
| | |
| | | return `从吊装位${row.loadRack}到仓位${row.shelfRack}`;
|
| | | }
|
| | | };
|
| | |
|
| | | const getTagType2 = (status) => {
|
| | | switch (status) {
|
| | | case "completed":
|
| | |
| | | return "";
|
| | | }
|
| | | };
|
| | |
|
| | | const getTagType = (status) => {
|
| | | return status === 1 ? "success" : "danger";
|
| | | // 根据状态值决定标签类型,这里假设状态为1时为成功(绿色),否则为失败(红色)
|
| | | };
|
| | |
|
| | | const toggleStatus = (row) => {
|
| | | // 切换料架状态的逻辑
|
| | | row.enableState = 1 - row.enableState; // Toggle between 0 and 1
|
| | |
| | | // 定义消息处理函数,更新 receivedData 变量
|
| | | const handleMessage = (data) => {
|
| | | // 更新 tableData 的数据
|
| | |
|
| | | tableData.value = data.rack[0]; // 假设 tableData 是响应式对象或变量
|
| | |
|
| | | tableData.value.forEach((item) => {
|
| | | // 获取 createTime 的时间戳
|
| | | const createTimeTimestamp = item.createTime;
|
| | |
|
| | | // 创建日期对象
|
| | | const date = new Date(createTimeTimestamp);
|
| | |
|
| | | // 格式化日期时间为本地格式
|
| | | const formattedDateTime = date.toLocaleString();
|
| | |
|
| | | // 替换原来的 createTime 字段为格式化后的日期时间字符串
|
| | | item.createTime = formattedDateTime;
|
| | | });
|
| | |
|
| | | tasktableData.value = data.tasks[0]; // 假设 tasktableData 是响应式对象或变量
|
| | |
|
| | | tasktableData.value.forEach((item) => {
|
| | | // 获取 createTime 的时间戳
|
| | | const createTimeTimestamp = item.startTime;
|
| | |
|
| | | // 创建日期对象
|
| | | const date = new Date(createTimeTimestamp);
|
| | |
|
| | | // 格式化日期时间为本地格式
|
| | | const formattedDateTime = date.toLocaleString();
|
| | |
|
| | | // 替换原来的 createTime 字段为格式化后的日期时间字符串
|
| | | item.startTime = formattedDateTime;
|
| | | });
|
| | |
| | | console.log("关闭了");
|
| | | closeWebSocket();
|
| | | });
|
| | |
|
| | | const tasktableData = ref([]);
|
| | |
|
| | | const dialogVisible = ref(false);
|
| | | const formData = ref({
|
| | | number: "",
|
| | |
| | | pieces: "",
|
| | | loadRack: 1,
|
| | | });
|
| | |
|
| | | const formData2 = ref({
|
| | | dzw: "",
|
| | | });
|
| | |
|
| | | const handleDelete = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm("确定要执行删除操作吗?", "确认删除", {
|
| | |
| | | })
|
| | | .then(() => {
|
| | | // 点击确认按钮的回调,执行出库操作
|
| | |
|
| | | const intNumber = {
|
| | | id: parseInt(row.number),
|
| | | };
|
| | | deleteRawUsage(intNumber);
|
| | |
|
| | | console.log("执行删除操作");
|
| | | })
|
| | | .catch(() => {
|
| | |
| | | console.log("取消删除操作");
|
| | | });
|
| | | };
|
| | |
|
| | | const handleCheckout = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm("确定要执行出库操作吗?", "确认出库", {
|
| | |
| | | console.log("取消出库操作");
|
| | | });
|
| | | };
|
| | |
|
| | | const handleInbound = () => {
|
| | | // 打开入库对话框
|
| | | dialogVisible.value = true;
|
| | | };
|
| | |
|
| | | const storage = () => {
|
| | | // 打开入库对话框
|
| | | Hidden.value = true;
|
| | | };
|
| | |
|
| | | const handleCloseDialog = () => {
|
| | | // 关闭对话框时重置表单数据
|
| | | formData.value = {
|
| | |
| | | };
|
| | | dialogVisible.value = false;
|
| | | };
|
| | |
|
| | | const handleConfirmInbound = () => {
|
| | | inStorage(formData.value);
|
| | | // 处理确认入库逻辑,可以在这里提交表单或者执行其他操作
|
| | |
| | | // 关闭对话框
|
| | | dialogVisible.value = false;
|
| | | };
|
| | |
|
| | | const dialogVisible3 = ref(false);
|
| | | const colors = ref([
|
| | | { "0_glass_id": "Red" },
|
| | |
| | | { "0_glass_id": "Blue" },
|
| | | // Add more colors as needed
|
| | | ]);
|
| | |
|
| | | const formData3 = ref({
|
| | | selectedColor: "",
|
| | | wid: "",
|
| | |
| | | thinkness: "",
|
| | | num: "",
|
| | | });
|
| | |
|
| | | const addglass = () => {
|
| | | // 打开入库对话框
|
| | | dialogVisible3.value = true;
|
| | |
| | | const handleCommand = (command) => {
|
| | | formData.value.selectedColor = command;
|
| | | };
|
| | |
|
| | | const clearInput = (field) => {
|
| | | formData.value[field] = "";
|
| | | };
|
| | |
|
| | | const submitForm = () => {
|
| | | console.log("提交数据:", formData.value);
|
| | | dialogVisible3.value = false;
|
| | | // Add your submit logic here
|
| | | };
|
| | |
|
| | | const editdialogVisible = ref(false);
|
| | | const editForm = ref({
|
| | | id: "",
|
| | |
| | | });
|
| | | const editFormRef = ref(null);
|
| | | let currentRow = ref(null);
|
| | |
|
| | | // 处理行点击事件
|
| | | const edithandleRowClick = (row) => {
|
| | | currentRow.value = row;
|
| | |
| | | editdialogVisible.value = true;
|
| | | console.log(editForm.value);
|
| | | };
|
| | |
|
| | | // 添加保存编辑内容
|
| | | const editsaveEdit = () => {
|
| | | if (!currentRow.value) return;
|
| | |
|
| | | // 更新当前行数据
|
| | | currentRow.value.pieces = editForm.value.pieces;
|
| | | currentRow.value.batchId = editForm.value.batchId;
|
| | |
| | | currentRow.value.rawThickness = editForm.value.rawThickness;
|
| | | // 调用更新函数,并处理其返回的 Promise
|
| | | updateRawUsage(editForm.value);
|
| | |
|
| | | // 关闭对话框
|
| | | editdialogVisible.value = false;
|
| | | };
|
| | |
|
| | | // 对话框关闭时重置编辑表单和当前行数据
|
| | | const edithandleDialogClose = () => {
|
| | | editForm.value.pieces = "";
|
| | |
| | | editForm.value.rawWidth = "";
|
| | | editForm.value.rawHeight = "";
|
| | | editForm.value.rawThickness = "";
|
| | |
|
| | | currentRow.value = null;
|
| | | };
|
| | |
|
| | | const handleRestart = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm("确定要执行重新开始操作吗?", "确认重新开始", {
|
| | |
| | | Type:"重新开始"
|
| | | }
|
| | | taskUpdate(taskdata);
|
| | | |
| | |
|
| | | console.log("执行重新开始操作", row);
|
| | | })
|
| | | .catch(() => {
|
| | |
| | | console.log("取消重新开始操作");
|
| | | });
|
| | | };
|
| | |
|
| | | const handleDeletetask = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm("确定要执行删除任务操作吗?", "确认删除任务", {
|
| | |
| | | console.log("取消删除任务操作");
|
| | | });
|
| | | };
|
| | |
|
| | | const handleComplete = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm("确定要执行任务完成操作吗?", "确认任务完成", {
|
| | |
| | | type: "warning",
|
| | | })
|
| | | .then(() => {
|
| | |
|
| | | const taskdata={
|
| | | id:row.id,
|
| | | Type:"完成"
|
| | |
| | | });
|
| | | };
|
| | | </script>
|
| | |
|
| | | <style scoped>
|
| | | #dt {
|
| | | display: block;
|
| | |
| | | text-align: center;
|
| | | margin-top: -15px;
|
| | | }
|
| | |
|
| | | .img-ypcc {
|
| | | margin-left: 80px;
|
| | | background-image: url("../../assets/ypcc.png");
|
| | |
| | | position: relative;
|
| | | margin-top: 0px;
|
| | | }
|
| | |
|
| | | .img-car1 {
|
| | | background-image: url("../../assets/ypccche.png");
|
| | | position: absolute;
|
| | |
| | | overflow: hidden;
|
| | | position: relative;
|
| | | }
|
| | |
|
| | | .custom-dialog {
|
| | | max-height: 90vh; /* 最大高度为视口高度的90% */
|
| | | overflow-y: auto; /* 对话框内部出现垂直滚动条 */
|
| | | }
|
| | | </style>
|
| | | </style> |
| | |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | |
| | | const router = useRouter() |
| | | const tableDataa = ref([]) |
| | | const tableDatab = ref([]) |
| | |
| | | const Edit = ref(false) |
| | | const timeRange = ref(["2022-01-01 00:00:00", "2025-01-01 00:00:00"]) |
| | | const selectValuesa = reactive([]); |
| | | const patternWidth = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternThickness = ref(''); |
| | | const filmsId = ref(''); |
| | | const remainQuantity = ref(''); |
| | | const slot = ref(''); |
| | | const leftingStation = ref(''); |
| | | const patternWidth = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternThickness = ref(''); |
| | | const filmsId = ref(''); |
| | | const remainQuantity = ref(''); |
| | | const slot = ref(''); |
| | | const leftingStation = ref(''); |
| | | const loadingline = ref(''); |
| | | let webSocket: WebSocket | null = null; |
| | | let webSocket: WebSocket | null = null; |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | |
| | | } |
| | | }); |
| | | onMounted(() => { |
| | | // closeWebSocket(); |
| | | // debugger // 断点 |
| | | // console.log("--------------webSocket") |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | let socket = null; |
| | |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | |
| | | var url="/glassStorage/rawGlassStorageDetails/deleteWarehousing?slotId="+row.slotId; |
| | | const response = await request.post(url) |
| | | // const response = await request.post("/glassStorage/rawGlassStorageDetails/deleteWarehousing",[row.slotId]) |
| | |
| | | return t('film.finish');//完成 |
| | | } |
| | | } |
| | | // onUnmounted(() => { |
| | | // if (socket) { |
| | | // closeWebSocket(socket); |
| | | // } |
| | | // }); |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | | }); |
| | |
| | | }} |
| | | </el-button> |
| | | <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="datetimerange" |
| | | format="YYYY/MM/DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | :start-placeholder="$t('film.starttime')" |
| | | :end-placeholder="$t('film.endtime')" |
| | | format="YYYY/MM/DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | :start-placeholder="$t('film.starttime')" |
| | | :end-placeholder="$t('film.endtime')" |
| | | :default-time="defaultTime" /> |
| | | <el-select v-model="selectValuesa[0]" clearable :placeholder="$t('film.taskstatus')" style="margin-left: 10px;" > |
| | | <el-option :label="$t('film.built')" value="1"></el-option> |
| | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | .awatch{ |
| | |
| | | // createWebSocket(global_callback); |
| | | // } |
| | | // </script> |
| | | |
| | | |
| | | <template> |
| | | <div class="mainDiv"> |
| | | <button @click="createSocket">创建</button> |
| | |
| | | <script setup> |
| | | let indexFlag = $ref(1) |
| | | |
| | | function changeRouter(index) { |
| | | indexFlag = index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view/> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #div-title { |
| | | height: 2%; |
| | | width: 100%; |
| | | } |
| | | |
| | | #searchButton { |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body { |
| | | width: 100%; |
| | | height: 95%; |
| | | /* margin-top: 1%; */ |
| | | } |
| | | |
| | | #select { |
| | | margin-left: 0.5rem; |
| | | } |
| | | |
| | | :deep(.indexTag .el-breadcrumb__inner) { |
| | | color: #5CADFE !important; |
| | | } |
| | |
| | | import request from "@/utils/request" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {useI18n} from 'vue-i18n' |
| | | |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const blind = ref(false) |
| | |
| | | const currentGlassRect = computed(() => { |
| | | return adjustedRects.value.find(rect => rect.glass_id === currentGlassId.value); |
| | | }); |
| | | |
| | | function showDialog(glassId: number) { |
| | | currentGlassId.value = glassId; |
| | | blind.value = true; |
| | |
| | | rect.glass_id === glassId ? {...rect, isActive: true} : rect |
| | | ); |
| | | } |
| | | |
| | | const handleDialogClose = () => { |
| | | adjustedRects.value = adjustedRects.value.map(rect => ({ |
| | | ...rect, |
| | |
| | | } else { |
| | | } |
| | | }; |
| | | |
| | | const handleCurrentChange = (val: number) => { |
| | | currentPage.value = val; |
| | | // window.localStorage.setItem('pagenumber', currentPage.value). |
| | |
| | | glass_state: rect.glass_state |
| | | })); |
| | | }; |
| | | |
| | | function getRectColor(state: number): string { |
| | | switch (state) { |
| | | case 0: |
| | |
| | | return '#f3d19e'; |
| | | } |
| | | } |
| | | |
| | | // 更新矩形状态 |
| | | function updateRectStatus(glassId: string, status: number) { |
| | | adjustedRects.value.forEach(rect => { |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const connectWebSocket = () => { |
| | | if (!webSocket) { |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | |
| | | if (data.currentCutTerritory && data.currentCutTerritory.length > 0) { |
| | | const newRects = data.currentCutTerritory[0].map(rect => { |
| | | const existingRect = adjustedRects.value.find(r => r.glass_id === rect.glass_id); |
| | | |
| | | if (existingRect) { |
| | | return { |
| | | ...existingRect, |
| | |
| | | connectWebSocket(); |
| | | } |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | if (webSocket) { |
| | | webSocket.close(); |
| | | } |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | /* background-color: lightblue; 设置矩形的背景色 */ |
| | | } |
| | | |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | /* display: flex; */ |
| | |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | font-size: small; |
| | | } |
| | | |
| | | #rect { |
| | | position: relative; /* 确保箭头可以相对于矩形定位 */ |
| | | /* 其他样式 */ |
| | | } |
| | | |
| | | #arrow { |
| | | position: absolute; |
| | | top: 70%; /* 箭头位于矩形中间 */ |
| | |
| | | border-right: 20px solid #911005; /* 右边框,形成箭头 */ |
| | | /* 根据需要调整边框大小和颜色 */ |
| | | } |
| | | |
| | | #line { |
| | | position: absolute; |
| | | top: 70%; /* 直线位于矩形中间 */ |
| | |
| | | width: 240px; /* 直线的长度,根据需要调整 */ |
| | | background-color: #911005; /* 直线的颜色 */ |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div style="height: 500px;"> |
| | | <div style="display: flex;"> |
| | | <el-input v-model="inputValue" style="margin-left: 15px;margin-top: 10px;width: 240px" placeholder="请输入工程号" |
| | | @blur="handleBlur"/> |
| | | <el-input v-model="inputValue" style="margin-left: 15px;margin-top: 10px;width: 240px" :placeholder="$t('order.projectnumber')" @blur="handleBlur"/> |
| | | <el-pagination |
| | | v-model:current-page="currentPage" |
| | | :page-size="pageSize" |
| | |
| | | layout="prev, pager, next, jumper" |
| | | :total="totalPages" |
| | | @current-change="handleCurrentChange" |
| | | style="margin-top: 10px;" |
| | | /> |
| | | </div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading"> |
| | |
| | | import request from "@/utils/request" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {useI18n} from 'vue-i18n' |
| | | |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const blind = ref(false) |
| | |
| | | const disabled = false; |
| | | const size = 'small'; |
| | | const rawData = ref([]); |
| | | // const handleBind = (row) => { |
| | | // blind.value = true; // 打开绑定架子对话框 |
| | | // }; |
| | | // 显示对话框并设置当前 glass_id |
| | | const currentGlassRect = computed(() => { |
| | | return adjustedRects.value.find(rect => rect.glass_id === currentGlassId.value); |
| | |
| | | currentGlassId.value = glassId; |
| | | blind.value = true; |
| | | adjustedRects.value = adjustedRects.value.map(rect => |
| | | rect.glass_id === glassId ? { ...rect, isActive: true } : rect |
| | | rect.glass_id === glassId ? { ...rect, isActive: true } : rect |
| | | ); |
| | | } |
| | | const handleDialogClose = () => { |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | blind.value = false; |
| | | updateRectStatus(currentGlassId.value, 8); |
| | | findEngineering() |
| | |
| | | // 人工拿走 |
| | | const handleManualTake = async () => { |
| | | try { |
| | | // var url="/cacheGlass/taskCache/identControls?identId="+currentGlassId.value+'&controlsId='+200; |
| | | // console.log(url); |
| | | // const response = await request.post(url) |
| | | const response = await request.post('/cacheGlass/taskCache/identControls', { |
| | | glassId: currentGlassId.value, |
| | | state: 9, |
| | |
| | | workingProcedure: '切割', |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | blind.value = false; |
| | | updateRectStatus(currentGlassId.value, 9); |
| | | findEngineering() |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | heighta: rect.height , |
| | | height: rect.height * scaleFactory, |
| | | glass_state: rect.glass_state |
| | | })); |
| | | // 如果WebSocket已连接,则关闭 |
| | | })); |
| | | if (webSocket) { |
| | | webSocket.close(); |
| | | webSocket = null; |
| | |
| | | } |
| | | } else{ |
| | | } |
| | | }; |
| | | |
| | | }; |
| | | const handleCurrentChange = (val: number) => { |
| | | currentPage.value = val; |
| | | // window.localStorage.setItem('pagenumber', currentPage.value). |
| | | const page = currentPage.value - 1 |
| | | const scaleFactor = 1621.78/6000; |
| | | const scaleFactory = 750/3300; |
| | | adjustedRects.value = rawData.value[page]?.map(rect => ({ |
| | | // adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | x_axis: (6000 -(rect.x_axis + rect.width)) * scaleFactor, |
| | | y_axis: rect.y_axis * scaleFactory, |
| | |
| | | if (!inputValue.value) { |
| | | connectWebSocket(); |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | onUnmounted(() => { |
| | | if (webSocket) { |
| | | webSocket.close(); |
| | | } |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | /* background-color: lightblue; 设置矩形的背景色 */ |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | /* display: flex; */ |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | height: 100%; |
| | | font-size: small; |
| | | } |
| | | #rect { |
| | | position: relative; /* 确保箭头可以相对于矩形定位 */ |
| | | /* 其他样式 */ |
| | | } |
| | | |
| | | #arrow { |
| | |
| | | border-top: 10px solid transparent; /* 上边框 */ |
| | | border-bottom: 10px solid transparent; /* 下边框 */ |
| | | border-right: 20px solid #911005; /* 右边框,形成箭头 */ |
| | | /* 根据需要调整边框大小和颜色 */ |
| | | } |
| | | |
| | | #line { |
| | |
| | | height: 2px; /* 直线的高度 */ |
| | | width: 240px; /* 直线的长度,根据需要调整 */ |
| | | background-color: #911005; /* 直线的颜色 */ |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | userName: '', |
| | | password: '', |
| | | }) |
| | | |
| | | if (typeof route.query.id != 'undefined') { |
| | | userForm.userId = <string>route.query.id |
| | | } |
| | | |
| | | const validateUser = (rule: any, value: any, callback: any) => { |
| | | if (value === '') { |
| | | callback(new Error(t('login.userErr'))) |
| | |
| | | callback() |
| | | } |
| | | } |
| | | |
| | | const validatePass = (rule: any, value: any, callback: any) => { |
| | | if (value === '') { |
| | | callback(new Error(t('login.pwErr'))) |
| | |
| | | callback() |
| | | } |
| | | } |
| | | |
| | | const rules = reactive<FormRules<typeof userForm>>({ |
| | | userId: [{validator: validateUser, trigger: 'blur'}], |
| | | pass: [{validator: validatePass, trigger: 'blur'}], |
| | | }) |
| | | |
| | | //登陆方法 |
| | | const submitForm = (formEl: FormInstance | undefined) => { |
| | | store.$patch({ |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function register() { |
| | | router.push({ |
| | | path: '/register', |
| | | }) |
| | | } |
| | | |
| | | let loginLoadings = ref(false) |
| | | let registerLoadings = ref(false) |
| | | |
| | | const keyDown = (e) => { |
| | | // 回车则执行登录方法 enter键的ASCII是13 |
| | | if (e.keyCode == 13 || e.keyCode == 100) { |
| | |
| | | window.removeEventListener('keydown', keyDown) |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="mainDiv"> |
| | | <div id="main-login"> |
| | |
| | | @click="register" |
| | | plain>{{ $t('login.register') }} |
| | | </el-button> --> |
| | | |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .mainDiv { |
| | | overflow: hidden; |
| | | min-width: 718px; |
| | | background-image: url('../../src/assets/background.jpg'); |
| | | } |
| | | |
| | | #main-login { |
| | | margin: 150px auto 0 auto; |
| | | height: 70vh; |
| | | width: 80vw; |
| | | } |
| | | |
| | | #img-div { |
| | | width: 55%; |
| | | height: 100%; |
| | |
| | | align-items: center; |
| | | float: left; |
| | | } |
| | | |
| | | #img-pic { |
| | | max-height: 90%; |
| | | max-width: 100%; |
| | | } |
| | | |
| | | #div-login { |
| | | margin-top: 5%; |
| | | /* margin-top: 20%; */ |
| | |
| | | border-radius: 4px; |
| | | box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0), 0 6px 5px 0 rgba(0, 0, 0, 0.19); |
| | | } |
| | | |
| | | #center { |
| | | margin-top: -30px; |
| | | } |
| | | |
| | | .el-form { |
| | | width: 60%; |
| | | margin: 20% auto auto; |
| | | } |
| | | |
| | | #submitForm { |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | margin-top: 2rem; |
| | | } |
| | | |
| | | :deep(.el-form-item__content) { |
| | | flex: unset; |
| | | } |
| | |
| | | if (response.code === 200) { |
| | | rawData.value = response.data; |
| | | processData(rawData.value); |
| | | } else { |
| | | // ElMessage.warning(res.msg) |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } catch (error) { |
| | | } |
| | | }); |
| | | watch( |
| | |
| | | function getAdjustedRectsForRow(rowIndex) { |
| | | return adjustedRectsPerRow.value[rowIndex] || []; |
| | | } |
| | | </script> |
| | | |
| | | |
| | | </script> |
| | | <style scoped> |
| | | .row { |
| | | display: flex; |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {useRouter} from 'vue-router' |
| | | |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const dialogFormVisible = ref(false) |
| | |
| | | ElMessage.warning(response.message) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | const selectReportData = async () => { |
| | |
| | | type: 9, |
| | | workingProcedure: '钢化', |
| | | ...(engineerId.value !== '' && { engineerId: engineerId.value }), |
| | | }; |
| | | console.log(engineerId.value); |
| | | |
| | | }; |
| | | const response = await request.post("/loadGlass/damage/selectDamagePrintDetails", postData) |
| | | if (response.code === 200) { |
| | | dialogVisible.value = true; |
| | |
| | | } |
| | | }; |
| | | const printTable = () => { |
| | | // 这里可以添加一些CSS样式来优化打印效果 |
| | | // 例如,可以添加一个隐藏的打印样式表 |
| | | window.print(); |
| | | }; |
| | | // 方法定义 |
| | | function handlePageChange(page: number) { |
| | | currentPage.value = page; |
| | | console.log(page); |
| | | |
| | | } |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; |
| | | const handleMessage = (data) => { |
| | |
| | | if (newRect) { |
| | | return { ...oldRect, ...newRect, isActive: oldRect.isActive }; |
| | | } |
| | | return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样 |
| | | return oldRect; |
| | | }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId))); |
| | | } |
| | | // if (data.outGlass && data.outGlass.length > 0) { |
| | |
| | | blind1.value = false; |
| | | updateRectColors1(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | blind2.value = false; |
| | | updateRectColors2(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | blinda.value = false; |
| | | updateRectColorsa(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | blinda.value = false; |
| | | updateoutColorsa(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | blinda.value = false; |
| | | updateonColorsa(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | blind1.value = false; |
| | | updateoutColorsc(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 进炉zhong人工拿走 |
| | | // 进炉中人工拿走 |
| | | const takeoutd = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', { |
| | |
| | | blind2.value = false; |
| | | updateoutColorsd(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | blindb.value = false; |
| | | updateRectColorsb(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | // console.error(error); |
| | | } |
| | | } |
| | | // 已出炉人工拿走 |
| | |
| | | blindb.value = false; |
| | | updateoutColorsb(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | // console.error(error); |
| | | } |
| | | } |
| | | // 已出炉放回 |
| | |
| | | blindb.value = false; |
| | | updateonColorsb(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | // console.error(error); |
| | | } |
| | | } |
| | | onBeforeUnmount(() => { |
| | |
| | | <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('processCard.inquire') }}</el-button> |
| | | <el-button type="info" style="margin-left: 10px;" @click="printing()">{{ $t('processCard.printing') }}</el-button> |
| | | </div> |
| | | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table |
| | | height="600" |
| | | ref="table" |
| | |
| | | <el-table-column prop="layer" :label="$t('processCard.layer')" align="center" width="52"/> |
| | | <el-table-column prop="engineerId" :label="$t('processCard.project')" align="center" width="110"/> |
| | | <el-table-column prop="temperingLayoutId" :label="$t('processCard.temperinglayout')" align="center" width="52"/> |
| | | <el-table-column prop="temperingFeedSequence" :label="$t('processCard.temperingfeed')" align="center" |
| | | width="52"/> |
| | | <el-table-column prop="temperingFeedSequence" :label="$t('processCard.temperingfeed')" align="center" width="52"/> |
| | | <el-table-column prop="width" :label="$t('processCard.width')" align="center" width="80"/> |
| | | <el-table-column prop="height" :label="$t('processCard.height')" align="center" width="80"/> |
| | | <el-table-column prop="thickness" :label="$t('processCard.thickness')" align="center" width="52"/> |
| | |
| | | /* display:flex; */ |
| | | text-align: center; |
| | | display: inline-block; |
| | | align-items:center; |
| | | justify-content:center; |
| | | align-items:center; |
| | | justify-content:center; |
| | | margin-left: 20px; |
| | | } |
| | | #box{ |
| | | border: 1px solid black; |
| | | background-color: #337ecc; |
| | | display:flex; |
| | | align-items:center; |
| | | justify-content:center; |
| | | align-items:center; |
| | | justify-content:center; |
| | | } |
| | | #home-card { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | padding: 10px 0px; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | padding: 10px 0px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | #home-item { |
| | | border-style: solid; |
| | | border-width: 1px; |
| | | border-color: #E4E4E4; |
| | | width: calc(34% - 20px); |
| | | padding: 20px 0px 20px 20px; |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | #home-item { |
| | | border-style: solid; |
| | | border-width: 1px; |
| | | border-color: #E4E4E4; |
| | | width: calc(34% - 20px); |
| | | padding: 20px 0px 20px 20px; |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | /* align-items: center; */ |
| | | background: #fff; |
| | | #home-img { |
| | | display: inline-block; |
| | | width: 160px; |
| | | height: 60px; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | justify-content: center; |
| | | /* align-items: center; */ |
| | | background: #fff; |
| | | #home-img { |
| | | display: inline-block; |
| | | width: 160px; |
| | | height: 60px; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | #home-right { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | import request from "@/utils/request" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | |
| | | const adjustedRects = ref([]); |
| | | const currentGlassId = ref(null); |
| | | const currenttemperingFeedSequence = ref(null); |
| | |
| | | const dialogFormVisible = ref(true) |
| | | const dialogFormVisiblea = ref(false) |
| | | const blind = ref(false) |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | |
| | | if (data.overGlass && data.overGlass.length > 0) { |
| | | // 提取新的矩形ID |
| | | const newGlassIds = new Set(data.overGlass[0].map(rect => rect.glassId)); |
| | | |
| | | // 过滤出已存在的矩形 |
| | | const existingRects = adjustedRects.value.filter(rect => newGlassIds.has(rect.glassId)); |
| | | |
| | | // 计算新的矩形 |
| | | const newRects = data.overGlass[0].map(rect => { |
| | | const scaleFactor = 1390/5190; |
| | |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | // 合并新旧矩形,并保留 isActive 状态 |
| | | adjustedRects.value = existingRects.map(oldRect => { |
| | | const newRect = newRects.find(r => r.glassId === oldRect.glassId); |
| | |
| | | } else if (currentRect.value.state !== 8) { |
| | | canSelectProject.value = true; |
| | | } |
| | | } |
| | | |
| | | } |
| | | const handleDialogClose = () => { |
| | | adjustedRects.value.forEach(rect => { |
| | | rect.isActive = false; |
| | |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', { |
| | | glassId: currentGlassId.value, |
| | | // temperingFeedSequence: currenttemperingFeedSequence.value, |
| | | line: 4001, |
| | | status: 8, |
| | | workingProcedure: '钢化', |
| | |
| | | blind.value = false; |
| | | updateRectColors(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="height: 500px;"> |
| | | <div style="margin-top: 10px;"> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" |
| | | v-loading="loading"> |
| | | <!-- <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> --> |
| | | <div v-if="adjustedRects.length > 0"> |
| | | <div style="text-align: center;">炉号:{{ adjustedRects[0].engineerId }}-{{ |
| | | adjustedRects[0].temperingLayoutId |
| | | }} |
| | | </div> |
| | | <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | @click="showDialog(rect)" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.isActive ? '#ADFF2F' : getRectColora(rect.state) |
| | | }"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" |
| | | v-loading="loading"> |
| | | <div v-if="adjustedRects.length > 0"> |
| | | <div style="text-align: center;">炉号:{{ adjustedRects[0].engineerId }}-{{ |
| | | adjustedRects[0].temperingLayoutId |
| | | }} |
| | | </div> |
| | | <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | @click="showDialog(rect)" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.isActive ? '#ADFF2F' : getRectColora(rect.state) |
| | | }"> |
| | | <div class="centered-text"> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose"> |
| | | <el-button :disabled="!canSelectProject" type="warning" plain :icon="Delete" @click="handleDamage" |
| | | style="width: 140px;margin-left: 10px;"> |
| | | {{ $t('order.dilapidation') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose"> |
| | | <el-button :disabled="!canSelectProject" type="warning" plain :icon="Delete" @click="handleDamage" style="width: 140px;margin-left: 10px;"> |
| | | {{ $t('order.dilapidation') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #boxa{ |
| | | border: 1px solid rgb(119, 116, 116); |
| | |
| | | } |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | background-color: lightblue; /* 设置矩形的背景色 */ |
| | | background-color: lightblue; |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | /* display: flex; */ |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; |
| | | font-size: small; |
| | | } |
| | | </style> |
| | |
| | | import type { FormProps,FormInstance, FormRules } from 'element-plus' |
| | | import {ElMessage,ElMessageBox} from "element-plus"; |
| | | import request from "@/utils/request"; |
| | | import { Lock,Avatar } from '@element-plus/icons-vue' |
| | | import { Lock,Avatar } from '@element-plus/icons-vue' |
| | | // import {Avatar, UserFilled} from "@element-plus/icons-vue"; |
| | | |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let loginLoadings= ref(false) |
| | | const labelPosition = ref<FormProps['labelPosition']>('right') |
| | | |
| | | //注册用户参数 |
| | | const register = reactive({ |
| | | userName: '', |
| | |
| | | passWord: '', |
| | | confirmPassword:'' |
| | | }) |
| | | |
| | | /*方法*/ |
| | | const checkName = (rule: any, value: any, callback: any) => { |
| | | if (value.trim() === '') { |
| | |
| | | callback() |
| | | } |
| | | } |
| | | |
| | | const checkPassword = (rule: any, value: any, callback: any) => { |
| | | if (value.trim() === '') { |
| | | callback(new Error(t('login.passnull'))) |
| | |
| | | callback() |
| | | } |
| | | } |
| | | |
| | | const checkConfirmPassword = (rule: any, value: any, callback: any) => { |
| | | if (value.trim() === '') { |
| | | callback(new Error(t('login.spwn'))) |
| | |
| | | callback() |
| | | } |
| | | } |
| | | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const rules = reactive<FormRules<typeof register>>({ |
| | | userName: [{ validator: checkName, trigger: 'blur' }], |
| | |
| | | confirmPassword:[{ validator: checkConfirmPassword, trigger: 'blur' }], |
| | | // loginName: [{ validator: validateString, trigger: 'blur' }] |
| | | }) |
| | | |
| | | const submitForm = (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | | formEl.validate((valid) => { |
| | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | ElMessage.success(t('register.registerSuccessful')) |
| | | loginLoadings.value=false |
| | | } else { |
| | |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | <div class="mainDiv" > |
| | | <div id="main-login"> |
| | | <div> |
| | |
| | | plain |
| | | >{{ $t('register.false') }} |
| | | </el-button> |
| | | |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #div-login{ |
| | | margin-top: 5%; |
| | |
| | | min-width: 318px; |
| | | box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); |
| | | } |
| | | |
| | | #center{ |
| | | margin-top: 45px; |
| | | margin-left: 100px; |
| | |
| | | overflow: hidden; |
| | | min-width: 718px; |
| | | background-image: url("../../src/assets/background.jpg"); |
| | | |
| | | } |
| | | #main-login{ |
| | | margin: 150px auto 0 auto; |
| | |
| | | </div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="540" ref="table" :data="reportData" |
| | | <el-table height="730" ref="table" :data="reportData" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="teamsGroupsName" align="center" :label="$t('reportmanage.reporteam')" min-width="120" /> |
| | | <el-table-column prop="deviceName" align="center" :label="$t('reportmanage.reportingequipment')" min-width="120" /> |
| | |
| | | <el-table-column prop="breakageType" align="center" :label="$t('reportmanage.typebreakage')" min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-select |
| | | v-model="selectValuesa[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.pcausebreakage')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsa" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | v-model="selectValuesa[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.pcausebreakage')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsa" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="breakageReason" align="center" :label="$t('reportmanage.causebreakage')" min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-select |
| | | v-model="selectValuesb[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.ptypebreakage')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsb" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | v-model="selectValuesb[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.ptypebreakage')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsb" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" :label="$t('reportmanage.responsibleprocess')" min-width="120"> |
| | | <template #default="{ row }"> |
| | |
| | | <el-table-column prop="responsibleTeam" align="center" :label="$t('reportmanage.responsibleteam')" min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-select |
| | | v-model="selectValuesc[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.presponsibleteam')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsc" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | v-model="selectValuesc[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.presponsibleteam')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsc" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="responsibleEquipment" align="center" :label="$t('reportmanage.responsibleequipment')" min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-select |
| | | v-model="selectValuesd[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.presponsibleequipment')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsd" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | v-model="selectValuesd[row.id]" |
| | | filterable |
| | | :placeholder="$t('reportmanage.presponsibleequipment')" |
| | | clearable |
| | | @input="handleInputChangea($event, row.id)" |
| | | > |
| | | <el-option |
| | | v-for="item in selectOptionsd" |
| | | :key="item.basicName" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" :label="$t('reportmanage.remark')" min-width="180"> |
| | | <template #default="{ row }"> |
| | |
| | | const selectValuesd = reactive({}); |
| | | const inputValuesa = reactive({}); |
| | | const inputValuesb = reactive({}); |
| | | |
| | | |
| | | // 查询数据 |
| | | const selectReportData = async () => { |
| | | const response = await request.post("/cacheVerticalGlass/damage/selectDamage", { |
| | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | |
| | | // const responses = await request.post("/cacheVerticalGlass/damage/insertDamage", { |
| | | // glassId:"P24081502|1|1", |
| | | // line:"1001", |
| | | // workingProcedure:"切割", |
| | | // remark:"", |
| | | // status:"0" |
| | | // }) |
| | | }; |
| | | // 报工 |
| | | const handleConfirm = async () => { |
| | |
| | | }; |
| | | fetchTableData(); |
| | | let socket = null; |
| | | // const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | // const handleMessage = (data) => { |
| | | // adjustedRects.value = data.device[0].map(rect => ({ |
| | | // ...rect, |
| | | // completed: rect.completedQuantity, |
| | | // breakage: rect.breakageQuantity, |
| | | // thisProcess: rect.thisProcess, |
| | | // })); |
| | | // }; |
| | | // let socket; |
| | | onMounted(() => { |
| | | // socket = new WebSocket(socketUrl); |
| | | // socket.onmessage = (event) => { |
| | | // const data = JSON.parse(event.data); |
| | | |
| | | // // updateCharts(); |
| | | // }; |
| | | // }; |
| | | }); |
| | | onUnmounted(() => { |
| | | socket.close(); |
| | | }); |
| | | onMounted(() => { |
| | | fetchTableData(); |
| | | // socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | |
| | | if(data.InkageStatus!=null){ |
| | | const status = data.InkageStatus[0]; |
| | | cuttingMachine.value = status; |
| | | upstatus.value = status === '1' ? t('basicData.machine') : t('basicData.machineaa'); |
| | | upstatus.value = status === '1' ? t('basicData.machine') : t('basicData.machineaa'); |
| | | cuttingMachineStatusColor.value = status === '1' ? 'green' : '#911005'; |
| | | inKageWord.value = status === '1' ? 0 : 1; |
| | | } |
| | |
| | | } else { |
| | | options.value = []; |
| | | } |
| | | }; |
| | | // 处理用户输入变化的方法 |
| | | }; |
| | | const handleInputChangea = async (value: string) => { |
| | | if (value) { |
| | | await fetchOptionsa(value); |
| | | } else { |
| | | options.value = []; // 清空选项列表 |
| | | options.value = []; |
| | | } |
| | | }; |
| | | onBeforeUnmount(() => { |
| | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | } catch (error) { |
| | | } |
| | | } |
| | | else if( ida.value === 1 || ida.value === 3){ |
| | |
| | | number.value = ''; |
| | | list() |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | } catch (error) { |
| | | } |
| | | } |
| | | else { |
| | |
| | | case 1: |
| | | return t('basicData.up'); |
| | | case 2: |
| | | return t('basicData.up'); |
| | | return t('basicData.up'); |
| | | case 100: |
| | | return t('basicData.finish'); |
| | | return t('basicData.finish'); |
| | | } |
| | | } |
| | | function getStatusType(state: number) { |
| | |
| | | workstationId.value = row.workstationId; |
| | | adda.value = true; |
| | | }; |
| | | // 定义一个响应式引用,用于存储颜色状态 |
| | | const markingMachineStatus = ref('#911005'); |
| | | const cuttingMachineStatus = ref('#911005'); |
| | | // 定义一个方法来改变颜色状态 |
| | |
| | | cuttingMachineStatus.value = 'green'; |
| | | }; |
| | | const toggleEnableState = async (row: any) => { |
| | | // 检查 id 是否为空 |
| | | if (!row.id) { |
| | | ElMessage.error(t('basicData.updatanull')); |
| | | return; // 如果 id 为空,则不执行后续操作 |
| | | return; |
| | | } |
| | | const newState = row.state === 100 ? 0 : 100; |
| | | try { |
| | | // 发送请求到后端更新状态 |
| | | try { |
| | | const response = await request.post('/loadGlass/up-patten-usage/updateGlassState', { id: row.id, state: newState }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | ElMessage.error(t('basicData.glassnull')); |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="thickness" :label="$t('basicData.thickness')" align="center"/> |
| | | <!-- <el-table-column |
| | | align="center" |
| | | label="状态" |
| | | min-width="80" |
| | | prop="state" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType(scope.row.state)"> |
| | | {{ getStatusText(scope.row.state) }} |
| | | </el-tag> |
| | | </template> --> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('basicData.startstatus')" |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- <el-dialog v-model="blindb" top="30vh" width="25%" title="是否停止任务?" > |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleb"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="blindb = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> --> |
| | | <div id="parent"> |
| | | <img src="../../assets/shangpian.png" alt="" style="max-width: 40%;max-height: 40%;margin-top: 20px;margin-left: 340px;"> |
| | | <div id="overlay" v-show="flake"></div> |
| | |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-input v-model="patternThickness" autocomplete="off" /> --> |
| | | </el-select> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | const dialoglea = ref(false) |
| | | const tableDatax = ref([]) |
| | | const upstatus = ref(t('basicData.machineaa')); |
| | | const cuttingMachineStatusColor = ref('#911005'); // 用于动态设置i标签的背景色 |
| | | const cuttingMachineStatusColor = ref('#911005'); |
| | | const tableDataa = ref<any[]>([]); |
| | | const tableDatab = ref<any[]>([]); |
| | | const tableData = ref([]) |
| | | // const tableData = reactive([]); |
| | | const titleSelectJson = ref({ |
| | | engineerId: [], |
| | | }) |
| | |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/uploadGlass`; |
| | | const handleMessage = (data: any) => { |
| | | tableDataa.value = data.list[0].slice(0, 2); |
| | | // tableDatab.value = data.list[0].slice(2, 4); |
| | | }; |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | |
| | | const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', { |
| | | stationCell: 5, |
| | | engineerId: selectedProjectNo.value, |
| | | // filmRemove: filmRemove.value, |
| | | filmRemove: parseInt(filmRemove.value, 10), |
| | | }) |
| | | window.localStorage.setItem('engineeringId', selectedProjectNo.value) |
| | |
| | | let engineeringId = window.localStorage.getItem('engineeringId') |
| | | if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') { |
| | | try { |
| | | // const response = await request.post('/loadGlass/engineering/engineering/pause', { |
| | | const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | stationCell: 5, |
| | | filmRemove: filmRemove, |
| | |
| | | console.error(error); |
| | | } |
| | | } else if (markingMachineStatus.value === '#911005' || cuttingMachineStatus.value === '#911005') { |
| | | // 提示用户打标机未就绪 |
| | | ElMessage.warning(t('basicData.pausea')); |
| | | } |
| | | } |
| | |
| | | } |
| | | const response = await request.post("/loadGlass/up-patten-usage/setUpPattenRequest", { |
| | | state: selectValuesa[0], |
| | | // state: stateList, |
| | | stationCell: 5 |
| | | }) |
| | | if (response.code === 200) { |
| | |
| | | blinda.value = true; |
| | | }; |
| | | const toggleEnableState = async (row: any) => { |
| | | // 检查 id 是否为空 |
| | | if (!row.id) { |
| | | ElMessage.error(t('basicData.updatanull')); |
| | | return; // 如果 id 为空,则不执行后续操作 |
| | | return; |
| | | } |
| | | const newState = row.state === 100 ? 0 : 100; |
| | | try { |
| | |
| | | ElMessage.error(t('basicData.glassnull')); |
| | | } |
| | | }; |
| | | |
| | | function getStatusType2(filmRemove) { |
| | | switch (filmRemove) { |
| | | case 0: |
| | |
| | | return 'warning'; |
| | | } |
| | | } |
| | | |
| | | function getStatusText2(filmRemove) { |
| | | switch (filmRemove) { |
| | | case 0: |
| | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table |
| | | height="350" |
| | | height="400" |
| | | ref="table" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | :data="tableData" |
| | |
| | | <el-table-column prop="filmsId" :label="$t('Mounting.loadinglinea')" align="center"/> |
| | | <el-table-column :label="$t('Mounting.projectnumber')" align="center"> |
| | | <template #default="{ row }"> |
| | | <!-- 这里总是显示 1 --> |
| | | <span>{{ 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> --> |
| | | <!-- <el-table-column |
| | | align="center" |
| | | :label="$t('Mounting.removalmethodp')" |
| | | prop="filmRemove" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType2(scope.row.filmRemove)"> |
| | | {{ getStatusText2(scope.row.filmRemove) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> --> |
| | | <!-- <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/> --> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | |
| | | <img src="../../assets/shangpianji.png" alt="" |
| | | style="max-width: 20%;max-height: 25%;margin-left: 10%;margin-top: 5%;"> |
| | | <el-table :data="tableDataa" border style="width: 75%;margin-top: 10%;margin-left: 8%;" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" > |
| | | <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60"/> |
| | | <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80"/> |
| | | <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80"/> |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <!-- <div style="width: 48%;float: right;"> |
| | | <div style="display: flex;"> |
| | | <img src="../../assets/shangpianji.png" alt="" style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;"> |
| | | <el-table :data="tableDatab" border style="width: 75%;margin-top: 10%;margin-left: 2%;" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60" /> |
| | | <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80" /> |
| | | <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80" /> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80" /> |
| | | <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80" /> |
| | | </el-table> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <el-dialog v-model="blind" top="30vh" width="25%" :title="$t('basicData.startfilm')"> |
| | | <template #footer> |
| | |
| | | <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/> |
| | | <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')"/> |
| | | <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')"> |
| | | <!-- <template #default="{ row }"> |
| | | <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')"> |
| | | <!-- <template #default="{ row }"> |
| | | <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/> |
| | | </template> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | |
| | | <el-dialog v-model="blinda" top="24vh" width="30%" :title="$t('basicData.whetherpause')"> |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item :label="$t('Mounting.loadingline')" :required="true"> |
| | | <el-select disabled v-model="stationCell" clearable :placeholder="$t('Mounting.inloadingline')" |
| | | style="margin-left: 20px;"> |
| | | <el-select disabled v-model="stationCell" clearable :placeholder="$t('Mounting.inloadingline')" style="margin-left: 20px;"> |
| | | <el-option :label="$t('Mounting.all')" value="0"></el-option> |
| | | <el-option :label="$t('Mounting.oneloadingline')" value="1"></el-option> |
| | | <el-option :label="$t('Mounting.twoloadingline')" value="2"></el-option> |
| | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .flex-container { |
| | | display: flex; |
| | | align-items: center; /* 垂直居中 */ |
| | | align-items: center; |
| | | } |
| | | .flex-container .el-form-item { |
| | | flex: 1; /* 使每个表单项占据相等的空间 */ |
| | | flex: 1; |
| | | margin-right: 0; /* 移除默认的右侧边距 */ |
| | | } |
| | | .flex-container .el-form-item:last-child { |
| | | margin-left: 20px; /* 为第二个表单项添加左侧边距 */ |
| | | } |
| | | |
| | | |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | const dialoglea = ref(false) |
| | | const tableDatax = ref([]) |
| | | const upstatus = ref(t('basicData.machineaa')); |
| | | const cuttingMachineStatusColor = ref('#911005'); // 用于动态设置i标签的背景色 |
| | | const cuttingMachineStatusColor = ref('#911005'); |
| | | const tableDataa = ref<any[]>([]); |
| | | const tableDatab = ref<any[]>([]); |
| | | const tableData = ref([]) |
| | | // const tableData = reactive([]); |
| | | const titleSelectJson = ref({ |
| | | engineerId: [], |
| | | }) |
| | |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/uploadGlass`; |
| | | const handleMessage = (data: any) => { |
| | | // tableDataa.value = data.list[0].slice(0, 2); |
| | | tableDataa.value = data.list[0].slice(2, 4); |
| | | }; |
| | | onBeforeUnmount(() => { |
| | |
| | | const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', { |
| | | stationCell: 6, |
| | | engineerId: selectedProjectNo.value, |
| | | // filmRemove: filmRemove.value, |
| | | filmRemove: parseInt(filmRemove.value, 10), |
| | | }) |
| | | window.localStorage.setItem('engineeringId', selectedProjectNo.value) |
| | |
| | | if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') { |
| | | try { |
| | | const response = await request.post('/loadGlass/engineering/engineering/pause', { |
| | | // const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | // stationCell: 6, |
| | | // filmRemove: filmRemove, |
| | | engineerId: engineeringId, |
| | | state: 1, |
| | | }) |
| | |
| | | console.error(error); |
| | | } |
| | | } else if (markingMachineStatus.value === '#911005' || cuttingMachineStatus.value === '#911005') { |
| | | // 提示用户打标机未就绪 |
| | | ElMessage.warning(t('basicData.pausea')); |
| | | } |
| | | } |
| | |
| | | console.log(engineeringId); |
| | | if (engineeringId !== '') { |
| | | const response = await request.post('/loadGlass/engineering/engineering/pause', { |
| | | // stationCell: 6, |
| | | engineerId: engineeringId, |
| | | state: 0, |
| | | }) |
| | |
| | | } |
| | | const response = await request.post("/loadGlass/up-patten-usage/setUpPattenRequest", { |
| | | state: selectValuesa[0], |
| | | // state: stateList, |
| | | stationCell: 6 |
| | | }) |
| | | if (response.code === 200) { |
| | |
| | | blinda.value = true; |
| | | }; |
| | | const toggleEnableState = async (row: any) => { |
| | | // 检查 id 是否为空 |
| | | if (!row.id) { |
| | | ElMessage.error(t('basicData.updatanull')); |
| | | return; // 如果 id 为空,则不执行后续操作 |
| | | return; |
| | | } |
| | | const newState = row.state === 100 ? 0 : 100; |
| | | try { |
| | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table |
| | | height="350" |
| | | height="400" |
| | | ref="table" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | :data="tableData" |
| | |
| | | <el-table-column prop="filmsId" :label="$t('Mounting.loadinglinea')" align="center"/> |
| | | <el-table-column :label="$t('Mounting.projectnumber')" align="center"> |
| | | <template #default="{ row }"> |
| | | <!-- 这里总是显示 1 --> |
| | | <span>{{ 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="filmsId" :label="$t('Mounting.createtime')" align="center"/> |
| | | <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> --> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('Mounting.removalmethodp')" |
| | |
| | | <img src="../../assets/shangpianji.png" alt="" |
| | | style="max-width: 20%;max-height: 25%;margin-left: 10%;margin-top: 5%;"> |
| | | <el-table :data="tableDataa" border style="width: 75%;margin-top: 10%;margin-left: 8%;" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60"/> |
| | | <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80"/> |
| | | <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80"/> |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <!-- <div style="width: 48%;float: right;"> |
| | | <div style="display: flex;"> |
| | | <img src="../../assets/shangpianji.png" alt="" style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;"> |
| | | <el-table :data="tableDatab" border style="width: 75%;margin-top: 10%;margin-left: 2%;" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60" /> |
| | | <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80" /> |
| | | <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80" /> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80" /> |
| | | <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80" /> |
| | | </el-table> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <el-dialog v-model="blind" top="30vh" width="25%" :title="$t('basicData.startfilm')"> |
| | | <template #footer> |
| | |
| | | <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/> |
| | | <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')"/> |
| | | <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')"> |
| | | <!-- <template #default="{ row }"> |
| | | <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')"> |
| | | <!-- <template #default="{ row }"> |
| | | <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/> |
| | | </template> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .flex-container { |
| | | display: flex; |
| | |
| | | .flex-container .el-form-item:last-child { |
| | | margin-left: 20px; /* 为第二个表单项添加左侧边距 */ |
| | | } |
| | | |
| | | |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | const temperingLayoutId = ref(''); |
| | | const thickness = ref(''); |
| | | const width = ref(''); |
| | | const timers1 =ref(true); |
| | | const timers2 =ref(true); |
| | | const timers3 =ref(true); |
| | | const timers4 =ref(true); |
| | | const cellshow5=ref(false); |
| | | const cellshow1=ref(true); |
| | | const cellshow2=ref(true); |
| | | const cellshow3=ref(true); |
| | | const cellshow4=ref(true); |
| | | const million=ref(0); |
| | | const million1=ref(0); |
| | | const million3=ref(0); |
| | | const million4=ref(0); |
| | | const cell1=ref(true); |
| | | const cell2=ref(true); |
| | | const cell3=ref(true); |
| | |
| | | const cell7=ref(true); |
| | | const cell8=ref(true); |
| | | const cell9=ref(true); |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | const selectedRow = ref(null); |
| | | const temperingtotal = ref(0); |
| | | const glasstotal = ref(0); |
| | | const fulltotals = ref(0); |
| | | const temperingengineerId=ref(''); |
| | | // 当前页码和每页显示的条数 |
| | | const currentPage = ref(1); |
| | | const itemsPerPage = computed(() => { |
| | | if (currentPage.value === 1) { |
| | |
| | | return 25; // 默认值,可以根据实际需求修改 |
| | | } |
| | | }); |
| | | |
| | | // 计算分页后的数据 |
| | | const paginatedUsers = computed(() => { |
| | | const startIndex = calculateStartIndex(); |
| | | const endIndex = startIndex + itemsPerPage.value; |
| | | return tableData.value.slice(startIndex, endIndex); |
| | | }); |
| | | |
| | | // 计算当前页的起始索引 |
| | | function calculateStartIndex() { |
| | | let index = 0; |
| | |
| | | const printGlassId = ref('') |
| | | const dialogTableVisible1 = ref(false) |
| | | const open1 = async (row) => { |
| | | |
| | | printFlowCardId.value = row.flowCardId; |
| | | printLayer.value = row.layer |
| | | printGlassId.value = row.glassId |
| | |
| | | //dialogTableVisible1.value = false; |
| | | }, 1000); |
| | | } |
| | | |
| | | const printFlowCard1 = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("printFlowCard"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | style.innerHTML = |
| | |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | |
| | | currentPage.value--; |
| | | } |
| | | }; |
| | | |
| | | const nextPage = () => { |
| | | if (currentPage.value < totalPages.value) { |
| | | currentPage.value++; |
| | | } |
| | | }; |
| | | |
| | | // 总页数计算 |
| | | const totalPages = computed(() => { |
| | | // let total = 0; |
| | |
| | | // } |
| | | // // 假设我们每2分钟执行一次清理 |
| | | // setInterval(cleanUp, 1 * 60 * 1000); |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | |
| | | currentRow.slot = row.slot; |
| | | window.localStorage.setItem('deviceId', row.deviceId) |
| | | window.localStorage.setItem('slot', row.slot) |
| | | add.value = true; // 打开绑定架子对话框 |
| | | add.value = true; |
| | | }; |
| | | // 搜索 |
| | | const searchout = async () => { |
| | |
| | | glassId:glassId.value |
| | | }); |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | tableDataf.value = response.data; |
| | | ElMessage.success(response.message); |
| | | |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/deleteBigStorageCageDetails",row) |
| | | if (response.code === 200) { |
| | | tableData.value = response.data; |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/outBigStorageCageDetails", row) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | const handlezhiban = () => { |
| | | dialoglea.value = true; // 打开绑定架子对话框 |
| | | dialoglea.value = true; |
| | | fetchFlowCardId(); |
| | | }; |
| | | const handleganghua = () => { |
| | | dialogFormVisiblec.value = true; // 打开绑定架子对话框 |
| | | dialogFormVisiblec.value = true; |
| | | fetchFlow(); |
| | | }; |
| | | // 钢化查询 |
| | | |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass'); |
| | |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | |
| | | |
| | | } catch (error) { |
| | | } |
| | | }); |
| | | const fetchFlows = async () => { |
| | | try { |
| | |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } catch (error) { |
| | | } |
| | | } |
| | | |
| | | |
| | | const fetchFlow = async () => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass') |
| | |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | const handleChange = async () => { |
| | | try { |
| | | const body = { |
| | | flag: ganghua.value, // 使用 ganghua.value 获取当前开关的状态 |
| | | flag: ganghua.value, |
| | | }; |
| | | |
| | | var url="/cacheVerticalGlass/bigStorageCageDetails/temperingSwitch?flag="+ganghua.value; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | ganghua.value = response.data |
| | | }else { |
| | |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | try { |
| | | const body = { |
| | | flag: diaodu.value, |
| | | }; |
| | | |
| | | }; |
| | | var url="/cacheVerticalGlass/bigStorageCageDetails/dispatchSwitch?flag="+diaodu.value; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | diaodu.value = response.data |
| | | }else { |
| | |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | if (data.scanGlass != null) { |
| | | scanGlass.value = data.scanGlass[0]; |
| | |
| | | console.log(data.bigStorageCageDetailsOutTask[0]) |
| | | adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | // console.log(data.bigStorageCageDetailsOutTask[0]); |
| | | |
| | | } else { |
| | | tableDatac.value = '', |
| | | adjusta.value = '' |
| | |
| | | }else{ |
| | | tableDatad.value = '' |
| | | } |
| | | |
| | | // adjust.value = data.bigStorageCageDetailsFeedTask[0].map(rect => ({ |
| | | // ...rect, |
| | | // })); |
| | | |
| | | // const adjust = computed(() => { |
| | | // return data.value.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | // }); |
| | | if(data.bigStorageCageInfo!=null){ |
| | | tableData.value = data.bigStorageCageInfo[0] |
| | | }else{ |
| | |
| | | }else{ |
| | | ganghua.value = '' |
| | | } |
| | | |
| | | if(data.bigStorageCageInfos!=null){ |
| | | window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length) |
| | | let length = window.localStorage.getItem('length') |
| | |
| | | }else{ |
| | | adjustedRects.value = '' |
| | | } |
| | | |
| | | |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | |
| | | } |
| | | } |
| | | onBeforeUnmount(() => { |
| | | // console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="height: 600px;"> |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button> |
| | |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | v-for="(rect, index) in adjustedRectsa" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | v-for="(rect, index) in adjustedRectsb" |
| | | :key="rect.id" |
| | | :style="{ |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | v-for="(rect, index) in adjustedRectsc" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | v-for="(rect, index) in adjustedRectsd" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | v-for="(rect, index) in adjustedRectse" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | v-for="(rect, index) in adjustedRectsf" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | v-for="(rect, index) in adjustedRectsg" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | |
| | | v-for="(rect, index) in adjustedRectsh" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('searchOrder.tida')" style="width: 14vw"> |
| | | {{ currentRow.deviceId }} |
| | | <!-- <el-input v-model="currentRow.id" autocomplete="off"></el-input> --> |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('searchOrder.gridnumbera')" style="width: 14vw"> |
| | | {{ currentRow.slot }} |
| | | <!-- <el-input v-model="currentRow.slot" autocomplete="off"></el-input> --> |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | |
| | | </el-input> |
| | | <el-button type="primary" plain style="margin-left: 10px;" @click="searchout">{{ $t('searchOrder.search') }}</el-button> |
| | | </div> |
| | | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;"> |
| | | <el-table height="100%" ref="table" |
| | | :data="tableDataf" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="gap" align="center" :label="$t('searchOrder.glassgaps')" min-width="150"/> |
| | | <!-- <el-table-column prop="slot" align="center" :label="$t('searchOrder.gridnumber')" min-width="150"/> --> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="finisha(scope.row)">{{ $t('searchOrder.sureadd') }}</el-button> |
| | |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | <!-- <el-table-column prop="menuName" label="二级菜单栏" align="center" min-width="140" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"/> --> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="130"/> |
| | | <!-- <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="130" /> --> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="130"/> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="130" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="80" /> |
| | | <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="80" /> |
| | |
| | | :label="$t('searchOrder.startstatus')" |
| | | min-width="80" |
| | | prop="state" |
| | | |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType(scope.row.state)"> |
| | |
| | | </div> |
| | | <!-- 下一页按钮 --> |
| | | <el-button @click="nextPage" :disabled="currentPage >= totalPages">{{ $t('searchOrder.down') }}</el-button> |
| | | |
| | | <!-- 当前页显示的条数 --> |
| | | <span style="margin-left: 10px;">{{ $t('searchOrder.now') }} {{ itemsPerPage }} {{ $t('searchOrder.tit') }}</span> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- </el-dialog> --> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibleb" top="5vh" width="85%" :title="$t('searchOrder.productionqueue')"> |
| | | <!-- <div style="display: flex;"> |
| | | <p style="margin-top: 3px;">队列状态:</p> |
| | | <p style="margin-top: 3px;">开始</p> |
| | | <el-button style="margin-left: 10px;size: mini;" type="danger">停止</el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" type="primary">添加</el-button> |
| | | </div> --> |
| | | <el-table ref="table" style="margin-top: 20px;height: 700px;" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <!-- <el-table-column prop="id" fixed align="center" :label="$t('searchOrder.sheetID')" min-width="150"/> |
| | | --> |
| | | <el-table-column prop="glassId" fixed align="center" :label="$t('searchOrder.glassID')" min-width="150"/> |
| | | |
| | | <el-table-column prop="flowCardId" fixed align="center" :label="$t('searchOrder.processcards')" min-width="120" /> |
| | | <!-- <el-table-column prop="glassType" align="center" :label="$t('searchOrder.processcardtype')" min-width="150" /> --> |
| | | <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="80" /> |
| | | <el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="80" /> |
| | | <el-table-column prop="thickness" align="center" :label="$t('searchOrder.thickness')" min-width="80" /> |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokea(scope.row)">{{ $t('searchOrder.breakage') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="brokeb(scope.row)">{{ $t('searchOrder.takeout') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="deletea(scope.row)">{{ $t('searchOrder.delete') }}</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')"> |
| | |
| | | <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" > |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokes(scope.row)">指定流程卡</el-button> |
| | | <el-button size="mini" type="text" plain @click="brokes(scope.row)">{{ $t('searchOrder.processcard') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('人工下片信息')"> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('searchOrder.filminformation')"> |
| | | <div style="display:flex;justify-content: space-around;"> |
| | | <el-card |
| | | style="display: flex; justify-content: center; align-items: center; width: 800px; height: 800px;position: relative;"> |
| | |
| | | |
| | | </div> |
| | | <div style="font-size: 50px; text-align: center;position: absolute;top:0px;left:200px;"> |
| | | <div>扫码枪当前玻璃信息</div> |
| | | <div>{{ $t('searchOrder.currentglassinformation') }}</div> |
| | | <div> |
| | | <el-button type="primary" @click="open1(scanGlass)">打印标签</el-button> |
| | | <el-button type="primary" @click="open1(scanGlass)">{{ $t('searchOrder.printlabels') }}</el-button> |
| | | </div> |
| | | <div>{{ scanGlass.flowCardId }}</div> |
| | | <div>{{ scanGlass.layer }}</div> |
| | | <div>{{ scanGlass.glassId }}</div> |
| | | <div>{{ scanGlass.width }}</div> |
| | | <div>{{ scanGlass.height }}</div> |
| | | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | |
| | | width: 0 !important;height: 0; |
| | | } |
| | | .img-list{ |
| | | |
| | | position:relative; |
| | | } |
| | | .data-img{ |
| | | @apply float-none ; |
| | | |
| | | width:100%; |
| | | height:16rem; |
| | | background: rgba(0, 0, 0, 0); |
| | | opacity: 1; |
| | | border-radius: 0.5rem 0.5rem 0px 0px; |
| | | |
| | | } |
| | | .check-img{ |
| | | position: absolute; |
| | |
| | | top:20rem; |
| | | right: 57rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | .check-imga{ |
| | | position: absolute; |
| | |
| | | top:15rem; |
| | | right: 28.5rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | .vertical { |
| | | width: 45px; |
| | |
| | | transform: translateX(-50%); |
| | | animation: move-vertical 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-vertical { |
| | | 0% { |
| | | top: 485px; /* 起始位置 */ |
| | |
| | | top: calc(100% - 210px); /* 从上到下结束位置 */ |
| | | } |
| | | } |
| | | |
| | | .img-dlpl{ |
| | | margin-left: 20px; |
| | | margin-top: 0px; |
| | | background-image:url('../../assets/dlpl9.png'); |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 400px; |
| | | width: 1200px; |
| | | max-width: 100%; |
| | | background-size: 1200px 400px; |
| | | overflow: hidden; |
| | | position:relative |
| | | background-attachment: local; |
| | | min-height: 400px; |
| | | width: 1200px; |
| | | max-width: 100%; |
| | | background-size: 1200px 400px; |
| | | overflow: hidden; |
| | | position:relative |
| | | } |
| | | .img-car1{ |
| | | display: flex; |
| | | background-image:url('../../assets/lp9.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 200px; |
| | | width: 200px; |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | background-attachment: local; |
| | | min-height: 200px; |
| | | width: 200px; |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | } |
| | | .img-car4{ |
| | | display: flex; |
| | | background-image:url('../../assets/lpa9.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 200px; |
| | | width: 200px; |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | background-attachment: local; |
| | | min-height: 200px; |
| | | width: 200px; |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | } |
| | | .table-container { |
| | | display: flex; |
| | | flex-wrap: nowrap; /* 防止换行 */ |
| | | justify-content: space-between; /* 根据需要调整子元素之间的间距 */ |
| | | } |
| | | |
| | | .table-container > el-card { |
| | | flex: 1; /* 使两个卡片平分可用空间 */ |
| | | margin-bottom: 10px; /* 可选,根据需要添加底部间距 */ |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | import {useI18n} from 'vue-i18n' |
| | | |
| | | const router = useRouter() |
| | | const adda = ref(false) |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | |
| | | const tableData = ref([]) |
| | | const slot = ref('') |
| | | const requestData = { |
| | |
| | | }; |
| | | const timeRange = ref([]) |
| | | const selectValuesa = reactive([]); |
| | | // request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | // ...requestData, |
| | | |
| | | // }).then((res) => { |
| | | // if (res.code == 200) { |
| | | |
| | | // console.log(res.data); |
| | | // tableData.value = res.data |
| | | // console.log(res.data[0].slot); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | |
| | | // } |
| | | // }); |
| | | |
| | | // 磨边任务查询 |
| | | const setEdgGlassInfoRequest = async () => { |
| | | let celllist=[] |
| | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | |
| | | } |
| | | |
| | | // 破损 |
| | | const open = async(row) => { |
| | | try { |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.glassId, |
| | | state: 8, |
| | |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.glassId, |
| | | state: 9, |
| | |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.edgTasks[0] |
| | | }; |
| | | onMounted(() => { |
| | |
| | | <div style="height: 500px;"> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="display: flex;"> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('workOrder.cway')" clearable |
| | | style="margin-left: 20px;margin-bottom: 10px;"> |
| | | <el-option :label="$t('workOrder.edgingone')" value="2001"></el-option> |
| | | <el-option :label="$t('workOrder.edgingtwo')" value="2002"></el-option> |
| | | </el-select> |
| | | |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('workOrder.cstate')" clearable |
| | | style="margin-left: 20px;margin-bottom: 10px;"> |
| | | <el-option :label="$t('workOrder.nedging')" value="0"></el-option> |
| | | <el-option :label="$t('workOrder.edging')" value="1"></el-option> |
| | | <el-option :label="$t('workOrder.finedging')" value="2"></el-option> |
| | | </el-select> |
| | | <span class="demonstration" style="margin-left: 20px;margin-bottom: 10px;">{{ $t('workOrder.time') }}</span> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" style="margin-left: 20px;margin-bottom: 10px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | |
| | | <span class="demonstration" style="margin-left: 20px;margin-top: 3px;">{{ $t('workOrder.time') }}</span> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="setEdgGlassInfoRequest()">{{ |
| | | $t('reportmanage.inquire') |
| | | }}</el-button> |
| | | |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="750" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | |
| | | {{ scope.row.status==0?"未磨边":scope.row.status==1?"磨边中":"已磨边" }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | |
| | | <el-table-column fixed="right" :label="$t('workOrder.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | import {useI18n} from 'vue-i18n' |
| | | |
| | | const router = useRouter() |
| | | const adda = ref(false) |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | |
| | | const tableData = ref([]) |
| | | const slot = ref('') |
| | | const requestData = { |
| | | line: 2002 |
| | | }; |
| | | // request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | // ...requestData, |
| | | |
| | | // }).then((res) => { |
| | | // if (res.code == 200) { |
| | | |
| | | // console.log(res.data); |
| | | // tableData.value = res.data |
| | | // console.log(res.data[0].slot); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | |
| | | // } |
| | | // }); |
| | | // 破损 |
| | | const open = async(row) => { |
| | | try { |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.glass_id, |
| | | controlsId: 8, |
| | |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.glass_id, |
| | | controlsId: 9, |
| | |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.EdgTasks2[0] |
| | | }; |
| | | onMounted(() => { |
| | |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="height: 500px;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="240" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table height="750" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="glass_id" align="center" :label="$t('workOrder.glassID')" min-width="180"/> |
| | | <el-table-column prop="width" align="center" :label="$t('workOrder.width')" min-width="120"/> |
| | | <el-table-column prop="height" align="center" :label="$t('workOrder.height')" min-width="80"/> |
| | |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | <script setup> |
| | | import { ref, watchEffect ,onMounted,onUnmounted} from 'vue'; |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import Swal from 'sweetalert2' |
| | | import request from "@/utils/request"; |
| | | import { initializeWebSocket,closeWebSocket } from '@/utils/WebSocketService'; |
| | |
| | | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678',downGlassInfoList:"" } }, |
| | | |
| | | |
| | | ]); |
| | | watchEffect(() => { |
| | | // 触发数据变化时重新渲染 |
| | |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:8085/api/talk/unloadglass2`; |
| | | //const socketUrl = `ws://${WebSocketHost}:88/api/unLoadGlass/api/talk/unloadglass2`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | data.glassinfo[0].forEach((itemData, index) => { |
| | | if (index < racks.value.length) { |
| | | const rack = racks.value[index]; |
| | |
| | | newItem.height = 20; |
| | | } |
| | | rack.item = newItem; |
| | | // console.log("显示图1",racks.value); // 打印更新后的 racks 值 |
| | | } |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | fetchFlowCardId(); // 获取数据 |
| | | fetchFlowCardId(); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | |
| | | const showCustomAlert = (downGlassInfoList) => { |
| | | let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">'; |
| | | tableContent += '<tr><th style="background-color: #f2f2f2;">玻璃ID</th><th style="background-color: #f2f2f2;">膜系</th><th style="background-color: #f2f2f2;">厚度</th><th style="background-color: #f2f2f2;">宽度</th><th style="background-color: #f2f2f2;">高度</th></tr>'; |
| | | |
| | | downGlassInfoList.forEach(info => { |
| | | tableContent += `<tr> |
| | | <td>${info.glassId}</td> |
| | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | |
| | | ]); |
| | | |
| | | watchEffect(() => { |
| | | // 触发数据变化时重新渲染 |
| | | }); |
| | |
| | | return rack.x + rack.width - item.width; |
| | | } |
| | | }; |
| | | |
| | | const calculateItemYPosition = (rack, item, index) => { |
| | | if (index === 0) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } |
| | | }; |
| | | |
| | | |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await request.get('unLoadGlass/downWorkStation/getwo2'); |
| | | |
| | | if (response.code === 200) { |
| | | console.log(response); |
| | | // 遍历响应数据并替换racks数组中的item属性 |
| | |
| | | height: itemData.item.height === 0 ? "" : 90 |
| | | }; |
| | | console.log(itemData.item.fullCardColor); |
| | | |
| | | if (index === 1 && itemData.item.width > 0) { |
| | | newItem.width = 100; |
| | | newItem.height = 20; |
| | | } |
| | | |
| | | rack.item = newItem; |
| | | |
| | | console.log(racks.value); // 打印更新后的 racks 值 |
| | | console.log(racks.value); |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass3`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | |
| | | // 更新 tableData 的数据 |
| | | |
| | | data.glassinfo2[0].forEach((itemData, index) => { |
| | | if (index < racks.value.length) { |
| | | const rack = racks.value[index]; |
| | |
| | | height: itemData.item.height === 0 ? "" : 90, |
| | | downGlassInfoList:itemData.item.downGlassInfoList |
| | | }; |
| | | |
| | | if (index === 1 && itemData.item.width > 0) { |
| | | newItem.width = 100; |
| | | newItem.height = 20; |
| | | } |
| | | |
| | | rack.item = newItem; |
| | | |
| | | //console.log("显示图2",racks.value); // 打印更新后的 racks 值 |
| | | } |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | fetchFlowCardId(); // 获取数据 |
| | | fetchFlowCardId(); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | |
| | | const showCustomAlert = (downGlassInfoList) => { |
| | | let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">'; |
| | | tableContent += '<tr><th style="background-color: #f2f2f2;">玻璃ID</th><th style="background-color: #f2f2f2;">膜系</th><th style="background-color: #f2f2f2;">厚度</th><th style="background-color: #f2f2f2;">宽度</th><th style="background-color: #f2f2f2;">高度</th></tr>'; |
| | | |
| | | downGlassInfoList.forEach(info => { |
| | | tableContent += `<tr> |
| | | <td>${info.glassId}</td> |
| | |
| | | <td>${info.height}</td> |
| | | </tr>`; |
| | | }); |
| | | |
| | | tableContent += '</table>'; |
| | | |
| | | Swal.fire({ |
| | | title: t('reportWork.glassinformation'), |
| | | // title: '玻璃信息', |
| | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const showRectInfo = (rack) => { |
| | | const content = rack.item.content; |
| | | console.log(rack.item.downGlassInfoList[0].flowCardId) |
| | |
| | | const downGlassInfoList = rack.item.downGlassInfoList; |
| | | console.log(downGlassInfoList) |
| | | showCustomAlert(downGlassInfoList); |
| | | |
| | | } |
| | | |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | /* margin-left: 20px; */ |
| | |
| | | // import {useI18n} from 'vue-i18n' |
| | | // import deepClone from "@/utils/deepClone"; |
| | | import companyInfo from "@/lang/companyInfo" |
| | | |
| | | const company = companyInfo() |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | |
| | | let dataList = ref([]) |
| | | let list = ref([]) |
| | | let lastList=ref([]) |
| | | |
| | | let filterData = ref({}) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | |
| | | // const {currentRoute} = useRouter() |
| | | // const route = currentRoute.value |
| | | // data.value.printList = JSON.parse(route.query.printList) |
| | |
| | | printLayer: null, |
| | | printGlassId: null, |
| | | }) |
| | | |
| | | onMounted(async () => { |
| | | const response = await request.post('/unLoadGlass/downGlassInfo/downGlassLabelPrint', { |
| | | flowCardId: props.printFlowCardId, |
| | |
| | | if (response.code == 200) { |
| | | console.log("lastList.value",response.data) |
| | | lastList.value=response.data; |
| | | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | |
| | | } |
| | | |
| | | ) |
| | | |
| | | |
| | | // // 打印方法 |
| | | // const printFlowCard = () => { |
| | | // // 需要打印的局部区域赋予"print-wrap"的id |
| | |
| | | // let doc = document; |
| | | // let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | // let printId = "print-" + Date.now(); |
| | | |
| | | // // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | // let content = doc.createElement("div"); |
| | | // content.id = printId; |
| | | |
| | | // // 样式控制与打印无关的元素隐藏 |
| | | // let style = doc.createElement("style"); |
| | | // style.innerHTML = |
| | |
| | | // }, 20); |
| | | // } |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <el-button id="printButton" @click="printFlowCard();">打印</el-button> --> |
| | | <div id="printFlowCard" > |
| | | <template v-for="(item,index) in lastList"> |
| | | <div id="entirety" > |
| | | |
| | | <div class="row1"> |
| | | <div style="position: absolute;font-weight: bold;margin-left: 5px;" v-if="item.tempering_layout_id!=null">{{ item.tempering_layout_id }}/{{ item.tempering_feed_sequence }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | |
| | | <div class="print-page" v-else></div> |
| | | </template> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | #printButton { |
| | | /*margin-top: -20px;*/ |
| | | width: 100px; |
| | | } |
| | | |
| | | #printFlowCard { |
| | | display: flex; |
| | | justify-content: left; |
| | | flex-wrap: wrap; |
| | | width: 500px; |
| | | } |
| | | |
| | | #entirety{ |
| | | text-align: center; |
| | | width: 46%; |
| | |
| | | word-wrap: break-word; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .row1 { |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | |
| | | .row1 span { |
| | | font-size: 12pt; |
| | | } |
| | | |
| | | .row2 { |
| | | font-size: 14pt; |
| | | font-weight: bold; |
| | |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 35px; |
| | |
| | | font-weight: bolder; |
| | | line-height: 35px; |
| | | } |
| | | |
| | | .row5 { |
| | | height: 50px; |
| | | font-weight: bold; |
| | |
| | | .row5 span { |
| | | font-size: 12pt; |
| | | } |
| | | |
| | | .row6 { |
| | | height: 15px; |
| | | font-weight: bold; |
| | | font-size: 8pt; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @media print { |
| | | .print-page { |
| | | page-break-after: always; /* 添加分页符,在每个print-page div之后分页 */ |
| | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 2mm 2mm 2mm 2mm; /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import companyInfo from "@/lang/companyInfo"; |
| | | import QRCode from "qrcode"; |
| | | |
| | | |
| | | const company = companyInfo() |
| | | const printMerge = null |
| | | let props = defineProps({ |
| | |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | |
| | | for (let j = 0; j < technologyNumber.length; j++) { |
| | | const processId = produceList.value[i].detail[0].process_id; |
| | | const url = `${processId}/${technologyNumber[j]}`; |
| | | |
| | | // 生成 QR Code 并存储到数组中 |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: technologyNumber[j] |
| | | }); |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | //根据输入的数量重新汇总 |
| | | const handleSummary = () => { |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | |
| | | //每个序号面积 |
| | | collection.total_area = parseFloat((collection.width * collection.height * collection.quantity / 1000000).toFixed(2)) |
| | | totalArea += collection.total_area * 1; |
| | | |
| | | collection.total_area1 = parseFloat((collection.width * collection.height * collection.quantity1 / 1000000).toFixed(2)) |
| | | totalArea1 += collection.total_area1 * 1; |
| | | |
| | | totalWeight += collection.width * collection.height * collection.quantity / 1000000 * collection.separation * 2.5 * 1; |
| | | totalWeight1 += collection.width * collection.height * collection.quantity1 / 1000000 * collection.separation * 2.5 * 1; |
| | | //每个序号周长 |
| | |
| | | produceList.value[i].detail[0].weight1 = totalWeight1 |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | onMounted(async () => { |
| | | console.log(props.printFlowCardId,props.printLayer) |
| | | try { |
| | | |
| | | const response = await request.post('/unLoadGlass/downGlassInfo/downGlassPrint',{ |
| | | flowCardId:props.printFlowCardId, |
| | | layer:props.printLayer |
| | | }); |
| | | if (response.code == 200) { |
| | | |
| | | // 绑定成功,处理逻辑 |
| | | produceList.value = response.data; |
| | | ElMessage.success(response.message); |
| | |
| | | produceList.value[j].detailList.forEach((item, index) => { |
| | | // 解析 separation 字段的 JSON 字符串 |
| | | let separationObj = JSON.parse(item.separation); |
| | | |
| | | // 获取 thickness 的原始值 |
| | | let thicknessValue = separationObj.thickness; |
| | | |
| | | // 去除 'mm' 单位 |
| | | let thicknessWithoutUnit = thicknessValue.replace('mm', ''); |
| | | |
| | | item.separation = thicknessWithoutUnit |
| | | |
| | | sumWeight += item.width * item.height * item.quantity / 1000000 * item.separation * 2.5 * 1; |
| | | |
| | | }); |
| | | produceList.value[j].detail[0].weight = sumWeight |
| | | } |
| | | handleGetQRCode() |
| | | handleSummary() |
| | | // printFlowCard(); |
| | | |
| | | |
| | | |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | |
| | | <td v-for="(itemPr,index) in item.processList" :key="index" colspan="2">{{ itemPr.process }}</td> |
| | | </tr> |
| | | <tr> |
| | | |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | |
| | | <tr v-for="(itemDatile,index) in item.detailList" :key="index"> |
| | | <td>{{ itemDatile.order_number }}</td> |
| | | <!-- <td>{{ itemDatile.s01Value }}</td> --> |
| | |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | | |
| | | <td>完工签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | |
| | | </span> |
| | | </span> |
| | | </td> |
| | | |
| | | </tr> |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="29" rowspan="6" style="width: 480px;height: 150px "> |
| | |
| | | padding: 0; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | #printFlowCard { |
| | | text-align: center; |
| | | //font-weight: bolder; height: 600px; |
| | | } |
| | | |
| | | #contentTable { |
| | | border-collapse: collapse; |
| | | border: 1px solid black; |
| | | width: 100%; |
| | | } |
| | | |
| | | #contentTable thead { |
| | | font-size: 13px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | #contentTable thead div { |
| | | font-size: 15px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | #contentTable tr td { |
| | | border: 1px solid black; |
| | | height: 18px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | #contentTable tbody { |
| | | |
| | | } |
| | | |
| | | .tdNowrap { |
| | | |
| | | } |
| | | |
| | | #contentTable tfoot { |
| | | font-size: 12px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | input{ |
| | | border: none; |
| | | background: none; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @media print { |
| | | @page { |
| | | size: auto; |
| | | margin: 4mm 5mm 5mm 5mm |
| | | |
| | | } |
| | | |
| | | table { |
| | | page-break-before: always; |
| | | page-break-inside: auto; |
| | | } |
| | | |
| | | #contentTable thead { |
| | | display: table-header-group; |
| | | } |
| | | |
| | | tfoot { |
| | | display: table-footer-group; |
| | | page-break-inside: avoid; |
| | | } |
| | | } |
| | | |
| | | .qrCode img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="main-div"> |
| | | <!-- <div id="div-title"> |
| | |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/product/test1' }">测试</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> --> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | import request from "@/utils/request"; |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | |
| | | const router = useRouter() |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | |
| | | const autoPrint = ref(false) |
| | | const takeGlass = ref([]) |
| | | const scanGlass = ref([]) |
| | | |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisiblea2 = ref(false) |
| | | const dialogFormVisibleaDownGlass = ref(false) |
| | | const dialogFormVisibleaDownGlasss = ref(false) |
| | | // 数据 |
| | | const loading = ref(false); |
| | | // 弹框显示控制 |
| | | const dialogFormVisible = ref(false); |
| | | // 表单数据 |
| | | const workstationId = ref(''); |
| | | const workFlowCard = ref(''); |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | const selectedProjectNoa = ref(null); |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref('[]'); |
| | | const tableData = reactive([]); |
| | | const downGlass = ref([]); |
| | | |
| | | const selectValuesa = reactive({}); |
| | | const selectOptionsa = ref([]); |
| | | const dialogTableVisible = ref(false) |
| | |
| | | const now = new Date(); |
| | | const timeRange = ref([]) |
| | | const browser = ref(false) |
| | | |
| | | const handleChange = async () => { |
| | | console.log("触发开关") |
| | | try { |
| | | const body = { |
| | | flag: autoPrint.value, // 使用 ganghua.value 获取当前开关的状态 |
| | | flag: autoPrint.value, |
| | | }; |
| | | |
| | | var url = "/unLoadGlass/downWorkStation/autoPrint?flag=" + autoPrint.value; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | autoPrint.value = response.data |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | browser.value = false |
| | | } |
| | | } |
| | | |
| | | const handleInputChangea = (value, rowId) => { |
| | | // 更新对应行的 select 值 |
| | | selectValuesa[rowId] = value; |
| | | }; |
| | | // 方法 |
| | |
| | | // 处理表格行选择事件 |
| | | }; |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | workstationId.value = row.workstationId; |
| | | flowCardId.value = row.flowCardId; |
| | | // 发起接口请求获取流程卡号 |
| | | fetchFlowCardId(); |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | | dialogFormVisiblea.value = true; |
| | | }; |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | |
| | | const response = await request.get('unLoadGlass/downWorkStation/getflowCardId'); |
| | | console.log(response) |
| | | if (response.code === 200) { |
| | | |
| | | flowCardOptions.value = response.data.filter(item => item !== null) |
| | | .map(item => ({ flowcard_id: item.flow_card_id })); |
| | | console.log(flowCardOptions.value); |
| | |
| | | layer: twoPart |
| | | }); |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | console.log('绑定成功'); |
| | | |
| | | ElMessage.success(response.message); |
| | | updatePageData(); |
| | | dialogFormVisiblea.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | const updatePageData = () => { |
| | | // 假设你的页面上有一个名为 tableData 的 Vue 组件 |
| | | // 你可以直接更新 tableData 的数据 |
| | | fetchTableData() |
| | | // 使用 $forceUpdate() 强制更新组件 |
| | | }; |
| | | const handleBindRack2 = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | dialogFormVisiblea2.value = true; // 打开绑定架子对话框 |
| | | workstationId.value = row.workstationId; |
| | | dialogFormVisiblea2.value = true; |
| | | workFlowCard.value = row.flowCardId; |
| | | }; |
| | | //清除内容 |
| | |
| | | const response = await request.post('unLoadGlass/downWorkStation/clear', { |
| | | workstationId: workstationId.value, |
| | | }); |
| | | |
| | | |
| | | if (response.code === 200) { |
| | | // 清除成功的逻辑 |
| | | console.log('清除成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | if (fullFlowCard.value == workFlowCard.value) { |
| | | fullFlowCard.value = ""; |
| | | } |
| | | } else if (response.code === 500) { |
| | | // 清除失败的逻辑 |
| | | console.log('清除失败'); |
| | | console.log(response.message); // 打印服务器返回的错误信息 |
| | | ElMessage.error(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | } catch (error) { |
| | | // console.log(error); |
| | | ElMessage.error("清除失败"); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | const response = await request.get('unLoadGlass/downWorkStation/getone'); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | |
| | | // 更新 tableData 的数据 |
| | | if (data.downGlassInfos != null) { |
| | | downGlass.value = data.downGlassInfos[0]; |
| | | } |
| | |
| | | autoPrint.value = data.autoPrint[0]; |
| | | } |
| | | if (data.takeGlass != null) { |
| | | |
| | | takeGlass.value = data.takeGlass[0]; |
| | | // takeGlass.value 是一个空对象 |
| | | let width = takeGlass.value.width; |
| | | let height = takeGlass.value.height; |
| | | if (width < height) { |
| | | takeGlass.value.width = height; |
| | | takeGlass.value.height = width; |
| | | } |
| | | |
| | | |
| | | } |
| | | if (data.scanGlass != null) { |
| | | scanGlass.value = data.scanGlass[0]; |
| | |
| | | open1(scanGlass); |
| | | } |
| | | } |
| | | |
| | | //自动打印 |
| | | if (fullFlowCard.value == "" && autoPrint.value == true && browser.value == true) { |
| | | for (let i = 0; i < tableData.length; i++) { |
| | |
| | | if (data.params != null) { |
| | | tableData.splice(0, tableData.length, ...data.params[0]); |
| | | } |
| | | |
| | | // console.log("更新后数据", data.params[0]); |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | confirmBrowser();//获取浏览器 |
| | | fetchFlowCardId(); |
| | |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | |
| | | const getTagType = (status) => { |
| | | return status === 1 ? 'success' : 'danger'; |
| | | // 根据状态值决定标签类型,这里假设状态为1时为成功(绿色),否则为失败(红色) |
| | | } |
| | | |
| | | const toggleStatus = (row) => { |
| | | // 切换料架状态的逻辑 |
| | | row.enableState = 1 - row.enableState; // Toggle between 0 and 1 |
| | | // 此处可以添加保存状态的逻辑,比如调用 API 更新数据 |
| | | updateRowStatus(row); |
| | | }; |
| | | |
| | | const updateRowStatus = async (row) => { |
| | | try { |
| | | // 假设你的后端 API 接收 PUT 请求,并且需要传递 row.id 和 row.enableState 参数 |
| | | |
| | | |
| | | const response = await request.post('unLoadGlass/downWorkStation/updateDownWorkstation', { |
| | | enableState: row.enableState, |
| | | id: row.id |
| | | |
| | | |
| | | }); |
| | | console.log('Updated row status:', response.data); |
| | | // 可以根据后端返回的数据进行进一步处理,比如更新本地状态等 |
| | | } catch (error) { |
| | | console.error('Error updating row status:', error); |
| | | // 处理错误情况,比如提示用户更新失败 |
| | | } |
| | | }; |
| | | |
| | | // 查询数据 |
| | | const selectDownGlassData = async () => { |
| | | |
| | | const response = await request.post("/unLoadGlass/downGlassInfo/setDownGlassInfoRequest", { |
| | | workStationId: selectValuesa[0], |
| | | engineerId: selectValuesa[1], |
| | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | const open = async (row) => { |
| | | |
| | | printFlowCardId.value = row.flowCardId; |
| | | printLayer.value = row.layer |
| | | dialogTableVisible.value = true; |
| | |
| | | }, 2000); |
| | | } |
| | | const open1 = async (row) => { |
| | | |
| | | printFlowCardId.value = row.flowCardId; |
| | | printLayer.value = row.layer |
| | | printGlassId.value = row.glassId |
| | |
| | | //dialogTableVisible1.value = false; |
| | | }, 1000); |
| | | } |
| | | |
| | | const printFlowCard = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("child"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | |
| | | // alert(/Chrome/.test(userAgent) && !/Edge/.test(userAgent)); |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | console.log("style1:" + style.innerHTML) |
| | |
| | | "{display:block;}#" + |
| | | printId + |
| | | "{display: block; padding: 0; margin: 0; width: 100%; position: absolute; top: 0; left: 0; height: 100vh; box-sizing: border-box;}} "; |
| | | |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | |
| | | const printFlowCard1 = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("printFlowCard"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | style.innerHTML = |
| | |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | |
| | | |
| | | // beforeUnmount(() => { |
| | | // closeWebSocket(); |
| | | // }); |
| | |
| | | <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">{{ $t('reportWork.processcard') }}</el-button> |
| | | <el-button @click="open1(scope.row)" :disabled="scope.row.flowCardId == null">{{ $t('reportWork.printlabels') }}</el-button> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" :title="$t('reportWork.information')"> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('reportWork.cstation')" clearable> |
| | | <div style="margin-bottom: 10px;margin-top: -20px;"> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('reportWork.cstation')" clearable style="margin-top: -6px;"> |
| | | <el-option :label="$t('reportWork.all')" value="0"></el-option> |
| | | <el-option label="1" value="1"></el-option> |
| | | <el-option label="2" value="2"></el-option> |
| | |
| | | <el-option label="6" value="6"></el-option> |
| | | <el-option label="7" value="7"></el-option> |
| | | </el-select> |
| | | |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('basicData.plselectproject')" clearable |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('basicData.plselectproject')" clearable style="margin-left: 10px;margin-top: -6px;" |
| | | @input="handleInputChangea($event, row.id)"> |
| | | <el-option v-for="item in selectOptionsa" :key="item" :label="item" :value="item" /> |
| | | </el-select> |
| | | |
| | | <span class="demonstration">{{ $t('reportWork.timeperiod') }}</span> |
| | | <span style="margin-left: 10px;margin-top: 15px;" class="demonstration">{{ $t('reportWork.timeperiod') }}</span> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | value-format="YYYY-MM-DD hh:mm:ss" :end-placeholder="$t('reportmanage.endtime')"> |
| | | value-format="YYYY-MM-DD hh:mm:ss" :end-placeholder="$t('reportmanage.endtime')" style="margin-left: 10px;"> |
| | | </el-date-picker> |
| | | |
| | | <el-button type="primary" style="margin-left: 10px;" @click="selectDownGlassData()">{{ |
| | | <el-button type="primary" style="margin-left: 10px;margin-top: -6px;" @click="selectDownGlassData()">{{ |
| | | $t('reportmanage.inquire') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | <el-table height="200px" ref="table" @selection-change="handleSelectionChange" :data="downGlass" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="workStationId" align="center" :label="$t('reportWork.stationnumber')" min-width="80" /> |
| | |
| | | style="display: flex; justify-content: center; align-items: center; width:800px; height: 800px;position: relative;"> |
| | | <div |
| | | :style="{ width: takeGlass.width + 'px', height: takeGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (takeGlass.width > takeGlass.height ? takeGlass.width : takeGlass.height) + ')' }"> |
| | | |
| | | </div> |
| | | <div style="font-size: 50px; text-align: center;position: absolute;top:0px;left:170px;"> |
| | | <div>{{ $t('reportWork.glassmation') }}</div> |
| | |
| | | style="display: flex; justify-content: center; align-items: center; width: 800px; height: 800px;position: relative;"> |
| | | <div |
| | | :style="{ width: scanGlass.width + 'px', height: scanGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (scanGlass.width > scanGlass.height ? scanGlass.width : scanGlass.height) + ')' }"> |
| | | |
| | | </div> |
| | | <div style="font-size: 50px; text-align: center;position: absolute;top:0px;left:200px;"> |
| | | <div>{{ $t('reportWork.barcodescanner') }}</div> |
| | |
| | | <div>{{ scanGlass.glassId }}</div> |
| | | <div>{{ scanGlass.width }}</div> |
| | | <div>{{ scanGlass.height }}</div> |
| | | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" :title="$t('reportWork.bindingshelves')"> |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | {{ $t('reportWork.sure') }} |
| | | </el-button> |
| | |
| | | line-height: 20px; |
| | | margin-left: 100px; |
| | | } |
| | | |
| | | #dta { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 80%; |
| | | } |
| | | |
| | | #dialog-footer { |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | |
| | | #message { |
| | | text-align: center; |
| | | align-items: center; |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | |
| | | .awatch { |
| | | max-width: 100%; |
| | | } |
| | | |
| | | #main-body { |
| | | margin-top: -40px; |
| | | margin-left: 150px; |
| | | } |
| | | |
| | | #main-bodya { |
| | | margin-top: -40px; |
| | | margin-left: 100px; |
| | | } |
| | | |
| | | :deep(#sizePrintCalrd .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | |
| | | const tableData = [ |
| | | { |
| | | id: '1', |
| | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否清空该条信息?', |
| | |
| | | } |
| | | ], |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <!-- <div id="main-body"> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | const adda = ref(false) |
| | | const addc = ref(false) |
| | | const addb = ref(false) |
| | | |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(''); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const menuName = ref(''); |
| | | const listSort = ref(''); |
| | | const url = ref(''); |
| | | const menuName = ref(''); |
| | | const listSort = ref(''); |
| | | const url = ref(''); |
| | | const currentRow = reactive({}); // 当前行的数据 |
| | | const tableData = ref([]) |
| | | const slot = ref('') |
| | |
| | | tableData.value = res.data.tree |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | const titleSelectJsona = ref({ |
| | | processType: [], |
| | | |
| | | }) |
| | | // const handleInputChangea = async (value: string) => { |
| | | // if (value) { |
| | | // await fetchOptionsa(value); |
| | | // } else { |
| | | // options.value = []; // 清空选项列表 |
| | | // } |
| | | // }; |
| | | onMounted(() => { |
| | | // 在组件挂载后调用 fetchOptions('') 来加载初始数据(如果需要) |
| | | onMounted(() => { |
| | | fetchOptionsa(''); |
| | | }); |
| | | // 角色下拉选 |
| | | const fetchOptionsa = async () => { |
| | | try { |
| | | // 发送请求到后端接口 |
| | | const response = await request.post('/loadGlass/sys/role/queryRole',{ |
| | | key: '' |
| | | }); |
| | | key: '' |
| | | }); |
| | | if (response.code === 200) { |
| | | titleSelectJsona.value.processTypea = response.data; |
| | | console.log(response.data); |
| | | |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | |
| | | } |
| | | }; |
| | | const handleBindRack = (row) => { |
| | | // selectedRow.value = row; // 更新选中的行数据 |
| | | currentRow.menuName = row.menuName; // 直接设置响应式属性 |
| | | currentRow.id = row.id; // 直接设置响应式属性 |
| | | // currentRow.slot = row.slot; |
| | | // window.localStorage.setItem('deviceId', row.deviceId) |
| | | // window.localStorage.setItem('slot', row.slot) |
| | | addb.value = true; // 打开绑定架子对话框 |
| | | currentRow.id = row.id; |
| | | addb.value = true; |
| | | }; |
| | | function closeDialog(row) { |
| | | add.value = false; |
| | |
| | | }); |
| | | |
| | | if (response.code === 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | add.value = false; |
| | | tableData.value = response.data; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | tableData.value = response.data; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | try { |
| | | const dataToSend = { |
| | | parentId: currentRow.id, |
| | | // menuName: currentRow.menuName, |
| | | // children: [ |
| | | // { |
| | | menuName: menuName.value, |
| | | listSort: listSort.value, |
| | | url: url.value, |
| | | // } |
| | | // ] |
| | | }; |
| | | const response = await request.post('/loadGlass/sys/menu/save',dataToSend ); |
| | | if (response.code === 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | addb.value = false; |
| | | tableData.value = response.data; |
| | |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | listSort.value = row.listSort; |
| | | menuName.value = row.menuName; |
| | | url.value = row.url; |
| | | adda.value = true; // 显示对话框 |
| | | adda.value = true; |
| | | } |
| | | // 修改二级菜单 |
| | | function handleEditc(row) { |
| | | listSort.value = row.listSort; |
| | | menuName.value = row.menuName; |
| | | url.value = row.url; |
| | | addc.value = true; // 显示对话框 |
| | | addc.value = true; |
| | | } |
| | | // 编辑 |
| | | const getTableRowa = async () => { |
| | |
| | | url: url.value, |
| | | }); |
| | | if (response.code === 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | tableData.value = response.data; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | tableData.value = response.data; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | url: url.value, |
| | | }); |
| | | if (response.code === 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | addc.value = false; |
| | | tableData.value = response.data; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | tableData.value = response.data; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/loadGlass/sys/menu/deleteMenu", { |
| | | menuId: row.id, |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | |
| | | }; |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="height: 600px;"> |
| | | <el-button type="primary" style="margin-top: 10px;margin-left: 10px;" size="mini" id="searchButton" @click="add = true">{{ $t('customer.addmenu') }}</el-button> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 650px;"> |
| | | <el-table |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 750px;"> |
| | | <el-table |
| | | :data="tableData" |
| | | height="550" |
| | | height="750" |
| | | @expand-change="handleExpandChange" |
| | | row-key="id" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | |
| | | row-key="id" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | <el-table-column prop="menuName" :label="$t('customer.semenu')" align="center" min-width="140" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"/> |
| | | <el-table-column prop="url" :label="$t('customer.link')" align="center" min-width="160"/> |
| | | <el-table-column prop="menuName" :label="$t('customer.semenu')" align="center" min-width="140" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"/> |
| | | <el-table-column prop="url" :label="$t('customer.link')" align="center" min-width="160"/> |
| | | <el-table-column prop="listSort" align="center" :label="$t('customer.sort')" min-width="140"/> |
| | | <el-table-column fixed="right" :label="$t('customer.operate')" align="center"> |
| | | <el-table-column fixed="right" :label="$t('customer.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="handleEditc(scope.row)">{{ $t('customer.exit') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('customer.delete') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="menuName" :label="$t('customer.firstmenu')" align="center" min-width="120" /> |
| | | <el-table-column prop="url" :label="$t('customer.link')" align="center" min-width="200"/> |
| | | <el-table-column prop="url" :label="$t('customer.link')" align="center" min-width="200"/> |
| | | <el-table-column prop="listSort" align="center" :label="$t('customer.sort')" min-width="180" /> |
| | | <el-table-column fixed="right" :label="$t('customer.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('customer.firstmenuname')" style="width: 22vw"> |
| | | <!-- {{ currentRow.menuName }} --> |
| | | <el-input disabled v-model="currentRow.menuName" autocomplete="off"></el-input> |
| | | <el-form-item :label="$t('customer.firstmenuname')" style="width: 25vw"> |
| | | <el-input disabled v-model="currentRow.menuName" autocomplete="off" style="width: 330px;"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('customer.semenuname')" :required="true" style="width: 25vw"> |
| | | <el-input v-model="menuName" autocomplete="off" :placeholder="$t('customer.inmenu')"/> |
| | | <el-input v-model="menuName" autocomplete="off" :placeholder="$t('customer.inmenu')" style="width: 350px;"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('customer.linka')" :required="true" style="width: 25vw"> |
| | | <el-input v-model="url" autocomplete="off" :placeholder="$t('customer.inlink')"/> |
| | | <el-input v-model="url" autocomplete="off" :placeholder="$t('customer.inlink')" style="width: 350px;"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('customer.sorta')" :required="true" style="width: 25vw"> |
| | | <el-input v-model="listSort" autocomplete="off" :placeholder="$t('customer.insort')"/> |
| | | <el-input v-model="listSort" autocomplete="off" :placeholder="$t('customer.insort')" style="width: 350px;"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const router = useRouter() |
| | | const add = ref(false) |
| | | const adda = ref(false) |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const name = ref(''); |
| | | const name = ref(''); |
| | | const tableData = ref([]) |
| | | const options = ref([]) |
| | | const selectedOptions = ref([]) |
| | | // 定义级联选择器的属性 |
| | | const cascaderProps = { |
| | | value: 'id', |
| | | label: 'menuName', |
| | | multiple: true |
| | | }; |
| | | const slot = ref('') |
| | | |
| | | const titleSelectJsona = ref({ |
| | | processType: [], |
| | | |
| | | }) |
| | | onMounted(() => { |
| | | fetchOptionsa(''); |
| | |
| | | // titleSelectJsona.value.processTypea = response.data.menuList; |
| | | // options.value = response.data.menuList |
| | | console.log(response.data); |
| | | |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | parentId: 0, |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | |
| | | let ids = window.localStorage.getItem('ids') |
| | | try { |
| | | let menuList = []; |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | parentId: 0, |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/loadGlass/sys/role/delete",[row.id]) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | fetchOptionsa() |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | |
| | | } |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-button type="primary" style="margin-top: 10px;margin-left: 10px;" size="mini" id="searchButton" @click="add = true">{{ $t('delivery.addrole') }}</el-button> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="500" ref="table" |
| | | <el-table height="750" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="name" align="center" :label="$t('delivery.role')" min-width="180" /> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('delivery.rolea')" :required="true" style="width: 25vw"> |
| | | <el-input :placeholder="$t('delivery.inrole')" v-model="name" autocomplete="off" /> |
| | | <el-input :placeholder="$t('delivery.inrole')" v-model="name" autocomplete="off" style="width: 350px"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | :placeholder="$t('delivery.inchoice')" |
| | | :props="cascaderProps" |
| | | :options="options" |
| | | style="width: 330px" |
| | | style="width: 350px" |
| | | clearable /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('delivery.rolea')" :required="true" style="width: 25vw"> |
| | | <el-input :placeholder="$t('delivery.inrole')" v-model="name" autocomplete="off" /> |
| | | <el-input :placeholder="$t('delivery.inrole')" v-model="name" autocomplete="off" style="width: 350px"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | :placeholder="$t('delivery.inchoice')" |
| | | :props="cascaderProps" |
| | | :options="options" |
| | | style="width: 330px" |
| | | style="width: 350px" |
| | | clearable /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | |
| | | const adda = ref(false) |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const userName = ref(''); |
| | | const password = ref(''); |
| | | |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const selectedProjectNoa = ref(null); |
| | | const userName = ref(''); |
| | | const password = ref(''); |
| | | const tableData = ref([]) |
| | | const slot = ref('') |
| | | request.post("/loadGlass/sys/user/listByUserName",{ |
| | | key: '' |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }); |
| | | // 重置密码 |
| | | const open = async(row) => { |
| | | try { |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | var url="/loadGlass/sys/user/resetPassword?userId="+row.id; |
| | | console.log(url); |
| | | const response = await request.post(url, { |
| | |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | const titleSelectJsona = ref({ |
| | | processType: [], |
| | | |
| | | }) |
| | | // const handleInputChangea = async (value: string) => { |
| | | // if (value) { |
| | | // await fetchOptionsa(value); |
| | | // } else { |
| | | // options.value = []; // 清空选项列表 |
| | | // } |
| | | // }; |
| | | onMounted(() => { |
| | | // 在组件挂载后调用 fetchOptions('') 来加载初始数据(如果需要) |
| | | onMounted(() => { |
| | | fetchOptionsa(''); |
| | | }); |
| | | // 角色下拉选 |
| | | const fetchOptionsa = async () => { |
| | | try { |
| | | // 发送请求到后端接口 |
| | | try { |
| | | const response = await request.post('/loadGlass/sys/role/queryRole',{ |
| | | key: '' |
| | | }); |
| | | key: '' |
| | | }); |
| | | if (response.code === 200) { |
| | | titleSelectJsona.value.processTypea = response.data; |
| | | console.log(response.data); |
| | | |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | |
| | | const firstRole = row.roleList[0]; |
| | | selectedProjectNoa.value = firstRole.id; // 设置为ID,而不是name |
| | | } |
| | | adda.value = true; // 显示对话框 |
| | | adda.value = true; |
| | | window.localStorage.setItem('id', row.id) |
| | | |
| | | } |
| | | |
| | | function closeDialog(row) { |
| | | add.value = false; |
| | | userName.value = ''; |
| | |
| | | roleList: [ |
| | | { |
| | | id: selectedProjectNoa.value, |
| | | // name: selectedProjectNoa.value.name, |
| | | }] |
| | | // roleList: selectedProjectNoa.value.map(item => ({ |
| | | // id: item.id, |
| | | // name: item.name |
| | | // })) |
| | | }); |
| | | if (response.code === 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | add.value = false; |
| | | tableData.value = response.data; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | roleList: [ |
| | | { |
| | | id: selectedProjectNoa.value, |
| | | // roleKey: selectedProjectNoa.value.id, |
| | | }] |
| | | } |
| | | ); |
| | | if (response.code === 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | tableData.value = response.data; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/loadGlass/sys/user/deleteUser", [row.id]) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-button type="primary" style="margin-top: 10px;margin-left: 10px;" size="mini" id="searchButton" @click="add = true">{{ $t('productStock.addusers') }}</el-button> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="500" ref="table" |
| | | <el-table height="750" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="userName" align="center" :label="$t('productStock.username')" min-width="180" /> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('productStock.usernamea')" :required="true" style="width: 25vw"> |
| | | <el-input v-model="userName" autocomplete="off" :placeholder="$t('productStock.inusername')" /> |
| | | <el-input v-model="userName" autocomplete="off" style="width: 350px;" :placeholder="$t('productStock.inusername')" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | filterable |
| | | clearable |
| | | :placeholder="$t('productStock.inrole')" |
| | | style="width: 330px" |
| | | style="width: 350px;" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJsona['processTypea']" |
| | | v-for="item in titleSelectJsona['processTypea']" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('productStock.password')" :required="true" style="width: 25vw;"> |
| | | <el-input style="width: 340px;" |
| | | <el-input style="width: 350px;" |
| | | v-model="password" |
| | | :placeholder="$t('productStock.inpassword')" |
| | | autocomplete="off" |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('productStock.usernamea')" :required="true" style="width: 25vw"> |
| | | <el-input :placeholder="$t('productStock.inusername')" v-model="userName" autocomplete="off" /> |
| | | <el-input :placeholder="$t('productStock.inusername')" v-model="userName" autocomplete="off" style="width: 350px;"/> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | filterable |
| | | clearable |
| | | :placeholder="$t('productStock.inrole')" |
| | | style="width: 330px" |
| | | style="width: 350px;" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJsona['processTypea']" |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | |
| | | const tableData = ref([]) |
| | | |
| | | // 发送获取表格数据的请求 |
| | | // const fetchTableData = async () => { |
| | | // try { |
| | |
| | | // } |
| | | // }; |
| | | // onMounted(fetchTableData); |
| | | |
| | | |
| | | |
| | | request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否报缺?', |
| | |
| | | .then(() => { |
| | | // this.boxa = true |
| | | // this.box = false |
| | | |
| | | }) |
| | | } |
| | | const open = () => { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | 'thick': '183.6', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- 父级框 --> |
| | | <div class="container"> |
| | |
| | | <div class="moving-rect shui"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | position: relative; |
| | | display: inline-block; /* 使容器大小适应图片大小 */ |
| | | } |
| | | |
| | | img { |
| | | display: block; /* 让图片以块级元素显示 */ |
| | | max-width: 100%; /* 确保图片不超出容器 */ |
| | | } |
| | | |
| | | .moving-rect { |
| | | width: 100px; |
| | | height: 50px; |
| | | position: absolute; |
| | | } |
| | | |
| | | .vertical { |
| | | width: 45px; |
| | | height: 25px; |
| | |
| | | transform: translateX(-50%); |
| | | animation: move-vertical 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-vertical { |
| | | 0% { |
| | | top: 510px; /* 起始位置 */ |
| | |
| | | transform: translateY(-50%); |
| | | animation: move-horizontal 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-horizontal { |
| | | 0% { |
| | | right: 210px; /* 起始位置 */ |
| | |
| | | right: calc(100% - 1030px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | |
| | | .xiao { |
| | | width: 45px; |
| | | height: 25px; |
| | |
| | | right: calc(100% - 198px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | |
| | | .zan { |
| | | width: 25px; |
| | | height: 45px; |
| | |
| | | transform: translateX(-50%); |
| | | animation: move-zan 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-zan { |
| | | 0% { |
| | | top: 570px; /* 起始位置 */ |
| | |
| | | transform: translateX(-50%); |
| | | animation: move-fa 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-fa { |
| | | 0% { |
| | | top: 150px; /* 起始位置 */ |
| | |
| | | right: calc(100% - 610px); /* 结束位置 */ |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | |
| | | const tableData = ref([]) |
| | | |
| | | // 发送获取表格数据的请求 |
| | | // const fetchTableData = async () => { |
| | | // try { |
| | |
| | | // } |
| | | // }; |
| | | // onMounted(fetchTableData); |
| | | |
| | | |
| | | |
| | | request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否报缺?', |
| | |
| | | .then(() => { |
| | | // this.boxa = true |
| | | // this.box = false |
| | | |
| | | }) |
| | | } |
| | | const open = () => { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | 'thick': '183.6', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | <div id="awatch"> |
| | | <img src="../../assets/d3.png" alt="" style="width: 100%;height: 160%;margin-top: 20px;"> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #awatch{ |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | |
| | | const tableData = ref([]) |
| | | |
| | | // 发送获取表格数据的请求 |
| | | // const fetchTableData = async () => { |
| | | // try { |
| | |
| | | // } |
| | | // }; |
| | | // onMounted(fetchTableData); |
| | | |
| | | |
| | | |
| | | request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否报缺?', |
| | |
| | | .then(() => { |
| | | // this.boxa = true |
| | | // this.box = false |
| | | |
| | | }) |
| | | } |
| | | const open = () => { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | 'thick': '183.6', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | <div id="awatch"> |
| | | <img src="../../assets/d2.png" alt="" style="width: 100%;height: 160%;margin-top: 20px;"> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #awatch{ |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | |
| | | </el-form> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="650" ref="table" :data="tableDataa" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"> |
| | | <el-table height="650" ref="table" :data="tableDataa" :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"> |
| | | <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center"/> |
| | | <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center"/> |
| | | <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center"/> |
| | |
| | | <el-table-column prop="state" :label="$t('hellow.state')" align="center"/> |
| | | </el-table> |
| | | <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <!-- <div style="float: center;"> --> |
| | | <div style="margin-top: 5px;margin-right: 5px;">线路</div> |
| | | <el-pagination |
| | | background |
| | | size="large" |
| | | <div style="margin-top: 5px;margin-right: 5px;">{{ $t('hellow.line') }}</div> |
| | | <el-pagination |
| | | background |
| | | size="large" |
| | | layout="prev, pager, next" |
| | | :total="30" |
| | | :current-page.sync="currentPage" |
| | |
| | | row-key="projectNumber" |
| | | > |
| | | <!-- <el-table-column type="expand"> --> |
| | | <el-table-column > |
| | | <template #default="props"> |
| | | <el-table :data="props.row.records" style="width: 100%"> |
| | | <el-table-column prop="layer" fixed align="center" :label="$t('hellow.layernumber')" min-width="80"/> |
| | | <el-table-column> |
| | | <template #default="props"> |
| | | <el-table :data="props.row.records" style="width: 100%"> |
| | | <el-table-column prop="layer" fixed align="center" :label="$t('hellow.layernumber')" min-width="80"/> |
| | | <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="80"/> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="80"/> |
| | | <el-table-column prop="sumCount" align="center" :label="$t('hellow.totalnumber')" min-width="80"/> |
| | | <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="80"/> |
| | | <el-table-column prop="pairCount" align="center" :label="$t('hellow.pairsnumber')" min-width="80"/> |
| | | </el-table> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="projectNumber" fixed align="center" :label="$t('hellow.cardnumber')" min-width="20"/> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 强制出片 --> |
| | | <el-dialog v-model="dialogFormVisibled" top="21vh" width="40%" :title="$t('hellow.forcedfilming')"> |
| | | <div style="margin-left: 20px;margin-top: 10px;margin-bottom: 10px;"> |
| | |
| | | </el-table> |
| | | <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <el-pagination |
| | | background |
| | | size="large" |
| | | background |
| | | size="large" |
| | | layout="prev, pager, next" |
| | | :total="30" |
| | | :current-page.sync="currentPage2" |
| | |
| | | const options = [ |
| | | { |
| | | value: 930, |
| | | label: '线路一', |
| | | label: t('hellow.line1'), |
| | | }, |
| | | { |
| | | value: 931, |
| | | label: '线路二', |
| | | label: t('hellow.line2'), |
| | | }, |
| | | { |
| | | value: 932, |
| | | label: '线路三', |
| | | label: t('hellow.line3'), |
| | | } |
| | | ] |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlass`; |
| | | const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1); |
| | | |
| | | watch(() => currentPage.value, (newVal) => { |
| | | window.localStorage.setItem('currentPage', newVal); |
| | | }); |
| | |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | // window.localStorage.setItem('page', currentPage2.value) |
| | | fetchFlowBind(currentRow.projectNumber, currentRow.layer, currentPage2.value); |
| | | |
| | | fetchFlowBind(currentRow.projectNumber, currentRow.layer, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | try { |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const newData = parseData(response.data); |
| | | console.log(newData); |
| | | |
| | | tableDatab.value = newData; |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | |
| | | const parseData = (rawData) => { |
| | | return Object.keys(rawData).map(projectNumber => ({ |
| | | projectNumber, |
| | | records: rawData[projectNumber] |
| | | })); |
| | | }; |
| | | // const fetchFlowCardId = async () => { |
| | | // try { |
| | | // const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard') |
| | | // if (response.code == 200) { |
| | | // ElMessage.success(response.message); |
| | | // console.log(response.data); |
| | | // tableDatab.value = response.data; |
| | | // } else { |
| | | // ElMessage.error(response.message); |
| | | // } |
| | | // } catch (error) { |
| | | // console.error(error); |
| | | // } |
| | | // } |
| | | // 缺片详情 |
| | | // const fetchData = async (page) => { |
| | | // try { |
| | | // var url="/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId="+flowCardId + "&layer=" + layer; |
| | | // // const url = `/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId=${flowCardId.value}&layer=${layer.value}&page=${page}&size=1`; // 假设你的接口支持分页参数page和size |
| | | // const response = await request.post(url); |
| | | // if (response.code == 200) { |
| | | // tableDatac.value = response.data[newPage]; // 假设返回的数据直接赋值给tableDatac |
| | | // ElMessage.success(response.message); |
| | | // } else { |
| | | // ElMessage.error('数据加载失败'); |
| | | // } |
| | | // } catch (error) { |
| | | // ElMessage.error('请求出错'); |
| | | // } |
| | | // }; |
| | | |
| | | |
| | | // // 初始化加载第一页数据 |
| | | // fetchData(currentPage2.value); |
| | | const fetchFlowBind = async (flowCardId, layer, page) => { |
| | | try { |
| | | // let page = window.localStorage.getItem('page') |
| | | var url="/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId="+flowCardId + "&layer=" + layer; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | console.log(page); |
| | | tableDatac.value = response.data[page]; |
| | | // window.localStorage.setItem('response.data',response.data) |
| | | tableDatac.value = response.data[page]; |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 调度 |
| | | const handleChange = async () => { |
| | | // 调度 |
| | | const handleChange = async () => { |
| | | try { |
| | | const body = { |
| | | flag: ganghua.value, // 使用 ganghua.value 获取当前开关的状态 |
| | | flag: ganghua.value, |
| | | }; |
| | | |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/dispatchHollowSwitch?flag="+ganghua.value; |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/dispatchHollowSwitch?flag="+ganghua.value; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | ganghua.value = response.data |
| | | }else { |
| | |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | #dialog-footer { |
| | | text-align: center; |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="packType" align="center" :label="$t('large.quantity')" min-width="110" /> |
| | | <el-table-column prop="projectNo" align="center" :label="$t('large.projectnumber')" min-width="110" /> |
| | | <!-- <el-table-column prop="processingNote" fixed align="center" :label="$t('large.method')" min-width="110" /> --> |
| | | <!-- <el-table-column prop="deliveryDate" fixed align="center" :label="$t('large.deliveryDate')" min-width="130" /> --> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer" style="text-align: center;"> |
| | |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {useI18n} from 'vue-i18n' |
| | | import * as echarts from 'echarts'; |
| | | |
| | | const {t} = useI18n() |
| | | const tableData = ref([]) |
| | | const tableDatab = ref([]) |
| | |
| | | const xiapian6 = ref(false) |
| | | const blind = ref(false) |
| | | const temperingtotal = ref(0) |
| | | |
| | | const thisProcess = ref(); // 用于存储process_id的响应式引用 |
| | | // 定义一个响应式引用来存储图表实例 |
| | | const thisProcess = ref(); |
| | | const chartDom = ref(null); |
| | | let chartInstance = null; |
| | | const blinda = ref(false) |
| | |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | |
| | | let socket6 = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | const handleMessage = (data) => { |
| | | // tableData.value = data.awaitingRepairs[0] |
| | | tableDatab.value = data.DoingTask[0] |
| | | tableDatac.value = data.orders[0] |
| | | socket.onmessage = (event) => { |
| | | const data = JSON.parse(event.data); |
| | | console.log(data.device[0]); |
| | | |
| | | processesData.value = data.device[0].map(rect => ({ |
| | | ...rect, |
| | | completedQuantity: rect.completedQuantity, |
| | |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | chart.setOption(options); |
| | | }); |
| | | }; |
| | |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | chart.setOption(options); |
| | | }); |
| | | }; |
| | |
| | | reportingWorkTime2: timeRange.value[1], |
| | | }) |
| | | if (response.code === 200) { |
| | | console.log(response.data); |
| | | |
| | | dialogprocesses.value = response.data.map(rect => ({ |
| | | ...rect, |
| | | completedQuantity: rect.completedQuantity, |
| | |
| | | })); |
| | | await nextTick(); |
| | | renderPieCharts1(); |
| | | |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | </script> |
| | | <style scoped> |
| | | .echarts-container { |
| | | display: flex; |
| | |
| | | height: 100%; |
| | | } |
| | | .parter { |
| | | position: relative; |
| | | display: inline-block; /* 使容器大小适应图片大小 */ |
| | | width: 1500px; |
| | | margin-left: -300px |
| | | position: relative; |
| | | display: inline-block; /* 使容器大小适应图片大小 */ |
| | | width: 1500px; |
| | | margin-left: -300px |
| | | } |
| | | img { |
| | | display: block; /* 让图片以块级元素显示 */ |
| | | max-width: 100%; /* 确保图片不超出容器 */ |
| | | display: block; /* 让图片以块级元素显示 */ |
| | | max-width: 100%; /* 确保图片不超出容器 */ |
| | | } |
| | | .moving-rect { |
| | | width: 100px; |
| | | height: 50px; |
| | | position: absolute; |
| | | width: 100px; |
| | | height: 50px; |
| | | position: absolute; |
| | | } |
| | | .longa{ |
| | | z-index: 1; |
| | |
| | | margin-left: 293px; |
| | | } |
| | | .xiapianji { |
| | | width: 20px; |
| | | height: 10px; |
| | | background-color: #529b2e; |
| | | top: 9px; |
| | | left: 200px; |
| | | transform: translateX(-50%); |
| | | animation: move-xiapianji 15s infinite; |
| | | width: 20px; |
| | | height: 10px; |
| | | background-color: #529b2e; |
| | | top: 9px; |
| | | left: 200px; |
| | | transform: translateX(-50%); |
| | | animation: move-xiapianji 15s infinite; |
| | | } |
| | | @keyframes move-xiapianji { |
| | | 0% { |