From 3a35ead8b65369b0625ac6091547840ed705eb38 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Wed, 11 Dec 2024 17:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=B6=E4=BD=8D/=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/device/index.js | 147 ++++++ src/assets/styles/manage.scss | 173 ++++++++ src/assets/styles/mixin.scss | 10 + src/router/routers.js | 12 +- .../venueDevice/bookshelf/index.vue | 3 +- .../venueDevice/bookshelfPosition/index.vue | 373 +++++++++++++++- .../visualCheck/venueDevice/device/index.vue | 417 +++++++++++++++++- 8 files changed, 1120 insertions(+), 16 deletions(-) create mode 100644 src/api/device/index.js diff --git a/package.json b/package.json index 1bd397d..528795b 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "v-viewer": "^1.6.4", "vkbeautify": "^0.99.3", "vue": "^2.6.14", + "vue-awesome-swiper": "^3.1.3", "vue-count-to": "^1.0.13", "vue-cropper": "0.4.9", "vue-demi": "^0.14.7", diff --git a/src/api/device/index.js b/src/api/device/index.js new file mode 100644 index 0000000..7c2789f --- /dev/null +++ b/src/api/device/index.js @@ -0,0 +1,147 @@ +import request from '@/utils/request' + +export function getSupplier() { + return request({ + url: 'api/supplier/dropdown-list', + method: 'get' + }) +} + +export function add(data) { + const url = getUrl(data, 'add') + return request({ + url: url, + method: 'post', + data + }) +} + +export function del(data) { + return request({ + url: '/api/device/delete', + method: 'delete', + data + }) +} + +export function edit(data) { + const url = getUrl(data, 'edit') + return request({ + url: url, + method: 'put', + data + }) +} + +export function getDeviceType() { + return request({ + url: 'api/device/type', + method: 'get' + }) +} + +export function getDeviceById(params) { + return request({ + url: 'api/device/state', + method: 'get', + params + }) +} +export function getDesecabinetById(params) { + return request({ + url: 'api/desecabinet/query', + method: 'get', + params + }) +} + +export function getRotarycabinetById(params) { + return request({ + url: 'api/rotarycabinet/query', + method: 'get', + params + }) +} + +function getUrl(data, optTYpe) { + let url = 'api/desecabinet/' + if (data.deviceTypeId.name === '密集架') { + url = 'api/desecabinet/' + } else if (data.deviceTypeId.name === '回转柜') { + url = 'api/rotarycabinet/' + } else if (data.deviceTypeId.name === '摄像头') { + url = 'api/camera/' + } else if (data.deviceTypeId.name === '空调' || data.deviceTypeId.name === '桌面式RFID读写器' || data.deviceTypeId.name === '盘点机' || data.deviceTypeId.name === '恒湿机' || data.deviceTypeId.name === '漏水传感器' || data.deviceTypeId.name === '温湿度感应器' || data.deviceTypeId.name === '空气质量检测设备' || data.deviceTypeId.name === '漏水传感器') { + url = 'api/insidedevices/' + } else if (data.deviceTypeId.name === '通道门' || data.deviceTypeId.name === '手持式RFID读写器') { + url = 'api/outsidedevices/' + } + if (optTYpe === 'add') { + url += 'create' + } else if (optTYpe === 'edit') { + url += 'update' + } + return url +} +export function getDeviceList(params) { + return request({ + url: 'api/device/list', + method: 'get', + params + }) +} + +// 根据区列获取在库已借数 +export function FetchInBorrowByQuCol(params) { + return request({ + url: 'api/tag/getInBorrowByQuCol', + method: 'get', + params + }) +} + +export function unbind(data) { + return request({ + url: 'api/displayconfig/unbind', + method: 'post', + data + }) +} + +// 打开架体具体某一列 +export function FetchCallExternalOpenCol(params) { + return request({ + url: 'api/callExternal/openCol', + method: 'get', + params + }) +} + +// 密集架合架 +export function FetchCallExternalResetCol(params) { + return request({ + url: 'api/callExternal/reset', + method: 'get', + params + }) +} + +// 密集架通风 +export function FetchCallExternalVent(params) { + return request({ + url: 'api/callExternal/vent', + method: 'get', + params + }) +} + +// 停止移动 +export function FetchCallExternalStopMove(params) { + return request({ + url: 'api/callExternal/stopMove', + method: 'get', + params + }) +} + +export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchInBorrowByQuCol, unbind, FetchCallExternalOpenCol, FetchCallExternalResetCol, FetchCallExternalVent, FetchCallExternalStopMove } diff --git a/src/assets/styles/manage.scss b/src/assets/styles/manage.scss index 3b95919..30b4ac3 100644 --- a/src/assets/styles/manage.scss +++ b/src/assets/styles/manage.scss @@ -8,6 +8,7 @@ padding: 16px 30px 10px 20px; color: #0C0E1E; background-color: #fff; + border-bottom: 1px solid #EDEFF3; h4{ font-size: 18px; i{ @@ -173,4 +174,176 @@ border-color: #0348F3; } } +} + + +.bookshelf-main{ + height: calc(100% - 80px); + padding: 20px; + background-color: #fff; +} + +.bookshelf-top{ + display: flex; + justify-content: space-between; + align-items: flex-start; +} + +.bookshelf-info{ + flex: 1; + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + li{ + width: calc(100% / 3); + line-height: 40px; + color: #545B65; + p{ + display: inline-block; + color: #0C0E1E; + } + } +} + +.bookshelf-layer-info{ + display: flex; + justify-content: space-between; + +} + +.bookshelf-left{ + flex: 1; +} + +.bookshelf-right-info{ + width: 260px; + padding: 20px; + margin: 52px 0 0 0; + border: 1px solid #EDEFF3; + .layer-status{ + display: flex; + justify-content: space-between; + .row-state{ + margin: 0 5px; + padding: 0; + width: 50%; + height: 34px; + line-height: 34px; + font-size: 14px; + } + } + .layer-name{ + font-size: 20px; + font-weight: bold; + text-align: center; + color: #0C0E1E; + padding: 40px 0; + } + .layer-code-sort{ + display: flex; + justify-content: space-between; + align-items: stretch; + ul { + flex: 1; + li { + margin-bottom: 10px; + p { + font-weight: bold; + color: #0C0E1E; + margin-bottom: 5px; + } + &:last-child{ + margin-bottom: 0; + } + // span{ + // display: block; + // height: 26px; + // line-height: 26px; + // } + } + } + .edit-callNumber{ + width: 90px; + font-size: 24px; + i{ + display: block; + font-style: normal; + text-align: justify; + &:first-child{ + padding-bottom: 4px; + } + } + } + } + .layer-handle{ + padding-top: 30px; + margin-top: 30px; + border-top: 1px solid #EDEFF3; + li{ + display: flex; + justify-content: flex-start; + margin-bottom: 20px; + p{ + padding-right: 20px; + font-weight: bold; + color: #0C0E1E; + } + } + } +} + +.cabinet-row{ + display: flex; + flex: 1; + flex-wrap: wrap; + text-align: center; + height: 100%; + .cabinet-cell{ + position: relative; + font-size: 20px; + border: 1px solid #A6ADB6; + overflow: hidden; + // &:nth-last-of-type(-n+4) { + // margin-bottom: 0; + // } + // &:nth-child(4n){ + // margin-right: 0; + // } + span{ + display: block; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + z-index: 9; + } + &.active{ + color: #fff; + background-color: #A6ADB6; + } + } + .in-all, .out-all, .out-part, .in-part{ + position: relative; + width: 100%; + span{ + display: block; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + z-index: 9; + } + } + .in-all, .out-all{ + height: 100%; + } + .out-part, .in-part{ + height: 50%; + } + .out-all, .out-part{ + background-color: #F65163; + } + .in-all, .in-part{ + background-color: #1AAE93; + } } \ No newline at end of file diff --git a/src/assets/styles/mixin.scss b/src/assets/styles/mixin.scss index de40de5..e865f22 100644 --- a/src/assets/styles/mixin.scss +++ b/src/assets/styles/mixin.scss @@ -1060,6 +1060,11 @@ border: 1px solid #FEBD98; opacity: 0.6; } + &.other-state{ + color: #8B43F0; + border: 1px solid #CAA4FF; + opacity: 0.6; + } } [data-theme="light"] & { &.ing-state{ @@ -1082,5 +1087,10 @@ background-color: #FFF3E5; border: 1px solid #FEBD98 } + &.other-state{ + color: #8B43F0; + background-color: #F4EDFF; + border: 1px solid #CAA4FF; + } } } \ No newline at end of file diff --git a/src/router/routers.js b/src/router/routers.js index 89f732b..6316061 100644 --- a/src/router/routers.js +++ b/src/router/routers.js @@ -65,7 +65,7 @@ export const constantRouterMap = [ ] }, { - path: '/bookshelfPosition', + path: '/bookshelf', component: Layout, hidden: true, redirect: 'noredirect', @@ -73,20 +73,12 @@ export const constantRouterMap = [ { path: 'bookshelfPosition', component: (resolve) => require(['@/views/visualCheck/venueDevice/bookshelfPosition/index'], resolve), - name: '/check/venueDevice/bookshelf/bookshelfPosition', + name: '架位列表', meta: { title: '架位列表', noCache: true, activeMenu: '/check/venueDevice/bookshelf' } } ] } // { - // path: '/check/venueDevice/bookshelf/bookshelfPosition', // 路径及携带参数 - // component: () => import('@/views/visualCheck/venueDevice/bookshelfPosition/index'), - // name: '架位列表', - // // meta.activeMunu 激活时的菜单,新开的页面需要挂在那个菜单下 - // meta: { title: '架位列表', noCache: true, activeMenu: '/check/venueDevice/bookshelf' }, - // hidden: true // 是否显示在菜单 - // } - // { // path: '/preview', // component: (resolve) => require(['@/views/preview/index'], resolve), // hidden: true diff --git a/src/views/visualCheck/venueDevice/bookshelf/index.vue b/src/views/visualCheck/venueDevice/bookshelf/index.vue index e7c6fc8..eef8567 100644 --- a/src/views/visualCheck/venueDevice/bookshelf/index.vue +++ b/src/views/visualCheck/venueDevice/bookshelf/index.vue @@ -335,8 +335,7 @@ export default { console.log(value) }, clickRowHandler(row) { - this.$router.push({ path: '/bookshelfPosition', query: { }}) - // this.$router.push({ path: '/check/venueDevice/bookshelf/bookshelfPosition', query: { }}) + this.$router.push({ path: '/bookshelf/bookshelfPosition', query: { }}) this.$refs.table.clearSelection() this.$refs.table.toggleRowSelection(row) // http://192.168.99.67:12010/api/fileRelevant/getImg?imgId=f6d3ecea-0456-4429-ba77-1a4921d5c806 diff --git a/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue b/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue index 08b1b54..21d89bf 100644 --- a/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue +++ b/src/views/visualCheck/venueDevice/bookshelfPosition/index.vue @@ -1,16 +1,385 @@ + - diff --git a/src/views/visualCheck/venueDevice/device/index.vue b/src/views/visualCheck/venueDevice/device/index.vue index 9c0f2e4..2981901 100644 --- a/src/views/visualCheck/venueDevice/device/index.vue +++ b/src/views/visualCheck/venueDevice/device/index.vue @@ -1,16 +1,429 @@ + -