|
@@ -1,13 +1,217 @@
|
|
|
<template>
|
|
|
- <div />
|
|
|
+ <div id="init-window" style="position:relative">
|
|
|
+ <router-view />
|
|
|
+ <div style="position: absolute;width: 100%;">
|
|
|
+ <div class="set-background">
|
|
|
+ <div class="block">
|
|
|
+ <el-form :model="queryCode">
|
|
|
+ <div class="set-between">
|
|
|
+ <div class="special-input">
|
|
|
+ <el-input v-model="queryCode.creator" placeholder="车辆ID" clearable />
|
|
|
+ <el-input v-model="queryCode.creator" placeholder="ECUID" clearable />
|
|
|
+ <el-input v-model="queryCode.creator" placeholder="车辆类型" clearable />
|
|
|
+ </div>
|
|
|
+ <div class="special-input-chose">
|
|
|
+ <el-select v-model="queryCode.bizId" placeholder="锁状态">
|
|
|
+ <el-option v-for="item in bizOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="queryCode.bizId" placeholder="链接状态">
|
|
|
+ <el-option v-for="item in bizOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="form.name" filterable placeholder="城市">
|
|
|
+ <el-option
|
|
|
+ v-for="item in city"
|
|
|
+ :key="item.CityID"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.name"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="set-between">
|
|
|
+ <el-button type="primary" plain @click="dataQuery(queryCode)">搜索</el-button>
|
|
|
+ <el-button type="primary" plain @click="createdCode()">新增</el-button>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <div class="set-locate">
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="id"
|
|
|
+ label="ID"
|
|
|
+ align="center"
|
|
|
+ width="50"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="date"
|
|
|
+ label="车辆ID"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="gitProject"
|
|
|
+ label="车辆类型"
|
|
|
+ align="center"
|
|
|
+ width="70"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="handler"
|
|
|
+ label="ECUID"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="锁状态"
|
|
|
+ align="center"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag
|
|
|
+ :type="scope.row.tag === '王小虎' ? 'success' : 'danger'"
|
|
|
+ disable-transitions
|
|
|
+ >{{ scope.row.name }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="isGoPre"
|
|
|
+ label="链接状态"
|
|
|
+ align="center"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag
|
|
|
+ :type="scope.row.tag === '王小虎' ? 'success' : 'danger'"
|
|
|
+ disable-transitions
|
|
|
+ >{{ scope.row.name }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="onlineDate"
|
|
|
+ label="激活时间"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ width="300"
|
|
|
+ >
|
|
|
+ <template>
|
|
|
+ <div class="specail-lock">
|
|
|
+ <div class="el-icon-lock" />
|
|
|
+ <div>
|
|
|
+ <el-button size="mini" type="success" plain>激活</el-button>
|
|
|
+ <el-button size="mini" type="info" plain>下线</el-button>
|
|
|
+ <el-button size="mini" type="danger">删除</el-button>
|
|
|
+ <el-button size="mini" type="primary">...</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination background style="margin-top:30px;" align="center" :current-page="curIndex" :page-size="pageSize" layout="prev, pager, next" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-export default {
|
|
|
+import { cityJson } from '@/views/virtualDevices/city'
|
|
|
+import { createHmVirtualDevice, queryDeviceInfo, delHmVirtualDevice, offHmvirtualDevice } from '@/api/HMvehicle'
|
|
|
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData: [{
|
|
|
+ id: '1',
|
|
|
+ date: '2016-05',
|
|
|
+ name: '王小虎'
|
|
|
+ }, {
|
|
|
+ id: '2',
|
|
|
+ date: '2016-05',
|
|
|
+ name: '王小虎'
|
|
|
+ }],
|
|
|
+ form: {},
|
|
|
+ bizOptions: [],
|
|
|
+ queryCode: {},
|
|
|
+ curIndex: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ city: cityJson,
|
|
|
+ value: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this._queryDeviceInfo()
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.initWindow()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ _queryDeviceInfo() {
|
|
|
+ const params = { page: this.curIndex, pageSize: this.pageSize }
|
|
|
+ },
|
|
|
+ initWindow() {
|
|
|
+ if (!document.getElementById('window-judge')) {
|
|
|
+ document.getElementById('init-window').parentNode.style.overflow = 'visible'
|
|
|
+ } else {
|
|
|
+ document.getElementById('init-window').parentNode.style.overflow = 'hidden'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dataQuery(queryCode) {
|
|
|
+ },
|
|
|
+ createdCode() {
|
|
|
+ this.$router.push({ name: '新增电单车', params: { formData: this.form }, query: { id: this.form.id }})
|
|
|
+ },
|
|
|
+ handleSizeChange(size) {
|
|
|
+ this.pageSize = size
|
|
|
+ },
|
|
|
+ handleCurrentChange(curIndex) {
|
|
|
+ this.curIndex = curIndex
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
-
|
|
|
+ .set-background
|
|
|
+ background-color #F2F3F6
|
|
|
+ display flex
|
|
|
+ justify-content center
|
|
|
+ min-width 700px
|
|
|
+ .block
|
|
|
+ background-color rgba(255,255,255,1)
|
|
|
+ box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
|
|
|
+ border-radius 7px
|
|
|
+ width 93%
|
|
|
+ margin 25px 0
|
|
|
+ padding 20px
|
|
|
+ min-height calc(100vh - 100px)
|
|
|
+ .block >>> .el-form
|
|
|
+ display flex
|
|
|
+ justify-content space-between
|
|
|
+ .block >>> .special-input .el-input
|
|
|
+ width 29.5%
|
|
|
+ margin-right 10px
|
|
|
+ .block >>> .special-input-chose .el-select
|
|
|
+ width 27%
|
|
|
+ margin-right 10px
|
|
|
+ .block >>> .el-form-item__content
|
|
|
+ margin-left 0 !important
|
|
|
+ .block >>> th
|
|
|
+ background-color #F0F7FF !important
|
|
|
+ .set-between
|
|
|
+ display flex
|
|
|
+ .set-between >>> .el-button
|
|
|
+ height 40px
|
|
|
+ .set-locate
|
|
|
+ margin-top 20px
|
|
|
+ .specail-lock
|
|
|
+ display flex
|
|
|
+ justify-content center
|
|
|
+ .el-icon-lock
|
|
|
+ font-size 20px
|
|
|
+ margin 4px 7px 0 0
|
|
|
</style>
|