zhiyuan007 1 year ago
parent
commit
275dc374ab

+ 1 - 0
index.html

@@ -5,6 +5,7 @@
     <link rel="icon" href="/favicon.ico">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>Vite App</title>
+    <script src="/src/units/jquery-2.1.1.js"></script>
   </head>
   <body>
     <div id="app"></div>

+ 11 - 0
package-lock.json

@@ -13,6 +13,7 @@
         "axios": "^1.3.1",
         "echarts": "^5.4.1",
         "element-plus": "^2.2.28",
+        "file-saver": "^2.0.5",
         "jquery": "^3.7.0",
         "js-base64": "^3.7.4",
         "lib-flexible-computer": "^1.0.2",
@@ -1796,6 +1797,11 @@
       "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
       "peer": true
     },
+    "node_modules/file-saver": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
+      "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
+    },
     "node_modules/fill-range": {
       "version": "7.0.1",
       "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
@@ -5401,6 +5407,11 @@
       "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
       "peer": true
     },
+    "file-saver": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
+      "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
+    },
     "fill-range": {
       "version": "7.0.1",
       "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "axios": "^1.3.1",
     "echarts": "^5.4.1",
     "element-plus": "^2.2.28",
+    "file-saver": "^2.0.5",
     "jquery": "^3.7.0",
     "js-base64": "^3.7.4",
     "lib-flexible-computer": "^1.0.2",

+ 2 - 119
src/pinia/useStore.js

@@ -4,125 +4,8 @@ export const useRootStore = defineStore('root',{
     state() {
         return {
             userInfo:{},
-            leftMenuList:[
-                {
-                    "children":[
-                        {
-                            "path":"policy-regulation-information",
-                            "name":"政策法规信息"
-                        },
-                        {
-                            "path":"memorandum-manage",
-                            "name":"备忘录管理"
-                        }
-                    ],
-                    "O_LCON":"iconfont icon-wenjianguanli iconColor",
-                    "path":"/",
-                    "name":"政策法规管理"
-                },
-                {
-                    "children":[
-                        {
-                            "path":"city-credit-information-platform-search",
-                            "name":"市信用信息平台查询"
-                        },
-                        {
-                            "children":[
-                                {
-                                    "path":"relative-person-search",
-                                    "name":"按相对人查询"
-                                },
-                                {
-                                    "path":"matter-search",
-                                    "name":"按事项查询"
-                                }
-                            ],
-                            "path":"/66",
-                            "name":"委信用信息库查询"
-                        },
-                        {
-                            "path":"commission-three-inventory-information-manage",
-                            "name":"委三清单信息管理"
-                        },
-                        {
-                            "path":"commission-credit-information-manage",
-                            "name":"委信用信息管理"
-                        }
-                    ],
-                    "O_LCON":"iconfont icon-xinyong iconColor",
-                    "path":"/99",
-                    "name":"信用信息"
-                },
-                {
-                    "children":[
-                        {
-                            "path":"memorandum-manage",
-                            "name":"备忘录管理"
-                        },
-                        {
-                            "path":"rewards-and-punishments-measure-manage",
-                            "name":"奖惩措施管理"
-                        },
-                        {
-                            "path":"combined-reward-and-punishments-measure-manage",
-                            "name":"联合奖惩案例信息"
-                        },
-                    ],
-                    "O_LCON":"iconfont icon-medal iconColor",
-                    "path":"/15",
-                    "name":"联合奖惩"
-                },
-                {
-                    "children":[
-                        {
-                            "path":"data-imputation-push",
-                            "name":"数据归集推送"
-                        },
-                        {
-                            "path":"apply-information",
-                            "name":"应用情况"
-                        },
-                        {
-                            "path":"credit-repair",
-                            "name":"信用修复"
-                        },
-                        {
-                            "path":"combined-rewards-and-punishments",
-                            "name":"联合奖惩"
-                        },
-                        {
-                            "path":"data-log",
-                            "name":"数据日志"
-                        },
-                    ],
-                    "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
-                    "path":"/21",
-                    "name":"信用数据"
-                },
-                {
-                    "children":[
-                        {
-                            "path":"user-manage",
-                            "name":"用户管理"
-                        },
-                        {
-                            "path":"unit-manage",
-                            "name":"单位管理"
-                        },
-                        {
-                            "path":"user-log",
-                            "name":"用户日志"
-                        },
-                        {
-                            "path":"system-explain",
-                            "name":"系统说明"
-                        },
-                    ],
-                    "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
-                    "path":"/26",
-                    "name":"系统管理"
-                },
-            ],
+            leftMenuList:[],
+            isManager:false,
             defaultActive:"",
             toHomeCounter:0,
         }

File diff suppressed because it is too large
+ 4 - 0
src/units/jquery-2.1.1.js


+ 84 - 0
src/units/jquery.wordexport.js

@@ -0,0 +1,84 @@
+if (typeof jQuery !== "undefined" && typeof saveAs !== "undefined") {
+    (function($) {
+        $.fn.wordExport = function(fileName) {
+            fileName = typeof fileName !== 'undefined' ? fileName : "jQuery-Word-Export";
+            var static1 = {
+                mhtml: {
+                    top: "Mime-Version: 1.0\nContent-Base: " + location.href + "\nContent-Type: Multipart/related; boundary=\"NEXT.ITEM-BOUNDARY\";type=\"text/html\"\n\n--NEXT.ITEM-BOUNDARY\nContent-Type: text/html; charset=\"utf-8\"\nContent-Location: " + location.href + "\n\n<!DOCTYPE html>\n<html>\n_html_</html>",
+                    head: "<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n<style>\n_styles_\n</style>\n</head>\n",
+                    body: "<body>_body_</body>"
+                }
+            };
+            var options = {
+                maxWidth: 624
+            };
+            // Clone selected element before manipulating it
+            var markup = $(this).clone();
+
+            // Remove hidden elements from the output
+            markup.each(function() {
+                var self = $(this);
+                if (self.is(':hidden'))
+                    self.remove();
+            });
+
+            // Embed all images using Data URLs
+            var images = Array();
+            var img = markup.find('img');
+            for (var i = 0; i < img.length; i++) {
+                // Calculate dimensions of output image
+                var w = Math.min(img[i].width, options.maxWidth);
+                var h = img[i].height * (w / img[i].width);
+                // Create canvas for converting image to data URL
+                var canvas = document.createElement("CANVAS");
+                canvas.width = w;
+                canvas.height = h;
+                // Draw image to canvas
+                var context = canvas.getContext('2d');
+                context.drawImage(img[i], 0, 0, w, h);
+                // Get data URL encoding of image
+                var uri = canvas.toDataURL("image/png");
+                $(img[i]).attr("src", img[i].src);
+                img[i].width = w;
+                img[i].height = h;
+                // Save encoded image to array
+                images[i] = {
+                    type: uri.substring(uri.indexOf(":") + 1, uri.indexOf(";")),
+                    encoding: uri.substring(uri.indexOf(";") + 1, uri.indexOf(",")),
+                    location: $(img[i]).attr("src"),
+                    data: uri.substring(uri.indexOf(",") + 1)
+                };
+            }
+
+            // Prepare bottom of mhtml file with image data
+            var mhtmlBottom = "\n";
+            for (var i = 0; i < images.length; i++) {
+                mhtmlBottom += "--NEXT.ITEM-BOUNDARY\n";
+                mhtmlBottom += "Content-Location: " + images[i].location + "\n";
+                mhtmlBottom += "Content-Type: " + images[i].type + "\n";
+                mhtmlBottom += "Content-Transfer-Encoding: " + images[i].encoding + "\n\n";
+                mhtmlBottom += images[i].data + "\n\n";
+            }
+            mhtmlBottom += "--NEXT.ITEM-BOUNDARY--";
+
+            //TODO: load css from included stylesheet
+            var styles = "";
+
+            // Aggregate parts of the file together
+            var fileContent = static1.mhtml.top.replace("_html_", static1.mhtml.head.replace("_styles_", styles) + static1.mhtml.body.replace("_body_", markup.html())) + mhtmlBottom;
+
+            // Create a Blob with the file contents
+            var blob = new Blob([fileContent], {
+                type: "application/msword;charset=utf-8"
+            });
+            saveAs(blob, fileName + ".doc");
+        };
+    })(jQuery);
+} else {
+    if (typeof jQuery === "undefined") {
+        console.error("jQuery Word Export: missing dependency (jQuery)");
+    }
+    if (typeof saveAs === "undefined") {
+        console.error("jQuery Word Export: missing dependency (FileSaver.js)");
+    }
+}

+ 250 - 0
src/units/use-method/power-control.js

@@ -1,6 +1,7 @@
 import {useRootStore} from "@/pinia/useStore";
 import router from "@/router";
 export  function getMenu(){
+    debugger
     let userCode = localStorage.getItem("xyxx_usercode")
     let username = localStorage.getItem("xyxx_username")
     let store = useRootStore();
@@ -124,6 +125,9 @@ export  function getMenu(){
                 "name":"系统管理"
             },
         ]
+        store.isManager = true;
+    }else{
+        store.isManager = false;
     }
     if(userCode == "529" && username=="youke"){
         store.leftMenuList = [
@@ -158,4 +162,250 @@ export  function getMenu(){
         router.push('/main/data-imputation-push');
         store.defaultActive = 'data-imputation-push数据归集推送'
     }
+
+    if(userCode == "1"){
+        store.leftMenuList = [
+            {
+                "children":[
+                    {
+                        "path":"policy-regulation-information",
+                        "name":"政策法规信息"
+                    },
+                    {
+                        "path":"memorandum-manage",
+                        "name":"备忘录管理"
+                    }
+                ],
+                "O_LCON":"iconfont icon-wenjianguanli iconColor",
+                "path":"/",
+                "name":"政策法规管理"
+            },
+            {
+                "children":[
+                    {
+                        "path":"city-credit-information-platform-search",
+                        "name":"市信用信息平台查询"
+                    },
+                    {
+                        "children":[
+                            {
+                                "path":"relative-person-search",
+                                "name":"按相对人查询"
+                            },
+                            {
+                                "path":"matter-search",
+                                "name":"按事项查询"
+                            }
+                        ],
+                        "path":"/66",
+                        "name":"委信用信息库查询"
+                    },
+                    {
+                        "path":"commission-three-inventory-information-manage",
+                        "name":"委三清单信息管理"
+                    },
+                    {
+                        "path":"commission-credit-information-manage",
+                        "name":"委信用信息管理"
+                    }
+                ],
+                "O_LCON":"iconfont icon-xinyong iconColor",
+                "path":"/99",
+                "name":"信用信息"
+            },
+            {
+                "children":[
+                    {
+                        "path":"memorandum-manage",
+                        "name":"备忘录管理"
+                    },
+                    {
+                        "path":"rewards-and-punishments-measure-manage",
+                        "name":"奖惩措施管理"
+                    },
+                    {
+                        "path":"combined-reward-and-punishments-measure-manage",
+                        "name":"联合奖惩案例信息"
+                    },
+                ],
+                "O_LCON":"iconfont icon-medal iconColor",
+                "path":"/15",
+                "name":"联合奖惩"
+            },
+            {
+                "children":[
+                    {
+                        "path":"data-imputation-push",
+                        "name":"数据归集推送"
+                    },
+                    {
+                        "path":"apply-information",
+                        "name":"应用情况"
+                    },
+                    {
+                        "path":"credit-repair",
+                        "name":"信用修复"
+                    },
+                    {
+                        "path":"combined-rewards-and-punishments",
+                        "name":"联合奖惩"
+                    },
+                    {
+                        "path":"data-log",
+                        "name":"数据日志"
+                    },
+                ],
+                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
+                "path":"/21",
+                "name":"信用数据"
+            },
+            {
+                "children":[
+                    {
+                        "path":"user-manage",
+                        "name":"用户管理"
+                    },
+                    {
+                        "path":"unit-manage",
+                        "name":"单位管理"
+                    },
+                    {
+                        "path":"user-log",
+                        "name":"用户日志"
+                    },
+                    {
+                        "path":"system-explain",
+                        "name":"系统说明"
+                    },
+                ],
+                "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
+                "path":"/26",
+                "name":"系统管理"
+            },
+        ]
+    }else if(userCode == "529" && username=="youke"){
+        store.leftMenuList = [
+            {
+                "children":[
+                    {
+                        "path":"data-imputation-push",
+                        "name":"数据归集推送"
+                    }
+                ],
+                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
+                "path":"/21",
+                "name":"信用数据"
+            },
+        ]
+    }else if(username == "sjsj"){
+        store.leftMenuList = [{
+            "children":[
+                {
+                    "path":"user-log",
+                    "name":"用户日志"
+                }
+            ],
+            "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
+            "path":"/26",
+            "name":"系统管理"
+        }]
+    }else{
+        store.leftMenuList = [
+            {
+                "children":[
+                    {
+                        "path":"policy-regulation-information",
+                        "name":"政策法规信息"
+                    },
+                    {
+                        "path":"memorandum-manage",
+                        "name":"备忘录管理"
+                    }
+                ],
+                "O_LCON":"iconfont icon-wenjianguanli iconColor",
+                "path":"/",
+                "name":"政策法规管理"
+            },
+            {
+                "children":[
+                    {
+                        "path":"city-credit-information-platform-search",
+                        "name":"市信用信息平台查询"
+                    },
+                    {
+                        "children":[
+                            {
+                                "path":"relative-person-search",
+                                "name":"按相对人查询"
+                            },
+                            {
+                                "path":"matter-search",
+                                "name":"按事项查询"
+                            }
+                        ],
+                        "path":"/66",
+                        "name":"委信用信息库查询"
+                    },
+                    {
+                        "path":"commission-three-inventory-information-manage",
+                        "name":"委三清单信息管理"
+                    },
+                    {
+                        "path":"commission-credit-information-manage",
+                        "name":"委信用信息管理"
+                    }
+                ],
+                "O_LCON":"iconfont icon-xinyong iconColor",
+                "path":"/99",
+                "name":"信用信息"
+            },
+            {
+                "children":[
+                    {
+                        "path":"memorandum-manage",
+                        "name":"备忘录管理"
+                    },
+                    {
+                        "path":"rewards-and-punishments-measure-manage",
+                        "name":"奖惩措施管理"
+                    },
+                    {
+                        "path":"combined-reward-and-punishments-measure-manage",
+                        "name":"联合奖惩案例信息"
+                    },
+                ],
+                "O_LCON":"iconfont icon-medal iconColor",
+                "path":"/15",
+                "name":"联合奖惩"
+            },
+            {
+                "children":[
+                    {
+                        "path":"data-imputation-push",
+                        "name":"数据归集推送"
+                    },
+                    {
+                        "path":"apply-information",
+                        "name":"应用情况"
+                    },
+                    {
+                        "path":"credit-repair",
+                        "name":"信用修复"
+                    },
+                    {
+                        "path":"combined-rewards-and-punishments",
+                        "name":"联合奖惩"
+                    },
+                    {
+                        "path":"data-log",
+                        "name":"数据日志"
+                    },
+                ],
+                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
+                "path":"/21",
+                "name":"信用数据"
+            }
+        ]
+    }
+
 }

File diff suppressed because it is too large
+ 89 - 67
src/views/main/c-views/credit-data/data-imputation-push/MatterImputationStaticsSituationReportSettingDialog.vue


+ 6 - 5
src/views/main/c-views/policy-and-regulation-manage/policy-regulation-information/PolicyRegulationInformation.vue

@@ -7,13 +7,13 @@
        span:3
      }
    }" :table-header="policyRegulationInformationHeader" :get-table-list="getTableData" :filter-form="policyRegulationInformation">
-      <template #plusBtn>
-        <el-button  type="primary" :icon="Plus" @click="openDialog('add')">新增</el-button>-->
+      <template v-if="store.isManager" #plusBtn>
+        <el-button   type="primary" :icon="Plus" @click="openDialog('add')">新增</el-button>-->
       </template>
       <template #operation="{data}">
         <el-button  type="info" @click="openDialog('detail',data)">查看</el-button>
-        <el-button  type="info" @click="openDialog('edit',data)">修改</el-button>
-        <el-button  type="info" @click="deleteObj(data)">删除</el-button>
+        <el-button v-if="store.isManager"  type="info" @click="openDialog('edit',data)">修改</el-button>
+        <el-button v-if="store.isManager"  type="info" @click="deleteObj(data)">删除</el-button>
       </template>
     </common-layout>
 
@@ -87,7 +87,8 @@ export default {
       layoutRef,
       isEditDialogShow,
       dialogOperationType,
-      currentDialogOpObj
+      currentDialogOpObj,
+      store
     }
 
   }