diff --git a/agriculturalLawEnforcement/index.html b/agriculturalLawEnforcement/index.html index 933290b..0cd0d36 100644 --- a/agriculturalLawEnforcement/index.html +++ b/agriculturalLawEnforcement/index.html @@ -287,7 +287,5 @@ - - - + \ No newline at end of file diff --git a/agriculturalLawEnforcement/static/js/api/index.js b/agriculturalLawEnforcement/static/js/api/index.js index b6334fc..de53a4a 100644 --- a/agriculturalLawEnforcement/static/js/api/index.js +++ b/agriculturalLawEnforcement/static/js/api/index.js @@ -10,118 +10,10 @@ var getInfo_get = '/getInfo' //获取用户信息 * 首页 -----------------*/ /* -@purl /transaction/website/news/{number}/{limit} +@purl /enforce/website/news/{number}/{deptId}/{limit} @param - number:新闻类型字典编号 - limit: 要查询的数据条数 + number:新闻类型字典编号 + deptId:部门ID + limit: 要查询的数据条数 */ -var websiteNew = '/transaction/website/news' //网站新闻类接口 - -/* -@purl /transaction/website/news/{number} -@param - number:新闻类型字典编号 -*/ -var websiteNewPage = '/transaction/website/news'// - -/* -@purl /transaction/website/deptList/{deptId} -@param - deptId:查询当前平台级别下一级的部门列表 传参 0 - 查询某一级别下一级的部门列表 传参网址url中的deptId -*/ -var webDept = '/transaction/website/deptList'//标的物所在地 - -/* -@purl /system/dict/data/type/ + dictType -@param - dictType:project_type -*/ -var webDeptType = '/transaction/website/data/type'//标的物类型查询接口 - -/* -@purl /transaction/website/config -@param -*/ -var webConfig = '/transaction/website/config'//查询网站配置信息 - -/* -@purl /transaction/website/links -@param -*/ -var friendsLinks = '/transaction/website/links'//查询网站底部友情链接 - -/* -@purl /transaction/website/links -@param - dictType:0 -*/ -var allViewCount = '/transaction/website/outproject/allViewCount'//查询挂牌项目浏览总次数 - -/* -@purl /transaction/website/outproject/{projectNumberArr}/{deptId}/{limit} -@param - projectNumberArr:土地林地四荒地模块,传参 1,2,3 - 集体资产,传参 4 - 农业生产设备,传参 5 - 小型水利设施,传参 6 - deptId:行政区划部门ID - limit:需要获取的数据条数(如获取3条,参数设置为 3) -*/ -var webListing = '/transaction/website/outproject'//查询挂牌项目信息列表 - -/* -@purl /transaction/website/outproject/publicity/{deptId}/{limit} -@param - deptId:行政区划部门ID - limit:需要获取的数据条数 -*/ -var announcementList = '/transaction/website/outproject/publicity'//成交公示 - -/* -@purl /transaction/website/biddinglist/{deptId}/{limit} -@param - deptId:行政区划部门ID - limit:需要获取的数据条数 -*/ -var biddingHallList = '/transaction/website/biddinglist'//竞价大厅列表 - -/* -@purl /transaction/website/jzlist/{deptId}/{limit} -@param - deptId:行政区划部门ID - limit:需要获取的数据条数 -*/ -var attestationList = '/transaction/website/jzlist'//竞价大厅列表 - -/* -@purl /transaction/website/supplyDemand -@param - deptId:行政区划部门ID - limit:需要获取的数据条数 -*/ -var supplyDemand = '/transaction/website/supplyDemand'//竞价大厅列表 - -/* -@purl /transaction/website/communicateList -@param - deptId:行政区划部门ID - limit:需要获取的数据条数 -*/ -var communicateList = '/transaction/website/communicateList'//互动交流列表 - -/* -@purl /transaction/website/outproject/statistics/{deptId} -@param - deptId:行政区划部门ID - limit:需要获取的数据条数 -*/ -var statistics = '/transaction/website/outproject/statistics'//土地挂牌价格走势统计图 - -/* -@purl /supplyDemandRecommend/{deptId}/{limit} -@param - deptId:行政区划部门ID - limit:需要获取的数据条数 -*/ -var supplyDemandRecommend = '/transaction/website/supplyDemandRecommend'//土地挂牌价格走势统计图 \ No newline at end of file +var news = '/enforce/website/news' //查询新闻管理列表固定条数 diff --git a/agriculturalLawEnforcement/static/js/common/main.js b/agriculturalLawEnforcement/static/js/common/main.js index 07a156d..166c324 100644 --- a/agriculturalLawEnforcement/static/js/common/main.js +++ b/agriculturalLawEnforcement/static/js/common/main.js @@ -68,10 +68,6 @@ requirejs.config({ deps: ['jquery'], exports: 'ajaxUploadImage' }, - kindeditor: { - deps: ['zhCN'], - exports: 'kindeditor' - } } }); @@ -103,53 +99,3 @@ require(["jquery", "nprogress"], function ($, nprogress) { return; } }) - -require(["jquery", "Tools","addressApi"], function ($, Tools) { - var tools = new Tools(); - // document.getElementById('dress').onmouseover = function(){ - // document.getElementById('dressList').style.display = 'block'; - // }; - // document.getElementById('dressList').onmouseover = function(){ - // document.getElementById('dressList').style.display = 'block'; - // }; - // document.getElementById('dress').onmouseout = function(){ - // document.getElementById('dressList').style.display = 'none'; - // }; - // document.getElementById('dressList').onmouseout = function(){ - // document.getElementById('dressList').style.display = 'none'; - // }; - if(tools.getCookie('Admin-Token') != ''){ - document.getElementById('userInfo').style.display = 'block'; - document.getElementById('userLogin').style.display = 'none'; - document.getElementById('userRealName').innerHTML = tools.getCookie('userName'); - document.getElementById('userRealName2').innerHTML = tools.getCookie('userName'); - document.getElementById('userInfo').onmouseover = function(){ - document.getElementById('headHover').style.display = 'block'; - }; - document.getElementById('headHover').onmouseover = function(){ - document.getElementById('headHover').style.display = 'block'; - }; - document.getElementById('userInfo').onmouseout = function(){ - document.getElementById('headHover').style.display = 'none'; - }; - document.getElementById('headHover').onmouseout = function(){ - document.getElementById('headHover').style.display = 'none'; - }; - }else{ - document.getElementById('userLogin').style.display = 'block'; - } - - outLogin = function(){ - tools.removeAllCookie(); - } - - goIndex = function(){ - tools.skip('/'); - } - - searchAllNew = function () { - var searchAllTitle = $('#searchAllTitle').val(); - tools.skip('view/new/newList.html?title='+searchAllTitle); - } - -}) \ No newline at end of file diff --git a/agriculturalLawEnforcement/static/js/project/index.js b/agriculturalLawEnforcement/static/js/project/index.js index 16b1fb3..6ba656e 100644 --- a/agriculturalLawEnforcement/static/js/project/index.js +++ b/agriculturalLawEnforcement/static/js/project/index.js @@ -9,186 +9,15 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa serverApi:'', //焦点图数据 focusList: [], - //底部焦点图 - focusListNext:[], - //新闻资讯数据 - newsInformationList: [], - //政策法规数据 - policiesRegulationsList: [], - //交易规则数据 - tradingRulesList: [], - //资料下载数据 - dataDownloadList: [], - //标的物所在地 - deptLocationList:[], - //标的物类型 - deptTypeList:[], - //网站配置信息 - webConfigInformationList:[], - //底部友情链接 - friendsLinksList:[], - //土地林地四荒地数据 - landListList:[], - //集体资产数据 - collectiveAssetsList:[], - //小型水利设施数据 - waterConservancyFacilitiesList:[], - //农业生产设备数据 - productionEquipmentList:[], - //挂牌项目总浏览次数 - allViewCountList:[], - //成交公示数据 - announcementListList:[], - //鉴证公告数据 - attestationList:[] }, - //柱状图参数 - option: { - xAxis: { - type: 'category', - axisLine: { - show: true, - lineStyle: { - width: 1, - type: "solid" - } - }, - axisLabel: { //设置x轴的字 - show: true, - interval: 0,//使x轴横坐标全部显示 - textStyle: {//x轴字体样式 - margin: 15 - } - }, - data: [] - }, - yAxis: { - type: 'value', - min: 400, - max: 1000, - splitNumber: 7, - splitLine: { - lineStyle: { - type: 'dashed' - } - }, - axisLine: { - show: true, - lineStyle: { - width: 1, - type: "solid" - } - }, - - }, - series: [{ - data: [],//实际值减300 - type: 'bar', - itemStyle: { - color: '#A9A9A9' - } - }], - grid: { - height: 200, - width: 280, - top: '-5px' - }, - tooltip: { - trigger: "axis", - axisPointer: { - // 坐标轴指示器,坐标轴触发有效 - type: "shadow", // 默认为直线,可选为:'line' | 'shadow' - }, - }, - } }; var tools = new Tools(); module.init = function (page) { - //获取焦点图信息 - tools.doGet(websiteNew + '/1/0/4', {}, module.focusNews , true); - - //新闻资讯 - tools.doGet(websiteNew + '/2/0/6', {}, module.NewsInformation , true); - - //政策法规 - tools.doGet(websiteNew + '/3/0/6', {}, module.policiesRegulations , true); - - //交易规则 - tools.doGet(websiteNew + '/4/0/6', {}, module.tradingRules , true); - - //资料下载 - tools.doGet(websiteNew + '/5/0/6', {}, module.dataDownload, true); - - //标的物所在地 - tools.doGet(webDept, {deptId:''}, module.deptLocation , true); - - //标的物类型 - tools.doGet(webDeptType+"/project_type", {}, module.deptType, true); - - //标的物类型下拉菜单 - tools.doGet(webDeptType+"/project_type", {}, module.deptTypeSelect, true); - - //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号) - tools.getWebConfig(); - - //底部友情链接 - tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true); - - //土地 - tools.doGet(webListing + '/1,2,3/0/3', {}, module.landList, true); - - //集体资产 - tools.doGet(webListing + '/4/0/3', {}, module.collectiveAssets, true); - - //农业生产设备 - tools.doGet(webListing + '/5/0/3', {}, module.productionEquipment, true); - - //小型水利设施 - tools.doGet(webListing + '/6/0/3', {}, module.waterConservancyFacilities, true); - - //查询挂牌项目浏览总次数 - tools.doGet(allViewCount + '/100', {}, module.allViewCount, true); - - //查询挂牌项目浏览总次数 - tools.doGet(announcementList + '/0/4', {}, module.announcementList, true); - - //查询挂牌项目浏览总次数 - tools.doGet(biddingHallList + '/0/10', {}, module.biddingHallList, true); - - //查询挂牌项目浏览总次数 - tools.doGet(attestationList + '/0/5', {}, module.attestationList, true); - - //个人供求 - tools.doGet(supplyDemand + '/100/1/5', {}, module.supplyDemand, true); - tools.doGet(supplyDemand + '/100/2/5', {}, module.supplyDemand2, true); - - //互动交流 - tools.doGet(communicateList + '/100/5/notnull', {}, module.communicateList, true); - - //土地挂牌价格走势统计图 - tools.doGet(statistics, {deptId: 100}, module.statisticsContent, true); - - //竞价大厅-滚动 - module.hallRolling(); - setTimeout(function(){ - //主题图片切换 - module.switchTheme(); - },500) - + //新闻管理列表 + tools.doGet(news + '/003/7', {}, module.focusNews , true); }; - //主题图片切换 - module.switchTheme = function(){ - if(themeColor == 'red'){ - document.getElementById('centerBanner').src = './static/images/centerBanner_red.jpg' - document.getElementById('bannerBottom').src = './static/images/bannerBottom_red.jpg' - }else if(themeColor == 'green'){ - document.getElementById('centerBanner').src = './static/images/centerBanner.jpg' - document.getElementById('bannerBottom').src = './static/images/bannerBottom.jpg' - } - } - //焦点图数据 module.focusNews = function (data) { if (data.code == 200) { @@ -216,420 +45,6 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa } } - module.statisticsContent = function(data){ - //console.log(module.option) - //console.log(data) - module.data.nowPriceAvg = data.nowPriceAvg; - module.data.priceRate = data.priceRate; - var statisticsData = template('statisticsData', module.data); - $("#statisticsContent").html(statisticsData); - for (var i = 0 ; i < data.priceAvgList.length ; i++){ - module.option.xAxis.data[i] = data.priceAvgList[i].year - module.option.series[0].data[i] = data.priceAvgList[i].price - } - // 柱状图绘制 - var chartDom = document.getElementById('chart'); - var myChart = echarts.init(chartDom); - module.option && myChart.setOption(module.option); - } - - //互动交流 - module.communicateList = function (data) { - if (data.code == 200) { - //console.log(data.data) - var content = data.data; - module.data.communicateList = content; - var communicateData = template('communicateData', module.data); - $("#communicateContent").html(communicateData); - } - } - - //新闻资讯数据 - module.NewsInformation = function (data) { - if (data.code == 200) { - var content = data.data; - //console.log(content) - module.data.newsInformationList = content; - var NewsInformationData = template('NewsInformationData', module.data); - $("#NewsInformationContent").html(NewsInformationData); - } - } - - //政策法规 - module.policiesRegulations = function (data) { - if (data.code == 200) { - var content = data.data; - module.data.policiesRegulationsList = content; - var policiesRegulationsData = template('policiesRegulationsData', module.data); - $("#policiesRegulationsContent").html(policiesRegulationsData); - } - } - - //交易规则 - module.tradingRules = function (data) { - if (data.code == 200) { - var content = data.data; - module.data.tradingRulesList = content; - var tradingRulesData = template('tradingRulesData', module.data); - $("#tradingRulesContent").html(tradingRulesData); - } - } - - //资料下载 - module.dataDownload = function (data) { - if (data.code == 200) { - var content = data.data; - module.data.dataDownloadList = content; - var dataDownloadData = template('dataDownloadData', module.data); - $("#dataDownloadContent").html(dataDownloadData); - } - } - - //标的物所在地 - module.deptLocation = function (data) { - //console.log(data) - if (data.code == 200) { - var content = data.data ; - var contentList = []; - for (var i = 0 ; i < 5&&i0){ - //console.log('进行中') - content[i].timeType = '进行中' - } - if(leftTime<0){ - //console.log('已结束') - content[i].timeType = '已结束' - } - if(rightTime>0){ - //console.log('未开始') - content[i].timeType = '未开始' - } - } - //console.log(content) - var biddingHallListData = template('biddingHallListData', module.data); - $("#biddingHallListContent").html(biddingHallListData); - } - } - - ///竞价大厅-滚动 - module.hallRolling = function () { - var divScroll = document.getElementById('tableList'); - window.onmousewheel = divScroll.onmousewheel = function () { return false } - module.timeInter(divScroll); - divScroll.onmouseover = function () { - clearInterval(time); - } - divScroll.onmouseout = function () { - module.timeInter(divScroll); - } - - } - - //个人供求 - module.supplyDemand = function (data) { - if (data.code == 200) { - //console.log(data) - var content = data.data; - module.data.supplyDemandList = content; - var supplyDemandData = template('supplyDemandData', module.data); - $("#supply").html(supplyDemandData); - } - } - - //个人供求 - module.supplyDemand2 = function (data) { - if (data.code == 200) { - //console.log(data) - var content = data.data; - module.data.supplyDemand2List = content; - var supplyDemand2Data = template('supplyDemand2Data', module.data); - $("#demand").html(supplyDemand2Data); - tools.doGet(supplyDemandRecommend + '/100/5', {}, module.supplyDemandRecommend, true); - } - } - - module.supplyDemandRecommend = function(data){ - var focusListNext = module.data.focusListNext; - for (var i = 0; i < data.data.length; i++) { - var imgStrs = data.data[i].fileUrl - if (imgStrs != null && imgStrs != '') { - focusListNext.push({img:serverApi+imgStrs,title:data.data[i].projectName,id:data.data[i].id}) - } - } - console.log(data) - module.data.focusListNext = focusListNext; - var bannerFocusBottomData = template('bannerFocusBottomData', module.data); - $("#bannerFocusNextContent").html(bannerFocusBottomData); - new Swiper('#bannerFocusNextWrap', { - paginationClickable: true, - pagination: '.a2', - autoplay : 2000, - loop:true - }) - } - - module.supplyImages = function(){ - var focusListNext = module.data.focusListNext; - //console.log(module.data.supplyDemandList) - for (var i = 0; i < module.data.supplyDemandList.length; i++) { - var imgStrs = module.data.supplyDemandList[i].projectContent.match(//g) - var title = module.data.supplyDemandList[i].projectName - if (imgStrs != null && imgStrs != '') { - focusListNext.push({img:imgStrs[0],title:title}) - } - } - for (var i = 0; i < module.data.supplyDemand2List.length; i++) { - var imgStrs = module.data.supplyDemand2List[i].projectContent.match(//g) - var title = module.data.supplyDemand2List[i].projectName - if (imgStrs != null && imgStrs != '') { - focusListNext.push({img:imgStrs[0],title:title}) - } - } - module.data.focusListNext = focusListNext; - var bannerFocusBottomData = template('bannerFocusBottomData', module.data); - $("#bannerFocusNextContent").html(bannerFocusBottomData); - new Swiper('#bannerFocusNextWrap', { - pagination: '.page-pagination1', - paginationClickable: true - }) - } - - module.timeInter = function (divScroll) { - time = setInterval(function () { - var oldTop = divScroll.scrollTop; - var newTop = oldTop + 1; - divScroll.scrollTop = newTop; - var counst = divScroll.scrollHeight - divScroll.scrollTop - divScroll.clientHeight; - if (1 > counst) { - divScroll.scrollTop = 0; - } - }, 30) - } - - //证书查询 - goSearchKeyWord = function(){ - var type = $('input[name="transaction"]:checked').val(); - var searchKeyWord = $('#searchKeyWord').val(); - //console.log($('#searchKeyWord').val()) - //console.log(type) - if($('#searchKeyWord').val() == '' && type== 'warrant'){ - tools.initDialog('提示', '经营权证编号不可为空', function () { - return; - }, '确定') - return; - } - if(type == 'warrant'){ - tools.skip('view/announcement/warrantDetail.html?type='+type+'&searchKeyWord='+searchKeyWord) - }else{ - tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord='+searchKeyWord) - } - } - - //项目查询 - searchProject = function(){ - var projectNum = $('#projectNum').val(); - var projectName = $('#projectName').val(); - var deptTypeSelect = $("select[name='deptTypeSelect']").val(); - tools.skip('view/listingItems/itemsList.html?projectCode='+projectNum+'&projectName='+projectName+'&projectNumber='+deptTypeSelect) - } - - //标的物类型 - module.deptTypeSelect = function (data) { - if (data.code == 200) { - //console.log(data); - var content = data.data ; - module.data.deptTypeSelectList = content; - var deptTypeSelectData = template('deptTypeSelectData', module.data); - $("#deptTypeSelectContent").html(deptTypeSelectData); - } - } - - //切换 - tabCheck = function (type) { - - if(type == 'supply'){ - document.getElementById('demand').style.display = 'none'; - document.getElementById('demandBtn').className = ''; - } - if(type == 'demand'){ - document.getElementById('supply').style.display = 'none'; - document.getElementById('supplyBtn').className = ''; - } - document.getElementById(type).style.display = 'inline-table'; - document.getElementById(type+'Btn').className = 'active'; - } - - goDetail = function (id) { - tools.skip('view/listingItems/itemsDetail.html?id='+id); - } - goUserInteract = function () { - tools.skip('view/user/user.html?type=goInteract') - } - goListing = function (clickType,dictSort,dictCode) { - tools.skip('view/listingItems/itemsList.html?clickType='+clickType+'&dictSort='+dictSort+'&dictCode='+dictCode); - } - - goAnnouncementList = function (type) { - tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord='); - } - - goNewList = function () { - tools.skip('view/new/newList.html'); - } - - goPolicy = function (type) { - tools.skip('view/policy/policy.html?type='+type); - } - - goBidding = function(){ - tools.skip('view/bidding/biddingList.html'); - } - - goDemand = function(){ - tools.skip('view/demand/demand.html'); - } - - goInteraction = function(){ - tools.skip('view/interact/interactList.html'); - } goInteractSearch = function(){ tools.skip('view/interact/interactList.html?keyWord='+$('#interactInput').val()); }