浏览代码

feat: global新增部门

chenlei 1 年之前
父节点
当前提交
d3d394a03a

+ 2 - 0
public/config.js

@@ -28,6 +28,8 @@ cloudScenicUrl =
 // 单位
 company = "江苏省文化和旅游厅";
 companyId = 101;
+// 部门
+division = "test";
 
 // 云游景区 url 配置
 SCENIC_MUSEUM_POS = [

+ 1 - 0
src/global.d.ts

@@ -3,6 +3,7 @@ interface Window {
   riverUrl: string;
   cloudScenicUrl: string;
   company: string;
+  division: string;
   companyId: number;
   SCENIC_MUSEUM_POS: {
     id: number;

+ 1 - 1
src/views/venue-reservation/constants.ts

@@ -1,6 +1,6 @@
 export const DEFAULT_FORM1 = {
   organ: window.company,
-  division: "",
+  division: window.division,
   leader: {
     name: "",
     phone: "",

+ 2 - 0
src/views/venue-reservation/form-1.vue

@@ -13,6 +13,7 @@
     <el-form-item label="所在部门" prop="division">
       <div class="vr-input">
         <el-input
+          :readonly="divisionReadonly"
           v-model="form.division"
           placeholder="请填写部门名称"
           :maxlength="20"
@@ -63,6 +64,7 @@ const props = defineProps<{
   formData: typeof DEFAULT_FORM1 | null;
 }>();
 const formRef = ref<FormInstance>();
+const divisionReadonly = ref(!!window.division);
 const form = reactive(cloneDeep(DEFAULT_FORM1));
 const rules = reactive<FormRules>({
   division: [

+ 10 - 10
src/views/ver-scroll-home/index.vue

@@ -107,6 +107,16 @@ const menuList = computed(() => [
     },
   },
   {
+    icon: RiverNormalImg,
+    activeIcon: RiverNormalImg,
+    event() {
+      router.push({
+        name: "iframe",
+        params: { url: window.riverUrl, showBtn: 0 },
+      });
+    },
+  },
+  {
     icon: ReservationNormalImg,
     activeIcon: ReservationActiveImg,
     async event() {
@@ -153,16 +163,6 @@ const menuList = computed(() => [
       }
     },
   },
-  {
-    icon: RiverNormalImg,
-    activeIcon: RiverNormalImg,
-    event() {
-      router.push({
-        name: "iframe",
-        params: { url: window.riverUrl, showBtn: 0 },
-      });
-    },
-  },
 ]);
 const translateY = ref(0);