Browse Source

供需广场开发完成

余胜明 4 years ago
parent
commit
a4569b17c3

BIN
Desktop/buwanjia/dist.rar


+ 35 - 15
Desktop/buwanjia/src/assets/commonCSS/globalCSS.css

@@ -4,9 +4,11 @@
     box-sizing: border-box;
 }
 body {
-    width: 192rem;
+    width: 100%;
     height: 108rem;
     font-family: PingFangSC-Medium, PingFang SC;
+    background-color: #F6F7F8;
+
 }
 .el-form-item, p {
     margin: 0;
@@ -123,6 +125,11 @@ body {
     align-items: center;
 }
 
+/* 主体按钮 */
+.themeButton {
+    background: linear-gradient(180deg, #83E0E9 0%, #4CBECF 100%);
+    text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.1);
+}
 
 
 
@@ -154,8 +161,8 @@ body {
 }
 .accountCentertop_title, 
 .reviewMsg, 
-.supply_othersTitle, 
-.supply_ul_li_title {
+.supply_otherTitle, 
+.supply_others_title {
     font-size: 2.1rem;
 }
 .loginSubmit {
@@ -176,7 +183,8 @@ body {
 .areaItemTitle,
 .li_detail_name,
 .contact_item_type,
-.contact_item_des {
+.contact_item_des,
+.sendDemand {
 
     font-size: 1.8rem;
 }
@@ -189,10 +197,10 @@ body {
 .li_detail_des,
 .supply_head_detail_contact,
 .supply_head_detail_time,
-.supply_ul_li_detail {
+.supply_others_detail {
     font-size: 1.6rem;
 }
-.supply_ul_li_count {
+.supply_others_count {
     font-size: 1.4rem;
 }
 
@@ -209,15 +217,19 @@ body {
 .li_detail_name,
 .contact_item_type,
 .supply_head_title,
-.supply_othersTitle,
-.supply_ul_li_title  {
+.supply_otherTitle,
+.supply_others_title  {
     font-weight: 500;
 }
 /*color*/
-.loginTop, .loginSubmit, .copyInfo_bottom, .productBtn{
+.loginTop, 
+.loginSubmit, 
+.copyInfo_bottom, 
+.productBtn,
+.sendDemand {
     color: #ffffff;
 }
-.areaItemSecondP, .supply_head_detail_contact, .supply_ul_li_detail {
+.areaItemSecondP, .supply_head_detail_contact, .supply_others_detail {
     color: #333;
 }
 .sysLoginCenter_handle_title, 
@@ -240,7 +252,13 @@ body {
     color: #4CBECF;
 }
 /*background*/
-.accountCenter, .supply_others_ul_li, .supplyIndex, .userhome, .supplySquare {
+.accountCenter, 
+.supply_others, 
+.supplyIndex, 
+.userhome, 
+.supplySquare,
+.supplyAllInfo_head,
+.pulishDemand {
     background-color: #F6F7F8;
 }
 .accountCentertop, 
@@ -256,7 +274,8 @@ body {
 .partnerAgents,
 .contact,
 .supplyIndex_main,
-.supplyAllInfo_childRouter {
+.supplyAllInfo_childRouter,
+.supply_others {
     background-color: #fff;
 }
 /*.sysLoginCenter_form {*/
@@ -279,12 +298,12 @@ body {
 .partnerAgents,
 .contact,
 .supplyIndex_main,
-.supply_others_ul_li,
+.supply_others,
 .supplySquare_main1,
 .supplyAllInfo_childRouter {
     border-radius: 1rem;
 }
-.item-input-user, .lastChatting_ul_li {
+.item-input-user, .lastChatting_ul_li, .supplyAllInfo_head {
     border-radius: .5rem;
 }
 
@@ -292,6 +311,7 @@ body {
 .areaMore, 
 .systemNotice_ul_li, 
 .lastChatting_ul_li,
-.partnerAgents_ul_li{
+.partnerAgents_ul_li,
+.supply_others{
     cursor: pointer
 }

+ 16 - 3
Desktop/buwanjia/src/commonCmp/AccountCenter/AccountCenterTop.vue

@@ -12,6 +12,7 @@
                 <img :src="url ?  url : require('../../assets/images/SystemLogin/demoAvatar.png')" alt="" />
             </div>
             <ul class="logout manyRole">
+                <li @click="backhomepage">用户首页</li>
                 <li @click="accountcenter">账户中心</li>
                 <li @click="logoutAccount">注销登陆</li>
             </ul>
@@ -65,7 +66,14 @@
 
             },
             accountcenter() {
-                this.$router.push("1")
+                this.$router.push("/accountcenter");
+            },
+            backhomepage() {
+                const address = window.location.href.split('#/')[1];
+                if(address === "userhomepage") {
+                    this.$router.go(0);
+                }
+                this.$router.push("/userhomepage");
             },
 
             // 注销登陆
@@ -74,7 +82,7 @@
                     accesstoken: this.$store.state.selectAccount.token
                 });
                 console.log(res);
-                this.$router.push("systemlogin");
+                this.$router.push("/systemlogin");
             },
 
 
@@ -96,8 +104,13 @@
 <style lang='scss' scoped>
     .accountCentertop {
         position: relative;
-        width: 100%;
+        left: 50%;
+        width: 100vw;
+        min-width: 192rem;
         height: 8rem;
+        transform: translate(-50%);
+        z-index: 9999;
+
 
         display: flex;
         justify-content: space-between;

+ 3 - 1
Desktop/buwanjia/src/components/AccountCenter/AccountCenter.vue

@@ -129,7 +129,9 @@
 <style lang='scss' scoped>
     .accountCenter {
         position: relative;
-        width: 100%;
+        left: 50%;
+        transform: translate(-50%);
+        width: 192rem;
         height: 133.3rem;
         // 主体
 

+ 2 - 2
Desktop/buwanjia/src/components/AccountCenter/ProductManagement.vue

@@ -96,7 +96,7 @@
             // 添加产品
             addTeamProduct() {
                 if (this.fisadministrator !== 1) return;
-                this.$router.push(`/productmanagement/productEditor/-1`)
+                this.$router.push(`/accountcenter/productmanagement/productEditor/-1`)
             },
 
             // 发送请求上下架
@@ -109,7 +109,7 @@
             // 编辑
             operateProd(value) {
                 if (this.fisadministrator !== 1) return;
-                this.$router.push(`/productmanagement/productEditor/${value.tagents_productid}`)
+                this.$router.push(`/accountcenter/productmanagement/productEditor/${value.tagents_productid}`)
             },
 
             //处理页数改变的方法

+ 2 - 2
Desktop/buwanjia/src/components/AccountCenter/TeamManagement.vue

@@ -59,14 +59,14 @@
             // 添加成功,判断是否是主账号,不是主账号则没有权限添加成员
             addTeamMember() {
                 if (this.fisadministrator !== 1) return;
-                this.$router.push(`/teamManagement/membereditor`)
+                this.$router.push(`/accountcenter/teammanagement/membereditor`)
             },
 
             // 编辑
             operateProd(value) {
                 if (this.fisadministrator !== 1) return;
                 sessionStorage.setItem("currentData", JSON.stringify(value));
-                this.$router.push(`/teamManagement/membereditor`)
+                this.$router.push(`/accountcenter/teammanagement/membereditor`)
             },
 
             // 请求成员列表请求体

+ 245 - 0
Desktop/buwanjia/src/components/HomePage/Supply/PulishDemand.vue

@@ -0,0 +1,245 @@
+<template>
+    <div class="pulishDemand">
+        <AccountCenterTop/>
+        <div class="pulishDemandMain">
+            <divTitle h_title="发布供需"/>
+            <el-form :model="demandData"
+            :rules="rules"
+            ref="demandFormRefs"
+            hide-required-asterisk
+             label-width="180px" 
+             label-position="right">
+                <el-form-item label="需求分类" prop="ftype" >
+                    <el-select v-model="demandData.ftype" placeholder="请选择" @focus="openClass">
+                        <el-option
+                        v-for="item in supplyClass"
+                        :key="item.ttypedetailid"
+                        :label="item.ftype"
+                        :value="item.ftype">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="需求标题" prop="ftitle">
+                    <el-input v-model="demandData.ftitle" placeholder="请填写消息标题"></el-input>
+                </el-form-item>
+                <el-form-item label="需求内容" prop="fcontent">
+                    <el-input type="textarea" v-model="demandData.fcontent" placeholder="请填写需求内容"></el-input>
+                </el-form-item>
+                <el-form-item label="图片">
+                </el-form-item>
+                <el-form-item label="下架日期">
+                    <el-date-picker
+                    type="date"
+                    v-model="demandData.fenddate"
+                    placeholder="请选择下架日期"
+                    format="yyyy 年 MM 月 dd 日"
+                    value-format="yyyy-MM-dd"
+                    class="input-class"
+                    >
+                    </el-date-picker>
+                </el-form-item>
+            </el-form>
+            <div class="operate">
+                <el-button class="operate_reset " @click="resetMsg">重置</el-button>
+                <el-button class="operate_update themeButton" @click="updateMsg">保存</el-button>
+            </div>
+        </div>
+
+        <SystemLoginCopyBottom bgc_blue="background: #4DC2D4"/>
+    </div>
+</template>
+
+<script type='text/javascript'>
+    import AccountCenterTop from "../../../commonCmp/AccountCenter/AccountCenterTop.vue"
+    import SystemLoginCopyBottom from "../../../commonCmp/WesiteInherentInfo/SystemLoginCopyBottom.vue"
+    import divTitle from "../../../commonCmp/AccountCenter/divTitle.vue"
+    export default {
+        name: "PulishDemand",
+        components: {
+            AccountCenterTop,
+            SystemLoginCopyBottom,
+            divTitle
+        },
+        data() {
+            return {
+                demandData: {
+                    ftype: "",
+                    ftitle: "",
+                    fcontent: "",
+                    fenddata: "",
+                    fissupply: 0
+                },
+
+                rules: {
+                    ftype: [{ required: true, message: "分类不能为空", trigger: "blur"}],
+                    ftitle: [{ required: true, message: "标题不能为空", trigger: "blur"}],
+                    fcontent: [{required: true, message: "内容不能为空", trigger: "blur"}]
+                },
+                supplyClass: [],
+            }
+        },
+        methods: {
+            resetMsg() {
+                this.demandData = {
+                    ftype: "",
+                    ftitle: "",
+                    fcontent: "",
+                    fenddata: "",
+                    fissupply: 0
+                }
+            },
+            updateMsg() {
+                // 表单验证
+                this.$refs.demandFormRefs.validate( async valid => {
+                    if (!valid) return;
+                    const res = await this.$http.post("", this.getFullItfUpdateSupply())
+                    if (res.status >= 300 && res.status < 200) return;
+                    const res1 = await this.$http.post("", this.getFullItfPulishSupply(res.data.data[0].tsupplyanddemandid));
+                    if (res1.status >= 300 && res1.status < 200) return;
+                    this.$router.back();
+                })
+            },
+            // 提交修改信息
+            async openClass() {
+                const res = await this.$http.post("", this.getFullItfSupplyClass())
+                if (res.status >= 300 && res.status < 200) return;
+                this.supplyClass = res.data.data;
+            },
+
+            // 发送获取分类请求体
+            getFullItfSupplyClass() {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'enterprise.system.supplyanddemand',
+                    method: 'query_typeselectList'
+                })
+
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {};
+
+                return interfaceType;
+            },
+
+            // 新增修改供需信息
+            getFullItfUpdateSupply() {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method: 'insertormodify'
+                })
+
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = this.demandData;
+
+                return interfaceType;
+            },
+
+            // 发布供需信息请求体
+            getFullItfPulishSupply(tsupplyanddemandid) {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method: 'updatesupplyanddemandstatus'
+                })
+
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    tsupplyanddemandid,
+                    fstatus: "发布"
+                }
+
+                return interfaceType;
+            }
+        }
+    }
+</script>
+
+<style lang='scss' scoped>
+        /deep/ .el-select-dropdown {
+        position: absolute;
+        top: 28rem;
+        left: 36.1rem;
+    }
+    .pulishDemand {
+        position: relative;
+        .el-select {
+            /deep/ .el-input__inner {
+                font-size: 1.8rem;
+            }
+        }
+        // label样式
+        /deep/ .el-form-item__label {
+            position: relative;
+            font-size: 1.8rem;
+            color: #000000;
+            opacity: 50%;
+        }
+
+        // 输入框背景
+        /deep/ .el-input__inner {
+            width: 27.5rem;
+            height: 4.5rem;
+            margin-left: .9rem;
+            background: #F4F4F4;
+        }
+
+        // 提示小绿星
+        /deep/ .el-form-item__label::after {
+            position: absolute;
+            content: "*";
+            top: -16%;
+            color: #4BBECF;
+
+        }
+        /*textarea深度改变*/
+        /deep/ .el-textarea__inner {
+            width: 126.2rem;
+            height: 27.2rem;
+            font-size: 1.8rem;
+            padding-top: 1.4rem;
+            background: #F4F4F4;
+            margin-left: .9rem;
+            resize: none
+        }
+        // 输入框提示错误位置
+        /deep/.el-form-item__error {
+            top: 100%;
+            left: 1%;
+        }
+
+
+        .pulishDemandMain {
+            margin-top: 2.5rem;
+            position: relative;
+            left: 50%;
+            width: 156.8rem;
+            height: 100.7rem;
+            transform: translate(-50%);
+            background-color: #FFF;
+            .el-form {
+                margin-top: 6rem;
+                .el-form-item {
+                    margin-bottom: 2.5rem;
+                    .el-input {
+                        font-size: 1.8rem;
+                    }
+                }
+            }
+            .operate {
+                position: absolute;
+                bottom: 20%;
+                left: 50%;
+                transform: translate(-50%);
+                .operate_reset, .operate_update {
+                    width: 23.6rem;
+                    height: 5.2rem;
+                    font-size: 2.4rem;
+                    color: #fff;
+                    border-radius: 1rem;
+                }
+                .operate_reset {
+                    color:#4CBECF;
+                    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
+                    border: 2px solid #4CBECF;
+                }
+            }
+        }
+    }
+</style>

+ 102 - 89
Desktop/buwanjia/src/components/HomePage/Supply/Supply.vue

@@ -4,50 +4,30 @@
         <div class="supplyIndex_main">
             <!-- 头部 -->
             <div class="supplyIndex_main_head">
-                <p class="supply_head_title">各位老板看下有以下料的联系我,高价收!</p>
+                <p class="supply_head_title">{{item.ftitle}}</p>
                 <p class="supply_head_detail">
-                    <img src="../../../assets/images/SystemLogin/logo2x.png" alt="logo" class="supply_head_logo">
-                    <span class="supply_head_detail_contact">家纺城-小布</span>
+                    <img :src="item.headportraiturl" alt="logo" class="supply_head_logo">
+                    <span class="supply_head_detail_contact">{{item.name}}</span>
                     <img src="../../../assets/images/UserHomepage/timeIcon.svg" alt="timeIconSvg" class="timeIconSvg">
-                    <span class="supply_head_detail_time">12-07 12:34</span>
+                    <span class="supply_head_detail_time">{{checkdate}}</span>
                 </p>
             </div>
             <!-- 分割线 -->
             <div class="grayLine"></div>
 
             <!-- 编辑 -->
-            <el-input type="textarea" class="supplyIndex_main_edit"></el-input>
+            <el-input type="textarea" class="supplyIndex_main_edit" v-model="item.fcontent"></el-input>
             <!-- 一键联系 -->
             <el-button class="areaItem_contact">一键联系</el-button>
             <!-- 分割线 -->
             <div class="line1 grayLine"></div>
             <!-- 其他推荐 -->
-            <div class="supply_others">
-                <span class="supply_othersTitle">其他推荐</span>
-                <!-- <ul class="supply_others_ul">
-                    <li v-for="(item,index) in 18" :key="index" class="supply_others_ul_li">
-                        <p class="supply_ul_li_title"><span>【窗帘布】</span>各位老板看下有以下面料的联系我</p>
-                        <div class="supply_ul_li_detail">
-                            <div class="supply_ul_li_detail_left">
-                                <p>各位老板看下有以下面料的联系我高价收!</p>
-                                <span>手机电话: 15257294120</span>
-                                <span class="supply_ul_li_detail_left_time">2021-11-10 14:23:34</span>
-                            </div>
-                            <div class="supply_ul_li_detail_imgs">
-                                <img src="../../../assets/images/UserHomepage/bedImg.png" alt="prodImg">
-                                <img src="../../../assets/images/UserHomepage/bedImg.png" alt="prodImg">
-                                <img src="../../../assets/images/UserHomepage/bedImg.png" alt="prodImg">
-                            </div>
-                        </div>
-                        <div class="line2 grayLine"></div>
-                        <p class="supply_ul_li_count">
-                            <span>浏览次数: 286次 </span>&nbsp;
-                            <span>意向沟通人数: 125人</span>
-                        </p>
-                        <el-button class="contact1 areaItem_contact">一键联系</el-button>
-                    </li>
-                </ul>      -->
-                <SupplyItem/>
+            <div class="supply_other">
+                <p class="supply_otherTitle">其他推荐</p>
+                <div v-for="(item,index) in menulist" :key="index" class="child">
+                    <SupplyItem :item="item"/>
+                    <el-button class="contact1 areaItem_contact">{{item.fstatus}}</el-button>
+                </div>
             </div>
         </div>       
         <SystemLoginCopyBottom bgc_blue="background: #4DC2D4"/>
@@ -64,6 +44,87 @@
             AccountCenterTop,
             SystemLoginCopyBottom,
             SupplyItem
+        },
+        data() {
+            return {
+                menulist: '',
+                // 供应商id
+                itemid: '',
+                item: "",
+                checkdate: "",
+            }
+        },
+
+        created() {
+            this.itemid = sessionStorage.getItem("itemid");
+            this.getTypeSelectList();
+            this.getSupplyDetail();
+        },
+        methods: {
+            async getSupplyDetail() {
+                const activepth = sessionStorage.getItem("activepath");
+                if (activepth === "userhomepage/supplyDemand") {
+                    const res = await this.$http.post("", this.getFullItfSupplyDetail("query_mysupplyanddemandMain"))
+                    if (res.status >= 300 && res.status < 200) return;
+                    const {data: {data}} = res;
+                    this.item = data[0];
+                    this.checkdate = data[0].checkdate.substr(0 , data[0].checkdate.length-4);
+                    this.item['name'] = this.$store.state.selectAccount.fname;
+                } else {
+                    const res = await this.$http.post("", this.getFullItfSupplyDetail("query_supplyanddemandMain"));
+                    if (res.status >= 300 && res.status < 200) return;
+                    const {data: {data}} = res;
+                    this.item = data[0];
+                    this.checkdate = data[0].checkdate.substr(0 , data[0].checkdate.length-4);
+                    this.item['name'] = this.item.fagentname;
+                }
+
+            },
+            // 发送获取分类请求
+            async getTypeSelectList() {
+                const res = await this.$http.post("", this.getFullItfSupplyListData())
+                if (res.status >= 300 && res.status < 200) return;
+                const {data: {data}} = res;
+                this.menulist = data;
+            },
+
+            // 获取列表的数据
+            getFullItfSupplyListData() {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method: 'query_supplyanddemandList'
+                })
+                
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    getdatafromdbanyway: true,
+                    pageNumber: 1,
+                    pageSize: 20,
+                    where: {
+                        condition: "",
+                        ftype: "",
+                        fissupply:"0",
+                        fstatus:""
+                    }
+                }
+
+                return interfaceType;
+            },
+
+            // 发送获取我的供需供需详情请求体
+            getFullItfSupplyDetail(method) {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method,
+                })
+
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    tsupplyanddemandid: this.itemid,
+                };
+
+                return interfaceType;
+            },
         }
     }
 </script>
@@ -84,6 +145,8 @@
     }
     .supplyIndex {
         position: relative;
+        left: 50%;
+        transform: translate(-50%);
         width: 192rem;
         height: 186.5rem;
         // 主体
@@ -150,66 +213,16 @@
                 top: 42%;
             }
             // 其他推荐标题
-            .supply_others {
+            .supply_other {
                 width: 100%;
                 margin-top: 11.5rem;
-                // ul {
-                //     margin-top: 3rem;
-                //     // display: flex;
-                //     // flex-wrap: wrap;
-                //     li {
-                //         display: inline-block;
-                //         position: relative;
-                //         width: 71.9rem;
-                //         height: 18.8rem;
-                //         margin-bottom: 3rem;
-                //         padding: 2rem .9rem;
-                //         .supply_ul_li_title {
-                //             margin-left: -1rem;
-                //         }
-                //         .supply_ul_li_detail {
-                //             margin-top: 1rem;
-
-                //             display: flex;
-                //             justify-content: space-between;
-                //             .supply_ul_li_detail_imgs {
-                //                 display: flex;
-                //                 img {
-                //                     height: 7.2rem;
-                //                     width: 9.6rem;
-                //                     margin-left: 1rem;
-                //                     border-radius: .5rem;
-                //                 }
-                //             }
-                //             .supply_ul_li_detail_left {
-                //                 display: flex;
-                //                 flex-direction: column;
-                //                 .supply_ul_li_detail_left_time {
-                //                     margin-top: .8rem;
-                //                 }
-                //             }
-                //         }
-                //         .line2 {
-                //             width: 98%;
-                //             top: 75%;
-                //         }
-                //         .supply_ul_li_count {
-                //             margin-top: 2.4rem;
-                //         }
-                //         .contact1 {
-                //             padding: 0;
-                //             margin: 0;
-                //             width: 8.2rem;
-                //             height: 3.2rem;
-                //             top: 80%;
-                //             right: 2rem;
-                //             font-size: 1.6rem;
-                //         }
-                //     }
-                //     li:nth-child(2n-1) {
-                //         margin-right: 3rem;
-                //     }
-                // }
+                .child {
+                    display: inline-block;
+                    margin-top: 3rem;
+                }
+                .child:nth-child(2n) {
+                    margin-right: 2.7rem;
+                }
             }
         }
     } 

