Bladeren bron

bug 修复

lilei 3 jaren geleden
bovenliggende
commit
eb39d7eff1
3 gewijzigde bestanden met toevoegingen van 37 en 3 verwijderingen
  1. 1 1
      .env.development
  2. 35 1
      src/views/productManagement/productInfo/list.vue
  3. 1 1
      vue.config.js

+ 1 - 1
.env.development

@@ -1,7 +1,7 @@
 NODE_ENV=development
 VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=/api
-VUE_APP_WX_BASE_URL=//192.168.16.103:8602/ocs-admin/websocket/
+VUE_APP_WX_BASE_URL=/api/websocket/
 VUE_APP_VERSION=V1.0.1
 VUE_APP_ENVTIPS=开发环境
 VUE_APP_PRO_NAME=运营中心系统

+ 35 - 1
src/views/productManagement/productInfo/list.vue

@@ -45,6 +45,18 @@
                   <v-select code="PRICING_STATUS" id="productInfoList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品图片">
+                  <a-select id="productInfoList-picFlag" v-model="queryParam.picFlag" allowClear placeholder="请选择产品图片">
+                    <a-select-option value="1">
+                      有图片
+                    </a-select-option>
+                    <a-select-option value="0">
+                      无图片
+                    </a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
@@ -128,6 +140,13 @@
           <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
           <span v-else>--</span>
         </template>
+        <!-- 产品图片 -->
+        <template slot="imageUrl" slot-scope="text, record">
+          <div v-if="record.productPicList && record.productPicList.length>0">
+            <img :src="record.productPicList[0].imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''" width="30" height="30" class="imageUrl" @click="inited(record.productPicList)" />
+          </div>
+          <span v-else>--</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -210,7 +229,8 @@ export default {
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
         state: undefined, //  产品状态
-        pricingState: undefined //  定价状态
+        pricingState: undefined, //  定价状态
+        picFlag: undefined
       },
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
@@ -227,6 +247,7 @@ export default {
         { title: '最近修改时间', dataIndex: 'updateDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '8%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
       ],
       loadingAudit: false,
@@ -332,6 +353,18 @@ export default {
         }
       })
     },
+    // 预览图片
+    inited (viewer) {
+      if (viewer) {
+        const imageUrl = []
+        viewer.map(item => {
+          imageUrl.push(item.imageUrl)
+        })
+        this.$viewerApi({
+          images: imageUrl
+        })
+      }
+    },
     // 批量上线
     handleBatchLaunch () {
       const _this = this
@@ -403,6 +436,7 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.queryParam.state = undefined
       this.queryParam.pricingState = undefined
+      this.queryParam.picFlag = undefined
       this.productType = []
       this.$refs.table.refresh(true)
     },

+ 1 - 1
vue.config.js

@@ -107,7 +107,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.16.151:8602/ocs-admin',
+        target: 'http://192.168.16.102/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  Á·Ï°
         // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         ws: false,