|
@@ -32,13 +32,44 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {ref} from 'vue'
|
|
|
-import { UserOutlined, DownOutlined,BellOutlined,QuestionCircleOutlined, LogoutOutlined} from '@ant-design/icons-vue';
|
|
|
+import {ref,createVNode} from 'vue'
|
|
|
+import { UserOutlined, DownOutlined,BellOutlined,QuestionCircleOutlined, LogoutOutlined,ExclamationCircleOutlined} from '@ant-design/icons-vue';
|
|
|
import { useAuthStore } from '@/stores/modules/auth'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
+import { Modal } from 'ant-design-vue';
|
|
|
+import { useRouter } from "vue-router";
|
|
|
+const router = useRouter()
|
|
|
+import Api from '@/api/api'
|
|
|
const store = useAuthStore()
|
|
|
let { accountList,nowAccount } = storeToRefs(store)
|
|
|
-const accountItemClick= ()=>{}
|
|
|
+const accountItemClick = (account,bool)=>{
|
|
|
+ nowAccount.value = account
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ "classname": "sysmanage.develop.userauthforweb.userauth",
|
|
|
+ "method": "query_userauth",
|
|
|
+ "content": {
|
|
|
+ "place": 1
|
|
|
+ },
|
|
|
+ "systemappid": ""
|
|
|
+ }
|
|
|
+ auth(data)
|
|
|
+ if (!bool)
|
|
|
+ return router.go(0)
|
|
|
+}
|
|
|
+const loginOut = ()=>{
|
|
|
+ Modal.confirm({
|
|
|
+ title: '注意',
|
|
|
+ icon: createVNode(ExclamationCircleOutlined),
|
|
|
+ content: '确定登出当前账号吗?',
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk () {
|
|
|
+ Api.loginout({})
|
|
|
+ router.push({path:'/'})
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.sw-header{
|