网站
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

846 řádky
30 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. focusListTop: [],
  14. //底部焦点图
  15. focusListNext:[],
  16. //新闻资讯数据
  17. newsInformationList: [],
  18. //政策法规数据
  19. policiesRegulationsList: [],
  20. //交易规则数据
  21. tradingRulesList: [],
  22. //资料下载数据
  23. dataDownloadList: [],
  24. //标的物所在地
  25. deptLocationList:[],
  26. //标的物类型
  27. deptTypeList:[],
  28. //网站配置信息
  29. webConfigInformationList:[],
  30. //底部友情链接
  31. friendsLinksList:[],
  32. //土地林地四荒地数据
  33. landListList:[],
  34. //集体资产数据
  35. collectiveAssetsList:[],
  36. //小型水利设施数据
  37. waterConservancyFacilitiesList:[],
  38. //农业生产设备数据
  39. productionEquipmentList:[],
  40. //交易项目总浏览次数
  41. allViewCountList:[],
  42. //成交公示数据
  43. announcementListList:[],
  44. //鉴证公告数据
  45. attestationList:[],
  46. //供应列表
  47. supplyDemandList:[],
  48. //需求列表
  49. supplyDemand2List:[]
  50. },
  51. //柱状图参数
  52. option: {
  53. xAxis: {
  54. type: 'category',
  55. axisLine: {
  56. show: true,
  57. lineStyle: {
  58. width: 1,
  59. type: "solid"
  60. }
  61. },
  62. axisLabel: { //设置x轴的字
  63. show: true,
  64. interval: 0,//使x轴横坐标全部显示
  65. textStyle: {//x轴字体样式
  66. margin: 15
  67. }
  68. },
  69. data: []
  70. },
  71. yAxis: {
  72. type: 'value',
  73. min: 400,
  74. max: 1000,
  75. splitNumber: 7,
  76. splitLine: {
  77. lineStyle: {
  78. type: 'dashed'
  79. }
  80. },
  81. axisLine: {
  82. show: true,
  83. lineStyle: {
  84. width: 1,
  85. type: "solid"
  86. }
  87. },
  88. },
  89. series: [{
  90. data: [],//实际值减300
  91. type: 'bar',
  92. itemStyle: {
  93. color: '#007b76'
  94. }
  95. }],
  96. grid: {
  97. height: 200,
  98. width: 230,
  99. top: '-5px'
  100. },
  101. tooltip: {
  102. trigger: "axis",
  103. axisPointer: {
  104. // 坐标轴指示器,坐标轴触发有效
  105. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  106. },
  107. },
  108. }
  109. };
  110. var tools = new Tools();
  111. module.init = function (page) {
  112. //获取焦点图信息
  113. tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true);
  114. //获取焦点图信息
  115. tools.doGet(websitePicture, {picType:2,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsPC , true);
  116. //获取焦点图信息
  117. //tools.doGet(websiteNew + '/1/0/4', {}, module.focusNews , true);
  118. //新闻资讯
  119. //tools.doGet(websiteNew + '/2/0/6', {}, module.NewsInformation , true);
  120. //政策法规
  121. //tools.doGet(websiteNew + '/3/0/6', {}, module.policiesRegulations , true);
  122. //交易规则
  123. //tools.doGet(websiteNew + '/4/0/6', {}, module.tradingRules , true);
  124. //资料下载
  125. //tools.doGet(websiteNew + '/5/0/6', {}, module.dataDownload, true);
  126. //标的物所在地
  127. // tools.doGet(webDept, {deptId:''}, module.deptLocation , true);
  128. //标的物类型
  129. //tools.doGet(webDeptType+"/project_type", {}, module.deptType, true);
  130. //标的物类型下拉菜单
  131. // tools.doGet(webDeptType+"/project_type", {}, module.deptTypeSelect, true);
  132. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  133. tools.getWebConfig();
  134. //底部友情链接
  135. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true);
  136. //供应项目
  137. tools.doGet(itemsList, {projectNumber:'',pageSize:'4',pageNum:'1'}, module.itemList, true);
  138. //需求项目
  139. tools.doGet(needProjectList, {projectNumber:'',pageSize:'4',pageNum:'1'}, module.itemLists, true);
  140. //农业生产设备
  141. // tools.doGet(webListing + '/9/0/5', {}, module.productionEquipment, true);
  142. //小型水利设施
  143. // tools.doGet(webListing + '/8/0/5', {}, module.waterConservancyFacilities, true);
  144. //查询交易项目浏览总次数
  145. // tools.doGet(allViewCount + '/100', {}, module.allViewCount, true);
  146. //查询交易项目浏览总次数
  147. tools.doGet(announcementList + '/0/4', {}, module.announcementList, true);
  148. //查询交易项目浏览总次数
  149. tools.doGet(biddingHallList + '/0/100', {}, module.biddingHallList, true);
  150. //查询交易项目浏览总次数
  151. tools.doGet(attestationList + '/0/5', {}, module.attestationList, true);
  152. //个人供求
  153. //tools.doGet(supplyDemand + '/100/1/5', {}, module.supplyDemand, true);
  154. //tools.doGet(supplyDemand + '/100/2/5', {}, module.supplyDemand2, true);
  155. //互动交流
  156. //tools.doGet(communicateList + '/100/5/notnull', {}, module.communicateList, true);
  157. //土地挂牌价格走势统计图
  158. // tools.doGet(statistics, {deptId: 100}, module.statisticsContent, true);
  159. //竞价大厅-滚动
  160. module.hallRolling();
  161. setTimeout(function(){
  162. //主题图片切换
  163. module.switchTheme();
  164. },500)
  165. };
  166. //主题图片切换
  167. module.switchTheme = function(){
  168. if(themeColor == 'red'){
  169. document.getElementById('centerBanner').src = './static/images/centerBanner_red.jpg'
  170. document.getElementById('bannerBottom').src = './static/images/bannerBottom_red.jpg'
  171. }else if(themeColor == 'green'){
  172. document.getElementById('centerBanner').src = './static/images/centerBanner.jpg'
  173. document.getElementById('bannerBottom').src = './static/images/bannerBottom.jpg'
  174. }
  175. }
  176. //焦点图数据
  177. module.focusNewsTop = function (data) {
  178. if (data.code == 200) {
  179. let focusArray = [];
  180. if(data.data.length<1){
  181. focusArray.push({
  182. img:'../static/images/banner1.png'
  183. },{
  184. img:'../static/images/banner2.png'
  185. },{
  186. img:'../static/images/banner3.png'
  187. })
  188. }else{
  189. data.data.forEach(res=>{
  190. focusArray.push({
  191. img:'/api'+res.picUrl
  192. })
  193. })
  194. }
  195. module.data.focusList = focusArray;
  196. var bannerFocusData = template('bannerFocusData', module.data);
  197. $("#bannerFocusContent").html(bannerFocusData);
  198. new Swiper('#bannerFocusWrap', {
  199. pagination: '.page-pagination',
  200. paginationClickable: true,
  201. autoplay : 2000,
  202. loop:true
  203. })
  204. }
  205. }
  206. //焦点图数据
  207. module.focusNewsPC = function (data) {
  208. if (data.code == 200) {
  209. module.data.focusListPC = data.data;
  210. var bannerFocusDataPC = template('bannerFocusDataPC', module.data);
  211. $("#bannerFocusPCContent").html(bannerFocusDataPC);
  212. }
  213. }
  214. //焦点图数据
  215. module.focusNews = function (data) {
  216. if (data.code == 200) {
  217. var content = data.data;
  218. var focusList = [];
  219. for (var i = 0; i < content.length; i++) {
  220. var imgStrs = content[i].content.match(/<img.*?>/g)
  221. var title = content[i].title;
  222. var id = content[i].id;
  223. if (imgStrs != null && imgStrs != '') {
  224. focusList.push({img:imgStrs[0],title:title,id:id})
  225. }
  226. }
  227. //console.log(focusList)
  228. module.data.focusList = focusList;
  229. var bannerFocusData = template('bannerFocusData', module.data);
  230. $("#bannerFocusContent").html(bannerFocusData);
  231. new Swiper('#bannerFocusWrap', {
  232. pagination: '.page-pagination',
  233. paginationClickable: true,
  234. autoplay : 2000,
  235. loop:true
  236. })
  237. }
  238. }
  239. module.statisticsContent = function(data){
  240. //console.log(module.option)
  241. //console.log(data)
  242. module.data.nowPriceAvg = data.nowPriceAvg;
  243. module.data.priceRate = data.priceRate;
  244. var statisticsData = template('statisticsData', module.data);
  245. $("#statisticsContent").html(statisticsData);
  246. for (var i = 0 ; i < data.priceAvgList.length ; i++){
  247. module.option.xAxis.data[i] = data.priceAvgList[i].year
  248. module.option.series[0].data[i] = data.priceAvgList[i].price
  249. }
  250. // 柱状图绘制
  251. var chartDom = document.getElementById('chart');
  252. var myChart = echarts.init(chartDom);
  253. module.option && myChart.setOption(module.option);
  254. }
  255. //互动交流
  256. module.communicateList = function (data) {
  257. if (data.code == 200) {
  258. //console.log(data.data)
  259. var content = data.data;
  260. module.data.communicateList = content;
  261. var communicateData = template('communicateData', module.data);
  262. $("#communicateContent").html(communicateData);
  263. }
  264. }
  265. //新闻资讯数据
  266. module.NewsInformation = function (data) {
  267. if (data.code == 200) {
  268. var content = data.data;
  269. //console.log(content)
  270. module.data.newsInformationList = content;
  271. var NewsInformationData = template('NewsInformationData', module.data);
  272. $("#NewsInformationContent").html(NewsInformationData);
  273. }
  274. }
  275. //政策法规
  276. module.policiesRegulations = function (data) {
  277. if (data.code == 200) {
  278. var content = data.data;
  279. module.data.policiesRegulationsList = content;
  280. var policiesRegulationsData = template('policiesRegulationsData', module.data);
  281. $("#policiesRegulationsContent").html(policiesRegulationsData);
  282. }
  283. }
  284. //交易规则
  285. module.tradingRules = function (data) {
  286. if (data.code == 200) {
  287. var content = data.data;
  288. module.data.tradingRulesList = content;
  289. var tradingRulesData = template('tradingRulesData', module.data);
  290. $("#tradingRulesContent").html(tradingRulesData);
  291. }
  292. }
  293. //资料下载
  294. module.dataDownload = function (data) {
  295. if (data.code == 200) {
  296. var content = data.data;
  297. module.data.dataDownloadList = content;
  298. var dataDownloadData = template('dataDownloadData', module.data);
  299. $("#dataDownloadContent").html(dataDownloadData);
  300. }
  301. }
  302. //标的物所在地
  303. module.deptLocation = function (data) {
  304. //console.log(data)
  305. if (data.code == 200) {
  306. var content = data.data ;
  307. var contentList = [];
  308. for (var i = 0 ; i < 5&&i<content.length ; i++){
  309. contentList[i] = content[i];
  310. }
  311. module.data.deptLocationList = contentList;
  312. var deptLocationData = template('deptLocationData', module.data);
  313. $("#deptLocationContent").html(deptLocationData);
  314. }
  315. }
  316. //标的物类型
  317. module.deptType = function (data) {
  318. if (data.code == 200) {
  319. var content = data.data ;
  320. // for (var i = 0 ; i < 4 ; i++){
  321. // content[i] = data.data[i];
  322. // }
  323. module.data.deptTypeList = content;
  324. var deptTypeData = template('deptTypeData', module.data);
  325. $("#deptTypeContent").html(deptTypeData);
  326. module.data.deptTypeList1 = content;
  327. var deptTypeData1 = template('deptTypeData1', module.data);
  328. $("#deptTypeContent1").html(deptTypeData1);
  329. }
  330. }
  331. //网站配置信息
  332. module.webConfigInformation = function (data) {
  333. if (data.code == 200) {
  334. var content = data.data;
  335. //console.log(content)
  336. $("#webConfigName").html(content[0].configValue);
  337. $("#webConfigRecord").html(content[1].configValue + content[2].configValue);
  338. $("#webConfigAddress").html(content[0].configValue+'&nbsp;'+content[3].configValue);
  339. }
  340. }
  341. //查询交易项目浏览总次数
  342. module.allViewCount = function (data) {
  343. if (data.code == 200) {
  344. var content = data.data;
  345. module.data.allViewCountList = content.toString().split("");
  346. var allViewCountData = template('allViewCountData', module.data);
  347. $("#allViewCount").html(allViewCountData);
  348. }
  349. }
  350. //底部友情链接
  351. module.bottomFriendsLinks = function (data) {
  352. if (data.code == 200) {
  353. var content = data.data;
  354. //console.log(content)
  355. module.data.friendsLinksList = content;
  356. var friendsLinksData = template('friendsLinksData', module.data);
  357. $("#friendsLinksContent").html(friendsLinksData);
  358. }
  359. }
  360. //土地林地四荒地
  361. module.landList = function (data) {
  362. if (data.code == 200) {
  363. module.data.serverApi = serverApi;
  364. var content = data.data;
  365. for (let i = 0 ; i < 5 ; i++){
  366. if (content[i]==undefined){
  367. module.data.landListList.push({
  368. projectShowStatus:'',
  369. projectName :'',
  370. price :'',
  371. unit :'',
  372. outName :'',
  373. signupStopTime :'',
  374. biddingStopTime :'',
  375. locationName:'',
  376. });
  377. }else{
  378. module.data.landListList.push(content[i]);
  379. }
  380. }
  381. // module.data.landListList = content;
  382. var landListData = template('landListData', module.data);
  383. $("#landListContent").html(landListData);
  384. }
  385. }
  386. module.itemList = function (data) {
  387. if (data.code == 200) {
  388. //console.log(data)
  389. module.data.serverApi = serverApi;
  390. var content = data.rows;
  391. for (let i = 0 ; i < 4 ; i++){
  392. if (content[i]==undefined){
  393. module.data.landListList.push({
  394. projectShowStatus:'',
  395. projectName :'',
  396. price :'',
  397. unit :'',
  398. outName :'',
  399. signupStopTime :'',
  400. biddingStopTime :'',
  401. locationName:'',
  402. });
  403. }else{
  404. module.data.landListList.push(content[i]);
  405. }
  406. }
  407. // module.data.landListList = content;
  408. var landListData = template('landListData', module.data);
  409. $("#landListContent").html(landListData);
  410. }
  411. }
  412. module.itemLists = function (data) {
  413. if (data.code == 200) {
  414. //console.log(data)
  415. module.data.serverApi = serverApi;
  416. var content = data.rows;
  417. for (let i = 0 ; i < 4 ; i++){
  418. //console.log(content[i])
  419. if (content[i]==undefined){
  420. //console.log('aaaaaaaaaa')
  421. module.data.collectiveAssetsList.push({
  422. id :'',
  423. projectName :'',
  424. price :'',
  425. needname :'',
  426. needStartTime :'',
  427. needStopTime :'',
  428. phone:'',
  429. });
  430. }else{
  431. module.data.collectiveAssetsList.push(content[i]);
  432. }
  433. }
  434. // module.data.collectiveAssetsList = content;
  435. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  436. $("#collectiveAssetsContent").html(collectiveAssetsData);
  437. }
  438. }
  439. //土地林地四荒地
  440. goListingChange = function (id) {
  441. module.data.landListList = [];
  442. $('#deptTypeContent').children('span').removeClass('active') ;
  443. document.getElementById('tab'+id).className = 'm-r-20 active';
  444. if (id == 0){
  445. tools.doGet(itemsList, {projectNumber:'',pageSize:'5',pageNum:'1'}, module.itemList, true);
  446. }else{
  447. //土地
  448. tools.doGet(webListing + '/'+id+'/0/5', {}, module.landList, true);
  449. }
  450. }
  451. //土地林地四荒地
  452. goListingChanges = function (id) {
  453. module.data.collectiveAssetsList = [];
  454. $('#deptTypeContent1').children('span').removeClass('active');
  455. document.getElementById('tabs'+id).className = 'm-r-20 active';
  456. tools.doGet(needProjectList, {projectNumber:id==0?'':id,pageSize:'5',pageNum:'1'}, module.itemLists, true);
  457. }
  458. //集体资产
  459. module.collectiveAssets = function (data) {
  460. if (data.code == 200) {
  461. module.data.serverApi = serverApi;
  462. var content = data.data;
  463. module.data.collectiveAssetsList = content;
  464. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  465. $("#collectiveAssetsContent").html(collectiveAssetsData);
  466. }
  467. }
  468. //小型水利设施
  469. module.waterConservancyFacilities = function (data) {
  470. if (data.code == 200) {
  471. module.data.serverApi = serverApi;
  472. var content = data.data;
  473. module.data.waterConservancyFacilitiesList = content;
  474. var waterConservancyFacilitiesData = template('waterConservancyFacilitiesData', module.data);
  475. $("#waterConservancyFacilitiesContent").html(waterConservancyFacilitiesData);
  476. }
  477. }
  478. //农业生产设备
  479. module.productionEquipment = function (data) {
  480. if (data.code == 200) {
  481. module.data.serverApi = serverApi;
  482. var content = data.data;
  483. module.data.productionEquipmentList = content;
  484. var productionEquipmentData = template('productionEquipmentData', module.data);
  485. $("#productionEquipmentContent").html(productionEquipmentData);
  486. }
  487. }
  488. //成交公示列表
  489. module.announcementList = function (data) {
  490. if (data.code == 200) {
  491. var content = data.data;
  492. module.data.announcementListList = content;
  493. var announcementListData = template('announcementListData', module.data);
  494. $("#announcementListContent").html(announcementListData);
  495. }
  496. }
  497. //鉴证公告列表
  498. module.attestationList = function (data) {
  499. if (data.code == 200) {
  500. var content = data.data;
  501. module.data.attestationList = content;
  502. var attestationData = template('attestationData', module.data);
  503. $("#attestationContent").html(attestationData);
  504. }
  505. }
  506. //竞价大厅列表
  507. module.biddingHallList = function (data) {
  508. if (data.code == 200) {
  509. var content = data.data;
  510. //console.log(content)
  511. for(var i = 0 ; i < content.length ; i++){
  512. if(content[i].biddingStopTime == null || content[i].biddingStartTime == null){continue;}
  513. var endTimes=content[i].biddingStopTime.substring(0,10).split('-');
  514. var biddingStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+content[i].biddingStopTime.substring(10,19);
  515. var startTimes=content[i].biddingStartTime.substring(0,10).split('-');
  516. var biddingStartTime=startTimes[1]+'/'+startTimes[2]+'/'+startTimes[0]+' '+content[i].biddingStartTime.substring(10,19);
  517. var nowTime = Date.parse(new Date());
  518. var leftTime = Date.parse(biddingStopTime)-nowTime;
  519. var rightTime = Date.parse(biddingStartTime)-nowTime;
  520. //console.log(biddingStopTime)
  521. //console.log(leftTime)
  522. if(leftTime>0){
  523. //console.log('进行中')
  524. content[i].timeType = '进行中'
  525. }
  526. if(leftTime<0){
  527. //console.log('已结束')
  528. content[i].timeType = '已结束'
  529. }
  530. if(rightTime>0){
  531. //console.log('未开始')
  532. content[i].timeType = '未开始'
  533. }
  534. }
  535. module.data.biddingHallListList = content;
  536. //console.log(content)
  537. var biddingHallListData = template('biddingHallListData', module.data);
  538. $("#biddingHallListContent").html(biddingHallListData);
  539. }
  540. }
  541. ///竞价大厅-滚动
  542. module.hallRolling = function () {
  543. var divScroll = document.getElementById('tableList');
  544. window.onmousewheel = divScroll.onmousewheel = function () { return false }
  545. module.timeInter(divScroll);
  546. divScroll.onmouseover = function () {
  547. clearInterval(time);
  548. }
  549. divScroll.onmouseout = function () {
  550. module.timeInter(divScroll);
  551. }
  552. }
  553. //个人供求
  554. module.supplyDemand = function (data) {
  555. if (data.code == 200) {
  556. //console.log(data)
  557. var content = data.data;
  558. for (let i = 0 ; i < 5 ; i++){
  559. if (content[i]==undefined){
  560. module.data.supplyDemandList.push({
  561. id:'',
  562. projectName:'',
  563. logintime:'',
  564. phone:'',
  565. });
  566. }else{
  567. module.data.supplyDemandList.push(content[i]);
  568. }
  569. }
  570. // module.data.supplyDemandList = content;
  571. var supplyDemandData = template('supplyDemandData', module.data);
  572. $("#supply").html(supplyDemandData);
  573. }
  574. }
  575. //个人供求
  576. module.supplyDemand2 = function (data) {
  577. if (data.code == 200) {
  578. //console.log(data)
  579. var content = data.data;
  580. for (let i = 0 ; i < 5 ; i++){
  581. if (content[i]==undefined){
  582. module.data.supplyDemand2List.push({
  583. id:'',
  584. projectName:'',
  585. logintime:'',
  586. phone:'',
  587. });
  588. }else{
  589. module.data.supplyDemand2List.push(content[i]);
  590. }
  591. }
  592. // module.data.supplyDemand2List = content;
  593. var supplyDemand2Data = template('supplyDemand2Data', module.data);
  594. $("#demand").html(supplyDemand2Data);
  595. tools.doGet(supplyDemandRecommend + '/100/5', {}, module.supplyDemandRecommend, true);
  596. }
  597. }
  598. module.supplyDemandRecommend = function(data){
  599. var focusListNext = module.data.focusListNext;
  600. for (var i = 0; i < data.data.length; i++) {
  601. var imgStrs = data.data[i].fileUrl
  602. if (imgStrs != null && imgStrs != '') {
  603. focusListNext.push({img:serverApi+imgStrs,title:data.data[i].projectName,id:data.data[i].id})
  604. }
  605. }
  606. //console.log(data)
  607. module.data.focusListNext = focusListNext;
  608. var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
  609. $("#bannerFocusNextContent").html(bannerFocusBottomData);
  610. new Swiper('#bannerFocusNextWrap', {
  611. paginationClickable: true,
  612. pagination: '.a2',
  613. autoplay : 2000,
  614. loop:true
  615. })
  616. }
  617. module.supplyImages = function(){
  618. var focusListNext = module.data.focusListNext;
  619. //console.log(module.data.supplyDemandList)
  620. for (var i = 0; i < module.data.supplyDemandList.length; i++) {
  621. var imgStrs = module.data.supplyDemandList[i].projectContent.match(/<img.*?>/g)
  622. var title = module.data.supplyDemandList[i].projectName
  623. if (imgStrs != null && imgStrs != '') {
  624. focusListNext.push({img:imgStrs[0],title:title})
  625. }
  626. }
  627. for (var i = 0; i < module.data.supplyDemand2List.length; i++) {
  628. var imgStrs = module.data.supplyDemand2List[i].projectContent.match(/<img.*?>/g)
  629. var title = module.data.supplyDemand2List[i].projectName
  630. if (imgStrs != null && imgStrs != '') {
  631. focusListNext.push({img:imgStrs[0],title:title})
  632. }
  633. }
  634. module.data.focusListNext = focusListNext;
  635. var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
  636. $("#bannerFocusNextContent").html(bannerFocusBottomData);
  637. new Swiper('#bannerFocusNextWrap', {
  638. pagination: '.page-pagination1',
  639. paginationClickable: true
  640. })
  641. }
  642. module.timeInter = function (divScroll) {
  643. time = setInterval(function () {
  644. var oldTop = divScroll.scrollTop;
  645. var newTop = oldTop + 1;
  646. divScroll.scrollTop = newTop;
  647. var counst = divScroll.scrollHeight - divScroll.scrollTop - divScroll.clientHeight;
  648. //console.log(counst)
  649. if (2 > counst) {
  650. divScroll.scrollTop = 0;
  651. }
  652. }, 30)
  653. }
  654. //证书查询
  655. goSearchKeyWord = function(){
  656. var type = $('input[name="transaction"]:checked').val();
  657. var searchKeyWord = $('#searchKeyWord').val();
  658. //console.log($('#searchKeyWord').val())
  659. //console.log(type)
  660. if($('#searchKeyWord').val() == '' && type== 'warrant'){
  661. tools.initDialog('提示', '经营权证编号不可为空', function () {
  662. return;
  663. }, '确定')
  664. return;
  665. }
  666. if(type == 'warrant'){
  667. tools.skip('view/announcement/warrantDetail.html?type='+type+'&searchKeyWord='+searchKeyWord)
  668. }else{
  669. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord='+searchKeyWord)
  670. }
  671. }
  672. //项目查询
  673. searchProject = function(){
  674. var projectNum = $('#projectNum').val();
  675. var projectName = $('#projectName').val();
  676. var deptTypeSelect = $("select[name='deptTypeSelect']").val();
  677. tools.skip('view/listingItems/itemsList.html?projectCode='+projectNum+'&projectName='+projectName+'&projectNumber='+deptTypeSelect)
  678. }
  679. //标的物类型
  680. module.deptTypeSelect = function (data) {
  681. if (data.code == 200) {
  682. //console.log(data);
  683. var content = data.data ;
  684. module.data.deptTypeSelectList = content;
  685. var deptTypeSelectData = template('deptTypeSelectData', module.data);
  686. $("#deptTypeSelectContent").html(deptTypeSelectData);
  687. }
  688. }
  689. //切换
  690. tabCheck = function (type) {
  691. if(type == 'supply'){
  692. document.getElementById('demand').style.display = 'none';
  693. document.getElementById('demandBtn').className = '';
  694. }
  695. if(type == 'demand'){
  696. document.getElementById('supply').style.display = 'none';
  697. document.getElementById('supplyBtn').className = '';
  698. }
  699. document.getElementById(type).style.display = 'inline-table';
  700. document.getElementById(type+'Btn').className = 'active';
  701. }
  702. //切换
  703. tabClick = function (type) {
  704. document.getElementById('cjgg').style.display = 'none';
  705. document.getElementById('jzgg').style.display = 'none';
  706. document.getElementById('cjggBtn').className = '';
  707. document.getElementById('jzggBtn').className = '';
  708. document.getElementById(type).style.display = 'block';
  709. document.getElementById(type+'Btn').className = 'active';
  710. }
  711. //切换
  712. tabClickGYXQ = function (type) {
  713. document.getElementById('landListContent').style.display = 'none';
  714. document.getElementById('collectiveAssetsContent').style.display = 'none';
  715. document.getElementById('landListBtn').className = '';
  716. document.getElementById('collectiveAssetsBtn').className = '';
  717. document.getElementById(type+'Content').style.display = 'block';
  718. document.getElementById(type+'Btn').className = 'active';
  719. }
  720. goDetail = function (id) {
  721. if (!id)return;
  722. tools.skip('view/listingItems/itemsDetail.html?id='+id);
  723. }
  724. goUserInteract = function () {
  725. tools.skip('view/user/user.html?type=goInteract')
  726. }
  727. goListing = function (clickType,dictSort,dictCode) {
  728. tools.skip('view/listingItems/itemsList.html?clickType='+clickType+'&dictSort='+dictSort+'&dictCode='+dictCode);
  729. }
  730. goAnnouncementList = function (type) {
  731. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord=');
  732. }
  733. goNewList = function () {
  734. tools.skip('view/new/newList.html');
  735. }
  736. goPolicy = function (type) {
  737. tools.skip('view/policy/policy.html?type='+type);
  738. }
  739. goBidding = function(){
  740. tools.skip('view/bidding/biddingList.html');
  741. }
  742. goDemand = function(){
  743. tools.skip('view/demand/demand.html');
  744. }
  745. goInteraction = function(){
  746. tools.skip('view/interact/interactList.html');
  747. }
  748. goInteractSearch = function(){
  749. tools.skip('view/interact/interactList.html?keyWord='+$('#interactInput').val());
  750. }
  751. return module;
  752. });