|
|
@@ -15,10 +15,16 @@
|
|
|
<el-col :span="6">
|
|
|
<div class="loginDiv">
|
|
|
<div class="txDiv">
|
|
|
- <img src="@assets/qiyeruzhu.png" alt />
|
|
|
+ <img
|
|
|
+ v-if="loginAccount == ''"
|
|
|
+ src="@assets/touxiang01.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <img v-else src="@assets/touxiang02.png" alt="" />
|
|
|
</div>
|
|
|
- <div class="username">您还未登录哦!</div>
|
|
|
- <div class="btnDiv">
|
|
|
+ <div class="username" v-if="loginAccount == ''">您还未登录哦!</div>
|
|
|
+ <div class="username" v-else>{{ loginAccount }}</div>
|
|
|
+ <div class="btnDiv" v-if="loginAccount == ''">
|
|
|
<router-link to="/login">
|
|
|
<el-button class="leftBtn">登录</el-button>
|
|
|
</router-link>
|
|
|
@@ -34,8 +40,12 @@
|
|
|
>more<i class="el-icon-d-arrow-right"></i
|
|
|
></span>
|
|
|
</div>
|
|
|
- <div class="notice" v-for="item in 5" :key="item">
|
|
|
- 通知公告通知公告通知公告
|
|
|
+ <div
|
|
|
+ class="notice"
|
|
|
+ v-for="item in noticeListTzgg"
|
|
|
+ :key="item.noticeId"
|
|
|
+ >
|
|
|
+ {{ item.noticeTitle }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -134,9 +144,9 @@
|
|
|
>more<i class="el-icon-d-arrow-right"></i
|
|
|
></span>
|
|
|
</div>
|
|
|
- <div class="xq" v-for="item in 10" :key="item">
|
|
|
- <div class="con">【求购】通知公告通知公告通知公告</div>
|
|
|
- <div class="date">2020-01-01</div>
|
|
|
+ <div class="xq" v-for="item in demandList" :key="item.id">
|
|
|
+ <div class="con">【求购】{{ item.purchaseTitle }}</div>
|
|
|
+ <div class="date">{{ item.releaseTime }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -148,9 +158,9 @@
|
|
|
>more<i class="el-icon-d-arrow-right"></i
|
|
|
></span>
|
|
|
</div>
|
|
|
- <div class="xq" v-for="item in 10" :key="item">
|
|
|
- <div class="con">【供应】通知公告通知公告通知公告</div>
|
|
|
- <div class="date">2020-01-01</div>
|
|
|
+ <div class="xq" v-for="item in supplyList" :key="item.id">
|
|
|
+ <div class="con">【供应】{{ item.supplyTitle }}</div>
|
|
|
+ <div class="date">{{ item.releaseTime }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -168,22 +178,19 @@
|
|
|
<div class="topDiv">
|
|
|
<div class="leftDiv">
|
|
|
<div>
|
|
|
- <img src="@assets/shangpin.png" alt />
|
|
|
+ <img :src="hyzxFirst.fmzFileUrl" alt />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="rightDiv">
|
|
|
- <div class="title">文件柜快速找资料的小妙招</div>
|
|
|
- <div class="content">
|
|
|
- 第一界钢制家具企业交流会在上海举行第一界钢制家具企业交流会在上海举行
|
|
|
- </div>
|
|
|
- <div class="date">2010-01-18</div>
|
|
|
+ <div class="title">{{ hyzxFirst.noticeTitle }}</div>
|
|
|
+ <div class="content" v-html="hyzxFirst.noticeContent"></div>
|
|
|
+ <div class="date">{{ hyzxFirst.createTime }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<ul class="bottomUl">
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
+ <li v-for="item in hyzxOther" :key="item.noticeId">
|
|
|
+ {{ item.noticeTitle }}
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -197,22 +204,19 @@
|
|
|
<div class="topDiv">
|
|
|
<div class="leftDiv">
|
|
|
<div>
|
|
|
- <img src="@assets/shangpin.png" alt />
|
|
|
+ <img :src="hyzxFirst.fmzFileUrl" alt />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="rightDiv">
|
|
|
- <div class="title">文件柜快速找资料的小妙招</div>
|
|
|
- <div class="content">
|
|
|
- 第一界钢制家具企业交流会在上海举行第一界钢制家具企业交流会在上海举行
|
|
|
- </div>
|
|
|
- <div class="date">2010-01-18</div>
|
|
|
+ <div class="title">{{ jjbyFirst.noticeTitle }}</div>
|
|
|
+ <div class="content" v-html="jjbyFirst.noticeContent"></div>
|
|
|
+ <div class="date">{{ jjbyFirst.createTime }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<ul class="bottomUl">
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
- <li>关于新型电子存储柜的草图关于新型电子存储柜的草图</li>
|
|
|
+ <li v-for="item in hyzxOther" :key="item.noticeId">
|
|
|
+ {{ item.noticeTitle }}
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -231,27 +235,84 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
shangpin: [],
|
|
|
- activeIndex: "a",
|
|
|
- activeIndex2: "a"
|
|
|
+ demandList: [],
|
|
|
+ supplyList: [],
|
|
|
+ noticeListTzgg: [],
|
|
|
+ noticeListHyzx: [],
|
|
|
+ hyzxFirst: {},
|
|
|
+ hyzxOther: [],
|
|
|
+ noticeListJjby: [],
|
|
|
+ jjbyFirst: {},
|
|
|
+ jjbyOther: [],
|
|
|
+ loginAccount: ""
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- menuMouseOver(index) {
|
|
|
- console.log(index);
|
|
|
- this.activeIndex = index;
|
|
|
+ // 通知公告前5条 liuqiwen
|
|
|
+ noticeList(noticeType) {
|
|
|
+ var that = this;
|
|
|
+ that
|
|
|
+ .$post("/interface/notice/getNoticeListTop5", {
|
|
|
+ noticeType: noticeType
|
|
|
+ })
|
|
|
+ .then(function(res) {
|
|
|
+ console.log(res);
|
|
|
+ var target = `${process.env.VUE_APP_Target}`.replace(/\/$/, "");
|
|
|
+ if (res[0]) {
|
|
|
+ that.$message("数据请求错误!");
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < res[1].list.length; i++) {
|
|
|
+ res[1].list[i].fmzFileUrl = target + res[1].list[i].fmzFileUrl;
|
|
|
+ }
|
|
|
+ if (noticeType == 1) {
|
|
|
+ that.noticeListTzgg = res[1].list;
|
|
|
+ } else if (noticeType == 2) {
|
|
|
+ that.noticeListHyzx = res[1].list;
|
|
|
+ that.hyzxFirst = that.noticeListHyzx[0];
|
|
|
+ that.hyzxOther = that.noticeListHyzx.splice(1, 4);
|
|
|
+ } else {
|
|
|
+ that.noticeListJjby = res[1].list;
|
|
|
+ that.jjbyFirst = that.noticeListJjby[0];
|
|
|
+ that.jjbyOther = that.noticeListJjby.splice(1, 4);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- menuMouseLeave(index) {
|
|
|
- console.log(index);
|
|
|
- this.activeIndex = "a";
|
|
|
- },
|
|
|
- menuMouseOver2(index) {
|
|
|
- console.log(index);
|
|
|
- this.activeIndex = index;
|
|
|
+ // 需求信息前十条数据 liuqiwen
|
|
|
+ demandInfoTenList() {
|
|
|
+ var that = this;
|
|
|
+ that.$post("/demand/info/getDemandInfoTenList").then(function(res) {
|
|
|
+ console.log(res);
|
|
|
+ if (res[0]) {
|
|
|
+ that.$message("数据请求错误!");
|
|
|
+ } else {
|
|
|
+ that.demandList = res[1].demandList;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- menuMouseLeave2(index) {
|
|
|
- console.log(index);
|
|
|
- this.activeIndex = "a";
|
|
|
+ // 供应信息前10条 liuqiwen
|
|
|
+ supplyInfoTenLsit() {
|
|
|
+ var that = this;
|
|
|
+ that.$post("/supply/info/getSupplyInfoTenLsit").then(function(res) {
|
|
|
+ console.log(res);
|
|
|
+ if (res[0]) {
|
|
|
+ that.$message("数据请求错误!");
|
|
|
+ } else {
|
|
|
+ that.supplyList = res[1].supplyList;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ this.loginAccount = this.$store.state.user.UserInfo.loginAccount;
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ console.log(this.$store.state.user.UserInfo);
|
|
|
+ this.noticeList(1);
|
|
|
+ this.noticeList(2);
|
|
|
+ this.noticeList(3);
|
|
|
+ this.demandInfoTenList();
|
|
|
+ this.supplyInfoTenLsit();
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -496,7 +557,7 @@ export default {
|
|
|
line-height: 3.6rem;
|
|
|
overflow: hidden;
|
|
|
.con {
|
|
|
- width: 80%;
|
|
|
+ width: 65%;
|
|
|
float: left;
|
|
|
height: 100%;
|
|
|
font-size: 1.4rem;
|
|
|
@@ -506,7 +567,7 @@ export default {
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.date {
|
|
|
- width: 20%;
|
|
|
+ width: 35%;
|
|
|
float: left;
|
|
|
height: 100%;
|
|
|
font-size: 1.2rem;
|
|
|
@@ -556,7 +617,7 @@ export default {
|
|
|
}
|
|
|
.content {
|
|
|
height: 5rem;
|
|
|
- line-height: 2rem;
|
|
|
+ line-height: 2.5rem;
|
|
|
font-size: 1.2rem;
|
|
|
color: #666;
|
|
|
overflow: hidden;
|