wuhongyuq 5 лет назад
Родитель
Сommit
1a958a9ca8

+ 5 - 0
package-lock.json

@@ -989,6 +989,11 @@
         }
       }
     },
+    "@stomp/stompjs": {
+      "version": "5.4.4",
+      "resolved": "https://registry.npmjs.org/@stomp/stompjs/-/stompjs-5.4.4.tgz",
+      "integrity": "sha512-RIzQ7MLRSJLUpTHcje1ZclnHH982amJSKC9bDxGO0wyu5OF9ROuuiLf7TxKxo1zUu7lGEYNedg9SEi87uMWDqg=="
+    },
     "@types/color-name": {
       "version": "1.1.1",
       "resolved": "https://registry.npm.taobao.org/@types/color-name/download/@types/color-name-1.1.1.tgz",

+ 13 - 2
src/components/enterprise/enterpisedg.vue

@@ -25,7 +25,16 @@
             </el-col>
           </el-col>
           <el-col :span="19" class="right">
-            <context v-on="$listeners" :total="total" :columnName="columnName" :dinggou1="dinggou1" :dinggou2="dinggou2" :dinggou3="dinggou3"></context>
+            <context
+              v-on="$listeners"
+              :total1="total1"
+              :total2="total2"
+              :total3="total3"
+              :columnName="columnName"
+              :dinggou1="dinggou1"
+              :dinggou2="dinggou2"
+              :dinggou3="dinggou3"
+            ></context>
           </el-col>
         </div>
       </el-col>
@@ -55,7 +64,9 @@ export default {
     dinggou1: null,
     dinggou2: null,
     dinggou3: null,
-    total: null,
+    total1: null,
+    total2: null,
+    total3: null,
   },
   components: {
     top, //头部

+ 24 - 42
src/layout/enterprise/context.vue

@@ -16,11 +16,6 @@
                         </el-col>
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
-                        <el-col :span="6" class="fimage">
-                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
-                          </el-col>
-                        </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.product_name }}</p>
                           <p>营销人名称:{{ item.market_username }}</p>
@@ -31,7 +26,7 @@
                         </el-col>
                         <el-col :span="6" class="fbListCenterR">
                           <el-col :span="24" class="bainji">
-                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
+                            <el-link :underline="false" @click="deteles(item)">彻底删除</el-link>
                           </el-col>
                         </el-col>
                       </el-col>
@@ -42,8 +37,10 @@
                       @size-change="handleSizeChange"
                       @current-change="handleCurrentChange"
                       :current-page="currentPage"
+                      background
                       layout="total,  prev, pager, next, jumper"
-                      :total="tatalstatus2"
+                      :total="total1"
+                      :page-size="pageSize"
                     >
                     </el-pagination>
                   </el-col>
@@ -59,11 +56,6 @@
                         </el-col>
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
-                        <el-col :span="6" class="fimage">
-                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
-                          </el-col>
-                        </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.product_name }}</p>
                           <p>营销人名称:{{ item.market_username }}</p>
@@ -74,7 +66,7 @@
                         </el-col>
                         <el-col :span="6" class="fbListCenterR">
                           <el-col :span="24" class="bainji">
-                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
+                            <el-link :underline="false" @click="deteles(item)">彻底删除</el-link>
                           </el-col>
                         </el-col>
                       </el-col>
@@ -83,10 +75,12 @@
                   <el-col class="page" :span="24">
                     <el-pagination
                       @size-change="handleSizeChange"
-                      @current-change="handleCurrentChange"
+                      @current-change="handleCurrentChange2"
                       :current-page="currentPage"
+                      background
                       layout="total,  prev, pager, next, jumper"
-                      :total="tatalstatus2"
+                      :total="total2"
+                      :page-size="pageSize"
                     >
                     </el-pagination>
                   </el-col>
@@ -102,11 +96,6 @@
                         </el-col>
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
-                        <el-col :span="6" class="fimage">
-                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
-                          </el-col>
-                        </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.product_name }}</p>
                           <p>营销人名称:{{ item.market_username }}</p>
@@ -117,7 +106,7 @@
                         </el-col>
                         <el-col :span="6" class="fbListCenterR">
                           <el-col :span="24" class="bainji">
-                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
+                            <el-link :underline="false" @click="deteles(item)">彻底删除</el-link>
                           </el-col>
                         </el-col>
                       </el-col>
@@ -128,8 +117,10 @@
                       @size-change="handleSizeChange"
                       @current-change="handleCurrentChange3"
                       :current-page="currentPage"
+                      background
                       layout="total,  prev, pager, next, jumper"
