zs преди 1 година
родител
ревизия
d8b0f91fb1

+ 3 - 3
.env.development

@@ -1,6 +1,6 @@
-VITE_BASE_URL = "/canteenAdmin"
-VITE_OUT_DIR = "canteenAdmin"
-VITE_REQUEST_BASE = '/st/api'
+VITE_BASE_URL = "/notarizationAdmin"
+VITE_OUT_DIR = "notarizationAdmin"
+VITE_REQUEST_BASE = '/notarization/api'
 VITE_APP_HOST="http://192.168.1.197"
 VITE_APP_PAGE_SIZE=15
 VITE_APP_ROUTER="admin"

+ 4 - 4
.env.production

@@ -1,8 +1,8 @@
-VITE_BASE_URL = "/canteenAdmin"
-VITE_OUT_DIR = "canteenAdmin"
-VITE_REQUEST_BASE = '/st/api'
+VITE_BASE_URL = "/notarizationAdmin"
+VITE_OUT_DIR = "notarizationAdmin"
+VITE_REQUEST_BASE = '/notarization/api'
 VITE_APP_HOST="https://broadcast.waityou24.cn"
 VITE_APP_PAGE_SIZE=15
 VITE_APP_ROUTER="admin"
 VITE_APP_ENV = 'production'
-VITE_API_BASE='/st/api'
+VITE_API_BASE='/notarization/api'

+ 2 - 2
README.md

@@ -1,2 +1,2 @@
-# canteen_admin
-# 食堂管理平台 vue3
+# notarization_admin
+# 赋强公证管理平台 vue3

+ 2 - 155
src/layout/site.ts

@@ -1,7 +1,7 @@
 // 网站基本设置
 export const siteInfo = {
   display: false,
-  zhTitle: '食堂管理平台',
+  zhTitle: '赋强公证管理平台',
   logo_url: '/src/assets/logo.png'
 };
 // 菜单设置
@@ -12,158 +12,5 @@ export const menuInfo = {
     backColor: '#242f42',
     textColor: '#ffffff'
   },
-  menuList: [
-    // {
-    //   _id: '65a479b4969adc42d8feea73',
-    //   name: '首页',
-    //   order_num: 1,
-    //   path: '/homeIndex',
-    //   component: '/home/index',
-    //   type: '1',
-    //   is_use: '0',
-    //   for_platform: '0'
-    // },
-    // {
-    //   _id: '65a479b4969adc42d8feea71',
-    //   name: '系统设置',
-    //   order_num: 2,
-    //   type: '0',
-    //   is_use: '0',
-    //   for_platform: '0',
-    //   children: [
-    //     {
-    //       _id: '65a479b4969adc42d8feea75',
-    //       name: '菜单设置',
-    //       parent_id: '65a479b4969adc42d8feea71',
-    //       order_num: 1,
-    //       path: '/system/menus',
-    //       component: '/system/menus/index',
-    //       type: '1',
-    //       is_use: '0',
-    //       for_platform: '0',
-    //       parent_name: '系统设置'
-    //     },
-    //     {
-    //       _id: '65a479b4969adc42d8feea76',
-    //       name: '角色管理',
-    //       parent_id: '65a479b4969adc42d8feea71',
-    //       order_num: 2,
-    //       path: '/system/role',
-    //       component: '/system/role/index',
-    //       type: '1',
-    //       is_use: '0',
-    //       for_platform: '0',
-    //       parent_name: '系统设置'
-    //     },
-    //     {
-    //       _id: '65a479b4969adc42d8feea77',
-    //       name: '字典管理',
-    //       parent_id: '65a479b4969adc42d8feea71',
-    //       order_num: 3,
-    //       path: '/system/dict',
-    //       component: '/system/dict/index',
-    //       type: '1',
-    //       is_use: '0',
-    //       for_platform: '0',
-    //       parent_name: '系统设置'
-    //     },
-    //     {
-    //       _id: '65a479b4969adc42d8feea78',
-    //       name: '字典数据',
-    //       parent_id: '65a479b4969adc42d8feea71',
-    //       order_num: 4,
-    //       path: '/system/dictData',
-    //       component: '/system/dictData/index',
-    //       type: '2',
-    //       is_use: '0',
-    //       for_platform: '0',
-    //       parent_name: '系统设置'
-    //     }
-    //   ]
-    // },
-    // {
-    //   _id: '65a479b4969adc42d8feea72',
-    //   name: '用户管理',
-    //   order_num: 3,
-    //   type: '0',
-    //   is_use: '0',
-    //   for_platform: '0',
-    //   children: [
-    //     {
-    //       _id: '65a479b4969adc42d8feea7a',
-    //       name: '管理员用户',
-    //       parent_id: '65a479b4969adc42d8feea72',
-    //       order_num: 1,
-    //       path: '/user/admin',
-    //       component: '/user/admin/index',
-    //       type: '1',
-    //       is_use: '0',
-    //       for_platform: '0',
-    //       parent_name: '用户管理'
-    //     },
-    //     {
-    //       _id: '65a479b4969adc42d8feea7b',
-    //       name: '平台用户',
-    //       parent_id: '65a479b4969adc42d8feea72',
-    //       order_num: 2,
-    //       path: '/user/user',
-    //       component: '/user/user/index',
-    //       type: '1',
-    //       is_use: '0',
-    //       for_platform: '0',
-    //       parent_name: '用户管理'
-    //     }
-    //   ]
-    // },
-    // {
-    //   _id: '65a479b4969adc42d8feea7e',
-    //   name: '菜品管理',
-    //   order_num: 5,
-    //   path: '/menu',
-    //   component: '/menu/index',
-    //   type: '1',
-    //   is_use: '0',
-    //   for_platform: '0'
-    // },
-    // {
-    //   _id: '65a479b4969adc42d8feea7e',
-    //   name: '安排管理',
-    //   order_num: 6,
-    //   path: '/arrange',
-    //   component: '/arrange/index',
-    //   type: '1',
-    //   is_use: '0',
-    //   for_platform: '0'
-    // },
-    // {
-    //   _id: '65a479b4969adc42d8feea7f',
-    //   name: '订单管理',
-    //   order_num: 7,
-    //   path: '/order',
-    //   component: '/order/index',
-    //   type: '1',
-    //   is_use: '0',
-    //   for_platform: '0'
-    // },
-    // {
-    //   _id: '65a479b4969adc42d8feea80',
-    //   name: '新闻管理',
-    //   order_num: 8,
-    //   path: '/news',
-    //   component: '/news/index',
-    //   type: '1',
-    //   is_use: '0',
-    //   for_platform: '0'
-    // },
-    // {
-    //   _id: '65a479b4969adc42d8feea7c',
-    //   name: '修改密码',
-    //   order_num: 999,
-    //   path: '/acccount/updatepd',
-    //   component: '/acccount/updatepd/index',
-    //   type: '1',
-    //   is_use: '0',
-    //   for_platform: '0'
-    // }
-  ]
+  menuList: []
 };

