网站
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  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/banner320.jpg'
  183. })
  184. }else{
  185. data.data.forEach(res=>{
  186. focusArray.push({
  187. img:'/api'+res.picUrl
  188. })
  189. })
  190. }
  191. module.data.focusList = focusArray;
  192. var bannerFocusData = template('bannerFocusData', module.data);
  193. $("#bannerFocusContent").html(bannerFocusData);
  194. new Swiper('#bannerFocusWrap', {
  195. pagination: '.page-pagination',
  196. paginationClickable: true,
  197. autoplay : 5000,
  198. loop:true
  199. })
  200. }
  201. }
  202. //焦点图数据
  203. module.focusNewsPC = function (data) {
  204. if (data.code == 200) {
  205. module.data.focusListPC = data.data;
  206. var bannerFocusDataPC = template('bannerFocusDataPC', module.data);
  207. $("#bannerFocusPCContent").html(bannerFocusDataPC);
  208. }
  209. }
  210. //焦点图数据
  211. module.focusNews = function (data) {
  212. if (data.code == 200) {
  213. var content = data.data;
  214. var focusList = [];
  215. for (var i = 0; i < content.length; i++) {
  216. var imgStrs = content[i].content.match(/<img.*?>/g)
  217. var title = content[i].title;
  218. var id = content[i].id;
  219. if (imgStrs != null && imgStrs != '') {
  220. focusList.push({img:imgStrs[0],title:title,id:id})
  221. }
  222. }
  223. //console.log(focusList)
  224. module.data.focusList = focusList;
  225. var bannerFocusData = template('bannerFocusData', module.data);
  226. $("#bannerFocusContent").html(bannerFocusData);
  227. new Swiper('#bannerFocusWrap', {
  228. pagination: '.page-pagination',
  229. paginationClickable: true,
  230. autoplay : 2000,
  231. loop:true
  232. })
  233. }
  234. }
  235. module.statisticsContent = function(data){
  236. //console.log(module.option)
  237. //console.log(data)
  238. module.data.nowPriceAvg = data.nowPriceAvg;
  239. module.data.priceRate = data.priceRate;
  240. var statisticsData = template('statisticsData', module.data);
  241. $("#statisticsContent").html(statisticsData);
  242. for (var i = 0 ; i < data.priceAvgList.length ; i++){
  243. module.option.xAxis.data[i] = data.priceAvgList[i].year
  244. module.option.series[0].data[i] = data.priceAvgList[i].price
  245. }
  246. // 柱状图绘制
  247. var chartDom = document.getElementById('chart');
  248. var myChart = echarts.init(chartDom);
  249. module.option && myChart.setOption(module.option);
  250. }
  251. //互动交流
  252. module.communicateList = function (data) {
  253. if (data.code == 200) {
  254. //console.log(data.data)
  255. var content = data.data;
  256. module.data.communicateList = content;
  257. var communicateData = template('communicateData', module.data);
  258. $("#communicateContent").html(communicateData);
  259. }
  260. }
  261. //新闻资讯数据
  262. module.NewsInformation = function (data) {
  263. if (data.code == 200) {
  264. var content = data.data;
  265. //console.log(content)
  266. module.data.newsInformationList = content;
  267. var NewsInformationData = template('NewsInformationData', module.data);
  268. $("#NewsInformationContent").html(NewsInformationData);
  269. }
  270. }
  271. //政策法规
  272. module.policiesRegulations = function (data) {
  273. if (data.code == 200) {
  274. var content = data.data;
  275. module.data.policiesRegulationsList = content;
  276. var policiesRegulationsData = template('policiesRegulationsData', module.data);
  277. $("#policiesRegulationsContent").html(policiesRegulationsData);
  278. }
  279. }
  280. //交易规则
  281. module.tradingRules = function (data) {
  282. if (data.code == 200) {
  283. var content = data.data;
  284. module.data.tradingRulesList = content;
  285. var tradingRulesData = template('tradingRulesData', module.data);
  286. $("#tradingRulesContent").html(tradingRulesData);
  287. }
  288. }
  289. //资料下载
  290. module.dataDownload = function (data) {
  291. if (data.code == 200) {
  292. var content = data.data;
  293. module.data.dataDownloadList = content;
  294. var dataDownloadData = template('dataDownloadData', module.data);
  295. $("#dataDownloadContent").html(dataDownloadData);
  296. }
  297. }
  298. //标的物所在地
  299. module.deptLocation = function (data) {
  300. //console.log(data)
  301. if (data.code == 200) {
  302. var content = data.data ;
  303. var contentList = [];
  304. for (var i = 0 ; i < 5&&i<content.length ; i++){
  305. contentList[i] = content[i];
  306. }
  307. module.data.deptLocationList = contentList;
  308. var deptLocationData = template('deptLocationData', module.data);
  309. $("#deptLocationContent").html(deptLocationData);
  310. }
  311. }
  312. //标的物类型
  313. module.deptType = function (data) {
  314. if (data.code == 200) {
  315. var content = data.data ;
  316. // for (var i = 0 ; i < 4 ; i++){
  317. // content[i] = data.data[i];
  318. // }
  319. module.data.deptTypeList = content;
  320. var deptTypeData = template('deptTypeData', module.data);
  321. $("#deptTypeContent").html(deptTypeData);
  322. module.data.deptTypeList1 = content;
  323. var deptTypeData1 = template('deptTypeData1', module.data);
  324. $("#deptTypeContent1").html(deptTypeData1);
  325. }
  326. }
  327. //网站配置信息
  328. module.webConfigInformation = function (data) {
  329. if (data.code == 200) {
  330. var content = data.data;
  331. //console.log(content)
  332. $("#webConfigName").html(content[0].configValue);
  333. $("#webConfigRecord").html(content[1].configValue + content[2].configValue);
  334. $("#webConfigAddress").html(content[0].configValue+'&nbsp;'+content[3].configValue);
  335. }
  336. }
  337. //查询交易项目浏览总次数
  338. module.allViewCount = function (data) {
  339. if (data.code == 200) {
  340. var content = data.data;
  341. module.data.allViewCountList = content.toString().split("");
  342. var allViewCountData = template('allViewCountData', module.data);
  343. $("#allViewCount").html(allViewCountData);
  344. }
  345. }
  346. //底部友情链接
  347. module.bottomFriendsLinks = function (data) {
  348. if (data.code == 200) {
  349. var content = data.data;
  350. //console.log(content)
  351. module.data.friendsLinksList = content;
  352. var friendsLinksData = template('friendsLinksData', module.data);
  353. $("#friendsLinksContent").html(friendsLinksData);
  354. }
  355. }
  356. //土地林地四荒地
  357. module.landList = function (data) {
  358. if (data.code == 200) {
  359. module.data.serverApi = serverApi;
  360. var content = data.data;
  361. for (let i = 0 ; i < 5 ; i++){
  362. if (content[i]==undefined){
  363. module.data.landListList.push({
  364. projectShowStatus:'',
  365. projectName :'',
  366. price :'',
  367. unit :'',
  368. outName :'',
  369. signupStopTime :'',
  370. biddingStopTime :'',
  371. locationName:'',
  372. });
  373. }else{
  374. module.data.landListList.push(content[i]);
  375. }
  376. }
  377. // module.data.landListList = content;
  378. var landListData = template('landListData', module.data);
  379. $("#landListContent").html(landListData);
  380. }
  381. }
  382. module.itemList = function (data) {
  383. if (data.code == 200) {
  384. //console.log(data)
  385. module.data.serverApi = serverApi;
  386. var content = data.rows;
  387. for (let i = 0 ; i < 4 ; i++){
  388. if (content[i]==undefined){
  389. module.data.landListList.push({
  390. projectShowStatus:'',
  391. projectName :'',
  392. price :'',
  393. unit :'',
  394. outName :'',
  395. signupStopTime :'',
  396. biddingStopTime :'',
  397. locationName:'',
  398. });
  399. }else{
  400. module.data.landListList.push(content[i]);
  401. }
  402. }
  403. // module.data.landListList = content;
  404. var landListData = template('landListData', module.data);
  405. $("#landListContent").html(landListData);
  406. }
  407. }
  408. module.itemLists = function (data) {
  409. if (data.code == 200) {
  410. //console.log(data)
  411. module.data.serverApi = serverApi;
  412. var content = data.rows;
  413. for (let i = 0 ; i < 4 ; i++){
  414. //console.log(content[i])
  415. if (content[i]==undefined){
  416. //console.log('aaaaaaaaaa')
  417. module.data.collectiveAssetsList.push({
  418. id :'',
  419. projectName :'',
  420. price :'',
  421. needname :'',
  422. needStartTime :'',
  423. needStopTime :'',
  424. phone:'',
  425. });
  426. }else{
  427. module.data.collectiveAssetsList.push(content[i]);
  428. }
  429. }
  430. // module.data.collectiveAssetsList = content;
  431. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  432. $("#collectiveAssetsContent").html(collectiveAssetsData);
  433. }
  434. }
  435. //土地林地四荒地
  436. goListingChange = function (id) {
  437. module.data.landListList = [];
  438. $('#deptTypeContent').children('span').removeClass('active') ;
  439. document.getElementById('tab'+id).className = 'm-r-20 active';
  440. if (id == 0){
  441. tools.doGet(itemsList, {projectNumber:'',pageSize:'5',pageNum:'1'}, module.itemList, true);
  442. }else{
  443. //土地
  444. tools.doGet(webListing + '/'+id+'/0/5', {}, module.landList, true);
  445. }
  446. }
  447. //土地林地四荒地
  448. goListingChanges = function (id) {
  449. module.data.collectiveAssetsList = [];
  450. $('#deptTypeContent1').children('span').removeClass('active');
  451. document.getElementById('tabs'+id).className = 'm-r-20 active';
  452. tools.doGet(needProjectList, {projectNumber:id==0?'':id,pageSize:'5',pageNum:'1'}, module.itemLists, true);
  453. }
  454. //集体资产
  455. module.collectiveAssets = function (data) {
  456. if (data.code == 200) {
  457. module.data.serverApi = serverApi;
  458. var content = data.data;
  459. module.data.collectiveAssetsList = content;
  460. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  461. $("#collectiveAssetsContent").html(collectiveAssetsData);
  462. }
  463. }
  464. //小型水利设施
  465. module.waterConservancyFacilities = function (data) {
  466. if (data.code == 200) {
  467. module.data.serverApi = serverApi;
  468. var content = data.data;
  469. module.data.waterConservancyFacilitiesList = content;
  470. var waterConservancyFacilitiesData = template('waterConservancyFacilitiesData', module.data);
  471. $("#waterConservancyFacilitiesContent").html(waterConservancyFacilitiesData);
  472. }
  473. }
  474. //农业生产设备
  475. module.productionEquipment = function (data) {
  476. if (data.code == 200) {
  477. module.data.serverApi = serverApi;
  478. var content = data.data;
  479. module.data.productionEquipmentList = content;
  480. var productionEquipmentData = template('productionEquipmentData', module.data);
  481. $("#productionEquipmentContent").html(productionEquipmentData);
  482. }
  483. }
  484. //成交公示列表
  485. module.announcementList = function (data) {
  486. if (data.code == 200) {
  487. var content = data.data;
  488. module.data.announcementListList = content;
  489. var announcementListData = template('announcementListData', module.data);
  490. $("#announcementListContent").html(announcementListData);
  491. }
  492. }
  493. //鉴证公告列表
  494. module.attestationList = function (data) {
  495. if (data.code == 200) {
  496. var content = data.data;
  497. module.data.attestationList = content;
  498. var attestationData = template('attestationData', module.data);
  499. $("#attestationContent").html(attestationData);
  500. }
  501. }
  502. //竞价大厅列表
  503. module.biddingHallList = function (data) {
  504. if (data.code == 200) {
  505. var content = data.data;
  506. //console.log(content)
  507. for(var i = 0 ; i < content.length ; i++){
  508. if(content[i].biddingStopTime == null || content[i].biddingStartTime == null){continue;}
  509. var endTimes=content[i].biddingStopTime.substring(0,10).split('-');
  510. var biddingStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+content[i].biddingStopTime.substring(10,19);
  511. var startTimes=content[i].biddingStartTime.substring(0,10).split('-');
  512. var biddingStartTime=startTimes[1]+'/'+startTimes[2]+'/'+startTimes[0]+' '+content[i].biddingStartTime.substring(10,19);
  513. var nowTime = Date.parse(new Date());
  514. var leftTime = Date.parse(biddingStopTime)-nowTime;
  515. var rightTime = Date.parse(biddingStartTime)-nowTime;
  516. //console.log(biddingStopTime)
  517. //console.log(leftTime)
  518. if(leftTime>0){
  519. //console.log('进行中')
  520. content[i].timeType = '进行中'
  521. }
  522. if(leftTime<0){
  523. //console.log('已结束')
  524. content[i].timeType = '已结束'
  525. }
  526. if(rightTime>0){
  527. //console.log('未开始')
  528. content[i].timeType = '未开始'
  529. }
  530. }
  531. module.data.biddingHallListList = content;
  532. //console.log(content)
  533. var biddingHallListData = template('biddingHallListData', module.data);
  534. $("#biddingHallListContent").html(biddingHallListData);
  535. }
  536. }
  537. ///竞价大厅-滚动
  538. module.hallRolling = function () {
  539. var divScroll = document.getElementById('tableList');
  540. window.onmousewheel = divScroll.onmousewheel = function () { return false }
  541. module.timeInter(divScroll);
  542. divScroll.onmouseover = function () {
  543. clearInterval(time);
  544. }
  545. divScroll.onmouseout = function () {
  546. module.timeInter(divScroll);
  547. }
  548. }
  549. //个人供求
  550. module.supplyDemand = function (data) {
  551. if (data.code == 200) {
  552. //console.log(data)
  553. var content = data.data;
  554. for (let i = 0 ; i < 5 ; i++){
  555. if (content[i]==undefined){
  556. module.data.supplyDemandList.push({
  557. id:'',
  558. projectName:'',
  559. logintime:'',
  560. phone:'',
  561. });
  562. }else{
  563. module.data.supplyDemandList.push(content[i]);
  564. }
  565. }
  566. // module.data.supplyDemandList = content;
  567. var supplyDemandData = template('supplyDemandData', module.data);
  568. $("#supply").html(supplyDemandData);
  569. }
  570. }
  571. //个人供求
  572. module.supplyDemand2 = function (data) {
  573. if (data.code == 200) {
  574. //console.log(data)
  575. var content = data.data;
  576. for (let i = 0 ; i < 5 ; i++){
  577. if (content[i]==undefined){
  578. module.data.supplyDemand2List.push({
  579. id:'',
  580. projectName:'',
  581. logintime:'',
  582. phone:'',
  583. });
  584. }else{
  585. module.data.supplyDemand2List.push(content[i]);
  586. }
  587. }
  588. // module.data.supplyDemand2List = content;
  589. var supplyDemand2Data = template('supplyDemand2Data', module.data);
  590. $("#demand").html(supplyDemand2Data);
  591. tools.doGet(supplyDemandRecommend + '/100/5', {}, module.supplyDemandRecommend, true);
  592. }
  593. }
  594. module.supplyDemandRecommend = function(data){
  595. var focusListNext = module.data.focusListNext;
  596. for (var i = 0; i < data.data.length; i++) {
  597. var imgStrs = data.data[i].fileUrl
  598. if (imgStrs != null && imgStrs != '') {
  599. focusListNext.push({img:serverApi+imgStrs,title:data.data[i].projectName,id:data.data[i].id})
  600. }
  601. }
  602. //console.log(data)
  603. module.data.focusListNext = focusListNext;
  604. var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
  605. $("#bannerFocusNextContent").html(bannerFocusBottomData);
  606. new Swiper('#bannerFocusNextWrap', {
  607. paginationClickable: true,
  608. pagination: '.a2',
  609. autoplay : 2000,
  610. loop:true
  611. })
  612. }
  613. module.supplyImages = function(){
  614. var focusListNext = module.data.focusListNext;
  615. //console.log(module.data.supplyDemandList)
  616. for (var i = 0; i < module.data.supplyDemandList.length; i++) {
  617. var imgStrs = module.data.supplyDemandList[i].projectContent.match(/<img.*?>/g)
  618. var title = module.data.supplyDemandList[i].projectName
  619. if (imgStrs != null && imgStrs != '') {
  620. focusListNext.push({img:imgStrs[0],title:title})
  621. }
  622. }
  623. for (var i = 0; i < module.data.supplyDemand2List.length; i++) {
  624. var imgStrs = module.data.supplyDemand2List[i].projectContent.match(/<img.*?>/g)
  625. var title = module.data.supplyDemand2List[i].projectName
  626. if (imgStrs != null && imgStrs != '') {
  627. focusListNext.push({img:imgStrs[0],title:title})
  628. }
  629. }
  630. module.data.focusListNext = focusListNext;
  631. var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
  632. $("#bannerFocusNextContent").html(bannerFocusBottomData);
  633. new Swiper('#bannerFocusNextWrap', {
  634. pagination: '.page-pagination1',
  635. paginationClickable: true
  636. })
  637. }
  638. module.timeInter = function (divScroll) {
  639. time = setInterval(function () {
  640. var oldTop = divScroll.scrollTop;
  641. var newTop = oldTop + 1;
  642. divScroll.scrollTop = newTop;
  643. var counst = divScroll.scrollHeight - divScroll.scrollTop - divScroll.clientHeight;
  644. //console.log(counst)
  645. if (2 > counst) {
  646. divScroll.scrollTop = 0;
  647. }
  648. }, 30)
  649. }
  650. //证书查询
  651. goSearchKeyWord = function(){
  652. var type = $('input[name="transaction"]:checked').val();
  653. var searchKeyWord = $('#searchKeyWord').val();
  654. //console.log($('#searchKeyWord').val())
  655. //console.log(type)
  656. if($('#searchKeyWord').val() == '' && type== 'warrant'){
  657. tools.initDialog('提示', '经营权证编号不可为空', function () {
  658. return;
  659. }, '确定')
  660. return;
  661. }
  662. if(type == 'warrant'){
  663. tools.skip('view/announcement/warrantDetail.html?type='+type+'&searchKeyWord='+searchKeyWord)
  664. }else{
  665. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord='+searchKeyWord)
  666. }
  667. }
  668. //项目查询
  669. searchProject = function(){
  670. var projectNum = $('#projectNum').val();
  671. var projectName = $('#projectName').val();
  672. var deptTypeSelect = $("select[name='deptTypeSelect']").val();
  673. tools.skip('view/listingItems/itemsList.html?projectCode='+projectNum+'&projectName='+projectName+'&projectNumber='+deptTypeSelect)
  674. }
  675. //标的物类型
  676. module.deptTypeSelect = function (data) {
  677. if (data.code == 200) {
  678. //console.log(data);
  679. var content = data.data ;
  680. module.data.deptTypeSelectList = content;
  681. var deptTypeSelectData = template('deptTypeSelectData', module.data);
  682. $("#deptTypeSelectContent").html(deptTypeSelectData);
  683. }
  684. }
  685. //切换
  686. tabCheck = function (type) {
  687. if(type == 'supply'){
  688. document.getElementById('demand').style.display = 'none';
  689. document.getElementById('demandBtn').className = '';
  690. }
  691. if(type == 'demand'){
  692. document.getElementById('supply').style.display = 'none';
  693. document.getElementById('supplyBtn').className = '';
  694. }
  695. document.getElementById(type).style.display = 'inline-table';
  696. document.getElementById(type+'Btn').className = 'active';
  697. }
  698. //切换
  699. tabClick = function (type) {
  700. document.getElementById('cjgg').style.display = 'none';
  701. document.getElementById('jzgg').style.display = 'none';
  702. document.getElementById('cjggBtn').className = '';
  703. document.getElementById('jzggBtn').className = '';
  704. document.getElementById(type).style.display = 'block';
  705. document.getElementById(type+'Btn').className = 'active';
  706. }
  707. //切换
  708. tabClickGYXQ = function (type) {
  709. document.getElementById('landListContent').style.display = 'none';
  710. document.getElementById('collectiveAssetsContent').style.display = 'none';
  711. document.getElementById('landListBtn').className = '';
  712. document.getElementById('collectiveAssetsBtn').className = '';
  713. document.getElementById(type+'Content').style.display = 'block';
  714. document.getElementById(type+'Btn').className = 'active';
  715. }
  716. goDetail = function (id) {
  717. if (!id)return;
  718. tools.skip('view/listingItems/itemsDetail.html?id='+id);
  719. }
  720. goUserInteract = function () {
  721. tools.skip('view/user/user.html?type=goInteract')
  722. }
  723. goListing = function (clickType,dictSort,dictCode) {
  724. tools.skip('view/listingItems/itemsList.html?clickType='+clickType+'&dictSort='+dictSort+'&dictCode='+dictCode);
  725. }
  726. goAnnouncementList = function (type) {
  727. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord=');
  728. }
  729. goNewList = function () {
  730. tools.skip('view/new/newList.html');
  731. }
  732. goPolicy = function (type) {
  733. tools.skip('view/policy/policy.html?type='+type);
  734. }
  735. goBidding = function(){
  736. tools.skip('view/bidding/biddingList.html');
  737. }
  738. goDemand = function(){
  739. tools.skip('view/demand/demand.html');
  740. }
  741. goInteraction = function(){
  742. tools.skip('view/interact/interactList.html');
  743. }
  744. goInteractSearch = function(){
  745. tools.skip('view/interact/interactList.html?keyWord='+$('#interactInput').val());
  746. }
  747. return module;
  748. });