| | |
| | | <div class="content-wrapper"> |
| | | <!-- æ§å¶é¢æ¿åºå --> |
| | | <div class="control-panel"> |
| | | <div class="form-group"> |
| | | <!-- <div class="form-group"> |
| | | <label>åºåï¼</label> |
| | | <el-select size="mini" filterable v-model="Area.areaCode" placeholder="è¯·éæ©" class="full-width"> |
| | | <el-option v-for="item in slectData" :value="item.areaCode" :label="item.areaName" |
| | | :key="item.areaName"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <!-- <div class="form-group"> |
| | | <label>æï¼</label> |
| | |
| | | </el-select> |
| | | </div> --> |
| | | |
| | | <el-button type="success" class="refresh-btn" @click="GetViewData"> |
| | | å·æ° |
| | | </el-button> |
| | | <el-button type="success" class="refresh-btn" @click="GetViewData"> å·æ° </el-button> |
| | | |
| | | <div class="legend-section"> |
| | | <h4>说æ</h4> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- æ¬æµ®æç¤ºæ¡ --> |
| | | <div v-if="showTooltipFlag" class="location-tooltip" :style="{ |
| | | left: tooltipPosition.x + 'px', |
| | | top: tooltipPosition.y + 'px', |
| | | }"> |
| | | <div v-if="currentLocation"> |
| | | <p><strong>è´§ä½å·:</strong>{{ currentLocation.locationCode }}</p> |
| | | <!-- <p> |
| | | <strong>è´§ä½æåå±:</strong> {{ currentLocation.row }}æ{{ |
| | | currentLocation.layer |
| | | }}å{{ currentLocation.layer }}å± |
| | | </p> --> |
| | | <p><strong>ç¶æ:</strong> {{ getStatusText(currentLocation) }}</p> |
| | | <p> |
| | | <strong>ç¦ç¨:</strong> |
| | | {{ currentLocation.location_lock == 2 ? "æ¯" : "å¦" }} |
| | | </p> |
| | | <!-- <p v-if="currentLocation.location_state > 0"> |
| | | <strong>ç©æç¼ç :</strong> |
| | | {{ currentLocation.material_code || "æ " }} |
| | | </p> |
| | | <p v-if="currentLocation.location_state > 0"> |
| | | <strong>æ°é:</strong> {{ currentLocation.quantity || "æ " }} |
| | | </p> --> |
| | | <transition name="tooltip-fade"> |
| | | <div v-if="showTooltipFlag" class="location-tooltip" :style="{ |
| | | left: tooltipPosition.x + 'px', |
| | | top: tooltipPosition.y + 'px' |
| | | }"> |
| | | <div v-if="currentLocation" class="tooltip-content"> |
| | | <div class="tooltip-header"> |
| | | <h4>{{ currentLocation.locationCode }}</h4> |
| | | <span class="status-badge" :class="getStatusClass(currentLocation)"> |
| | | {{ getStatusText(currentLocation) }} |
| | | </span> |
| | | </div> |
| | | <div class="tooltip-body"> |
| | | <div class="info-section"> |
| | | <h5>åºæ¬ä¿¡æ¯</h5> |
| | | <div class="info-row"> |
| | | <span class="label">è´§ä½å·:</span> |
| | | <span class="value">{{ currentLocation.locationCode }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">ç¶æ:</span> |
| | | <span class="value status-highlight" :class="getStatusClass(currentLocation)"> |
| | | {{ getStatusText(currentLocation) }} |
| | | </span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">ç¦ç¨:</span> |
| | | <span class="value" :class="{ 'disabled': currentLocation.location_lock == 2 }"> |
| | | {{ currentLocation.location_lock == 2 ? 'æ¯' : 'å¦' }} |
| | | </span> |
| | | </div> |
| | | </div> |
| | | <div v-if="currentLocation.stockInfo != null" class="info-section"> |
| | | <h5>åºåä¿¡æ¯</h5> |
| | | <div class="info-row"> |
| | | <span class="label">PVI:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.pvi }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">æ»æ©å·:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.palletCode }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">å··éå·:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.roadwayNo }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">车å:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.vehicleCharacteristic }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">å·¥åç±»å:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.workOrderType }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">车身é¢è²:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.carBodyCharacteristic }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">车身类å:</span> |
| | | <span class="value">{{ getcarType(currentLocation.stockInfo.carType) }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">å½©è½¦èº«ç©æå·:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.pbMaterial }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">ç½è½¦èº«ç©æå·:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.biwMaterialCode }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">çè£
ä¸çº¿æ¶é´:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.biwInPassTime }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">天çªç¹å¾:</span> |
| | | <span class="value">{{ currentLocation.stockInfo.skylightCharacteristic }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">æå¨éå®:</span> |
| | | <span class="value">{{ getlockOrder(currentLocation.stockInfo.lockOrder) }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">éå®ç¶æ:</span> |
| | | <span class="value">{{ getstockStatus(currentLocation.stockInfo.stockStatus) }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">ä»»å¡ç¶æ:</span> |
| | | <span class="value">{{ gettaskStatus(currentLocation.stockInfo.taskStatus) }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </transition> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { ElButton } from "element-plus"; |
| | | import { ElButton } from 'element-plus' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | slectData: [], |
| | | scList: [], |
| | | Area: { areaName: "", areaCode: "" }, |
| | | mian_height: "", |
| | | Area: { areaName: '', areaCode: '' }, |
| | | mian_height: '', |
| | | infoMsg: [ |
| | | { bgcolor: "lightgreen", msg: "空货ä½", state: 0 }, |
| | | { bgcolor: "orange", msg: "æè´§", state: 2 }, |
| | | { bgcolor: "#2BB3D5", msg: "éå®", state: 1 }, |
| | | { bgcolor: "#ccc", msg: "ç¦ç¨", state: 9 }, |
| | | // { bgcolor: "red", msg: "ç¦ç¨", state: 3 }, |
| | | { bgcolor: "blue", msg: "åºåº", state: "3" }, |
| | | { bgcolor: "pink", msg: "å
¥åº", state: "4" }, |
| | | { bgcolor: 'lightgreen', msg: '空货ä½', state: 0 }, |
| | | { bgcolor: 'orange', msg: 'æè´§', state: 2 }, |
| | | { bgcolor: '#2BB3D5', msg: 'éå®', state: 1 }, |
| | | { bgcolor: '#ccc', msg: 'ç¦ç¨', state: 9 }, |
| | | { bgcolor: 'blue', msg: 'åºåº', state: '3' }, |
| | | { bgcolor: 'pink', msg: 'å
¥åº', state: '4' } |
| | | ], |
| | | locationData: [], |
| | | showTooltipFlag: false, |
| | | currentLocation: null, |
| | | tooltipPosition: { x: 0, y: 0 }, |
| | | }; |
| | | tooltipPosition: { x: 20, y: 20 } |
| | | } |
| | | }, |
| | | computed: { |
| | | GetBgColor(col) { |
| | | return (col) => { |
| | | var bgColor =''; |
| | | var bgColor = '' |
| | | //ä¼å
æ¾ç¤ºç¦ç¨ç¶æ |
| | | if (col.location_lock == 2) { |
| | | this.infoMsg.forEach((el) => { |
| | | if (el.state == col.location_lock) { |
| | | bgColor = "#ccc"; |
| | | bgColor = '#ccc' |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | }) |
| | | } else { |
| | | this.infoMsg.forEach((el) => { |
| | | if (el.state == col.location_state) { |
| | | bgColor = el.bgcolor; |
| | | if (el.state == col.location_state) { |
| | | bgColor = el.bgcolor |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | return bgColor; |
| | | }; |
| | | }, |
| | | return bgColor |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | //忢åºåº |
| | | "Area.areaCode"(newValue, oldValue) { |
| | | this.scList = []; |
| | | 'Area.areaCode'(newValue, oldValue) { |
| | | this.scList = [] |
| | | this.slectData.forEach((e) => { |
| | | if (e.areaCode == newValue) { |
| | | this.Area.areaCode = e.areaCode[0]; |
| | | this.Area.areaCode = e.areaCode[0] |
| | | //this.scList = e.tunnel; |
| | | } |
| | | }); |
| | | this.GetViewData(); |
| | | }, |
| | | }) |
| | | this.GetViewData() |
| | | } |
| | | }, |
| | | methods: { |
| | | GetViewData() { |
| | | var _this = this; |
| | | this.http |
| | | .post("/api/LocationInfo/GetLocationStatu", _this.Area, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | _this.locationData = x; |
| | | console.log("å端è¿å:", x); |
| | | }); |
| | | var _this = this |
| | | this.http.post('/api/LocationInfo/GetLocationStatu', _this.Area, 'æ¥è¯¢ä¸').then((x) => { |
| | | _this.locationData = x |
| | | console.log('å端è¿å:', x) |
| | | }) |
| | | }, |
| | | // 忢æ |
| | | SCChange() { |
| | | this.GetViewData(); |
| | | this.GetViewData() |
| | | }, |
| | | showTooltip(location, event) { |
| | | this.currentLocation = location; |
| | | this.showTooltipFlag = true; |
| | | this.currentLocation = location |
| | | this.showTooltipFlag = true |
| | | |
| | | // 设置æç¤ºæ¡ä½ç½®ï¼ç¨å¾®åç§»é¿å
鮿¡é¼ æ |
| | | this.tooltipPosition = { |
| | | x: event.clientX + 10, |
| | | y: event.clientY + 10, |
| | | }; |
| | | // è·åæç¤ºæ¡çé¢ä¼°å®½åº¦ |
| | | const tooltipWidth = 300 |
| | | const tooltipHeight = 400 |
| | | const offsetX = 15 |
| | | const offsetY = 15 |
| | | |
| | | // è®¡ç®æç¤ºæ¡ä½ç½®ï¼ä¼å
æ¾ç¤ºå¨é¼ æ 䏿¹ |
| | | let x = event.clientX + offsetX |
| | | let y = event.clientY - tooltipHeight - offsetY |
| | | |
| | | // 妿䏿¹ç©ºé´ä¸è¶³ï¼åæ¾ç¤ºå¨ä¸æ¹ |
| | | if (y < 10) { |
| | | y = event.clientY + offsetY |
| | | } |
| | | |
| | | // æ£æ¥å³ä¾§è¾¹ç |
| | | if (x + tooltipWidth > window.innerWidth) { |
| | | x = event.clientX - tooltipWidth - offsetX |
| | | } |
| | | |
| | | // ç¡®ä¿ä¸ä¼è¶
åºå·¦è¾¹çåä¸è¾¹ç |
| | | x = Math.max(10, x) |
| | | y = Math.max(10, y) |
| | | |
| | | this.tooltipPosition = { x, y } |
| | | }, |
| | | |
| | | hideTooltip() { |
| | | this.showTooltipFlag = false; |
| | | this.currentLocation = null; |
| | | this.showTooltipFlag = false |
| | | this.currentLocation = null |
| | | }, |
| | | |
| | | getStatusText(location) { |
| | | // if (location.location_lock === 3) return "ç¦ç¨"; |
| | | if (location.location_state === '0') return "空货ä½"; |
| | | if (location.location_state === '1') return "éå®"; |
| | | if (location.location_state === '3') return "æè´§éå®"; |
| | | if (location.location_state === '4') return "空é²éå®"; |
| | | if (location.location_state === '2') return "æè´§"; |
| | | if (location.location_state === '0') return '空货ä½' |
| | | if (location.location_state === '1') return 'éå®' |
| | | if (location.location_state === '3') return 'æè´§éå®' |
| | | if (location.location_state === '4') return '空é²éå®' |
| | | if (location.location_state === '2') return 'æè´§' |
| | | // if (location.location_state > 0 && location.location_state < 100) |
| | | // return "éå®"; |
| | | return "å
¶ä»"; |
| | | return 'å
¶ä»' |
| | | }, |
| | | getStatusClass(location) { |
| | | if (location.location_state === '0') return 'status-empty' |
| | | if (location.location_state === '1') return 'status-locked' |
| | | if (location.location_state === '3') return 'status-locked-with-stock' |
| | | if (location.location_state === '4') return 'status-locked-empty' |
| | | if (location.location_state === '2') return 'status-with-stock' |
| | | return 'status-other' |
| | | }, |
| | | getcarType(carType) { |
| | | if (carType == 1) return 'ç½è½¦èº«' |
| | | if (carType == 2) return '彩车身' |
| | | if (carType == 3) return 'ç©ºæ»æ©' |
| | | }, |
| | | getlockOrder(lockOrder) { |
| | | if (lockOrder == 1) return 'å·²é车' |
| | | if (lockOrder == 0) return 'æªæå¨' |
| | | }, |
| | | getstockStatus(stockStatus) { |
| | | if (stockStatus == 1) return 'å·²éå®' |
| | | if (stockStatus == 0) return 'æªéå®' |
| | | }, |
| | | gettaskStatus(taskStatus) { |
| | | if (taskStatus == 1) return 'ä»»å¡ä¸' |
| | | if (taskStatus == 0) return 'æ ä»»å¡' |
| | | } |
| | | }, |
| | | mounted() { |
| | | var mainHeight = document.getElementById("vol-main"); |
| | | this.mian_height = mainHeight.offsetHeight - 40 + "px"; |
| | | var _this = this; |
| | | var mainHeight = document.getElementById('vol-main') |
| | | this.mian_height = mainHeight.offsetHeight - 40 + 'px' |
| | | var _this = this |
| | | //å è½½ä¸æé项 |
| | | this.http.get("/api/dt_AreaInfo/GetAreaInfo", {}, "æ¥è¯¢ä¸").then((x) => { |
| | | console.log(x); |
| | | _this.slectData = x; |
| | | this.http.get('/api/dt_AreaInfo/GetAreaInfo', {}, 'æ¥è¯¢ä¸').then((x) => { |
| | | console.log(x) |
| | | _this.slectData = x |
| | | //å 载第ä¸ä¸ªåºåï¼ç¬¬ä¸æ |
| | | _this.Area.areaCode = _this.slectData[0].areaCode; |
| | | _this.Area.areaCode = _this.slectData[0].areaCode |
| | | //_this.scList = _this.slectData[0].tunnel; |
| | | }); |
| | | }) |
| | | }, |
| | | components: { ElButton }, |
| | | }; |
| | | components: { ElButton } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | position: fixed; |
| | | z-index: 9999; |
| | | background-color: white; |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px; |
| | | padding: 10px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| | | border: 1px solid #e4e7ed; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | pointer-events: none; |
| | | max-width: 250px; |
| | | max-width: 320px; |
| | | min-width: 280px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .location-tooltip p { |
| | | margin: 5px 0; |
| | | .tooltip-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .tooltip-header { |
| | | padding: 12px 16px; |
| | | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| | | color: white; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .tooltip-header h4 { |
| | | margin: 0; |
| | | font-size: 15px; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .status-badge { |
| | | padding: 4px 10px; |
| | | border-radius: 12px; |
| | | font-size: 12px; |
| | | font-weight: 500; |
| | | background-color: rgba(255, 255, 255, 0.2); |
| | | backdrop-filter: blur(4px); |
| | | } |
| | | |
| | | .status-empty { |
| | | background-color: rgba(144, 238, 144, 0.9); |
| | | } |
| | | |
| | | .status-locked { |
| | | background-color: rgba(43, 179, 213, 0.9); |
| | | } |
| | | |
| | | .status-locked-with-stock { |
| | | background-color: rgba(255, 165, 0, 0.9); |
| | | } |
| | | |
| | | .status-locked-empty { |
| | | background-color: rgba(255, 182, 193, 0.9); |
| | | } |
| | | |
| | | .status-with-stock { |
| | | background-color: rgba(255, 99, 71, 0.9); |
| | | } |
| | | |
| | | .status-other { |
| | | background-color: rgba(153, 153, 153, 0.9); |
| | | } |
| | | |
| | | .tooltip-body { |
| | | padding: 16px; |
| | | } |
| | | |
| | | .info-section { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .info-section:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .info-section h5 { |
| | | margin: 0 0 10px 0; |
| | | font-size: 13px; |
| | | line-height: 1.4; |
| | | color: #909399; |
| | | text-transform: uppercase; |
| | | letter-spacing: 0.5px; |
| | | padding-bottom: 6px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .location-tooltip strong { |
| | | display: inline-block; |
| | | width: 70px; |
| | | color: #666; |
| | | .info-row { |
| | | display: flex; |
| | | margin-bottom: 8px; |
| | | align-items: center; |
| | | } |
| | | </style> |
| | | |
| | | .info-row:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .info-row .label { |
| | | flex-shrink: 0; |
| | | width: 100px; |
| | | color: #606266; |
| | | font-size: 13px; |
| | | } |
| | | |
| | | .info-row .value { |
| | | flex: 1; |
| | | color: #303133; |
| | | font-size: 13px; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .info-row .value.disabled { |
| | | color: #f56c6c; |
| | | font-weight: 500; |
| | | background-color: #fef0f0; |
| | | padding: 2px 8px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .info-row .value.status-highlight { |
| | | font-weight: 600; |
| | | padding: 2px 8px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .status-highlight.status-empty { |
| | | color: #67c23a; |
| | | background-color: #f0f9ff; |
| | | } |
| | | |
| | | .status-highlight.status-locked { |
| | | color: #409eff; |
| | | background-color: #ecf5ff; |
| | | } |
| | | |
| | | .status-highlight.status-locked-with-stock { |
| | | color: #e6a23c; |
| | | background-color: #fdf6ec; |
| | | } |
| | | |
| | | .status-highlight.status-locked-empty { |
| | | color: #f56c6c; |
| | | background-color: #fef0f0; |
| | | } |
| | | |
| | | .status-highlight.status-with-stock { |
| | | color: #67c23a; |
| | | background-color: #f0f9ff; |
| | | } |
| | | |
| | | .status-highlight.status-other { |
| | | color: #909399; |
| | | background-color: #f4f4f5; |
| | | } |
| | | |
| | | /* æ·»å è¿æ¸¡å¨ç» */ |
| | | .tooltip-fade-enter-active, |
| | | .tooltip-fade-leave-active { |
| | | transition: opacity 0.2s, transform 0.2s; |
| | | } |
| | | |
| | | .tooltip-fade-enter-from, |
| | | .tooltip-fade-leave-to { |
| | | opacity: 0; |
| | | transform: translateY(5px); |
| | | } |
| | | </style> |