农燊高科官方网站
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.js 14 KiB

4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, template, Tools, echarts, swiper) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //服务器地址
  9. serverApi:'http://192.168.31.107:8080',
  10. //焦点图数据
  11. focusList: [],
  12. //新闻资讯数据
  13. newsInformationList: [],
  14. //政策法规数据
  15. policiesRegulationsList: [],
  16. //交易规则数据
  17. tradingRulesList: [],
  18. //资料下载数据
  19. dataDownloadList: [],
  20. //标的物所在地
  21. deptLocationList:[],
  22. //标的物类型
  23. deptTypeList:[],
  24. //网站配置信息
  25. webConfigInformationList:[],
  26. //底部友情链接
  27. friendsLinksList:[],
  28. //土地林地四荒地数据
  29. landListList:[],
  30. //集体资产数据
  31. collectiveAssetsList:[],
  32. //小型水利设施数据
  33. waterConservancyFacilitiesList:[],
  34. //农业生产设备数据
  35. productionEquipmentList:[],
  36. //挂牌项目总浏览次数
  37. allViewCountList:[],
  38. //成交公示数据
  39. announcementListList:[]
  40. },
  41. //柱状图参数
  42. option: {
  43. xAxis: {
  44. type: 'category',
  45. axisLine: {
  46. show: true,
  47. lineStyle: {
  48. width: 1,
  49. type: "solid"
  50. }
  51. },
  52. axisLabel: { //设置x轴的字
  53. show: true,
  54. interval: 0,//使x轴横坐标全部显示
  55. textStyle: {//x轴字体样式
  56. margin: 15
  57. }
  58. },
  59. data: ['2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021']
  60. },
  61. yAxis: {
  62. type: 'value',
  63. min: 400,
  64. max: 1000,
  65. splitNumber: 7,
  66. splitLine: {
  67. lineStyle: {
  68. type: 'dashed'
  69. }
  70. },
  71. axisLine: {
  72. show: true,
  73. lineStyle: {
  74. width: 1,
  75. type: "solid"
  76. }
  77. },
  78. },
  79. series: [{
  80. data: [490, 520, 650, 600, 700, 640, 680, 600, 660],//实际值减300
  81. type: 'bar',
  82. itemStyle: {
  83. color: '#007b76'
  84. }
  85. }],
  86. grid: {
  87. height: 200,
  88. width: 280,
  89. top: '-5px'
  90. },
  91. }
  92. };
  93. var tools = new Tools();
  94. module.init = function (page) {
  95. //获取焦点图信息
  96. tools.doGet(websiteNew + '/1/0/4', {}, module.focusNews);
  97. //新闻资讯
  98. tools.doGet(websiteNew + '/2/0/6', {}, module.NewsInformation);
  99. //政策法规
  100. tools.doGet(websiteNew + '/3/0/6', {}, module.policiesRegulations);
  101. //交易规则
  102. tools.doGet(websiteNew + '/4/0/6', {}, module.tradingRules);
  103. //资料下载
  104. tools.doGet(websiteNew + '/5/0/6', {}, module.dataDownload);
  105. //标的物所在地
  106. tools.doGet(webDept + '/0', {}, module.deptLocation);
  107. //标的物类型
  108. tools.doGet(webDeptType+"/project_type", {}, module.deptType);
  109. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  110. tools.doGet(webConfig, {}, module.webConfigInformation);
  111. //底部友情链接
  112. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks);
  113. //土地
  114. tools.doGet(webListing + '/1,2,3/0/3', {}, module.landList);
  115. //集体资产
  116. tools.doGet(webListing + '/4/0/3', {}, module.collectiveAssets);
  117. //农业生产设备
  118. tools.doGet(webListing + '/5/0/3', {}, module.productionEquipment);
  119. //小型水利设施
  120. tools.doGet(webListing + '/6/0/3', {}, module.waterConservancyFacilities);
  121. //查询挂牌项目浏览总次数
  122. tools.doGet(allViewCount + '/100', {}, module.allViewCount);
  123. //查询挂牌项目浏览总次数
  124. tools.doGet(announcementList + '/0/4', {}, module.announcementList);
  125. //查询挂牌项目浏览总次数
  126. tools.doGet(biddingHallList + '/0/10', {}, module.biddingHallList);
  127. //竞价大厅-滚动
  128. module.hallRolling();
  129. //用户资料鼠标悬浮
  130. // module.userHover();
  131. // 柱状图绘制
  132. var chartDom = document.getElementById('chart');
  133. var myChart = echarts.init(chartDom);
  134. module.option && myChart.setOption(module.option);
  135. };
  136. //焦点图数据
  137. module.focusNews = function (data) {
  138. if (data.code == 200) {
  139. var content = data.data;
  140. var focusList = [];
  141. for (var i = 0; i < content.length; i++) {
  142. var imgStrs = content[i].content.match(/<img.*?>/g)
  143. var title = content[i].title
  144. if (imgStrs != null && imgStrs != '') {
  145. focusList.push({img:imgStrs[0],title:title})
  146. }
  147. }
  148. module.data.focusList = focusList;
  149. var bannerFocusData = template('bannerFocusData', module.data);
  150. $("#bannerFocusContent").html(bannerFocusData);
  151. new Swiper('#bannerFocusWrap', {
  152. pagination: '.page-pagination',
  153. paginationClickable: true
  154. })
  155. }
  156. }
  157. //新闻资讯数据
  158. module.NewsInformation = function (data) {
  159. if (data.code == 200) {
  160. var content = data.data;
  161. module.data.newsInformationList = content;
  162. var NewsInformationData = template('NewsInformationData', module.data);
  163. $("#NewsInformationContent").html(NewsInformationData);
  164. }
  165. }
  166. //政策法规
  167. module.policiesRegulations = function (data) {
  168. if (data.code == 200) {
  169. var content = data.data;
  170. module.data.policiesRegulationsList = content;
  171. var policiesRegulationsData = template('policiesRegulationsData', module.data);
  172. $("#policiesRegulationsContent").html(policiesRegulationsData);
  173. }
  174. }
  175. //交易规则
  176. module.tradingRules = function (data) {
  177. if (data.code == 200) {
  178. var content = data.data;
  179. module.data.tradingRulesList = content;
  180. var tradingRulesData = template('tradingRulesData', module.data);
  181. $("#tradingRulesContent").html(tradingRulesData);
  182. }
  183. }
  184. //资料下载
  185. module.dataDownload = function (data) {
  186. if (data.code == 200) {
  187. var content = data.data;
  188. module.data.dataDownloadList = content;
  189. var dataDownloadData = template('dataDownloadData', module.data);
  190. $("#dataDownloadContent").html(dataDownloadData);
  191. }
  192. }
  193. //标的物所在地
  194. module.deptLocation = function (data) {
  195. if (data.code == 200) {
  196. var content = [] ;
  197. for (var i = 0 ; i < 7 ; i++){
  198. content[i] = data.data[i];
  199. }
  200. module.data.deptLocationList = content;
  201. var deptLocationData = template('deptLocationData', module.data);
  202. $("#deptLocationContent").html(deptLocationData);
  203. }
  204. }
  205. //标的物类型
  206. module.deptType = function (data) {
  207. console.log(data)
  208. if (data.code == 200) {
  209. var content = [] ;
  210. console.log(data.data)
  211. for (var i = 0 ; i < 4 ; i++){
  212. content[i] = data.data[i];
  213. }
  214. module.data.deptTypeList = content;
  215. var deptTypeData = template('deptTypeData', module.data);
  216. $("#deptTypeContent").html(deptTypeData);
  217. }
  218. }
  219. //网站配置信息
  220. module.webConfigInformation = function (data) {
  221. if (data.code == 200) {
  222. var content = data.data;
  223. $("#webConfigName").html(content[0].configValue);
  224. $("#webConfigRecord").html(content[1].configValue + content[2].configValue);
  225. $("#webConfigAddress").html(content[0].configValue+'&nbsp;'+content[3].configValue);
  226. }
  227. }
  228. //查询挂牌项目浏览总次数
  229. module.allViewCount = function (data) {
  230. if (data.code == 200) {
  231. var content = data.data;
  232. console.log(content)
  233. module.data.allViewCountList = content.toString().split("");
  234. var allViewCountData = template('allViewCountData', module.data);
  235. $("#allViewCount").html(allViewCountData);
  236. }
  237. }
  238. //底部友情链接
  239. module.bottomFriendsLinks = function (data) {
  240. if (data.code == 200) {
  241. var content = data.data;
  242. module.data.friendsLinksList = content;
  243. var friendsLinksData = template('friendsLinksData', module.data);
  244. $("#friendsLinksContent").html(friendsLinksData);
  245. }
  246. }
  247. //土地林地四荒地
  248. module.landList = function (data) {
  249. if (data.code == 200) {
  250. var content = data.data;
  251. console.log(content)
  252. module.data.landListList = content;
  253. var landListData = template('landListData', module.data);
  254. $("#landListContent").html(landListData);
  255. }
  256. }
  257. //集体资产
  258. module.collectiveAssets = function (data) {
  259. if (data.code == 200) {
  260. var content = data.data;
  261. console.log(content)
  262. module.data.collectiveAssetsList = content;
  263. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  264. $("#collectiveAssetsContent").html(collectiveAssetsData);
  265. }
  266. }
  267. //小型水利设施
  268. module.waterConservancyFacilities = function (data) {
  269. if (data.code == 200) {
  270. var content = data.data;
  271. console.log(content)
  272. module.data.waterConservancyFacilitiesList = content;
  273. var waterConservancyFacilitiesData = template('waterConservancyFacilitiesData', module.data);
  274. $("#waterConservancyFacilitiesContent").html(waterConservancyFacilitiesData);
  275. }
  276. }
  277. //农业生产设备
  278. module.productionEquipment = function (data) {
  279. if (data.code == 200) {
  280. var content = data.data;
  281. console.log(content)
  282. module.data.productionEquipmentList = content;
  283. var productionEquipmentData = template('productionEquipmentData', module.data);
  284. $("#productionEquipmentContent").html(productionEquipmentData);
  285. }
  286. }
  287. //成交公示列表
  288. module.announcementList = function (data) {
  289. if (data.code == 200) {
  290. var content = data.data;
  291. console.log(content)
  292. module.data.announcementListList = content;
  293. var announcementListData = template('announcementListData', module.data);
  294. $("#announcementListContent").html(announcementListData);
  295. }
  296. }
  297. //竞价大厅列表
  298. module.biddingHallList = function (data) {
  299. if (data.code == 200) {
  300. var content = data.data;
  301. console.log(content)
  302. module.data.biddingHallListList = content;
  303. var biddingHallListData = template('biddingHallListData', module.data);
  304. $("#biddingHallListContent").html(biddingHallListData);
  305. }
  306. }
  307. ///竞价大厅-滚动
  308. module.hallRolling = function () {
  309. var divScroll = document.getElementById('tableList');
  310. window.onmousewheel = divScroll.onmousewheel = function () { return false }
  311. module.timeInter(divScroll);
  312. divScroll.onmouseover = function () {
  313. clearInterval(time);
  314. }
  315. divScroll.onmouseout = function () {
  316. module.timeInter(divScroll);
  317. }
  318. module.tabCheck('supply');
  319. }
  320. module.timeInter = function (divScroll) {
  321. time = setInterval(function () {
  322. var oldTop = divScroll.scrollTop;
  323. var newTop = oldTop + 1;
  324. divScroll.scrollTop = newTop;
  325. var counst = divScroll.scrollHeight - divScroll.scrollTop - divScroll.clientHeight;
  326. if (1 > counst) {
  327. divScroll.scrollTop = 0;
  328. }
  329. }, 30)
  330. }
  331. //切换
  332. module.tabCheck = function (type) {
  333. document.getElementById('supply').style.display = 'none';
  334. document.getElementById('demand').style.display = 'none';
  335. document.getElementById(type).style.display = 'inline-table';
  336. }
  337. //用户资料鼠标悬浮
  338. module.userHover = function () {
  339. document.getElementById('userName').onmouseover = function(){
  340. document.getElementById('headHover').style.display = 'block';
  341. };
  342. document.getElementById('headHover').onmouseover = function(){
  343. document.getElementById('headHover').style.display = 'block';
  344. };
  345. document.getElementById('userName').onmouseout = function(){
  346. document.getElementById('headHover').style.display = 'none';
  347. };
  348. document.getElementById('headHover').onmouseout = function(){
  349. document.getElementById('headHover').style.display = 'none';
  350. };
  351. }
  352. return module;
  353. });