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AAQnC,OAAOoC,aAAaC,QAAQ,eACxC,OAAIF,GACFD,EAAOI,QAAQC,YAAcJ,EACtBD,GAIFA,CACT,IAEA,Q","sources":["webpack://app/./src/views/home.vue?9077","webpack://app/./src/api/news.js","webpack://app/src/views/home.vue","webpack://app/./src/views/home.vue?b719","webpack://app/./src/views/home.vue","webpack://app/./src/api/digital.js","webpack://app/./src/assets/department/im/ sync ^\\.\\/.*\\.jpg$","webpack://app/./src/utils/request.js"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',[_c('div',{staticClass:\"menu_cn\"},[_vm._v(\"新闻动态\")]),_c('div',{staticClass:\"menu_en\"},[_vm._v(\"News feed\")]),_c('div',{staticClass:\"newsWrapper\"},[_c('div',{staticStyle:{\"width\":\"600px\"}},[_c('el-carousel',{attrs:{\"interval\":5000,\"arrow\":\"always\",\"height\":\"400px\"}},_vm._l((_vm.news),function(n,i){return _c('el-carousel-item',{key:i,attrs:{\"width\":\"100%\",\"height\":\"100%\"}},[_c('img',{attrs:{\"src\":n.picturePath,\"height\":\"100%\",\"width\":\"100%\"}})])}),1)],1),_c('div',{staticStyle:{\"max-height\":\"400px\",\"overflow\":\"hidden\"}},[_c('ul',_vm._l((_vm.news),function(item,index){return _c('li',{key:index,staticClass:\"lieBiao liPointer\",on:{\"click\":function($event){return _vm.goto(item.link)}}},[_c('div',{staticClass:\"time\"},[_vm._v(\" \"+_vm._s(item.generateDate != null ? item.generateDate.substring(0,10) : '')+\" \")]),_c('div',{staticClass:\"title\"},[_vm._v(\" \"+_vm._s(item.title)+\" \")])])}),0)])])]),_c('div',[_c('div',{staticClass:\"menu_cn\"},[_vm._v(\"数据精选\")]),_c('div',{staticClass:\"menu_en\"},[_vm._v(\"Data selection\")]),_c('div',{staticClass:\"datasetWrapper\"},_vm._l((_vm.datasets),function(n,i){return _c('div',{key:i,staticClass:\"imgWrapper\",attrs:{\"v-model\":_vm.datasets,\"span\":6},on:{\"click\":function($event){return _vm.goto('/dataset/'+n.id)}}},[_c('img',{staticClass:\"dataset_pic\",attrs:{\"src\":n.imgUrl}}),_c('span',{staticClass:\"dataset_name\"},[_vm._v(_vm._s(n.title))])])}),0)])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import request from \"../utils/request\";\r\nexport function getNewsList() {\r\n return request({\r\n url: `/news/allNews`,\r\n method: \"GET\"\r\n });\r\n}","<template>\r\n <div>\r\n <!-- 新闻-->\r\n <div>\r\n <div class=\"menu_cn\">新闻动态</div>\r\n <div class=\"menu_en\">News feed</div>\r\n <div class=\"newsWrapper\">\r\n <div style=\"width: 600px\">\r\n <el-carousel :interval=\"5000\" arrow=\"always\" height=\"400px\">\r\n <!-- <el-carousel-item v-for=\"(n,i) in news\" :key=\"i\">\r\n <a :href=\"n.link\"><img :src=\"require('@/assets/home/'+n.pic)\" height=\"100%\"/></a>\r\n </el-carousel-item> -->\r\n <!-- 需要动态绑定news 上面的方法无法动态更新并展示news-->\r\n <el-carousel-item v-for=\"(n,i) in news\" :key=\"i\" width=\"100%\" height=\"100%\">\r\n <img :src=n.picturePath height=\"100%\" width=\"100%\"/>\r\n </el-carousel-item>\r\n\r\n </el-carousel>\r\n </div>\r\n <!-- 通知公告新闻列表 -->\r\n <div style='max-height:400px;overflow:hidden;'>\r\n <ul>\r\n <li class='lieBiao liPointer' :key='index' v-for='(item, index) in news' @click=\"goto(item.link)\">\r\n <div class='time'>\r\n {{ item.generateDate != null ? item.generateDate.substring(0,10) : '' }}\r\n </div>\r\n <div class='title'>\r\n {{ item.title }}\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n <!-- <el-row type='flex' class='row-bg underline marb10' justify='space-between'>-->\r\n <!-- <h2 class='color_title'><b>数据精选</b></h2>-->\r\n <!--<!– <span class='liPointer'> 更多<i class='el-icon-d-arrow-right'></i> </span>–>-->\r\n <!-- </el-row>-->\r\n <div class=\"menu_cn\">数据精选</div>\r\n <div class=\"menu_en\">Data selection</div>\r\n <div class=\"datasetWrapper\">\r\n <div v-for=\"(n,i) in datasets\" :v-model=\"datasets\" :key=\"i\" :span=\"6\" class=\"imgWrapper\" @click=\"goto('/dataset/'+n.id)\">\r\n <img :src=\"n.imgUrl\" class=\"dataset_pic\"/>\r\n <span class=\"dataset_name\">{{ n.title }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { Carousel, CarouselItem } from 'element-ui'\r\n// import {datasetList} from \"@/assets/home/data\";\r\n// import {newsList} from \"@/assets/home/data\";\r\n\r\nimport { getNewsList } from \"@/api/news\";\r\nimport { getDigitalTop } from \"@/api/digital\"\r\nexport default {\r\n name: \"homePage\",\r\n components: {\r\n 'el-carousel': Carousel,\r\n 'el-carousel-item': CarouselItem\r\n },\r\n data() {\r\n return {\r\n datasets: [],\r\n news: []\r\n }\r\n },\r\n created() {\r\n this.init()\r\n },\r\n methods: {\r\n initDigitalTop() {\r\n getDigitalTop(4).then(res => {\r\n this.datasets = res.data;\r\n for (let i = 0; i < this.datasets.length; i++) {\r\n if (this.datasets[i].imgUrl == null) {\r\n // 随机1~3\r\n let random = Math.floor(Math.random() * 3) + 1;\r\n this.datasets[i].imgUrl = require('@/assets/department/im/' + random + '.jpg');\r\n }\r\n }\r\n })\r\n },\r\n initNewsList() {\r\n getNewsList().then(res => {\r\n this.news = res.data;\r\n })\r\n },\r\n init() {\r\n this.initDigitalTop();\r\n this.initNewsList();\r\n },\r\n\r\n goto(target) {\r\n window.open(target);\r\n }\r\n }\r\n\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.menu_cn,\r\n.menu_en{\r\n text-align: center;\r\n letter-spacing: 4px;\r\n}\r\n.menu_cn{\r\n font-size: 28px;\r\n}\r\n.menu_en{\r\n font-size: 40px;\r\n color: #e1e4e7;\r\n font-weight: lighter;\r\n}\r\n.imgWrapper{\r\n position: relative;\r\n}\r\n.dataset_pic {\r\n height: 8rem;\r\n width: 20vw;\r\n}\r\n.dataset_name {\r\n width: 20vw;\r\n position: absolute;\r\n background: rgb(123, 120, 125);\r\n color: white;\r\n bottom: 0;\r\n left: 0;\r\n text-align: center;\r\n}\r\n.lieBiao {\r\n width: 100%;\r\n height: 54px;\r\n background: rgb(241, 241, 241);\r\n display: flex;\r\n justify-content: space-between;\r\n overflow: hidden;\r\n margin-bottom: 10px;\r\n}\r\n\r\n.time {\r\n min-width: 100px;\r\n padding: 17px 0;\r\n display: flex;\r\n flex-direction: column;\r\n background-color: rgb(64, 157, 254);\r\n color: white;\r\n text-align: center;\r\n cursor: pointer;\r\n}\r\n\r\n.title {\r\n width: 500px;\r\n height: 50px;\r\n overflow: hidden;\r\n line-height: 50px;\r\n /*// background-color: rgb(179, 19, 19);*/\r\n padding: 0 0 0 10px;\r\n cursor: pointer;\r\n}\r\n\r\n.newsWrapper,\r\n.datasetWrapper {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 40px;\r\n margin: 25px;\r\n background-color: white;\r\n}\r\n</style>\r\n","import mod from \"-!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./home.vue?vue&type=template&id=3450bacf&scoped=true&\"\nimport script from \"./home.vue?vue&type=script&lang=js&\"\nexport * from \"./home.vue?vue&type=script&lang=js&\"\nimport style0 from \"./home.vue?vue&type=style&index=0&id=3450bacf&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3450bacf\",\n null\n \n)\n\nexport default component.exports","import request from \"../utils/request\";\r\nexport function getDigitalTop(num) {\r\n return request({\r\n url: `/digital/getTopByActive/` + num,\r\n method: \"GET\",\r\n });\r\n}\r\nexport function getDigitalByLabId(id) {\r\n return request({\r\n url: `/digital/allDigitalByLabId/` + id,\r\n method: \"GET\",\r\n });\r\n}\r\n\r\nexport function getDigitalById(id) {\r\n return request({\r\n url: `/digital/getDigitalById/` + id,\r\n method: \"GET\",\r\n });\r\n}\r\n\r\nexport function getDatasetByDigitalId(id) {\r\n return request({\r\n url: `/dataset/getById/` + id,\r\n method: \"GET\",\r\n });\r\n}\r\nexport function getFilesByDigitalId(id) {\r\n return request({\r\n url: `/file/getFilesByDigitalId/` + id,\r\n method: \"GET\",\r\n });\r\n}\r\n","var map = {\n\t\"./1.jpg\": 45038,\n\t\"./2.jpg\": 57350,\n\t\"./3.jpg\": 8505,\n\t\"./logo.jpg\": 7283\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 98007;","import axios from \"axios\";\r\n// import { Message } from \"element-ui\";\r\naxios.defaults.withCredentials = true;\r\n\r\n// create an axios instance\r\nconst service = axios.create({\r\n //API\r\n baseURL: \"/api\",\r\n withCredentinpmals: true, // send cookies when cross-domain requests\r\n timeout: 100000, // request timeout\r\n});\r\n\r\n// response interceptor\r\nservice.interceptors.response.use(\r\n /**1、头、request、返回值变化的策略、、todo\r\n * If you want to get http information such as headers or status\r\n * Please return response => response\r\n */\r\n\r\n /**\r\n * 可以通过自定义状态码进行全局的拦截控制,没有约定的话就不做处理\r\n */\r\n (response) => {\r\n const res = response.data;\r\n // console.log(res, \"res requestjs response\");\r\n // if (res.code !== undefined && res.code !== 200 &&res.code !==20000) {\r\n if (res.code === 0) {\r\n // Message({\r\n // message: res.message || \"Error\",\r\n // type: \"error\",\r\n // duration: 3 * 1000,\r\n // });\r\n return;\r\n }\r\n return res;\r\n },\r\n (error) => {\r\n console.log(\"err requestjs err\", error); // for debug\r\n if (error.response.data.length > 1000) {\r\n // Message({\r\n // message: \"服务器出错\",\r\n // type: \"error\",\r\n // duration: 3 * 1000\r\n // });\r\n } else {\r\n // Message({\r\n // message: error.response.data.message,\r\n // type: \"error\",\r\n // duration:3 * 1000\r\n // });\r\n }\r\n\r\n return Promise.reject(error);\r\n }\r\n);\r\n// request interceptor\r\n\r\nservice.interceptors.request.use(function (config) {\r\n let token = window.localStorage.getItem(\"accessToken\");\r\n if (token) {\r\n config.headers.accessToken = token;\r\n return config;\r\n //这里经常搭配token使用,将token值配置到tokenkey中,将tokenkey放在请求头中\r\n // config.headers['accessToken'] = Token;\r\n }\r\n return config;\r\n});\r\n\r\nexport default service;\r\n"],"names":["render","_vm","this","_c","_self","staticClass","_v","staticStyle","attrs","_l","n","i","key","picturePath","item","index","on","$event","goto","link","_s","generateDate","substring","title","datasets","id","imgUrl","staticRenderFns","getNewsList","request","url","method","name","components","Carousel","CarouselItem","data","news","created","init","methods","initDigitalTop","then","res","length","random","Math","floor","initNewsList","target","window","open","component","getDigitalTop","num","getDigitalById","getDatasetByDigitalId","getFilesByDigitalId","map","webpackContext","req","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","service","baseURL","withCredentinpmals","timeout","interceptors","response","use","error","console","log","Promise","reject","config","token","localStorage","getItem","headers","accessToken"],"sourceRoot":""}
|