Переглянути джерело

task 公事公开新增需求开发

rongxin_dev
庞东旭 1 тиждень тому
джерело
коміт
60ae720374
2 змінених файлів з 180 додано та 24 видалено
  1. +10
    -10
      infoport/discussions.html
  2. +170
    -14
      infoport/static/js/project/discussions.js

+ 10
- 10
infoport/discussions.html Переглянути файл

@@ -126,7 +126,7 @@
<p id="nowDateNYR1" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box1" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box1" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent1">
<script id="newListData1" type="text/html">
{{each newList1 as value i}}
@@ -148,7 +148,7 @@
<p id="nowDateNYR2" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box2" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box2" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent2">
<script id="newListData2" type="text/html">
{{each newList2 as value i}}
@@ -160,7 +160,7 @@
{{/each}}
</script>
</div>
<div class="new_list_ul" id="newListContent_ul_2"></div>
<div class="new_list_ul" style="overflow-y: scroll;" id="newListContent_ul_2"></div>
</div>
</div>

@@ -171,7 +171,7 @@
<p id="nowDateNYR3" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box3" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box3" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent3">
<script id="newListData3" type="text/html">
{{each newList3 as value i}}
@@ -194,7 +194,7 @@
<p id="nowDateNYR4" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box4" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box4" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent4">
<script id="newListData4" type="text/html">
{{each newList4 as value i}}
@@ -217,7 +217,7 @@
<p id="nowDateNYR5" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box5" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box5" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent5">
<script id="newListData5" type="text/html">
{{each newList5 as value i}}
@@ -240,7 +240,7 @@
<p id="nowDateNYR6" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box6" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box6" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent6">
<script id="newListData6" type="text/html">
{{each newList6 as value i}}
@@ -263,7 +263,7 @@
<p id="nowDateNYR7" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box7" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box7" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent7">
<script id="newListData7" type="text/html">
{{each newList7 as value i}}
@@ -286,7 +286,7 @@
<p id="nowDateNYR8" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box8" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box8" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent8">
<script id="newListData8" type="text/html">
{{each newList8 as value i}}
@@ -310,7 +310,7 @@
<p id="nowDateNYR9" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box9" style="height: 44vh;overflow: hidden;margin-top: 2.5vh;">
<div id="review_box9" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent9">
<script id="newListData9" type="text/html">
{{each newList9 as value i}}


+ 170
- 14
infoport/static/js/project/discussions.js Переглянути файл

@@ -11,6 +11,24 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
focusList: [],
communicateList: [],
newImgList:[],
newList1:[],
newList2:[],
newList3:[],
newList4:[],
newList5:[],
newList6:[],
newList7:[],
newList8:[],
newList9:[],
pageNum1: 1,
pageNum2: 1,
pageNum3: 1,
pageNum4: 1,
pageNum5: 1,
pageNum6: 1,
pageNum7: 1,
pageNum8: 1,
pageNum9: 1,
},
};
var tools = new Tools();
@@ -37,12 +55,109 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
$("#listB").css('display','flex');
changeList('1');
}

var ulbox1 = document.getElementById("review_box1");
ulbox1.scrollTop = 0; // 开始无滚动时设为0

ulbox1.addEventListener('scroll', function() {
if (ulbox1.scrollHeight - ulbox1.scrollTop === ulbox1.clientHeight) {
module.data.pageNum1 += 1;
changeList('1');
}
});

var ulbox2 = document.getElementById("review_box2");
ulbox2.scrollTop = 0; // 开始无滚动时设为0

ulbox2.addEventListener('scroll', function() {
if (ulbox2.scrollHeight - ulbox2.scrollTop === ulbox2.clientHeight) {
module.data.pageNum2 += 1;
changeList('2');
}
});

var ulbox3 = document.getElementById("review_box3");
ulbox3.scrollTop = 0; // 开始无滚动时设为0

ulbox3.addEventListener('scroll', function() {
if (ulbox3.scrollHeight - ulbox3.scrollTop === ulbox3.clientHeight) {
module.data.pageNum3 += 1;
changeList('3');
}
});

var ulbox4 = document.getElementById("review_box4");
ulbox4.scrollTop = 0; // 开始无滚动时设为0

ulbox4.addEventListener('scroll', function() {
if (ulbox4.scrollHeight - ulbox4.scrollTop === ulbox4.clientHeight) {
module.data.pageNum4 += 1;
changeList('4');
}
});

var ulbox5 = document.getElementById("review_box5");
ulbox5.scrollTop = 0; // 开始无滚动时设为0

ulbox5.addEventListener('scroll', function() {
if (ulbox5.scrollHeight - ulbox5.scrollTop === ulbox5.clientHeight) {
module.data.pageNum5 += 1;
changeList('5');
}
});

var ulbox6 = document.getElementById("review_box6");
ulbox6.scrollTop = 0; // 开始无滚动时设为0

ulbox6.addEventListener('scroll', function() {
if (ulbox6.scrollHeight - ulbox6.scrollTop === ulbox6.clientHeight) {
module.data.pageNum6 += 1;
changeList('6');
}
});

var ulbox7 = document.getElementById("review_box7");
ulbox7.scrollTop = 0; // 开始无滚动时设为0