+ 144 - 54
Desktop/buwanjia/src/components/HomePage/Supply/SupplyAllInfo.vue

@@ -1,90 +1,154 @@
 <template>
     <div class="supplyAllInfo">
-        <!-- <router-view></router-view> -->
-        <el-menu router mode="horizontal">
-            <el-menu-item 
-                :index="'/' + item.authname"
-                v-for="item in menulist"
-                :key="item.id"
-                >
-                <img src="../../../assets/images/UserHomepage/bedImg.png" alt="supplyAreaLogo">
-                <span>{{item.title}}</span>
-            </el-menu-item>
-        </el-menu>
+        <ul class="supplyAllInfo_head">
+            <li class="supplyAllInfo_head_item" v-for="(item,index) in menulist1" :key="index" @click="getSupplyListData(item.ftype)">
+                <img src="../../../assets/images/SystemLogin/logo2x.png" alt="">
+                <span>{{item.ftype}}</span>
+            </li>
+        </ul>
           <!-- // 断层 -->
         <div class="fault">
             <div class="fault1"></div>
             <div class="fault2"></div>
         </div>
         <div class="supplyAllInfo_childRouter">
-            <router-view></router-view>
+            <div v-for="(item,index) in supplyListdata" :key="index" class="child">
+                <SupplyItem :item="item" :status="false"/>
+                <el-button class="contact1 areaItem_contact">{{item.fstatus}}</el-button>
+            </div>
+
         </div>
     </div>
 </template>
 
 <script type='text/javascript'>
