网站
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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