Commit 7faf34f8 by 林家欣

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

parent 410eef8f
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
/* 公共接口 */ /* 公共接口 */
import home from "./module/home.js" import home from "./module/home.js"
import business from "./module/business.js"
const api = { const api = {
home, home,
business,
} }
export default api 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 @@ ...@@ -3,9 +3,9 @@
<cate :father="bgxzCate"></cate> <cate :father="bgxzCate"></cate>
<div class="container"> <div class="container">
<ul class="tmgg-ul"> <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>新疆西域之嘉乳业责任有限责任注册公司</span> <span>{{tmp.title}}</span>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -24,8 +24,31 @@ export default { ...@@ -24,8 +24,31 @@ export default {
name: "表格下载", name: "表格下载",
ico: require("../../../assets/image/business/icon_down.png"), 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> </script>
<style lang="scss"> <style lang="scss">
...@@ -39,6 +62,7 @@ export default { ...@@ -39,6 +62,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 10px 0; padding: 10px 0;
cursor: pointer;
span { span {
&:nth-child(1) { &:nth-child(1) {
width: 6px; width: 6px;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<cate :father="zcfgCate"></cate> <cate :father="zcfgCate"></cate>
<div class="container"> <div class="container">
<ul class="zcfg-ul"> <ul class="zcfg-ul">
<li v-for="(tmp, i) in 4" :key="i"> <li v-for="(tmp, i) in list" :key="i">
<span>中华人民共和国标准化法</span> <span>{{tmp.title}}</span>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -23,8 +23,24 @@ export default { ...@@ -23,8 +23,24 @@ export default {
name: "政策法规", name: "政策法规",
ico: require("../../../assets/image/business/icon_zhengce.png"), 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> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -644,7 +644,7 @@ export default { ...@@ -644,7 +644,7 @@ export default {
this.routeList, this.routeList,
originPath originPath
); );
console.log(currentRoute, "currentRoute"); // console.log(currentRoute, "currentRoute");
if (currentRoute.children && currentRoute.children.length > 0) { if (currentRoute.children && currentRoute.children.length > 0) {
newRouteList = currentRoute.children; newRouteList = currentRoute.children;
} else if (currentRoute.noneChild) { } else if (currentRoute.noneChild) {
...@@ -660,7 +660,7 @@ export default { ...@@ -660,7 +660,7 @@ export default {
}, },
}, },
created() { created() {
console.log(this.$route, "this.$route"); // console.log(this.$route, "this.$route");
}, },
methods: { methods: {
deepFindCurrentRoute(menuList, activePath) { 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