Browse Source

refactor(shopInfo): 重构商家信息模块

- 移除使用 shopInfoStore 的地方,改为使用 userStore
- 更新 API 调用,使用 orgCode 替代 currentId
- 优化表单数据处理逻辑
- 调整页面布局和组件属性
zhangtao 2 ngày trước cách đây
mục cha
commit
81ed3fc8ce

+ 4 - 4
.env.development

@@ -7,14 +7,14 @@ VITE_PUBLIC_PATH = /
 
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
-# VITE_PROXY = [["/jeecgboot","http://192.168.1.34:8080/jeecg-boot"],["/upload","http://192.168.1.34:8080/jeecg-boot"]]
-VITE_PROXY = [["/jeecgboot","http://192.168.0.11:8080/jeecg-boot"],["/upload","http://192.168.0.11:8080/upload"]]
+VITE_PROXY = [["/jeecgboot","http://192.168.1.34:8080/jeecg-boot"],["/upload","http://192.168.1.34:8080/jeecg-boot"]]
+# VITE_PROXY = [["/jeecgboot","http://192.168.0.11:8080/jeecg-boot"],["/upload","http://192.168.0.11:8080/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://192.168.1.253:8080/jeecg-boot"],["/upload","http://192.168.1.253:8080/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://192.168.1.166:8080/jeecg-boot"],["/upload","http://192.168.1.166:8080/upload"]]
 
 #后台接口全路径地址(必填)
-# VITE_GLOB_DOMAIN_URL=http://192.168.1.34:8080/jeecg-boot #//黄、
-VITE_GLOB_DOMAIN_URL=http://192.168.0.11:8080/jeecg-boot  #李
+VITE_GLOB_DOMAIN_URL=http://192.168.1.34:8080/jeecg-boot #//黄、
+# VITE_GLOB_DOMAIN_URL=http://192.168.0.11:8080/jeecg-boot  #李
 # VITE_GLOB_DOMAIN_URL=http://192.168.1.253:8080/jeecg-boot  #张
 # VITE_GLOB_DOMAIN_URL=http://192.168.1.166:8080/jeecg-boot  #张
 

+ 2 - 2
src/layouts/default/header/components/user-dropdown/DepartSelect.vue

@@ -151,7 +151,7 @@
    * 提交数据
    */
   async function handleSubmit() {
-    if (unref(isMultiTenant) && unref(tenantSelected)==null) {
+    if (unref(isMultiTenant) && unref(tenantSelected) == null) {
       validate_status.value = 'error';
       return false;
     }
@@ -165,7 +165,7 @@
           userStore.setTenant(unref(tenantSelected));
         }
         createMessage.success('切换成功');
-        
+
         //切换租户后要刷新首页
         window.location.reload();
       })

+ 10 - 1
src/layouts/default/header/index.vue

@@ -31,7 +31,12 @@
       <Row>
         <Col :span="24">
           <div class="mr-3" v-if="isShowSelect">
-            <Select :options="deptList" :fieldNames="{ label: 'departName', value: 'id' }" v-model:value="currentId"></Select> </div
+            <Select
+              :options="deptList"
+              @change="handleChange"
+              :fieldNames="{ label: 'departName', value: 'id' }"
+              v-model:value="currentId"
+            ></Select> </div
         ></Col>
       </Row>
 
@@ -189,6 +194,9 @@
         }
         //update-end---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
       }
+      function handleChange() {
+        useShopInfoStore().changeOrgCode();
+      }
 
       function loginSelectOk() {
         console.log('成功。。。。。');
@@ -230,6 +238,7 @@
         isShowSelect,
         deptList,
         currentId,
+        handleChange,
       };
     },
   });

+ 7 - 0
src/store/modules/shopInfo.ts