ulbox7.addEventListener('scroll', function() {
if (ulbox7.scrollHeight - ulbox7.scrollTop === ulbox7.clientHeight) {
module.data.pageNum7 += 1;
changeList('7');
}
});

var ulbox8 = document.getElementById("review_box8");
ulbox8.scrollTop = 0; // 开始无滚动时设为0

ulbox8.addEventListener('scroll', function() {
if (ulbox8.scrollHeight - ulbox8.scrollTop === ulbox8.clientHeight) {
module.data.pageNum8 += 1;
changeList('8');
}
});

var ulbox9 = document.getElementById("review_box9");
ulbox9.scrollTop = 0; // 开始无滚动时设为0

ulbox9.addEventListener('scroll', function() {
if (ulbox9.scrollHeight - ulbox9.scrollTop === ulbox9.clientHeight) {
module.data.pageNum9 += 1;
changeList('9');
}
});
};

module.newsList4 = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList4 = content;
if (module.data.newList4.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList4.push(content[i]);
}
}
// module.data.newList4 = content;
var newListData4 = template('newListData4', module.data);
$("#newListContent_ul_4").html(newListData4);
}
@@ -51,7 +166,14 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
module.newsList7 = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList7 = content;
if (module.data.newList7.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList7.push(content[i]);
}
}
// module.data.newList7 = content;
var newListData7 = template('newListData7', module.data);
$("#newListContent_ul_7").html(newListData7);
}
@@ -60,7 +182,14 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
module.newsList8 = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList8 = content;
if (module.data.newList8.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList8.push(content[i]);
}
}
// module.data.newList8 = content;
var newListData8 = template('newListData8', module.data);
$("#newListContent_ul_8").html(newListData8);
}
@@ -69,7 +198,14 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
module.newsList9 = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList9 = content;
if (module.data.newList9.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList9.push(content[i]);
}
}
// module.data.newList9 = content;
var newListData9 = template('newListData9', module.data);
$("#newListContent_ul_9").html(newListData9);
}
@@ -142,7 +278,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
$('#new_list_1').css('display','block');
$("#nowDateNYR1").html(new Date().getFullYear()+'-'+(new Date().getMonth()+1)+'-'+new Date().getDate());
tools.doGet(financePublicList, {
pageNum:1,
pageNum:module.data.pageNum1,
pageSize:10,
orderByColumn: 'openNy',
isAsc: 'desc',
@@ -155,7 +291,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
$('#new_list_2').css('display','block');
$("#nowDateNYR2").html(new Date().getFullYear()+'-'+(new Date().getMonth()+1)+'-'+new Date().getDate());
tools.doGet(contractionList, {
pageNum:1,
pageNum:module.data.pageNum2,
pageSize:10,
orderByColumn: 'buildingTime',
translate_dict: 1,
@@ -169,7 +305,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
$('#new_list_3').css('display','block');
$("#nowDateNYR3").html(new Date().getFullYear()+'-'+(new Date().getMonth()+1)+'-'+new Date().getDate());
tools.doGet(majorEventPublicList, {
pageNum:1,
pageNum:module.data.pageNum3,
pageSize:10,
orderByColumn: 'openNy',
isAsc: 'desc',
@@ -182,7 +318,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
$('#new_list_4').css('display','block');
$("#nowDateNYR4").html(new Date().getFullYear()+'-'+(new Date().getMonth()+1)+'-'+new Date().getDate());
tools.doGet(listSiyigongkai, {
pageNum:1,
pageNum:module.data.pageNum4,
pageSize:10,
bookId: JSON.parse(tools.getCookie('user')).bookId,
deptId: JSON.parse(tools.getCookie('user')).deptId
@@ -204,7 +340,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
translate_dict:1,
orderByColumn: 'code',
isAsc: 'asc',
pageNum:1,
pageNum:module.data.pageNum7,
pageSize:10,
bookId: JSON.parse(tools.getCookie('user')).bookId,
deptId: JSON.parse(tools.getCookie('user')).deptId
@@ -218,7 +354,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
translate_dict:1,
orderByColumn: 'code',
isAsc: 'asc',
pageNum:1,
pageNum:module.data.pageNum8,
pageSize:10,
bookId: JSON.parse(tools.getCookie('user')).bookId
}, module.newsList8 , true);
@@ -231,7 +367,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
translate_dict:1,
orderByColumn: 'openNy',
isAsc: 'asc',
pageNum:1,
pageNum:module.data.pageNum9,
pageSize:10,
bookId: JSON.parse(tools.getCookie('user')).bookId,
deptId: JSON.parse(tools.getCookie('user')).deptId
@@ -249,7 +385,13 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
module.newsList1 = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList1 = content;
if (module.data.newList1.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList1.push(content[i]);
}
}
var newListData1 = template('newListData1', module.data);
$("#newListContent_ul_1").html(newListData1);
}
@@ -258,7 +400,14 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
module.newsList2 = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList2 = content;
if (module.data.newList2.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList2.push(content[i]);
}
}

var newListData2 = template('newListData2', module.data);
$("#newListContent_ul_2").html(newListData2);
}
@@ -267,7 +416,14 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
module.newsList3 = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList3 = content;
if (module.data.newList3.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList3.push(content[i]);
}
}
// module.data.newList3 = content;
var newListData3 = template('newListData3', module.data);
$("#newListContent_ul_3").html(newListData3);
}


Завантаження…
Відмінити
Зберегти