浏览代码

只有信息科可以看到

xiaochan 1 月之前
父节点
当前提交
69e245327e
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/views/settings/scheduling-class/index.vue

+ 8 - 2
src/views/settings/scheduling-class/index.vue

@@ -14,6 +14,7 @@ import { stringNotBlank } from "@/utils/blank-utils";
 import ExportTrueExcel from "@/views/settings/scheduling-class/ExportTrueExcel.vue";
 import { useCompShallowRef } from "@/utils/useCompRef";
 import ExportFalseExcel from "@/views/settings/scheduling-class/ExportFalseExcel.vue";
+import { useUserStore } from "@/pinia/user-store";
 
 const store = reactive({
   codes: [],
@@ -27,6 +28,8 @@ const store = reactive({
   },
 });
 
+const show = useUserStore().userInfo.deptCode === "3100000";
+
 const trueExcelRef = useCompShallowRef(ExportTrueExcel);
 const falseExcelRef = useCompShallowRef(ExportFalseExcel);
 
@@ -66,7 +69,10 @@ function handleSelectChange(value) {
 
 function createByMonth() {
   const month = dayjs(store.currentCalendar).format("YYYY-MM");
-  createByMonthApi(month);
+  createByMonthApi(month).then(() => {
+    store.months[month] = {};
+    handleGetByMonth();
+  });
 }
 
 function refresh() {
@@ -210,7 +216,7 @@ onMounted(async () => {
 </script>
 
 <template>
-  <div class="layout_container">
+  <div class="layout_container" v-if="show">
     <ExportTrueExcel ref="trueExcelRef" />
     <ExportFalseExcel ref="falseExcelRef" :dept-list="store.codes" />
     <header>