@@ -34,6 +34,7 @@ interface useShopInfoState {
   isShowSelect: boolean;
   deptList: dep[];
   currentId: string;
+  orgCode: string;
 }
 export const useShopInfoStore = defineStore({
   id: 'app-ShopInfo',
@@ -66,6 +67,7 @@ export const useShopInfoStore = defineStore({
     isShowSelect: false,
     deptList: [],
     currentId: '',
+    orgCode: '',
   }),
   getters: {},
   actions: {
@@ -75,6 +77,11 @@ export const useShopInfoStore = defineStore({
       this.deptList = result.list;
       this.currentId = this.currentDep.id;
       this.isShowSelect = true;
+      this.orgCode = this.currentDep.orgCode;
+    },
+    changeOrgCode() {
+      this.orgCode = '';
+      this.orgCode = this.currentDep.orgCode;
     },
   },
 });

+ 0 - 2
src/views/businessManagement/courses/index.vue

@@ -53,12 +53,10 @@
   import { list, deleteOne, editPriceRules, queryCourseList } from './courses.api';
   import { useUserStore } from '/@/store/modules/user';
   import { useMessage } from '/@/hooks/web/useMessage';
-  import { useShopInfoStore } from '/@/store/modules/shopInfo';
   import { useRouteTabText } from '/@/hooks/web/useRouteTab';
   const queryParam = reactive<any>({});
   const userStore = useUserStore();
   const { createMessage } = useMessage();
-  useShopInfoStore().getCurrentDep();
 
   //注册model
   const [registerModal, { openModal }] = useModal();

+ 4 - 3
src/views/businessManagement/courses/publishcourses.vue

@@ -51,9 +51,10 @@
   import { ref } from 'vue';
   import { useRoute } from 'vue-router';
   import { nextTick } from 'vue';
-  import { useShopInfoStore } from '/@/store/modules/shopInfo';
-  useShopInfoStore().getCurrentDep();
+  import { useUserStore } from '/@/store/modules/user';
+  import { storeToRefs } from 'pinia';
   const { close: closeTab } = useTabs();
+  const { userInfo } = storeToRefs(useUserStore());
   const route = useRoute();
   const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, clearValidate, getFieldsValue }] = useForm({
     schemas: formSchema,
@@ -101,7 +102,7 @@
     const form = await getFieldsValue();
     isSubmit.value = true;
     const newObj = {
-      courses: { ...form, priceRulesList: null, siteId: useShopInfoStore().currentId },
+      courses: { ...form, priceRulesList: null, orgCode: userInfo.value?.orgCode },
       priceRulesList: transformData(form.priceRulesList),
     };
     try {

+ 2 - 2
src/views/businessManagement/gymnasiumBag/gymnasiumBag.api.ts

@@ -7,7 +7,7 @@ enum Api {
   deleteOne = '/app/appSitePlace/deleteUnfixed',
   detaile = 'app/appCourese/queryById',
   queryById = '/app/appSitePlace/queryPack',
-  Business = '/app/appSitePlace/queryByDeptId',
+  Business = '/app/appSitePlace/queryByOrgCode',
 }
 export const list = (params) => defHttp.get({ url: Api.list, params });
 
@@ -42,5 +42,5 @@ export const queryById = (params) => {
  * @returns
  */
 export const Business = (params) => {
-  return defHttp.get({ url: `${Api.Business}/${params.currentId}` });
+  return defHttp.get({ url: `${Api.Business}/${params.orgCode}` });
 };

+ 0 - 1
src/views/businessManagement/gymnasiumBag/gymnasiumBag.data.ts

@@ -1,7 +1,6 @@
 import { h } from 'vue';
 import { BasicColumn } from '/@/components/Table';
 import { PlusCircleOutlined, MinusCircleOutlined } from '@ant-design/icons-vue';
-import { render } from 'nprogress';
 
 export const ScheduleArrangementColums: BasicColumn[] = [
   {

+ 34 - 18
src/views/businessManagement/gymnasiumBag/index.vue

@@ -27,7 +27,7 @@
           <Divider></Divider>
         </template>
         <template #formFooter>
-          <div style="margin: 0 auto" class="w-full flex items-center justify-center">
+          <div style="margin: 0 auto" class="w-full flex items-center justify-center" v-if="isMerchant">
             <a-button type="primary" @click="save" class="mr-2" :loading="isSubmit"> 保存 </a-button>
             <a-button type="error" @click="back" class="mr-2"> 关闭 </a-button>
           </div>
@@ -45,20 +45,23 @@
   import ZtCustomTable from '/@/components/ZtCustomTable/index.vue';
   import { ScheduleArrangementColums, apiForm, priceRules } from './gymnasiumBag.data';
   import { saveOrUpdate, queryById, Business } from './gymnasiumBag.api';
-  import { h, onUnmounted, ref, watch } from 'vue';
+  import { computed, h, onUnmounted, ref, watch } from 'vue';
   import { OriginalItem } from '/#/utils';
   import { areAllItemsAllFieldsFilled, extractRefs } from '/@/utils';
   import dayjs from 'dayjs';
   import { useTabs } from '/@/hooks/web/useTabs';
-  import { useShopInfoStore } from '/@/store/modules/shopInfo';
   import { storeToRefs } from 'pinia';
   import { unref } from 'vue';
   const projectList = ref<DemoOptionsItem[]>([]);
-  useShopInfoStore().getCurrentDep();
-  const { deptList, currentId } = storeToRefs(useShopInfoStore());
+  import { useUserStore } from '/@/store/modules/user';
+  const { userInfo } = storeToRefs(useUserStore());
   const { close: closeTab } = useTabs();
   const isSubmit = ref(false);
   const uploadId = ref<any>();
+  const isMerchant = computed(() => {
+    return userInfo.value?.orgCode?.length > 3;
+  });
+  const changeData = ref(false);
   const formSchema: FormSchema[] = [
     {
       field: 'name',
@@ -69,15 +72,16 @@
       componentProps: {
         // api: Business,
         // params: {
-        //   currentId,
+        //   orgCode: useUserStore().userInfo?.orgCode,
         // },
         // immediate: false,
         // valueField: 'id',
         // labelField: 'name',
         onChange(e) {
-          console.log(e, '请求新的');
           getQueryData(e);
+          changeData.value = true;
         },
+        disabled: isMerchant.value,
       },
       colProps: {
         span: 14,
@@ -90,6 +94,9 @@
       label: '',
       component: 'Input',
       labelWidth: 0,
+      ifShow() {
+        return isMerchant.value || changeData.value;
+      },
     },
     {
       field: 'categoryId',
@@ -105,6 +112,9 @@
         span: 24,
         xs: 24,
       },
+      ifShow() {
+        return isMerchant.value || changeData.value;
+      },
     },
     {
       field: 'customerInfo',
@@ -117,6 +127,9 @@
         span: 24,
         xs: 24,
       },
+      ifShow() {
+        return isMerchant.value || changeData.value;
+      },
     },
     {
       field: 'title3',
@@ -124,6 +137,9 @@
       label: '',
       component: 'Input',
       labelWidth: 0,
+      ifShow() {
+        return isMerchant.value || changeData.value;
+      },
     },
     {
       field: 'earlyRefundTime',
@@ -138,6 +154,9 @@
       colProps: {
         span: 24,
       },
+      ifShow() {
+        return isMerchant.value || changeData.value;
+      },
     },
     {
       field: 'buyLimit',
@@ -152,6 +171,9 @@
       colProps: {
         span: 24,
       },
+      ifShow() {
+        return isMerchant.value || changeData.value;
+      },
     },
     {
       field: 'reminder',
@@ -169,6 +191,9 @@
       colProps: {
         span: 18,
       },
+      ifShow() {
+        return isMerchant.value || changeData.value;
+      },
     },
   ];
   const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, getFieldsValue, appendSchemaByField }] = useForm({
@@ -212,7 +237,7 @@
     }
   }
   async function getBusinessData() {
-    const res = await Business({ currentId: currentId.value });
+    const res = await Business({ orgCode: userInfo.value?.orgCode });
     updateSchema({ field: 'name', componentProps: { options: res.map((it) => ({ label: it.name, value: it.id })) } });
     //如果商家端进入默认取第一个
     setFieldsValue({
@@ -220,13 +245,7 @@
     });
     getQueryData(res[0].id);
   }
-  watch(
-    () => currentId.value,
-    () => {
-      if (currentId.value) getBusinessData();
-    },
-    { immediate: true }
-  );
+  getBusinessData();
   async function save() {
     const form = await getFieldsValue();
     await validate();
@@ -369,9 +388,6 @@
 
     return true;
   }
-  onUnmounted(() => {
-    useShopInfoStore().isShowSelect = false;
-  });
   function reverseTransformData(transformedData: TransformedItem[]): Record<string, OriginalItem[]> {
     const groupedByTime: Record<string, TransformedItem[]> = {};
     console.log(transformedData, 'transformedData');

+ 0 - 2
src/views/businessManagement/gymnasiumNoFixed/index.vue

@@ -31,10 +31,8 @@
 
   import { columns, searchFormSchema } from './gymnasiumNoFixed.data';
   import { deleteOne, list } from './gymnasiumNoFixed.api';
-  import { useShopInfoStore } from '/@/store/modules/shopInfo';
   import { reactive } from 'vue';
   const [registerModal, { openModal }] = useModal();
-  useShopInfoStore().getCurrentDep();
   const queryParam = reactive<any>({});
   const { prefixCls, tableContext } = useListPage({
     designScope: 'competition-template',

+ 1 - 2
src/views/businessManagement/schoolOpen/index.vue

@@ -36,12 +36,11 @@
   import ZtCustomTable from '/@/components/ZtCustomTable/index.vue';
   import { useUserStore } from '/@/store/modules/user';
   import { formSchema, ScheduleArrangementColums } from './schoolOpen.data';
-  import { getDetails, saveOrUpdate } from './schoolOpen.api';
+  import { getDetails } from './schoolOpen.api';
   import { useShopInfoStore } from '/@/store/modules/shopInfo';
   import { onUnmounted, ref, unref } from 'vue';
   import { useRouter } from 'vue-router';
   const router = useRouter();
-  useShopInfoStore().getCurrentDep();
   const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, clearValidate, getFieldsValue }] = useForm({
     schemas: formSchema,
     showActionButtonGroup: false,

+ 56 - 22
src/views/informationManagement/shopInfo/index.vue

@@ -6,14 +6,9 @@
           <TypographyTitle :level="4">基础信息</TypographyTitle>
           <Divider></Divider>
         </template>
-        <!-- <template #address="{ model, field }">
-          <FormItem label="营业地址" required>
-            <JAreaSelect v-model:province="model['province']" v-model:city="model['city']" v-model:area="model['area']"></JAreaSelect>
-            <div class="mt-4">
-              <Textarea v-model:value="model[field]"></Textarea>
-            </div>
-          </FormItem>
-        </template> -->
+        <template #address="{ model }">
+          <JAreaSelect v-model:province="model['province']" v-model:city="model['city']" v-model:area="model['area']"> </JAreaSelect>
+        </template>
         <template #phone="{ model, field }">
           <Input v-model:value="model[field]"></Input>
           <span class="text-gray">用户拨打商家电话时,拨打的号码为该号码。</span>
@@ -38,7 +33,7 @@
 
         <template #formFooter>
           <div style="margin: 0 auto">
-            <a-button type="primary" @click="save" class="mr-2"> 保存 </a-button>
+            <a-button type="primary" @click="save" class="mr-2" :loading="isLoading"> 保存 </a-button>
             <a-button type="error" @click="back" class="mr-2"> 关闭 </a-button>
           </div>
         </template>
@@ -48,29 +43,68 @@
   </div>
 </template>
 <script lang="ts" setup>
-  import { TypographyTitle, Divider, FormItem, Textarea, Input } from 'ant-design-vue';
+  import { TypographyTitle, Divider, FormItem, Textarea, Input, message } from 'ant-design-vue';
   import { BasicForm, useForm, JAreaSelect } from '/@/components/Form/index';
   import uploadVideo from '@/components/uploadVideo/index.vue';
-  import { onUnmounted } from 'vue';
-  import { useShopInfoStore } from '/@/store/modules/shopInfo';
-  const shopInfoStore = useShopInfoStore();
+  import { onUnmounted, ref, watch } from 'vue';
+  import { useUserStore } from '/@/store/modules/user';
+  const { userInfo } = storeToRefs(useUserStore());
 
   import { formSchema } from './shopInfo.data';
-  useShopInfoStore().getCurrentDep();
-  const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, clearValidate, getSchemaByField }] = useForm({
+  import { queryById, saveOrUpdate } from './shopInfo.api';
+  import { router } from '/@/router';
+  import { storeToRefs } from 'pinia';
+  const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, clearValidate, getSchemaByField, getFieldsValue }] = useForm({
     schemas: formSchema,
     showActionButtonGroup: false,
     labelWidth: 200,
     labelCol: { span: 4 },
     wrapperCol: { span: 18 },
   });
-  function back() {}
+  const isEdit = ref(false);
+  const isLoading = ref(false);
+  function back() {
+    router.back();
+  }
+  async function getData(id) {
+    const res = await queryById(id);
+    console.log(res, 'asdsad');
+    if (!res.id) return;
+    const vr = res.vr ? res.vr.split(',') : null;
+    isEdit.value = true;
+    setFieldsValue({
+      ...res,
+      categoryId: res.categoryId.split(','),
+      Time: [res.startTime, res.endTime].join(','),
+      down: vr ? vr[vr.length - 1] : null,
+      up: vr ? vr[4] : null,
+      before: vr ? vr[0] : null,
+      after: vr ? vr[1] : null,
+      left: vr ? vr[2] : null,
+      right: vr ? vr[3] : null,
+    });
+  }
+  getData(userInfo.value?.orgCode);
   async function save() {
-    const form = await validate();
-    console.log(form, '撒大苏打');
+    await validate();
+    isLoading.value = true;
+    const form = await getFieldsValue();
+    const obj = {
+      ...form,
+      startTime: form.Time ? form.Time.split(',')[0] : '',
+      endTime: form.Time ? form.Time.split(',')[1] : '',
+      vr: '',
+    };
+    if (form.before || form.after || form.left || form.right || form.up || form.down) {
+      if (!form.before || !form.after || !form.left || !form.right || !form.up || !form.down) return message.error('请上传完整VR实景');
+      obj.vr = [form.before, form.after, form.left, form.right, form.up, form.down].join(',');
+    }
+    console.log(obj, '测试');
+    try {
+      await saveOrUpdate(obj, isEdit.value);
+      isLoading.value = false;
+    } catch (error) {
+      isLoading.value = false;
+    }
   }
-
-  onUnmounted(() => {
-    shopInfoStore.isShowSelect = false;
-  });
 </script>

+ 22 - 0
src/views/informationManagement/shopInfo/shopInfo.api.ts

@@ -0,0 +1,22 @@
+import { defHttp } from '/@/utils/http/axios';
+import { useMessage } from '/@/hooks/web/useMessage';
+
+const { createConfirm } = useMessage();
+
+enum Api {
+  save = '/appSite/add',
+  edit = '/appSite/editSite',
+  queryById = '/appSite/querySiteListByOrgCode',
+}
+
+/**
+ * 保存或者更新
+ * @param params
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+  let url = isUpdate ? Api.edit : Api.save;
+  return defHttp.post({ url: url, params });
+};
+export const queryById = (id) => {
+  return defHttp.get({ url: Api.queryById, params: { orgCode: id } });
+};

+ 46 - 31
src/views/informationManagement/shopInfo/shopInfo.data.ts

@@ -5,6 +5,12 @@ import { JAreaSelect } from '/@/components/Form';
 import { InputGroup, Input, Button, message } from 'ant-design-vue';
 const sportList = await getSprotProject({ pageSize: 20 });
 export const formSchema: FormSchema[] = [
+  {
+    label: '',
+    field: 'id',
+    component: 'Input',
+    show: false,
+  },
   {
     field: 'type',
     label: '业务类型',
@@ -24,20 +30,14 @@ export const formSchema: FormSchema[] = [
     required: true,
   },
   {
-    field: 'address',
+    field: 'province',
     label: '营业地址',
     component: 'JAreaSelect',
+    slot: 'address',
     required: true,
-    render: ({ model }) => {
-      return h(JAreaSelect, {
-        province: model['provinceCode'],
-        area: model['area'],
-        city: model['city'],
-      });
-    },
   },
   {
-    field: 'provinceCode',
+    field: 'address',
     label: '详细地址',
     component: 'Input',
     required: true,
@@ -48,13 +48,19 @@ export const formSchema: FormSchema[] = [
           compact: true,
         },
         () => [
-          h(Input, { value: model['address'], style: 'width: calc(100% - 70px)' }),
+          h(Input, {
+            value: model['address'],
+            style: 'width: calc(100% - 70px)',
+            onChange: (e) => {
+              model['address'] = e.target.value;
+            },
+          }),
           h(
             Button,
             {
               onClick: async () => {
-                if (!model['address'] || !model['provinceCode']) return message.warning('请输入地址');
-                const res = await getBaiduAdd({ address: `${model['provinceCode']}${model['cityCode']}${model['areaCode']}${model['address']}` });
+                if (!model['address'] || !model['province']) return message.warning('请输入地址');
+                const res = await getBaiduAdd({ address: `${model['province']}${model['city']}${model['area']}${model['address']}` });
                 model['latitude'] = res.latitude;
                 model['longitude'] = res.longitude;
               },
@@ -66,7 +72,7 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'provinceCode',
+    field: 'province',
     label: '',
     component: 'JAreaSelect',
     show: false,
@@ -126,18 +132,33 @@ export const formSchema: FormSchema[] = [
         { label: '休息', value: 1 },
       ],
     },
+    defaultValue: 0,
   },
   {
-    field: 'fileimg',
+    field: 'runType',
     label: '营业时间',
     component: 'RadioGroup',
     required: true,
     componentProps: {
       options: [
-        { label: '全天', value: 1 },
-        { label: '自定义', value: 0 },
+        { label: '全天', value: 0 },
+        { label: '自定义', value: 1 },
       ],
     },
+    ifShow(model) {
+      return model.model['runStatus'] == 0;
+    },
+    defaultValue: 0,
+    colProps: { span: 8 },
+  },
+  {
+    label: '',
+    component: 'RangeTime',
+    field: 'Time',
+    colProps: { span: 6 },
+    ifShow(renderCallbackParams) {
+      return renderCallbackParams.model['runType'] == 1;
+    },
   },
   {
     field: 'phone',
@@ -149,16 +170,10 @@ export const formSchema: FormSchema[] = [
   {
     field: 'facility',
     label: '设施/服务',
-    component: 'CheckboxGroup',
+    component: 'JCheckbox',
     required: true,
     componentProps: {
-      options: [
-        { label: '卫生间', value: 1 },
-        { label: '无烟环境', value: 0 },
-        { label: '淋浴间', value: 0 },
-        { label: '免费茶水', value: 0 },
-        { label: '停车方便', value: 0 },
-      ],
+      dictCode: 'facilities_service',
     },
   },
   {
@@ -189,7 +204,7 @@ export const formSchema: FormSchema[] = [
     slot: 'VideoUpload',
   },
   {
-    field: 'address',
+    field: 'cover',
     label: '图片',
     component: 'JImageUpload',
     required: true,
@@ -205,7 +220,7 @@ export const formSchema: FormSchema[] = [
     labelWidth: 0,
   },
   {
-    field: 'baoxain',
+    field: 'before',
     label: '图片(前)',
     component: 'JImageUpload',
     colProps: { xl: 12 },
@@ -214,7 +229,7 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'baoxain',
+    field: 'after',
     label: '图片(后)',
     component: 'JImageUpload',
     colProps: { xl: 12 },
@@ -223,7 +238,7 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'baoxain',
+    field: 'left',
     label: '图片(左)',
     component: 'JImageUpload',
     colProps: { xl: 12 },
@@ -232,7 +247,7 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'baoxain',
+    field: 'right',
     label: '图片(右)',
     component: 'JImageUpload',
     componentProps: {
@@ -241,7 +256,7 @@ export const formSchema: FormSchema[] = [
     colProps: { xl: 12 },
   },
   {
-    field: 'baoxain',
+    field: 'up',
     label: '图片(上)',
     component: 'JImageUpload',
     componentProps: {
@@ -250,7 +265,7 @@ export const formSchema: FormSchema[] = [
     colProps: { xl: 12 },
   },
   {
-    field: 'baoxain',
+    field: 'down',
     label: '图片(下)',
     component: 'JImageUpload',
     componentProps: {

+ 5 - 12
src/views/informationManagement/teachorNoteach/index.vue

@@ -6,9 +6,11 @@
   import interactionPlugin from '@fullcalendar/interaction';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { getQueryByTenantId, editDay } from './teachorNoteach.api';
-  import { useShopInfoStore } from '/@/store/modules/shopInfo';
+  import { useUserStore } from '/@/store/modules/user';
   import { h, ref, onUnmounted } from 'vue';
   import dayjs from 'dayjs';
+  import { storeToRefs } from 'pinia';
+  const { userInfo } = storeToRefs(useUserStore());
   const { createWarningModal, createMessage } = useMessage();
   const isChangeDay = ref(0);
   const changeDay = ref(1);
@@ -46,7 +48,6 @@
     },
     select: handleClick,
   });
-
   function handleClick(selectInfo) {
     const clickedDate = selectInfo.start;
     const day = dayjs(clickedDate).day();
@@ -111,21 +112,13 @@
   }
   async function getTimeDay() {
     const res = await getQueryByTenantId({
-      tenantId: useShopInfoStore().currentId,
+      orgCode: userInfo.value?.orgCode,
     });
     TeachingData.value = res;
     nonTeachingDays.value = TeachingData.value.filter((it) => it.isTeaching).map((it) => new Date(it.day));
     fullCalendarRef.value.getApi().render();
   }
-
-  async function getData() {
-    await useShopInfoStore().getCurrentDep();
-    getTimeDay();
-  }
-  getData();
-  onUnmounted(() => {
-    useShopInfoStore().isShowSelect = false;
-  });
+  getTimeDay();
 </script>
 
 <template>

+ 2 - 2
src/views/informationManagement/teachorNoteach/teachorNoteach.api.ts

@@ -4,8 +4,8 @@ import { useMessage } from '/@/hooks/web/useMessage';
 const { createConfirm } = useMessage();
 
 enum Api {
-  queryByTenantId = '/org/jeecg/modules/system/app/appTeachingTime/queryByTenantId',
-  edit = '/org/jeecg/modules/system/app/appTeachingTime/edit',
+  queryByTenantId = '/app/appTeachingTime/queryByOrgCode',
+  edit = 'app/appTeachingTime/edit',
 }
 
 /**

+ 0 - 1
src/views/safetyManagement/Seal/index.vue

@@ -24,7 +24,6 @@
   import { useShopInfoStore } from '/@/store/modules/shopInfo';
   import { storeToRefs } from 'pinia';
 
-  useShopInfoStore().getCurrentDep();
   const { currentId } = storeToRefs(useShopInfoStore());
   const { createMessage, createWarningModal } = useMessage();
   const { userInfo } = storeToRefs(useUserStore());

+ 8 - 8
src/views/system/depart/components/DepartLeftTree.vue

@@ -3,12 +3,12 @@
     <div class="j-table-operator" style="width: 100%">
       <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddDepart">新增</a-button>
       <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddChildDepart()">添加下级</a-button>
-      <a-upload name="file" :showUploadList="false" :customRequest="onImportXls">
+      <!-- <a-upload name="file" :showUploadList="false" :customRequest="onImportXls">
         <a-button type="primary" preIcon="ant-design:import-outlined">导入</a-button>
-      </a-upload>
-      <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">导出</a-button>
+      </a-upload> -->
+      <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">导出</a-button>
       <a-button type="primary" preIcon="ant-design:sync-outlined">同步企微?</a-button>
-      <a-button type="primary" preIcon="ant-design:sync-outlined">同步钉钉?</a-button>
+      <a-button type="primary" preIcon="ant-design:sync-outlined">同步钉钉?</a-button> -->
       <template v-if="checkedKeys.length > 0">
         <a-dropdown>
           <template #overlay>
@@ -324,11 +324,11 @@
 
   function onExportXls() {
     //update-begin---author:wangshuai---date:2024-07-05---for:【TV360X-1671】部门管理不支持选中的记录导出---
-    let params = {}
-    if(checkedKeys.value && checkedKeys.value.length > 0) {
-      params['selections'] = checkedKeys.value.join(',')
+    let params = {};
+    if (checkedKeys.value && checkedKeys.value.length > 0) {
+      params['selections'] = checkedKeys.value.join(',');
     }
-    handleExportXls('部门信息', Api.exportXlsUrl,params);
+    handleExportXls('部门信息', Api.exportXlsUrl, params);
     //update-end---author:wangshuai---date:2024-07-05---for:【TV360X-1671】部门管理不支持选中的记录导出---
   }
 

+ 3 - 0
src/views/system/depart/depart.data.ts

@@ -92,5 +92,8 @@ export const orgCategoryOptions = {
   child: [
     { value: '2', label: '部门' },
     { value: '3', label: '岗位' },
+    { value: '10', label: '平台' },
+    { value: '20', label: '学校' },
+    { value: '30', label: '体育馆' },
   ],
 };

+ 2 - 2
src/views/system/staff/staff.api.ts

@@ -4,8 +4,8 @@ import { e } from 'unocss';
 
 enum Api {
   list = '/staff/staff/list',
-  add = 'staff/staff/add',
-  edit = 'staff/staff/edit',
+  add = '/staff/staff/add',
+  edit = '/staff/staff/edit',
   queryId = '/staff/staff/queryById',
   del = 'staff/staff/delete',
   test = '/sys/sysDepart/findByDepTree',