Commit 7faf34f8 by 林家欣

业务大厅右侧表格下载、政策法规联调

parent 410eef8f
......@@ -5,9 +5,11 @@
/* 公共接口 */
import home from "./module/home.js"
import business from "./module/business.js"
const api = {
home,
business,
}
export default api
\ No newline at end of file
import {
POST
} from "../fetch.js"
const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '/gs1';
// 右侧表格下载功能
const businessDownLoad = (params = {}) => {
return POST(`${Prefix}/office/doc/api/downLoad`, params)
}
// 右侧政策法规前四条数据
const businessGetTop4 = (params = {}) => {
return POST(`${Prefix}/office/policy/api/getTop4`, params)
}
export default {
businessDownLoad,
businessGetTop4,
}
......@@ -3,9 +3,9 @@
<cate :father="bgxzCate"></cate>
<div class="container">
<ul class="tmgg-ul">
<li v-for="(tmp, i) in 4" :key="i">
<li v-for="(tmp, i) in list" :key="i" @click="handelDownload(i)">
<span></span>
<span>新疆西域之嘉乳业责任有限责任注册公司</span>
<span>{{tmp.title}}</span>
</li>
</ul>
</div>
......@@ -24,8 +24,31 @@ export default {
name: "表格下载",
ico: require("../../../assets/image/business/icon_down.png"),
},
list: [],
};
},
created() {
// 右侧表格下载功能
this.businessDownLoad();
},
methods: {
// 右侧表格下载功能
async businessDownLoad() {
const businessDownLoadRes = await this.$api.business.businessDownLoad();
const { returnCode, data } = businessDownLoadRes;
if (returnCode === "0") {
data.forEach(el => {
el.docfile = `http://www.gs1cn.org/manage/down/${el.docfile}`;
});
this.list = data;
}
console.log(businessDownLoadRes, "右侧表格下载功能");
},
// 下载
handelDownload(i) {
window.open(this.list[i].docfile, '_blank');
}
},
};
</script>
<style lang="scss">
......@@ -39,6 +62,7 @@ export default {
display: flex;
align-items: center;
padding: 10px 0;
cursor: pointer;
span {
&:nth-child(1) {
width: 6px;
......
......@@ -3,8 +3,8 @@
<cate :father="zcfgCate"></cate>
<div class="container">
<ul class="zcfg-ul">
<li v-for="(tmp, i) in 4" :key="i">
<span>中华人民共和国标准化法</span>
<li v-for="(tmp, i) in list" :key="i">
<span>{{tmp.title}}</span>
</li>
</ul>
</div>
......@@ -23,8 +23,24 @@ export default {
name: "政策法规",
ico: require("../../../assets/image/business/icon_zhengce.png"),
},
list: [],
};
},
created() {
// 右侧政策法规前四条数据
this.businessGetTop4();
},
methods: {
// 右侧政策法规前四条数据
async businessGetTop4() {
const businessGetTop4Res = await this.$api.business.businessGetTop4();
const { returnCode, data } = businessGetTop4Res;
if (returnCode === "0") {
this.list = data;
}
console.log(businessGetTop4Res, "右侧政策法规前四条数据");
},
},
};
</script>
<style lang="scss">
......
......@@ -644,7 +644,7 @@ export default {
this.routeList,
originPath
);
console.log(currentRoute, "currentRoute");
// console.log(currentRoute, "currentRoute");
if (currentRoute.children && currentRoute.children.length > 0) {
newRouteList = currentRoute.children;
} else if (currentRoute.noneChild) {
......@@ -660,7 +660,7 @@ export default {
},
},
created() {
console.log(this.$route, "this.$route");
// console.log(this.$route, "this.$route");
},
methods: {
deepFindCurrentRoute(menuList, activePath) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment