whj 11 tháng trước cách đây
mục cha
commit
5a6b2f7b16

BIN
src/assets/a/3.png


BIN
src/assets/a/4.png


BIN
src/assets/a/5.png


+ 3 - 0
src/router/generator-platform-routers.js

@@ -441,6 +441,9 @@ const constantRouterComponents = {
   // 设备闲置
   'IdleAssets': () => import('@/views/idle-assets/IdleAssets.vue'),
   'IdleAssetsMap': () => import('@/views/idle-assets-map/IdleAssetsMap.vue'),
+  'IdleAssetsStoreMap': () => import('@/views/idle-assets-map/IdleAssetsStoreMap.vue'),
+  'IdleAssetsSpareMap': () => import('@/views/idle-assets-map/IdleAssetsSpareMap.vue'),
+  'IdleAssetsRepairMap': () => import('@/views/idle-assets-map/IdleAssetsRepairMap.vue'),
   'SbPositionImg': () => import('@/views/sb-position/SbPositionImg.vue')
 
 }

+ 67 - 0
src/views/idle-assets-map/IdleAssetsRepairMap.vue

@@ -0,0 +1,67 @@
+<template>
+  <a-card>
+    <a-row :gutter="20">
+      <a-col :span="4">
+        <div
+          class="box"
+          :class="{'box-act':i === key}"
+          v-for="(item,i) in positionsList.slice(0, 2)"
+          :key="item.id"
+          style="text-align: center;"
+          @click="handleClick(i)">{{ item.name }}</div>
+      </a-col>
+      <a-col :span="20">
+        <img v-if="key" :src="img1" width="100%" alt="">
+        <img v-else :src="img2" width="100%" alt="">
+      </a-col>
+    </a-row>
+  </a-card>
+</template>
+
+<script>
+import img1 from '@/assets/a/1.png'
+import img2 from '@/assets/a/4.png'
+import { querySbPosition } from '@/api/sb/position'
+export default {
+  data () {
+    return {
+      img1,
+      img2,
+      positionsList: [],
+      key: 0
+    }
+  },
+  created () {
+    this.getInfo()
+  },
+  methods: {
+    getInfo () {
+      querySbPosition().then(res => {
+        this.positionsList = res.data
+      })
+    },
+    handleClick (i) {
+      this.key = i
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.box{
+ width: 100%;
+ height: 100px;
+ background: #fff;
+ color: #000;
+ text-align: center;
+ line-height: 100px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ margin-bottom: 10px;
+ cursor: pointer;
+}
+.box-act{
+  background: #1890ff;
+  color: #fff;
+}
+</style>

+ 67 - 0
src/views/idle-assets-map/IdleAssetsSpareMap.vue

@@ -0,0 +1,67 @@
+<template>
+  <a-card>
+    <a-row :gutter="20">
+      <a-col :span="4">
+        <div
+          class="box"
+          :class="{'box-act':i === key}"
+          v-for="(item,i) in positionsList.slice(0, 2)"
+          :key="item.id"
+          style="text-align: center;"
+          @click="handleClick(i)">{{ item.name }}</div>
+      </a-col>
+      <a-col :span="20">
+        <img v-if="key" :src="img1" width="100%" alt="">
+        <img v-else :src="img2" width="100%" alt="">
+      </a-col>
+    </a-row>
+  </a-card>
+</template>
+
+<script>
+import img1 from '@/assets/a/1.png'
+import img2 from '@/assets/a/5.png'
+import { querySbPosition } from '@/api/sb/position'
+export default {
+  data () {
+    return {
+      img1,
+      img2,
+      positionsList: [],
+      key: 0
+    }
+  },
+  created () {
+    this.getInfo()
+  },
+  methods: {
+    getInfo () {
+      querySbPosition().then(res => {
+        this.positionsList = res.data
+      })
+    },
+    handleClick (i) {
+      this.key = i
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.box{
+ width: 100%;
+ height: 100px;
+ background: #fff;
+ color: #000;
+ text-align: center;
+ line-height: 100px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ margin-bottom: 10px;
+ cursor: pointer;
+}
+.box-act{
+  background: #1890ff;
+  color: #fff;
+}
+</style>

+ 67 - 0
src/views/idle-assets-map/IdleAssetsStoreMap.vue

@@ -0,0 +1,67 @@
+<template>
+  <a-card>
+    <a-row :gutter="20">
+      <a-col :span="4">
+        <div
+          class="box"
+          :class="{'box-act':i === key}"
+          v-for="(item,i) in positionsList.slice(0, 2)"
+          :key="item.id"
+          style="text-align: center;"
+          @click="handleClick(i)">{{ item.name }}</div>
+      </a-col>
+      <a-col :span="20">
+        <img v-if="key" :src="img1" width="100%" alt="">
+        <img v-else :src="img2" width="100%" alt="">
+      </a-col>
+    </a-row>
+  </a-card>
+</template>
+
+<script>
+import img1 from '@/assets/a/1.png'
+import img2 from '@/assets/a/3.png'
+import { querySbPosition } from '@/api/sb/position'
+export default {
+  data () {
+    return {
+      img1,
+      img2,
+      positionsList: [],
+      key: 0
+    }
+  },
+  created () {
+    this.getInfo()
+  },
+  methods: {
+    getInfo () {
+      querySbPosition().then(res => {
+        this.positionsList = res.data
+      })
+    },
+    handleClick (i) {
+      this.key = i
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.box{
+ width: 100%;
+ height: 100px;
+ background: #fff;
+ color: #000;
+ text-align: center;
+ line-height: 100px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ margin-bottom: 10px;
+ cursor: pointer;
+}
+.box-act{
+  background: #1890ff;
+  color: #fff;
+}
+</style>

+ 2 - 2
src/views/workplace/backlog/RepairWorkplaceBacklog.vue

@@ -78,14 +78,14 @@
     </a-col>
     <a-col :span="5">
       <a-card title="维修地图">
-        <div class="top-left hover" @click="$router.push('/sb/position/img')">
+        <div class="top-left hover" @click="$router.push('/repair/view/map')">
           <img src="@/assets/bgView/zidi.png" width="100%" height="100%" alt="">
         </div>
       </a-card>
     </a-col>
     <a-col :span="5">
       <a-card title="保养地图">
-        <div class="top-left hover" @click="$router.push('/assets/idle/map')">
+        <div class="top-left hover" @click="$router.push('/repair/view/map')">
           <img src="@/assets/bgView/xiandi.png" width="100%" height="100%" alt="">
         </div>
       </a-card>

+ 3 - 3
src/views/workplace/backlog/SpareWorkplaceBacklog.vue

@@ -77,15 +77,15 @@
       </a-card>
     </a-col>
     <a-col :span="5">
-      <a-card title="备件地图">
+      <a-card title="仓库地图">
         <div class="top-left hover" @click="$router.push('/sb/position/img')">
           <img src="@/assets/bgView/zidi.png" width="100%" height="100%" alt="">
         </div>
       </a-card>
     </a-col>
     <a-col :span="5">
-      <a-card title="仓库地图">
-        <div class="top-left hover" @click="$router.push('/assets/idle/map')">
+      <a-card title="备件地图">
+        <div class="top-left hover" @click="$router.push('/spare/view/map')">
           <img src="@/assets/bgView/xiandi.png" width="100%" height="100%" alt="">
         </div>
       </a-card>

+ 1 - 1
src/views/workplace/backlog/StoreWorkplaceBacklog2.vue

@@ -85,7 +85,7 @@
     </a-col>
     <a-col :span="5">
       <a-card title="仓库预警地图">
-        <div class="top-left hover" @click="$router.push('/assets/idle/map')">
+        <div class="top-left hover" @click="$router.push('/store/view/map')">
           <img src="@/assets/bgView/xiandi.png" width="100%" height="100%" alt="">
         </div>
       </a-card>