-                      :total="tatalstatus2"
+                      :total="total3"
+                      :page-size="pageSize"
                     >
                     </el-pagination>
                   </el-col>
@@ -138,7 +129,6 @@
             </el-row>
           </el-tab-pane>
         </el-tabs>
-        <el-link :underline="false" class="fabuBtn" @click="messFabu()">信息发布</el-link>
       </el-col>
     </el-row>
   </div>
@@ -155,26 +145,27 @@ export default {
     shenheList: null,
     tatalstatus2: null,
     tatalstatus1: null,
-    Transactionlist: null,
-    jiaoyilist1: null,
-    jiaoyilist: null,
-    dinggou1: null,
     dinggou2: null,
+    dinggou1: null,
     dinggou3: null,
+    total1: null,
+    total2: null,
+    total3: null,
+
     // gonggeiData: null,
   },
   components: {},
   data: () => ({
     currentPage: 0,
-    activeName: 'fgrrsss',
+    activeName: 'first',
     activeNameFirst: 'fgrrsss',
     pageSize: 3,
   }),
   created() {},
   computed: {},
   methods: {
-    handleDelete(item) {
-      this.$emit('delete', { item });
+    deteles(item) {
+      this.$emit('deletes', { item });
     },
     messFabu() {
       this.$router.push({ path: '/enterprise/enterprisexuqiu' });
@@ -185,27 +176,18 @@ export default {
     handleClickFirst(tab, event) {
       console.log(tab, event);
     },
-    // handleSizeChange(val) {
-    //   console.log(`每页 ${val} 条`);
-    // },
-    // handleCurrentChange(val) {
-    //   console.log(`当前页: ${val}`);
-    // },
-
-    handleSizeChange(pageSize) {
-      // this.$emit('handleSizeChange', pageSize);
-    },
+    handleSizeChange() {},
     handleCurrentChange(currentPage) {
       console.log(currentPage);
       this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
     },
 
-    handleCurrentChange1(currentPage) {
+    handleCurrentChange2(currentPage) {
       console.log(currentPage);
       this.$emit('handleCurrentChange1', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
     },
 
-    handleCurrentChange2(currentPage) {
+    handleCurrentChange3(currentPage) {
       console.log(currentPage);
       this.$emit('handleCurrentChange2', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
     },

+ 2 - 15
src/layout/enterprise/contextfabuxx.vue

@@ -156,11 +156,6 @@
                         </el-col>
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
-                        <el-col :span="6" class="fimage">
-                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
-                          </el-col>
-                        </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.product_name }}</p>
                           <p>营销人名称:{{ item.market_username }}</p>
@@ -201,11 +196,6 @@
                         </el-col>
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
-                        <el-col :span="6" class="fimage">
-                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
-                          </el-col>
-                        </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.product_name }}</p>
                           <p>营销人名称:{{ item.market_username }}</p>
@@ -246,11 +236,6 @@
                         </el-col>
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
-                        <el-col :span="6" class="fimage">
-                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
-                          </el-col>
-                        </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.product_name }}</p>
                           <p>营销人名称:{{ item.market_username }}</p>
@@ -272,8 +257,10 @@
                       @size-change="handleSizeChange"
                       @current-change="handleCurrentChange6"
                       :current-page="currentPage"
+                      background
                       layout="total,  prev, pager, next, jumper"
                       :total="total6"
+                      :page-size="pageSize"
                     >
                     </el-pagination>
                   </el-col>

+ 2 - 2
src/layout/supermarket/fabu.vue

@@ -12,8 +12,8 @@
         <el-col :span="24" class="list">
           <el-col :span="12" class="fabuList" v-for="(item, index) in fabuList" :key="index">
             <el-link :underline="false">
-              <el-col :span="5" class="image">
-                <el-image style="width:100px;height:97px;" :src="item.url"></el-image>
+              <el-col :span="5" class="image" v-for="(acc, index) in item.image" :key="index">
+                <el-image style="width:100px;height:97px;" :src="acc.url"></el-image>
               </el-col>
               <el-col :span="19" class="fabuListInfo">
                 <el-col :span="23" class="title">

+ 2 - 2
src/layout/supermarket/rightcont.vue

@@ -39,8 +39,8 @@
           <span slot="label">产品供求</span>
           <el-col :span="6" class="chanpinList" v-for="(item, index) in chanpinList" :key="index">
             <el-link :underline="false">
-              <el-col :span="24" class="images">
-                <el-image style="width:220px;height:160px;" :src="item.url"></el-image>
+              <el-col :span="24" class="images" v-for="(acc, index) in item.image" :key="index">
+                <el-image style="width:220px;height:160px;" :src="acc.url"></el-image>
               </el-col>
               <el-col :span="24" class="title">
                 <span class="textOver">{{ item.name }}</span>

+ 32 - 6
src/views/enterprise/enterprisedg.vue

@@ -7,7 +7,13 @@
       :dinggou2="dinggou2"
       :dinggou3="dinggou3"
       @onsave="onsaveClick"
-      :total="total"
+      :total1="total1"
+      :total2="total2"
+      :total3="total3"
+      @handleCurrentChange="change1"
+      @handleCurrentChange1="change2"
+      @handleCurrentChange2="change3"
+      @deletes="deleteData"
     ></enterprisedg-detail>
   </div>
 </template>
@@ -26,11 +32,12 @@ export default {
   data: () => ({
     info: {},
     liebiaoList: [{ name: '基本信息' }, { name: '消息管理' }, { name: '我的发布' }, { name: '我的订购' }, { name: '注销账号' }],
-
+    total1: 1,
+    total2: 1,
+    total3: 1,
     dinggou1: [],
     dinggou2: [],
     dinggou3: [],
-    total: 1,
   }),
   created() {
     this.searchSite();
@@ -63,7 +70,7 @@ export default {
       console.log(res);
       if (this.$checkRes(res)) {
         this.$set(this, `dinggou1`, res.data);
-        this.$set(this, `tatalstatus2`, res.total);
+        this.$set(this, `total1`, res.total);
       }
     },
 
@@ -75,7 +82,7 @@ export default {
       console.log(res);
       if (this.$checkRes(res)) {
         this.$set(this, `dinggou2`, res.data);
-        this.$set(this, `jiaoyilist1`, res.total);
+        this.$set(this, `total2`, res.total);
       }
     },
 
@@ -87,9 +94,28 @@ export default {
       console.log(res);
       if (this.$checkRes(res)) {
         this.$set(this, `dinggou3`, res.data);
-        this.$set(this, `tatalstatus2`, res.total);
+        this.$set(this, `total3`, res.total);
       }
     },
+
+    async change1({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.jiaoyi1();
+    },
+    async change2({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.jiaoyi2();
+    },
+    async change3({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.jiaoyi3();
+    },
+
+    async deleteData({ item }) {
+      const res = await this.productdeltet(item.id);
+      this.$checkRes(res, '删除成功', '删除失败');
+    },
+
     async onsaveClick({ id }) {
       console.log(id);
       if (id === '基本信息') {

+ 5 - 3
src/views/enterprise/enterprisefabu.vue

@@ -121,7 +121,7 @@ export default {
       const res = await this.list({ skip, limit, status, ...info });
       console.log(res);
       if (this.$checkRes(res)) {
-        this.$set(this, `jiaoyilist`, res.data);
+        this.$set(this, `Transactionlist`, res.data);
         this.$set(this, `total4`, res.total);
       }
     },
@@ -133,7 +133,7 @@ export default {
       const res = await this.list({ skip, limit, status, ...info });
       console.log(res);
       if (this.$checkRes(res)) {
-        this.$set(this, `Transactionlist`, res.data);
+        this.$set(this, `jiaoyilist`, res.data);
         this.$set(this, `total5`, res.total);
       }
     },
@@ -145,7 +145,9 @@ export default {
       const res = await this.list({ skip, limit, status, ...info });
       console.log(res);
       if (this.$checkRes(res)) {
-        this.$set(this, `Transactionlist`, res.data);
+        this.$set(this, `jiaoyilist1`, res.data);
+        console.log(res);
+
         this.$set(this, `total6`, res.total);
       }
     },

+ 6 - 0
src/views/supermaket/supermarket.vue

@@ -175,6 +175,8 @@ export default {
     async searchInfo({ skip = 0, limit = 8, ...info } = {}) {
       const res = await this.ProductQuery({ skip, limit, ...info });
       for (const val of res.data) {
+        console.log(val.totaltype);
+
         if (val.totaltype === '0') {
           var arr = res.data.filter(item => item.totaltype === '0');
           this.$set(this, `jishuList`, arr);
@@ -183,9 +185,13 @@ export default {
           var arrs = res.data.filter(item => item.totaltype === '1');
           this.$set(this, `chanpinList`, arrs);
           this.$set(this, `chanpinTotal`, arrs.length);
+          console.log(arrs);
         } else if (val.totaltype === '2') {
+          console.log('344');
+
           var arrss = res.data.filter(item => item.totaltype === '2');
           this.$set(this, `serviceList`, arrss);
+          console.log(arrss);
           this.$set(this, `serveTotal`, arrss.length);
         }
       }