+    import SupplyItem from '../Supply/SupplyItem.vue'
     export default {
         name: "SupplyInfo.vue",
+        components: {
+            SupplyItem
+        },
         data () {
             return {
-                // 列表展示
-                menulist : [
-                    {id: 1, authname: 'userhomepage/supplyallinfo/findfabric', title: "寻找面料"},
-                    {id: 2, authname: 'userhomepage/supplyallinfo/fabricdesign', title: "面料设计"}, 
-                    {id: 3, authname: 'userhomepage/supplyallinfo/graphicdesign', title: "平面设计"},
-                    {id: 4, authname: 'userhomepage/supplyallinfo/productplanning', title: "产品策划"},
-                    {id: 5, authname: 'userhomepage/supplyallinfo/searchingachor', title: "寻找主播"},
-                    {id: 6, authname: 'userhomepage/supplyallinfo/photography', title: "摄影摄像"},
-                    {id: 7, authname: 'userhomepage/supplyallinfo/businesstraining', title: "商业培训"},
-                ],
+                // 分类
+                menulist1: [],
+                // 分类图片url数组
+                urlArr: [],
+                // 分页查询
+                queryInfo: {
+                    pagenumber: 1,
+                    pagesize: 20,
+                },
+                //供需列表数据
+                supplyListdata: [],
+            }
+        },
+        created () {
+            // 获取分类
+            this.getTypeSelectList();
+            this.getSupplyListData();
+        },
+        methods: {
+            // 发送获取分类请求
+            async getTypeSelectList() {
+                const res = await this.$http.post("", this.getFullItfTypeSelectList())
+                if (res.status >= 300 && res.status < 200) return;
+                const {data: {data}} = res;
+                this.menulist1 = data;
+            },
+            
+            async getSupplyListData(type="") {
+                const res = await this.$http.post("", this.getFullItfSupplyListData(type))
+                if (res.status >= 300 && res.status < 200) return;
+                // 下架沉底
+                const demoSupplyList = res.data.data;
+                const emplySupply = [];
+                const doneSupply = [];
+                for (let i = 0; i < demoSupplyList.length; i++) {
+                    if (demoSupplyList[i].fstatus === "已解决") {
+                        doneSupply.push(demoSupplyList[i])
+                    } else {
+                        emplySupply.push(demoSupplyList[i]);
+                    }
+                }
+                for (let i = 0; i < doneSupply.length; i++) {
+                    emplySupply.push(doneSupply[i]);
+                }
+                this.supplyListdata = emplySupply;
+            },
+
+            // 发送获取分类请求体
+            getFullItfTypeSelectList() {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'enterprise.system.supplyanddemand',
+                    method: 'query_typeselectList'
+                })
+
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {};
+
+                return interfaceType;
+            },
+
+            // 获取列表的数据
+            getFullItfSupplyListData(type="") {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method: 'query_supplyanddemandList'
+                })
+                
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    getdatafromdbanyway: true,
+                    pageNumber: this.queryInfo.pagenumber,
+                    pageSize: this.queryInfo.pagesize,
+                    where: {
+                        condition: "",
+                        ftype: type,
+                        fissupply:"0",
+                        fstatus:""
+                    }
+                }
+
+                return interfaceType;
             }
         }
     }
 </script>
 
 <style lang='scss' scoped>
