农燊高科官方网站
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

557 lignes
19 KiB

  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:'',
  10. //焦点图数据
  11. focusList: [],
  12. //底部焦点图
  13. focusListNext:[],
  14. //新闻资讯数据
  15. newsInformationList: [],
  16. //政策法规数据
  17. policiesRegulationsList: [],
  18. //交易规则数据
  19. tradingRulesList: [],
  20. //资料下载数据
  21. dataDownloadList: [],
  22. //标的物所在地
  23. deptLocationList:[],
  24. //标的物类型
  25. deptTypeList:[],
  26. //网站配置信息
  27. webConfigInformationList:[],
  28. //底部友情链接
  29. friendsLinksList:[],
  30. //土地林地四荒地数据
  31. landListList:[],
  32. //集体资产数据
  33. collectiveAssetsList:[],
  34. //小型水利设施数据
  35. waterConservancyFacilitiesList:[],
  36. //农业生产设备数据
  37. productionEquipmentList:[],
  38. //挂牌项目总浏览次数
  39. allViewCountList:[],
  40. //成交公示数据
  41. announcementListList:[],
  42. //鉴证公告数据
  43. attestationList:[]
  44. },
  45. //柱状图参数
  46. option: {
  47. xAxis: {
  48. type: 'category',
  49. axisLine: {
  50. show: true,
  51. lineStyle: {
  52. width: 1,
  53. type: "solid"
  54. }
  55. },
  56. axisLabel: { //设置x轴的字
  57. show: true,
  58. interval: 0,//使x轴横坐标全部显示
  59. textStyle: {//x轴字体样式
  60. margin: 15
  61. }
  62. },
  63. data: []
  64. },
  65. yAxis: {
  66. type: 'value',
  67. min: 400,
  68. max: 1000,
  69. splitNumber: 7,
  70. splitLine: {
  71. lineStyle: {
  72. type: 'dashed'
  73. }
  74. },
  75. axisLine: {
  76. show: true,
  77. lineStyle: {
  78. width: 1,
  79. type: "solid"
  80. }
  81. },
  82. },
  83. series: [{
  84. data: [],//实际值减300
  85. type: 'bar',
  86. itemStyle: {
  87. color: '#007b76'
  88. }
  89. }],
  90. grid: {
  91. height: 200,
  92. width: 280,
  93. top: '-5px'
  94. },
  95. tooltip: {
  96. trigger: "axis",
  97. axisPointer: {
  98. // 坐标轴指示器,坐标轴触发有效
  99. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  100. },
  101. },
  102. }
  103. };
  104. var tools = new Tools();
  105. module.init = function (page) {
  106. //获取焦点图信息
  107. tools.doGet(websiteNew + '/1/0/4', {}, module.focusNews , true);
  108. //新闻资讯
  109. tools.doGet(websiteNew + '/2/0/6', {}, module.NewsInformation , true);
  110. //政策法规
  111. tools.doGet(websiteNew + '/3/0/6', {}, module.policiesRegulations , true);
  112. //交易规则
  113. tools.doGet(websiteNew + '/4/0/6', {}, module.tradingRules , true);
  114. //资料下载
  115. tools.doGet(websiteNew + '/5/0/6', {}, module.dataDownload, true);
  116. //标的物所在地
  117. tools.doGet(webDept, {deptId:''}, module.deptLocation , true);
  118. //标的物类型
  119. tools.doGet(webDeptType+"/project_type", {}, module.deptType, true);
  120. //标的物类型下拉菜单
  121. tools.doGet(webDeptType+"/project_type", {}, module.deptTypeSelect, true);
  122. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  123. tools.getWebConfig();
  124. //底部友情链接
  125. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true);
  126. //土地
  127. tools.doGet(webListing + '/1,2,3/0/3', {}, module.landList, true);
  128. //集体资产
  129. tools.doGet(webListing + '/4/0/3', {}, module.collectiveAssets, true);
  130. //农业生产设备
  131. tools.doGet(webListing + '/5/0/3', {}, module.productionEquipment, true);
  132. //小型水利设施
  133. tools.doGet(webListing + '/6/0/3', {}, module.waterConservancyFacilities, true);
  134. //查询挂牌项目浏览总次数
  135. tools.doGet(allViewCount + '/100', {}, module.allViewCount, true);
  136. //查询挂牌项目浏览总次数
  137. tools.doGet(announcementList + '/0/4', {}, module.announcementList, true);
  138. //查询挂牌项目浏览总次数
  139. tools.doGet(biddingHallList + '/0/10', {}, module.biddingHallList, true);
  140. //查询挂牌项目浏览总次数
  141. tools.doGet(attestationList + '/0/5', {}, module.attestationList, true);
  142. //个人供求
  143. tools.doGet(supplyDemand + '/100/1/5', {}, module.supplyDemand, true);
  144. tools.doGet(supplyDemand + '/100/2/5', {}, module.supplyDemand2, true);
  145. //互动交流
  146. tools.doGet(communicateList + '/100/5', {}, module.communicateList, true);
  147. //土地挂牌价格走势统计图
  148. tools.doGet(statistics, {deptId: 100}, module.statisticsContent, true);
  149. setTimeout(function(){
  150. module.supplyImages();
  151. },2000)
  152. //竞价大厅-滚动
  153. module.hallRolling();
  154. };
  155. //焦点图数据
  156. module.focusNews = function (data) {
  157. if (data.code == 200) {
  158. var content = data.data;
  159. var focusList = [];
  160. for (var i = 0; i < content.length; i++) {
  161. var imgStrs = content[i].content.match(/<img.*?>/g)
  162. var title = content[i].title;
  163. var id = content[i].id;
  164. if (imgStrs != null && imgStrs != '') {
  165. focusList.push({img:imgStrs[0],title:title,id:id})
  166. }
  167. }
  168. console.log(focusList)
  169. module.data.focusList = focusList;
  170. var bannerFocusData = template('bannerFocusData', module.data);
  171. $("#bannerFocusContent").html(bannerFocusData);
  172. new Swiper('#bannerFocusWrap', {
  173. pagination: '.page-pagination',
  174. paginationClickable: true
  175. })
  176. }
  177. }
  178. module.statisticsContent = function(data){
  179. console.log(module.option)
  180. console.log(data)
  181. module.data.nowPriceAvg = data.nowPriceAvg;
  182. module.data.priceRate = data.priceRate;
  183. var statisticsData = template('statisticsData', module.data);
  184. $("#statisticsContent").html(statisticsData);
  185. for (var i = 0 ; i < data.priceAvgList.length ; i++){
  186. module.option.xAxis.data[i] = data.priceAvgList[i].year
  187. module.option.series[0].data[i] = data.priceAvgList[i].price
  188. }
  189. // 柱状图绘制
  190. var chartDom = document.getElementById('chart');
  191. var myChart = echarts.init(chartDom);
  192. module.option && myChart.setOption(module.option);
  193. }
  194. //互动交流
  195. module.communicateList = function (data) {
  196. if (data.code == 200) {
  197. console.log(data.data)
  198. var content = data.data;
  199. module.data.communicateList = content;
  200. var communicateData = template('communicateData', module.data);
  201. $("#communicateContent").html(communicateData);
  202. }
  203. }
  204. //新闻资讯数据
  205. module.NewsInformation = function (data) {
  206. if (data.code == 200) {
  207. var content = data.data;
  208. console.log(content)
  209. module.data.newsInformationList = content;
  210. var NewsInformationData = template('NewsInformationData', module.data);
  211. $("#NewsInformationContent").html(NewsInformationData);
  212. }
  213. }
  214. //政策法规
  215. module.policiesRegulations = function (data) {
  216. if (data.code == 200) {
  217. var content = data.data;
  218. module.data.policiesRegulationsList = content;
  219. var policiesRegulationsData = template('policiesRegulationsData', module.data);
  220. $("#policiesRegulationsContent").html(policiesRegulationsData);
  221. }
  222. }
  223. //交易规则
  224. module.tradingRules = function (data) {
  225. if (data.code == 200) {
  226. var content = data.data;
  227. module.data.tradingRulesList = content;
  228. var tradingRulesData = template('tradingRulesData', module.data);
  229. $("#tradingRulesContent").html(tradingRulesData);
  230. }
  231. }
  232. //资料下载
  233. module.dataDownload = function (data) {
  234. if (data.code == 200) {
  235. var content = data.data;
  236. module.data.dataDownloadList = content;
  237. var dataDownloadData = template('dataDownloadData', module.data);
  238. $("#dataDownloadContent").html(dataDownloadData);
  239. }
  240. }
  241. //标的物所在地
  242. module.deptLocation = function (data) {
  243. console.log(data)
  244. if (data.code == 200) {
  245. var content = data.data ;
  246. var contentList = [];
  247. for (var i = 0 ; i < 5 ; i++){
  248. contentList[i] = content[i];
  249. }
  250. module.data.deptLocationList = contentList;
  251. var deptLocationData = template('deptLocationData', module.data);
  252. $("#deptLocationContent").html(deptLocationData);
  253. }
  254. }
  255. //标的物类型
  256. module.deptType = function (data) {
  257. if (data.code == 200) {
  258. var content = [] ;
  259. for (var i = 0 ; i < 4 ; i++){
  260. content[i] = data.data[i];
  261. }
  262. module.data.deptTypeList = content;
  263. var deptTypeData = template('deptTypeData', module.data);
  264. $("#deptTypeContent").html(deptTypeData);
  265. }
  266. }
  267. //网站配置信息
  268. module.webConfigInformation = function (data) {
  269. if (data.code == 200) {
  270. var content = data.data;
  271. $("#webConfigName").html(content[0].configValue);
  272. $("#webConfigRecord").html(content[1].configValue + content[2].configValue);
  273. $("#webConfigAddress").html(content[0].configValue+'&nbsp;'+content[3].configValue);
  274. }
  275. }
  276. //查询挂牌项目浏览总次数
  277. module.allViewCount = function (data) {
  278. if (data.code == 200) {
  279. var content = data.data;
  280. module.data.allViewCountList = content.toString().split("");
  281. var allViewCountData = template('allViewCountData', module.data);
  282. $("#allViewCount").html(allViewCountData);
  283. }
  284. }
  285. //底部友情链接
  286. module.bottomFriendsLinks = function (data) {
  287. if (data.code == 200) {
  288. var content = data.data;
  289. module.data.friendsLinksList = content;
  290. var friendsLinksData = template('friendsLinksData', module.data);
  291. $("#friendsLinksContent").html(friendsLinksData);
  292. }
  293. }
  294. //土地林地四荒地
  295. module.landList = function (data) {
  296. if (data.code == 200) {
  297. module.data.serverApi = serverApi;
  298. var content = data.data;
  299. module.data.landListList = content;
  300. var landListData = template('landListData', module.data);
  301. $("#landListContent").html(landListData);
  302. }
  303. }
  304. //集体资产
  305. module.collectiveAssets = function (data) {
  306. if (data.code == 200) {
  307. module.data.serverApi = serverApi;
  308. var content = data.data;
  309. module.data.collectiveAssetsList = content;
  310. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  311. $("#collectiveAssetsContent").html(collectiveAssetsData);
  312. }
  313. }
  314. //小型水利设施
  315. module.waterConservancyFacilities = function (data) {
  316. if (data.code == 200) {
  317. module.data.serverApi = serverApi;
  318. var content = data.data;
  319. module.data.waterConservancyFacilitiesList = content;
  320. var waterConservancyFacilitiesData = template('waterConservancyFacilitiesData', module.data);
  321. $("#waterConservancyFacilitiesContent").html(waterConservancyFacilitiesData);
  322. }
  323. }
  324. //农业生产设备
  325. module.productionEquipment = function (data) {
  326. if (data.code == 200) {
  327. module.data.serverApi = serverApi;
  328. var content = data.data;
  329. module.data.productionEquipmentList = content;
  330. var productionEquipmentData = template('productionEquipmentData', module.data);
  331. $("#productionEquipmentContent").html(productionEquipmentData);
  332. }
  333. }
  334. //成交公示列表
  335. module.announcementList = function (data) {
  336. if (data.code == 200) {
  337. var content = data.data;
  338. module.data.announcementListList = content;
  339. var announcementListData = template('announcementListData', module.data);
  340. $("#announcementListContent").html(announcementListData);
  341. }
  342. }
  343. //鉴证公告列表
  344. module.attestationList = function (data) {
  345. if (data.code == 200) {
  346. var content = data.data;
  347. module.data.attestationList = content;
  348. var attestationData = template('attestationData', module.data);
  349. $("#attestationContent").html(attestationData);
  350. }
  351. }
  352. //竞价大厅列表
  353. module.biddingHallList = function (data) {
  354. if (data.code == 200) {
  355. var content = data.data;
  356. console.log(content)
  357. module.data.biddingHallListList = content;
  358. var biddingHallListData = template('biddingHallListData', module.data);
  359. $("#biddingHallListContent").html(biddingHallListData);
  360. }
  361. }
  362. ///竞价大厅-滚动
  363. module.hallRolling = function () {
  364. var divScroll = document.getElementById('tableList');
  365. window.onmousewheel = divScroll.onmousewheel = function () { return false }
  366. module.timeInter(divScroll);
  367. divScroll.onmouseover = function () {
  368. clearInterval(time);
  369. }
  370. divScroll.onmouseout = function () {
  371. module.timeInter(divScroll);
  372. }
  373. }
  374. //个人供求
  375. module.supplyDemand = function (data) {
  376. if (data.code == 200) {
  377. console.log(data)
  378. var content = data.data;
  379. module.data.supplyDemandList = content;
  380. var supplyDemandData = template('supplyDemandData', module.data);
  381. $("#supply").html(supplyDemandData);
  382. }
  383. }
  384. //个人供求
  385. module.supplyDemand2 = function (data) {
  386. if (data.code == 200) {
  387. console.log(data)
  388. var content = data.data;
  389. module.data.supplyDemand2List = content;
  390. var supplyDemand2Data = template('supplyDemand2Data', module.data);
  391. $("#demand").html(supplyDemand2Data);
  392. }
  393. }
  394. module.supplyImages = function(){
  395. var focusListNext = module.data.focusListNext;
  396. for (var i = 0; i < module.data.supplyDemandList.length; i++) {
  397. var imgStrs = module.data.supplyDemandList[i].projectContent.match(/<img.*?>/g)
  398. var title = module.data.supplyDemandList[i].projectName
  399. if (imgStrs != null && imgStrs != '') {
  400. focusListNext.push({img:imgStrs[0],title:title})
  401. }
  402. }
  403. for (var i = 0; i < module.data.supplyDemand2List.length; i++) {
  404. var imgStrs = module.data.supplyDemand2List[i].projectContent.match(/<img.*?>/g)
  405. var title = module.data.supplyDemand2List[i].projectName
  406. if (imgStrs != null && imgStrs != '') {
  407. focusListNext.push({img:imgStrs[0],title:title})
  408. }
  409. }
  410. module.data.focusListNext = focusListNext;
  411. var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
  412. $("#bannerFocusNextContent").html(bannerFocusBottomData);
  413. new Swiper('#bannerFocusNextWrap', {
  414. pagination: '.page-pagination1',
  415. paginationClickable: true
  416. })
  417. }
  418. module.timeInter = function (divScroll) {
  419. time = setInterval(function () {
  420. var oldTop = divScroll.scrollTop;
  421. var newTop = oldTop + 1;
  422. divScroll.scrollTop = newTop;
  423. var counst = divScroll.scrollHeight - divScroll.scrollTop - divScroll.clientHeight;
  424. if (1 > counst) {
  425. divScroll.scrollTop = 0;
  426. }
  427. }, 30)
  428. }
  429. //证书查询
  430. goSearchKeyWord = function(){
  431. var type = $('input[name="transaction"]:checked').val();
  432. var searchKeyWord = $('#searchKeyWord').val();
  433. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord='+searchKeyWord)
  434. }
  435. //项目查询
  436. searchProject = function(){
  437. var projectNum = $('#projectNum').val();
  438. var projectName = $('#projectName').val();
  439. var deptTypeSelect = $("select[name='deptTypeSelect']").val();
  440. tools.skip('view/listingItems/itemsList.html?projectCode='+projectNum+'&projectName='+projectName+'&projectNumber='+deptTypeSelect)
  441. }
  442. //标的物类型
  443. module.deptTypeSelect = function (data) {
  444. if (data.code == 200) {
  445. console.log(data);
  446. var content = data.data ;
  447. module.data.deptTypeSelectList = content;
  448. var deptTypeSelectData = template('deptTypeSelectData', module.data);
  449. $("#deptTypeSelectContent").html(deptTypeSelectData);
  450. }
  451. }
  452. //切换
  453. tabCheck = function (type) {
  454. if(type == 'supply'){
  455. document.getElementById('demand').style.display = 'none';
  456. document.getElementById('demandBtn').className = '';
  457. }
  458. if(type == 'demand'){
  459. document.getElementById('supply').style.display = 'none';
  460. document.getElementById('supplyBtn').className = '';
  461. }
  462. document.getElementById(type).style.display = 'inline-table';
  463. document.getElementById(type+'Btn').className = 'active';
  464. }
  465. goDetail = function (id) {
  466. tools.skip('view/listingItems/itemsDetail.html?id='+id);
  467. }
  468. goListing = function () {
  469. tools.skip('view/listingItems/itemsList.html');
  470. }
  471. goAnnouncementList = function (type) {
  472. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord=');
  473. }
  474. goNewList = function () {
  475. tools.skip('view/new/newList.html');
  476. }
  477. goPolicy = function (type) {
  478. tools.skip('view/policy/policy.html?type='+type);
  479. }
  480. goBidding = function(){
  481. tools.skip('view/bidding/biddingList.html');
  482. }
  483. goDemand = function(){
  484. tools.skip('view/demand/demand.html');
  485. }
  486. goInteraction = function(){
  487. tools.skip('view/interact/interactList.html');
  488. }
  489. return module;
  490. });