Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
# UI-Project/src/views/largescreen/largescreen.vue
| | |
| | | export default { |
| | | serverUrl: "10.153.19.150:88/api", |
| | | |
| | | // serverUrl: "192.168.1.199:88/api", |
| | | serverUrl2: "10.153.19.150:88" |
| | | // serverUrl2: "192.168.1.199:88" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | width:'宽', |
| | | height:'高', |
| | | startstatus:'启用状态', |
| | | disable:'禁用', |
| | | start:'启用', |
| | | disable:'已禁用', |
| | | start:'已启用', |
| | | deficiencieste:'报缺', |
| | | updown:'人工下片', |
| | | operate:'操作', |
| | |
| | | gridnumber:'栅格号', |
| | | gridnumbera:'栅格号:', |
| | | grid:'请输入栅格号', |
| | | enable:'启用', |
| | | disable:'禁用', |
| | | enable:'已启用', |
| | | disable:'已禁用', |
| | | remainingwidth:'剩余宽度', |
| | | add:'添加', |
| | | sheetID:'钢化小片信息表ID', |
| | |
| | | state:'状态', |
| | | devicenumber:'设备号', |
| | | startstatus:'启用状态', |
| | | enable:'启用', |
| | | enable:'已启用', |
| | | unenable:'未启用', |
| | | operate:'操作', |
| | | bindingshelves:'绑定架子', |
| | |
| | | notstocked: '未入库', |
| | | inboundstatus: '部分入库状态', |
| | | allstatus: '全部入库状态', |
| | | |
| | | |
| | | completedquantity: '完成数量', |
| | | scrapquantity: '报废数量', |
| | | } |
| | | } |
| | |
| | | import 'vxe-table/lib/style.css' |
| | | import i18n from '@/lang' |
| | | // import Echarts from "vue-echarts" |
| | | // import * as echarts from "echarts" |
| | | import * as echarts from "echarts" |
| | | // echarts.registerMap('china', china) |
| | | // Vue.prototype.$echarts = echarts |
| | | |
| | | // app.component("v-chart", Echarts) |
| | | // app.config.globalProperties.$echarts = echarts |
| | |
| | | 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 }); |
| | | const response = await request.post('/cacheGlass/edgStorageCage/updateEdgStorageCage', { id: row.id, enableState: newState }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <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" |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div id="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 60%;height: 90%;margin-left: 260px;margin-top: 20px;position: relative;"> |
| | | <div style="position: absolute; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 70%;height: 90%;margin-left: 200px;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect" |
| | |
| | | > |
| | | </div> |
| | | </div> |
| | | <!-- <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: -124px;margin-left: 480px;"></div> |
| | | <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: -30px;margin-left: 850px;"></div> |
| | | <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: 30px;margin-left: 695px;"></div> --> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | .awatch{ |
| | | height: 460px; |
| | | width: 1500px; |
| | | /* margin-top: -60px; */ |
| | | max-width: 100%; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <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" |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div id="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 60%;height: 90%;margin-left: 260px;margin-top: 20px;position: relative;"> |
| | | <div style="position: absolute; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 70%;height: 90%;margin-left: 200px;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect" |
| | |
| | | backgroundColor: '#409EFF' |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | .awatch{ |
| | | height: 460px; |
| | | width: 1500px; |
| | | max-width: 100%; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
| | |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | })); |
| | | console.log(data.intoGlass[0]); |
| | | console.log(adjustedRects.value); |
| | | }; |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | |
| | | const carPosition = ref([]) |
| | | const adjustedRects = ref([]); |
| | | const project = ref([]); |
| | | const adjust = ref([]); |
| | | const adjusta = ref([]); |
| | | const adjustedRectsa = ref([]); |
| | | const adjustedRectsb = ref([]); |
| | | const adjustedRectsc = ref([]); |
| | |
| | | const adjustedRectse = ref([]); |
| | | const adjustedRectsf = ref([]); |
| | | const adjustedRectsg = ref([]); |
| | | const adjustedRectsh = ref([]); |
| | | const currentRow = reactive({}); // 当前行的数据 |
| | | const add = ref(false) |
| | | const flowCardId = ref(''); |
| | |
| | | const cell6=ref(true); |
| | | const cell7=ref(true); |
| | | const cell8=ref(true); |
| | | const cell9=ref(true); |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | |
| | | |
| | |
| | | } |
| | | return index; |
| | | } |
| | | |
| | | function jumpToPage(page: number) { |
| | | if (page >= 1 && page <= totalPages.value) { |
| | | currentPage.value = page; |
| | | } |
| | | } |
| | | // 上一页和下一页方法 |
| | | const prevPage = () => { |
| | | if (currentPage.value > 1) { |
| | |
| | | // 更新 tableData 的数据 |
| | | tableDatac.value = data.bigStorageCageDetailsOutTask[0] |
| | | tableDatad.value = data.bigStorageCageDetailsFeedTask[0] |
| | | // adjust.value = data.bigStorageCageDetailsFeedTask[0].map(rect => ({ |
| | | // ...rect, |
| | | // })); |
| | | adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | adjust.value = data.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | // const adjust = computed(() => { |
| | | // return data.value.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | // }); |
| | | tableData.value = data.bigStorageCageInfo[0] |
| | | tableDatab.value = data.temperingGlassInfoList[0] |
| | | tableDatae.value = data.bigStorageCageUsage[0] |
| | | carPosition.value = data.carPostion[0] |
| | | console.log(carPosition.value); |
| | | window.localStorage.setItem('length', data.data.bigStorageCageInfos[0][1].length) |
| | | window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length) |
| | | let length = window.localStorage.getItem('length') |
| | | adjustedRects.value = data.data.bigStorageCageInfos[0][1].map(rect => ({ |
| | | adjustedRects.value = data.bigStorageCageInfos[0][1].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsg.value = data.bigStorageCageInfos[0][8].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsh.value = data.bigStorageCageInfos[0][9].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;"> |
| | | <el-table height="100%" ref="table" |
| | | :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="bigStorageCageOutTask.glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="100" /> |
| | | <el-table-column prop="bigStorageCageOutTask.glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="120" /> |
| | | <el-table-column prop="bigStorageCageOutTask.startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" /> |
| | | <el-table-column prop="bigStorageCageOutTask.endSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" /> |
| | | <el-table-column prop="bigStorageCageOutTask.trainNumber" align="center" :label="$t('searchOrder.trips')" min-width="120" /> |
| | |
| | | <el-table-column prop="id" align="center" :label="$t('searchOrder.tabid')" min-width="150"/> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('searchOrder.tid')" min-width="100"/> |
| | | <el-table-column prop="slot" align="center" :label="$t('searchOrder.gridnumber')" min-width="100"/> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100"/> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="120"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="150"/> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="100"/> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140"/> |
| | | <el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="100"/> |
| | | <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="100"/> |
| | | <el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="100"/> |
| | |
| | | <!-- // 父级框 --> |
| | | <div class="img-dlpl" > |
| | | <div class="img-car1" :style="'z-index:999;left:247px;top:' + 350*carPosition[0] + 'px;position:absolute;'"> |
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | <div |
| | | v-for="(rect, index) in adjusta" |
| | | :key="rect.id" |
| | | :style="{ |
| | | width: '30px', |
| | | height: '5px', |
| | | backgroundColor: '#409EFF', |
| | | marginLeft: index * 5+ `px`, |
| | | top: '10px', |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="img-car4" :style="'z-index:999;left:704px;top:' + 350*carPosition[1] + 'px;position:absolute;'"> |
| | | <div v-show="cellshow4" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | <div |
| | | v-for="(rect, index) in adjust" |
| | | :key="rect.id" |
| | | :style="{ |
| | | width: '30px', |
| | | height: '5px', |
| | | backgroundColor: '#409EFF', |
| | | marginLeft: index * 5+ `px`, |
| | | top: '10px', |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | <div style="position: relative;"> |
| | | <div v-show="cell1" style="width: 227px;height: 29px;position: relative;top:55px;left: 465px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect.id" |
| | | :key="rect" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-show="cell9" style="width: 227px;height: 29px;position: absolute;top:300px;left: 465px;"> |
| | | <div |
| | | 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`, |
| | | }" |
| | | > |
| | | <div |
| | | v-for="(rects, index) in rect.bigStorageCageDetails" |
| | | :key="rects" |
| | | :style="{ |
| | | float:'left', |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblea" top="5vh" width="97%" :title="$t('searchOrder.cageinformation')"> |
| | | <el-dialog v-model="dialogFormVisiblea" top="2vh" width="97%" :title="$t('searchOrder.cageinformation')"> |
| | | <el-table |
| | | :data="paginatedUsers" |
| | | @row-click="handleRowClick" |
| | |
| | | :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="90"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="110" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="120" /> |
| | | <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="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" /> |
| | | <el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="80" /> |
| | |
| | | <div style="margin-top: 20px; text-align: center;"> |
| | | <!-- 上一页按钮 --> |
| | | <el-button @click="prevPage" :disabled="currentPage === 1">{{ $t('searchOrder.up') }}</el-button> |
| | | |
| | | <div style="display: inline-block; margin: 0 20px;"> |
| | | <el-button |
| | | v-for="page in totalPages" |
| | | :key="page" |
| | | :class="{ 'is-active': currentPage === page }" |
| | | @click="jumpToPage(page)" |
| | | > |
| | | {{ page }} |
| | | </el-button> |
| | | </div> |
| | | <!-- 下一页按钮 --> |
| | | <el-button @click="nextPage" :disabled="currentPage >= totalPages">{{ $t('searchOrder.down') }}</el-button> |
| | | |
| | |
| | | position:relative |
| | | } |
| | | .img-car1{ |
| | | display: flex; |
| | | background-image:url('../../assets/lp.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | |
| | | position:relative |
| | | } |
| | | .img-car4{ |
| | | display: flex; |
| | | background-image:url('../../assets/lpa.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | |
| | | |
| | | Swal.fire({ |
| | | // title: '玻璃信息', |
| | | title: this.$t('reportWork.glassinformation'), |
| | | // title: "$t('reportWork.glassinformation')", |
| | | title: t('reportWork.glassinformation'), |
| | | html: tableContent, |
| | | customClass: { |
| | | popup: 'format-pre' |
| | |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | margin-left: 20px; |
| | | /* margin-left: 10px; */ |
| | | width: 500px; |
| | | margin-top: 5px; |
| | | } |
| | |
| | | tableContent += '</table>'; |
| | | |
| | | Swal.fire({ |
| | | title: "$t('reportWork.glassinformation')", |
| | | title: t('reportWork.glassinformation'), |
| | | // title: '玻璃信息', |
| | | html: tableContent, |
| | | customClass: { |
| | |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | margin-left: 20px; |
| | | /* margin-left: 20px; */ |
| | | width: 500px; |
| | | margin-top: 10px; |
| | | margin-top: 5px; |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | |
| | | <el-table-column prop="totalquantity" align="center" :label="$t('reportWork.totalquantity')" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" :label="$t('reportWork.beendropped')" min-width="120" /> |
| | | <el-table-column prop="layer" align="center" label="层数" min-width="120" /> |
| | | <el-table-column prop="artificialnumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="otherNumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" :label="$t('reportWork.state')" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('reportWork.devicenumber')" min-width="120" /> |
| | | <el-table-column |
| | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="600px"> |
| | | <div id="top" style="height: 150px;display: flex;"> |
| | | <div v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | :style="{ width: '1000px', height: '100px',margin: '5px',}"> |
| | | <div ref="setChartDom(index, $el)" style="width: 100%; height: 100%;"></div> |
| | | <div style="text-align: center;"> |
| | | {{ rect.thisProcess }}</div> |
| | | <div class="echarts-container"> |
| | | <div v-for="(processData, index) in processesData" :key="index" class="echarts-item"> |
| | | <div :id="'pieChart_' + index" class="pie-chart"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | <el-dialog v-model="blinda" top="10vh" width="80%" :title="$t('large.brokeno')"> |
| | | <el-table height="500" ref="table" |
| | | <el-dialog v-model="blinda" top="5vh" width="80%" :title="$t('large.brokeno')"> |
| | | <el-table height="400" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="reportingWorkTime" fixed align="center" :label="$t('large.time')" min-width="110" /> |
| | |
| | | <el-table-column prop="qualityInspector" align="center" :label="$t('large.inspector')" min-width="110" /> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <div id="dialog-footer" style="text-align: center;"> |
| | | <el-button @click="blinda = false">{{ $t('large.close') }}</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | const handleBinda = (row) => { |
| | | blinda.value = true; |
| | | }; |
| | | const processesData = ref([ |
| | | |
| | | ]); |
| | | function getStatusType(warehousing) { |
| | | switch (warehousing) { |
| | | case 0: |
| | |
| | | socket = new WebSocket(socketUrl); |
| | | socket.onmessage = (event) => { |
| | | const data = JSON.parse(event.data); |
| | | adjustedRects.value = data.device[0].map(rect => ({ |
| | | processesData.value = data.device[0].map(rect => ({ |
| | | ...rect, |
| | | completedQuantity: rect.completedQuantity, |
| | | breakageQuantity: rect.breakageQuantity, |
| | | thisProcess: rect.thisProcess, |
| | | })); |
| | | console.log(adjustedRects.value); |
| | | renderPieCharts(); |
| | | console.log(processesData.value); |
| | | // updateCharts(); |
| | | }; |
| | | adjustedRects.value.forEach((rect, index) => { |
| | | initChart(index, rect); |
| | | }); |
| | | |
| | | // }; |
| | | }); |
| | | |
| | | |
| | | function initChart(index, rect) { |
| | | const { dom } = chartRefs.value[index] || { dom: null }; |
| | | if (dom) { |
| | | const chart = echarts.init(dom); |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'item' |
| | | const renderPieCharts = () => { |
| | | processesData.value.forEach((data, index) => { |
| | | const chart = echarts.init(document.getElementById('pieChart_' + index)); |
| | | const options = { |
| | | title: { |
| | | text: `${data.thisProcess} `, |
| | | left: 'center', |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | left: 'left', |
| | | tooltip: { |
| | | trigger: 'item', |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '饼状图', |
| | | name: `${data.thisProcess} `, |
| | | type: 'pie', |
| | | radius: ['50%','70%'], |
| | | radius: ['40%', '70%'], |
| | | avoidLabelOverlap: false, |
| | | data: [ |
| | | {value: rect.completedQuantity, name: '加工数量'}, |
| | | {value: rect.breakageQuantity, name: '次破数量'}, |
| | | console.log(rect.breakageQuantity) |
| | | { value: data.completedQuantity, name: t('large.completedquantity') }, |
| | | { value: data.breakageQuantity, name: t('large.scrapquantity') } |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | }, |
| | | label: { |
| | | show: false, |
| | | position: 'center', |
| | | }, |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | } |
| | | ] |
| | | }; |
| | | chart.setOption(option); |
| | | chartRefs.value[index] = { ...chartRefs.value[index], chart }; |
| | | |
| | | } |
| | | console.log(chartRefs.value[index]); |
| | | } |
| | | chart.setOption(options); |
| | | }); |
| | | }; |
| | | |
| | | // 更新图表 |
| | | // function updateCharts() { |
| | | // adjustedRects.value.forEach((rect, index) => { |
| | | // const { chart } = chartRefs.value[index] || { chart: null }; |
| | | // if (chart) { |
| | | // chart.setOption({ |
| | | // series: [{ |
| | | // data: [ |
| | | // { value: rect.completedQuantity, name: '加工数量' }, |
| | | // { value: rect.breakageQuantity, name: '次破数量' }, |
| | | // ], |
| | | // }], |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | // 初始化图表 |
| | | // function initChart(index, rect) { |
| | | // const chartDom = ref(`chartDom${index}`).value; |
| | | // console.log(ref(`chartDom${index}`).value); |
| | | // const chart = echarts.init(chartDom); |
| | | // const option = { |
| | | // tooltip: { |
| | | // trigger: 'item' |
| | | // }, |
| | | // legend: { |
| | | // orient: 'vertical', |
| | | // left: 'left', |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | // name: '饼状图', |
| | | // type: 'pie', |
| | | // radius: ['50%','70%'], |
| | | // data: [ |
| | | // {value: rect.completed, name: '加工数量'}, |
| | | // {value: rect.breakage, name: '次破数量'}, |
| | | // ], |
| | | // emphasis: { |
| | | // itemStyle: { |
| | | // shadowBlur: 10, |
| | | // shadowOffsetX: 0, |
| | | // shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | // } |
| | | // } |
| | | // } |
| | | // ] |
| | | // }; |
| | | // chart.setOption(option); |
| | | // } |
| | | // 清理 WebSocket 连接 |
| | | |
| | | onUnmounted(() => { |
| | | socket.close(); |
| | | }); |
| | |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | /* background-color: lightblue; 设置矩形的背景色 */ |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | |
| | | |
| | | |
| | | .echarts-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | flex-wrap: wrap; |
| | | gap: 20px; |
| | | } |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | |
| | | .echarts-item { |
| | | width: 150px; |
| | | height: 150px; |
| | | margin: 20px; |
| | | } |
| | | |
| | | .pie-chart { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | |
| | | public void saveGlassInfo(List<GlassInfo> glassinfo) { |
| | | this.saveBatch(glassinfo); |
| | | } |
| | | |
| | | /* |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId,int layer) { |
| | |
| | | .collect(Collectors.toList()); |
| | | log.info("result666: {}", result); |
| | | return result; |
| | | } |
| | | }*/ |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("pp") |
| | | @Mapper |
| | | public interface OptimizeLayoutMapper extends MPJBaseMapper<OptimizeLayout> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface OptimizeLayoutService extends MPJBaseService<OptimizeLayout> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import com.mes.pp.mapper.OptimizeLayoutMapper; |
| | | import com.mes.pp.service.OptimizeLayoutService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | public class OptimizeLayoutServiceImpl extends MPJBaseServiceImpl<OptimizeLayoutMapper, OptimizeLayout> implements OptimizeLayoutService { |
| | | |
| | | } |
| | |
| | | |
| | | @Autowired |
| | | private WorkAssignmentService workAssignmentService; |
| | | @ApiOperation("报工数据查询") |
| | | @ApiOperation("值班数据查询") |
| | | @GetMapping("/selectWorkAssignment") |
| | | public Result selectDamage(int line,String workingProcedure) { |
| | | public Result selectWorkAssignment(int line,String workingProcedure) { |
| | | return Result.build(200,"查询成功",workAssignmentService.selectWorkAssignment(line,workingProcedure)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateEdgStorageCage") |
| | | @ResponseBody |
| | | public Result updateEdgStorageCage(@RequestBody EdgStorageCage edgStorageCage) { |
| | | boolean isSucess=edgStorageCageService.updateEdgStorageCage(edgStorageCage); |
| | | return Result.build(200,"【启用/禁用】成功",1); |
| | | String isSucess=edgStorageCageService.updateEdgStorageCage(edgStorageCage)?"成功":"失败"; |
| | | return Result.build(200,"【启用/禁用】"+isSucess,1); |
| | | } |
| | | |
| | | @ApiOperation("磨边缓存理片笼信息 功能:对笼内栅格玻璃进行【清除/更换/绑定】 EdgStorageCage格子信息,EdgStorageCageDetails 玻璃信息 ") |
| | | @PostMapping("/edgStorageCageGlass") |
| | | @ResponseBody |
| | | public Result edgStorageCageGlass(@RequestBody EdgStorageCageDetails edgStorageCageDetails,int edgStorageCageId) { |
| | | boolean isSucess=edgStorageCageService.updateEdgStorageCageDetails(edgStorageCageId,edgStorageCageDetails); |
| | | return Result.build(200,"【清除/更换/绑定】成功",1); |
| | | String isSucess=edgStorageCageService.updateEdgStorageCageDetails(edgStorageCageId,edgStorageCageDetails)?"成功":"失败"; |
| | | return Result.build(200,"【清除/更换/绑定】"+isSucess,1); |
| | | } |
| | | |
| | | @ApiOperation("磨边模块汇报玻璃状态 功能:对笼内栅格玻璃进行【破损/拿走】 ") |
| | |
| | | public Result edgReportStatus(@RequestBody Map<String, String> arguments) { |
| | | String edgStorageCageDetailsId=arguments.get("glassId"); |
| | | int controlsId=Integer.valueOf(arguments.get("controlsId")); |
| | | boolean isSucess=edgStorageCageDetailsService.identWorn(edgStorageCageDetailsId,controlsId); |
| | | return Result.build(200,"【破损/拿走】成功",1); |
| | | String isSucess=edgStorageCageDetailsService.identWorn(edgStorageCageDetailsId,controlsId)?"成功":"失败"; |
| | | return Result.build(200,"【破损/拿走】"+isSucess,1); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.mes.edgstoragecage.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | @Override |
| | | public boolean updateEdgStorageCage(EdgStorageCage edgStorageCage) { |
| | | EdgStorageCage edgItem = baseMapper.selectById(edgStorageCage.getId()); |
| | | if(edgItem!=null){ |
| | | edgItem.setEnableState(edgStorageCage.getEnableState()); |
| | | baseMapper.updateById(edgItem); |
| | | log.info("卧室缓存:【启用/禁用】 参数:{} 结果:成功",edgStorageCage); |
| | | return true; |
| | | } |
| | | log.info("卧室缓存:【启用/禁用】 参数:{} 结果:失败",edgStorageCage); |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 修改理片笼信息 功能:对笼内栅格玻璃 【添加/删除/更换】 |
| | |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | private JSONObject jsonObject = new JSONObject(); |
| | | public void dataBase1() throws InterruptedException { |
| | | public void queryDataSource1() throws InterruptedException { |
| | | List<Double> carPostion=new ArrayList<>(); |
| | | carPostion.add(0.25); |
| | | carPostion.add(0.5); |
| | |
| | | |
| | | } |
| | | |
| | | public void dataBase2() throws InterruptedException { |
| | | public void queryDataSource2() throws InterruptedException { |
| | | //出片队列 |
| | | List<TemperingGlassInfo> temperingGlassInfoList= temperingGlassInfoService.list(); |
| | | jsonObject.append("temperingGlassInfoList", temperingGlassInfoList); |
| | |
| | | public void plcStorageCageTask() throws InterruptedException { |
| | | jsonObject = new JSONObject(); |
| | | try { |
| | | dataBase1(); |
| | | dataBase2(); |
| | | //查询使用数据源1查询数据 |
| | | queryDataSource1(); |
| | | //查询使用数据源2查询数据 |
| | | queryDataSource2(); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("slicecage"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | |
| | | damage.setRemark(""); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | return emptyList.get(0); |
| | | } |
| | | /* |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> selectCacheMax() { |
| | |
| | | |
| | | ); |
| | | } |
| | | */ |
| | | |
| | | |
| | | @Override |
| | |
| | | //downGlassTaskService.getUnloadingTaskState(); |
| | | } |
| | | |
| | | @Test |
| | | /* @Test |
| | | public void updateDownStorageCage() { |
| | | |
| | | |
| | |
| | | downStorageCage.setId(1); |
| | | downStorageCageService.updateDownStorageCage(downStorageCage); |
| | | |
| | | } |
| | | }*/ |
| | | |
| | | |
| | | |