Browse Source

界面调整,logo修改

任茂勇 3 years ago
parent
commit
7634acc5e1

BIN
public/favicon.ico


+ 10 - 0
src/api/device/allocation.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+//列表
+export function deliveryList(data) {
+  return request({
+    url: '/api/v1/apptransferlog/pageQuery',
+    method: 'post',
+    data
+  })
+}

+ 3 - 3
src/layout/components/Sidebar/Logo.vue

@@ -6,7 +6,7 @@
         <h1 v-else class="sidebar-title">{{ title }} </h1>
       </router-link>
       <router-link v-else key="expand" class="sidebar-logo-link" to="/">
-        <img v-if="logo" :src="logo" class="sidebar-logo">
+        <img v-if="logo" src="./static/logo.png" class="sidebar-logo">
         <h1 class="sidebar-title">{{ title }} </h1>
       </router-link>
     </transition>
@@ -55,8 +55,8 @@ export default {
     width: 100%;
 
     & .sidebar-logo {
-      width: 32px;
-      height: 32px;
+      width: 24px;
+      height: 24px;
       vertical-align: middle;
       margin-right: 12px;
     }

BIN
src/layout/components/Sidebar/static/logo.png


+ 44 - 20
src/views/device/allocation/allocationAdd.vue

@@ -3,24 +3,24 @@
     <h1><i class="el-icon-arrow-left" @click="goBack"></i>新增调拨</h1>
 		<el-tabs v-model="activeName" @tab-click="handleClick">
 			<el-tab-pane label="选择设备" name="first">
-				<el-form :inline="true" @keyup.enter.native="handleFilter()">
+				<el-form :inline="true" @keyup.enter.native="searchHandle()">
 					<el-form-item label="设备SN">
-						<el-input type="primary"></el-input>
+						<el-input type="primary" v-model="listQuery.sn" clearable></el-input>
 					</el-form-item>
 					<el-form-item style="float: right;">
-						<el-button type="primary" @click="cerateHandle()">查询</el-button>
+						<el-button type="primary" @click="searchHandle()">查询</el-button>
+						<el-button @click="resetForm()">重置</el-button>
 					</el-form-item>
 				</el-form>
 				<el-table
-					v-loading="page.loading"
-					:data="page.data"
+					v-loading="loading"
+					:data="data"
 					element-loading-text="Loading"
 					:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 					:cell-style="{'text-align':'center'}"
 					border
 					fit
 					highlight-current-row
-					@sort-change="sortChange"
 				>
 					<el-table-column label="设备SN">
 						<template slot-scope="scope">
@@ -59,23 +59,29 @@
 					</el-table-column>
 				</el-table>
 
-				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 					layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 					@current-change="pageCurrentChangeHandle">
 				</el-pagination>
 			</el-tab-pane>
 			<el-tab-pane label="选择批次" name="second">
-				<el-form :inline="true" @keyup.enter.native="handleFilter()">
+				<el-form :inline="true" @keyup.enter.native="searchHandle()">
 					<el-form-item label="批次号">
 						<el-input type="primary"></el-input>
 					</el-form-item>
 					<el-form-item style="float: right;">
-						<el-button type="primary" @click="cerateHandle()">查询</el-button>
+						<el-button type="primary" @click="searchHandle()">查询</el-button>
+						<el-button @click="resetForm()">重置</el-button>
 					</el-form-item>
+					<el-row>
+						<el-form-item>
+							<el-button type="primary" @click="searchHandle()">调拨</el-button>
+						</el-form-item>
+					</el-row>
 				</el-form>
 				<el-table
-					v-loading="page.loading"
-					:data="page.data"
+					v-loading="loading"
+					:data="data"
 					element-loading-text="Loading"
 					:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 					:cell-style="{'text-align':'center'}"
@@ -122,7 +128,7 @@
 					</el-table-column>
 				</el-table>
 
-				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 					layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 					@current-change="pageCurrentChangeHandle">
 				</el-pagination>
@@ -158,15 +164,21 @@ export default {
           plateNumber: ''
         }
       },
