src/api/Api.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/container/Map/Map.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/container/Map/addMachine.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/container/Map/img/machine.png | 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/container/Map/img/sd.png | 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/container/Map/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/container/deviceType/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/container/home/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/router/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/Api.js
@@ -1,7 +1,7 @@ /* * @Date: 2024-01-10 20:37:45 * @LastEditors: Sneed * @LastEditTime: 2024-01-10 22:47:45 * @LastEditTime: 2024-01-12 21:14:57 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/api/Api.js */ import ajax from '@/utils/ajax' @@ -18,8 +18,8 @@ } const getFnObj = { accountQuery: { url: '/account/pageQuery', method: 'POST' url: '/account/remainings', method: 'GET' } } // æ£å¼ç¯å¢é ç½®å°å @@ -67,11 +67,11 @@ } // export function getWsl(params) { return sendRequest(HttpConstants.getWsl, params) return getData(HttpConstants.getWsl, params) } export function getPcl(params) { return sendRequest(HttpConstants.getPcl, params) return getData(HttpConstants.getPcl, params) } export function getRequest (key,params) { src/container/Map/Map.vue
@@ -1,7 +1,7 @@ <!-- * @Date: 2024-01-05 23:47:53 * @LastEditors: Sneed * @LastEditTime: 2024-01-12 00:35:17 * @LastEditTime: 2024-01-12 22:28:57 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue --> <template> @@ -28,77 +28,58 @@ <!-- <div>å¢å å</div> --> <!-- <div>å é¤å</div> --> </div> <table> <tr v-for="(item, index) in map" :key="index"> <td v-if="v.rowspan !==0 && v.colspan!==0" :width="v.type ===1 ? '20px' : v.colspan * 400 + 'px'" :height="v.type ===1 ? '20px' : v.rowspan * 100+ 'px'" :class="{'active': (range.x !=='' && v.rowIndex >=range.x && v.rowIndex<=range.x1 && v.colIndex>=range.y && v.colIndex<=range.y1),aisle: v.type ===1}" @mousedown="e => onMousedown(e, v)" @mousemove="e => onMouseMove(e, v)" v-for="v in item" :rowspan="v.rowspan" :colspan="v.colspan" :key="v.rowIndex + '-' + v.colIndex"> <img @click="addDevice($event,v)" @mousedown="e => e.stopPropagation()" v-if="v.type ===2 && status!==2" src="./img/+.png" alt=""> </td> <!-- <td></td> --> </tr> <!-- <tr> <td></td> </tr> --> </table> <div :style="{width: (cols * height + 'px'),height: rows * height + 'px'}"> <table > <tr v-for="(item, index) in map" :key="index"> <td v-if="v.rowspan !==0 && v.colspan!==0" :width="v.colspan* height + 'px'" :height="v.rowspan* height + 'px'" :class="{'active': (range.x !=='' && v.rowIndex >=range.x && v.rowIndex<=range.x1 && v.colIndex>=range.y && v.colIndex<=range.y1),aisle: v.type ===1}" @mousedown="e => onMousedown(e, v)" @mousemove="e => onMouseMove(e, v)" v-for="v in item" :rowspan="v.rowspan" :colspan="v.colspan" :key="v.rowIndex + '-' + v.colIndex"> <img @click="addDevice($event,v)" @mousedown="e => e.stopPropagation()" v-if="v.type ===2 && status!==2 && !v.id" src="./img/+.png" alt=""> <div v-show="v.id" class="machine"> <p>YKX123123213</p> <div> <div class="img"> <img src="./img/machine.png" alt=""> </div> <ul> <li> <img src="./img/sd.png" alt=""> <div> <p>0.00%</p> <p>è½åå©ç¨ç</p> </div> </li> <li> <img src="./img/sd.png" alt=""> <div> <p>0.00%</p> <p>è½åå©ç¨ç</p> </div> </li> <li> <img src="./img/sd.png" alt=""> <div> <p>0.00%</p> <p>è½åå©ç¨ç</p> </div> </li> </ul> </div> </div> </td> <!-- <td></td> --> </tr> <!-- <tr> <td></td> </tr> --> </table> </div> </div> </div> <div class="map-add" v-else> <div class="map-add-item"> <span>ç»ä¸ç¼å·</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>设å¤åç§°</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>设å¤åå·</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>设å¤è§æ ¼</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>使ç¨åä½</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>ä¿å »è </span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>ä¿å »å¨æ</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>ä¿å »ç±»å</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>æ¯å¦åæ ¼</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>计åå¼å§æ¶é´</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>计å宿æ¶é´</span> <el-input class="value"></el-input> </div> <div class="map-add-item"> <span>ä¿å »å 容ä¸åå¨é®é¢</span> <el-input class="value"></el-input> </div> <div class="map-add-footer"> <el-button size="mini" @click="close">å ³é</el-button> <el-button type="primary" size="mini" @click="saveDevice">ä¿å</el-button> </div> </div> <addMachine :id="id" @setmachineId="setmachineId" v-else @close="close"/> </div> </template> @@ -130,13 +111,14 @@ type: String, }, id: { type: Number type: [Number,String] } }, data() { return { height: 0, plantName: '', rows: 10, rows: 20, cols: 50, map: null, // å°å¾æ°æ® addStatus: false, @@ -192,11 +174,16 @@ }, currentMap: { handler () { if (!this.currentMap || this.currentMap.length === 0) return if (this.currentMap.length > 0) this.map = this.currentMap this.rows = this.currentMap.length; this.cols = this.currentMap[0].length; }, immediate: true }, map () { this.height = (document.querySelector('.table').getBoundingClientRect().height - 30) / 20 } }, mounted() { this.$el.querySelector('table').addEventListener('contextmenu', this.contextmenu) @@ -204,11 +191,12 @@ if(this.status ===2) return this.tdMounseDown = false }) if (this.id) { // this.getmachineList() this.rows = this.currentMap.length this.cols = this.currentMap[0].length try { this.height = (document.querySelector('.table').getBoundingClientRect().height - 30) / 20 } catch (error) { } }, beforeUpdate() { try { @@ -390,7 +378,8 @@ .map-container { width: 100%; height: 100%; overflow: auto; padding: 20px; overflow: hidden; position: relative; display: flex; flex-direction: column; @@ -398,7 +387,7 @@ } .table-tool { padding: 10px 0; padding-bottom: 50px; display: flex; justify-content: flex-start; @@ -424,13 +413,12 @@ .table { // margin-top: 10px; display: flex; justify-content: flex-start; overflow-y: scroll; // display: flex; // justify-content: flex-start; width: 100%; padding: 20px; height: 100%; position: relative; overflow-x: scroll; .table-action { position: absolute; z-index: 999; @@ -446,14 +434,12 @@ } table { width: 2000px; height: 100%; width: 100%; border-collapse: collapse; // table-layout: fixed; word-wrap: break-word; // word-wrap: break-word; overflow: hidden; // box-sizing: border-box; td { // width: 50px; // height: 50px; @@ -461,11 +447,78 @@ border: 1px solid #1662DB; vertical-align: middle; text-align: center; img { & > img { width: 20px; height: 20px; cursor: pointer; } .machine { width: 100%; height: 100%; display: flex; flex-direction: column; & > p { margin-top: 20px; color: #E9FFFF; text-shadow: 0px 1px 11px #549BD4; background: linear-gradient(180deg, #9AFEFE 0%, #4B78CD 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-align: center; } & > div { flex: 1 1 auto; margin-top: 20px; display: flex; align-items: center; margin-bottom: 20px; overflow: hidden; .img { width: 50%; height: 100%; margin-left: 20px; border: 1px solid #444C55; border-radius: 10px; position: relative; img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; } } ul { flex: 1 1 auto; height: 100%; margin-left: 20px; list-style: none; display: flex; flex-direction: column; align-items: center; justify-content: space-around; li { width: 100%; display: flex; font-size: 12px; align-items: center; & > div { margin-left: 20px;; } p { color: #E9FFFF; text-shadow: 0px 1px 11px #549BD4; } img { width: 40px; height: 40px; } } } } } } td.active { background: #68D9FF!important; src/container/Map/addMachine.vue
@@ -1,7 +1,7 @@ <!-- * @Date: 2024-01-10 22:28:38 * @LastEditors: Sneed * @LastEditTime: 2024-01-10 23:19:26 * @LastEditTime: 2024-01-12 21:21:48 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/addMachine.vue --> <template> @@ -111,10 +111,10 @@ getWsl().then(res => { this.workshopList = res.data }) getRequest('accountQuery',{pageSize: 1000,current: 1}).then(res => { getRequest('accountQuery',{}).then(res => { console.log(res) try { this.accountList = res.data.records this.accountList = res.data } catch (error) { this.accountList = [] } @@ -123,6 +123,8 @@ }, methods: { saveDevice () { this.$emit('setmachineId',this.addInfo.id) return this.$http.postJson('/machine/save',{ ...this.addInfo, plantId: this.id src/container/Map/img/machine.png
src/container/Map/img/sd.png
src/container/Map/index.vue
@@ -1,12 +1,12 @@ <!-- * @Date: 2024-01-05 22:26:22 * @LastEditors: Sneed * @LastEditTime: 2024-01-12 00:36:43 * @LastEditTime: 2024-01-12 20:23:25 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/index.vue --> <template> <div class="workshop"> <Map v-if="status===0 || status === 1" :status="status" :currentMap="currentMap" :name="plantName" :id="id" @out="out" /> <Map v-if="status===0 || status === 1 && id" :status="status" :currentMap="currentMap" :name="plantName" :id="id" @out="out" /> <div v-else class="preview"> <div class="left"> <div @click="editMap" class="edit-btn"> @@ -44,7 +44,7 @@ <div class="right"> <Status v-show="false"/> <div class="preview-map"> <Map :status="2" :currentMap="currentMap" @out="out" /> <Map v-if="id" :status="2" :currentMap="currentMap" @out="out" /> </div> </div> </div> src/container/deviceType/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,190 @@ <!-- * @Date: 2024-01-06 17:40:19 * @LastEditors: Sneed * @LastEditTime: 2024-01-07 23:34:22 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/component/index.vue --> <template> <div class="maintenance"> <div class="nav">设å¤ä¿å »/æ¥å¸¸ä¿å »</div> <List ref="list" url="/component/pageQuery"> <template slot="search"> <div class="item"> <span>é¶ä»¶å·</span> <el-select class="item-value" v-model="queryInfo.component" placeholder="è¯·éæ©"> <el-option v-for="item in componentList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </div> <div class="item"> <span>å·¥åºå·</span> <!-- <el-input class="item-value" v-model="query.no"></el-input> --> <el-select class="item-value" v-model="queryInfo.precess" placeholder="è¯·éæ©"> <el-option v-for="item in precessList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </div> <div class="item"> <span>å¼å§æ¶é´</span> <!-- <el-input class="item-value" v-model="query.no"></el-input> --> <el-date-picker class="item-value" v-model="queryInfo.timeBegin" align="right" value-format="yyyy-MM-dd" type="date" placeholder="éæ©æ¥æ"> </el-date-picker> </div> <div class="item"> <span>ç»ææ¶é´</span> <el-date-picker class="item-value" v-model="queryInfo.timeEnd" align="right" value-format="yyyy-MM-dd" type="date" placeholder="éæ©æ¥æ"> </el-date-picker> </div> <div class="item"> <div class="query btn" @click="query">æ¥è¯¢</div> </div> <div class="item"> <div class="reset btn" @click="reset">éç½®</div> </div> </template> <template slot="columns"> <el-table-column prop="date" label="æºåºå" width="180"> </el-table-column> <el-table-column prop="component" label="é¶ä»¶å·" width="180"> </el-table-column> <el-table-column prop="address" label="å·¥åºå·"> </el-table-column> <el-table-column prop="address" label="å å·¥æ¶é´"> </el-table-column> </template> </List> </div> </template> <script> import List from '../list/index.vue' export default { components: { List }, data () { return { queryInfo: { timeBegin: '', timeEnd: '', precess: '', component: '' }, precessList: [], componentList: [] } }, created () { this.init() this.getProtocolList() }, methods: { reset () { Object.keys(this.queryInfo).forEach(key => { this.queryInfo[key] = '' }) }, query () { this.$refs.list.pageQuery(this.queryInfo) }, changeTime (name,value) { console.log(name,value) this.queryInfo[name] = value }, init () { this.$http.get('/component/processlist').then(res => { this.precessList = res.data }) this.$http.post('/component/complist').then(res => { this.componentList = res.data }) } }, } </script> <style lang="scss"> .maintenance { .item-value { .el-input__inner { background: transparent; border-radius: 2px; border: 1px solid #435F9E; } } } </style> <style lang="scss" scoped> .maintenance { width: 100%; height: 100%; overflow: hidden; color: #FFF; display: flex; flex-direction: column; .nav { padding: 10px 30px; } .item { margin-top: 20px; margin-left: 50px; display: flex; align-items: center; span { width: 120px; font-size: 16px; font-family: PingFangSC, PingFang SC; color: #C6DCE0; text-align: right; padding-right: 20px; } .item-value { width: 200px; border: 1px solid #435F9E; } .btn { line-height: 1.5; width: 100px; text-align: center; font-size: 16px; cursor: pointer; } .reset { background: #AAB6BA; color: #FFF; } .query { background: #5DD1FC; color: #FFF; } } } </style> src/container/home/index.vue
@@ -49,7 +49,7 @@ </span> <ul v-if="showSub"> <li @click="navigateTo('ledger')">å°è´¦</li> <li>2å</li> <li @click="navigateTo('deviceType')">设å¤ç±»å管ç</li> <li>2å</li> <li>2å</li> </ul> @@ -96,8 +96,8 @@ 4: 'maintenance', 7: 'component', ledger: 'ledger', deviceType: 'deviceType', } console.log(name, '>>>>>>>') if (name === this.activeId) { this.showSub = !this.showSub } else { src/router/index.js
@@ -62,6 +62,12 @@ name: 'ledger', component: () => import('@/container/ledger/index') }, // å°è´¦ { path: 'deviceType', name: 'deviceType', component: () => import('@/container/deviceType/index') }, ] }, {