-    // 修改选中导航的样式
-    /deep/ .el-menu-item.is-active {
-        background: #F6F7F8 !important;
-        font-size: 2.1rem !important;
-        color: #000 !important;
-    }
+    .supplyAllInfo_head {
+        width: 146.8rem;
+        height: 13.9rem;
+        margin: 2.5rem 5rem 0 5rem;
 
-    // 自定义导航的样式
-    /deep/ .el-menu--horizontal>.el-menu-item {
-        height: 100%;
-        width: 11.6rem;
-        font-size: 1.8rem;
         display: flex;
+        justify-content: space-around;
         align-items: center;
-        border-radius: .5rem;
-        justify-content: center;
-    }
-    /deep/ .el-menu--horizontal.el-menu {
-        margin-top: 2.5rem;
-    }
 
-    .el-menu {
-        height: 13.9rem;
-        width: 146.8rem;
-        background-color: #F6F7F8;
-        border-radius: .5rem;
-        display: flex;
-        justify-content: space-around;
+        .supplyAllInfo_head_item {
+            width: 10rem;
+            height: 100%;
 
-        .el-menu-item {
-            margin-top: 0;
             display: flex;
             flex-direction: column;
+            align-items: center;
+            img {
+                height: 6.2rem;
+                width: 6.2rem;
+                border-radius: 50%;
+                margin: 2.5rem 0 1rem 0;
+            }
+            span {
+                font-size: 1.8rem;
+            };
         }
-        img {
-            height: 6.2rem;
-            width: 6.2rem;
-            border-radius: 50%;
-            margin-top: 1.5rem;
+        .supplyAllInfo_head_item:hover {
+            background-color: #fff;
         }
     }
 
+
     // 断层
     .fault {
         background-color: #F6F7F8;
@@ -110,8 +174,34 @@
         }
 
     }
+    .supplyAllInfo_childRouter::-webkit-scrollbar {
+        display: none;
+    }
     .supplyAllInfo_childRouter {
         height: 88.2rem;
-        width:100%
+        overflow: hidden;
+        overflow-y: auto;
+        width:100%;
+
+        padding: 0 5rem;
+        margin-top: 2.5rem;
+        .child{
+            position: relative;
+            display: inline-block;
+            margin-bottom: 2.5rem;
+            .contact1 {
+                padding: 0;
+                margin: 0;
+                width: 8.2rem;
+                height: 3.2rem;
+                top: 80%;
+                right: 2rem;
+                font-size: 1.6rem;
+            }
+        }
+        .child:nth-child(2n-1) {
+            margin-right: 2.7rem;
+        }
+
     }
 </style>

+ 3 - 0
Desktop/buwanjia/src/components/HomePage/Supply/SupplyAllInfo/FindFabric.vue

@@ -10,6 +10,9 @@
         name: "FindFabric",
         components: {
             SupplyItem,
+        },
+        created () {
+            
         }
     }
 </script>

+ 80 - 3
Desktop/buwanjia/src/components/HomePage/Supply/SupplyConnecting.vue

@@ -1,13 +1,90 @@
 <template>
-<div></div>
+    <div class="supplyConnecting">
+        <div v-for="(item,index) in connetingListData" :key="index" class="child">
+            <SupplyItem :item="item" :status="false"/>
+            <el-button class="contact1 areaItem_contact">继续沟通</el-button>
+        </div>
+    </div>
 </template>
 
 <script type='text/javascript'>
+    import SupplyItem from '../Supply/SupplyItem.vue'
     export default {
-        name: "SupplyConnecting"
+        name: "SupplyConnecting",
+        components: {
+            SupplyItem
+        },
+        data () {
+            return {
+                connetingListData: [],
+            }
+        },
+        created () {
+            this.getConnectingData();
+        },
+
+        methods: {
+            async getConnectingData() {
+                const res = await this.$http.post("", this.getFullItfSupplyListData())
+                if (res.status >= 300 && res.status < 200) return;
+                this.connetingListData = res.data.data;
+            },
+
+            // 获取列表的数据
+            getFullItfSupplyListData() {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method: 'query_supplyanddemandList'
+                })
+                
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    getdatafromdbanyway: true,
+                    pageNumber: 1,
+                    pageSize: 20,
+                    where: {
+                        condition: "",
+                        ftype: "",
+                        fissupply:"0",
+                        fstatus: "正在对接"
+                    }
+                }
+
+                return interfaceType;
+            }
+        }
     }
 </script>
 
 <style lang='scss' scoped>
