Forráskód Böngészése

修改页面-中康养回馈

lishuangjiang@potevio.com 1 éve
szülő
commit
c717ac89cc
23 módosított fájl, 531 hozzáadás és 156 törlés
  1. 2 2
      sso-ui/sso-ui-admin-vue3/index.html
  2. 4 4
      sso-ui/sso-ui-admin-vue3/package.json
  3. 120 42
      sso-ui/sso-ui-admin-vue3/src/App.vue
  4. 6 0
      sso-ui/sso-ui-admin-vue3/src/api/system/dept/index.ts
  5. BIN
      sso-ui/sso-ui-admin-vue3/src/assets/imgs/main/logo.png
  6. BIN
      sso-ui/sso-ui-admin-vue3/src/assets/imgs/main/logout.png
  7. BIN
      sso-ui/sso-ui-admin-vue3/src/assets/imgs/main/manager.png
  8. 1 1
      sso-ui/sso-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue
  9. 1 1
      sso-ui/sso-ui-admin-vue3/src/components/bpmnProcessDesigner/package/utils.ts
  10. 5 0
      sso-ui/sso-ui-admin-vue3/src/components/common/ScaleContainer/index.vue
  11. 3 2
      sso-ui/sso-ui-admin-vue3/src/hooks/web/useCache.ts
  12. 1 1
      sso-ui/sso-ui-admin-vue3/src/layout/components/Footer/src/Footer.vue
  13. 1 0
      sso-ui/sso-ui-admin-vue3/src/locales/zh-CN.ts
  14. 4 1
      sso-ui/sso-ui-admin-vue3/src/main.ts
  15. 105 29
      sso-ui/sso-ui-admin-vue3/src/permission.ts
  16. 124 26
      sso-ui/sso-ui-admin-vue3/src/views/Home/index3.vue
  17. 35 1
      sso-ui/sso-ui-admin-vue3/src/views/Login/Login3.vue
  18. 15 9
      sso-ui/sso-ui-admin-vue3/src/views/Login/components/LoginForm.vue
  19. 4 4
      sso-ui/sso-ui-admin-vue3/src/views/Profile/components/ResetPwd.vue
  20. 8 1
      sso-ui/sso-ui-admin-vue3/src/views/system/dept/DeptForm.vue
  21. 26 1
      sso-ui/sso-ui-admin-vue3/src/views/system/dept/index.vue
  22. 48 11
      sso-ui/sso-ui-admin-vue3/src/views/system/user/UserForm.vue
  23. 18 20
      sso-ui/sso-ui-admin-vue3/src/views/system/user/index.vue

+ 2 - 2
sso-ui/sso-ui-admin-vue3/index.html

@@ -10,11 +10,11 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <meta
       name="keywords"
-      content="统一门户系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台管理系统!"
+      content="统一门户系统"
     />
     <meta
       name="description"
-      content="统一门户系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台管理系统!"
+      content="统一门户系统"
     />
     <title>%VITE_APP_TITLE%</title>
   </head>

+ 4 - 4
sso-ui/sso-ui-admin-vue3/package.json

@@ -9,11 +9,11 @@
     "dev": "vite",
     "dev-server": "vite --mode dev",
     "ts:check": "vue-tsc --noEmit",
-    "build:local": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build",
-    "build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev",
-    "build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test",
+    "build:local": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev --base=/sso/",
+    "build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev --base=/sso/",
+    "build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test --base=/sso/",
     "build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage",
-    "build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",
+    "build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod --base=/sso/",
     "serve:dev": "vite preview --mode dev",
     "serve:prod": "vite preview --mode prod",
     "preview": "pnpm build:local && vite preview",

+ 120 - 42
sso-ui/sso-ui-admin-vue3/src/App.vue

@@ -1,57 +1,135 @@
 <script lang="ts" setup>