+			//加载动画
+			loading: false,
+			//列表数据
+			data: [],
+			//总条数
+			total: 0,
 			/**查询条件对象 */
 			listQuery: {
-        page: 1,
-        limit: 20,
-				total: 3,
+        index: 1,
+        length: 20,
         importance: undefined,
         title: undefined,
         type: undefined,
-        sort: '+id'
+        sort: '+id',
+				sn: ''
       },
 			/**是否显示新增弹窗 */
 			addVisible: false,
@@ -187,18 +199,30 @@ export default {
 		handleClick(tab, event) {
 			this.activeName = tab.name
 		},
+		//搜索
+		searchHandle() {
+			this.listQuery.index = 1
+			this.getDatalist()
+		},
+		//获取列表数据
+		getDatalist() {
+
+		},
+
+		//重置
+		resetForm() {
 
-		getDatalist() {},
+		},
 
 		// 分页, 每页条数
     pageSizeChangeHandle (val) {
-      this.listQuery.page = 1
-      this.listQuery.limit = val
+      this.listQuery.index = 1
+      this.listQuery.length = val
       this.getDatalist()
     },
     // 分页, 当前页
     pageCurrentChangeHandle (val) {
-      this.listQuery.page = val
+      this.listQuery.index = val
       this.getDatalist()
     },
 

+ 28 - 35
src/views/device/allocation/allocationBack.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="app-container">
     <h1><i class="el-icon-arrow-left" @click="goBack"></i>调回平台</h1>
-		<el-form :inline="true" :model="listQuery" @keyup.enter.native="handleFilter()">
+		<el-form :inline="true" :model="listQuery" @keyup.enter.native="searchHandle()">
 			<el-form-item label="设备SN">
 				<el-input v-model="listQuery.type" placeholder="请输入设备SN" clearable></el-input>
 			</el-form-item>
 			<div style="float: right;">
 				<el-form-item>
-					<el-button type="primary" @click="handleFilter()">搜索</el-button>
+					<el-button type="primary" @click="searchHandle()">搜索</el-button>
 				</el-form-item>
 				<el-form-item>
 					<el-button @click="resetForm()">重置</el-button>
@@ -21,8 +21,8 @@
 		</el-form>
 
     <el-table
-      v-loading="page.loading"
-      :data="page.data"
+      v-loading="loading"
+      :data="data"
       element-loading-text="Loading"
 			:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 			:cell-style="{'text-align':'center'}"
@@ -60,7 +60,7 @@
       </el-table-column>
     </el-table>
 
-		<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+		<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 			layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 			@current-change="pageCurrentChangeHandle">
 		</el-pagination>
@@ -78,26 +78,16 @@ export default {
   components: { BackModal  },
   data() {
     return {
-      page: {
-        loading: false,
-        data: [
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'}
-				],
-        param: {
-          index: 1,
-          length: 10,
-          sort: 'updateTime desc',
-          plateNumber: ''
-        }
-      },
+      //加载动画
+      loading: false,
+      //列表数据
+      data: [],
+      //总条数
+      total: 0,
 			/**查询条件对象 */
 			listQuery: {
-        page: 1,
-        limit: 20,
-				total: 3,
+        index: 1,
+        length: 20,				
         importance: undefined,
         title: undefined,
         type: undefined,
@@ -110,30 +100,33 @@ export default {
   },
 
   created() {
-    if (this.$route.query.pageIndex !== undefined) {
-      this.page.param.index = this.$route.query.pageIndex
-    }
-    if (this.$route.query.word !== undefined) {
-      this.page.param.title = this.$route.query.word
-    }
-    // this.fetchData()
+    this.getDataList()
   },
   methods: {
     //返回上一页
     goBack() {
       this.$store.dispatch('tagsView/delView', this.$route)
       this.$router.go(-1)
+    },
+    //搜索
+    searchHandle() {
+      this.listQuery.index = 1
+      this.getDataList()
+    },
+    //获取列表数据
+    getDataList() {
+
     },
 		// 分页, 每页条数
     pageSizeChangeHandle (val) {
-      this.listQuery.page = 1
-      this.listQuery.limit = val
-      // this.fetchData()
+      this.listQuery.index = 1
+      this.listQuery.length = val
+      this.getDataList()
     },
     // 分页, 当前页
     pageCurrentChangeHandle (val) {
-      this.listQuery.page = val
-      // this.fetchData()
+      this.listQuery.index = val
+      this.getDataList()
     },
 
 		//打开新增弹窗

+ 100 - 100
src/views/device/allocation/index.vue

@@ -2,30 +2,28 @@
   <div class="app-container">
     <h1>设备调拨</h1>
 		<div class="top-info">
-			已对外调拨电池设备 <span>1864</span>,平台库存 <span>200</span>
+			已出库设备 <span>1864</span>,可出库设备 <span>200</span>
 		</div>
 
-		<el-form :inline="true" :model="listQuery" @keyup.enter.native="handleFilter()">
+		<el-form :inline="true" :model="listQuery" @keyup.enter.native="searchHandle()">
 			<el-row>
-				<el-col :span="6">
+				<el-col :span="8">
 					<el-form-item label="设备SN">
-						<el-input v-model="listQuery.type" placeholder="请输入设备SN" clearable></el-input>
+						<el-input v-model="listQuery.sn" placeholder="请输入设备SN" clearable></el-input>
 					</el-form-item>
 				</el-col>
-				<el-col :span="6">
-					<el-form-item label="调拨时间">
-						<el-input v-model="listQuery.type" placeholder="请选择" clearable></el-input>
+				
+				<el-col :span="8">
+					<el-form-item label="出库类型">
+						<el-select v-model="listQuery.type">
+              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            </el-select> 
 					</el-form-item>
 				</el-col>
-				<el-col :span="6">
-					<el-form-item label="调拨类型">
-						<el-input v-model="listQuery.type" placeholder="请选择" clearable></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :span="6">
+				<el-col :span="8">
 					<div style="float: right;">
 						<el-form-item>
-							<el-button type="primary" @click="handleFilter()">搜索</el-button>
+							<el-button type="primary" @click="searchHandle()">搜索</el-button>
 						</el-form-item>
 						<el-form-item>
 							<el-button @click="resetForm()">重置</el-button>
@@ -33,63 +31,75 @@
 					</div>
 				</el-col>
 			</el-row>
+      <el-row>
+        <el-col :span="12">
+					<el-form-item label="出库时间">
+						<el-date-picker
+              v-model="listQuery.time"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+					</el-form-item>
+				</el-col>
+      </el-row>
 			<el-row>
 				<el-form-item>
-					<el-button type="primary" @click="backHandle()">调回平台</el-button>
+					<el-button type="primary" @click="gotoAddHandle()">新增调拨</el-button>
 				</el-form-item>
 				<el-form-item>
-					<el-button type="primary" @click="addHandle()">新增调拨</el-button>
+					<el-button type="primary" @click="gotoBackHandle()">调回平台</el-button>
 				</el-form-item>
 			</el-row>
 		</el-form>
 
     <el-table
-      v-loading="page.loading"
-      :data="page.data"
+      v-loading="loading"
+      :data="data"
       element-loading-text="Loading"
 			:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 			:cell-style="{'text-align':'center'}"
       fit
       highlight-current-row
-      @sort-change="sortChange"
     >
-			<el-table-column label="调拨时间" sortable="custom">
+			<el-table-column label="出库时间" sortable="custom">
         <template slot-scope="scope">
           {{ scope.row.intime }}
         </template>
       </el-table-column>
 
-      <el-table-column label="调拨数量" prop="plateNumber">
+      <el-table-column label="设备数量" prop="plateNumber">
         <template slot-scope="scope">
           {{ scope.row.code }}
         </template>
       </el-table-column>
 
-      <el-table-column label="调拨类型" prop="deptId">
+      <el-table-column label="出库类型" prop="deptId">
         <template slot-scope="scope">
           {{ scope.row.total}}
         </template>
       </el-table-column>
 
-      <el-table-column label="用途" prop="vin">
+      <el-table-column label="客户">
         <template slot-scope="scope">
-          {{ scope.row.type }}
+          {{ scope.row.dt }}
         </template>
       </el-table-column>
 
-      <el-table-column label="客户">
+      <el-table-column label="接收人" prop="model" width="80">
         <template slot-scope="scope">
-          {{ scope.row.dt }}
+          {{ scope.row.into }}
         </template>
       </el-table-column>
 
-      <el-table-column label="调拨人" prop="model" width="80">
+      <el-table-column label="接收电话">
         <template slot-scope="scope">
-          {{ scope.row.into }}
+          {{ scope.row.create }}
         </template>
       </el-table-column>
 
-      <el-table-column label="备注">
+			<el-table-column label="出库人">
         <template slot-scope="scope">
           {{ scope.row.create }}
         </template>
@@ -102,73 +112,82 @@
       </el-table-column>
     </el-table>
 
-		<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+		<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 			layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 			@current-change="pageCurrentChangeHandle">
 		</el-pagination>
+		<!-- <create v-if="addVisible" ref="create" @refreshDataList="fetchData"></create> -->
   </div>
 </template>
 
 <script>
-import { postJson, getSort } from '@/api/page'
+import { deliveryList } from '@/api/device/delivery'
 // import Create from './create'
 
 export default {
   components: {  },
   data() {
     return {
-      page: {
-        loading: false,
-        data: [
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'}
-				],
-        param: {
-          index: 1,
-          length: 10,
-          sort: 'updateTime desc',
-          plateNumber: ''
-        }
-      },
+      //列表加载动画
+      loading: false,
+      //总条数
+      total: 0,
+      //列表数据
+      data: [],
 			/**查询条件对象 */
 			listQuery: {
-        page: 1,
-        limit: 20,
-				total: 3,
-        importance: undefined,
-        title: undefined,
-        type: undefined,
+        index: 1,
+        length: 20,
+        sn: '',
+        type: null,
         sort: '+id'
       },
 			/**是否显示新增弹窗 */
 			addVisible: false,
-
+      //出库类型选项
+      options: [
+        {label: '全部', value: null},
+        {label: '商用', value: 1},
+        {label: '测试', value: 2},
+        {label: '试用', value: 3}
+      ]
     }
   },
-
   created() {
-    if (this.$route.query.pageIndex !== undefined) {
-      this.page.param.index = this.$route.query.pageIndex
-    }
-    if (this.$route.query.word !== undefined) {
-      this.page.param.title = this.$route.query.word
-    }
-    // this.fetchData()
+    this.getDataList()
   },
   methods: {
+    //搜索
+    searchHandle() {
+      this.listQuery.index = 1
+      this.getDataList()
+    },
+
+    //获取列表数据
+    getDataList() {
+      this.loading = true
+      deliveryList(this.listQuery).then(res => {
+        if (res.code === 200) {
+          this.data = res.data
+          this.total = res.total
+          this.loading = false
+        } else {
+          this.loading = false
+          return this.$message.error(res.message)
+        }
+      })
+    },
 
 		// 分页, 每页条数
     pageSizeChangeHandle (val) {
-      this.listQuery.page = 1
-      this.listQuery.limit = val
-      // this.fetchData()
+      this.listQuery.index = 1
+      this.listQuery.length = val
+      this.getDataList()
     },
     // 分页, 当前页
     pageCurrentChangeHandle (val) {
-      this.listQuery.page = val
-      // this.fetchData()
+      this.listQuery.index = val
+      this.getDataList()
     },
 
 		//打开新增弹窗
@@ -178,43 +197,24 @@ export default {
 				this.$refs.create.init()
 			});
 		},
-
-    /**跳转调回平台页面 */
-    backHandle() {
-      this.$router.push('/device/allocation/allocationBack')
+    //重置、
+    resetForm() {
+      this.listQuery = {
+        index: 1,
+        length: 20,
+        sn: '',
+        type: null,
+        sort: '+id'
+      }
+      this.searchHandle()
     },
-
-    /**跳转新增调拨页面 */
-    addHandle() {
+    //跳转新增调拨页面
+    gotoAddHandle() {
       this.$router.push('/device/allocation/allocationAdd')
     },
-
-		dataFormSubmitHandle() {},
-
-    search() {
-      this.page.param.index = 1
-      // this.fetchData()
-    },
-    fetchData() {
-      this.page.loading = false
-      postJson('/api/v1/carinfo/pageQuery', this.page.param).then(response => {
-        if (response.code === 200) {
-          this.page.data = response.data
-          this.page.total = response.total
-          this.page.loading = false
-        }
-      })
-    },
-    sortChange(data) {
-      this.page.param.index = 1
-      this.page.param.sort = getSort(data)
-      this.fetchData()
-    },
-    add() {
-      this.$router.push('/car/info/add')
-    },
-    edit(val) {
-      this.$router.push({ path: '/car/info/add', query: { id: val, pageIndex: this.page.param.index, word: this.page.param.title }})
+    //跳转调回平台页面
+    gotoBackHandle() {
+      this.$router.push('/device/allocation/allocationBack')
     },
     del(val) {
       this.$confirm('此操作将删除该数据, 是否继续?', '提示', {

+ 29 - 43
src/views/device/configure/batteryCode.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
     <h1><i class="el-icon-arrow-left" @click="goBack"></i>电池编码管理</h1>
 		<div class="top-info">
-			示例:MCLCLL640S2131001M(1位)=产品类型代码、CL(2-3位)=PACK制造商简称、CL(4-5位)=电芯厂家名称、L640(6-9位)=产品规格代码、S(10位)=产品扩展代码、2131(11-14位)=生产日期、001(15-17位)=序列号
+			示例:MCLCLL640S2131001,M(1位)=产品类型代码、CL(2-3位)=PACK制造商简称、CL(4-5位)=电芯厂家名称、L640(6-9位)=产品规格代码、S(10位)=产品扩展代码、2131(11-14位)=生产日期、001(15-17位)=序列号
 		</div>
 		<el-tabs v-model="activeName" @tab-click="handleClick">
 			<el-tab-pane label="产品类型代码" name="first">
@@ -14,15 +14,14 @@
 					</el-row>
 				</el-form>
 				<el-table
-					v-loading="page.loading"
-					:data="page.data"
+					v-loading="loading"
+					:data="data"
 					element-loading-text="Loading"
 					:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 					:cell-style="{'text-align':'center'}"
 					border
 					fit
 					highlight-current-row
-					@sort-change="sortChange"
 				>
 					<el-table-column label="序号" type="index" width="50"></el-table-column>
 
@@ -60,7 +59,7 @@
 					</el-table-column>
 				</el-table>
 
-				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 					layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 					@current-change="pageCurrentChangeHandle">
 				</el-pagination>
@@ -74,15 +73,14 @@
 					</el-row>
 				</el-form>
 				<el-table
-					v-loading="page.loading"
-					:data="page.data"
+					v-loading="loading"
+					:data="data"
 					element-loading-text="Loading"
 					:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 					:cell-style="{'text-align':'center'}"
 					border
 					fit
 					highlight-current-row
-					@sort-change="sortChange"
 				>
 					<el-table-column label="序号" type="index" width="50"></el-table-column>
 
@@ -120,7 +118,7 @@
 					</el-table-column>
 				</el-table>
 
-				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 					layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 					@current-change="pageCurrentChangeHandle">
 				</el-pagination>
@@ -134,15 +132,14 @@
 					</el-row>
 				</el-form>
 				<el-table
-					v-loading="page.loading"
-					:data="page.data"
+					v-loading="loading"
+					:data="data"
 					element-loading-text="Loading"
 					:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 					:cell-style="{'text-align':'center'}"
 					border
 					fit
 					highlight-current-row
-					@sort-change="sortChange"
 				>
 					<el-table-column label="序号" type="index" width="50"></el-table-column>
 
@@ -180,7 +177,7 @@
 					</el-table-column>
 				</el-table>
 
-				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 					layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 					@current-change="pageCurrentChangeHandle">
 				</el-pagination>
@@ -194,15 +191,14 @@
 					</el-row>
 				</el-form>
 				<el-table
-					v-loading="page.loading"
-					:data="page.data"
+					v-loading="loading"
+					:data="data"
 					element-loading-text="Loading"
 					:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 					:cell-style="{'text-align':'center'}"
 					border
 					fit
 					highlight-current-row
-					@sort-change="sortChange"
 				>
 					<el-table-column label="序号" type="index" width="50"></el-table-column>
 
@@ -246,7 +242,7 @@
 					</el-table-column>
 				</el-table>
 
-				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 					layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 					@current-change="pageCurrentChangeHandle">
 				</el-pagination>
@@ -260,14 +256,13 @@
 					</el-row>
 				</el-form>
 				<el-table
-					v-loading="page.loading"
-					:data="page.data"
+					v-loading="loading"
+					:data="data"
 					element-loading-text="Loading"
 					:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 					:cell-style="{'text-align':'center'}"
 					fit
 					highlight-current-row
-					@sort-change="sortChange"
 				>
 					<el-table-column label="序号" type="index" width="50"></el-table-column>
 
@@ -305,7 +300,7 @@
 					</el-table-column>
 				</el-table>
 
-				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+				<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
 					layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 					@current-change="pageCurrentChangeHandle">
 				</el-pagination>
@@ -326,26 +321,16 @@ export default {
     return {
 			/**默认tab */
 			activeName: 'first',
-      page: {
-        loading: false,
-        data: [
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'}
-				],
-        param: {
-          index: 1,
-          length: 10,
-          sort: 'updateTime desc',
-          plateNumber: ''
-        }
-      },
+			//加载动画
+			loading: false,
+			//列表数据
+			data: [],
+			//总条数
+			total: 0,
 			/**查询条件对象 */
 			listQuery: {
-        page: 1,
-        limit: 20,
-				total: 3,
+        index: 1,
+        length: 20,
         importance: undefined,
         title: undefined,
         type: undefined,
@@ -358,7 +343,7 @@ export default {
     }
   },
   created() {
-    // this.getDatalist()
+    this.getDatalist()
   },
   methods: {
 		//返回上一页
@@ -370,9 +355,10 @@ export default {
 		handleClick(tab, event) {
 			this.activeName = tab.name
 		},
+		//获取列表数据
+		getDatalist() {
 
-		getDatalist() {},
-
+		},
 		// 分页, 每页条数
     pageSizeChangeHandle (val) {
       this.listQuery.page = 1
@@ -453,7 +439,7 @@ export default {
 		box-shadow: none;
 		text-align: left;
 		color: #7F7F7F;
-		font-size: 13px;
+		font-size: 12px;
 		padding-left: 20px;
 		margin-bottom: 20px;
 		>span {

+ 17 - 33
src/views/device/delivery/index.vue

@@ -121,7 +121,7 @@
 </template>
 
 <script>
-import { postJson, getSort } from '@/api/page'
+import { deliveryList } from '@/api/device/delivery'
 // import Create from './create'
 
 export default {
@@ -132,6 +132,8 @@ export default {
       loading: false,
       //总条数
       total: 0,
+      //列表数据
+      data: [],
 			/**查询条件对象 */
 			listQuery: {
         index: 1,
@@ -152,7 +154,7 @@ export default {
     }
   },
   created() {
-    // this.fetchData()
+    this.getDataList()
   },
   methods: {
     //搜索
@@ -163,19 +165,29 @@ export default {
 
     //获取列表数据
     getDataList() {
-      
+      this.loading = true
+      deliveryList(this.listQuery).then(res => {
+        if (res.code === 200) {
+          this.data = res.data
+          this.total = res.total
+          this.loading = false
+        } else {
+          this.loading = false
+          return this.$message.error(res.message)
+        }
+      })
     },
 
 		// 分页, 每页条数
     pageSizeChangeHandle (val) {
       this.listQuery.index = 1
       this.listQuery.length = val
-      // this.fetchData()
+      this.getDataList()
     },
     // 分页, 当前页
     pageCurrentChangeHandle (val) {
       this.listQuery.index = val
-      // this.fetchData()
+      this.getDataList()
     },
 
 		//打开新增弹窗
@@ -185,34 +197,6 @@ export default {
 				this.$refs.create.init()
 			});
 		},
-
-		dataFormSubmitHandle() {},
-
-    search() {
-      this.page.param.index = 1
-      // this.fetchData()
-    },
-    fetchData() {
-      this.page.loading = false
-      postJson('/api/v1/carinfo/pageQuery', this.page.param).then(response => {
-        if (response.code === 200) {
-          this.page.data = response.data
-          this.page.total = response.total
-          this.page.loading = false
-        }
-      })
-    },
-    sortChange(data) {
-      this.page.param.index = 1
-      this.page.param.sort = getSort(data)
-      this.fetchData()
-    },
-    add() {
-      this.$router.push('/car/info/add')
-    },
-    edit(val) {
-      this.$router.push({ path: '/car/info/add', query: { id: val, pageIndex: this.page.param.index, word: this.page.param.title }})
-    },
     del(val) {
       this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
         confirmButtonText: '确定',

+ 2 - 2
src/views/device/handle/handle-add.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog :visible.sync="visible" :title="title" :close-on-click-modal="false" :close-on-press-escape="false">
-    <el-form v-if="activeName === 'first'" :model="dataForm" :rules="dataRule" :disabled="type === 1? true:false" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="'120px'">
+    <el-form :model="dataForm" :rules="dataRule" :disabled="type === 1? true:false" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="'120px'">
 			<el-form-item label="配件名称" prop="productType">
 					<el-input :maxlength="20" show-word-limit v-model="dataForm.productType" placeholder="请输入配件名称"></el-input>
 			</el-form-item>
@@ -21,7 +21,7 @@ export default {
 			/**是否显示弹窗 */
       visible: false,
 			/**弹窗标题 */
-			title: '',
+			title: '新增处置',
 			/**区分打开弹窗操作类型 null:新增,1:查看,2:修改 */
 			type: null,
 			/**区分弹窗交互类型 first:产品类型代码,second:PACK制造商简称,third:电芯厂家名称,fourth:产品规格代码,fifth:产品扩展代码 */

+ 25 - 88
src/views/device/handle/index.vue

@@ -41,14 +41,13 @@
 		</el-form>
 
     <el-table
-      v-loading="page.loading"
-      :data="page.data"
+      v-loading="loading"
+      :data="data"
       element-loading-text="Loading"
 			:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
 			:cell-style="{'text-align':'center'}"
       fit
       highlight-current-row
-      @sort-change="sortChange"
     >
 			<el-table-column label="序号" type="index"></el-table-column>
 
@@ -95,7 +94,7 @@
       </el-table-column>
     </el-table>
 
-		<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
+		<el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.lenght" :total="total"
 			layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
 			@current-change="pageCurrentChangeHandle">
 		</el-pagination>
@@ -112,26 +111,16 @@ export default {
   components: { Create },
   data() {
     return {
-      page: {
-        loading: false,
-        data: [
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
-					{code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'}
-				],
-        param: {
-          index: 1,
-          length: 10,
-          sort: 'updateTime desc',
-          plateNumber: ''
-        }
-      },
+      //加载动画
+      loading: false,
+      //列表数据
+      data: [],
+      //总条数
+      total: 0,
 			/**查询条件对象 */
 			listQuery: {
-        page: 1,
-        limit: 20,
-				total: 3,
+        index: 1,
+        length: 20,
         importance: undefined,
         title: undefined,
         type: undefined,
@@ -139,56 +128,32 @@ export default {
       },
 			/**是否显示新增弹窗 */
 			addVisible: false,
-			/**新增form表单字段 */
-			dataForm: {
-        id: '',
-        owner: '',
-        email: '',
-        phone: '',
-        lossItem: '',
-        description: '',
-        lossLocation: '',
-        lossDatetime: '',
-        itemValues: '1',
-        remark: '',
-        status: null,
-        isScreen: '',
-        screenContent: '',
-        creator: '',
-        createDate: '',
-        updater: '',
-        updateDate: '',
-        contactFlag: null,
-        handleType: null,
-        contactWay: '',
-        todo: null
-      },
-
     }
   },
   created() {
-    if (this.$route.query.pageIndex !== undefined) {
-      this.page.param.index = this.$route.query.pageIndex
-    }
-    if (this.$route.query.word !== undefined) {
-      this.page.param.title = this.$route.query.word
-    }
-    // this.fetchData()
+    this.getDataList()
   },
   methods: {
+    //搜索
+    handleFilter() {
+      this.listQuery.index = 1
+      this.getDataList()
+    },
+    //获取列表数据
+    getDataList() {
 
+    },
 		// 分页, 每页条数
     pageSizeChangeHandle (val) {
-      this.listQuery.page = 1
-      this.listQuery.limit = val
-      // this.fetchData()
+      this.listQuery.index = 1
+      this.listQuery.length = val
+      this.getDataList()
     },
     // 分页, 当前页
     pageCurrentChangeHandle (val) {
-      this.listQuery.page = val
-      // this.fetchData()
+      this.listQuery.index = val
+      this.getDataList()
     },
-
 		//打开新增弹窗
 		cerateHandle() {
 			this.addVisible = true
@@ -196,34 +161,6 @@ export default {
 				this.$refs.addOrUpdate.init()
 			});
 		},
-
-		dataFormSubmitHandle() {},
-
-    search() {
-      this.page.param.index = 1
-      // this.fetchData()
-    },
-    fetchData() {
-      this.page.loading = false
-      postJson('/api/v1/carinfo/pageQuery', this.page.param).then(response => {
-        if (response.code === 200) {
-          this.page.data = response.data
-          this.page.total = response.total
-          this.page.loading = false
-        }
-      })
-    },
-    sortChange(data) {
-      this.page.param.index = 1
-      this.page.param.sort = getSort(data)
-      this.fetchData()
-    },
-    add() {
-      this.$router.push('/car/info/add')
-    },
-    edit(val) {
-      this.$router.push({ path: '/car/info/add', query: { id: val, pageIndex: this.page.param.index, word: this.page.param.title }})
-    },
     del(val) {
       this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
         confirmButtonText: '确定',

+ 5 - 4
src/views/device/info/index.vue

@@ -171,6 +171,7 @@ export default {
 			addVisible: false,
       /**是否显示批量导入弹窗 */
       upVisible: false,
+      url: 'http://47.111.243.220:8182'
     }
   },
   mounted() {
@@ -257,10 +258,10 @@ export default {
       //   ...this.dataForm,
       // });
       let token = getToken
-      // window.location.href = `/api/v1/appdevice/excelTemplate?name=battery.xls`
-      getForm('/api/v1/appdevice/excelTemplate?name=battery.xls').then(res => {
-        debugger
-      })
+      window.location.href = `${this.url}/api/v1/appdevice/excelTemplate?name=battery.xls`
+      // getForm('/api/v1/appdevice/excelTemplate?name=battery.xls').then(res => {
+      //   debugger
+      // })
     },
 
 		dataFormSubmitHandle() {},

+ 1 - 1
vue.config.js

@@ -27,7 +27,7 @@ module.exports = {
   publicPath: '/',
   outputDir: 'dist',
   assetsDir: 'static',
-  lintOnSave: process.env.NODE_ENV === 'development',
+  lintOnSave: false,
   productionSourceMap: false,
   devServer: {
     port: port,