فهرست منبع

修改行政决策公开的页面样式

sunjuan 2 سال پیش
والد
کامیت
408d03726d

+ 48 - 20
nngkxxdp/src/main/resources/static/zdjc/decision.html

@@ -9,9 +9,9 @@
     <link rel="stylesheet" href="./css/newdecision.css">
     <title>重庆市南岸区人民政府--重大行政决策公开</title>
     <style type="text/css">
-        body{
-            min-width: 1280px;
-        }
+        /*body{*/
+        /*    min-width: 1280px;*/
+        /*}*/
         /*chrome 和Safari*/
         body::-webkit-scrollbar {
             display: none;
@@ -79,7 +79,7 @@
         /*	cursor: pointer;*/
         /*}*/
         .yearChioce {
-            width: 1158px;
+            width: 80%;
             margin: auto;
             height: 60px;
             position: relative;
@@ -120,13 +120,13 @@
         }
 
         .mainTable {
-            width: 1159px;
+            width: 80%;
             margin: auto;
             margin-bottom: 50px;
         }
 
         .title {
-            width: 1159px;
+            width: 100%;
             height: 75px;
             background: linear-gradient(90deg, #F9DDAB, #D4AB63);
             font-size: 28px;
@@ -217,7 +217,7 @@
                 <div class="num">2021</div>
                 <img class="diamond" src="img/lingxing.png"></img>
             </li>
-            <img class="line" src="img/line1.png" style="width: 1158px;height: 2px">
+            <img class="line" src="img/line1.png" style="width: 100%;height: 2px">
         </ul>
 
         <div class="ly-first layui-hide mainTable">
@@ -255,8 +255,38 @@
             location.href = "decisionmobile.html";
         }
         var layer = layui.layer,
+            $ = layui.jquery,
             table = layui.table;
-
+        var tapsIndex = 0;
+        $('.yearChioce').on('click', 'li', function () {
+            layui.table.resize();//表格重新计算宽度
+            if ($(this).attr('data-id') == 1) {
+                $('.ly-first').addClass('layui-hide');
+                $('.ly-last').removeClass('layui-hide');
+            } else {
+                $('.ly-first').removeClass('layui-hide');
+                $('.ly-last').addClass('layui-hide');
+            }
+            var tapsTitleLi = $('.yearChioce li');
+            tapsTitleLi.removeClass('active');
+            $(this).addClass('active');
+            var tapimg = $('.yearChioce .diamond');
+
+            tapsTitleLi.each(function (index) {
+                var classStr = $(this).attr('class');
+                if (classStr.indexOf('active') != -1) {
+                    tapsIndex = index;
+                }
+            });
+
+            tapimg.each(function (index) {
+                if (tapsIndex == index) {
+                    $(this).attr('src','img/lingxing-c.png');
+                } else {
+                    $(this).attr('src','img/lingxing.png');
+                }
+            })
+        });
         var opra = function (data) {
             var btn = "";
             btn += '<a style="color:#b48d44" href="details.html?id=' + data.id + '" target="_blank">' + data.postTitle
@@ -303,13 +333,12 @@
         table.render({
             elem: '#tableData'
             ,url: PATH + '/postManagement/queryAllImportmentByYear?year=2022'
-            , width: 1158
             , cols: [[ //标题栏
-                {type: 'numbers', title: '序号', width: 80,align:"center"}
-                , {field: 'postTitle', title: '决策事项', templet: opra,align:"center"}
-                , {field: 'deptName', title: '承办单位', width: 220,align:"center"}
-                , {field: 'releaseTime', title: '决策时间', width: 150, templet: timeFormat,align:"center"}
-                , {field: 'type', title: '决策状态', width: 120, templet: typeFormat,align:"center"}
+                {type: 'numbers', title: '序号', width: "5%",align:"center"}
+                , {field: 'postTitle', title: '决策事项', width: "55%", templet: opra,align:"center"}
+                , {field: 'deptName', title: '承办单位', width: "18%",align:"center"}
+                , {field: 'releaseTime', title: '决策时间', width: "12%", templet: timeFormat,align:"center"}
+                , {field: 'type', title: '决策状态',  templet: typeFormat,align:"center"}
             ]]
             //,skin: 'line' //表格风格
             , even: true
@@ -321,13 +350,12 @@
         table.render({
             elem: '#tableData1'
             ,url: PATH + '/postManagement/queryAllImportmentByYear?year=2021'
-            , width: 1158
             , cols: [[ //标题栏
-                {type: 'numbers', title: '序号', width: 80,align:"center"}
-                , {field: 'postTitle', title: '决策事项', templet: opra,align:"center"}
-                , {field: 'deptName', title: '承办单位', width: 220,align:"center"}
-                , {field: 'releaseTime', title: '决策时间', width: 150, templet: timeFormat,align:"center"}
-                , {field: 'type', title: '决策状态', width: 120, templet: typeFormat,align:"center"}
+                {type: 'numbers', title: '序号', width: "5%",align:"center"}
+                , {field: 'postTitle', title: '决策事项',width: "55%", templet: opra,align:"center"}
+                , {field: 'deptName', title: '承办单位', width: "18%",align:"center"}
+                , {field: 'releaseTime', title: '决策时间', width: "12%", templet: timeFormat,align:"center"}
+                , {field: 'type', title: '决策状态', templet: typeFormat,align:"center"}
             ]]
             //,skin: 'line' //表格风格
             , even: true

+ 38 - 7
nngkxxdp/src/main/resources/static/zdjc/decisionmobile.html

@@ -3,7 +3,7 @@
 <head>
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=0">
     <link href="img/favicon.ico" rel="shortcut icon">
     <link rel="stylesheet" href="./layui/layui.css">
     <link rel="stylesheet" href="./css/decisionmobile.css">
@@ -361,7 +361,38 @@
 <script>
     layui.use(['table', 'layer'], function () {
         var layer = layui.layer,
+            $ = layui.jquery,
             table = layui.table;
+        var tapsIndex = 0;
+        $('.yearChioce').on('click', 'li', function () {
+            layui.table.resize();//表格重新计算宽度
+            if ($(this).attr('data-id') == 1) {
+                $('.ly-first').addClass('layui-hide');
+                $('.ly-last').removeClass('layui-hide');
+            } else {
+                $('.ly-first').removeClass('layui-hide');
+                $('.ly-last').addClass('layui-hide');
+            }
+            var tapsTitleLi = $('.yearChioce li');
+            tapsTitleLi.removeClass('active');
+            $(this).addClass('active');
+            var tapimg = $('.yearChioce .diamond');
+
+            tapsTitleLi.each(function (index) {
+                var classStr = $(this).attr('class');
+                if (classStr.indexOf('active') != -1) {
+                    tapsIndex = index;
+                }
+            });
+
+            tapimg.each(function (index) {
+                if (tapsIndex == index) {
+                    $(this).attr('src','img/lingxing-c.png');
+                } else {
+                    $(this).attr('src','img/lingxing.png');
+                }
+            })
+        });
 
         var opra = function (data) {
             var btn = "";
@@ -411,10 +442,10 @@
             , url: PATH + '/postManagement/queryAllImportmentByYear?year=2022'
             , cols: [[ //标题栏
                 {type: 'numbers', title: '序号', width: "8%", align: "center"}
-                , {field: 'postTitle', title: '决策事项',width: "45%", templet: opra, align: "center"}
+                , {field: 'postTitle', title: '决策事项',width: "40%", templet: opra, align: "center"}
                 , {field: 'deptName', title: '承办单位', width: "20%", align: "center"}
-                , {field: 'releaseTime', title: '决策时间', width: "15%", templet: timeFormat, align: "center"}
-                , {field: 'type', title: '决策状态', width: "15%", templet: typeFormat, align: "center"}
+                , {field: 'releaseTime', title: '决策时间', width: "16%", templet: timeFormat, align: "center"}
+                , {field: 'type', title: '决策状态',templet: typeFormat, align: "center"}
             ]]
             //,skin: 'line' //表格风格
             , even: true
@@ -428,10 +459,10 @@
             , url: PATH + '/postManagement/queryAllImportmentByYear?year=2021'
             , cols: [[ //标题栏
                 {type: 'numbers', title: '序号', width: "8%", align: "center"}
-                , {field: 'postTitle', title: '决策事项', width: "42%",templet: opra, align: "center"}
+                , {field: 'postTitle', title: '决策事项', width: "40%",templet: opra, align: "center"}
                 , {field: 'deptName', title: '承办单位', width: "20%", align: "center"}
-                , {field: 'releaseTime', title: '决策时间', width: "15%", templet: timeFormat, align: "center"}
-                , {field: 'type', title: '决策状态', width: "15%", templet: typeFormat, align: "center"}
+                , {field: 'releaseTime', title: '决策时间', width: "16%", templet: timeFormat, align: "center"}
+                , {field: 'type', title: '决策状态', templet: typeFormat, align: "center"}
             ]]
             //,skin: 'line' //表格风格
             , even: true

+ 0 - 28
nngkxxdp/src/main/resources/static/zdjc/js/decision.js

@@ -37,35 +37,7 @@ $('.bf-ds-ct p').on('click', function() {
 		$('.ly-last').addClass('layui-hide');
 	}
 });
-var tapsIndex = 0;
-$('.yearChioce').on('click', 'li', function () {
-    if ($(this).attr('data-id') == 1) {
-        $('.ly-first').addClass('layui-hide');
-        $('.ly-last').removeClass('layui-hide');
-    } else {
-        $('.ly-first').removeClass('layui-hide');
-        $('.ly-last').addClass('layui-hide');
-    }
-    var tapsTitleLi = $('.yearChioce li');
-    tapsTitleLi.removeClass('active');
-    $(this).addClass('active');
-    var tapimg = $('.yearChioce .diamond');
-
-    tapsTitleLi.each(function (index) {
-        var classStr = $(this).attr('class');
-        if (classStr.indexOf('active') != -1) {
-            tapsIndex = index;
-        }
-    });
 
-    tapimg.each(function (index) {
-        if (tapsIndex == index) {
-            $(this).attr('src','img/lingxing-c.png');
-        } else {
-            $(this).attr('src','img/lingxing.png');
-        }
-    })
-});
 
 function dateFormat(fmt, date) {
     let ret;