Browse Source

修改显示

zs 10 tháng trước cách đây
mục cha
commit
86dee47552

+ 1 - 0
src/lang/package/zh-cn/menus.js

@@ -12,6 +12,7 @@ export default {
   system_tags: '导航设置',
   system_design: '平台设置',
   system_dept: '部门管理',
+  system_sector: '行业设置',
   user_admin: '管理员用户',
   user_user: '平台用户',
   platform: '信息管理',

+ 17 - 2
src/lang/package/zh-cn/pages.js

@@ -60,6 +60,7 @@ export default {
     examDialogTitle: '用户审核',
     account: '账号',
     password: '密码',
+    industry: '所属产业',
     nick_name: '昵称',
     gender: '性别',
     phone: '手机号',
@@ -102,6 +103,19 @@ export default {
     hrefMessage: '请输入路由',
     sortfMessage: '请输入排序'
   },
+  sector: {
+    addDialogTitle: '新增行业',
+    upDialogTitle: '修改行业',
+    title: '标题',
+    English: '英文标题',
+    href: '路由',
+    is_use: '是否启用',
+    remark: '备注',
+    sort: '排序',
+    titleMessage: '请输入标题',
+    hrefMessage: '请输入路由',
+    sortfMessage: '请输入排序'
+  },
   news: {
     addDialogTitle: '新增',
     upDialogTitle: '修改',
@@ -172,7 +186,7 @@ export default {
     tags: '标签',
     type: '赛事类型',
     work: '组织单位',
-    industry: '赛事行业',
+    industry: '所属产业',
     form: '类别',
     file: '封面',
     time: '有效期',
@@ -201,6 +215,7 @@ export default {
     upDialogTitle: '修改成果',
     examDialogTitle: '审核成果',
     name: '成果名称',
+    industry: '所属产业',
     tags: '标签',
     patent: '专利号',
     field: '行业领域',
@@ -238,7 +253,7 @@ export default {
     progress: '项目进展',
     track_unit: '跟踪支持单位',
     source: '项目来源',
-    industry: '产业分类',
+    industry: '所属产业',
     brief: '简介',
     status: '审核状态',
     is_use: '是否启用',

+ 40 - 0
src/store/api/system/sector.js

@@ -0,0 +1,40 @@
+import { defineStore } from 'pinia'
+import { AxiosWrapper } from '@/utils/axios-wrapper'
+import { get } from 'lodash-es'
+const url = '/sector'
+const axios = new AxiosWrapper()
+
+export const SectorStore = defineStore('sector', () => {
+  const query = async ({ skip = 0, limit = undefined, ...info } = {}) => {
+    let cond = {}
+    if (skip) cond.skip = skip
+    if (limit) cond.limit = limit
+    cond = { ...cond, ...info }
+    const res = await axios.$get(`${url}`, cond)
+    return res
+  }
+  const fetch = async (payload) => {
+    const res = await axios.$get(`${url}/${payload}`)
+    return res
+  }
+  const create = async (payload) => {
+    const res = await axios.$post(`${url}`, payload)
+    return res
+  }
+  const update = async (payload) => {
+    const id = get(payload, 'id', get(payload, 'id'))
+    const res = await axios.$post(`${url}/${id}`, payload)
+    return res
+  }
+  const del = async (payload) => {
+    const res = await axios.$delete(`${url}/${payload}`)
+    return res
+  }
+  return {
+    query,
+    fetch,
+    create,
+    update,
+    del
+  }
+})

+ 27 - 12
src/views/achievement/index.vue

@@ -10,6 +10,9 @@
       <template #sell>
         <el-option v-for="i in sellList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
+      <template #industry>
+        <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+      </template>
     </custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd" @select="toMoreDelect"></custom-button-bar>
     <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @exam="toExam" @edit="toEdit" @delete="toDelete" @toSelect="toSelect" :select="true">
@@ -46,6 +49,9 @@
             <template #file>
               <custom-upload model="file" :list="form.file" :limit="1" url="/files/web/template_achievement/upload" @change="onUpload"></custom-upload>
             </template>
+            <template #industry>
+              <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+            </template>
             <template #tags>
               <el-select v-model="form.tags" multiple filterable allow-create default-first-option :reserve-keyword="false" placeholder="请选择标签" style="width: 100%">
                 <el-option v-for="item in tagsList" :key="item.id" :label="item.title" :value="item.title" />
@@ -75,21 +81,24 @@ const { t } = useI18n()
 import { AchievementStore } from '@/store/api/platform/achievement'
 import { DictDataStore } from '@/store/api/system/dictData'
 import { TagsStore } from '@/store/api/system/tags'
+import { SectorStore } from '@/store/api/system/sector'
 const store = AchievementStore()
 const dictDataStore = DictDataStore()
 const tagsStore = TagsStore()
+const sectorStore = SectorStore()
 const data = ref([])
 const searchForm = ref({})
 const fields = [
   { label: t('pages.achievement.name'), model: 'name', isSearch: true },
+  { label: t('pages.achievement.industry'), model: 'industry', isSearch: true, type: 'select' },
   { label: t('pages.achievement.tags'), model: 'tags', isSearch: true, format: (i) => getDict(i, 'tags') },
-  { label: t('pages.achievement.field'), model: 'field', isSearch: true },
-  { label: t('pages.achievement.mature'), model: 'mature', isSearch: true, type: 'select', format: (i) => getDict(i, 'mature') },
-  { label: t('pages.achievement.sell'), model: 'sell', isSearch: true, type: 'select', format: (i) => getDict(i, 'sell') },
-  { label: t('pages.achievement.money'), model: 'money' },
-  { label: t('pages.achievement.time'), model: 'time' },
+  // { label: t('pages.achievement.field'), model: 'field', isSearch: true },
+  // { label: t('pages.achievement.mature'), model: 'mature', isSearch: true, type: 'select', format: (i) => getDict(i, 'mature') },
+  // { label: t('pages.achievement.sell'), model: 'sell', isSearch: true, type: 'select', format: (i) => getDict(i, 'sell') },
+  // { label: t('pages.achievement.money'), model: 'money' },
+  // { label: t('pages.achievement.time'), model: 'time' },
   { label: t('pages.achievement.is_use'), model: 'is_use', custom: true, format: (i) => getDict(i, 'is_use') },
-  { label: t('pages.achievement.achievement_status'), model: 'achievement_status', format: (i) => getDict(i, 'achievement') },
+  // { label: t('pages.achievement.achievement_status'), model: 'achievement_status', format: (i) => getDict(i, 'achievement') },
   { label: t('pages.achievement.status'), model: 'status', format: (i) => getDict(i, 'status') }
 ]
 const opera = [
@@ -115,13 +124,14 @@ const technologyList = ref([])
 const cityList = ref([])
 const achievementList = ref([])
 const tagsList = ref([])
+const sectorList = ref([])
 // 多选列表
 const selectList = ref([])
 // 加载中
 const loading = ref(false)
 const formFields = ref([
   { label: t('pages.achievement.name'), model: 'name' },
-  { label: t('pages.achievement.tags'), model: 'tags', custom: true },
+  { label: t('pages.achievement.industry'), model: 'industry', type: 'select' },
   { label: t('pages.achievement.patent'), model: 'patent' },
   { label: t('pages.achievement.field'), model: 'field' },
   { label: t('pages.achievement.attribute'), model: 'attribute', type: 'select' },
@@ -185,8 +195,13 @@ const searchOther = async () => {
   // 标签
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
+  // 行业
+  result = await sectorStore.query({ is_use: '0' })
+  if ($checkRes(result)) sectorList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -241,7 +256,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toSave = async () => {
@@ -251,7 +266,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -265,7 +280,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -275,7 +290,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 22 - 8
src/views/demand/demand/index.vue

@@ -7,6 +7,9 @@
       <template #urgent>
         <el-option v-for="i in urgentList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
+      <template #industry>
+        <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+      </template>
       <template #method>
         <el-option v-for="i in methodList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
@@ -28,6 +31,9 @@
             <template #field>
               <el-option v-for="i in fieldList" :key="i.id" :label="i.label" :value="i.value"></el-option>
             </template>
+            <template #industry>
+              <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+            </template>
             <template #urgent>
               <el-option v-for="i in urgentList" :key="i.id" :label="i.label" :value="i.value"></el-option>
             </template>
@@ -66,20 +72,22 @@ const { t } = useI18n()
 import { DemandStore } from '@/store/api/platform/demand'
 import { DictDataStore } from '@/store/api/system/dictData'
 import { TagsStore } from '@/store/api/system/tags'
+import { SectorStore } from '@/store/api/system/sector'
 const store = DemandStore()
 const dictDataStore = DictDataStore()
 const tagsStore = TagsStore()
+const sectorStore = SectorStore()
 const data = ref([])
 const searchForm = ref({})
 const fields = [
   { label: t('pages.demand.name'), model: 'name', isSearch: true },
+  { label: t('pages.demand.industry'), model: 'industry', isSearch: true, type: 'select' },
   { label: t('pages.demand.tags'), model: 'tags', isSearch: true, format: (i) => getDict(i, 'tags') },
   { label: t('pages.demand.field'), model: 'field', isSearch: true },
-  { label: t('pages.demand.industry'), model: 'industry', isSearch: true },
   { label: t('pages.demand.company'), model: 'company', isSearch: true },
   { label: t('pages.demand.year'), model: 'year', isSearch: true },
   { label: t('pages.demand.is_use'), model: 'is_use', custom: true, format: (i) => getDict(i, 'is_use') },
-  { label: t('pages.demand.demand_status'), model: 'demand_status', format: (i) => getDict(i, 'demand') },
+  // { label: t('pages.demand.demand_status'), model: 'demand_status', format: (i) => getDict(i, 'demand') },
   { label: t('pages.demand.status'), model: 'status', format: (i) => getDict(i, 'status') }
 ]
 const opera = [
@@ -103,6 +111,7 @@ const fieldList = ref([])
 const cityList = ref([])
 const demandList = ref([])
 const tagsList = ref([])
+const sectorList = ref([])
 // 多选列表
 const selectList = ref([])
 // 加载中
@@ -114,7 +123,7 @@ const formFields = ref([
   { label: t('pages.demand.urgent'), model: 'urgent', type: 'select' },
   { label: t('pages.demand.method'), model: 'method', type: 'select' },
   { label: t('pages.demand.money'), model: 'money' },
-  { label: t('pages.demand.industry'), model: 'industry' },
+  { label: t('pages.demand.industry'), model: 'industry', type: 'select' },
   { label: t('pages.demand.company'), model: 'company' },
   { label: t('pages.demand.company_brief'), model: 'company_brief', type: 'textarea' },
   { label: t('pages.demand.contacts'), model: 'contacts' },
@@ -169,8 +178,13 @@ const searchOther = async () => {
   // 标签
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
+  // 行业
+  result = await sectorStore.query({ is_use: '0' })
+  if ($checkRes(result)) sectorList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -225,7 +239,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toSave = async () => {
@@ -235,7 +249,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -249,7 +263,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -259,7 +273,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 23 - 9
src/views/demand/supply/index.vue

@@ -10,6 +10,9 @@
       <template #method>
         <el-option v-for="i in methodList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
+      <template #industry>
+        <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+      </template>
     </custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd" @select="toMoreDelect"></custom-button-bar>
     <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @exam="toExam" @edit="toEdit" @delete="toDelete" @toSelect="toSelect" :select="true">
@@ -34,6 +37,9 @@
             <template #method>
               <el-option v-for="i in methodList" :key="i.id" :label="i.label" :value="i.value"></el-option>
             </template>
+            <template #industry>
+              <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+            </template>
             <template #area>
               <el-cascader v-model="form.area" :props="{ value: 'label', label: 'label' }" :options="cityList" style="width: 100%" />
             </template>
@@ -66,20 +72,22 @@ const { t } = useI18n()
 import { SupplyStore } from '@/store/api/platform/supply'
 import { DictDataStore } from '@/store/api/system/dictData'
 import { TagsStore } from '@/store/api/system/tags'
+import { SectorStore } from '@/store/api/system/sector'
 const store = SupplyStore()
 const dictDataStore = DictDataStore()
 const tagsStore = TagsStore()
+const sectorStore = SectorStore()
 const data = ref([])
 const searchForm = ref({})
 const fields = [
   { label: t('pages.supply.name'), model: 'name', isSearch: true },
+  { label: t('pages.supply.industry'), model: 'industry', isSearch: true, type: 'select' },
   { label: t('pages.supply.tags'), model: 'tags', isSearch: true, format: (i) => getDict(i, 'tags') },
   { label: t('pages.supply.field'), model: 'field', isSearch: true },
   { label: t('pages.supply.source'), model: 'source', isSearch: true },
-  { label: t('pages.supply.industry'), model: 'industry', isSearch: true },
-  { label: t('pages.supply.money'), model: 'money' },
+  // { label: t('pages.supply.money'), model: 'money' },
   { label: t('pages.supply.is_use'), model: 'is_use', custom: true, format: (i) => getDict(i, 'is_use') },
-  { label: t('pages.supply.supply_status'), model: 'supply_status', format: (i) => getDict(i, 'supply') },
+  // { label: t('pages.supply.supply_status'), model: 'supply_status', format: (i) => getDict(i, 'supply') },
   { label: t('pages.supply.status'), model: 'status', format: (i) => getDict(i, 'status') }
 ]
 const opera = [
@@ -103,18 +111,19 @@ const fieldList = ref([])
 const cityList = ref([])
 const supplyList = ref([])
 const tagsList = ref([])
+const sectorList = ref([])
 // 多选列表
 const selectList = ref([])
 // 加载中
 const loading = ref(false)
 const formFields = ref([
   { label: t('pages.supply.name'), model: 'name' },
+  { label: t('pages.supply.industry'), model: 'industry', type: 'select' },
   { label: t('pages.supply.tags'), model: 'tags', custom: true },
   { label: t('pages.supply.field'), model: 'field' },
   { label: t('pages.supply.urgent'), model: 'urgent', type: 'select' },
   { label: t('pages.supply.method'), model: 'method', type: 'select' },
   { label: t('pages.supply.money'), model: 'money' },
-  { label: t('pages.supply.industry'), model: 'industry' },
   { label: t('pages.supply.source'), model: 'source' },
   { label: t('pages.supply.area'), model: 'area', custom: true },
   { label: t('pages.supply.time'), model: 'time', type: 'daterange' },
@@ -162,8 +171,13 @@ const searchOther = async () => {
   // 标签
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
+  // 行业
+  result = await sectorStore.query({ is_use: '0' })
+  if ($checkRes(result)) sectorList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -218,7 +232,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toSave = async () => {
@@ -228,7 +242,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -242,7 +256,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -252,7 +266,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 3 - 1
src/views/log/opera/index.vue

@@ -96,7 +96,9 @@ onMounted(async () => {
   await search({ skip, limit })
   loading.value = false
 })
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if ($checkRes(res)) {

+ 20 - 38
src/views/match/info/index.vue

@@ -5,7 +5,7 @@
         <el-option v-for="i in typeList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
       <template #industry>
-        <el-option v-for="i in industryList" :key="i.id" :label="i.label" :value="i.value"></el-option>
+        <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
       </template>
     </custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
@@ -23,7 +23,7 @@
               <el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
             </template>
             <template #industry>
-              <el-option v-for="i in industryList" :key="i.id" :label="i.label" :value="i.value"></el-option>
+              <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
             </template>
             <template #type>
               <el-option v-for="i in typeList" :key="i.id" :label="i.label" :value="i.value"></el-option>
@@ -106,40 +106,21 @@ const router = useRouter()
 import { MatchStore } from '@/store/api/platform/match'
 import { DictDataStore } from '@/store/api/system/dictData'
 import { TagsStore } from '@/store/api/system/tags'
+import { SectorStore } from '@/store/api/system/sector'
 const store = MatchStore()
 const dictDataStore = DictDataStore()
 const tagsStore = TagsStore()
+const sectorStore = SectorStore()
 const data = ref([])
 const searchForm = ref({})
 const fields = [
   { label: t('pages.match.name'), model: 'name', isSearch: true },
+  { label: t('pages.match.industry'), model: 'industry', type: 'select', isSearch: true },
   { label: t('pages.match.tags'), model: 'tags', isSearch: true, format: (i) => getDict(i, 'tags') },
-  {
-    label: t('pages.match.type'),
-    model: 'type',
-    isSearch: true,
-    type: 'select',
-    format: (i) => getDict(i, 'type')
-  },
-  {
-    label: t('pages.match.industry'),
-    model: 'industry',
-    type: 'select',
-    isSearch: true,
-    format: (i) => getDict(i, 'industry')
-  },
-  { label: t('pages.match.money'), model: 'money' },
-  {
-    label: t('pages.match.is_use'),
-    model: 'is_use',
-    custom: true,
-    format: (i) => getDict(i, 'is_use')
-  },
-  {
-    label: t('pages.match.match_status'),
-    model: 'match_status',
-    format: (i) => getDict(i, 'match')
-  },
+  { label: t('pages.match.type'), model: 'type', isSearch: true, type: 'select', format: (i) => getDict(i, 'type') },
+  // { label: t('pages.match.money'), model: 'money' },
+  { label: t('pages.match.is_use'), model: 'is_use', custom: true, format: (i) => getDict(i, 'is_use') },
+  { label: t('pages.match.match_status'), model: 'match_status', format: (i) => getDict(i, 'match') },
   { label: t('pages.match.status'), model: 'status', format: (i) => getDict(i, 'status') }
 ]
 const opera = [
@@ -167,8 +148,8 @@ const statusList = ref([])
 const typeList = ref([])
 const matchList = ref([])
 const formList = ref([])
-const industryList = ref([])
 const tagsList = ref([])
+const sectorList = ref([])
 // 加载中
 const loading = ref(false)
 const formFields = ref([
@@ -235,14 +216,16 @@ const searchOther = async () => {
   // 赛事状态
   result = await dictDataStore.query({ code: 'matchStatus', is_use: '0' })
   if ($checkRes(result)) matchList.value = result.data
-  // 赛事行业
-  result = await dictDataStore.query({ code: 'matchIndustry', is_use: '0' })
-  if ($checkRes(result)) industryList.value = result.data
   // 标签
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
+  // 行业
+  result = await sectorStore.query({ is_use: '0' })
+  if ($checkRes(result)) sectorList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -256,7 +239,6 @@ const getDict = (data, model) => {
     let res
     if (model == 'is_use') res = isUseList.value.find((f) => f.value == data)
     else if (model == 'status') res = statusList.value.find((f) => f.value == data)
-    else if (model == 'industry') res = industryList.value.find((f) => f.value == data)
     else if (model == 'type') res = typeList.value.find((f) => f.value == data)
     else if (model == 'match') res = matchList.value.find((f) => f.value == data)
     else if (model == 'tags') return data.join(',')
@@ -280,7 +262,7 @@ const toSign = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toSave = async () => {
@@ -290,7 +272,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -304,7 +286,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -318,7 +300,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 3 - 1
src/views/match/sign/index.vue

@@ -81,7 +81,9 @@ const searchOther = async () => {
   result = await dictDataStore.query({ code: 'cardType', is_use: '0' })
   if ($checkRes(result)) cardTypeList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value, match: route.query.id }
   const res = await store.query(info)
   if (res.errcode == '0') {

+ 7 - 5
src/views/platform/news/index.vue

@@ -140,7 +140,9 @@ const searchOther = async () => {
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value, type: '1' }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -175,7 +177,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 
@@ -192,7 +194,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -206,7 +208,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -220,7 +222,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 7 - 5
src/views/platform/policy/index.vue

@@ -140,7 +140,9 @@ const searchOther = async () => {
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value, type: '0' }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -175,7 +177,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 
@@ -192,7 +194,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -206,7 +208,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -220,7 +222,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 7 - 5
src/views/platform/trends/index.vue

@@ -140,7 +140,9 @@ const searchOther = async () => {
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value, type: '2' }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -175,7 +177,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 
@@ -192,7 +194,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -206,7 +208,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -220,7 +222,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 23 - 12
src/views/project/index.vue

@@ -16,6 +16,9 @@
       <template #cooperate>
         <el-option v-for="i in cooperateList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
+      <template #industry>
+        <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+      </template>
     </custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
     <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @exam="toExam" @edit="toEdit" @delete="toDelete">
@@ -33,6 +36,9 @@
                 <el-option v-for="item in tagsList" :key="item.id" :label="item.title" :value="item.title" />
               </el-select>
             </template>
+            <template #industry>
+              <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+            </template>
             <template #is_use>
               <el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
             </template>
@@ -78,20 +84,19 @@ const { t } = useI18n()
 import { ProjectStore } from '@/store/api/platform/project'
 import { DictDataStore } from '@/store/api/system/dictData'
 import { TagsStore } from '@/store/api/system/tags'
+import { SectorStore } from '@/store/api/system/sector'
 const store = ProjectStore()
 const dictDataStore = DictDataStore()
 const tagsStore = TagsStore()
+const sectorStore = SectorStore()
 const data = ref([])
 const searchForm = ref({})
 const fields = [
   { label: t('pages.project.name'), model: 'name', isSearch: true },
+  { label: t('pages.project.industry'), model: 'industry', isSearch: true, type: 'select' },
   { label: t('pages.project.tags'), model: 'tags', isSearch: true, format: (i) => getDict(i, 'tags') },
-  { label: t('pages.project.type'), model: 'type', isSearch: true, type: 'select', format: (i) => getDict(i, 'type') },
-  { label: t('pages.project.field'), model: 'field', isSearch: true, type: 'select', format: (i) => getDict(i, 'field') },
-  { label: t('pages.project.maturity'), model: 'maturity', isSearch: true, type: 'select', format: (i) => getDict(i, 'maturity') },
-  { label: t('pages.project.skill'), model: 'skill', isSearch: true, type: 'select', format: (i) => getDict(i, 'skill') },
-  { label: t('pages.project.cooperate'), model: 'cooperate', isSearch: true, type: 'select', format: (i) => getDict(i, 'cooperate') },
-  { label: t('pages.project.time'), model: 'time' },
+  { label: t('pages.project.main'), model: 'main', isSearch: true },
+  { label: t('pages.project.progress'), model: 'progress', isSearch: true },
   { label: t('pages.project.is_use'), model: 'is_use', custom: true, format: (i) => getDict(i, 'is_use') },
   { label: t('pages.project.status'), model: 'status', format: (i) => getDict(i, 'status') }
 ]
@@ -114,10 +119,12 @@ const skillList = ref([])
 const cityList = ref([])
 const cooperateList = ref([])
 const tagsList = ref([])
+const sectorList = ref([])
 // 加载中
 const loading = ref(false)
 const formFields = ref([
   { label: t('pages.project.name'), model: 'name' },
+  { label: t('pages.project.industry'), model: 'industry', type: 'select' },
   { label: t('pages.project.tags'), model: 'tags', custom: true },
   { label: t('pages.project.type'), model: 'type', type: 'select' },
   { label: t('pages.project.maturity'), model: 'maturity', type: 'select' },
@@ -130,7 +137,6 @@ const formFields = ref([
   { label: t('pages.project.progress'), model: 'progress' },
   { label: t('pages.project.track_unit'), model: 'track_unit' },
   { label: t('pages.project.source'), model: 'source' },
-  { label: t('pages.project.industry'), model: 'industry' },
   { label: t('pages.project.is_use'), model: 'is_use', type: 'radio' },
   { label: t('pages.project.brief'), model: 'brief', type: 'textarea' }
 ])
@@ -178,8 +184,13 @@ const searchOther = async () => {
   // 标签
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
+  // 行业
+  result = await sectorStore.query({ is_use: '0' })
+  if ($checkRes(result)) sectorList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -215,7 +226,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toSave = async () => {
@@ -225,7 +236,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -239,7 +250,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -249,7 +260,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 5 - 3
src/views/system/dict/index.vue

@@ -76,7 +76,9 @@ const searchOther = async () => {
   const result = await dictDataStore.query({ code: 'isUse', is_use: '0' })
   if ($checkRes(result)) isUseList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -107,7 +109,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toSave = async () => {
@@ -116,7 +118,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update(data)
   else res = await store.create(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }

+ 5 - 3
src/views/system/dictData/index.vue

@@ -64,7 +64,9 @@ onMounted(async () => {
   await search({ skip, limit })
   loading.value = false
 })
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value, code: codeInfo.value.code }
   const res = await store.query(info)
   if ($checkRes(res)) {
@@ -90,7 +92,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toSave = async () => {
@@ -99,7 +101,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update(data)
   else res = await store.create({ ...data, code: codeInfo.value.code })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }

+ 7 - 6
src/views/system/role/index.vue

@@ -29,11 +29,12 @@ const store = RoleStore()
 const menuStore = MenusStore()
 
 const $checkRes = inject('$checkRes')
-const limit = inject('limit')
+let skip = 0
+let limit = inject('limit')
 const currentPage = ref(1)
 onMounted(() => {
   searchMenus()
-  search({ skip: 0, limit })
+  search({ skip, limit })
 })
 const menuList = ref([])
 const searchMenus = async () => {
@@ -45,7 +46,7 @@ const searchMenus = async () => {
 
 const data = ref([])
 const total = ref(0)
-const search = async (e = { skip: 0, limit }) => {
+const search = async (e = { skip, limit }) => {
   const { skip, limit } = e
   let info = { limit: limit, skip: skip }
   let res = await store.query(info)
@@ -73,7 +74,7 @@ const toDelete = async (data) => {
   }).then(async () => {
     const res = await store.del(data.id)
     if ($checkRes(res, true)) {
-      search({ skip: 0, limit })
+      search({ skip, limit })
     }
   })
 }
@@ -83,7 +84,7 @@ const onSubmit = async () => {
   if (get(data, 'id')) res = await store.update(data)
   else res = await store.create(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -92,7 +93,7 @@ const changeUse = async (data) => {
   if (data.is_use === '1') is_use = '0'
   const res = await store.update({ id: data.id, is_use })
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const toAdd = () => {

+ 149 - 0
src/views/system/sector/index.vue

@@ -0,0 +1,149 @@
+<template>
+  <div class="main animate__animated animate__backInRight" v-loading="loading">
+    <custom-search-bar :fields="fields.filter((f) => f.isSearch)" v-model="searchForm" @search="search" @reset="toReset"></custom-search-bar>
+    <custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
+    <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @dict="toDict" @edit="toEdit" @delete="toDelete">
+      <template #is_use="{ row }">
+        <el-tag v-if="row.is_use == '0'" type="success" @click="toUse(row, '1')">启用</el-tag>
+        <el-tag v-else type="info" @click="toUse(row, '0')">禁用</el-tag>
+      </template>
+    </custom-table>
+    <el-dialog v-model="dialog.show" :title="dialog.title" :destroy-on-close="false" @close="toClose" :top="dialog.top">
+      <el-row>
+        <el-col :span="24" v-if="dialog.type == '1'">
+          <custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave">
+            <template #is_use>
+              <el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
+            </template>
+          </custom-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+const $checkRes = inject('$checkRes')
+import { cloneDeep, get } from 'lodash-es'
+const { t } = useI18n()
+// 接口
+import { SectorStore } from '@/store/api/system/sector'
+import { DictDataStore } from '@/store/api/system/dictData'
+const store = SectorStore()
+const dictDataStore = DictDataStore()
+const data = ref([])
+const searchForm = ref({})
+const fields = [
+  { label: t('pages.sector.title'), model: 'title', isSearch: true },
+  { label: t('pages.sector.sort'), model: 'sort' },
+  {
+    label: t('pages.sector.is_use'),
+    model: 'is_use',
+    format: (i) => getDict(i, 'is_use'),
+    custom: true
+  },
+  { label: t('pages.sector.remark'), model: 'remark' }
+]
+const opera = [
+  { label: t('common.update'), method: 'edit' },
+  { label: t('common.delete'), method: 'delete', confirm: true, type: 'danger' }
+]
+const buttonFields = [{ label: t('common.create'), method: 'add' }]
+let skip = 0
+let limit = inject('limit')
+const total = ref(0)
+const isUseList = ref([])
+// 加载中
+const loading = ref(false)
+const formFields = [
+  { label: t('pages.sector.title'), model: 'title' },
+  { label: t('pages.sector.href'), model: 'href' },
+  { label: t('pages.sector.English'), model: 'English' },
+  { label: t('pages.sector.sort'), model: 'sort', type: 'number' },
+  { label: t('pages.sector.is_use'), model: 'is_use', type: 'radio' },
+  { label: t('pages.sector.remark'), model: 'remark', type: 'textarea' }
+]
+const rules = reactive({
+  title: [{ required: true, message: t('pages.sector.titleMessage'), trigger: 'blur' }],
+  sort: [{ required: true, message: t('pages.sector.sortfMessage'), trigger: 'blur' }]
+})
+const dialog = ref({ type: '1', show: false, title: t('pages.sector.dialogTitle'), top: '15vh' })
+const form = ref({})
+// 请求
+onMounted(async () => {
+  loading.value = true
+  await searchOther()
+  await search({ skip, limit })
+  loading.value = false
+})
+
+const searchOther = async () => {
+  const result = await dictDataStore.query({ code: 'isUse', is_use: '0' })
+  if ($checkRes(result)) isUseList.value = result.data
+}
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
+  const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
+  const res = await store.query(info)
+  if (res.errcode == '0') {
+    data.value = res.data
+    total.value = res.total
+  }
+}
+// 字典数据转换
+const getDict = (data, model) => {
+  if (data) {
+    let res
+    if (model == 'is_use') res = isUseList.value.find((f) => f.value == data)
+    return get(res, 'label')
+  }
+}
+// 添加
+const toAdd = () => {
+  dialog.value = { type: '1', show: true, title: t('pages.sector.addDialogTitle'), top: '15vh' }
+}
+// 修改
+const toEdit = (data) => {
+  form.value = data
+  dialog.value = { type: '1', show: true, title: t('pages.sector.upDialogTitle'), top: '15vh' }
+}
+// 删除
+const toDelete = async (data) => {
+  const res = await store.del(data.id)
+  if ($checkRes(res, true)) {
+    search({ skip, limit })
+  }
+}
+const toSave = async () => {
+  const data = cloneDeep(form.value)
+  let res
+  if (get(data, 'id')) res = await store.update(data)
+  else res = await store.create(data)
+  if ($checkRes(res, true)) {
+    search({ skip, limit })
+    toClose()
+  }
+}
+// 重置
+const toReset = async () => {
+  searchForm.value = {}
+  await search({ skip, limit })
+}
+const toClose = () => {
+  form.value = {}
+  dialog.value = { show: false }
+}
+// 开启或禁用
+const toUse = async (data, is_use) => {
+  ElMessageBox.confirm(`确定修改【${data.title}】数据?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
+    .then(async () => {
+      let res = await store.update({ id: get(data, 'id'), is_use })
+      if ($checkRes(res, true)) {
+        search({ skip, limit })
+      }
+    })
+    .catch(() => {})
+}
+</script>
+<style scoped lang="scss"></style>

+ 6 - 4
src/views/system/tags/index.vue

@@ -122,7 +122,9 @@ const searchOther = async () => {
   const result = await dictDataStore.query({ code: 'isUse', is_use: '0' })
   if ($checkRes(result)) isUseList.value = result.data
 }
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -152,7 +154,7 @@ const toEdit = (data) => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 // 添加子目录
@@ -170,7 +172,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update(data)
   else res = await store.create(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }
@@ -189,7 +191,7 @@ const toUse = async (data, is_use) => {
     .then(async () => {
       let res = await store.update({ id: get(data, 'id'), is_use })
       if ($checkRes(res, true)) {
-        search({ skip: 0, limit })
+        search({ skip, limit })
       }
     })
     .catch(() => {})

+ 6 - 4
src/views/user/admin/index.vue

@@ -82,7 +82,9 @@ const opera = [
 ]
 const buttonFields = [{ label: t('common.create'), method: 'add' }]
 const searchForm = ref({})
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -115,7 +117,7 @@ const searchOther = async () => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const userType = 'Admin'
@@ -133,7 +135,7 @@ const toChangeUse = async (data) => {
   const udata = { id: data.id, is_use: data.is_use === '0' ? '1' : '0' }
   const res = await store.update(udata)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const dialog = ref(false)
@@ -174,7 +176,7 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update(data)
   else res = await store.create(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }

+ 5 - 3
src/views/user/user/index.vue

@@ -109,7 +109,9 @@ const opera = [
 const searchForm = ref({})
 const dialog = ref({ type: '1', show: false, title: t('pages.user.dialogTitle') })
 // 查询
-const search = async (query = { skip: 0, limit }) => {
+const search = async (query = { skip, limit }) => {
+  skip = query.skip
+  limit = query.limit
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -184,7 +186,7 @@ const searchOther = async () => {
 const toDelete = async (data) => {
   const res = await store.del(data.id)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
   }
 }
 const getRole = (data) => {
@@ -254,7 +256,7 @@ const toExamSave = async () => {
   const data = cloneDeep(examForm.value)
   let res = await store.update(data)
   if ($checkRes(res, true)) {
-    search({ skip: 0, limit })
+    search({ skip, limit })
     toClose()
   }
 }