zhiyuan007 1 year ago
parent
commit
69004eaba9

+ 4 - 1
src/components/common/InifinityElMenu.vue

@@ -5,7 +5,7 @@
       active-text-color="#36639E"
       router
       class="my-menu"
-
+      :default-active="defaultMenu"
       unique-opened
 
   >
@@ -21,6 +21,9 @@ export default {
   name: "InfinityElMenu",
   components: {MenuI},
   props:{
+   defaultMenu:{
+
+   },
     menuList:{
 
     }

+ 1 - 0
src/pinia/useStore.js

@@ -123,6 +123,7 @@ export const useRootStore = defineStore('root',{
                     "name":"系统管理"
                 },
             ],
+            defaultActive:"",
             toHomeCounter:0,
         }
     },

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

@@ -0,0 +1,161 @@
+import {useRootStore} from "@/pinia/useStore";
+import router from "@/router";
+export  function getMenu(){
+    let userCode = localStorage.getItem("xyxx_usercode")
+    let username = localStorage.getItem("xyxx_username")
+    let store = useRootStore();
+    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":"系统管理"
+            },
+        ]
+    }
+    if(userCode == "529" && username=="youke"){
+        store.leftMenuList = [
+            {
+                "children":[
+                    {
+                        "path":"data-imputation-push",
+                        "name":"数据归集推送"
+                    }
+                ],
+                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
+                "path":"/21",
+                "name":"信用数据"
+            },
+        ]
+    }
+    if(username == "sjsj"){
+        store.leftMenuList = [{
+            "children":[
+                {
+                    "path":"user-log",
+                    "name":"用户日志"
+                }
+            ],
+            "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
+            "path":"/26",
+            "name":"系统管理"
+        }]
+        router.push('/main/user-log');
+        store.defaultActive = 'user-log用户日志'
+    }else{
+        router.push('/main/data-imputation-push');
+        store.defaultActive = 'data-imputation-push数据归集推送'
+    }
+}

+ 7 - 2
src/views/main/c-cpns/MyMenu.vue

@@ -1,12 +1,13 @@
 <template>
-  <infinity-el-menu :menu-list="store.leftMenuList"/>
+  <infinity-el-menu :default-menu="store.defaultActive" :menu-list="store.leftMenuList"/>
 </template>
 
 <script>
-import {computed, ref} from "vue";
+import {computed, onBeforeMount, ref} from "vue";
 import {useRootStore} from "@/pinia/useStore";
 import {useRoute} from "vue-router";
 import InfinityElMenu from "@/components/common/InifinityElMenu.vue";