-    
+    .supplyConnecting::-webkit-scrollbar {
+        display: none;
+    }
+
+    .supplyConnecting {
+        margin-top: 3rem;
+        height: 120.8rem;
+        padding: 0 5rem;
+        overflow: hidden;
+        overflow-y: auto;
+        .child {
+            position: relative;
+            display: inline-block;
+            height: 18.8rem;
+            margin-bottom: 2.5rem;
+
+            .contact1 {
+                padding: 0;
+                margin: 0;
+                width: 8.2rem;
+                height: 3.2rem;
+                top: 80%;
+                right: 2rem;
+                font-size: 1.6rem;
+            }
+        }
+        .child:nth-child(2n-1) {
+            margin-right: 2.6rem;
+        }
+    }
 </style>

+ 153 - 3
Desktop/buwanjia/src/components/HomePage/Supply/SupplyDemand.vue

@@ -1,15 +1,165 @@
 <template>
-    <div>
+    <div class="supplyDemand">
+        <div class="supplyDemand_head">
+            <el-input placeholder="搜索需求" v-model="keyword">
+                <el-button slot="suffix" type="primary" class="el-input__icon el-icon-search" @click="getMyDemandListData(keyword)"></el-button>
+            </el-input>
+            <el-button class="sendDemand themeButton" @click="toPulishDemand">发布需求</el-button>
+        </div>
+        <!-- // 断层 -->
+        <div class="fault">
+            <div class="fault1"></div>
+            <div class="fault2"></div>
+        </div>
+        <div class="demandSearchResult">
+            <div v-for="(item,index) in suplyDemand" :key="index" class="child">
+                <SupplyItem :item="item" :status="true"/>
+            </div>
+        </div>
         
     </div>
 </template>
 
 <script type='text/javascript'>
+    import SupplyItem from "../../../components/HomePage/Supply/SupplyItem.vue"
     export default {
-        name: "SupplyDemand"
+        name: "SupplyDemand",
+        components: {
+            SupplyItem
+        },
+        data() {
+            return {
+                // 搜索关键字
+                keyword: "",
+                // 列表数据
+                suplyDemand: [],
+            }
+        },
+        created () {
+            this.getMyDemandListData();
+        },
+        methods: {
+            async getMyDemandListData(keyword="") {
+                const res = await this.$http.post("", this.getFullItfSupplyListData(keyword))
+                if (res.status >= 300 && res.status < 200) return;
+                // 下架沉底
+                const demoSupplyList = res.data.data;
+                const emplySupply = [];
+                const doneSupply = [];
+                for (let i = 0; i < demoSupplyList.length; i++) {
+                    if (demoSupplyList[i].fstatus === "已解决") {
+                        doneSupply.push(demoSupplyList[i])
+                    } else {
+                        emplySupply.push(demoSupplyList[i]);
+                    }
+                }
+                for (let i = 0; i < doneSupply.length; i++) {
+                    emplySupply.push(doneSupply[i]);
+                }
+                this.suplyDemand = emplySupply;
+            },
+            toPulishDemand() {
+                this.$router.push("supplydemand/pulishdemand")
+            },
+
+            
+            // 获取列表的数据
+            getFullItfSupplyListData(keyword="") {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method: 'query_mysupplyanddemandList'
+                })
+                
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    getdatafromdbanyway: true,
+                    pageNumber: 1,
+                    pageSize: 20,
+                    where: {
+                        condition: keyword,
+                        ftype: "",
+                        fissupply: 0,
+                    }
+                }
+                return interfaceType;
+            },
+            
+        }
     }
 </script>
 
 <style lang='scss' scoped>
-    
+    .supplyDemand {
+        .supplyDemand_head {
+            margin-top: 2.5rem;
+            padding: 0 5rem; 
+            .el-input {
+                width: 124rem;
+                font-size: 1.8rem;
+                color: rgba(0, 0, 0, .4);
+                .el-button {
+                    width: 14.8rem;
+                    font-size: 3.5rem;
+                    margin-right: -.5rem;
+                }
+            }
+            /deep/ .el-input__inner {
+                height: 6.8rem;
+                text-align: center;
+                background-color: #F6F7F8;
+            }
+            .sendDemand {
+                position: absolute;
+                height: 6.8rem;
+                width: 14.8rem;
+                margin: 0 0 .2rem 4rem;
+            }
+
+        }
+        // 断层
+        .fault {
+            background-color: #F6F7F8;
+            height: 7rem;
+            width: 100%;
+            display: flex;
+            flex-direction: column;
+            justify-content: space-between;
+            .fault1, .fault2 {
+                width: 100%;
+                background-color: #fff;
+                border-radius: 1rem;
+                height: 1rem;
+            }
+            .fault1 {
+                height: 3rem;
+                border-top-left-radius: 0;
+                border-top-right-radius: 0;
+            }
+            .fault2 {
+                border-bottom-left-radius: 0;
+                border-bottom-right-radius: 0;
+            }
+
+        }
+
+            .demandSearchResult::-webkit-scrollbar {
+        display: none;
+    }
+        .demandSearchResult {
+            height: 96.8rem;
+            overflow: hidden;
+            overflow-y: auto;
+            width: 100%;
+            padding: 2.5rem 5rem 0 5rem;
+        }
+
+        .child{
+            position: relative;
+            display: inline-block;
+            margin-bottom: 2.5rem;
+        }
+        .child:nth-child(2n-1) {
+            margin-right: 2.7rem;
+        }
+    }
 </style>

+ 152 - 46
Desktop/buwanjia/src/components/HomePage/Supply/SupplyItem.vue

@@ -1,56 +1,128 @@
 <template>
-    <ul class="supply_others_ul">
-        <li v-for="(item,index) in 18" :key="index" class="supply_others_ul_li">
-            <p class="supply_ul_li_title"><span>【窗帘布】</span>各位老板看下有以下面料的联系我</p>
-            <div class="supply_ul_li_detail">
-                <div class="supply_ul_li_detail_left">
-                    <p>各位老板看下有以下面料的联系我高价收!</p>
-                    <span>手机电话: 15257294120</span>
-                    <span class="supply_ul_li_detail_left_time">2021-11-10 14:23:34</span>
-                </div>
-                <div class="supply_ul_li_detail_imgs">
-                    <img src="../../../assets/images/UserHomepage/bedImg.png" alt="prodImg">
-                    <img src="../../../assets/images/UserHomepage/bedImg.png" alt="prodImg">
-                    <img src="../../../assets/images/UserHomepage/bedImg.png" alt="prodImg">
-                </div>
+    <div class="supply_others">
+        <p class="supply_others_title"><span>【窗帘布】</span>{{item.ftitle}}</p>
+        <div class="supply_others_detail" @click="jumpLastSupply()">
+            <div class="supply_others_left">
+                <p class="supply_others_left_des">
+                    {{item.fcontent}}
+                    </p>
+                <span class="supply_others_detail_left_time">{{item.checkdate.substr(0 , item.checkdate.length-4)}}</span>
             </div>
