Browse Source

fix conflict

fujunwen 4 years ago
parent
commit
64866f6d58
3 changed files with 33 additions and 9 deletions
  1. 1 0
      public/index.html
  2. 5 0
      src/api/equipmentList.js
  3. 27 9
      src/views/equipment/table/djspTable.vue

+ 1 - 0
public/index.html

@@ -50,6 +50,7 @@
             color: #333;
             white-space: nowrap;
         }
+        
         .dark-my-leaflet-div-icon{
             color: white;
             white-space: nowrap;

+ 5 - 0
src/api/equipmentList.js

@@ -61,6 +61,11 @@ export function queryxxx({ getParams }) {
 export function queryShops({ getParams }) {
     return httputils.getJson(`/data/sms_shops/query`, getParams)
 }
+// 设备设施-楼层电井口(间)控制商铺范围清单 特色电井控制商铺
+// 添加商铺信息,增加按商铺名称搜索
+export function queryBrand({ getParams }) {
+    return httputils.getJson(`/data/sms_shops/queryBrand`, getParams);
+}
 // 设备设施-查看图纸
 export function queryPicList({ getParams }) {
     return httputils.getJson(`/data/file/getCadList`, getParams)

+ 27 - 9
src/views/equipment/table/djspTable.vue

@@ -13,12 +13,12 @@
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
-                placeholder='搜索商铺编号'
+                placeholder='搜索商铺信息'
                 size='small'
                 @keyup.enter.native='getList'
                 @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='shopsnum'
+                v-model='shopInfo'
                 clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
@@ -34,8 +34,19 @@
             <el-table-column prop='meterbox' label='商铺电表数' width='200'>
                 <template slot-scope='{row}'>{{row.meterbox || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='shopsnum' label='商铺编号'>
-                <template slot-scope='{row}'>{{row.shopsnumList || '--'}}</template>
+            <el-table-column prop='shopInfo' label='商铺信息'>
+                <template slot-scope='{row}'>{{row.brandList || '--'}}</template>
+                <template slot-scope='{row}'>
+                    <div v-if='row.brandList' class='shop-info'>
+                        <i v-for='(info,infoIndex) in row.brandList' :key='infoIndex'>
+                            {{ info.brandname || 'xxx' }}
+                            -
+                            <!-- {{ info.shopsnumList ? info.shopsnumList.replaceAll(',','、') : 'xxx' }} -->
+                            {{ info.shopsnumList ? info.shopsnumList.replace(/,/g,'、') : 'xxx' }}
+                            {{ infoIndex === row.brandList.length - 1 ? '' : ',' }}
+                        </i>
+                    </div>
+                </template>
             </el-table-column>
         </el-table>
         <div class='foot'></div>
@@ -44,7 +55,7 @@
 <script>
 import { Select } from 'meri-design'
 import EqDetail from './eqDetaileDialog'
-import { queryShops } from '@/api/equipmentList.js'
+import { queryShops, queryBrand } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import store from '../../../store/index'
 export default {
@@ -54,7 +65,7 @@ export default {
             tableData: [],
             floor: '1',
             innerVisible: false, //详情弹框
-            shopsnum: '',
+            shopInfo: '',
             welldes: '',
             floorAllSelect: [],
         }
@@ -91,13 +102,13 @@ export default {
             if (this.welldes) {
                 getParams.keyword += `${this.welldes}:welldes;`
             }
-            if (this.shopsnum) {
-                getParams.keyword += `${this.shopsnum}:shopsnumList;`
+            if (this.shopInfo) {
+                getParams.keyword += `${this.shopInfo}:shopsnumList,brandname;`
             }
             if (getParams.keyword == '') {
                 delete getParams.keyword
             }
-            queryShops({ getParams }).then((res) => {
+            queryBrand({ getParams }).then((res) => {
                 console.log(res)
                 this.tableData = []
                 let floor = {}
@@ -181,5 +192,12 @@ export default {
         justify-content: flex-end;
         margin-top: 28px;
     }
+    .shop-info {
+        word-break: break-word;
+        i {
+            // display: inline-block;
+            padding: 2px 0;
+        }
+    }
 }
 </style>