+ 20 - 25
src/router/index.ts

@@ -23,6 +23,11 @@ const system = [
     meta: { title: '字典数据管理' },
     component: () => import('@/views/system/dictData/index.vue')
   },
+  {
+    path: '/system/config',
+    meta: { title: '平台设置' },
+    component: () => import('@/views/system/config/index.vue')
+  },
   {
     path: '/acccount/updatepd',
     meta: { title: '修改密码' },
@@ -43,34 +48,24 @@ const user = [
 ];
 const core = [
   {
-    path: '/config',
-    meta: { title: '相关设置' },
-    component: () => import('@/views/core/config/index.vue')
-  },
-  {
-    path: '/menu',
-    meta: { title: '菜品管理' },
-    component: () => import('@/views/core/menu/index.vue')
-  },
-  {
-    path: '/rate',
-    meta: { title: '菜品评价' },
-    component: () => import('@/views/core/menu/rate.vue')
+    path: '/apply',
+    meta: { title: '申请记录管理' },
+    component: () => import('@/views/core/apply/index.vue')
   },
   {
-    path: '/arrange',
-    meta: { title: '安排管理' },
-    component: () => import('@/views/core/arrange/index.vue')
+    path: '/business',
+    meta: { title: '业务管理' },
+    component: () => import('@/views/core/business/index.vue')
   },
   {
-    path: '/order',
-    meta: { title: '订单管理' },
-    component: () => import('@/views/core/order/index.vue')
+    path: '/path',
+    meta: { title: '申办流程管理' },
+    component: () => import('@/views/core/path/index.vue')
   },
   {
-    path: '/news',
-    meta: { title: '新闻管理' },
-    component: () => import('@/views/core/news/index.vue')
+    path: '/personnel',
+    meta: { title: '业务员管理' },
+    component: () => import('@/views/core/personnel/index.vue')
   }
 ];
 const router = createRouter({
@@ -83,12 +78,12 @@ const router = createRouter({
     {
       path: '/login',
       name: 'login',
-      meta: { title: '食堂管理平台-账号登录' },
+      meta: { title: '赋强公证管理平台-账号登录' },
       component: () => import('@/views/login/index.vue')
     },
     {
       path: '/homeIndex',
-      meta: { title: '食堂管理平台-系统首页' },
+      meta: { title: '赋强公证管理平台-系统首页' },
       component: () => import('@/components/admin-frame/home.vue'),
       children: [
         ...system,
@@ -96,7 +91,7 @@ const router = createRouter({
         ...core,
         {
           path: '/homeIndex',
-          meta: { title: '食堂管理平台-系统首页' },
+          meta: { title: '赋强公证管理平台-系统首页' },
           component: () => import('@/views/home/index.vue')
         }
       ]

+ 2 - 2
src/stores/core/order.ts

@@ -5,9 +5,9 @@ import _ from 'lodash';
 import type { IQueryType, IQueryResult, IQueryParams } from '@/util/types.util';
 const axios = new AxiosWrapper();
 const api = {
-  url: `/order`
+  url: `/apply`
 };
-export const OrderStore = defineStore('order', () => {
+export const ApplyStore = defineStore('apply', () => {
   const query = async ({ skip = 0, limit = undefined, ...info }: IQueryParams = {}): Promise<IQueryResult> => {
     let cond: IQueryType = {};
     if (skip) cond.skip = skip;

+ 0 - 48
src/stores/core/arrange.ts

@@ -1,48 +0,0 @@
-import { defineStore } from 'pinia';
-import { AxiosWrapper } from '@/util/axios-wrapper';
-import _ from 'lodash';
-
-import type { IQueryType, IQueryResult, IQueryParams } from '@/util/types.util';
-const axios = new AxiosWrapper();
-const api = {
-  url: `/arrange`
-};
-export const ArrangeStore = defineStore('arrange', () => {
-  const query = async ({ skip = 0, limit = undefined, ...info }: IQueryParams = {}): Promise<IQueryResult> => {
-    let cond: IQueryType = {};
-    if (skip) cond.skip = skip;
-    if (limit) cond.limit = limit;
-    cond = { ...cond, ...info };
-    const res = await axios.$get(`${api.url}`, cond);
-    return res;
-  };
-  const getByDate = async (info: IQueryParams = {}): Promise<IQueryResult> => {
-    const res = await axios.$get(`${api.url}/getByDate`, info);
-    return res;
-  };
-  const fetch = async (payload: any): Promise<IQueryResult> => {
-    const res = await axios.$get(`${api.url}/${payload}`);
-    return res;
-  };
-  const create = async (payload: any): Promise<IQueryResult> => {
-    const res = await axios.$post(`${api.url}`, payload);
-    return res;
-  };
-  const update = async (payload: any): Promise<IQueryResult> => {
-    const id = _.get(payload, 'id', _.get(payload, '_id'));
-    const res = await axios.$post(`${api.url}/${id}`, payload);
-    return res;
-  };
-  const del = async (payload: any): Promise<IQueryResult> => {
-    const res = await axios.$delete(`${api.url}/${payload}`);
-    return res;
-  };
-  return {
-    query,
-    getByDate,
-    fetch,
-    create,
-    update,
-    del
-  };
-});

+ 2 - 2
src/stores/core/menu.ts

@@ -5,9 +5,9 @@ import _ from 'lodash';
 import type { IQueryType, IQueryResult, IQueryParams } from '@/util/types.util';
 const axios = new AxiosWrapper();
 const api = {
-  url: `/menu`
+  url: `/business`
 };
-export const MenuStore = defineStore('menu', () => {
+export const BusinessStore = defineStore('business', () => {
   const query = async ({ skip = 0, limit = undefined, ...info }: IQueryParams = {}): Promise<IQueryResult> => {
     let cond: IQueryType = {};
     if (skip) cond.skip = skip;

+ 2 - 2
src/stores/core/news.ts

@@ -5,9 +5,9 @@ import _ from 'lodash';
 import type { IQueryType, IQueryResult, IQueryParams } from '@/util/types.util';
 const axios = new AxiosWrapper();
 const api = {
-  url: `/news`
+  url: `/path`
 };
-export const NewsStore = defineStore('news', () => {
+export const PathStore = defineStore('path', () => {
   const query = async ({ skip = 0, limit = undefined, ...info }: IQueryParams = {}): Promise<IQueryResult> => {
     let cond: IQueryType = {};
     if (skip) cond.skip = skip;

+ 2 - 2
src/stores/core/rate.ts

@@ -5,9 +5,9 @@ import _ from 'lodash';
 import type { IQueryType, IQueryResult, IQueryParams } from '@/util/types.util';
 const axios = new AxiosWrapper();
 const api = {
-  url: `/rate`
+  url: `/personnel`
 };
-export const RateStore = defineStore('rate', () => {
+export const PersonnelStore = defineStore('personnel', () => {
   const query = async ({ skip = 0, limit = undefined, ...info }: IQueryParams = {}): Promise<IQueryResult> => {
     let cond: IQueryType = {};
     if (skip) cond.skip = skip;

+ 0 - 43
src/stores/core/shop.ts

@@ -1,43 +0,0 @@
-import { defineStore } from 'pinia';
-import { AxiosWrapper } from '@/util/axios-wrapper';
-import _ from 'lodash';
-
-import type { IQueryType, IQueryResult, IQueryParams } from '@/util/types.util';
-const axios = new AxiosWrapper();
-const api = {
-  url: `/shop`
-};
-export const ShopStore = defineStore('shop', () => {
-  const query = async ({ skip = 0, limit = undefined, ...info }: IQueryParams = {}): Promise<IQueryResult> => {
-    let cond: IQueryType = {};
-    if (skip) cond.skip = skip;
-    if (limit) cond.limit = limit;
-    cond = { ...cond, ...info };
-    const res = await axios.$get(`${api.url}`, cond);
-    return res;
-  };
-  const fetch = async (payload: any): Promise<IQueryResult> => {
-    const res = await axios.$get(`${api.url}/${payload}`);
-    return res;
-  };
-  const create = async (payload: any): Promise<IQueryResult> => {
-    const res = await axios.$post(`${api.url}`, payload);
-    return res;
-  };
-  const update = async (payload: any): Promise<IQueryResult> => {
-    const id = _.get(payload, 'id', _.get(payload, '_id'));
-    const res = await axios.$post(`${api.url}/${id}`, payload);
-    return res;
-  };
-  const del = async (payload: any): Promise<IQueryResult> => {
-    const res = await axios.$delete(`${api.url}/${payload}`);
-    return res;
-  };
-  return {
-    query,
-    fetch,
-    create,
-    update,
-    del
-  };
-});

+ 3 - 3
src/views/core/menu/index.vue

@@ -40,7 +40,7 @@
           </el-table>
         </template>
         <template #img>
-          <cUpload model="img" :list="form.img" :limit="1" url="/files/canteen/menu/upload" listType="picture-card" @change="onUpload"></cUpload>
+          <cUpload model="img" :list="form.img" :limit="1" url="/files/notarization/apply/upload" listType="picture-card" @change="onUpload"></cUpload>
         </template>
       </cForm>
     </el-col>
@@ -51,7 +51,7 @@
 import { ref, Ref, onMounted, inject } from 'vue';
 import { useRouter } from 'vue-router';
 // NeedChange
-import { MenuStore } from '@/stores/core/menu';
+import { ApplyStore } from '@/stores/core/apply';
 import { DictDataStore } from '@/stores/system/dictData';
 import type { IQueryResult } from '@/util/types.util';
 import { cloneDeep, get } from 'lodash';
@@ -67,7 +67,7 @@ onMounted(async () => {
 const router = useRouter();
 const loading: Ref<any> = ref(false);
 // NeedChange
-const store = MenuStore();
+const store = ApplyStore();
 const dictDataStore = DictDataStore();
 const $checkRes = inject('$checkRes') as Function;
 

+ 0 - 185
src/views/core/arrange/index.vue

@@ -1,185 +0,0 @@
-<template>
-  <el-row>
-    <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-      <el-row :gutter="10">
-        <el-col :span="8" class="one">
-          <el-calendar v-model="date">
-            <template #date-cell="{ data }">
-              <p :class="data.isSelected ? 'is-selected' : ''">
-                {{ data.day.split('-').slice(2).join('-') }}
-                {{ data.isSelected ? '✔️' : '' }}
-              </p>
-            </template>
-          </el-calendar>
-        </el-col>
-        <el-col :span="16" class="two">
-          <el-tabs v-model="active" type="border-card">
-            <el-tab-pane label="早餐" name="breakfast">
-              <el-col :span="24" class="button">
-                <cButton @toAdd="toAdd"> </cButton>
-              </el-col>
-              <cTable :fields="fields" :opera="opera" :list="form.arrange.breakfast" @del="toDel" :usePage="false"> </cTable>
-            </el-tab-pane>
-            <el-tab-pane label="午餐" name="lunch">
-              <el-col :span="24" class="button">
-                <cButton @toAdd="toAdd"> </cButton>
-              </el-col>
-              <cTable :fields="fields" :opera="opera" :list="form.arrange.lunch" @del="toDel" :usePage="false"> </cTable>
-            </el-tab-pane>
-            <el-tab-pane label="晚餐" name="dinner">
-              <el-col :span="24" class="button">
-                <cButton @toAdd="toAdd"> </cButton>
-              </el-col>
-              <cTable :fields="fields" :opera="opera" :list="form.arrange.dinner" @del="toDel" :usePage="false"> </cTable>
-            </el-tab-pane>
-          </el-tabs>
-        </el-col>
-      </el-row>
-    </el-col>
-  </el-row>
-  <cDialog :dialog="dialog" @toClose="toClose">
-    <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
-      <cTable
-        :fields="[
-          { label: '菜品', model: 'name' },
-          { label: '卡路里(大卡)', model: 'reserve' }
-        ]"
-        :opera="foodOpera"
-        :list="foodList"
-        @select="toSelect"
-        :usePage="false"
-      >
-      </cTable>
-    </el-col>
-  </cDialog>
-</template>
-
-<script setup lang="ts">
-import { ref, Ref, onMounted, inject, watch } from 'vue';
-import moment from 'moment';
-// NeedChange
-import { ArrangeStore } from '@/stores/core/arrange';
-import { MenuStore } from '@/stores/core/menu';
-import type { IQueryResult } from '@/util/types.util';
-import baseStore from '@/stores/counter';
-import { cloneDeep, get } from 'lodash';
-const user = ref(baseStore.state.user);
-onMounted(async () => {
-  loading.value = true;
-  await searchOther();
-  await search();
-  loading.value = false;
-});
-const date: Ref<any> = ref(new Date());
-const active: Ref<any> = ref('breakfast');
-const loading: Ref<any> = ref(false);
-// NeedChange
-const store = ArrangeStore();
-const menuStore = MenuStore();
-const $checkRes = inject('$checkRes') as Function;
-
-// #region 字典
-// NeedChange
-const searchOther = async () => {
-  let res: IQueryResult;
-  // 菜品
-  res = await menuStore.query({ is_use: '0' });
-  if ($checkRes(res)) foodList.value = res.data;
-};
-// #endregion
-// #region 查询相关
-const search = async () => {
-  const info = { date: moment(date.value).format('YYYY-MM-DD') };
-  const res: IQueryResult = await store.getByDate(info);
-  if (res.errcode == '0' && get(res.data, 'date')) form.value = res.data;
-  else form.value = { arrange: { breakfast: [], lunch: [], dinner: [] } };
-  active.value = 'breakfast';
-};
-// #endregion
-
-// #region 表格及操作
-// NeedChange
-let fields: Ref<any[]> = ref([
-  { label: '菜品名称', model: 'name' },
-  { label: '卡路里(大卡)', model: 'reserve' }
-]);
-// 操作
-let opera: Ref<any[]> = ref([{ label: '删除', method: 'del', confirm: true, type: 'danger' }]);
-const toAdd = () => {
-  dialog.value.show = true;
-};
-// #endregion
-
-// #region 常规接口
-const toSelect = async (data) => {
-  form.value.arrange[active.value].push(data);
-  const arr = cloneDeep(form.value);
-  arr.date = moment(date.value).format('YYYY-MM-DD');
-  let res: IQueryResult;
-  if (get(arr, '_id')) res = await store.update(arr);
-  else res = await store.create(arr);
-  if ($checkRes(res, true)) {
-    search();
-    toClose();
-  }
-};
-const toDel = async (data) => {
-  form.value.arrange[active.value] = form.value.arrange[active.value].filter((item) => {
-    if (item._id != data._id) return item;
-  });
-  const arr = cloneDeep(form.value);
-  let res: IQueryResult = await store.update(arr);
-  if ($checkRes(res, true)) {
-    search();
-  }
-};
-
-// #endregion
-
-// #region 表单及操作
-// NeedChange
-const foodList: Ref<any> = ref([]);
-const foodOpera: Ref<any[]> = ref([{ label: '选择', method: 'select', display: (i) => isSelect(i) }]);
-const form: Ref<any> = ref({ arrange: { breakfast: [], lunch: [], dinner: [] } });
-const dialog: Ref<any> = ref({ title: '数据信息', show: false, type: '1' });
-// 关闭弹框
-const toClose = () => {
-  dialog.value.show = false;
-};
-const isSelect = (i) => {
-  if (i) {
-    const res = form.value.arrange[active.value].find((f) => f._id === i._id);
-    if (res) return false;
-    return true;
-  }
-};
-watch(
-  date,
-  (newVal) => {
-    if (newVal) {
-      search();
-    }
-  },
-  {
-    deep: true
-  }
-);
-// #endregion
-</script>
-
-<style scoped lang="scss">
-.main {
-  .one {
-    .is-selected {
-      color: #1989fa;
-    }
-  }
-
-  .two {
-    margin: 8px 0 0 0;
-    .button {
-      margin: 0 0 5px 0;
-    }
-  }
-}
-</style>

+ 4 - 4
src/views/core/news/index.vue

@@ -20,10 +20,10 @@
     <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
       <cForm :span="24" :fields="formFields" :form="form" :rules="{}" @save="toSave" label-width="auto">
         <template #img>
-          <cUpload model="img" :list="form.img" :limit="1" url="/files/canteen/news/upload" listType="picture-card" @change="onUpload"></cUpload>
+          <cUpload model="img" :list="form.img" :limit="1" url="/files/notarization/news/upload" listType="picture-card" @change="onUpload"></cUpload>
         </template>
         <template #content>
-          <cEditor v-model="form.content" url="/files/canteen/news/upload"></cEditor>
+          <cEditor v-model="form.content" url="/files/notarization/news/upload"></cEditor>
         </template>
       </cForm>
     </el-col>
@@ -33,7 +33,7 @@
 <script setup lang="ts">
 import { ref, Ref, onMounted, inject } from 'vue';
 // NeedChange
-import { NewsStore } from '@/stores/core/news';
+import { BusinessStore } from '@/stores/core/business';
 import { DictDataStore } from '@/stores/system/dictData';
 import type { IQueryResult } from '@/util/types.util';
 import { cloneDeep, get } from 'lodash';
@@ -48,7 +48,7 @@ onMounted(async () => {
 
 const loading: Ref<any> = ref(false);
 // NeedChange
-const store = NewsStore();
+const store = BusinessStore();
 const dictDataStore = DictDataStore();
 const $checkRes = inject('$checkRes') as Function;
 

+ 0 - 155
src/views/core/menu/rate.vue

@@ -1,155 +0,0 @@
-<template>
-  <el-row>
-    <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-      <el-col :span="24" class="one">
-        <cSearch :is_title="false" :is_back="true" @toBack="toBack"></cSearch>
-      </el-col>
-      <el-col :span="24" class="thr">
-        <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @view="toView" @changeUse="toChangeUse"> </cTable>
-      </el-col>
-    </el-col>
-  </el-row>
-  <cDialog :dialog="dialog" @toClose="toClose">
-    <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
-      <cForm :span="24" :fields="formFields" :form="form" :rules="{}" :isSave="false" label-width="auto">
-        <template #content>
-          <cEditor v-model="form.content" url="/files/canteen/news/upload"></cEditor>
-        </template>
-      </cForm>
-    </el-col>
-  </cDialog>
-</template>
-
-<script setup lang="ts">
-import { ref, Ref, onMounted, inject } from 'vue';
-import { useRoute } from 'vue-router';
-// NeedChange
-import { RateStore } from '@/stores/core/rate';
-import { DictDataStore } from '@/stores/system/dictData';
-import type { IQueryResult } from '@/util/types.util';
-import { get } from 'lodash';
-import baseStore from '@/stores/counter';
-const user = ref(baseStore.state.user);
-onMounted(async () => {
-  loading.value = true;
-  await searchOther();
-  await search({ skip, limit });
-  loading.value = false;
-});
-// 路由
-const route = useRoute();
-const loading: Ref<any> = ref(false);
-// NeedChange
-const store = RateStore();
-const dictDataStore = DictDataStore();
-const $checkRes = inject('$checkRes') as Function;
-
-// #region 字典
-// NeedChange
-const statusList: Ref<any> = ref([]);
-
-const searchOther = async () => {
-  let res: IQueryResult;
-  // 是否使用
-  res = await dictDataStore.query({ code: 'isUse', is_use: '0' });
-  if ($checkRes(res)) statusList.value = res.data;
-};
-// #endregion
-
-// #region 查询相关
-let list: Ref<any> = ref([]);
-let total: Ref<number> = ref(0);
-let skip = 0;
-let limit = inject('$limit') as number;
-let searchForm: Ref<any> = ref({});
-
-const search = async (e: { skip: number; limit: number }) => {
-  let id = route.query.id;
-  if (id) {
-    const info = { skip: e.skip, limit: e.limit, ...searchForm.value, menu_id: id };
-    const res: IQueryResult = await store.query(info);
-    if (res.errcode == '0') {
-      list.value = res.data;
-      total.value = res.total;
-    }
-  }
-};
-const toChangeUse = async (data) => {
-  let status = '0';
-  switch (data.is_use) {
-    case '0':
-      status = '1';
-      break;
-    case '1':
-      status = '0';
-      break;
-    default:
-      break;
-  }
-  const udata = { _id: data._id, is_use: status };
-  const res = await store.update(udata);
-  if ($checkRes(res, true)) {
-    search({ skip: 0, limit });
-  }
-};
-// #endregion
-
-// #region 表格及操作
-// NeedChange
-let fields: Ref<any[]> = ref([
-  { label: '菜品名称', model: 'menu_id' },
-  { label: '用户名称', model: 'openid' },
-  { label: '评分', model: 'score' },
-  { label: '状态', model: 'is_use', format: (i) => getDict(i, 'is_use'), isSearch: true, type: 'select' }
-]);
-// 操作
-let opera: Ref<any[]> = ref([
-  { label: '查看', method: 'view' },
-  { label: '禁用', method: 'changeUse', type: 'warning', confirm: true, display: (i) => i.is_use === '0' },
-  { label: '使用', method: 'changeUse', type: 'success', confirm: true, display: (i) => i.is_use === '1' }
-]);
-
-const getDict = (data, model) => {
-  let list;
-  switch (model) {
-    case 'is_use':
-      list = statusList.value;
-      break;
-    default:
-      break;
-  }
-  if (!list) return;
-  const res = list.find((f) => f.value == data);
-  return get(res, 'label');
-};
-const toView = async (data) => {
-  formFields.value = formFields;
-  form.value = { ...data };
-  dialog.value.show = true;
-};
-// #endregion
-
-// #region 表单及操作
-// NeedChange
-const formFields: Ref<any> = ref([{ label: '内容', model: 'content', custom: true }]);
-const dialog: Ref<any> = ref({ title: '数据信息', show: false, type: '1' });
-const form: Ref<any> = ref({ img: [] });
-// 关闭弹框
-const toClose = () => {
-  form.value = {};
-  dialog.value.show = false;
-};
-// 返回上一页
-const toBack = () => {
-  window.history.go(-1);
-};
-// #endregion
-</script>
-<style scoped lang="scss">
-.main {
-  .one {
-    display: flex;
-    justify-content: flex-end;
-  }
-}
-</style>

+ 0 - 62
src/views/core/order/parts/meal.vue

@@ -1,62 +0,0 @@
-<template>
-  <div id="meal">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-row v-if="form?.list.length > 0">
-          <el-col :span="24"> 总卡路里:{{ form.reserve }}大卡 </el-col>
-          <el-col :span="24"> {{ getDict(form.status, 'schedule') }} </el-col>
-          <el-col :span="24">
-            <cTable :fields="fields" :opera="[]" :list="form.list" :usePage="false"> </cTable>
-          </el-col>
-        </el-row>
-        <el-row v-else class="empty">
-          <el-empty description="未订餐" />
-        </el-row>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script setup lang="ts">
-import { ref, Ref, toRefs } from 'vue';
-import { get } from 'lodash';
-// #region 传递
-interface fieldsItem {
-  is_use: string;
-  code: string;
-  label: string;
-  value: string;
-  sort: number;
-  _id: string;
-}
-const props = defineProps({
-  form: { type: Object, default: () => { } },
-  scheduleList: { type: Array<fieldsItem>, default: () => [] }
-});
-const { form, scheduleList } = toRefs(props);
-let fields: Ref<any[]> = ref([
-  { label: '菜品名称', model: 'name' },
-  { label: '卡路里(大卡)', model: 'reserve' }
-]);
-const getDict = (data, model) => {
-  let list;
-  switch (model) {
-    case 'schedule':
-      list = scheduleList.value;
-      break;
-    default:
-      break;
-  }
-  if (!list) return;
-  const res = list.find((f) => f.value == data);
-  return get(res, 'label');
-};
-</script>
-<style scoped lang="scss">
-.main {
-  .empty {
-    display: flex;
-    justify-content: center;
-  }
-}
-</style>

+ 5 - 12
src/views/core/order/index.vue

@@ -16,15 +16,9 @@
   <cDialog :dialog="dialog" @toClose="toClose">
     <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
       <el-tabs v-model="active" type="border-card">
-        <el-tab-pane label="早餐" name="breakfast">
-          <meal :form="form.breakfast" :scheduleList="scheduleList" />
-        </el-tab-pane>
-        <el-tab-pane label="午餐" name="lunch">
-          <meal :form="form.lunch" :scheduleList="scheduleList" />
-        </el-tab-pane>
-        <el-tab-pane label="晚餐" name="dinner">
-          <meal :form="form.dinner" :scheduleList="scheduleList" />
-        </el-tab-pane>
+        <el-tab-pane label="早餐" name="breakfast"> </el-tab-pane>
+        <el-tab-pane label="午餐" name="lunch"> </el-tab-pane>
+        <el-tab-pane label="晚餐" name="dinner"> </el-tab-pane>
       </el-tabs>
     </el-col>
   </cDialog>
@@ -32,10 +26,9 @@
 
 <script setup lang="ts">
 // 组件
-import meal from './parts/meal.vue';
 import { ref, Ref, onMounted, inject } from 'vue';
 // NeedChange
-import { OrderStore } from '@/stores/core/order';
+import { PathStore } from '@/stores/core/path';
 import { DictDataStore } from '@/stores/system/dictData';
 import type { IQueryResult } from '@/util/types.util';
 import { get } from 'lodash';
@@ -51,7 +44,7 @@ onMounted(async () => {
 const loading: Ref<any> = ref(false);
 const active: Ref<any> = ref('breakfast');
 // NeedChange
-const store = OrderStore();
+const store = PathStore();
 const dictDataStore = DictDataStore();
 const $checkRes = inject('$checkRes') as Function;
 

+ 244 - 0
src/views/core/personnel/index.vue

@@ -0,0 +1,244 @@
+<template>
+  <el-row>
+    <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+      <el-col :span="24" class="one">
+        <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch">
+          <template #is_use>
+            <el-option v-for="i in statusList" :key="i._id" :label="i.label" :value="i.value"></el-option>
+          </template>
+        </cSearch>
+      </el-col>
+      <el-col :span="24" class="two">
+        <cButton @toAdd="toAdd"> </cButton>
+      </el-col>
+      <el-col :span="24" class="thr">
+        <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @rate="toRate" @edit="toEdit" @del="toDel" @changeUse="toChangeUse"> </cTable>
+      </el-col>
+    </el-col>
+  </el-row>
+  <cDialog :dialog="dialog" @toClose="toClose">
+    <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
+      <cForm :span="24" :fields="formFields" :form="form" :rules="{}" @save="toSave" label-width="auto">
+        <template #params>
+          <el-button class="button" type="primary" size="mini" @click="paramsAdd()">添加</el-button>
+          <el-table :data="form.params" border size="mini">
+            <el-table-column label="参数名" prop="label" align="center">
+              <template #default="scope">
+                <el-input v-model="scope.row.label" placeholder="请输入参数名"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column label="参数值" prop="value" align="center">
+              <template #default="scope">
+                <el-input v-model="scope.row.value" placeholder="请输入参数值"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" align="center">
+              <template #default="scope">
+                <el-button type="danger" size="mini" @click="paramsDel(scope.$index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+        <template #img>
+          <cUpload model="img" :list="form.img" :limit="1" url="/files/notarization/apply/upload" listType="picture-card" @change="onUpload"></cUpload>
+        </template>
+      </cForm>
+    </el-col>
+  </cDialog>
+</template>
+
+<script setup lang="ts">
+import { ref, Ref, onMounted, inject } from 'vue';
+import { useRouter } from 'vue-router';
+// NeedChange
+import { PersonnelStore } from '@/stores/core/personnel';
+import { DictDataStore } from '@/stores/system/dictData';
+import type { IQueryResult } from '@/util/types.util';
+import { cloneDeep, get } from 'lodash';
+import baseStore from '@/stores/counter';
+const user = ref(baseStore.state.user);
+onMounted(async () => {
+  loading.value = true;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+// 路由
+const router = useRouter();
+const loading: Ref<any> = ref(false);
+// NeedChange
+const store = PersonnelStore();
+const dictDataStore = DictDataStore();
+const $checkRes = inject('$checkRes') as Function;
+
+// #region 字典
+// NeedChange
+const statusList: Ref<any> = ref([]);
+
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 是否使用
+  res = await dictDataStore.query({ code: 'isUse', is_use: '0' });
+  if ($checkRes(res)) statusList.value = res.data;
+};
+// #endregion
+
+// #region 查询相关
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit = inject('$limit') as number;
+let searchForm: Ref<any> = ref({});
+
+const search = async (e: { skip: number; limit: number }) => {
+  const info = { skip: e.skip, limit: e.limit, ...searchForm.value };
+  const res: IQueryResult = await store.query(info);
+  if (res.errcode == '0') {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const toChangeUse = async (data) => {
+  let status = '0';
+  switch (data.is_use) {
+    case '0':
+      status = '1';
+      break;
+    case '1':
+      status = '0';
+      break;
+    default:
+      break;
+  }
+  const udata = { _id: data._id, is_use: status };
+  const res = await store.update(udata);
+  if ($checkRes(res, true)) {
+    search({ skip: 0, limit });
+  }
+};
+// #endregion
+
+// #region 表格及操作
+// NeedChange
+let fields: Ref<any[]> = ref([
+  { label: '菜品名称', model: 'name', isSearch: true },
+  { label: '卡路里(大卡)', model: 'reserve' },
+  { label: '状态', model: 'is_use', format: (i) => getDict(i, 'is_use'), isSearch: true, type: 'select' }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '修改', method: 'edit' },
+  { label: '评价', method: 'rate' },
+  { label: '禁用', method: 'changeUse', type: 'warning', confirm: true, display: (i) => i.is_use === '0' },
+  { label: '使用', method: 'changeUse', type: 'success', confirm: true, display: (i) => i.is_use === '1' },
+  { label: '删除', method: 'del', confirm: true, type: 'danger' }
+]);
+
+const getDict = (data, model) => {
+  let list;
+  switch (model) {
+    case 'is_use':
+      list = statusList.value;
+      break;
+    default:
+      break;
+  }
+  if (!list) return;
+  const res = list.find((f) => f.value == data);
+  return get(res, 'label');
+};
+const toAdd = () => {
+  formFields.value = formFieldsForCreate;
+  // 所属人是自己,需要把自己的id放进去
+  form.value = { ...cloneDeep(defaultForm) };
+  dialog.value.show = true;
+};
+const toEdit = async (data) => {
+  formFields.value = formFieldsForUpdate;
+  form.value = { ...data };
+  dialog.value.show = true;
+};
+// 菜品评价
+const toRate = async (data) => {
+  router.push({ path: '/rate', query: { id: data._id } });
+};
+// #endregion
+
+// #region 常规接口
+const toSave = async () => {
+  const data = cloneDeep(form.value);
+  let res: IQueryResult;
+  if (get(data, '_id')) res = await store.update(data);
+  else res = await store.create(data);
+  if ($checkRes(res, true)) {
+    search({ skip: 0, limit });
+    toClose();
+  }
+};
+const toDel = async (data) => {
+  const res = await store.del(data._id);
+  if ($checkRes(res, true)) {
+    search({ skip: 0, limit });
+  }
+};
+
+// #endregion
+
+// #region 表单及操作
+// NeedChange
+const defaultForm = { is_use: '0', img: [] };
+const formFields: Ref<any> = ref();
+const dialog: Ref<any> = ref({ title: '数据信息', show: false, type: '1' });
+const form: Ref<any> = ref({ img: [], params: [] });
+const formFieldsForCreate = [
+  { label: '菜品名称', model: 'name' },
+  { label: '卡路里(大卡)', model: 'reserve', type: 'number' },
+  { label: '参数列表', model: 'params', custom: true },
+  { label: '图片', model: 'img', custom: true },
+  { label: '菜品介绍', model: 'content', type: 'textarea' },
+  { label: '备注', model: 'remark', type: 'textarea' }
+];
+const formFieldsForUpdate = [
+  { label: '菜品名称', model: 'name' },
+  { label: '卡路里(大卡)', model: 'reserve', type: 'number' },
+  { label: '参数列表', model: 'params', custom: true },
+  { label: '图片', model: 'img', custom: true },
+  { label: '菜品介绍', model: 'content', type: 'textarea' },
+  { label: '备注', model: 'remark', type: 'textarea' }
+];
+// 添加参数
+const paramsAdd = () => {
+  let list = form.value.params || [];
+  list.push({});
+  form.value.params = list;
+};
+// 删除参数
+const paramsDel = (index: number) => {
+  let list = form.value.params;
+  list.splice(index, 1);
+  form.value.params = list;
+};
+// 关闭弹框
+const toClose = () => {
+  form.value = {};
+  dialog.value.show = false;
+};
+const onUpload = (e: { model: string; value: Array<[]> }) => {
+  console.log(e);
+  const { model, value } = e;
+  form.value[model] = value;
+};
+// #endregion
+</script>
+
+<style scoped lang="scss">
+.dialog_one {
+  .button {
+    margin: 0 0 5px 0;
+  }
+}
+</style>

+ 1 - 1
src/views/home/index.vue

@@ -5,7 +5,7 @@
         <el-col :span="24" class="one">
           <el-row class="one_1">
             <el-col :span="24" class="title">
-              <span>食堂管理平台统计</span>
+              <span>赋强公证管理平台统计</span>
             </el-col>
             <el-col :span="24" class="info"> </el-col>
           </el-row>

src/views/core/config/index.vue → src/views/system/config/index.vue


+ 3 - 3
vite.config.ts

@@ -16,11 +16,11 @@ export default defineConfig(({ mode }) => {
       port: 9001,
       proxy: {
         '/files': {
-          target: 'http://192.168.1.197', // https://broadcast.waityou24.cn
+          target: 'http://127.0.0.1', // https://broadcast.waityou24.cn
           changeOrigin: true
         },
-        '/st/api': {
-          target: 'http://192.168.1.197:9902', //https://www.ccwit.net
+        '/notarization/api': {
+          target: 'http://127.0.0.1:9990', //https://www.ccwit.net
           changeOrigin: true,
           ws: false
         }