Ver Fonte

修改页面

zs há 1 ano atrás
pai
commit
d3f4c3e210

+ 26 - 62
src/assets/icon/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
-  font-family: "iconfont"; /* Project id 4079354 */
-  src: url('iconfont.woff2?t=1685509924120') format('woff2'),
-       url('iconfont.woff?t=1685509924120') format('woff'),
-       url('iconfont.ttf?t=1685509924120') format('truetype');
+  font-family: "iconfont"; /* Project id 4182834 */
+  src: url('iconfont.woff2?t=1690504779226') format('woff2'),
+       url('iconfont.woff?t=1690504779226') format('woff'),
+       url('iconfont.ttf?t=1690504779226') format('truetype');
 }
 
 .iconfont {
@@ -13,83 +13,47 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
-.icon-dengji:before {
-  content: "\e610";
+.icon-yonghu:before {
+  content: "\e643";
 }
 
-.icon-shenhezhong:before {
-  content: "\e682";
+.icon-shezhi:before {
+  content: "\10127";
 }
 
-.icon-dkw_shenheweitongguo:before {
-  content: "\e604";
+.icon-shouye:before {
+  content: "\10128";
 }
 
-.icon-shenhetongguo:before {
-  content: "\e668";
+.icon-taocan:before {
+  content: "\10129";
 }
 
-.icon-hearts-fill:before {
-  content: "\e702";
+.icon-pingjia:before {
+  content: "\1012a";
 }
 
-.icon-xiaoyouhui:before {
-  content: "\e601";
+.icon-fuwu:before {
+  content: "\1012b";
 }
 
-.icon-youjiantou-copy:before {
-  content: "\e654";
+.icon-bangzhuzhongxin:before {
+  content: "\1012c";
 }
 
-.icon-6ruxueshijian:before {
-  content: "\e88a";
+.icon-tukuguanli:before {
+  content: "\1012d";
 }
 
-.icon-zhuanyezhuanyeke:before {
-  content: "\e6a1";
+.icon-gengduo:before {
+  content: "\1012e";
 }
 
-.icon-commpany:before {
-  content: "\e612";
+.icon-haoyoutuijian:before {
+  content: "\1012f";
 }
 
-.icon-zhiwuguanli:before {
-  content: "\e60f";
-}
-
-.icon-guanzhu:before {
-  content: "\e611";
-}
-
-.icon-guanzhu1:before {
-  content: "\e600";
-}
-
-.icon-edu-line:before {
-  content: "\e63a";
-}
-
-.icon-gender:before {
-  content: "\e63e";
-}
-
-.icon-xingming:before {
-  content: "\e640";
-}
-
-.icon-jibenxinxi:before {
-  content: "\e67c";
-}
-
-.icon-iocn_be_concern:before {
-  content: "\e607";
-}
-
-.icon-tupianshangchuan:before {
-  content: "\e639";
-}
-
-.icon-wodeguanzhu:before {
-  content: "\e8bc";
+.icon-zengjia:before {
+  content: "\e608";
 }
 

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
src/assets/icon/iconfont.js


+ 57 - 120
src/assets/icon/iconfont.json

@@ -1,149 +1,86 @@
 {
-  "id": "4079354",
-  "name": "校友信息登记",
+  "id": "4182834",
+  "name": "耗材",
   "font_family": "iconfont",
   "css_prefix_text": "icon-",
   "description": "",
   "glyphs": [
     {
-      "icon_id": "1327399",
-      "name": "登记",
-      "font_class": "dengji",
-      "unicode": "e610",
-      "unicode_decimal": 58896
+      "icon_id": "16530775",
+      "name": "用户",
+      "font_class": "yonghu",
+      "unicode": "e643",
+      "unicode_decimal": 58947
     },
     {
-      "icon_id": "1480896",
-      "name": "审核中",
-      "font_class": "shenhezhong",
-      "unicode": "e682",
-      "unicode_decimal": 59010
+      "icon_id": "36409813",
+      "name": "设置",
+      "font_class": "shezhi",
+      "unicode": "10127",
+      "unicode_decimal": 65831
     },
     {
-      "icon_id": "2078809",
-      "name": "dkw_审核未通过",
-      "font_class": "dkw_shenheweitongguo",
-      "unicode": "e604",
-      "unicode_decimal": 58884
+      "icon_id": "36409815",
+      "name": "首页",
+      "font_class": "shouye",
+      "unicode": "10128",
+      "unicode_decimal": 65832
     },
     {
-      "icon_id": "10087856",
-      "name": "审核通过",
-      "font_class": "shenhetongguo",
-      "unicode": "e668",
-      "unicode_decimal": 58984
+      "icon_id": "36409818",
+      "name": "套餐",
+      "font_class": "taocan",
+      "unicode": "10129",
+      "unicode_decimal": 65833
     },
     {
-      "icon_id": "35094512",
-      "name": "关心",
-      "font_class": "hearts-fill",
-      "unicode": "e702",
-      "unicode_decimal": 59138
+      "icon_id": "36409820",
+      "name": "评价",
+      "font_class": "pingjia",
+      "unicode": "1012a",
+      "unicode_decimal": 65834
     },
     {
-      "icon_id": "2726796",
-      "name": "校友会",
-      "font_class": "xiaoyouhui",
-      "unicode": "e601",
-      "unicode_decimal": 58881
+      "icon_id": "36409824",
+      "name": "服务",
+      "font_class": "fuwu",
+      "unicode": "1012b",
+      "unicode_decimal": 65835
     },
     {
-      "icon_id": "10515596",
-      "name": "右箭头",
-      "font_class": "youjiantou-copy",
-      "unicode": "e654",
-      "unicode_decimal": 58964
+      "icon_id": "36409827",
+      "name": "帮助中心",
+      "font_class": "bangzhuzhongxin",
+      "unicode": "1012c",
+      "unicode_decimal": 65836
     },
     {
-      "icon_id": "518145",
-      "name": "6 入学时间",
-      "font_class": "6ruxueshijian",
-      "unicode": "e88a",
-      "unicode_decimal": 59530
+      "icon_id": "36409831",
+      "name": "图库管理",
+      "font_class": "tukuguanli",
+      "unicode": "1012d",
+      "unicode_decimal": 65837
     },
     {
-      "icon_id": "16365912",
-      "name": "专业 专业课",
-      "font_class": "zhuanyezhuanyeke",
-      "unicode": "e6a1",
-      "unicode_decimal": 59041
+      "icon_id": "36409832",
+      "name": "更多",
+      "font_class": "gengduo",
+      "unicode": "1012e",
+      "unicode_decimal": 65838
     },
     {
-      "icon_id": "376346",
-      "name": "工作单位",
-      "font_class": "commpany",
-      "unicode": "e612",
-      "unicode_decimal": 58898
+      "icon_id": "36409833",
+      "name": "好友推荐",
+      "font_class": "haoyoutuijian",
+      "unicode": "1012f",
+      "unicode_decimal": 65839
     },
     {
-      "icon_id": "11672365",
-      "name": "职务管理",
-      "font_class": "zhiwuguanli",
-      "unicode": "e60f",
-      "unicode_decimal": 58895
-    },
-    {
-      "icon_id": "8712978",
-      "name": "关注",
-      "font_class": "guanzhu",
-      "unicode": "e611",
-      "unicode_decimal": 58897
-    },
-    {
-      "icon_id": "9714399",
-      "name": "关注",
-      "font_class": "guanzhu1",
-      "unicode": "e600",
-      "unicode_decimal": 58880
-    },
-    {
-      "icon_id": "6119296",
-      "name": "学历",
-      "font_class": "edu-line",
-      "unicode": "e63a",
-      "unicode_decimal": 58938
-    },
-    {
-      "icon_id": "6183156",
-      "name": "性别",
-      "font_class": "gender",
-      "unicode": "e63e",
-      "unicode_decimal": 58942
-    },
-    {
-      "icon_id": "20764666",
-      "name": "姓名",
-      "font_class": "xingming",
-      "unicode": "e640",
-      "unicode_decimal": 58944
-    },
-    {
-      "icon_id": "6856906",
-      "name": "基本信息",
-      "font_class": "jibenxinxi",
-      "unicode": "e67c",
-      "unicode_decimal": 59004
-    },
-    {
-      "icon_id": "1048854",
-      "name": "被关注",
-      "font_class": "iocn_be_concern",
-      "unicode": "e607",
-      "unicode_decimal": 58887
-    },
-    {
-      "icon_id": "2506206",
-      "name": "图片上传",
-      "font_class": "tupianshangchuan",
-      "unicode": "e639",
-      "unicode_decimal": 58937
-    },
-    {
-      "icon_id": "11372718",
-      "name": "我的关注",
-      "font_class": "wodeguanzhu",
-      "unicode": "e8bc",
-      "unicode_decimal": 59580
+      "icon_id": "25739959",
+      "name": "增加",
+      "font_class": "zengjia",
+      "unicode": "e608",
+      "unicode_decimal": 58888
     }
   ]
 }

BIN
src/assets/icon/iconfont.ttf


BIN
src/assets/icon/iconfont.woff


BIN
src/assets/icon/iconfont.woff2


+ 41 - 24
src/layout/site.ts

@@ -12,57 +12,74 @@ export const menuInfo = {
     textColor: '#ffffff'
   },
   menuList: [
-    { icon: 'iconshouye', _id: 'admin_1', path: '/homeIndex', name: '系统首页' },
+    { icon: 'icon-shouye', _id: 'admin_1', path: '/homeIndex', name: '系统首页' },
     {
-      icon: 'iconshouye',
+      icon: 'icon-yonghu',
       _id: 'admin_2',
       name: '用户管理',
       index: '2',
       type: '0',
       children: [
-        { icon: 'iconshouye', _id: 'admin_2_1', path: '/users/user', name: '普通用户' },
-        { icon: 'iconshouye', _id: 'admin_2_2', path: '/users/admin', name: '街道管理员' },
-        { icon: 'iconshouye', _id: 'admin_2_3', path: '/users/firm', name: '厂商' },
+        { icon: 'icon-yonghu', _id: 'admin_2_1', path: '/users/one', name: '街道管理员' },
+        { icon: 'icon-yonghu', _id: 'admin_2_2', path: '/users/two', name: '厂商' },
+        { icon: 'icon-yonghu', _id: 'admin_2_1', path: '/users/thr', name: '街道人员' },
+        { icon: 'icon-yonghu', _id: 'admin_2_2', path: '/users/four', name: '社区人员' },
+        { icon: 'icon-yonghu', _id: 'admin_2_3', path: '/users/five', name: '会计' },
+        { icon: 'icon-yonghu', _id: 'admin_2_2', path: '/users/six', name: '领导' }
       ]
     },
     {
-      icon: 'iconshouye',
+      icon: 'icon-haoyoutuijian',
       _id: 'admin_3',
-      name: '商品管理',
+      name: '街道管理',
       index: '3',
-      path: '/goods/index'
+      path: '/way/street'
     },
     {
-      icon: 'iconshouye',
+      icon: 'icon-taocan',
       _id: 'admin_4',
-      name: '订单管理',
+      name: '商品管理',
       index: '4',
-      path: '/order/index'
+      path: '/goods/index'
     },
     {
-      icon: 'iconshouye',
+      icon: 'icon-fuwu',
       _id: 'admin_5',
-      name: '系统设置',
+      name: '订单管理',
       index: '5',
+      path: '/order/index'
+    },
+    {
+      icon: 'icon-shezhi',
+      _id: 'admin_6',
+      name: '审批设置',
+      index: '6',
       type: '0',
       children: [
-        { icon: 'iconshouye', _id: 'admin_5_1', path: '/system/config', name: '基础设置' },
-        { icon: 'iconshouye', _id: 'admin_5_2', path: '/system/dict', name: '字典管理' },
-        { icon: 'iconshouye', _id: 'admin_5_3', path: '/system/role', name: '角色设置' },
-        { icon: 'iconshouye', _id: 'admin_5_4', path: '/system/module', name: '首页模块设置' },
-        { icon: 'iconshouye', _id: 'admin_5_5', path: '/system/buy', name: '采购审批设置' },
-        { icon: 'iconshouye', _id: 'admin_5_6', path: '/system/money', name: '回款审批设置' },
+        { icon: 'icon-shezhi', _id: 'admin_6_1', path: '/system/buy', name: '采购审批设置' },
+        { icon: 'icon-shezhi', _id: 'admin_6_2', path: '/system/money', name: '回款审批设置' }
       ]
     },
     {
-      icon: 'iconshouye',
-      _id: 'admin_6',
-      name: '账号管理',
-      index: '6',
+      icon: 'icon-shezhi',
+      _id: 'admin_7',
+      name: '系统设置',
+      index: '7',
       type: '0',
       children: [
-        { icon: 'iconshouye', _id: 'admin_6_1', path: '/acccount/updatepd', name: '修改密码' }
+        { icon: 'icon-shezhi', _id: 'admin_7_1', path: '/system/config', name: '基础设置' },
+        { icon: 'icon-shezhi', _id: 'admin_7_2', path: '/system/dict', name: '字典管理' },
+        { icon: 'icon-shezhi', _id: 'admin_7_3', path: '/system/role', name: '角色设置' },
+        { icon: 'icon-shezhi', _id: 'admin_7_4', path: '/system/module', name: '模块设置' }
       ]
     },
+    {
+      icon: 'icon-tukuguanli',
+      _id: 'admin_8',
+      name: '账号管理',
+      index: '8',
+      type: '0',
+      children: [{ icon: 'icon-tukuguanli', _id: 'admin_8_1', path: '/acccount/updatepd', name: '修改密码' }]
+    }
   ]
 };

+ 32 - 17
src/router/index.ts

@@ -25,34 +25,49 @@ const router = createRouter({
           component: () => import('@/views/home/index.vue')
         },
         {
-          path: '/users/user',
-          meta: { title: '普通用户管理' },
-          component: () => import('@/views/users/user/index.vue')
+          path: '/users/one',
+          meta: { title: '街道管理员' },
+          component: () => import('@/views/users/one/index.vue')
         },
         {
-          path: '/users/user/detail',
-          meta: { title: '信息管理' },
-          component: () => import('@/views/users/user/detail.vue')
+          path: '/users/two',
+          meta: { title: '厂商' },
+          component: () => import('@/views/users/two/index.vue')
         },
         {
-          path: '/users/admin',
-          meta: { title: '街道管理员管理' },
-          component: () => import('@/views/users/admin/index.vue')
+          path: '/users/thr',
+          meta: { title: '街道人员' },
+          component: () => import('@/views/users/thr/index.vue')
         },
         {
-          path: '/users/admin/detail',
-          meta: { title: '信息管理' },
-          component: () => import('@/views/users/admin/detail.vue')
+          path: '/users/four',
+          meta: { title: '社区人员' },
+          component: () => import('@/views/users/four/index.vue')
+        },
+        {
+          path: '/users/five',
+          meta: { title: '会计' },
+          component: () => import('@/views/users/five/index.vue')
         },
         {
-          path: '/users/firm',
-          meta: { title: '厂商管理' },
-          component: () => import('@/views/users/firm/index.vue')
+          path: '/users/six',
+          meta: { title: '领导' },
+          component: () => import('@/views/users/six/index.vue')
         },
         {
-          path: '/users/firm/detail',
+          path: '/users/detail',
           meta: { title: '信息管理' },
-          component: () => import('@/views/users/firm/detail.vue')
+          component: () => import('@/views/users/detail/index.vue')
+        },
+        {
+          path: '/way/street',
+          meta: { title: '街道管理' },
+          component: () => import('@/views/way/street.vue')
+        },
+        {
+          path: '/way/community',
+          meta: { title: '社区管理' },
+          component: () => import('@/views/way/community.vue')
         },
         {
           path: '/goods/index',

+ 52 - 0
src/stores/collection/collection.ts

@@ -0,0 +1,52 @@
+import { ref, computed } from 'vue';
+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: `/material/v1/api/Collection`
+};
+export const CollectionStore = defineStore('collection', () => {
+  const count = ref(0);
+  const doubleCount = computed(() => count.value * 2);
+  function increment() {
+    count.value++;
+  }
+  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 {
+    count,
+    doubleCount,
+    increment,
+    query,
+    fetch,
+    create,
+    update,
+    del
+  };
+});

+ 52 - 0
src/stores/office/office.ts

@@ -0,0 +1,52 @@
+import { ref, computed } from 'vue';
+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: `/material/v1/api/Office`
+};
+export const OfficeStore = defineStore('office', () => {
+  const count = ref(0);
+  const doubleCount = computed(() => count.value * 2);
+  function increment() {
+    count.value++;
+  }
+  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 {
+    count,
+    doubleCount,
+    increment,
+    query,
+    fetch,
+    create,
+    update,
+    del
+  };
+});

+ 36 - 12
src/views/system/buy/index.vue

@@ -17,8 +17,21 @@
       <template v-slot:info>
         <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
           <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="toSave">
+            <template #office>
+              <el-option @click="toChange(i)" v-for="i in officeList" :key="i._id" :label="i.name" :value="i._id"></el-option>
+            </template>
             <template #is_use>
-              <el-radio v-for="i in is_useList" :key="i._id" :label="i.value">{{ i.label }}</el-radio>
+              <el-radio v-for="i in is_useList" :key="i.value" :label="i.label">{{ i.label }}</el-radio>
+            </template>
+            <template #leader>
+              <el-select v-model="form.leader" multiple placeholder="请选择审批领导" style="width: 100%">
+                <el-option v-for="item in ldList" :key="item._id" :label="item.name" :value="item._id" />
+              </el-select>
+            </template>
+            <template #accounting>
+              <el-select v-model="form.accounting" multiple placeholder="请选择审批会计" style="width: 100%">
+                <el-option v-for="item in kjList" :key="item._id" :label="item.name" :value="item._id" />
+              </el-select>
             </template>
           </cForm>
         </el-col>
@@ -35,11 +48,15 @@ import type { Ref } from 'vue';
 import { ref, onMounted, getCurrentInstance, reactive } from 'vue';
 import { ElMessage } from 'element-plus';
 // 接口
-import { ShopStore } from '@/stores/ShopSetting/buy';
+import { ShopStore } from '@/stores/shopSetting/buy';
 import { DictDataStore } from '@/stores/dict/dictData';
+import { OfficeStore } from '@/stores/office/office';
+import { UserStore } from '@/stores/users/user';
 import type { IQueryResult } from '@/util/types.util';
 const dictData = DictDataStore();
 const buyAxios = ShopStore();
+const officeAxios = OfficeStore();
+const userAxios = UserStore();
 const { proxy } = getCurrentInstance() as any;
 // 加载中
 const loading: Ref<any> = ref(false);
@@ -61,7 +78,7 @@ let opera: Ref<any[]> = ref([
 ]);
 // 弹框
 const dialog: Ref<{ type: string; show: boolean; title: string }> = ref({ type: '1', show: false, title: '信息管理' });
-let form: Ref<{}> = ref({});
+let form: Ref<{ leader: Array<any>; accounting: Array<any> }> = ref({ leader: [], accounting: [] });
 // 表单
 let formFields: Ref<any[]> = ref([
   { label: '街道/社区', model: 'office', type: 'select' },
@@ -80,7 +97,9 @@ const rules = reactive<FormRules>({
 let searchForm: Ref<any> = ref({});
 // 字典表
 let is_useList: Ref<any> = ref([]);
-let typeList: Ref<any> = ref([]);
+let officeList: Ref<any> = ref([]);
+let ldList: Ref<any> = ref([]);
+let kjList: Ref<any> = ref([]);
 
 // 请求
 onMounted(async () => {
@@ -103,6 +122,15 @@ const toSearch = (query: any) => {
   searchForm.value = query;
   search({ skip, limit });
 };
+const toChange = async (val: any) => {
+  let res: IQueryResult;
+  // 领导
+  res = await userAxios.query({ status: '1', belong: val._id, role: 'ld' });
+  if (res.errcode == '0') ldList.value = res.data;
+  // 会计
+  res = await userAxios.query({ status: '1', belong: val._id, role: 'kj' });
+  if (res.errcode == '0') kjList.value = res.data;
+};
 const getDict = (value: any, model: any) => {
   if (model == 'is_use') {
     if (value) {
@@ -110,10 +138,6 @@ const getDict = (value: any, model: any) => {
       if (data) return data.label;
       else return '暂无';
     }
-  } else if (model == 'type') {
-    let data = typeList.value.find((i: any) => i.value == value);
-    if (data) return data.label;
-    else return '暂无';
   }
 };
 // 新增
@@ -145,7 +169,7 @@ const toDel = async (data: any) => {
 };
 // 弹框关闭
 const toClose = () => {
-  form.value = {};
+  form.value = { leader: [], accounting: [] };
   dialog.value = { title: '信息管理', show: false, type: '1' };
   search({ skip, limit });
 };
@@ -155,9 +179,9 @@ const searchOther = async () => {
   // 是否使用
   res = await dictData.query({ type: 'is_use' });
   if (res.errcode == '0') is_useList.value = res.data;
-  // 类型
-  res = await dictData.query({ type: 'goods_type' });
-  if (res.errcode == '0') typeList.value = res.data;
+  // 街道
+  res = await officeAxios.query({ is_use: '0' });
+  if (res.errcode == '0') officeList.value = res.data;
 };
 </script>
 <style scoped lang="scss">

+ 2 - 2
src/views/system/module/index.vue

@@ -76,7 +76,7 @@ let opera: Ref<any[]> = ref([
 ]);
 // 弹框
 const dialog: Ref<{ type: string; show: boolean; title: string }> = ref({ type: '1', show: false, title: '信息管理' });
-let form: Ref<{}> = ref({});
+let form: Ref<{ url: Array<any> }> = ref({ url: [] });
 // 表单
 let formFields: Ref<any[]> = ref([
   { label: '名称', model: 'name' },
@@ -167,7 +167,7 @@ const onUpload = (e: { model: string; value: Array<[]> }) => {
 };
 // 弹框关闭
 const toClose = () => {
-  form.value = {};
+  form.value = { url: [] };
   dialog.value = { title: '信息管理', show: false, type: '1' };
   search({ skip, limit });
 };

+ 47 - 44
src/views/system/money/index.vue

@@ -17,22 +17,21 @@
       <template v-slot:info>
         <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
           <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="toSave">
-            <template #url>
-              <cUpload
-                :model="`${'url'}`"
-                :limit="1"
-                listType="picture"
-                url="/files/material/module/upload"
-                accept="*"
-                :list="form.url"
-                @change="onUpload"
-              ></cUpload>
-            </template>
-            <template #type>
-              <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"></el-option>
+            <template #office>
+              <el-option @click="toChange(i)" v-for="i in officeList" :key="i._id" :label="i.name" :value="i._id"></el-option>
             </template>
             <template #is_use>
-              <el-radio v-for="i in is_useList" :key="i._id" :label="i.value">{{ i.label }}</el-radio>
+              <el-radio v-for="i in is_useList" :key="i.value" :label="i.label">{{ i.label }}</el-radio>
+            </template>
+            <template #leader>
+              <el-select v-model="form.leader" multiple placeholder="请选择审批领导" style="width: 100%">
+                <el-option v-for="item in ldList" :key="item._id" :label="item.name" :value="item._id" />
+              </el-select>
+            </template>
+            <template #accounting>
+              <el-select v-model="form.accounting" multiple placeholder="请选择审批会计" style="width: 100%">
+                <el-option v-for="item in kjList" :key="item._id" :label="item.name" :value="item._id" />
+              </el-select>
             </template>
           </cForm>
         </el-col>
@@ -49,11 +48,15 @@ import type { Ref } from 'vue';
 import { ref, onMounted, getCurrentInstance, reactive } from 'vue';
 import { ElMessage } from 'element-plus';
 // 接口
-import { ModuleStore } from '@/stores/module/module';
+import { CollectionStore } from '@/stores/collection/collection';
 import { DictDataStore } from '@/stores/dict/dictData';
+import { OfficeStore } from '@/stores/office/office';
+import { UserStore } from '@/stores/users/user';
 import type { IQueryResult } from '@/util/types.util';
 const dictData = DictDataStore();
-const moduleAxios = ModuleStore();
+const collectionAxios = CollectionStore();
+const officeAxios = OfficeStore();
+const userAxios = UserStore();
 const { proxy } = getCurrentInstance() as any;
 // 加载中
 const loading: Ref<any> = ref(false);
@@ -63,10 +66,9 @@ let total: Ref<number> = ref(0);
 let skip = 0;
 let limit: number = proxy.$limit;
 let fields: Ref<any[]> = ref([
-  { label: '名称', model: 'name', isSearch: true },
-  { label: '类型', model: 'type', format: (i: any) => getDict(i, 'type') },
-  { label: '路由', model: 'route' },
-  { label: '排序', model: 'sort', type: 'number' },
+  { label: '街道/社区', model: 'office', format: (i: any) => getDict(i, 'office') },
+  { label: '领导', model: 'leader' },
+  { label: '会计', model: 'accounting' },
   { label: '是否使用', model: 'is_use', format: (i: any) => getDict(i, 'is_use') }
 ]);
 // 操作
@@ -76,14 +78,12 @@ let opera: Ref<any[]> = ref([
 ]);
 // 弹框
 const dialog: Ref<{ type: string; show: boolean; title: string }> = ref({ type: '1', show: false, title: '信息管理' });
-let form: Ref<{}> = ref({});
+let form: Ref<{ leader: Array<any>; accounting: Array<any> }> = ref({ leader: [], accounting: [] });
 // 表单
 let formFields: Ref<any[]> = ref([
-  { label: '名称', model: 'name' },
-  { label: '类型', model: 'type', type: 'select' },
-  { label: '路由', model: 'route' },
-  { label: '图片', model: 'url', custom: true },
-  { label: '排序', model: 'sort', type: 'number' },
+  { label: '街道/社区', model: 'office', type: 'select' },
+  { label: '领导', model: 'leader', custom: true },
+  { label: '会计', model: 'accounting', custom: true },
   { label: '是否使用', model: 'is_use', type: 'radio' }
 ]);
 const rules = reactive<FormRules>({
@@ -97,7 +97,9 @@ const rules = reactive<FormRules>({
 let searchForm: Ref<any> = ref({});
 // 字典表
 let is_useList: Ref<any> = ref([]);
-let typeList: Ref<any> = ref([]);
+let officeList: Ref<any> = ref([]);
+let ldList: Ref<any> = ref([]);
+let kjList: Ref<any> = ref([]);
 
 // 请求
 onMounted(async () => {
@@ -110,7 +112,7 @@ const search = async (e: { skip: number; limit: number }) => {
   const { skip, limit } = e;
   const condition = _.cloneDeep(searchForm.value);
   let info = { limit: limit, skip: skip, ...condition };
-  let res: IQueryResult = await moduleAxios.query(info);
+  let res: IQueryResult = await collectionAxios.query(info);
   if (res.errcode == 0) {
     list.value = res.data;
     total.value = res.total;
@@ -120,6 +122,15 @@ const toSearch = (query: any) => {
   searchForm.value = query;
   search({ skip, limit });
 };
+const toChange = async (val: any) => {
+  let res: IQueryResult;
+  // 领导
+  res = await userAxios.query({ status: '1', belong: val.belong, role: '64c213db894448b6ed4f9a43' });
+  if (res.errcode == '0') ldList.value = res.data;
+  // 会计
+  res = await userAxios.query({ status: '1', belong: val.belong, role: '64c213ce894448b6ed4f9a3b' });
+  if (res.errcode == '0') kjList.value = res.data;
+};
 const getDict = (value: any, model: any) => {
   if (model == 'is_use') {
     if (value) {
@@ -127,10 +138,6 @@ const getDict = (value: any, model: any) => {
       if (data) return data.label;
       else return '暂无';
     }
-  } else if (model == 'type') {
-    let data = typeList.value.find((i: any) => i.value == value);
-    if (data) return data.label;
-    else return '暂无';
   }
 };
 // 新增
@@ -145,8 +152,8 @@ const toEdit = async (data: any) => {
 // 提交保存
 const toSave = async (data: any) => {
   let res: IQueryResult;
-  if (data._id) res = await moduleAxios.update(data);
-  else res = await moduleAxios.create(data);
+  if (data._id) res = await collectionAxios.update(data);
+  else res = await collectionAxios.create(data);
   if (res.errcode == 0) {
     ElMessage({ type: `success`, message: `维护信息成功` });
     toClose();
@@ -154,20 +161,15 @@ const toSave = async (data: any) => {
 };
 // 删除
 const toDel = async (data: any) => {
-  let res: IQueryResult = await moduleAxios.del(data._id);
+  let res: IQueryResult = await collectionAxios.del(data._id);
   if (res.errcode == 0) {
     ElMessage({ type: `success`, message: `刪除信息成功` });
     search({ skip, limit });
   }
 };
-// 上传图片
-const onUpload = (e: { model: string; value: Array<[]> }) => {
-  const { model, value } = e;
-  form.value[model] = value;
-};
 // 弹框关闭
 const toClose = () => {
-  form.value = {};
+  form.value = { leader: [], accounting: [] };
   dialog.value = { title: '信息管理', show: false, type: '1' };
   search({ skip, limit });
 };
@@ -177,9 +179,9 @@ const searchOther = async () => {
   // 是否使用
   res = await dictData.query({ type: 'is_use' });
   if (res.errcode == '0') is_useList.value = res.data;
-  // 类型
-  res = await dictData.query({ type: 'goods_type' });
-  if (res.errcode == '0') typeList.value = res.data;
+  // 街道
+  res = await officeAxios.query({ is_use: '0' });
+  if (res.errcode == '0') officeList.value = res.data;
 };
 </script>
 <style scoped lang="scss">
@@ -189,3 +191,4 @@ const searchOther = async () => {
   }
 }
 </style>
+@/stores/collection/collection

src/views/users/admin/detail.vue → src/views/users/detail/index.vue


+ 0 - 154
src/views/users/firm/detail.vue

@@ -1,154 +0,0 @@
-<template>
-  <div id="detail">
-    <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">
-          <cSearch :is_back="true" @toBack="toBack"></cSearch>
-        </el-col>
-        <el-col :span="24" class="two">
-          <cForm :span="24" :fields="fields" :form="form" :rules="rules" @save="toSave" label-width="auto">
-            <template #gender>
-              <el-option v-for="i in genderList" :key="i.value" :label="i.label" :value="i.value"></el-option>
-            </template>
-            <template #type>
-              <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"></el-option>
-            </template>
-            <template #icon>
-              <cUpload :model="`${'icon'}`" listType="picture-card" :limit="1" url="/files/ball/match/upload" :list="form.icon" @change="onUpload"></cUpload>
-            </template>
-          </cForm>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script setup lang="ts">
-// 基础
-import type { Ref } from 'vue';
-import { ref, reactive, onMounted } from 'vue';
-import { ElMessage } from 'element-plus';
-import type { FormRules } from 'element-plus';
-import { useRoute } from 'vue-router';
-// 接口
-import { UserStore } from '@/stores/users/user';
-import { DictDataStore } from '@/stores/dict/dictData'; // 字典表
-import type { IQueryResult } from '@/util/types.util';
-const userAxios = UserStore();
-const dictAxios = DictDataStore();
-// 路由
-const route = useRoute();
-// 加载中
-const loading: Ref<any> = ref(false);
-// 表单
-let form: Ref<any> = ref({});
-let fields: Ref<any[]> = ref([
-  { label: '微信用户标识', model: 'openid', options: { disabled: true } },
-  { label: '账号', model: 'username', options: { disabled: true } },
-  { label: '名称', model: 'name' },
-  { label: '手机号', model: 'phone' },
-  { label: '电子邮箱', model: 'email' },
-  { label: '性别', model: 'gender', type: 'select' },
-  { label: '年龄', model: 'age' },
-  { label: '工作单位', model: 'work' },
-  { label: '头像', model: 'icon', custom: true }
-]);
-const rules = reactive<FormRules>({});
-// 字典表
-const genderList: Ref<any> = ref([]);
-const typeList: Ref<any> = ref([]);
-// 请求
-onMounted(async () => {
-  loading.value = true;
-  await searchOther();
-  await search();
-  loading.value = false;
-});
-const search = async () => {
-  let id = route.query.id;
-  if (id) {
-    let res: IQueryResult = await userAxios.fetch(id);
-    if (res.errcode == '0') {
-      let info: any = res.data as {};
-      form.value = info;
-    }
-  }
-};
-const onUpload = (e: { model: string; value: Array<[]> }) => {
-  const { model, value } = e;
-  form.value[model] = value;
-};
-// 保存
-const toSave = async (data) => {
-  let res: IQueryResult;
-  if (data._id) res = await userAxios.update(data);
-  else res = await userAxios.create(data);
-  if (res.errcode == 0) {
-    ElMessage({ type: `success`, message: `维护信息成功` });
-    toBack();
-  }
-};
-// 查询其他信息
-const searchOther = async () => {
-  let res: IQueryResult;
-  // 性别
-  res = await dictAxios.query({ type: 'gender' });
-  if (res.errcode == '0') genderList.value = res.data;
-  // 类别
-  res = await dictAxios.query({ type: 'type' });
-  if (res.errcode == '0') typeList.value = res.data;
-};
-// 返回上一页
-const toBack = () => {
-  window.history.go(-1);
-};
-</script>
-<style scoped lang="scss">
-.study {
-  width: 100%;
-  .study_1 {
-    margin: 0 0 10px 0;
-    span {
-      font-size: 16px;
-    }
-    span:first-child {
-      color: #ff0000;
-    }
-  }
-  .study_2 {
-    .study_2_info {
-      width: 100%;
-      display: flex;
-      .info_1 {
-        position: relative;
-        max-width: 24%;
-        border: 1px solid #67c23a;
-        padding: 0 10px;
-        border-radius: 5px;
-        margin: 0 10px 0 0;
-        .txt {
-          position: absolute;
-          top: -15px;
-          left: 10px;
-          span {
-            display: inline-block;
-            padding: 6px 15px;
-            background: #67c23a;
-            color: #fff;
-            border-radius: 5px;
-            font-size: 16px;
-            font-weight: bold;
-            line-height: 1;
-          }
-        }
-        .info {
-          margin: 15px 0 0 0;
-          .label {
-            margin: 0 0 10px 0;
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 1 - 1
src/views/users/user/index.vue

@@ -80,7 +80,7 @@ onMounted(async () => {
   loading.value = false;
 });
 const search = async (e: { skip: number; limit: number }) => {
-  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, type: '0' };
+  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, code: 'kj' };
   const res: IQueryResult = await userAxios.query(info);
   if (res.errcode == '0') {
     list.value = res.data;

+ 160 - 0
src/views/users/four/index.vue

@@ -0,0 +1,160 @@
+<template>
+  <div id="index">
+    <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"> </cSearch>
+        </el-col>
+        <el-col :span="24" class="two">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @exam="toExam" @edit="toEdit" @del="toDel"> </cTable>
+        </el-col>
+      </el-col>
+    </el-row>
+    <cDialog :dialog="dialog" @toClose="toClose">
+      <template v-slot:info>
+        <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 #status>
+              <el-option v-for="i in statusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
+            </template>
+          </cForm>
+        </el-col>
+      </template>
+    </cDialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref, getCurrentInstance } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
+// 接口
+import { UserStore } from '@/stores/users/user';
+import { DictDataStore } from '@/stores/dict/dictData'; // 字典表
+import type { IQueryResult } from '@/util/types.util';
+const userAxios = UserStore();
+const dictAxios = DictDataStore();
+const { proxy } = getCurrentInstance() as any;
+// 路由
+const router = useRouter();
+// 加载中
+const loading: Ref<any> = ref(false);
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '微信用户标识', model: 'openid' },
+  { label: '手机号', model: 'tel', isSearch: true },
+  { label: '用户姓名', model: 'name', isSearch: true },
+  { label: '姓名', model: 'name', isSearch: true },
+  { label: '性别', model: 'gender', format: (i: any) => getDict(i, genderList.value) },
+  { label: '角色', model: 'role', format: (i: any) => getDict(i, roleList.value) },
+  { label: '所属', model: 'belong', format: (i: any) => getDict(i, belongList.value) },
+  { label: '状态', model: 'status', format: (i: any) => getDict(i, statusList.value) }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '审核', method: 'exam', type: 'warning', display: (i) => i.status == '0' },
+  { label: '修改', method: 'edit' },
+  { label: '删除', method: 'del', confirm: true, type: 'danger' }
+]);
+// 查询数据
+let searchForm: Ref<any> = ref({});
+// 字典表
+const genderList: Ref<any> = ref([]);
+const roleList: Ref<any> = ref([]);
+const belongList: Ref<any> = ref([]);
+const statusList: Ref<any> = ref([]);
+// 弹框
+const dialog: Ref<any> = ref({ title: '审核管理', show: false, type: '1' });
+const form: Ref<any> = ref({ file: [] });
+const formFields: Ref<any> = ref([{ label: '状态', model: 'status', type: 'select' }]);
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+const search = async (e: { skip: number; limit: number }) => {
+  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, code: 'sqry' };
+  const res: IQueryResult = await userAxios.query(info);
+  if (res.errcode == '0') {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (e, model) => {
+  let data: any = model.find((i: any) => i.value == e);
+  if (data) return data.label;
+  else return '暂无';
+};
+// 审核
+const toExam = async (data) => {
+  let res: IQueryResult = await userAxios.fetch(data._id);
+  if (res.errcode == '0') {
+    form.value = res.data;
+    dialog.value = { title: '审核管理', show: true, type: '1' };
+  }
+};
+// 提交保存
+const toSave = async (data) => {
+  let res: IQueryResult = await userAxios.update(data);
+  if (res.errcode == '0') {
+    ElMessage({ message: '信息审核成功', type: 'success' });
+    toClose();
+  } else {
+    ElMessage({ message: `${res.errmsg}`, type: 'error' });
+  }
+};
+// 修改
+const toEdit = (data) => {
+  router.push({ path: '/users/detail', query: { id: data._id } });
+};
+// 删除
+const toDel = async (data: any) => {
+  let res: IQueryResult = await userAxios.del(data._id);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `刪除信息成功` });
+    search({ skip, limit });
+  }
+};
+
+// 关闭弹框
+const toClose = () => {
+  form.value = {};
+  dialog.value = { show: false };
+  search({ skip, limit });
+};
+
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 性别
+  res = await dictAxios.query({ type: 'gender' });
+  if (res.errcode == '0') genderList.value = res.data;
+  // 角色
+  res = await dictAxios.query({ type: 'role' });
+  if (res.errcode == '0') roleList.value = res.data;
+  // 所属
+  res = await dictAxios.query({ type: 'type' });
+  if (res.errcode == '0') belongList.value = res.data;
+  // 状态
+  res = await dictAxios.query({ type: 'status' });
+  if (res.errcode == '0') statusList.value = res.data;
+};
+</script>
+<style scoped lang="scss">
+.main {
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 166 - 0
src/views/users/one/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div id="index">
+    <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"> </cSearch>
+        </el-col>
+        <el-col :span="24" class="two">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @exam="toExam" @edit="toEdit" @del="toDel"> </cTable>
+        </el-col>
+      </el-col>
+    </el-row>
+    <cDialog :dialog="dialog" @toClose="toClose">
+      <template v-slot:info>
+        <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 #status>
+              <el-option v-for="i in statusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
+            </template>
+          </cForm>
+        </el-col>
+      </template>
+    </cDialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref, getCurrentInstance } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
+// 接口
+import { UserStore } from '@/stores/users/user';
+import { DictDataStore } from '@/stores/dict/dictData'; // 字典表
+import type { IQueryResult } from '@/util/types.util';
+const userAxios = UserStore();
+const dictAxios = DictDataStore();
+const { proxy } = getCurrentInstance() as any;
+// 路由
+const router = useRouter();
+// 加载中
+const loading: Ref<any> = ref(false);
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '微信用户标识', model: 'openid' },
+  { label: '手机号', model: 'tel', isSearch: true },
+  { label: '用户姓名', model: 'name', isSearch: true },
+  { label: '姓名', model: 'name', isSearch: true },
+  { label: '性别', model: 'gender', format: (i: any) => getDict(i, 'gender') },
+  { label: '角色', model: 'role', format: (i: any) => getDict(i, 'role') },
+  { label: '所属', model: 'belong', format: (i: any) => getDict(i, 'belong') },
+  { label: '状态', model: 'status', format: (i: any) => getDict(i, 'status') }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '审核', method: 'exam', type: 'warning', display: (i) => i.status == '0' },
+  { label: '修改', method: 'edit' },
+  { label: '删除', method: 'del', confirm: true, type: 'danger' }
+]);
+// 查询数据
+let searchForm: Ref<any> = ref({});
+// 字典表
+const genderList: Ref<any> = ref([]);
+const roleList: Ref<any> = ref([]);
+const belongList: Ref<any> = ref([]);
+const statusList: Ref<any> = ref([]);
+// 弹框
+const dialog: Ref<any> = ref({ title: '审核管理', show: false, type: '1' });
+const form: Ref<any> = ref({ file: [] });
+const formFields: Ref<any> = ref([{ label: '状态', model: 'status', type: 'select' }]);
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+const search = async (e: { skip: number; limit: number }) => {
+  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, role: 'jdgly' };
+  const res: IQueryResult = await userAxios.query(info);
+  if (res.errcode == '0') {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (e, model) => {
+  if (model == 'role') {
+    let data: any = roleList.value.find((i: any) => i.value == e);
+    if (data) return data.label;
+    else return '暂无';
+  } else if (model == 'status') {
+    let data: any = statusList.value.find((i: any) => i.value == e);
+    if (data) return data.label;
+    else return '暂无';
+  }
+};
+// 审核
+const toExam = async (data) => {
+  let res: IQueryResult = await userAxios.fetch(data._id);
+  if (res.errcode == '0') {
+    form.value = res.data;
+    dialog.value = { title: '审核管理', show: true, type: '1' };
+  }
+};
+// 提交保存
+const toSave = async (data) => {
+  let res: IQueryResult = await userAxios.update(data);
+  if (res.errcode == '0') {
+    ElMessage({ message: '信息审核成功', type: 'success' });
+    toClose();
+  } else {
+    ElMessage({ message: `${res.errmsg}`, type: 'error' });
+  }
+};
+// 修改
+const toEdit = (data) => {
+  router.push({ path: '/users/match/detail', query: { id: data._id } });
+};
+// 删除
+const toDel = async (data: any) => {
+  let res: IQueryResult = await userAxios.del(data._id);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `刪除信息成功` });
+    search({ skip, limit });
+  }
+};
+
+// 关闭弹框
+const toClose = () => {
+  form.value = {};
+  dialog.value = { show: false };
+  search({ skip, limit });
+};
+
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 性别
+  res = await dictAxios.query({ type: 'gender' });
+  if (res.errcode == '0') genderList.value = res.data;
+  // 角色
+  res = await dictAxios.query({ type: 'role' });
+  if (res.errcode == '0') roleList.value = res.data;
+  // 所属
+  res = await dictAxios.query({ type: 'type' });
+  if (res.errcode == '0') belongList.value = res.data;
+  // 状态
+  res = await dictAxios.query({ type: 'status' });
+  if (res.errcode == '0') statusList.value = res.data;
+};
+</script>
+<style scoped lang="scss">
+.main {
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 1 - 1
src/views/users/admin/index.vue

@@ -80,7 +80,7 @@ onMounted(async () => {
   loading.value = false;
 });
 const search = async (e: { skip: number; limit: number }) => {
-  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, type: '0' };
+  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, code: 'ld' };
   const res: IQueryResult = await userAxios.query(info);
   if (res.errcode == '0') {
     list.value = res.data;

+ 166 - 0
src/views/users/thr/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div id="index">
+    <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"> </cSearch>
+        </el-col>
+        <el-col :span="24" class="two">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @exam="toExam" @edit="toEdit" @del="toDel"> </cTable>
+        </el-col>
+      </el-col>
+    </el-row>
+    <cDialog :dialog="dialog" @toClose="toClose">
+      <template v-slot:info>
+        <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 #status>
+              <el-option v-for="i in statusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
+            </template>
+          </cForm>
+        </el-col>
+      </template>
+    </cDialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref, getCurrentInstance } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
+// 接口
+import { UserStore } from '@/stores/users/user';
+import { DictDataStore } from '@/stores/dict/dictData'; // 字典表
+import type { IQueryResult } from '@/util/types.util';
+const userAxios = UserStore();
+const dictAxios = DictDataStore();
+const { proxy } = getCurrentInstance() as any;
+// 路由
+const router = useRouter();
+// 加载中
+const loading: Ref<any> = ref(false);
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '微信用户标识', model: 'openid' },
+  { label: '手机号', model: 'tel', isSearch: true },
+  { label: '用户姓名', model: 'name', isSearch: true },
+  { label: '姓名', model: 'name', isSearch: true },
+  { label: '性别', model: 'gender', format: (i: any) => getDict(i, 'gender') },
+  { label: '角色', model: 'role', format: (i: any) => getDict(i, 'role') },
+  { label: '所属', model: 'belong', format: (i: any) => getDict(i, 'belong') },
+  { label: '状态', model: 'status', format: (i: any) => getDict(i, 'status') }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '审核', method: 'exam', type: 'warning', display: (i) => i.status == '0' },
+  { label: '修改', method: 'edit' },
+  { label: '删除', method: 'del', confirm: true, type: 'danger' }
+]);
+// 查询数据
+let searchForm: Ref<any> = ref({});
+// 字典表
+const genderList: Ref<any> = ref([]);
+const roleList: Ref<any> = ref([]);
+const belongList: Ref<any> = ref([]);
+const statusList: Ref<any> = ref([]);
+// 弹框
+const dialog: Ref<any> = ref({ title: '审核管理', show: false, type: '1' });
+const form: Ref<any> = ref({ file: [] });
+const formFields: Ref<any> = ref([{ label: '状态', model: 'status', type: 'select' }]);
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+const search = async (e: { skip: number; limit: number }) => {
+  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, code: 'jdry' };
+  const res: IQueryResult = await userAxios.query(info);
+  if (res.errcode == '0') {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (e, model) => {
+  if (model == 'role') {
+    let data: any = roleList.value.find((i: any) => i.value == e);
+    if (data) return data.label;
+    else return '暂无';
+  } else if (model == 'status') {
+    let data: any = statusList.value.find((i: any) => i.value == e);
+    if (data) return data.label;
+    else return '暂无';
+  }
+};
+// 审核
+const toExam = async (data) => {
+  let res: IQueryResult = await userAxios.fetch(data._id);
+  if (res.errcode == '0') {
+    form.value = res.data;
+    dialog.value = { title: '审核管理', show: true, type: '1' };
+  }
+};
+// 提交保存
+const toSave = async (data) => {
+  let res: IQueryResult = await userAxios.update(data);
+  if (res.errcode == '0') {
+    ElMessage({ message: '信息审核成功', type: 'success' });
+    toClose();
+  } else {
+    ElMessage({ message: `${res.errmsg}`, type: 'error' });
+  }
+};
+// 修改
+const toEdit = (data) => {
+  router.push({ path: '/users/match/detail', query: { id: data._id } });
+};
+// 删除
+const toDel = async (data: any) => {
+  let res: IQueryResult = await userAxios.del(data._id);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `刪除信息成功` });
+    search({ skip, limit });
+  }
+};
+
+// 关闭弹框
+const toClose = () => {
+  form.value = {};
+  dialog.value = { show: false };
+  search({ skip, limit });
+};
+
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 性别
+  res = await dictAxios.query({ type: 'gender' });
+  if (res.errcode == '0') genderList.value = res.data;
+  // 角色
+  res = await dictAxios.query({ type: 'role' });
+  if (res.errcode == '0') roleList.value = res.data;
+  // 所属
+  res = await dictAxios.query({ type: 'type' });
+  if (res.errcode == '0') belongList.value = res.data;
+  // 状态
+  res = await dictAxios.query({ type: 'status' });
+  if (res.errcode == '0') statusList.value = res.data;
+};
+</script>
+<style scoped lang="scss">
+.main {
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 1 - 1
src/views/users/firm/index.vue

@@ -80,7 +80,7 @@ onMounted(async () => {
   loading.value = false;
 });
 const search = async (e: { skip: number; limit: number }) => {
-  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, type: '0' };
+  const info = { skip: e.skip, limit: e.limit, ...searchForm.value, code: 'cs' };
   const res: IQueryResult = await userAxios.query(info);
   if (res.errcode == '0') {
     list.value = res.data;

+ 0 - 154
src/views/users/user/detail.vue

@@ -1,154 +0,0 @@
-<template>
-  <div id="detail">
-    <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">
-          <cSearch :is_back="true" @toBack="toBack"></cSearch>
-        </el-col>
-        <el-col :span="24" class="two">
-          <cForm :span="24" :fields="fields" :form="form" :rules="rules" @save="toSave" label-width="auto">
-            <template #gender>
-              <el-option v-for="i in genderList" :key="i.value" :label="i.label" :value="i.value"></el-option>
-            </template>
-            <template #type>
-              <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"></el-option>
-            </template>
-            <template #icon>
-              <cUpload :model="`${'icon'}`" listType="picture-card" :limit="1" url="/files/ball/match/upload" :list="form.icon" @change="onUpload"></cUpload>
-            </template>
-          </cForm>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script setup lang="ts">
-// 基础
-import type { Ref } from 'vue';
-import { ref, reactive, onMounted } from 'vue';
-import { ElMessage } from 'element-plus';
-import type { FormRules } from 'element-plus';
-import { useRoute } from 'vue-router';
-// 接口
-import { UserStore } from '@/stores/users/user';
-import { DictDataStore } from '@/stores/dict/dictData'; // 字典表
-import type { IQueryResult } from '@/util/types.util';
-const userAxios = UserStore();
-const dictAxios = DictDataStore();
-// 路由
-const route = useRoute();
-// 加载中
-const loading: Ref<any> = ref(false);
-// 表单
-let form: Ref<any> = ref({});
-let fields: Ref<any[]> = ref([
-  { label: '微信用户标识', model: 'openid', options: { disabled: true } },
-  { label: '账号', model: 'username', options: { disabled: true } },
-  { label: '名称', model: 'name' },
-  { label: '手机号', model: 'phone' },
-  { label: '电子邮箱', model: 'email' },
-  { label: '性别', model: 'gender', type: 'select' },
-  { label: '年龄', model: 'age' },
-  { label: '工作单位', model: 'work' },
-  { label: '头像', model: 'icon', custom: true }
-]);
-const rules = reactive<FormRules>({});
-// 字典表
-const genderList: Ref<any> = ref([]);
-const typeList: Ref<any> = ref([]);
-// 请求
-onMounted(async () => {
-  loading.value = true;
-  await searchOther();
-  await search();
-  loading.value = false;
-});
-const search = async () => {
-  let id = route.query.id;
-  if (id) {
-    let res: IQueryResult = await userAxios.fetch(id);
-    if (res.errcode == '0') {
-      let info: any = res.data as {};
-      form.value = info;
-    }
-  }
-};
-const onUpload = (e: { model: string; value: Array<[]> }) => {
-  const { model, value } = e;
-  form.value[model] = value;
-};
-// 保存
-const toSave = async (data) => {
-  let res: IQueryResult;
-  if (data._id) res = await userAxios.update(data);
-  else res = await userAxios.create(data);
-  if (res.errcode == 0) {
-    ElMessage({ type: `success`, message: `维护信息成功` });
-    toBack();
-  }
-};
-// 查询其他信息
-const searchOther = async () => {
-  let res: IQueryResult;
-  // 性别
-  res = await dictAxios.query({ type: 'gender' });
-  if (res.errcode == '0') genderList.value = res.data;
-  // 类别
-  res = await dictAxios.query({ type: 'type' });
-  if (res.errcode == '0') typeList.value = res.data;
-};
-// 返回上一页
-const toBack = () => {
-  window.history.go(-1);
-};
-</script>
-<style scoped lang="scss">
-.study {
-  width: 100%;
-  .study_1 {
-    margin: 0 0 10px 0;
-    span {
-      font-size: 16px;
-    }
-    span:first-child {
-      color: #ff0000;
-    }
-  }
-  .study_2 {
-    .study_2_info {
-      width: 100%;
-      display: flex;
-      .info_1 {
-        position: relative;
-        max-width: 24%;
-        border: 1px solid #67c23a;
-        padding: 0 10px;
-        border-radius: 5px;
-        margin: 0 10px 0 0;
-        .txt {
-          position: absolute;
-          top: -15px;
-          left: 10px;
-          span {
-            display: inline-block;
-            padding: 6px 15px;
-            background: #67c23a;
-            color: #fff;
-            border-radius: 5px;
-            font-size: 16px;
-            font-weight: bold;
-            line-height: 1;
-          }
-        }
-        .info {
-          margin: 15px 0 0 0;
-          .label {
-            margin: 0 0 10px 0;
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 169 - 0
src/views/way/community.vue

@@ -0,0 +1,169 @@
+<template>
+  <div id="index">
+    <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"> </cSearch>
+        </el-col>
+        <el-col :span="24" class="two">
+          <cButton @toAdd="toAdd()">
+            <template v-slot:custom>
+              <el-button type="primary" @click="toBack">返回</el-button>
+            </template>
+          </cButton>
+        </el-col>
+        <el-col :span="24" class="thr">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total" @edit="toEdit" @del="toDel"> </cTable>
+        </el-col>
+      </el-col>
+    </el-row>
+    <cDialog :dialog="dialog" @toClose="toClose">
+      <template v-slot:info>
+        <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
+          <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="toSave">
+            <template #is_use>
+              <el-radio v-for="i in is_useList" :key="i._id" :label="i.value">{{ i.label }}</el-radio>
+            </template>
+          </cForm>
+        </el-col>
+      </template>
+    </cDialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import _ from 'lodash';
+import type { FormRules } from 'element-plus';
+import type { Ref } from 'vue';
+import { ref, onMounted, getCurrentInstance, reactive } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRoute, useRouter } from 'vue-router';
+// 接口
+import { OfficeStore } from '@/stores/office/office';
+import { DictDataStore } from '@/stores/dict/dictData';
+import type { IQueryResult } from '@/util/types.util';
+const officeAxios = OfficeStore();
+const dictData = DictDataStore();
+// 路由
+const route = useRoute();
+const router = useRouter();
+const { proxy } = getCurrentInstance() as any;
+// 加载中
+const loading: Ref<any> = ref(false);
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '办事处名称', model: 'name', isSearch: true },
+  { label: '具体地址', model: 'address' },
+  { label: '是否使用', model: 'is_use', format: (i: any) => getDict(i, 'is_use') }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '修改', method: 'edit' },
+  { label: '删除', method: 'del', confirm: true, type: 'danger' }
+]);
+// 弹框
+const dialog: Ref<{ type: string; show: boolean; title: string }> = ref({ type: '1', show: false, title: '信息管理' });
+let form: Ref<{}> = ref({});
+// 表单
+let formFields: Ref<any[]> = ref([
+  { label: '办事处名称', model: 'name' },
+  { label: '具体地址', model: 'address' },
+  { label: '是否使用', model: 'is_use', type: 'radio' }
+]);
+const rules = reactive<FormRules>({
+  name: [{ required: true, message: '办事处名称', trigger: 'blur' }],
+  address: [{ required: true, message: '具体地址', trigger: 'blur' }]
+});
+// 查询数据
+let searchForm: Ref<any> = ref({});
+// 字典表
+let is_useList: Ref<any> = ref([]);
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+const search = async (e: { skip: number; limit: number }) => {
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition, belong: route.query.id, type: '1' };
+  let res: IQueryResult = await officeAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query: any) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (value: any, model: any) => {
+  if (model == 'is_use') {
+    if (value) {
+      let data = is_useList.value.find((i: any) => i.value == value);
+      if (data) return data.label;
+      else return '暂无';
+    }
+  }
+};
+// 新增
+const toAdd = () => {
+  form.value = { belong: route.query.id };
+  dialog.value = { title: '信息管理', show: true, type: '1' };
+};
+// 修改
+const toEdit = async (data: any) => {
+  form.value = data;
+  dialog.value = { title: '信息管理', show: true, type: '1' };
+};
+// 提交保存
+const toSave = async (data: any) => {
+  let res: IQueryResult;
+  data.type = '1';
+  if (data._id) res = await officeAxios.update(data);
+  else res = await officeAxios.create(data);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `维护信息成功` });
+    toClose();
+  }
+};
+// 删除
+const toDel = async (data: any) => {
+  let res: IQueryResult = await officeAxios.del(data._id);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `刪除信息成功` });
+    search({ skip, limit });
+  }
+};
+// 弹框关闭
+const toClose = () => {
+  form.value = {};
+  dialog.value = { title: '信息管理', show: false, type: '1' };
+  search({ skip, limit });
+};
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 是否使用
+  res = await dictData.query({ type: 'is_use' });
+  if (res.errcode == '0') is_useList.value = res.data;
+};
+// 返回上一页
+const toBack = () => {
+  router.push({ path: '/way/street' });
+};
+</script>
+<style scoped lang="scss">
+.main {
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 173 - 0
src/views/way/street.vue

@@ -0,0 +1,173 @@
+<template>
+  <div id="index">
+    <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"> </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" @edit="toEdit" @del="toDel">
+            <template #name="{ item, row }">
+              <template v-if="item.model === 'name'">
+                <el-link size="small" type="primary" @click="toType(row)">{{ getProps(row, item.model) }}</el-link>
+              </template>
+            </template>
+          </cTable>
+        </el-col>
+      </el-col>
+    </el-row>
+    <cDialog :dialog="dialog" @toClose="toClose">
+      <template v-slot:info>
+        <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
+          <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="toSave">
+            <template #is_use>
+              <el-radio v-for="i in is_useList" :key="i._id" :label="i.value">{{ i.label }}</el-radio>
+            </template>
+          </cForm>
+        </el-col>
+      </template>
+    </cDialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import _ from 'lodash';
+import type { FormRules } from 'element-plus';
+import type { Ref } from 'vue';
+import { ref, onMounted, getCurrentInstance, reactive } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
+// 接口
+import { OfficeStore } from '@/stores/office/office';
+import { DictDataStore } from '@/stores/dict/dictData';
+import type { IQueryResult } from '@/util/types.util';
+const dictData = DictDataStore();
+const officeAxios = OfficeStore();
+const { proxy } = getCurrentInstance() as any;
+// 加载中
+const loading: Ref<any> = ref(false);
+// 路由
+const router = useRouter();
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '办事处名称', model: 'name', isSearch: true, custom: true },
+  { label: '具体地址', model: 'address' },
+  { label: '是否使用', model: 'is_use', format: (i: any) => getDict(i, 'is_use') }
+]);
+// 操作
+let opera: Ref<any[]> = ref([
+  { label: '修改', method: 'edit' },
+  { label: '删除', method: 'del', confirm: true, type: 'danger' }
+]);
+// 弹框
+const dialog: Ref<{ type: string; show: boolean; title: string }> = ref({ type: '1', show: false, title: '信息管理' });
+let form: Ref<{}> = ref({});
+// 表单
+let formFields: Ref<any[]> = ref([
+  { label: '办事处名称', model: 'name' },
+  { label: '具体地址', model: 'address' },
+  { label: '是否使用', model: 'is_use', type: 'radio' }
+]);
+const rules = reactive<FormRules>({
+  name: [{ required: true, message: '办事处名称', trigger: 'blur' }],
+  address: [{ required: true, message: '具体地址', trigger: 'blur' }]
+});
+// 查询数据
+let searchForm: Ref<any> = ref({});
+// 字典表
+let is_useList: Ref<any> = ref([]);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  await searchOther();
+  await search({ skip, limit });
+  loading.value = false;
+});
+const search = async (e: { skip: number; limit: number }) => {
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition, type: '0' };
+  let res: IQueryResult = await officeAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query: any) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
+const getDict = (value: any, model: any) => {
+  if (model == 'is_use') {
+    if (value) {
+      let data = is_useList.value.find((i: any) => i.value == value);
+      if (data) return data.label;
+      else return '暂无';
+    }
+  }
+};
+const getProps = (data: any, prop: any) => {
+  return _.get(data, prop);
+};
+// 字典类型跳转
+const toType = (data: any) => {
+  router.push({ path: '/way/community', query: { id: data._id } });
+};
+// 新增
+const toAdd = () => {
+  dialog.value = { title: '信息管理', show: true, type: '1' };
+};
+// 修改
+const toEdit = async (data: any) => {
+  form.value = data;
+  dialog.value = { title: '信息管理', show: true, type: '1' };
+};
+// 提交保存
+const toSave = async (data: any) => {
+  let res: IQueryResult;
+  data.type = '0';
+  if (data._id) res = await officeAxios.update(data);
+  else res = await officeAxios.create(data);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `维护信息成功` });
+    toClose();
+  }
+};
+// 删除
+const toDel = async (data: any) => {
+  let res: IQueryResult = await officeAxios.del(data._id);
+  if (res.errcode == 0) {
+    ElMessage({ type: `success`, message: `刪除信息成功` });
+    search({ skip, limit });
+  }
+};
+// 弹框关闭
+const toClose = () => {
+  form.value = {};
+  dialog.value = { title: '信息管理', show: false, type: '1' };
+  search({ skip, limit });
+};
+// 查询其他信息
+const searchOther = async () => {
+  let res: IQueryResult;
+  // 是否使用
+  res = await dictData.query({ type: 'is_use' });
+  if (res.errcode == '0') is_useList.value = res.data;
+};
+</script>
+<style scoped lang="scss">
+.main {
+  .two {
+    margin: 0 0 10px 0;
+  }
+}
+</style>