-import { isDark } from '@/utils/is'
-import { useAppStore } from '@/store/modules/app'
-import { useDesign } from '@/hooks/web/useDesign'
-import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
-import routerSearch from '@/components/RouterSearch/index.vue'
-
-defineOptions({ name: 'APP' })
-
-const { getPrefixCls } = useDesign()
-const prefixCls = getPrefixCls('app')
-const appStore = useAppStore()
-const currentSize = computed(() => appStore.getCurrentSize)
-const greyMode = computed(() => appStore.getGreyMode)
-const { wsCache } = useCache()
-
-// 根据浏览器当前主题设置系统主题色
-const setDefaultTheme = () => {
-  let isDarkTheme = wsCache.get(CACHE_KEY.IS_DARK)
-  if (isDarkTheme === null) {
-    isDarkTheme = isDark()
+  import {isDark} from '@/utils/is'
+  import {useAppStore} from '@/store/modules/app'
+  import {useDesign} from '@/hooks/web/useDesign'
+  import {CACHE_KEY, useCache} from '@/hooks/web/useCache'
+  import routerSearch from '@/components/RouterSearch/index.vue'
+  import {removeToken} from '@/utils/auth'
+  import {deleteUserCache} from "@/hooks/web/useCache";
+  import { ElMessage, ElMessageBox } from 'element-plus'
+  defineOptions({name: 'APP'})
+
+  const {getPrefixCls} = useDesign()
+  const prefixCls = getPrefixCls('app')
+  const appStore = useAppStore()
+  const currentSize = computed(() => appStore.getCurrentSize)
+  const greyMode = computed(() => appStore.getGreyMode)
+  const {wsCache} = useCache()
+  import {onMounted, onUnmounted} from 'vue'
+  import { getCurrentInstance, onBeforeMount, type ComponentInternalInstance } from 'vue';
+  const currentInstance= getCurrentInstance() as ComponentInternalInstance;
+  const globalProperties = currentInstance?.appContext.config.globalProperties
+  const openWindows = globalProperties.$globalWindows;
+  // 根据浏览器当前主题设置系统主题色
+  const setDefaultTheme = () => {
+    let isDarkTheme = wsCache.get(CACHE_KEY.IS_DARK)
+    if (isDarkTheme === null) {
+      isDarkTheme = isDark()
+    }
+    appStore.setIsDark(isDarkTheme)
+  }
+  setDefaultTheme()
+
+
+  let _beforeUnload_time = '';
+  let _gap_time = '';
+
+
+  let beforeunloadHandler = (event) => {
+    openWindows.forEach(
+      (item) =>{
+        if (item && item.win && !item.win.closed){
+          item.win.close()
+        }
+      }
+    )
+    // _beforeUnload_time = new Date().getTime();
+    // event.preventDefault();
+    // ElMessageBox.confirm('确认移除该属性吗?', '提示', {
+    //   confirmButtonText: '确 认',
+    //   cancelButtonText: '取 消'
+    // })
+    //   .then(() => {
+    //     openWindows.forEach(
+    //       (item) =>{
+    //         if (item && item.win && !item.win.closed){
+    //           item.win.close()
+    //         }
+    //       }
+    //     )
+    //   })
+    //   .catch(() => console.info('操作取消'))
+
+
+    // event.preventDefault();
+    // event.returnValue = "确认要退出吗?";
+  };
+  let unloadHandler = (event) => {
+    // _gap_time = new Date().getTime() - _beforeUnload_time;
+    // event.preventDefault();
+    // event.returnValue = "确认要退出吗?";
+    // openWindows.forEach(
+    //   (item) =>{
+    //     if (item && item.win && !item.win.closed){
+    //       item.win.close()
+    //     }
+    //   }
+    // )
+    //判断是窗口关闭还是刷新
+    // if (_gap_time <= 5) {
+    //   event.preventDefault();
+    //   event.returnValue = "确认要退出吗?";
+    // }
   }
-  appStore.setIsDark(isDarkTheme)
-}
-setDefaultTheme()
+
+
+
+  onMounted(() => {
+    window.addEventListener("beforeunload",beforeunloadHandler);
+    // window.addEventListener("unload", (e) => unloadHandler(e));
+
+  })
+
+  onUnmounted(() => {
+
+    window.removeEventListener("beforeunload", beforeunloadHandler);
+    // window.removeEventListener("unload", (e) => unloadHandler(e));
+  })
 </script>
 <template>
   <ConfigGlobal :size="currentSize">
-    <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
-    <routerSearch />
+    <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''"/>
+    <routerSearch/>
   </ConfigGlobal>
 </template>
 <style lang="scss">
-$prefix-cls: #{$namespace}-app;
+  $prefix-cls: #{$namespace}-app;
+
+  .size {
+    width: 100%;
+    height: 100%;
+  }
 
-.size {
-  width: 100%;
-  height: 100%;
-}
+  html,
+  body {
+    @extend .size;
 
-html,
-body {
-  @extend .size;
+    padding: 0 !important;
+    margin: 0;
+    overflow: hidden;
+    scrollbar-width: none;
+    scrollbar-color: transparent transparent;
 
-  padding: 0 !important;
-  margin: 0;
-  overflow: hidden;
+    #app {
+      @extend .size;
+    }
+  }
 
-  #app {
-    @extend .size;
+  body::-webkit-scrollbar {
+    display: none;
   }
-}
 
-.#{$prefix-cls}-grey-mode {
-  filter: grayscale(100%);
-}
+  .#{$prefix-cls}-grey-mode {
+    filter: grayscale(100%);
+  }
 </style>

+ 6 - 0
sso-ui/sso-ui-admin-vue3/src/api/system/dept/index.ts

@@ -61,3 +61,9 @@ export const updateDeptStatus = (id: number | undefined, status: number) => {
   return request.put({ url: '/system/dept/update-status', data: data })
 }
 
+// 导出机构
+export const exportPost = async (params) => {
+  return await request.download({ url: '/system/dept/export', params })
+}
+
+

BIN
sso-ui/sso-ui-admin-vue3/src/assets/imgs/main/logo.png


BIN
sso-ui/sso-ui-admin-vue3/src/assets/imgs/main/logout.png


BIN
sso-ui/sso-ui-admin-vue3/src/assets/imgs/main/manager.png


+ 1 - 1
sso-ui/sso-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue

@@ -370,7 +370,7 @@ const removeListenerField = (index) => {
 }
 // 移除监听器
 const removeListener = (index) => {
-  debugger
+  // debugger
   ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
     confirmButtonText: '确 认',
     cancelButtonText: '取 消'

+ 1 - 1
sso-ui/sso-ui-admin-vue3/src/components/bpmnProcessDesigner/package/utils.ts

@@ -2,7 +2,7 @@ import { toRaw } from 'vue'
 const bpmnInstances = () => (window as any)?.bpmnInstances
 // 创建监听器实例
 export function createListenerObject(options, isTask, prefix) {
-  debugger
+  // debugger
   const listenerObj = Object.create(null)
   listenerObj.event = options.event
   isTask && (listenerObj.id = options.id) // 任务监听器特有的 id 字段

+ 5 - 0
sso-ui/sso-ui-admin-vue3/src/components/common/ScaleContainer/index.vue

@@ -97,6 +97,8 @@ const getScale = () => {
 
   let ww = window.innerWidth / width;
   let wh = window.innerHeight / height;
+  console.log("ww ****************",ww)
+  console.log("wh ****************",wh)
 
   if (scrollX.value) {
     return wh;
@@ -112,6 +114,7 @@ const setScale = debounce(() => {
 
   const { width, height, scrollPosition, scroll } = props;
 
+
   scaleBox.value.style.setProperty("--scale", scale.value);
   scaleBox.value.style.setProperty("--height", `${height}px`);
   scaleBox.value.style.setProperty("--width", `${width}px`);
@@ -150,6 +153,8 @@ provide("getPageScale", scale);
 
 <style lang="scss" scoped>
 .scale-container {
+  background-image: url("/src/assets/imgs/main/bg2.png");
+  background-size: 100% 100%;
   position: fixed;
   top: 0;
   bottom: 0;

+ 3 - 2
sso-ui/sso-ui-admin-vue3/src/hooks/web/useCache.ts

@@ -18,10 +18,11 @@ export const CACHE_KEY = {
   DICT_CACHE: 'dictCache',
   // 登录表单
   LoginForm: 'loginForm',
-  TenantId: 'tenantId'
+  TenantId: 'tenantId',
+  LAST_ACTIVE_TIME: 'lastActiveTime',
 }
 
-export const useCache = (type: CacheType = 'localStorage') => {
+export const useCache = (type: CacheType = 'sessionStorage') => {
   const wsCache: WebStorageCache = new WebStorageCache({
     storage: type
   })

+ 1 - 1
sso-ui/sso-ui-admin-vue3/src/layout/components/Footer/src/Footer.vue

@@ -19,6 +19,6 @@ const title = computed(() => appStore.getTitle)
     :class="prefixCls"
     class="h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)]"
   >
-    <span class="text-14px">Copyright ©2024 中康{{ title }}</span>
+    <span class="text-14px">Copyright ©2024 中康{{ title }}</span>
   </div>
 </template>

+ 1 - 0
sso-ui/sso-ui-admin-vue3/src/locales/zh-CN.ts

@@ -124,6 +124,7 @@ export default {
     login: '登录',
     relogin: '重新登录',
     otherLogin: '其他登录方式',
+    otherLink: '其他链接',
     register: '注册',
     checkPassword: '确认密码',
     remember: '记住我',

+ 4 - 1
sso-ui/sso-ui-admin-vue3/src/main.ts

@@ -45,6 +45,9 @@ import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐
 // import * as ElementPlusIconsVue from '@element-plus/icons-vue'
 
 
+// 定义全局变量
+const globalWindows = []
+
 // 创建实例
 const setupAll = async () => {
   const app = createApp(App)
@@ -71,7 +74,7 @@ const setupAll = async () => {
   await router.isReady()
 
   app.use(VueDOMPurifyHTML)
-
+  app.config.globalProperties.$globalWindows = globalWindows;
   app.mount('#app')
 }
 

+ 105 - 29
sso-ui/sso-ui-admin-vue3/src/permission.ts

@@ -1,17 +1,31 @@
 import router from './router'
 import type { RouteRecordRaw } from 'vue-router'
 import { isRelogin } from '@/config/axios/service'
-import { getAccessToken } from '@/utils/auth'
+import { getAccessToken,removeToken } from '@/utils/auth'
 import { useTitle } from '@/hooks/web/useTitle'
 import { useNProgress } from '@/hooks/web/useNProgress'
 import { usePageLoading } from '@/hooks/web/usePageLoading'
 import { useDictStoreWithOut } from '@/store/modules/dict'
-import { useUserStoreWithOut } from '@/store/modules/user'
+import { useUserStoreWithOut,useUserStore } from '@/store/modules/user'
 import { usePermissionStoreWithOut } from '@/store/modules/permission'
+import {SocialUserVO} from "@/api/system/social/user";
+import {Local, Session} from "@/store";
+import {useCache,CACHE_KEY,deleteUserCache} from "@/hooks/web/useCache";
+import { useTagsViewStore } from '@/store/modules/tagsView'
 
 const { start, done } = useNProgress()
 
 const { loadStart, loadDone } = usePageLoading()
+const { wsCache } = useCache()
+const userStore = useUserStore()
+const tagsViewStore = useTagsViewStore()
+
+// 设置用户最后操作时间
+// let lastTimeUserOperate = new Date().getTime();
+
+// 设置用户长时间不操作则退出系统的时间阈值,单位毫秒
+const IDLE_TIME = 3 * 60 * 1000; // 这里设置为30分钟
+const timeOut = 60 * 60 * 1000; //设置超时时间: 15分
 
 const parseURL = (
   url: string | null | undefined
@@ -62,45 +76,107 @@ router.beforeEach(async (to, from, next) => {
   loadStart()
   if (getAccessToken()) {
     if (to.path === '/login') {
-      next({ path: '/' })
-    } else {
-      // 获取所有字典
-      const dictStore = useDictStoreWithOut()
-      const userStore = useUserStoreWithOut()
-      const permissionStore = usePermissionStoreWithOut()
-      if (!dictStore.getIsSetDict) {
-        await dictStore.setDictMap()
-      }
-      if (!userStore.getIsSetUser) {
-        isRelogin.show = true
-        await userStore.setUserInfoAction()
-        isRelogin.show = false
-        // 后端过滤菜单
-        await permissionStore.generateRoutes()
-        permissionStore.getAddRouters.forEach((route) => {
-          router.addRoute(route as unknown as RouteRecordRaw) // 动态添加可访问路由表
-        })
-        const redirectPath = from.query.redirect || to.path
-        // 修复跳转时不带参数的问题
-        const redirect = decodeURIComponent(redirectPath as string)
-        const { basePath, paramsObject: query } = parseURL(redirect)
-        const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect, query }
-        next(nextData)
-      } else {
-        next()
+      if(to.query.logout ){
+        window.opener.postMessage(to.query.logout, '*');
+      }else{
+        next({ path: '/' })
       }
+    } else {
+        // 获取所有字典
+        const dictStore = useDictStoreWithOut()
+        const userStore = useUserStoreWithOut()
+        const permissionStore = usePermissionStoreWithOut()
+        if (!dictStore.getIsSetDict) {
+          await dictStore.setDictMap()
+        }
+        if (!userStore.getIsSetUser) {
+          isRelogin.show = true
+          await userStore.setUserInfoAction()
+          isRelogin.show = false
+          // 后端过滤菜单
+          await permissionStore.generateRoutes()
+          permissionStore.getAddRouters.forEach((route) => {
+            router.addRoute(route as unknown as RouteRecordRaw) // 动态添加可访问路由表
+          })
+          if (to.path === '/sso') {
+            next()
+          }else{
+            const redirectPath = from.query.redirect || to.path
+            // 修复跳转时不带参数的问题
+            const redirect = decodeURIComponent(redirectPath as string)
+            const { basePath, paramsObject: query } = parseURL(redirect)
+            const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect, query }
+            next(nextData)
+          }
+        } else {
+          next()
+        }
+      // }
     }
   } else {
     if (whiteList.indexOf(to.path) !== -1) {
       next()
     } else {
       next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+
     }
   }
 })
-
+function updateActiveTime() {
+  const newTime =  new Date().getTime()
+  console.log("updateActiveTime#####################"+newTime)
+  wsCache.set(CACHE_KEY.LAST_ACTIVE_TIME,newTime + '')
+}
+window.onload = function () {
+  window.document.onmousedown = updateActiveTime;
+};
+function clearInterval(checkActiveInterval) {
+  wsCache.delete(CACHE_KEY.LAST_ACTIVE_TIME)
+}
+let checkActiveInterval: any = null
+const startActiveCheck = () => {
+  if(checkActiveInterval==null){
+    const existActiveTime = wsCache.get(CACHE_KEY.LAST_ACTIVE_TIME);
+    console.log("startActiveCheck checkActiveInterval**************"+existActiveTime)
+    if(existActiveTime){
+      console.log("startActiveCheck clean time **************"+existActiveTime)
+      wsCache.delete(CACHE_KEY.LAST_ACTIVE_TIME)
+    }
+  }
+  if (checkActiveInterval != null) return
+  updateActiveTime();
+  checkActiveInterval = setInterval(() => {
+    const currentTime = new Date().getTime();
+    const lastActiveTime = wsCache.get(CACHE_KEY.LAST_ACTIVE_TIME);
+    console.log("get lastActiveTime#####################"+lastActiveTime)
+    console.log("lastActiveTime#####################"+(currentTime - Number(lastActiveTime)))
+    if (!lastActiveTime){
+      return
+    }
+    if (currentTime - Number(lastActiveTime) > timeOut) {
+      userStore.loginOut()
+      tagsViewStore.delAllViews()
+      deleteUserCache()
+      removeToken()
+      wsCache.delete(CACHE_KEY.LAST_ACTIVE_TIME)
+      checkActiveInterval = null
+      router.push('/login?timeout=true')
+    }
+  }, 30000);
+}
+const endActiveCheck = () => {
+  clearInterval(checkActiveInterval)
+  checkActiveInterval = null
+}
 router.afterEach((to) => {
   useTitle(to?.meta?.title as string)
   done() // 结束Progress
   loadDone()
+  if(to.path=='/login'){
+     endActiveCheck()
+  }else{
+     startActiveCheck()
+  }
 })
+
+

+ 124 - 26
sso-ui/sso-ui-admin-vue3/src/views/Home/index3.vue

@@ -15,37 +15,38 @@
       </div>
       <div class="main">
         <div class="col">
-          <div class="row2" style="background-color: #30CA79;">
+          <div class="row2" :style="backgroudColor('44')">
             <img class="image2" :src="img1"  />
-            <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(44)">社区居家养老管理系统</el-link></div>
+            <div class="text2" @click="handlerLinkDiv('44')"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(44)" :disabled="hasNoClientPri('44')">社区居家养老管理系统</el-link></div>
           </div>
-          <div class="row2" style="background-color: #32B19E;">
+          <div class="row2" :style="backgroudColor('43')">
             <img class="image2" :src="img2"  />
-            <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(43)">智慧养老IOT物联网平台</el-link></div>
+            <div class="text2" @click="handlerLinkDiv('43')"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(43)" :disabled="hasNoClientPri('43')">智慧养老物联网系统</el-link></div>
             <!--            <div class="text2"><a class="aaa" href="http://web.poteviohealth.com/boss/" target="_blank">智慧养老IOT物联网平台</a></div>-->
           </div>
         </div>
-        <div class="col col3" style="background-color: #00734D;">
-          <div class="text0"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(45)">康养大数据平台</el-link></div>
+        <div class="col col3" :style="backgroudColor('45')">
+          <div class="text0" @click="handlerLinkDiv('45')"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(45)" :disabled="hasNoClientPri('45')">数据可视化系统</el-link></div>
         </div>
         <div class="col">
-          <div class="row2" style="background-color: #4C4B6B;">
+          <div class="row2" style="background-color: #c9d6df;">
             <img class="image2" :src="img5"  />
-            <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(50)">机构养老运营管理系统</el-link></div>
+<!--            <div class="text2" @click="handlerLinkDiv('50')"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(50)"  :disabled="hasNoClientPri('45')">机构养老运营管理系统</el-link></div>-->
+            <div class="text2">机构养老运营管理系统</div>
           </div>
-          <div class="row2" style="background-color: #4A8EE2;">
+          <div class="row2" :style="backgroudColor('49')">
             <img class="image2" :src="img6"  />
-            <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(49)">旅居养老运营管理系统</el-link></div>
+            <div class="text2" @click="handlerLinkDiv('49')"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(49)"  :disabled="hasNoClientPri('49')">旅居养老运营管理系统</el-link></div>
           </div>
         </div>
         <div class="col">
-          <div class="row2" style="background-color: #F3B144;">
-            <img class="image2" :src="img7" />
-            <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(46)">运营数据分析平台</el-link></div>
+          <div class="row2" :style="backgroudColor('46')">
+            <img class="img_gray" :src="img7" />
+            <div class="text2" @click="handlerLinkDiv('46')"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(46)" :disabled="hasNoClientPri('46')">运营数据分析系统</el-link></div>
           </div>
-          <div class="row2" style="background-color: #AACC05;">
+          <div class="row2" :style="backgroudColor('100')">
             <img class="image2" :src="img8"  />
-            <div class="text2">建设中</div>
+            <div class="text2">技术开发集成系统</div>
           </div>
         </div>
       </div>
@@ -78,6 +79,7 @@ import {useUserStore} from '@/store/modules/user'
 import {useTagsViewStore} from '@/store/modules/tagsView'
 import {CACHE_KEY, useCache, deleteUserCache} from '@/hooks/web/useCache'
 import { resetRouter } from '@/router'
+import { hasClient } from '@/directives/permission/hasClient'
 
 import * as UserApi from '@/api/system/user'
 import img1 from '@/assets/imgs/main/icon1.png';
@@ -89,17 +91,25 @@ import img7 from '@/assets/imgs/main/icon7.png';
 import img8 from '@/assets/imgs/main/icon8.png';
 import logouticon from '@/assets/imgs/main/logout.png'
 import manager from '@/assets/imgs/main/manager.png'
+import bg from '@/assets/imgs/main/bg2.png'
 import password from '@/assets/imgs/main/password.png'
 import * as authUtil from '@/utils/auth'
 import {InputPassword} from '@/components/InputPassword'
 import {updateUserPassword} from '@/api/system/user/profile'
+import { removeToken } from '@/utils/auth'
 
-
+const { proxy } = getCurrentInstance()
 const message = useMessage()
 
+//
+import { getCurrentInstance, onBeforeMount, type ComponentInternalInstance } from 'vue';
+const currentInstance= getCurrentInstance() as ComponentInternalInstance;
+const globalProperties = currentInstance?.appContext.config.globalProperties
+const openWindows = globalProperties.$globalWindows;
 const userStore = useUserStore()
 const tagsViewStore = useTagsViewStore()
 const {t} = useI18n()
+const route = useRoute();
 //
 const {push, replace} = useRouter()
 
@@ -114,6 +124,31 @@ const passwordModel = reactive({
   confirmPassword: ''
 })
 
+const backgroudColor =(i)=>{
+
+   if(hasNoClientPri(i)){
+     return 'background-color: #c9d6df'
+   }
+   if(i=='44'){
+     return 'background-color: #00A5DA'
+   }
+  if(i=='43'){
+    return 'background-color: #4182EE'
+  }
+  if(i=='45'){
+    return 'background-color: #2270F7'
+  }
+  if(i=='46'){
+    return 'background-color: #FA8854'
+  }
+  if(i=='49'){
+    return 'background-color: #2270F7'
+  }
+  if(i=='100'){
+    return 'background-color: #E7B05E'
+  }
+  }
+
 // 表单校验
 const equalToPassword = (_rule, value, callback) => {
   if (passwordModel.newPassword !== value) {
@@ -125,21 +160,21 @@ const equalToPassword = (_rule, value, callback) => {
 const newPasswordValidate = (rule, value, callback) => {
   if (passwordModel.oldPassword === value) {
     callback(new Error('新密码不能与旧密码一致'))
-  } else if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[._~!@#$^&*])[A-Za-z0-9._~!@#$^&*]{8,20}$/g.test(value)) {
+  } else if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[._~!@#$^&*])[A-Za-z0-9._~!@#$^&*]{6,16}$/g.test(value)) {
     callback()
   } else {
-    callback(new Error('包含英文字母大小写、数字和特殊符号(8-20位)'))
+    callback(new Error('包含英文字母大小写、数字和特殊符号(6-16位)'))
   }
 }
 
 const rules = reactive<FormRules>({
   oldPassword: [
     {required: true, message: t('profile.password.oldPwdMsg'), trigger: 'blur'},
-    {min: 8, max: 20, message: t('profile.password.pwdRules'), trigger: 'blur'}
+    {min: 6, max: 16, message: t('profile.password.pwdRules'), trigger: 'blur'}
   ],
   newPassword: [
     {required: true, message: t('profile.password.newPwdMsg'), trigger: 'blur'},
-    {min: 8, max: 20, message: t('profile.password.pwdRules'), trigger: 'blur'},
+    {min: 6, max: 16, message: t('profile.password.pwdRules'), trigger: 'blur'},
     {required: true, validator: newPasswordValidate, trigger: 'blur'}
   ],
   confirmPassword: [
@@ -148,7 +183,6 @@ const rules = reactive<FormRules>({
   ]
 })
 
-
 const loginOut = async () => {
   try {
     await ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {
@@ -159,10 +193,24 @@ const loginOut = async () => {
     await userStore.loginOut()
     tagsViewStore.delAllViews()
     deleteUserCache() // 清空用户缓存
+    removeToken()
+    closeLinks()
     replace('/login?redirect=/Navicate')
   } catch {
   }
 }
+
+const  closeLinks = () =>{
+  openWindows.forEach(
+    (item) =>{
+      if (item && item.win && !item.win.closed){
+        item.win.close()
+      }
+    }
+  )
+  globalProperties.$globalWindows = []
+
+}
 const toProfile = async () => {
   push('/system/user')
 }
@@ -173,19 +221,38 @@ const resetPassword =  () => {
 
 const handlerLink = async (id) => {
   if (id==50){
-    window.open("http://106.37.165.111:9080/pc/PCLGO001Action_001.action");
+    window.open("https://jgyl.checg.cn/pc/PCLGN001Action_001.action");
   }else{
     try {
       const linkUrl = await UserApi.getLinkInfo(id, authUtil.getAccessToken())
       if (linkUrl != "") {
-        window.open(linkUrl);
+        for (let i = openWindows.length - 1; i >= 0; i--) {
+          if (openWindows[i] && openWindows[i].uid==id){
+            if (!openWindows[i].win.closed){
+              openWindows[i].win.close()
+            }
+                openWindows.splice(i, 1);
+          }
+        }
+       const linkWindow = window.open(linkUrl);
+       const winObj = {};
+       winObj.uid = id;
+       winObj.win = linkWindow;
+       openWindows.push(winObj);
+       console.log("######@@@@@@@@@",openWindows);
       }
     } catch (error) {
       console.log(error);
     }
   }
 }
-const roles = wsCache.get(CACHE_KEY.USER).roles
+
+const handlerLinkDiv = (id) => {
+  if(hasNoClientPri(id)){
+    message.error('无该系统权限,请联系系统管理员申请开通')
+  }
+}
+const roles = wsCache.get(CACHE_KEY.USER)?wsCache.get(CACHE_KEY.USER).roles:[]
 // const checkRoles = (value)=>{
 //   const permissionRoles = value
 //   const roles = wsCache.get(CACHE_KEY.USER).roles
@@ -211,16 +278,33 @@ const reset = (formEl: FormInstance | undefined) => {
   if (!formEl) return
   formEl.resetFields()
 }
+const queryParams = route.query;
+
 /** 初始化 */
+
 onMounted(() => {
+    if (queryParams && queryParams.logout){
+      window.opener.postMessage('close', '*');
+    }
   const loginDadte = authUtil.getLoginDate()
   if(!loginDadte){
     resetPassword()
   }
+  window.addEventListener('message', (event) => {
+    if (event.data == 'guanyuan') {
+      openWindows.forEach(
+        (item) =>{
+          if (item && item.win && !item.win.closed && item.uid==46){
+            item.win.close()
+          }
+        }
+      )
+    }
+  })
 })
 const handleClose = (done) => {
   const loginDadte = authUtil.getLoginDate()
-  debugger
+  // debugger
   if(!loginDadte){
     message.error('首次登录请修改密码!')
     return false
@@ -229,13 +313,18 @@ const handleClose = (done) => {
     done(false)
   }
 }
+
+const hasNoClientPri = (clientIdValue: string) =>{
+  const clientIds = wsCache.get(CACHE_KEY.USER)?wsCache.get(CACHE_KEY.USER).clientIds:[]
+  const all_client = '*'
+  return !(all_client === clientIdValue || clientIds.includes(clientIdValue))
+}
 </script>
 
 
 
 <style scoped lang="scss">
 .screen-container {
-  // background: var(--app-screen-bg-color);
   height: 100%;
 }
 
@@ -316,6 +405,15 @@ const handleClose = (done) => {
 .aaa{
   color: #fff;
 }
+.img_gray {
+  -webkit-filter: grayscale(100%);
+  -moz-filter: grayscale(100%);
+  -ms-filter: grayscale(100%);
+  -o-filter: grayscale(100%);
+  filter: grayscale(100%);
+  filter: gray;
+  margin: 69px 160px 20px 160px;
+}
 
 .screen-content-container {
   padding-top: size(var(--app-screen-header-height));

+ 35 - 1
sso-ui/sso-ui-admin-vue3/src/views/Login/Login3.vue

@@ -64,11 +64,18 @@
 </template>
 <script lang="ts" setup>
   import { underlineToHump } from '@/utils'
+  import { ElNotification } from 'element-plus';
 
   import { useDesign } from '@/hooks/web/useDesign'
   import { useAppStore } from '@/store/modules/app'
   import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
   import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
+  import { removeToken } from '@/utils/auth'
+  import {deleteUserCache} from "@/hooks/web/useCache";
+  import { getCurrentInstance, onBeforeMount, type ComponentInternalInstance } from 'vue';
+  const currentInstance= getCurrentInstance() as ComponentInternalInstance;
+  const globalProperties = currentInstance?.appContext.config.globalProperties
+  const openWindows = globalProperties.$globalWindows;
 
   import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components'
 
@@ -78,6 +85,33 @@
   const appStore = useAppStore()
   const { getPrefixCls } = useDesign()
   const prefixCls = getPrefixCls('login')
+  import { useRoute } from 'vue-router';
+
+  const route = useRoute();
+
+  const elNotification = () => {
+    ElNotification({
+      title: '提示',
+      message: '超时退出',
+      duration: 0,
+      type: 'warning'
+    })
+  }
+  const closeSelf = () => {
+    // window.opener=null;
+    window.opener.postMessage('close', '*');
+  }
+  onMounted(() => {
+    const queryParams = route.query;
+    if (queryParams && queryParams.timeout){
+      elNotification()
+    }
+    if (queryParams && queryParams.logout){
+      closeSelf()
+    }
+    // removeToken()
+    // deleteUserCache()
+  })
 </script>
 
 <style lang="scss" scoped>
@@ -96,7 +130,7 @@
         height: 100%;
         background-image: url('@/assets/svgs/login-bg.svg');
         background-position: center;
-        background-repeat: no-repeat;
+        background-repeat: repeat;
         content: '';
       }
     }

+ 15 - 9
sso-ui/sso-ui-admin-vue3/src/views/Login/components/LoginForm.vue

@@ -109,10 +109,13 @@
           </el-row>
         </el-form-item>
       </el-col>
-<!--      <el-divider content-position="center">{{ t('login.otherLogin') }}</el-divider>-->
-<!--      <el-col :span="24" style="padding-right: 10px; padding-left: 10px">-->
-<!--        <el-form-item>-->
-<!--          <div class="w-[100%] flex justify-between">-->
+      <el-divider content-position="center">{{ t('login.otherLink') }}</el-divider>
+      <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
+        <el-form-item>
+          <div class="w-[100%] flex justify-between">
+<!--            <el-link :underline="false" href="https://jgyl.checg.cn/pc/PCLGN001Action_001.action" target="_blank" > </el-link>-->
+<!--            <el-link :underline="false" href="https://jgyl.checg.cn/pc/PCLGN001Action_001.action" target="_blank"> </el-link>-->
+            <el-link :underline="false" href="https://jgyl.checg.cn/pc/PCLGN001Action_001.action" target="_blank">机构养老运营管理系统</el-link>
 <!--            <Icon-->
 <!--              v-for="(item, key) in socialList"-->
 <!--              :key="key"-->
@@ -122,9 +125,9 @@
 <!--              color="#999"-->
 <!--              @click="doSocialLogin(item.type)"-->
 <!--            />-->
-<!--          </div>-->
-<!--        </el-form-item>-->
-<!--      </el-col>-->
+          </div>
+        </el-form-item>
+      </el-col>
     </el-row>
   </el-form>
 </template>
@@ -236,7 +239,7 @@ const handleLogin = async (params) => {
     }
     loginData.loginForm.captchaVerification = params.captchaVerification
     const res = await LoginApi.login(loginData.loginForm)
-    debugger
+    // debugger
     if (!res) {
       return
     }
@@ -254,9 +257,12 @@ const handleLogin = async (params) => {
     if (!redirect.value) {
       redirect.value = '/Navicate'
     }
+    console.log(window.location.href,"###################",redirect.value)
     // 判断是否为SSO登录
-    if (redirect.value.indexOf('sso') !== -1) {
+    if (redirect.value.indexOf('sso') !== -1 ) {
+      console.log((redirect.value.indexOf('sso') !== -1),"1******************",window.location.href)
       window.location.href = window.location.href.replace('/login?redirect=', '')
+      console.log((redirect.value.indexOf('sso') !== -1),"2******************2",window.location.href)
     } else {
       push({ path: redirect.value || permissionStore.addRouters[0].path })
     }

+ 4 - 4
sso-ui/sso-ui-admin-vue3/src/views/Profile/components/ResetPwd.vue

@@ -43,20 +43,20 @@ const equalToPassword = (_rule, value, callback) => {
 const newPasswordValidate = (rule, value, callback) => {
   if (password.oldPassword === value) {
     callback(new Error('新密码不能与旧密码一致'))
-  } else if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[._~!@#$^&*])[A-Za-z0-9._~!@#$^&*]{8,20}$/g.test(value)) {
+  } else if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[._~!@#$^&*])[A-Za-z0-9._~!@#$^&*]{6,16}$/g.test(value)) {
     callback()
   } else {
-    callback(new Error('请输入包含英文字母大小写、数字和特殊符号的 8-20 位组合'))
+    callback(new Error('请输入包含英文字母大小写、数字和特殊符号的 6-16 位组合'))
   }
 }
 const rules = reactive<FormRules>({
   oldPassword: [
     { required: true, message: t('profile.password.oldPwdMsg'), trigger: 'blur' },
-    { min: 8, max: 20, message: t('profile.password.pwdRules'), trigger: 'blur' }
+    { min: 6, max: 16, message: t('profile.password.pwdRules'), trigger: 'blur' }
   ],
   newPassword: [
     { required: true, message: t('profile.password.newPwdMsg'), trigger: 'blur' },
-    { min: 8, max: 20, message: t('profile.password.pwdRules'), trigger: 'blur' },
+    { min: 6, max: 16, message: t('profile.password.pwdRules'), trigger: 'blur' },
     {required: true, validator: newPasswordValidate, trigger: 'blur'}
   ],
   confirmPassword: [

+ 8 - 1
sso-ui/sso-ui-admin-vue3/src/views/system/dept/DeptForm.vue

@@ -206,7 +206,10 @@ const formRules = reactive<FormRules>({
   phone: [
     { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' }
   ],
-  status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
+  status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
+  brand:  [{ required: true, message: '品牌不能为空', trigger: 'select' }],
+  address: [{ required: true, message: '详细地址不能为空', trigger: 'blur' }],
+  propertypes: [{ required: true, message: '机构性质不能为空', trigger: 'select' }],
 })
 const formRef = ref() // 表单 Ref
 const deptTree = ref() // 树形结构
@@ -352,6 +355,10 @@ const applySystemOptions = [
   {
     value: 3,
     label: '旅居系统-小程序核销端',
+  },
+  {
+    value: 4,
+    label: '社区居家系统',
   }
 ]
 const businessPatternOptions = [

+ 26 - 1
sso-ui/sso-ui-admin-vue3/src/views/system/dept/index.vue

@@ -42,6 +42,16 @@
         >
           <Icon icon="ep:plus" class="mr-5px" /> 新增
         </el-button>
+        <el-button
+          v-hasPermi="['system:dept:export']"
+          :loading="exportLoading"
+          plain
+          type="success"
+          @click="handleExport"
+        >
+          <Icon class="mr-5px" icon="ep:download" />
+          导出
+        </el-button>
         <el-button type="danger" plain @click="toggleExpandAll">
           <Icon icon="ep:sort" class="mr-5px" /> 展开/折叠
         </el-button>
@@ -137,6 +147,7 @@ import * as DeptApi from '@/api/system/dept'
 import DeptForm from './DeptForm.vue'
 import * as UserApi from '@/api/system/user'
 import { CommonStatusEnum } from '@/utils/constants'
+import download from '@/utils/download'
 
 defineOptions({ name: 'SystemDept' })
 
@@ -155,6 +166,7 @@ const queryFormRef = ref() // 搜索的表单
 const isExpandAll = ref(true) // 是否展开,默认全部展开
 const refreshTable = ref(true) // 重新渲染表格状态
 const userList = ref<UserApi.UserVO[]>([]) // 用户列表
+const exportLoading = ref(false) // 导出的加载中
 
 /** 查询部门列表 */
 const getList = async () => {
@@ -221,7 +233,20 @@ const handleStatusChange = async (row: DeptApi.DeptVO) => {
   } catch {
   }
 }
-
+/** 导出按钮操作 */
+const handleExport = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const data = await DeptApi.exportPost(queryParams)
+    download.excel(data, '机构列表.xlsx')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
 /** 初始化 **/
 onMounted(async () => {
   await getList()

+ 48 - 11
sso-ui/sso-ui-admin-vue3/src/views/system/user/UserForm.vue

@@ -17,8 +17,8 @@
       <el-form-item label="身份证" prop="idNumber">
         <el-input v-model="formData.idNumber" placeholder="请输入18位身份证号" @blur="idCardBlur" maxlength="18" />
       </el-form-item>
-      <el-form-item  label="手机号码" prop="mobile" disabled = "formData.id === undefined">
-        <el-input v-model="formData.mobile" maxlength="11" placeholder="请输入手机号码" />
+      <el-form-item  label="手机号码" prop="mobile" >
+        <el-input v-model="formData.mobile" maxlength="11" placeholder="请输入手机号码" :disabled = "formData.id != undefined" />
       </el-form-item>
       <el-form-item label="性别">
         <el-select v-model="formData.sex" placeholder="请选择">
@@ -65,7 +65,7 @@
       <el-form-item v-if="formData.id === undefined" label="密码" prop="password">
         <el-input
           v-model="formData.password"
-          placeholder="请输入包含英文字母大小写、数字和特殊符号的 8-20 位组合"
+          placeholder="请输入包含英文字母大小写、数字和特殊符号的 6-16 位组合"
           show-password
           type="password"
           maxlength="20"
@@ -80,7 +80,7 @@
       </el-form-item>
 <!--      <el-form-item v-if="formData.id === undefined || userId===1" label="关联系统" prop="associatedSystem">-->
       <el-form-item v-if="formData.id === undefined || userId===1" label="关联系统" prop="associatedSystem">
-        <el-select v-model="formData.associatedSystem" multiple  placeholder="请选择关联系统">
+        <el-select v-model="formData.associatedSystem" multiple  placeholder="请选择关联系统" @change="selectChanged">
           <el-option
             v-for="item in clientList"
             :key="item.id"
@@ -89,6 +89,18 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item label="业务角色" prop="businessRole" v-if="formData.id === undefined && ( userId===1 || userDeptId===133) && formData.associatedSystem.includes(44)" >
+        <el-select
+          v-model="formData.businessRole"
+        >
+          <el-option
+            v-for="item in businessRoles"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
     </el-form>
     <template #footer>
       <el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
@@ -114,6 +126,21 @@ defineOptions({ name: 'SystemUserForm' })
 const { t } = useI18n() // 国际化
 const message = useMessage() // 消息弹窗
 const userId = ref(-1)
+const userDeptId = ref(-1)
+const businessRoles = [
+  {
+    value: '0',
+    label: '默认',
+  },
+  {
+    value: '1',
+    label: '居家系统一级供应商',
+  },
+  {
+    value: '2',
+    label: '居家系统区域子公司',
+  }
+]
 
 const clientList = ref([] as ClientApi.OAuth2ClientVO[]) // 岗位列表
 
@@ -127,7 +154,7 @@ const formData = ref({
   idNumber: '',
   birthday: '',
   idNumberUrls: [],
-  associatedSystem: '',
+  associatedSystem: [],
   nickname: '',
   deptId: '',
   mobile: '',
@@ -140,13 +167,14 @@ const formData = ref({
   remark: '',
   status: CommonStatusEnum.ENABLE,
   roleIds: [],
-  roleType: '1'
+  roleType: '1',
+  businessRole: '0'
 })
 const passValidate = (rule, value, callback) => {
-  if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[._~!@#$^&*])[A-Za-z0-9._~!@#$^&*]{8,20}$/g.test(value)) {
+  if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[._~!@#$^&*])[A-Za-z0-9._~!@#$^&*]{6,16}$/g.test(value)) {
     callback()
   } else {
-    callback(new Error('请输入包含英文字母大小写、数字和特殊符号的 8-20 位组合'))
+    callback(new Error('请输入包含英文字母大小写、数字和特殊符号的 6-16 位组合'))
   }
 }
 const formRules = reactive<FormRules>({
@@ -193,6 +221,12 @@ const idCardBlur = () => {
   }
 }
 
+const selectChanged = (value)=>{
+  console.log(value)
+  console.log(formData.value.associatedSystem.includes(44),"####################",JSON.stringify(formData.value.associatedSystem))
+}
+
+
 // 身份证号正则表达式
 const IdNumberRule = /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/
 
@@ -234,7 +268,8 @@ const open = async (type: string, id?: number) => {
   dialogTitle.value = t('action.' + type)
   formType.value = type
   userId.value = authUtil.getUserId()
-  debugger
+  userDeptId.value = authUtil.getDeptId()
+  // debugger
   resetForm()
 
   // 修改时,设置数据
@@ -244,6 +279,7 @@ const open = async (type: string, id?: number) => {
       const result = await UserApi.getUser(id)
       formData.value = result
       formData.value.roleType = result.roleType+""
+      formData.value.businessRole = result.businessRole+""
       if(result.sex==0) formData.value.sex = undefined
     } finally {
       formLoading.value = false
@@ -303,7 +339,7 @@ const resetForm = () => {
     idNumber: '',
     birthday: '',
     idNumberUrls: [],
-    associatedSystem: '',
+    associatedSystem: [],
     nickname: '',
     deptId: '',
     mobile: '',
@@ -316,7 +352,8 @@ const resetForm = () => {
     remark: '',
     status: CommonStatusEnum.ENABLE,
     roleIds: [],
-    roleType: '1'
+    roleType: '1',
+    businessRole: '0'
   }
   formRef.value?.resetFields()
   //  mobileWatch = watch(

+ 18 - 20
sso-ui/sso-ui-admin-vue3/src/views/system/user/index.vue

@@ -132,36 +132,34 @@
           <el-table-column label="操作" align="center" width="200">
             <template #default="scope">
               <div class="flex items-center justify-center">
-                <el-button
-                  type="primary"
-                  link
-                  @click="handleRelation('update', scope.row.id)"
-                  v-show="userId != 1 && userId != scope.row.id &&  userId !=Number(scope.row.creator)"
-                  v-hasPermi="['system:user:update']"
-                >
-                  <Icon icon="ep:search" />设置关系
-                </el-button>
-                <el-button
-                  type="primary"
-                  link
-                  @click="handleResetPwd(scope.row)"
-                  v-show="userId != 1 && userId != scope.row.id &&  userId !=Number(scope.row.creator)"
-                  v-if="checkPermi(['system:user:update-password'])"
-                >
-                  <Icon icon="ep:key" />重置密码
-                </el-button>
+<!--                <el-button-->
+<!--                  type="primary"-->
+<!--                  link-->
+<!--                  @click="handleRelation('update', scope.row.id)"-->
+<!--                  v-show="userId != 1 && userId != scope.row.id &&  userId !=Number(scope.row.creator)"-->
+<!--                  v-hasPermi="['system:user:update']"-->
+<!--                >-->
+<!--                  <Icon icon="ep:search" />设置关系-->
+<!--                </el-button>-->
+<!--                <el-button-->
+<!--                  type="primary"-->
+<!--                  link-->
+<!--                  @click="handleResetPwd(scope.row)"-->
+<!--                  v-show="userId != 1 && userId != scope.row.id &&  userId !=Number(scope.row.creator)"-->
+<!--                  v-if="checkPermi(['system:user:update-password'])"-->
+<!--                >-->
+<!--                  <Icon icon="ep:key" />重置密码-->
+<!--                </el-button>-->
                 <el-button
                   type="primary"
                   link
                   @click="openForm('update', scope.row.id)"
-                  v-show="userId === 1 || userId === scope.row.id || userId ===Number(scope.row.creator)"
                   v-hasPermi="['system:user:update']"
                 >
                   <Icon icon="ep:edit" />修改
                 </el-button>
                 <el-dropdown
                   @command="(command) => handleCommand(command, scope.row)"
-                  v-show="userId === 1 || userId === scope.row.id || userId ===Number(scope.row.creator)"
                   v-hasPermi="[
                     'system:user:delete',
                     'system:user:update-password',