-            <div class="line2 grayLine"></div>
-            <p class="supply_ul_li_count">
-                <span>浏览次数: 286次 </span>&nbsp;
-                <span>意向沟通人数: 125人</span>
-            </p>
-            <el-button class="contact1 areaItem_contact">一键联系</el-button>
-        </li>
-    </ul> 
+            <div class="supply_others_detail_imgs" v-if="attinfos.length">
+                <img :src="attinfos[0].fobsurl" alt="prodImg" v-if="attinfos[0]">
+                <img :src="attinfos[1].fobsurl" alt="prodImg" v-if="attinfos[1]">
+                <img :src="attinfos[1].fobsurl" alt="prodImg" v-if="attinfos[2]">
+
+            </div>
+        </div>
+        <div class="line2 grayLine"></div>
+        <p class="supply_others_count">
+            <span>浏览次数: {{item.freadtimes}}次 </span>&nbsp;
+            <span>
+                <span @click.stop="showtaking()" class="wantTaking">意向沟通人数: </span> 
+                {{item.fcommunicationtimes}}人
+            </span>
+        </p>
+        <div v-if="status">
+            <el-button class="contact1 areaItem_contact" :disabled="disabled">待对接</el-button>
+            <el-button class="contact2 areaItem_contact" :disabled="disabled">编辑</el-button>
+            <el-button class="contact3 areaItem_contact" @click="offline(item.tsupplyanddemandid)" :disabled="disabled">下架</el-button>
+        </div>
+        <ul v-if="disable" class="takingList" >
+            <li>
+                <span>2021-02-12 16:34:45</span>&nbsp;
+                <span>用户: 啊9999</span>&nbsp;
+                <span>发起联系,遗憾未达成合作</span>
+            </li>
+            <li>
+                <span>2021-02-12 16:34:45</span>&nbsp;
+                <span>用户: 啊9999</span>&nbsp;
+                <span>发起联系,遗憾未达成合作</span>
+            </li>
+            <li>
+                <span>2021-02-12 16:34:45</span>&nbsp;
+                <span>用户: 啊9999</span>&nbsp;
+                <span>发起联系,遗憾未达成合作</span>
+            </li>
+            <li>
+                <span>2021-02-12 16:34:45</span>&nbsp;
+                <span>用户: 啊9999</span>&nbsp;
+                <span>发起联系,遗憾未达成合作</span>
+            </li>
+        </ul>
+    </div>
 </template>
 
 <script type='text/javascript'>
     export default {
-        name: "SupplyItem"
+        name: "SupplyItem",
+        props: ["item", "status"],
+        data () {
+            return {
+                // 产品图地址
+                attinfos: this.item.attinfos,
+                // 是否隐藏沟通信息
+                disable: false,
+                // 下架后不可有其他操作
+                disabled: this.item.fstatus === "已解决" ? true : false,
+            }
+        },
+        methods: {
+            jumpLastSupply() {
+                console.log(this.item.tsupplyanddemandid);
+                sessionStorage.setItem("itemid", this.item.tsupplyanddemandid);
+                this.$router.push("supply");
+            },
+            showtaking() {
+                if (!this.status) return;
+                this.disable = !this.disable;
+
+            },
+
+            // 发送下架请求
+            async offline(tsupplyanddemandid) {
+                const res = await this.$http.post("", this.getFullItfOfflineSupply(tsupplyanddemandid))
+                if (res.status >= 300 && res.status < 200) return;
+                console.log(res);
+                this.disabled = true;
+            },
+
+             // 下架
+            getFullItfOfflineSupply(tsupplyanddemandid) {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.supplyanddemand.supplyanddemand',
+                    method: 'updatesupplyanddemandstatus'
+                })
+
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    tsupplyanddemandid,
+                    fstatus: "已解决"
+                };
+
+                return interfaceType;
+            },
+        }
     }
 </script>
 
 <style lang='scss' scoped>