+import {getMenu} from "@/units/use-method/power-control";
 
 export default {
   name: "MyMenu",
@@ -21,6 +22,10 @@ export default {
     function homeCountAdd() {
       store.toHomeCounter++
     }
+    onBeforeMount(()=>{
+      debugger
+      getMenu();
+    })
     return {
       store,
       homeCountAdd,

+ 5 - 5
src/views/main/c-views/policy-and-regulation-manage/memorandum-manage/MemorandumManage.vue

@@ -18,7 +18,7 @@
     </common-layout>
 
     <template v-if="isEditDialogShow">
-      <memorandum-manage-setting-dialog  :dialog-operation-type="dialogOperationType" :current-dialog-obj="currentDialogOpObj" v-model:dialog-visible="isEditDialogShow"/>
+      <memorandum-manage-setting-dialog @getTableData="getTableData" :dialog-operation-type="dialogOperationType" :current-dialog-obj="currentDialogOpObj" v-model:dialog-visible="isEditDialogShow"/>
     </template>
   </div>
 </template>
@@ -33,10 +33,10 @@ import {Plus, Search} from "@element-plus/icons-vue"
 import {useDetailOrEdit} from "@/units/use-method/usePagination";
 import MemorandumManageSettingDialog
   from "@/views/main/c-views/policy-and-regulation-manage/memorandum-manage/MemorandumManageSettingDialog.vue";
-import {proSelectXyxxBwl} from "@/service/policy-and-regulation-manage/memorandum-manage/memorandum-manage";
 import {
-  proDeleteXyxxFlag
-} from "@/service/policy-and-regulation-manage/policy-regulation-information/policy-regulation-information";
+  proDeleteXyxxBwl,
+  proSelectXyxxBwl
+} from "@/service/policy-and-regulation-manage/memorandum-manage/memorandum-manage";
 import {handleMes} from "@/units/element-ui/tip";
 export default {
   name: "MemorandumManage",
@@ -69,7 +69,7 @@ export default {
       changeOperation(type,data)
     }
     function deleteObj(data){
-      proDeleteXyxxFlag({
+      proDeleteXyxxBwl({
         CODE:data.CODE
       }).then(res =>{
         handleMes(res,() => {

+ 47 - 2
src/views/main/c-views/policy-and-regulation-manage/memorandum-manage/MemorandumManageSettingDialog.vue

@@ -36,6 +36,12 @@ import {Close, Delete, Edit, Plus, SuccessFilled} from "@element-plus/icons-vue"
 import DiyElForm from "@/components/common/DiyElForm.vue";
 import {computed, onBeforeMount, ref} from "vue";
 import {MemorandumManageForm} from "@/data/all-form";
+import {elAlert, handleMes} from "@/units/element-ui/tip";
+import axios from "axios";
+import {
+  proInsertXyxxBwl,
+  proUpdateXyxxBwl
+} from "@/service/policy-and-regulation-manage/memorandum-manage/memorandum-manage";
 export default {
   name: "MemorandumManageSettingDialog",
   components:{DiyElForm},
@@ -77,6 +83,7 @@ export default {
       form.value = {
         ...props.currentDialogObj
       }
+      form.value.slt = props.currentDialogObj.NAME;
     })
     function onChange(files){
       debugger
@@ -88,7 +95,7 @@ export default {
       formDialogRef.value.refEl.validate(isValid => {
         if (isValid){
           debugger
-          if(!form.value.UUID){
+          if(!props.currentDialogObj.CODE){
             let month = new Date().getMonth() + 1 < 10 ? "0" + (new Date().getMonth() + 1) : new Date().getMonth() + 1;
             let strDate = new Date().getDate() < 10 ? "0" + new Date().getDate() : new Date().getDate();
             let time4 = new Date().getFullYear() + "-" + month + "-" + strDate;
@@ -98,11 +105,49 @@ export default {
             let formData = new FormData();
             formData.append("file",file.value.raw);
             formData.append("fileName",fileName + suffixName);
-            formData.append("type",form.value.TYPE)
+            formData.append("type","bwl")
+            axios.post('http://localhost:8081/upload/xypt',formData,{'Content-type':'multipart/form-data'}).then(res =>{
+              console.log(res);
+              if(res.data[0].success=='true'){
+                insertBwl(fileName,suffixName)
+              }else{
+                elAlert("文件上传失败")
+              }
+            })
+          }else{
+            updateBwl()
           }
         }
       })
     }
+    function insertBwl(fileName,suffixName){
+      proInsertXyxxBwl({
+        wenhao: form.value.WENHAO,
+        name: form.value.NAME,
+        username: localStorage.getItem("xyxx_username"),
+        suffixName: suffixName,
+        fileName: fileName,
+      }).then(res =>{
+        handleMes(res,() => {
+          emit('getTableData');
+          handleClose()
+        })
+      })
+    }
+    function updateBwl(){
+      proUpdateXyxxBwl({
+        code:props.currentDialogObj.CODE,
+        wenhao: form.value.WENHAO,
+        name: form.value.NAME,
+        suffixName: "",
+        fileName: "",
+      }).then(res =>{
+        handleMes(res,() => {
+          emit('getTableData');
+          handleClose()
+        })
+      })
+    }
     function handleClose(){
       emit('update:dialogVisible',false);
     }