Ver Fonte

电池自检

renmy há 3 anos atrás
pai
commit
e8badfa696

+ 9 - 0
src/api/device/storage.js

@@ -43,4 +43,13 @@ export function storageInCheckInfo(data) {
         method: 'post',
         data
     })
+}
+
+//电池自检
+export function selfCheck(data) {
+    return request({
+        url: '/api/v1/appdevice/selfCheck',
+        method: 'post',
+        data
+    })
 }

+ 2 - 2
src/router/index.js

@@ -49,7 +49,7 @@ export const constantRoutes = [{
             },
             {
                 path: 'workbench/details',
-                name: 'Details',
+                name: 'WorkbenchDetails',
                 component: () =>
                     import ('@/views/device/workbench/details'),
                 meta: { title: '设备详情', icon: '' },
@@ -126,7 +126,7 @@ export const constantRoutes = [{
             },
             {
                 path: 'allocation/details',
-                name: 'Details',
+                name: 'AllocationDetails',
                 component: () =>
                     import ('@/views/device/allocation/details'),
                 hidden: true,

+ 1 - 6
src/views/device/allocation/allocationAdd.vue

@@ -125,12 +125,6 @@
 							{{ scope.row.add_time }}
 						</template>
 					</el-table-column>
-
-					<!-- <el-table-column align="center" label="查看明细" width="180">
-						<template slot-scope="scope">
-							<el-button @click="cerateHandle(scope.row.id, 1)" type="text">查看</el-button>
-						</template>
-					</el-table-column> -->
 				</el-table>
 
 				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
@@ -153,6 +147,7 @@ import AddOrUpdate from '@/views/device/allocation/allocation-modal.vue'
 import addBatch from '@/views/device/allocation/allocationBatch-modal.vue'
 
 export default {
+	name: 'AllocationAdd',
   components: { AddOrUpdate, addBatch },
   data() {
     return {

+ 1 - 0
src/views/device/allocation/allocationBack.vue

@@ -76,6 +76,7 @@ import BackModal from './back-modal.vue'
 // import Create from './create'
 
 export default {
+  name: 'AllocationBack',
   components: { BackModal  },
   data() {
     return {

+ 1 - 0
src/views/device/allocation/details.vue

@@ -88,6 +88,7 @@
 import { detailList } from '@/api/device/allocation'
 
 export default {
+  name: 'AllocationDetails',
   components: { },
   data() {
     return {

+ 1 - 0
src/views/device/allocation/index.vue

@@ -353,6 +353,7 @@
 import { transferList } from '@/api/device/allocation'
 import { dataTotle } from '@/api/device/info'
 export default {
+  name: 'Allocation',
   components: {  },
   data() {
     return {

+ 1 - 0
src/views/device/configure/accessoriesType.vue

@@ -65,6 +65,7 @@ import { postJson, getSort } from '@/api/page'
 import AddOrUpdate from '@/views/device/configure/accessories-add-or-update.vue'
 
 export default {
+	name: 'AccessoriesType',
   components: { AddOrUpdate },
   data() {
     return {

+ 1 - 0
src/views/device/configure/batteryCode.vue

@@ -422,6 +422,7 @@ import { batteryCodeList, deleteBatteryCode } from '@/api/device/configure'
 import AddOrUpdate from '@/views/device/configure/code-add-or-update.vue'
 
 export default {
+	name: 'BatteryCode',
   components: { AddOrUpdate },
   data() {
     return {

+ 1 - 0
src/views/device/configure/carCode.vue

@@ -251,6 +251,7 @@ import { batteryCodeList, deleteBatteryCode } from '@/api/device/configure'
 import AddOrUpdate from '@/views/device/configure/carCode-add-or-update.vue'
 
 export default {
+	name: 'CarCode',
   components: { AddOrUpdate },
   data() {
     return {

+ 1 - 0
src/views/device/configure/index.vue

@@ -72,6 +72,7 @@
 
 <script>
 export default {
+	name: 'Configure',
   data() {
     return {
 			activeName: 'first'

+ 1 - 0
src/views/device/configure/partsCode.vue

@@ -310,6 +310,7 @@ import { batteryCodeList, deleteBatteryCode } from '@/api/device/configure'
 import AddOrUpdate from '@/views/device/configure/code-add-or-update.vue'
 
 export default {
+	name: 'PartsCode',
   components: { AddOrUpdate },
   data() {
     return {

+ 1 - 0
src/views/device/delivery/batchOut.vue

@@ -98,6 +98,7 @@ import { batchStorageOutList } from '@/api/device/delivery'
 import Create from '@/views/device/delivery/batch-out-add.vue'
 
 export default {
+  name: 'BatchOut',
   components: { Create },
   data() {
     return {

+ 1 - 0
src/views/device/delivery/batchOutDetail.vue

@@ -94,6 +94,7 @@
 import { deliveryOutDetailList } from '@/api/device/delivery'
 
 export default {
+  name: 'BatchOutDetail',
   components: {  },
   data() {
     return {

+ 1 - 0
src/views/device/delivery/details.vue

@@ -88,6 +88,7 @@
 import { storageOutDetailList } from '@/api/device/delivery'
 
 export default {
+  nane: 'DeliveryDetail',
   components: {  },
   data() {
     return {

+ 1 - 0
src/views/device/delivery/index.vue

@@ -363,6 +363,7 @@ import { dataTotle } from '@/api/device/info'
 import Create from '@/views/device/delivery/delivery-add.vue'
 
 export default {
+  name: 'Delivery',
   components: { Create },
   data() {
     return {

+ 1 - 0
src/views/device/handle/index.vue

@@ -282,6 +282,7 @@ import Create from '@/views/device/handle/handle-add.vue'
 import Info from '@/views/device/handle/handle-info.vue'
 
 export default {
+  name: 'Handle',
   components: { Create, Info },
   data() {
     return {

+ 1 - 0
src/views/device/info/details.vue

@@ -115,6 +115,7 @@ import AddOrUpdate from '@/views/device/info/info-add-or-update.vue'
 import UpLoad from '@/views/device/info/up-load.vue'
 
 export default {
+  name: 'InfoDetails',
   components: { AddOrUpdate, UpLoad },
   data() {
     return {

+ 1 - 2
src/views/device/info/index.vue

@@ -389,13 +389,12 @@
 
 <script>
 import { getInfoList, dataTotle } from '@/api/device/info'
-import { getForm } from '@/api/page'
 import AddOrUpdate from '@/views/device/info/info-add-or-update.vue'
 import UpLoad from '@/views/device/info/up-load.vue'
-import { getToken } from '@/utils/auth'
 
 export default {
   components: { AddOrUpdate, UpLoad },
+  name: 'Info',
   data() {
     return {
       //表格加载动画

+ 1 - 0
src/views/device/storage/batchWarehousing.vue

@@ -99,6 +99,7 @@ import Create from '@/views/device/storage/create.vue'
 
 export default {
   components: { Create },
+  name: 'BatchWarehousing',
   data() {
     return {
       //列表加载动画

+ 9 - 2
src/views/device/storage/index.vue

@@ -373,13 +373,14 @@
 </template>
 
 <script>
-import { storageInList } from '@/api/device/storage'
+import { storageInList, selfCheck } from '@/api/device/storage'
 import { dataTotle } from '@/api/device/info'
 import Create from '@/views/device/storage/create.vue'
 import Check from '@/views/device/storage/checkModal.vue'
 
 export default {
   components: { Create, Check },
+  name: 'Storage',
   data() {
     return {
       //列表加载动画
@@ -515,7 +516,13 @@ export default {
     gotoHandle() {
       this.$router.push('/device/storage/batchWarehousing')
     },
-    checked(sn, type) {
+
+    async checked(sn, type) {
+      await selfCheck({sn: sn}).then(res => {
+        if(res.code === 200) {
+          this.getDataList()
+        }
+      })
       this.checkVisible = true
       this.$nextTick(() => {
 				this.$refs.check.init()

+ 1 - 0
src/views/device/storage/warehousing.vue

@@ -95,6 +95,7 @@ import { signStorageInList, addStorageIn } from '@/api/device/storage'
 import Create from '@/views/device/storage/create.vue'
 import debounce from 'lodash/debounce'
 export default {
+  name: 'Warehousing',
   components: { Create },
   data() {
     return {

+ 1 - 0
src/views/device/workbench/details.vue

@@ -146,6 +146,7 @@
 <script>
 import { workDetail } from '@/api/device/workbench'
 export default {
+	name: 'WorkbenchDetails',
   data () {
     return {
       reverse: true,

+ 2 - 0
src/views/device/workbench/index.vue

@@ -151,6 +151,7 @@
 import { postJson, getSort } from '@/api/page'
 import { workList, dataSta } from '@/api/device/workbench'
 export default {
+	name: 'Workbench',
   components: {  },
   data() {
     return {
@@ -243,6 +244,7 @@ export default {
 				status: null
       }
 			this.getDataList()
+			this.getDataSta()
 		},
 		//搜索
     search() {