fix: BUG修改
This commit is contained in:
parent
13ed4cff19
commit
8174db0433
@ -1,13 +1,13 @@
|
|||||||
<!-- 经典布局 -->
|
<!-- 经典布局 -->
|
||||||
<template>
|
<template>
|
||||||
<el-container class="layout">
|
<el-container class="layout">
|
||||||
<el-container class="classic-main">
|
<!-- <el-container class="classic-main">
|
||||||
<Main />
|
<Main />
|
||||||
</el-container>
|
</el-container> -->
|
||||||
<!-- <el-header>
|
<el-header>
|
||||||
<div class="header-lf">
|
<div class="header-lf">
|
||||||
<div @click="goHome" class="logo flx-center">
|
<div @click="goHome" class="logo flx-center">
|
||||||
<img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" />
|
<!-- <img src="@/assets/images/login/china.png" style="margin: 0 15px" alt="logo" /> -->
|
||||||
<span>数字化政务监管平台</span>
|
<span>数字化政务监管平台</span>
|
||||||
<span v-if="moduleTitle" style="margin: 0 20px">|</span>
|
<span v-if="moduleTitle" style="margin: 0 20px">|</span>
|
||||||
<span class="title">{{ moduleTitle }}</span>
|
<span class="title">{{ moduleTitle }}</span>
|
||||||
@ -15,10 +15,10 @@
|
|||||||
<ToolBarLeft />
|
<ToolBarLeft />
|
||||||
</div>
|
</div>
|
||||||
<ToolBarRight />
|
<ToolBarRight />
|
||||||
</el-header> -->
|
</el-header>
|
||||||
<!-- <el-container class="classic-content">
|
<el-container class="classic-content">
|
||||||
<el-aside>
|
<el-aside>
|
||||||
<div class="menu" :style="{ width: isCollapse ? '65px' : '210px' }"> 根据屏幕自动收缩
|
<!-- <div class="menu" :style="{ width: isCollapse ? '65px' : '210px' }"> 根据屏幕自动收缩 -->
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-menu
|
<el-menu
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<el-container class="classic-main">
|
<el-container class="classic-main">
|
||||||
<Main />
|
<Main />
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-container> -->
|
</el-container>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -44,12 +44,13 @@ const baseImgURl = import.meta.env.VITE_BASE_IMAGE_URL;
|
|||||||
// const imgUrl = "@/assets/images/leftTab/";
|
// const imgUrl = "@/assets/images/leftTab/";
|
||||||
const handleClickMenu = async (subItem: Menu.MenuOptions) => {
|
const handleClickMenu = async (subItem: Menu.MenuOptions) => {
|
||||||
if (subItem.meta.isLink) return window.open(subItem.meta.isLink, "_blank");
|
if (subItem.meta.isLink) return window.open(subItem.meta.isLink, "_blank");
|
||||||
if (globalStore.accountType != 1) {
|
// if (globalStore.accountType != 1) {
|
||||||
const res = await getButtonAuth({ menuId: subItem.name });
|
// globalStore.menuName = subItem.name
|
||||||
if (res && res.result) {
|
// const res = await getButtonAuth({ menuId: subItem.name });
|
||||||
authStore.authButtonList = res.result;
|
// if (res && res.result) {
|
||||||
}
|
// authStore.authButtonList = res.result;
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
router.push(subItem.path);
|
router.push(subItem.path);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { initDynamicRouter } from "@/routers/modules/dynamicRouter";
|
|||||||
import { staticRouter, errorRouter } from "@/routers/modules/staticRouter";
|
import { staticRouter, errorRouter } from "@/routers/modules/staticRouter";
|
||||||
import NProgress from "@/config/nprogress";
|
import NProgress from "@/config/nprogress";
|
||||||
import { HOME_URL } from "@/enums/Home";
|
import { HOME_URL } from "@/enums/Home";
|
||||||
|
import { getButtonAuth } from "@/api/modules/auth";
|
||||||
// import path from "path";
|
// import path from "path";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,6 +36,7 @@ const router = createRouter({
|
|||||||
* @description 路由拦截 beforeEach
|
* @description 路由拦截 beforeEach
|
||||||
* */
|
* */
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
|
console.log(to);
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
|
|
||||||
// 1.NProgress 开始
|
// 1.NProgress 开始
|
||||||
@ -62,6 +64,11 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
// 6.如果没有菜单列表,就重新请求菜单列表并添加动态路由
|
// 6.如果没有菜单列表,就重新请求菜单列表并添加动态路由
|
||||||
const authStore = AuthStore();
|
const authStore = AuthStore();
|
||||||
authStore.setRouteName(to.name as string);
|
authStore.setRouteName(to.name as string);
|
||||||
|
|
||||||
|
const res = await getButtonAuth({ menuId: to.name });
|
||||||
|
if (res && res.result) {
|
||||||
|
authStore.authButtonList = res.result;
|
||||||
|
}
|
||||||
if (!authStore.authMenuListGet.length) {
|
if (!authStore.authMenuListGet.length) {
|
||||||
await initDynamicRouter();
|
await initDynamicRouter();
|
||||||
if (globalStore.accountType && globalStore.accountType !== 1 && to.fullPath === HOME_URL[0]) {
|
if (globalStore.accountType && globalStore.accountType !== 1 && to.fullPath === HOME_URL[0]) {
|
||||||
|
|||||||
@ -16,6 +16,7 @@ export const GlobalStore = defineStore({
|
|||||||
userInfo: "",
|
userInfo: "",
|
||||||
account: "",
|
account: "",
|
||||||
moduleId: "", //模块id
|
moduleId: "", //模块id
|
||||||
|
menuName: "", // 菜单id
|
||||||
accountType: undefined, //登录账号类型
|
accountType: undefined, //登录账号类型
|
||||||
moduleName: "", //登录账号类型
|
moduleName: "", //登录账号类型
|
||||||
// 都是控制退出或者修改密码的时候遮挡视频的问题
|
// 都是控制退出或者修改密码的时候遮挡视频的问题
|
||||||
|
|||||||
@ -5,6 +5,7 @@ export interface GlobalState {
|
|||||||
userInfo: any | null;
|
userInfo: any | null;
|
||||||
accountType: number | undefined;
|
accountType: number | undefined;
|
||||||
moduleId: string | null;
|
moduleId: string | null;
|
||||||
|
menuName: string | null;
|
||||||
account: string | null;
|
account: string | null;
|
||||||
assemblySize: AssemblySizeType | "";
|
assemblySize: AssemblySizeType | "";
|
||||||
language: string | null;
|
language: string | null;
|
||||||
|
|||||||
@ -123,9 +123,11 @@
|
|||||||
|
|
||||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||||
import { computed, reactive, ref, onMounted, onBeforeMount, watch } from "vue";
|
import { computed, reactive, ref, onMounted, onBeforeMount, watch } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
import { bigItemGovermentAll } from "@/api/modules/huizhou";
|
import { bigItemGovermentAll } from "@/api/modules/huizhou";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
||||||
|
const route = useRoute();
|
||||||
const headerList = reactive([
|
const headerList = reactive([
|
||||||
{ label: "未开始", color: "#D0A530" },
|
{ label: "未开始", color: "#D0A530" },
|
||||||
{ label: "推进中", color: "#35e5fd" },
|
{ label: "推进中", color: "#35e5fd" },
|
||||||
@ -335,7 +337,6 @@ const getEngPage = async () => {
|
|||||||
});
|
});
|
||||||
pages.value.total = +result.total;
|
pages.value.total = +result.total;
|
||||||
};
|
};
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getEngPage();
|
await getEngPage();
|
||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
|
|||||||
@ -286,7 +286,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="divisionsAndISubItems">
|
<script lang="ts" setup name="divisionsAndISubItems">
|
||||||
import { ref, reactive, onMounted, watch } from "vue";
|
import { ref, reactive, onMounted, onBeforeMount, watch } from "vue";
|
||||||
import type { FormRules, FormInstance } from "element-plus";
|
import type { FormRules, FormInstance } from "element-plus";
|
||||||
import { Delete, CirclePlus } from "@element-plus/icons-vue";
|
import { Delete, CirclePlus } from "@element-plus/icons-vue";
|
||||||
import { getDustprojectPage } from "@/api/modules/goverment";
|
import { getDustprojectPage } from "@/api/modules/goverment";
|
||||||
@ -305,6 +305,8 @@ import {
|
|||||||
} from "@/api/modules/huizhou";
|
} from "@/api/modules/huizhou";
|
||||||
import { jxj_User } from "@/api/types";
|
import { jxj_User } from "@/api/types";
|
||||||
import { useHandleData } from "@/hooks/useHandleData";
|
import { useHandleData } from "@/hooks/useHandleData";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
const route = useRoute();
|
||||||
const rules = reactive<FormRules>({
|
const rules = reactive<FormRules>({
|
||||||
name: {
|
name: {
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@ -36,8 +36,9 @@
|
|||||||
background
|
background
|
||||||
:isShowSearch="false"
|
:isShowSearch="false"
|
||||||
>
|
>
|
||||||
<template #formButton="scope" v-auth="'quantity_import'">
|
<template #formButton="scope">
|
||||||
<el-upload
|
<el-upload
|
||||||
|
v-auth="'quantity_import'"
|
||||||
accept=".xlsx"
|
accept=".xlsx"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:action="`${baseUrl}` + '/gov/projectQuantity/importExcel'"
|
:action="`${baseUrl}` + '/gov/projectQuantity/importExcel'"
|
||||||
@ -65,7 +66,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="tsx" setup name="engineerInventory">
|
<script lang="tsx" setup name="engineerInventory">
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted, onBeforeMount, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, onMounted, watch } from "vue";
|
import { ref, reactive, onMounted, onBeforeMount, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import transformInfo1 from "./components/transformInfo1.vue";
|
import transformInfo1 from "./components/transformInfo1.vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|||||||
@ -70,7 +70,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, onMounted, watch } from "vue";
|
import { ref, reactive, onMounted, onBeforeMount, watch } from "vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||||
@ -86,6 +86,8 @@ import {
|
|||||||
} from "@/api/modules/huizhou";
|
} from "@/api/modules/huizhou";
|
||||||
import { getDicList } from "@/api/modules/jxjview";
|
import { getDicList } from "@/api/modules/jxjview";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
const route = useRoute();
|
||||||
const pages = ref({
|
const pages = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 7,
|
pageSize: 7,
|
||||||
|
|||||||
@ -75,7 +75,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||||
import { ref, onMounted, reactive, watch } from "vue";
|
import { ref, onMounted, onBeforeMount, reactive, watch } from "vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
@ -84,6 +84,8 @@ import { GlobalStore } from "@/stores";
|
|||||||
import DialogForm from "@/components/DialogForm/index.vue";
|
import DialogForm from "@/components/DialogForm/index.vue";
|
||||||
import transformInfo1 from "./components/transformInfo1.vue";
|
import transformInfo1 from "./components/transformInfo1.vue";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
const route = useRoute();
|
||||||
const relativeId = ref("");
|
const relativeId = ref("");
|
||||||
const detailsDialog = ref(false);
|
const detailsDialog = ref(false);
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
@ -148,7 +150,7 @@ const formConfig = {
|
|||||||
message: "请选择",
|
message: "请选择",
|
||||||
trigger: "change"
|
trigger: "change"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted, onBeforeMount } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import { Delete } from "@element-plus/icons-vue";
|
import { Delete } from "@element-plus/icons-vue";
|
||||||
@ -94,6 +94,8 @@ import DialogForm from "@/components/DialogForm/index.vue";
|
|||||||
import AMap from "@/components/AMap/AMap.vue";
|
import AMap from "@/components/AMap/AMap.vue";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
const route = useRoute();
|
||||||
const pages = ref({
|
const pages = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 7,
|
pageSize: 7,
|
||||||
|
|||||||
@ -78,7 +78,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted, onBeforeMount } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import { Delete } from "@element-plus/icons-vue";
|
import { Delete } from "@element-plus/icons-vue";
|
||||||
@ -91,6 +91,8 @@ import DialogForm from "@/components/DialogForm/index.vue";
|
|||||||
import AMap from "@/components/AMap/AMap.vue";
|
import AMap from "@/components/AMap/AMap.vue";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
const route = useRoute();
|
||||||
const pages = ref({
|
const pages = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 7,
|
pageSize: 7,
|
||||||
@ -324,12 +326,15 @@ const getEngPage = async () => {
|
|||||||
});
|
});
|
||||||
pages.value.total = +result.total;
|
pages.value.total = +result.total;
|
||||||
};
|
};
|
||||||
onMounted(async () => {
|
onBeforeMount(async () => {
|
||||||
await getEngPage();
|
await getEngPage();
|
||||||
searchSn.value = records.value[0].projectSn;
|
searchSn.value = records.value[0].projectSn;
|
||||||
searchName.value = records.value[0].projectName;
|
searchName.value = records.value[0].projectName;
|
||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
});
|
});
|
||||||
|
// onMounted(async () => {
|
||||||
|
|
||||||
|
// });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user