-    ul {
-        margin-top: 3rem;
-        // display: flex;
-        // flex-wrap: wrap;
-        li {
-            display: inline-block;
+        .supply_others {
             position: relative;
             width: 71.9rem;
             height: 18.8rem;
-            margin-bottom: 3rem;
             padding: 2rem .9rem;
-            .supply_ul_li_title {
+            background-color: #F6F7F8;
+
+            .supply_others_title {
                 margin-left: -1rem;
             }
-            .supply_ul_li_detail {
+            .supply_others_detail {
                 margin-top: 1rem;
 
                 display: flex;
                 justify-content: space-between;
-                .supply_ul_li_detail_imgs {
+                .supply_others_detail_imgs {
                     display: flex;
                     img {
                         height: 7.2rem;
@@ -59,9 +131,18 @@
                         border-radius: .5rem;
                     }
                 }
-                .supply_ul_li_detail_left {
+                .supply_others_left {
                     display: flex;
                     flex-direction: column;
+                    .supply_others_left_des {
+                        position: relative;
+                        width: 30.4rem;
+                        height: 4.4rem;
+                        display: -webkit-box;
+                        -webkit-box-orient: vertical;
+                        -webkit-line-clamp: 2;
+                        overflow: hidden;
+                    }
                     .supply_ul_li_detail_left_time {
                         margin-top: .8rem;
                     }
@@ -71,21 +152,46 @@
                 width: 98%;
                 top: 75%;
             }
-            .supply_ul_li_count {
+            .supply_others_count {
                 margin-top: 2.4rem;
+                .wantTaking {
+                    color: rgba(0, 0, 0, .4)
+                }
             }
-            .contact1 {
-                padding: 0;
-                margin: 0;
-                width: 8.2rem;
-                height: 3.2rem;
-                top: 80%;
-                right: 2rem;
-                font-size: 1.6rem;
+            .takingList {
+                position: absolute;
+                bottom: -18rem;
+                left: 0;
+                width: 719px;
+                height: 188px;
+                padding: 2rem 2.5rem;
+                font-size: 1.4rem;
+                background: #FFFFFF;
+                box-shadow: 0px 10px 15px 0px rgba(0, 0, 0, 0.15), 0px 4px 7px 0px rgba(0, 0, 0, 0.3);
+                border-radius: 15px;
+                z-index: 1000;
+                li {
+                    margin-bottom: 1rem;
+                }
             }
         }
-        li:nth-child(2n-1) {
-            margin-right: 3rem;
+        .contact1, .contact2, .contact3 {
+            padding: 0;
+            margin: 0;
+            width: 8.2rem;
+            height: 3.2rem;
+            top: 78%;
+            right: 2rem;
+            font-size: 1.6rem;
         }
-    }
+        .contact2, .contact3 {
+            width: 5.6rem;
+        }
+        .contact2 {
+            right: 11.2rem;
+        }
+        .contact3 {
+            right: 17.8rem;
+        }
+
 </style>

+ 16 - 2
Desktop/buwanjia/src/components/HomePage/Supply/SupplySquare.vue

@@ -3,11 +3,13 @@
         <AccountCenterTop/>
         <div class="supplySquare_main1">
             <divTitle h_title="供应广场"/>
-            <el-menu router mode="horizontal">
+            <el-menu router mode="horizontal" :default-active="activePath">
                 <el-menu-item 
                     :index="'/' + item.authname"
                     v-for="item in menulist"
                     :key="item.id"
+                    @click="saveNavState(item.authname)"
+
                     >{{item.title}}</el-menu-item>
             </el-menu>
             <!-- 占位符 -->
@@ -29,6 +31,9 @@
             AccountCenterTop,
             SystemLoginCopyBottom
         },
+        created() {
+            this.activePath = window.sessionStorage.getItem('activePath')
+        },
         data() {
             return {
                 // 列表展示
@@ -37,10 +42,16 @@
                     {id: 2, authname: 'userhomepage/supplyconnecting', title: "正在对接"}, 
                     {id: 3, authname: 'userhomepage/supplydemand', title: "我的需求"}, 
                 ],
+                // 被激活的链接地址
+                activePath: '',
             }
         },
         methods: {
-
+            // 保存链接的激活状态
+            saveNavState(activePath) {
+                window.sessionStorage.setItem('activePath', activePath)
+                this.activePath = activePath;
+            }
         }
     }
 </script>
@@ -68,6 +79,9 @@
     }
     .supplySquare {
         position: relative;
+        width:192rem;
+        left: 50%;
+        transform: translate(-50%);
         height: 152rem;
     }
     .supplySquare_main1 {

+ 11 - 9
Desktop/buwanjia/src/components/HomePage/UserHomePage.vue

@@ -75,7 +75,17 @@
     }
 </script>
 <style lang="scss" scoped>
-    // 设置圆点导航样式
+    .userhome {
+        position: relative;
+        width: 156.8rem;
+
+        left: 50%;
+        transform: translate(-50%);
+        .userhome_main {
+            width: 100%;
+            margin: 0;
+            padding: 0;
+                // 设置圆点导航样式
     /deep/ .el-carousel__indicator--horizontal {
         padding: 0;
         width: 4rem;
@@ -96,14 +106,6 @@
     /deep/ .el-carousel__arrow {
         display: none;
     }
-    .userhome {
-        position: relative;
-        width: 100%;
-        .userhome_main {
-            width: 156.8rem;
-            margin: 0;
-            padding: 0;
-            margin-left: 17.6rem;
         }
         .el-header {
             width: 100%;

+ 99 - 48
Desktop/buwanjia/src/components/SystemLogin/AgentLogin.vue

@@ -27,16 +27,8 @@
                 </el-form-item>
 <!--                品牌logo-->
                 <el-form-item label="品牌LOGO" required class="brandBrand">
-                    <el-upload
-                            class="avatar-uploader"
-                            action="https://jsonplaceholder.typicode.com/posts/"
-                            :show-file-list="false"
-                            :on-success="handleAvatarSuccess"
-                            :before-upload="beforeAvatarUpload"
-                            >
-                        <img v-if="imageUrl" :src="imageUrl" class="avatar">
-                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-                    </el-upload>
+                    <label for="image_uploads">Choose images to upload (PNG, JPG)</label><br/>
+                    <input type="file" id="image_uploads" ref="clearFile" @change="uploadSuccess($event)" name="image_uploads" accept=".jpg, .jpeg, .png" multiple>
                 </el-form-item>
 <!--                经营类目-->
                 <el-form-item label="经营类目" prop="saleProdClass">
@@ -154,59 +146,118 @@
                 },
                 // 图片本地地址
                 imageUrl: '',
-                // 文件信息详情
-                fileList: {
-                    filename: '',
-                    filetype: ''
-                },
                 //   华为云文件名
                 obsfilename: '',
                 obsuploadurl: '',
                 // 弹出框
                 dialogVisible: false,
                 label: [],
+                list: "",
             }
         },
         methods: {
-            async handleAvatarSuccess(_, file) {
-                // 预览上传文件的url
-                this.imageUrl = URL.createObjectURL(file.raw);
-                // 预览上传文件的名字
-                this.fileList.filename = file.name;
-                // 预览上传文件的类型
-                this.fileList.filetype  = (file.raw.type.split('/'))[1];
-
-                // 调申请接口
-                const res = await this.$http.post("", this.getFullItfDocApply())
+            async uploadSuccess(event) {
+                // 初始化this
+                const that = this;
+                let reader = new FileReader();
+                reader.readAsDataURL(event.target.files[0]);
+                reader.addEventListener('load',function() {
+                    that.list = this.result;
+                })
+                // 解构store中当前选择身份的token和tagentsid
+                const {token, tagentsid} = that.$store.state.selectAccount
+                // 发送上传申请的接口
+                const res = await that.$http.post("", {
+                    accesstoken: token,
+                    classname: "system.system.docManage",
+                    method: "getFileName",
+                    content: {
+                        filename: event.target.files[0].name,
+                        filetype: event.target.files[0].type,
+                        ownertable: "tagents",
+                        ownerid: tagentsid,
+                        ftype: "brandlogo",
+                    }
+                })
                 if (res.status < 200 && res.status >= 300) return;
                 console.log(res);
-                //解构出data
                 const {data: {data}} = res;
+                let text = data.obsuploadurl.split(":443")[0];
+                text = text + ":443/demoErweima.jpg";
+                console.log(text);
+                // 上传华为云
+                const res1 = await that.$http.put(text, event.target.files[0])
+                if (res1.status < 200 && res1.status >= 300) return;
+                console.log(res1);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                // // 预览上传文件的url
+                // this.imageUrl = URL.createObjectURL(file.raw);
+                // // 预览上传文件的名字
+                // this.fileList.filename = file.name;
+                // // 预览上传文件的类型
+                // this.fileList.filetype  = (file.raw.type.split('/'))[1];
+
+                // // 调申请接口
+                // const res = await that.$http.post("", this.getFullItfDocApply())
+                // if (res.status < 200 && res.status >= 300) return;
+                // console.log(res);
 
-                // 华为云文件名
-                this.obsfilename = data.obsfilename;
 
-                // 上传华为云
-                console.log(data.obsuploadurl)
-                const res1 = await this.$http.put(`${data.obsuploadurl}`, file)
-                console.log(res1)
-            },
-            beforeAvatarUpload(file) {
-                // 上传文件格式限制
-                const isJPG = file.type === 'image/jpeg';
-                // 上传文件大小限制
-                const isLt10M = file.size / 1024 / 1024 < 10;
-
-                //  格式超出限制提示
-                if (!isJPG) {
-                    this.$message.error('上传头像图片只能是 JPG 格式!');
-                }
-                //  大小超出限制提示
-                if (!isLt10M) {
-                    this.$message.error('上传头像图片大小不能超过 10MB!');
-                }
-                return isJPG && isLt10M;
             },
+            // async handleAvatarSuccess(_, file) {
+            //     // 预览上传文件的url
+            //     this.imageUrl = URL.createObjectURL(file.raw);
+            //     // 预览上传文件的名字
+            //     this.fileList.filename = file.name;
+            //     // 预览上传文件的类型
+            //     this.fileList.filetype  = (file.raw.type.split('/'))[1];
+
+            //     // 调申请接口
+            //     const res = await this.$http.post("", this.getFullItfDocApply())
+            //     if (res.status < 200 && res.status >= 300) return;
+            //     console.log(res);
+            //     //解构出data
+            //     const {data: {data}} = res;
+
+            //     // 华为云文件名
+            //     this.obsfilename = data.obsfilename;
+            //     console.log(data.obsuploadurl);
+            //     // 上传华为云
+            //     const res1 = await this.$http.put(data.obsuploadurl, file.row)
+            //     console.log(res1)
+            // },
+            // beforeAvatarUpload(file) {
+            //     // 上传文件格式限制
+            //     const isJPG = file.type === 'image/jpeg';
+            //     // 上传文件大小限制
+            //     const isLt10M = file.size / 1024 / 1024 < 10;
+
+            //     //  格式超出限制提示
+            //     if (!isJPG) {
+            //         this.$message.error('上传头像图片只能是 JPG 格式!');
+            //     }
+            //     //  大小超出限制提示
+            //     if (!isLt10M) {
+            //         this.$message.error('上传头像图片大小不能超过 10MB!');
+            //     }
+            //     return isJPG && isLt10M;
+            // },
 
             async nextStepBtn() {
                 this.$refs.updateFormRef.validate( async valid => {

+ 114 - 0
Desktop/buwanjia/src/components/SystemLogin/OBS_upload.vue

@@ -0,0 +1,114 @@
+<template>
+  <div>
+    <el-upload
+      class="avatar-uploader"
+      ref="my-upload"
+      action="#"
+      :auto-upload="false"
+      :show-file-list="false"
+      :on-change="handleChange">
+      <img v-if="imageUrl" :src="imageUrl" class="avatar">
+      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+    </el-upload>
+  </div>
+</template>
+
+<script>
+import axios from 'axios';
+// import api from '../../../fetch/api'
+
+export default {
+  props:['ownertable','ownerid','type','image_Url'],
+  data () {
+    return {
+      requestCount:0,
+      uploadList:[],
+      obsfilenamelist:[],
+      upload_url:'',
+      imageUrl:null
+    }
+  },
+  watch:{
+    image_Url (val) {
+      this.imageUrl = this.image_Url
+    }
+  },
+  methods:{
+    uploadFile (file) { //上传到华为云
+      var that = this
+      this.show = true
+      var reopt = {
+        method : 'PUT',
+        url : this.upload_url,
+        timeout: 3600 * 1000,
+        withCredentials: false, 
+        headers :file.type === 'application/pdf'?{'Content-Type' : 'application/pdf'}: {'Content-Type' : 'application/octet-stream'},
+        validateStatus: function(status){
+          return status >= 200;
+        },
+        maxRedirects : 0,
+        responseType : 'text',
+        onUploadProgress: function (e) {
+          that.percent = (Number(e.loaded / e.total).toFixed(2)) * 100
+          that.$set(file, 'progress', that.percent);
+          that.uploadList.map((m,index)=>{
+            m.uid === file.uid?that.uploadList.splice(index, 1,file):""
+          })
+        },
+        data :file,
+      };
+      // 华为云上传
+      axios.request(reopt).then(()=>{
+        this.requestCount --
+        this.requestCount === 0?this.$http.post("",{
+          "classname": "system.system.docManage",
+          "method": "uploadSuccesses",
+          "content": {
+              "obsfilenames": this.obsfilenamelist,
+              "fisreturnallfile":0
+          }
+        }).then((res)=>{
+          // console.log(res);
+          this.imageUrl = res.data[res.data.length - 1].fobsurl
+          this.$emit('onSuccess',res)
+          this.$refs['my-upload'].clearFiles();
+        }):''
+
+      }).catch(err=>{
+        this.requestCount --
+        that.$set(file, 'status', 'failed');
+        that.uploadList.map((m,index)=>{
+          m.uid === file.uid?that.uploadList.splice(index, 1,file):""
+        })
+      }) 
+    },
+    handleChange (file,filelist) {
+      this.requestCount ++
+      this.uploadList = filelist
+      var index= file.raw.name.lastIndexOf(".");
+      //获取后缀
+      var ext = file.name.substr(index+1);
+      this.fileType = file.raw.name.substr(index+1)
+      this.$http.post("",{
+        "classname": "system.system.docManage",
+        "method": "getFileName",
+        "content":{
+          "filename": file.raw.name,
+          "filetype": ext,
+          "ownertable": "tagents",
+          "ownerid": this.$store.state.selectAccount.fagentsid,
+          "ftype": "headportart"
+        }
+      }).then((res)=>{
+        console.log("###########33", res);
+        this.upload_url = res.data.obsuploadurl // 上传地址
+        this.uploadFile(file.raw) // 调用华为云上传
+        this.obsfilenamelist.push(res.data.obsfilename)
+      })
+    }
+  }
+}
+
+</script>
+<style>
+</style>

+ 5 - 1
Desktop/buwanjia/src/plugins/element.js

@@ -28,7 +28,9 @@ import {
     Switch,
     Pagination,
     Dialog,
-    Header
+    Header,
+    Select,
+    Option
 } from 'element-ui'
 
 Vue.use(Button)
@@ -59,5 +61,7 @@ Vue.use(Switch)
 Vue.use(Pagination)
 Vue.use(Dialog)
 Vue.use(Header)
+Vue.use(Select)
+Vue.use(Option)
 
 Vue.prototype.$message = Message

+ 1 - 1
Desktop/buwanjia/src/progressCmp/UserHomepage/LastSupply.vue

@@ -56,7 +56,7 @@
             },
             // 跳转supply
             jumpSupply() {
-                this.$router.push("/userhomepage/supply");
+                this.$router.push("/userhomepage/supplyallinfo");
             }
         }
     }

+ 9 - 23
Desktop/buwanjia/src/router/index.js

@@ -20,13 +20,8 @@ import SupplySquare from "../components/HomePage/Supply/SupplySquare.vue"
 import SupplyAllInfo from "../components/HomePage/Supply/SupplyAllInfo.vue"
 import SupplyConnecting from "../components/HomePage/Supply/SupplyConnecting.vue"
 import SupplyDemand from "../components/HomePage/Supply/SupplyDemand.vue"
-import BusinessTraining from "../components/HomePage/Supply/SupplyAllInfo/BusinessTraining.vue"
-import FabricDesign from "../components/HomePage/Supply/SupplyAllInfo/FabricDesign.vue"
-import GraphicDesign from "../components/HomePage/Supply/SupplyAllInfo/GraphicDesign.vue"
-import FindFabric from "../components/HomePage/Supply/SupplyAllInfo/FindFabric.vue"
-import Photography from "../components/HomePage/Supply/SupplyAllInfo/Photography.vue"
-import ProductPlanning from "../components/HomePage/Supply/SupplyAllInfo/ProductPlanning.vue"
-import SearchingAchor from "../components/HomePage/Supply/SupplyAllInfo/SearchingAchor.vue"
+import PulishDemand from "../components/HomePage/Supply/PulishDemand.vue"
+import OBS_upload from "../components/SystemLogin/OBS_upload.vue"
 
 // 将VueRouter挂载到Vue当中去
 Vue.use(VueRouter)
@@ -41,6 +36,7 @@ const router = new VueRouter({
         { path: "/selectaccount", component: SelectAccount },
         { path: "/userlogin", component: UserLogin },
         { path: "/agentlogin", component: AgentLogin },
+        { path: "/obs_upload", component: OBS_upload},
         { path: "/userhomepage", component: UserHomePage },
         { path: "/userhomepage/supply", component: Supply },
         { 
@@ -48,25 +44,12 @@ const router = new VueRouter({
             component: SupplySquare,
             redirect: "/userhomepage/supplyallinfo",
             children: [
-                { 
-                    path: "/userhomepage/supplyallinfo", 
-                    component: SupplyAllInfo,
-                    redirect: "/userhomepage/supplyallinfo/businesstraining",
-                    children: [
-                        { path: "/userhomepage/supplyallinfo/findfabric", component: FindFabric },
-                        { path: "/userhomepage/supplyallinfo/fabricdesign", component: FabricDesign },
-                        { path: "/userhomepage/supplyallinfo/graphicdesign", component: GraphicDesign },
-                        { path: "/userhomepage/supplyallinfo/productplanning", component: ProductPlanning },
-                        { path: "/userhomepage/supplyallinfo/searchingachor", component: SearchingAchor },
-                        { path: "/userhomepage/supplyallinfo/photography", component: Photography },
-                        { path: "/userhomepage/supplyallinfo/businesstraining", component: BusinessTraining },
-
-                    ] 
-                },
+                { path: "/userhomepage/supplyallinfo", component: SupplyAllInfo },
                 { path: "/userhomepage/supplyconnecting", component: SupplyConnecting },
                 { path: "/userhomepage/supplydemand", component: SupplyDemand },
             ]
         },
+        { path: "/userhomepage/supplydemand/pulishdemand", component: PulishDemand},
         { 
             path: "/accountcenter", 
             component: AccountCenter, 
@@ -75,11 +58,14 @@ const router = new VueRouter({
                 { path: "/accountcenter/userinfo", component: UserInfo },
                 { path: '/accountcenter/agentmanagement', component: AgentManagement },
                 { path: '/accountcenter/productmanagement', component: ProductManagement },
+                { path: '/accountcenter/productmanagement/producteditor/:id', component: ProductEditor },
+
                 { path: '/accountcenter/partneragents', component: PartnerAgents },
                 { path: '/accountcenter/teammanagement', component: TeamManagement },
-                { path: "/accountcenter/teammanagement/membereditor", component: MemberEditor}
+                { path: "/accountcenter/teammanagement/membereditor/", component: MemberEditor}
             ]
         }
+
     ]
 })