stjdydayou 4 gadi atpakaļ
vecāks
revīzija
08d4764aa6
2 mainītis faili ar 42 papildinājumiem un 13 dzēšanām
  1. 1 1
      src/router/index.js
  2. 41 12
      src/views/passenger/equipment/index.vue

+ 1 - 1
src/router/index.js

@@ -36,7 +36,7 @@ export const asyncRoutes = [
     path: '/passenger',
     component: Layout,
     name: 'Passenger',
-    meta: { icon: 'el-icon-pie-chart', authorities: ['system.config.find'] },
+    meta: { icon: 'el-icon-pie-chart', authorities: ['bz.passenger.equipment.find'] },
     children: [
       {
         path: 'equipment',

+ 41 - 12
src/views/passenger/equipment/index.vue

@@ -2,10 +2,17 @@
   <div class="app-container">
     <el-form :model="queryForm" inline size="small">
       <el-form-item label="点位类型">
-        <el-input v-model="queryForm.keyword" placeholder="关键词"/>
+        <el-select v-model="queryForm.dataType" placeholder="请选择" clearable @change="onDataTypeChange">
+          <el-option label="场馆" value="VENUE"/>
+          <el-option label="景区" value="SCENERY"/>
+          <el-option label="度假村" value="HOLIDAY_VILLAGE"/>
+          <el-option label="酒店" value="HOTEL"/>
+          <el-option label="民宿" value="HOME_STAY"/>
+          <el-option label="旅行社" value="TOURIST"/>
+        </el-select>
       </el-form-item>
       <el-form-item label="点位分布">
-        <el-input v-model="queryForm.keyword" placeholder="关键词"/>
+        <select-base-bz-data v-model="queryForm.bzId" :multiple="false" :data-type="queryForm.dataType" :disabled="disabledSelectBz"/>
       </el-form-item>
       <el-form-item label="时间维度">
         <el-date-picker
@@ -29,17 +36,30 @@
         </el-button>
       </el-button-group>
     </el-row>
-    <el-card :style="{ padding: '0px',float:'left' }" shadow="hover" v-for="item in pageData.records">
-      <img :src="item.litpic" class="image" style="width: 200px;max-height: 200px;">
-      <div style="padding: 14px;">
-        <span>{{ item.brief }}</span>
-        <div class="bottom clearfix">
-          <time class="time">currentDate</time>
-          <el-button type="text" class="button">操作按钮</el-button>
-        </div>
+    <el-card v-for="item in pageData.records" :key="item.id" :style="{ padding: '0px',float:'left' }" shadow="hover">
+      <img :src="item.litpic" class="image" style="width: 200px;height: 150px;">
+      <div style="font-size: 14px">
+        {{ item.brief }}
       </div>
+      <div class="clearfix">
+        <el-row :gutter="16">
+          <el-col :span="12">
+            <p>
+              {{ item.inPeopleCount || 0 }}
+              <span style="color: gray;font-size: 12px;display: block">流入数量</span>
+            </p>
+          </el-col>
+          <el-col :span="12">
+            <p>
+              {{ item.outPeopleCount || 0 }}
+              <span style="color: gray;font-size: 12px;display: block">流出数量</span>
+            </p>
+          </el-col>
+        </el-row>
+      </div>
+
     </el-card>
-    <div style="clear: both"></div>
+    <div style="clear: both"/>
     <el-pagination
       class="pagination-container"
       background
@@ -56,9 +76,10 @@
 import { deleteByIds, findPage } from '@/api/bz/equipment'
 import { dateTimeFormatter } from '@/utils/formater'
 import DialogForm from './DialogForm'
+import SelectBaseBzData from '@/components/SelectBaseBzData'
 
 export default {
-  components: { DialogForm },
+  components: { DialogForm, SelectBaseBzData },
   data() {
     return {
       queryForm: {},
@@ -70,11 +91,19 @@ export default {
       multipleSelection: []
     }
   },
+  computed: {
+    disabledSelectBz: function() {
+      return !this.queryForm || !this.queryForm.dataType || this.queryForm.dataType === ''
+    }
+  },
   created() {
     this.fetchData()
   },
   methods: {
     dateTimeFormatter,
+    onDataTypeChange() {
+      this.queryForm.bzId = ''
+    },
     selectionChange(val) {
       const temp = []
       val.forEach(o => {