网站
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ů.
 
 
 

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