소스 검색

feat: 完成打包,补上缺少的文件

louhangfei 11 달 전
부모
커밋
25ef316f81

+ 100 - 0
src/api/system/log.ts

@@ -0,0 +1,100 @@
+import { http } from '@/utils/http/axios';
+import {
+  LoginLogPageRequest,
+  LoginLogResponse,
+  OperationLogResponse,
+  OperationLogPageRequest,
+  SystemLogRequest,
+  SystemLogResponse,
+  SystemExport,
+  OperationPageDetail,
+  OperationExport,
+} from '@/types/log/type';
+
+/**
+ *@description: V4: 获取登录日志列表
+ */
+export function queryLoginLogList(data: LoginLogPageRequest) {
+  return http.request<LoginLogResponse>({
+    url: '/admin/log/queryLoginLogPage',
+    method: 'post',
+    data: data,
+  });
+}
+
+/**
+ * @description: @v4:登录日志导出 admin/log/exportLoginLog
+ */
+export function exportLoginLog(data: LoginLogPageRequest) {
+  return http.request(
+    {
+      url: '/admin/log/exportLoginLog',
+      method: 'post',
+      responseType: 'blob',
+      data,
+    },
+    { isTransformResponse: false },
+  );
+}
+
+/**
+ *@description: V4: 获取操作日志列表
+ */
+export function queryOperationLogList(data: OperationLogPageRequest) {
+  return http.request<OperationLogResponse>({
+    url: '/admin/log/queryLogPage',
+    method: 'post',
+    data: data,
+  });
+}
+
+/**
+ * @description: @v4:操作日志导出 admin/log/exportLog
+ */
+export function exportOperationLog(data: OperationExport) {
+  return http.request(
+    {
+      url: '/admin/log/exportLog',
+      method: 'post',
+      responseType: 'blob',
+      data,
+    },
+    { isTransformResponse: false },
+  );
+}
+
+/**
+ *@description: V4: 获取操作日志详情
+ */
+export function queryOperationLogDetail(id: number) {
+  return http.request<OperationPageDetail>({
+    url: `/admin/log/queryLogDetail?id=${id}`,
+    method: 'get',
+  });
+}
+
+/**
+ *@description: V4: 获取系统日志列表
+ */
+export function querySystemLogList(data: SystemLogRequest) {
+  return http.request<SystemLogResponse>({
+    url: '/admin/log/queryEventLogPage',
+    method: 'post',
+    data: data,
+  });
+}
+
+/**
+ * @description: @v4:系统日志导出 admin/log/exportEventLog
+ */
+export function exportSystemLog(data: SystemExport) {
+  return http.request(
+    {
+      url: '/admin/log/exportEventLog',
+      method: 'post',
+      responseType: 'blob',
+      data,
+    },
+    { isTransformResponse: false },
+  );
+}

+ 125 - 0
src/api/tenant/index.ts

@@ -0,0 +1,125 @@
+import { http } from '@/utils/http/axios';
+import type { tenantFormType } from '@/types/tenant/type';
+
+/**
+ * @description: 租户列表
+ */
+export function tenantList(params) {
+  return http.request({
+    url: '/tenant/list',
+    method: 'get',
+    params,
+  });
+}
+
+/**
+ * @description: 添加租户
+ */
+export function addTenant(data) {
+  return http.request({
+    url: '/tenant/add',
+    method: 'post',
+    data,
+  });
+}
+
+/**
+ * @description: 删除租户
+ */
+export function deleteTenant(data) {
+  return http.request({
+    url: '/tenant/delete',
+    method: 'post',
+    data,
+  });
+}
+
+/**
+ * @description: 编辑租户
+ */
+export function editTenant(data) {
+  return http.request({
+    url: '/tenant/update',
+    method: 'post',
+    data,
+  });
+}
+
+/**
+ * @description: 租户详情
+ */
+export function tenantInfo(params) {
+  return http.request({
+    url: '/tenant/view',
+    method: 'get',
+    params,
+  });
+}
+
+/** 获取有总部权限时的所有租户 */
+export function getListUseZongbu() {
+  return http.request(
+    {
+      url: '/tenant/listUseZongbu',
+      method: 'get',
+    },
+    { isShowErrorMessage: false, isShowMessage: false },
+  );
+}
+
+/**
+ * @description: 查询租户树
+ */
+export function queryTenantTreeApi(params: { tenantName: string; tenantCode: string }) {
+  return http.request({
+    url: '/admin/tenant/queryTenantTree',
+    method: 'post',
+    params,
+  });
+}
+
+/**
+ * @description: 添加租户(新)
+ */
+
+export function saveTenantApi(params: tenantFormType) {
+  return http.request({
+    url: '/admin/tenant/saveTenant',
+    method: 'post',
+    params,
+  });
+}
+
+/**
+ * @description: 删除租户(新)
+ */
+
+export function deleteTenantApi(tenantId: number) {
+  return http.request({
+    url: `/admin/tenant/deleteTenant?tenantId=${tenantId}`,
+    method: 'post',
+  });
+}
+
+/**
+ * @description: 修改租户(新)
+ */
+
+export function updateTenantApi(params: tenantFormType) {
+  return http.request({
+    url: '/admin/tenant/updateTenant',
+    method: 'post',
+    params,
+  });
+}
+
+/* V4: 获取租户列表 */
+export function queryListTenant() {
+  return http.request(
+    {
+      url: '/admin/tenant/listTenantForTargetTenant',
+      method: 'post',
+    },
+    { isShowErrorMessage: false, isShowMessage: false, ignoreTargetTenantId: true },
+  );
+}

+ 7 - 7
src/router/index.ts

@@ -6,21 +6,21 @@ import { createRouterGuards } from './router-guards';
 import { exceptionRouters, HOME_PAGE, platformRoutes, RootRoute } from './full-routes';
 import { asyncImportRoute, routerGenerator } from './generator-routers';
 
-const modules: any = import.meta.glob('./modules/**/*.ts', { eager: true });
+// const modules: any = import.meta.glob('./modules/**/*.ts', { eager: true });
 
 const routeModuleList: RouteRecordRaw[] = [];
 
-Object.keys(modules).forEach((key) => {
-  const mod = modules[key].default || {};
-  const modList = Array.isArray(mod) ? [...mod] : [mod];
-  routeModuleList.push(...modList);
-});
+// Object.keys(modules).forEach((key) => {
+//   const mod = modules[key].default || {};
+//   const modList = Array.isArray(mod) ? [...mod] : [mod];
+//   routeModuleList.push(...modList);
+// });
 
 function sortRoute(a, b) {
   return (a.meta?.sort || 0) - (b.meta?.sort || 0);
 }
 
-routeModuleList.sort(sortRoute);
+// routeModuleList.sort(sortRoute);
 
 const constantRoutes = [RootRoute, HOME_PAGE, RedirectRoute, exceptionRouters];
 

+ 0 - 148
src/views/auth/post/CreateDrawer.vue

@@ -1,148 +0,0 @@
-<template>
-  <el-drawer v-model="isDrawer" :size="width" :title="title" @close="handleReset">
-    <el-form
-      :model="formParams"
-      :rules="rules"
-      ref="formRef"
-      label-placement="left"
-      :label-width="80"
-    >
-      <el-form-item label="岗位编码" prop="postCode">
-        <el-input
-          placeholder="请输入岗位编码"
-          v-model="formParams.postCode"
-          :disabled="formParams.postId ? true : false"
-        />
-      </el-form-item>
-      <el-form-item label="岗位名称" prop="postName">
-        <el-input placeholder="请输入岗位名称" v-model="formParams.postName" />
-      </el-form-item>
-      <el-form-item label="排序" prop="orderNum">
-        <el-input-number placeholder="请输入排序" v-model="formParams.orderNum" />
-      </el-form-item>
-      <el-form-item label="状态" prop="isEnable">
-        <el-switch v-model="formParams.isEnable">
-          <template #checked> 启用 </template>
-          <template #unchecked> 禁用 </template>
-        </el-switch>
-      </el-form-item>
-    </el-form>
-
-    <template #footer>
-      <el-space>
-        <el-button @click="handleReset">重置</el-button>
-        <el-button type="primary" :loading="subLoading" @click="formSubmit">提交</el-button>
-      </el-space>
-    </template>
-  </el-drawer>
-</template>
-
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import type { formParamsType } from './types';
-
-  import { addPost, editPost, postInfo } from '@/api/auth/post';
-
-  const rules = {
-    postCode: {
-      required: true,
-      message: '岗位编码不能为空',
-      trigger: 'blur',
-    },
-    postName: {
-      required: true,
-      message: '岗位名称不能为空',
-      trigger: 'blur',
-    },
-  };
-
-  const emit = defineEmits(['change']);
-
-  defineProps({
-    title: {
-      type: String,
-      default: '添加岗位',
-    },
-    width: {
-      type: Number,
-      default: 450,
-    },
-  });
-
-  const defaultValueRef = () => ({
-    postId: null,
-    postCode: '',
-    isEnable: true,
-    postName: '',
-    orderNum: undefined,
-  });
-
-  const message = ElMessage;
-  const formRef: any = ref(null);
-  const isDrawer = ref(false);
-  const subLoading = ref(false);
-
-  const formParams = ref<formParamsType>(defaultValueRef());
-
-  function openDrawer(postId?) {
-    if (postId) {
-      formParams.value.postId = postId;
-      getInfo();
-      return;
-    }
-    isDrawer.value = true;
-  }
-
-  function closeDrawer() {
-    isDrawer.value = false;
-  }
-
-  function formSubmit() {
-    formRef.value.validate((valid) => {
-      if (!valid) {
-        return message.error('请填写完整信息');
-      }
-      const msg = formParams.value.postId ? '编辑成功' : '添加成功';
-      if (formParams.value.postId) {
-        editPost(formParams.value).then((_) => {
-          message.success(msg);
-          emit('change');
-          handleReset();
-          closeDrawer();
-        });
-      } else {
-        addPost(formParams.value).then((_) => {
-          message.success(msg);
-          emit('change');
-          handleReset();
-          closeDrawer();
-        });
-      }
-    });
-  }
-
-  function handleReset() {
-    formRef.value.resetFields();
-    formParams.value = Object.assign(formParams.value, defaultValueRef());
-  }
-
-  function getInfo() {
-    postInfo({ id: formParams.value.postId }).then((res) => {
-      const params = {
-        postId: res.postId,
-        postCode: res.postCode,
-        isEnable: res.isEnable,
-        postName: res.postName,
-        orderNum: res.orderNum,
-      };
-      formParams.value = Object.assign(formParams.value, params);
-      isDrawer.value = true;
-    });
-  }
-
-  defineExpose({
-    openDrawer,
-    closeDrawer,
-  });
-</script>

+ 0 - 37
src/views/auth/post/columns.ts

@@ -1,37 +0,0 @@
-import { h } from 'vue';
-import { ElTag } from 'element-plus';
-import { BasicColumn } from '@/components/Table';
-
-export const columns: BasicColumn[] = [
-  {
-    label: '岗位编码',
-    prop: 'postCode',
-  },
-  {
-    label: '岗位名称',
-    prop: 'postName',
-  },
-  {
-    label: '排序',
-    prop: 'orderNum',
-  },
-  {
-    label: '状态',
-    prop: 'isEnable',
-    render(record) {
-      return h(
-        ElTag,
-        {
-          type: record.row.isEnable ? 'success' : 'danger',
-        },
-        {
-          default: () => (record.row.isEnable ? '启用' : '禁用'),
-        },
-      );
-    },
-  },
-  {
-    label: '创建时间',
-    prop: 'createDate',
-  },
-];

+ 0 - 153
src/views/auth/post/post.vue

@@ -1,153 +0,0 @@
-<template>
-  <PageWrapper>
-    <el-card :bordered="false" class="mb-3 proCard">
-      <el-space align="center">
-        <el-input
-          :style="{ width: '320px' }"
-          v-model="params.postName"
-          clearable
-          placeholder="请输入岗位名称"
-          @keyup.enter="reloadTable"
-        />
-        <el-button type="primary" @click="reloadTable">
-          <template #icon>
-            <el-icon>
-              <SearchOutlined />
-            </el-icon>
-          </template>
-          查询
-        </el-button>
-      </el-space>
-    </el-card>
-    <el-card :bordered="false" class="proCard">
-      <BasicTable
-        :columns="columns"
-        :request="loadDataTable"
-        :row-key="(row) => row.postId"
-        ref="basicTableRef"
-        :actionColumn="actionColumn"
-        @update:checked-row-keys="onCheckedRow"
-        virtual-scroll
-      >
-        <template #tableTitle>
-          <el-space align="center">
-            <el-button type="primary" @click="openCreateDrawer">
-              <template #icon>
-                <el-icon>
-                  <FileAddOutlined />
-                </el-icon>
-              </template>
-              添加
-            </el-button>
-
-            <!-- <el-button type="error" @click="openRemoveModal" :disabled="!rowKeys.length">
-              <template #icon>
-                <el-icon>
-                  <DeleteOutlined />
-                </el-icon>
-              </template>
-              删除
-            </el-button> -->
-          </el-space>
-        </template>
-      </BasicTable>
-    </el-card>
-
-    <CreateDrawer ref="createDrawerRef" :title="drawerTitle" :roleList="roleData" @change="reloadTable" />
-  </PageWrapper>
-</template>
-
-<script lang="ts" setup>
-  import { h, reactive, ref } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import { PageWrapper } from '@/components/Page';
-
-  import { BasicTable, TableAction, BasicColumn } from '@/components/Table';
-  import { postList, deletePost } from '@/api/auth/post';
-  import { FileAddOutlined, SearchOutlined } from '@vicons/antd';
-  import CreateDrawer from './CreateDrawer.vue';
-  import { columns } from './columns';
-
-  const message = ElMessage;
-  const basicTableRef = ref();
-  const rowKeys = ref([]);
-  const rowKeysName = ref([]);
-  const tableData = ref();
-  const createDrawerRef = ref();
-  const drawerTitle = ref('添加岗位');
-  const roleData = ref([]);
-
-  const params = reactive({
-    postName: '',
-  });
-
-  const actionColumn: BasicColumn = reactive({
-    width: 150,
-    title: '操作',
-    prop: 'action',
-    fixed: 'right',
-    align: 'center',
-    render(record) {
-      return h(TableAction as any, {
-        actions: [
-          {
-            label: '删除',
-            isConfirm: true,
-            popConfirm: {
-              onConfirm: handleDelete.bind(null, record.row),
-              title: '您确定要删除吗?',
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-            },
-          },
-          {
-            label: '编辑',
-            onClick: handleEdit.bind(null, record.row),
-          },
-        ],
-      });
-    },
-  });
-
-  const loadDataTable = async (res) => {
-    const result = await postList({ ...params, ...res });
-    tableData.value = result.list;
-    return result;
-  };
-
-  function onCheckedRow(keys) {
-    rowKeys.value = keys;
-    rowKeysName.value = tableData.value
-      .filter((item) => {
-        return keys.includes(item.id);
-      })
-      .map((item) => {
-        return item.username;
-      })
-      .join(',');
-  }
-
-  function reloadTable() {
-    basicTableRef.value.reload();
-  }
-
-  function openCreateDrawer() {
-    drawerTitle.value = '添加岗位';
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer();
-  }
-
-  function handleEdit(record: Recordable) {
-    console.log('点击了编辑', record);
-    drawerTitle.value = '编辑岗位';
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer(record.postId);
-  }
-
-  function handleDelete(record: Recordable) {
-    deletePost({ id: record.postId }).then(() => {
-      message.success('删除成功');
-      reloadTable();
-    });
-  }
-</script>

+ 0 - 7
src/views/auth/post/types/index.ts

@@ -1,7 +0,0 @@
-export interface formParamsType {
-  postId?: number | null;
-  isEnable: boolean;
-  postCode: string;
-  postName: string;
-  orderNum: number | undefined;
-}

+ 0 - 102
src/views/system/comments/PageCommentsManage.vue

@@ -1,102 +0,0 @@
-<template>
-  <div class="feedback-page">
-    <div class="feedback-head">
-      <div class="search-input">
-        <el-form :inline="true" :model="listFilter" class="demo-form-inline">
-          <el-form-item label="审核状态:">
-            <el-select v-model="listFilter.authStatus" placeholder="请选择审核状态" @change="getList">
-              <el-option label="全部" :value="COMMENT_STATUS.ALL" />
-              <el-option label="已通过" :value="COMMENT_STATUS.PASSED" />
-              <el-option label="未通过" :value="COMMENT_STATUS.REJECTED" />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="回复状态:">
-            <el-select v-model="listFilter.replyStatus" placeholder="请选择审核状态" @change="getList">
-              <el-option label="全部" :value="REPLY_STATUS.ALL" />
-              <el-option label="已回复" :value="REPLY_STATUS.REPLIED" />
-              <el-option label="未回复" :value="REPLY_STATUS.UN_REPLIED" />
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-    </div>
-    <div class="problem-list">
-      <SingleComment
-        v-for="(item, index) in commentsList"
-        :key="index"
-        :problem-data="item"
-        @reFreshList="getList"
-        style="margin-top: 22px; margin-bottom: 2px"
-      />
-    </div>
-
-    <el-pagination
-      v-model:current-page="pageNumber"
-      v-model:page-size="pageSize"
-      background
-      layout="prev, pager, next,sizes,jumper"
-      :page-sizes="[5, 10, 20, 40]"
-      :total="totalRow"
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-      class="flex justify-end"
-    />
-  </div>
-</template>
-
-<script setup lang="ts">
-  import SingleComment from './component/SingleComment.vue';
-  import useComments from './use-comments.ts';
-  import { REPLY_STATUS, COMMENT_STATUS } from '@/types/comments/constant.ts';
-
-  const useCommentsList = useComments();
-  const { commentsList, pageNumber, pageSize, totalRow, getList, listFilter } = useCommentsList;
-
-  const handleSizeChange = () => {
-    pageNumber.value = 1;
-    getList();
-  };
-  const handleCurrentChange = () => {
-    getList();
-  };
-</script>
-
-<style scoped>
-  .feedback-page {
-    position: relative;
-    height: calc(100vh - 64px - 12px);
-    background-color: #ffffff;
-    padding-top: 20px;
-    padding-left: 20px;
-    padding-right: 20px;
-  }
-
-  :deep(.el-radio-button .el-radio-button__inner) {
-    width: 188px;
-    background-color: #00000005;
-  }
-
-  .feedback-head {
-    display: flex;
-    flex-direction: column;
-  }
-
-  .search-input {
-    margin-top: 24px;
-  }
-
-  .problem-list {
-    height: calc(100vh - 270px);
-    overflow: auto;
-    margin-bottom: 4px;
-    padding: 0 2px;
-  }
-
-  :deep(.el-pagination .el-select) {
-    width: 92px;
-  }
-  .demo-form-inline .el-select {
-    --el-select-width: 220px;
-  }
-</style>
-./use-comments.ts @/types/comments/constant.ts

+ 0 - 311
src/views/system/comments/component/SingleComment.vue

@@ -1,311 +0,0 @@
-<template>
-  <div>
-    <div
-      class="single-item"
-      :style="`padding-bottom:${props.problemData.isReplied === REPLY_STATUS.REPLIED ? '16px' : '38px'}`"
-    >
-      <div v-show="props.problemData.isUserDeleted === 1" class="delete-label"></div>
-      <div :style="{ opacity: props.problemData.isUserDeleted === 1 ? 0.6 : 1 }">
-        <div style="display: flex; font-size: 12px">
-          <div style="color: #00000073">
-            评论人:{{ props.problemData.realname }}({{ props.problemData.userName }} )
-          </div>
-          <div style="margin-left: 20px; color: #00000073">日期:{{ props.problemData.createdAt }}</div>
-          <!-- <img src="@/assets/icons/phone.png" alt="" /> -->
-          <div class="single-contact">联系方式:{{ props.problemData.mobile }}</div>
-        </div>
-        <div class="buttonBar">
-          <el-button
-            v-show="props.problemData.status === COMMENT_STATUS.PASSED"
-            type="primary"
-            class="label-button"
-            style="margin-left: auto; margin-right: 0"
-            @click="showDialogBox('隐藏', '取消展示')"
-            :disabled="props.problemData.isUserDeleted"
-          >
-            隐藏
-          </el-button>
-          <el-button
-            v-show="props.problemData.status !== COMMENT_STATUS.PASSED"
-            type="primary"
-            class="label-button"
-            style="margin-left: auto; margin-right: 0"
-            @click="showDialogBox('显示', '公开展示')"
-            :disabled="props.problemData.isUserDeleted"
-          >
-            显示
-          </el-button>
-          <el-button
-            v-show="
-              props.problemData.isReplied === REPLY_STATUS.UN_REPLIED &&
-              props.problemData.status === COMMENT_STATUS.PASSED
-            "
-            class="label-button"
-            type="primary"
-            @click="openReply = true"
-            :disabled="props.problemData.isUserDeleted"
-          >
-            回复
-          </el-button>
-          <el-button v-show="props.problemData.isReplied === REPLY_STATUS.REPLIED" class="label-button" disabled>
-            已回复
-          </el-button>
-        </div>
-
-        <el-divider />
-        <div class="problem-describe">
-          <div>评论内容:</div>
-          <div class="problem-content">{{ props.problemData.comment }}</div>
-        </div>
-        <div class="problem-picture">
-          <div class="picture-content" v-for="(item, index) in problemImageUrls" :key="index">
-            <el-image
-              style="width: 80px; height: 80px"
-              :src="item"
-              :zoom-rate="1.2"
-              :max-scale="7"
-              :min-scale="0.2"
-              :preview-src-list="problemImageUrls"
-              :initial-index="index"
-              fit="cover"
-            />
-          </div>
-        </div>
-
-        <div v-if="openReply === true" style="position: relative">
-          <el-input
-            placeholder="请输入回复(不超过200个字符)"
-            type="textarea"
-            v-model="replyContent"
-            rows="4"
-            maxlength="200"
-            resize="none"
-          >
-          </el-input>
-          <span v-show="replyContent.length > 185" class="word-count">
-            <span style="line-height: normal" :style="replyContent.length === 200 ? 'color:red' : ''">
-              {{ replyContent.length }}
-            </span>
-            <span style="line-height: normal">/200</span>
-          </span>
-          <div class="reply-button-area">
-            <el-button
-              style="margin-top: 3px"
-              type="primary"
-              size="small"
-              @click="submitReply"
-              :disabled="replyContent.length === 0"
-            >
-              发布
-            </el-button>
-            <el-button style="margin-top: 3px" size="small" @click="openReply = false">取消</el-button>
-          </div>
-        </div>
-
-        <div v-if="props.problemData.isReplied === REPLY_STATUS.REPLIED" style="position: relative">
-          <el-input type="textarea" v-model="props.problemData.reply" rows="3" disabled> </el-input>
-        </div>
-      </div>
-    </div>
-    <el-dialog v-model="showDialog" width="424px" top="20%" class="dialog">
-      <template #header="">
-        <div class="dialogHeader">
-          <img src="@/assets/icons/deleteTip.png" class="deleteTip" />
-          <span class="titleSpan">请确认是否{{ title }}</span>
-        </div>
-      </template>
-      <span style="margin-left: 37px">{{ title }}后,该评论将在前台{{ result }}</span>
-      <div class="dialogBottom">
-        <el-button class="dialogBtn" type="primary" @click="submit">确定</el-button>
-        <el-button class="dialogBtn" @click="showDialog = false">取消</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup lang="ts">
-  import { ref, computed } from 'vue';
-  import { undateCommentStatus, replyComment } from '@/api/comments/comments';
-  import { REPLY_STATUS, COMMENT_STATUS } from '@/types/comments/constant';
-  import { Records } from '@/types/comments/type';
-  const props = defineProps<{
-    problemData: Records;
-  }>();
-
-  const emit = defineEmits(['reFreshList']);
-
-  const problemImageUrls = computed(() => {
-    const imageUrlString = props.problemData.picUrl;
-    return imageUrlString ? imageUrlString.split(',') : [];
-  });
-
-  const showDialog = ref(false);
-  const title = ref('显示'); //该值为显示或隐藏
-  const result = ref('公开展示'); //该值为公开展示或取消展示
-
-  const showDialogBox = (setTitle: string, setResult: string) => {
-    title.value = setTitle;
-    result.value = setResult;
-    showDialog.value = true;
-  };
-
-  const submit = () => {
-    if (title.value === '显示') {
-      displayComment();
-    } else {
-      hideComment();
-    }
-  };
-
-  const hideComment = () => {
-    undateCommentStatus({ id: props.problemData.id, status: COMMENT_STATUS.REJECTED }).then(() => {
-      showDialog.value = false;
-      emit('reFreshList');
-    });
-  };
-  const displayComment = () => {
-    undateCommentStatus({ id: props.problemData.id, status: COMMENT_STATUS.PASSED }).then(() => {
-      showDialog.value = false;
-      emit('reFreshList');
-    });
-  };
-  const submitReply = () => {
-    replyComment({ id: props.problemData.id, reply: replyContent.value }).then(() => {
-      openReply.value = false;
-      emit('reFreshList');
-    });
-  };
-
-  const openReply = ref(false);
-
-  const replyContent = ref('');
-</script>
-
-<style scoped>
-  .single-item {
-    background: #ffffff;
-    box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.09);
-    border-radius: 6px;
-    padding: 16px 12px 0px 12px;
-    position: relative;
-    margin-top: 22px;
-    margin-bottom: 2px;
-  }
-
-  .delete-label {
-    width: 80px;
-    height: 70px;
-    position: absolute;
-    right: 40px;
-    top: 50px;
-    background-image: url('@/assets/icons/deleted.png');
-    background-size: 100% 100%;
-    z-index: 99;
-  }
-
-  .label-button {
-    width: 74px;
-  }
-
-  .single-contact {
-    margin-left: 20px;
-    margin-right: 40px;
-    color: #00000073;
-  }
-  .buttonBar {
-    position: absolute;
-    display: flex;
-    width: 200px;
-    top: 11px;
-    right: 12px;
-  }
-  .single-handle {
-    position: relative;
-    top: 11px;
-    right: 12px;
-  }
-
-  .el-divider--horizontal {
-    margin: 16px 0;
-  }
-
-  .problem-type,
-  .problem-describe {
-    font-size: 14px;
-    white-space: nowrap;
-    word-break: break-word;
-    display: flex;
-    margin-bottom: 8px;
-  }
-
-  .type-content,
-  .problem-content {
-    white-space: pre-wrap;
-    word-break: break-word;
-  }
-  .type-content {
-    font-weight: 600;
-  }
-  .problem-picture {
-    display: flex;
-    gap: 20px;
-  }
-
-  .word-count {
-    position: absolute;
-    left: 10px;
-    padding-bottom: 5px;
-    bottom: 2px;
-    color: grey;
-    background-color: #fff;
-    line-height: 0;
-    font-size: 12px;
-  }
-
-  .reply-button-area {
-    position: absolute;
-    height: 32px;
-    right: 10px;
-    padding-bottom: 5px;
-    bottom: 2px;
-  }
-
-  .dialog {
-    .dialogHeader {
-      display: flex;
-      .deleteTip {
-        height: 24px;
-        width: 24px;
-      }
-      .titleSpan {
-        height: 24px;
-        font-size: 16px;
-        color: rgba(0, 0, 0, 0.88);
-        line-height: 24px;
-        text-align: center;
-        margin-left: 12px;
-      }
-    }
-    .dialogBottom {
-      display: flex;
-      justify-content: flex-end;
-      margin-top: 12px;
-    }
-  }
-
-  :deep(.el-collapse-item__header) {
-    border-bottom: none;
-  }
-
-  :deep(.el-collapse-item__wrap) {
-    border-bottom: none;
-  }
-
-  :deep(.el-collapse-item__content) {
-    padding-bottom: 0px;
-  }
-  :deep(.el-collapse) {
-    border-top: none;
-  }
-</style>
-@/types/comments/constant

+ 0 - 60
src/views/system/comments/use-comments.ts

@@ -1,60 +0,0 @@
-import { getCommentsList } from '@/api/comments/comments';
-import { REPLY_STATUS, COMMENT_STATUS } from '@/types/comments/constant';
-import { Records, CommentsQuery } from '@/types/comments/type';
-import { onMounted, ref } from 'vue';
-
-export function useCommentsList() {
-  const commentsList = ref<Records[]>([]);
-  const pageNumber = ref<number>(1);
-  const pageSize = ref<number>(10);
-  const totalPage = ref<number>();
-  const totalRow = ref<number>();
-
-  const listFilter = ref({
-    authStatus: COMMENT_STATUS.ALL,
-    replyStatus: REPLY_STATUS.ALL,
-  });
-
-  const getList = () => {
-    const params: CommentsQuery = {
-      pageNumber: pageNumber.value,
-      pageSize: pageSize.value,
-    };
-    if (listFilter.value.authStatus !== COMMENT_STATUS.ALL) {
-      //若传1,则拉取审核通过的;若传0,则拉取审核未通过的和未审核的
-      params.queryParam = {
-        isApproved: listFilter.value.authStatus === COMMENT_STATUS.PASSED ? 1 : 0,
-      };
-    }
-    if (listFilter.value.replyStatus !== REPLY_STATUS.ALL) {
-      params.queryParam = {
-        isReplied: listFilter.value.replyStatus,
-      };
-    }
-    getCommentsList(params).then((res) => {
-      commentsList.value = res.records;
-      // 若有回复,将回复内容前面加上“回复:”
-      commentsList.value.forEach((item) => {
-        item.reply = '回复: ' + item.reply;
-      });
-      totalPage.value = res.totalPage;
-      totalRow.value = res.totalRow;
-    });
-  };
-
-  onMounted(() => {
-    getList();
-  });
-
-  return {
-    commentsList,
-    pageNumber,
-    pageSize,
-    totalPage,
-    totalRow,
-    getList,
-    listFilter,
-  };
-}
-
-export default useCommentsList;

+ 0 - 152
src/views/system/config/CreateDrawer.vue

@@ -1,152 +0,0 @@
-<template>
-  <el-drawer v-model="isDrawer" :size="width" :title="title" @close="handleReset">
-    <el-form
-      :model="formParams"
-      :rules="rules"
-      ref="formRef"
-      label-placement="left"
-      :label-width="80"
-    >
-      <el-form-item label="配置名称" prop="configName">
-        <el-input placeholder="请输入配置名称" v-model="formParams.configName" />
-      </el-form-item>
-      <el-form-item label="配置编码" prop="configCode">
-        <el-input placeholder="请输入配置编码" v-model="formParams.configCode" />
-      </el-form-item>
-      <el-form-item label="配置值" prop="configValue">
-        <el-input placeholder="请输入配置值" v-model="formParams.configValue" />
-      </el-form-item>
-      <el-form-item label="描述" prop="configDesc">
-        <el-input type="textarea" placeholder="请输入配置描述" v-model="formParams.configDesc" />
-      </el-form-item>
-      <el-form-item label="排序" prop="configOrder">
-        <el-input-number placeholder="显示排序" v-model="formParams.configOrder" />
-      </el-form-item>
-    </el-form>
-    <template #footer>
-      <el-space>
-        <el-button @click="handleReset">重置</el-button>
-        <el-button type="primary" :loading="subLoading" @click="formSubmit">提交</el-button>
-      </el-space>
-    </template>
-  </el-drawer>
-</template>
-
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import type { formParamsType } from './types';
-
-  import { addConfig, editConfig, configInfo } from '@/api/system/config';
-
-  const rules = {
-    configName: {
-      required: true,
-      message: '配置名称不能为空',
-      trigger: 'blur',
-    },
-    configCode: {
-      required: true,
-      message: '配置编码不能为空',
-      trigger: 'blur',
-    },
-    configValue: {
-      required: true,
-      message: '配置值不能为空',
-      trigger: 'blur',
-    },
-  };
-
-  const emit = defineEmits(['change']);
-
-  defineProps({
-    title: {
-      type: String,
-      default: '添加配置',
-    },
-    width: {
-      type: Number,
-      default: 450,
-    },
-    permissionList: {
-      type: Array,
-    },
-  });
-
-  const defaultValueRef = () => ({
-    id: null,
-    configCode: '',
-    configDesc: '',
-    configName: '',
-    configOrder: undefined,
-    configValue: '',
-  });
-
-  const message = ElMessage;
-  const formRef: any = ref(null);
-  const isDrawer = ref(false);
-  const subLoading = ref(false);
-
-  const formParams = ref<formParamsType>(defaultValueRef());
-
-  function openDrawer(id?) {
-    if (id) {
-      formParams.value.id = id;
-      getInfo();
-      return;
-    }
-    isDrawer.value = true;
-  }
-
-  function closeDrawer() {
-    isDrawer.value = false;
-  }
-
-  function formSubmit() {
-    formRef.value.validate((valid) => {
-      if (!valid) {
-        return message.error('请填写完整信息');
-      }
-      if (formParams.value.id) {
-        editConfig(formParams.value).then((_) => {
-          message.success('编辑成功');
-          emit('change');
-          handleReset();
-          closeDrawer();
-        });
-      } else {
-        addConfig(formParams.value).then((_) => {
-          message.success('添加成功');
-          emit('change');
-          handleReset();
-          closeDrawer();
-        });
-      }
-    });
-  }
-
-  function handleReset() {
-    formRef.value.resetFields();
-    formParams.value = Object.assign(formParams.value, defaultValueRef());
-  }
-
-  function getInfo() {
-    configInfo({ id: formParams.value.id }).then((res) => {
-      const info = {
-        id: res.id,
-        configCode: res.configCode,
-        configDesc: res.configDesc,
-        configName: res.configName,
-        configOrder: res.configOrder,
-        configValue: res.configValue,
-      };
-      formParams.value = info;
-      isDrawer.value = true;
-    });
-  }
-
-  defineExpose({
-    openDrawer,
-    closeDrawer,
-  });
-</script>

+ 0 - 29
src/views/system/config/columns.ts

@@ -1,29 +0,0 @@
-import { BasicColumn } from '@/components/Table';
-
-export const columns: BasicColumn[] = [
-  {
-    label: '配置名称',
-    prop: 'configName',
-  },
-  {
-    label: '配置编码',
-    prop: 'configCode',
-  },
-  {
-    label: '配置值',
-    prop: 'configValue',
-  },
-  {
-    label: '配置描述',
-    prop: 'configDesc',
-  },
-  {
-    label: '排序',
-    prop: 'configOrder',
-    width: 100,
-  },
-  {
-    label: '创建时间',
-    prop: 'createDate',
-  },
-];

+ 0 - 139
src/views/system/config/list.vue

@@ -1,139 +0,0 @@
-<template>
-  <page-wrapper>
-    <el-card :bordered="false" class="mb-3 proCard">
-      <el-space align="center">
-        <el-input
-          :style="{ width: '320px' }"
-          v-model="params.configName"
-          clearable
-          placeholder="请输入配置名称"
-          @keyup.enter="reloadTable"
-        />
-        <el-button type="primary" @click="reloadTable">
-          <template #icon>
-            <el-icon>
-              <SearchOutlined />
-            </el-icon>
-          </template>
-          查询
-        </el-button>
-      </el-space>
-    </el-card>
-    <el-card :bordered="false" class="proCard">
-      <BasicTable
-        :columns="columns"
-        :request="loadDataTable"
-        :row-key="(row) => row.id"
-        ref="tableRef"
-        :actionColumn="actionColumn"
-        @update:checked-row-keys="onCheckedRow"
-      >
-        <template #tableTitle>
-          <el-button type="primary" @click="openCreateDrawer">
-            <template #icon>
-              <el-icon>
-                <FileAddOutlined />
-              </el-icon>
-            </template>
-            添加配置
-          </el-button>
-        </template>
-
-        <template #action>
-          <TableAction />
-        </template>
-      </BasicTable>
-    </el-card>
-
-    <CreateDrawer
-      ref="createDrawerRef"
-      :title="drawerTitle"
-      :permissionList="treeData"
-      @change="reloadTable"
-    />
-  </page-wrapper>
-</template>
-
-<script lang="ts" setup>
-  import { reactive, ref, unref, h } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import { BasicTable, TableAction, BasicColumn } from '@/components/Table';
-  import { configList, deleteConfig } from '@/api/system/config';
-  import { columns } from './columns';
-  import { FileAddOutlined, SearchOutlined } from '@vicons/antd';
-  import CreateDrawer from './CreateDrawer.vue';
-
-  const message = ElMessage;
-  const tableRef = ref();
-  const createDrawerRef = ref();
-  const drawerTitle = ref('添加配置');
-  const treeData = ref([]);
-
-  const params = reactive({
-    configName: '',
-  });
-
-  const actionColumn: BasicColumn = reactive({
-    width: 150,
-    title: '操作',
-    prop: 'action',
-    fixed: 'right',
-    render(record) {
-      return h(TableAction as any, {
-        style: 'button',
-        actions: [
-          {
-            label: '删除',
-            isConfirm: true,
-            popConfirm: {
-              onConfirm: handleDelete.bind(null, record.row),
-              title: '您确定要删除吗?',
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-            },
-          },
-          {
-            label: '编辑',
-            onClick: handleEdit.bind(null, record.row),
-          },
-        ],
-      });
-    },
-  });
-
-  const loadDataTable = async (res: any) => {
-    let _params = {
-      ...unref(params),
-      ...res,
-    };
-    return await configList(_params);
-  };
-
-  function openCreateDrawer() {
-    drawerTitle.value = '添加配置';
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer();
-  }
-
-  function onCheckedRow(rowKeys: any[]) {
-    console.log(rowKeys);
-  }
-
-  function reloadTable() {
-    tableRef.value.reload();
-  }
-
-  function handleEdit(record: Recordable) {
-    console.log('点击了编辑', record);
-    drawerTitle.value = '编辑配置';
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer(record.id);
-  }
-
-  function handleDelete(record: Recordable) {
-    deleteConfig({ id: record.id }).then(() => {
-      message.success('删除成功');
-      reloadTable();
-    });
-  }
-</script>

+ 0 - 8
src/views/system/config/types/index.ts

@@ -1,8 +0,0 @@
-export interface formParamsType {
-  id?: number | null;
-  configCode: string;
-  configDesc: string;
-  configName: string;
-  configValue: string;
-  configOrder: number | undefined;
-}

+ 1 - 3
src/views/system/log/components/LoginLog.vue

@@ -124,14 +124,12 @@
     OperationTypeEnum,
     ClientTypeEnum,
   } from '@/types/log/constants';
-  import useSceneInfos from '@/hooks/useSceneInfos';
   import useLoginLogQuery from '../hooks/useLoginLogQuery';
   import { ElMessage, ElMessageBox } from 'element-plus';
   import { exportLoginLog } from '@/api/system/log';
   import { downloadByData } from '@/utils/file/download';
+  import { calculateTreeData } from '@/utils';
 
-  const sceneInfos = useSceneInfos();
-  const { calculateTreeData } = sceneInfos;
   const { requestParams, total, loginLogList, queryLoginLogPage, loading, resetRequestParams } = useLoginLogQuery();
 
   const departmentList = ref<OptionsProps[]>([]);

+ 0 - 47
src/views/system/logs/columns.ts

@@ -1,47 +0,0 @@
-import { BasicColumn } from '@/components/Table';
-import { ElPopover, ElButton } from 'element-plus';
-import { h } from 'vue';
-
-export const columns: BasicColumn[] = [
-  {
-    label: 'ID',
-    prop: 'id',
-  },
-  {
-    label: '来源',
-    prop: 'operation',
-  },
-  {
-    label: '操作人',
-    prop: 'operator',
-  },
-  {
-    label: 'IP',
-    prop: 'ip',
-  },
-  {
-    label: '参数',
-    prop: 'parameter',
-    render(record) {
-      return h(
-        ElPopover,
-        {
-          width: 350,
-          style: { 'max-width': '550px' },
-          'content-style': {
-            'word-break': 'break-all',
-          },
-          scrollable: true,
-        },
-        {
-          reference: () => h(ElButton, {}, { default: () => '查看参数' }),
-          default: () => `${record.row.parameter}`,
-        },
-      );
-    },
-  },
-  {
-    label: '创建时间',
-    prop: 'createTime',
-  },
-];

+ 0 - 53
src/views/system/logs/loginColumns.ts

@@ -1,53 +0,0 @@
-import { BasicColumn } from '@/components/Table';
-import { ElTag } from 'element-plus';
-import { h } from 'vue';
-
-export const columns: BasicColumn[] = [
-  {
-    label: '访问编号',
-    prop: 'id',
-  },
-  {
-    label: '用户名称',
-    prop: 'userName',
-  },
-  {
-    label: '登录ip',
-    prop: 'loginIp',
-  },
-  {
-    label: '登录地点',
-    prop: 'loginAddress',
-  },
-  {
-    label: '浏览器',
-    prop: 'browser',
-  },
-  {
-    label: '操作系统',
-    prop: 'system',
-  },
-  {
-    label: '登录状态',
-    prop: 'loginStatus',
-    render(record) {
-      return h(
-        ElTag,
-        {
-          type: record.row.loginStatus === 1 ? 'success' : 'danger',
-        },
-        {
-          default: () => `${record.row.loginStatus === 1 ? '登录成功' : '登录失败'}`,
-        },
-      );
-    },
-  },
-  {
-    label: '登录信息',
-    prop: 'content',
-  },
-  {
-    label: '登录时间',
-    prop: 'createTime',
-  },
-];

+ 0 - 55
src/views/system/logs/logininfor.vue

@@ -1,55 +0,0 @@
-<template>
-  <PageWrapper>
-    <el-card :bordered="false" class="mb-3 proCard">
-      <el-space align="center">
-        <el-input
-          :style="{ width: '320px' }"
-          v-model="params.userName"
-          clearable
-          placeholder="请输入用户名称"
-          @keyup.enter="reloadTable"
-        />
-        <el-button type="primary" @click="reloadTable">
-          <template #icon>
-            <el-icon>
-              <SearchOutlined />
-            </el-icon>
-          </template>
-          查询
-        </el-button>
-      </el-space>
-    </el-card>
-    <el-card :bordered="false" class="proCard">
-      <BasicTable :columns="columns" :request="loadDataTable" :row-key="(row) => row.id" ref="basicTableRef" />
-    </el-card>
-  </PageWrapper>
-</template>
-
-<script lang="ts" setup>
-  import { reactive, ref } from 'vue';
-  import { BasicTable } from '@/components/Table';
-  import { loginLogList } from '@/api/system/logs';
-  import { SearchOutlined } from '@vicons/antd';
-  import { PageWrapper } from '@/components/Page';
-
-  import { columns } from './loginColumns';
-
-  const basicTableRef = ref();
-  const tableData = ref();
-
-  const params = reactive({
-    userName: '',
-  });
-
-  const loadDataTable = async (res) => {
-    const result = await loginLogList({ ...params, ...res });
-    tableData.value = result.list;
-    return result;
-  };
-
-  function reloadTable() {
-    basicTableRef.value.reload();
-  }
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 55
src/views/system/logs/operlog.vue

@@ -1,55 +0,0 @@
-<template>
-  <PageWrapper>
-    <el-card :bordered="false" class="mb-3 proCard">
-      <el-space align="center">
-        <el-input
-          :style="{ width: '320px' }"
-          v-model="params.operator"
-          clearable
-          placeholder="请输入操作人"
-          @keyup.enter="reloadTable"
-        />
-        <el-button type="primary" @click="reloadTable">
-          <template #icon>
-            <el-icon>
-              <SearchOutlined />
-            </el-icon>
-          </template>
-          查询
-        </el-button>
-      </el-space>
-    </el-card>
-    <el-card :bordered="false" class="proCard">
-      <BasicTable :columns="columns" :request="loadDataTable" :row-key="(row) => row.id" ref="basicTableRef" />
-    </el-card>
-  </PageWrapper>
-</template>
-
-<script lang="ts" setup>
-  import { reactive, ref } from 'vue';
-  import { BasicTable } from '@/components/Table';
-  import { operlogList } from '@/api/system/logs';
-  import { SearchOutlined } from '@vicons/antd';
-  import { PageWrapper } from '@/components/Page';
-
-  import { columns } from './columns';
-
-  const basicTableRef = ref();
-  const tableData = ref();
-
-  const params = reactive({
-    operator: '',
-  });
-
-  const loadDataTable = async (res) => {
-    const result = await operlogList({ ...params, ...res });
-    tableData.value = result.list;
-    return result;
-  };
-
-  function reloadTable() {
-    basicTableRef.value.reload();
-  }
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 49
src/views/system/online/columns.ts

@@ -1,49 +0,0 @@
-import { h } from 'vue';
-import { BasicColumn } from '@/components/Table';
-
-export const columns: BasicColumn[] = [
-  {
-    label: '编号',
-    render(record) {
-      return h('span', {}, { default: () => `${record.index + 1}` });
-    },
-  },
-  {
-    label: '会话编号',
-    prop: 'token',
-    width: 300,
-  },
-  {
-    label: '用户名',
-    prop: 'username',
-  },
-  {
-    label: '部门名称',
-    prop: 'deptName',
-  },
-  {
-    label: '登录地址',
-    prop: 'loginIp',
-  },
-  {
-    label: '登录地点',
-    prop: 'loginAddr',
-  },
-  {
-    label: '浏览器',
-    prop: 'browser',
-  },
-  {
-    label: '操作系统',
-    prop: 'operatingSystem',
-  },
-  {
-    label: '登录设备',
-    prop: 'device',
-  },
-  {
-    label: '登录时间',
-    prop: 'loginTime',
-    width: 180,
-  },
-];

+ 0 - 96
src/views/system/online/online.vue

@@ -1,96 +0,0 @@
-<template>
-  <PageWrapper>
-    <el-card :bordered="false" class="mb-3 proCard">
-      <el-space align="center">
-        <el-input
-          :style="{ width: '320px' }"
-          v-model="params.keyword"
-          clearable
-          placeholder="请输入用户名称"
-          @keyup.enter="reloadTable"
-        />
-        <el-button type="primary" @click="reloadTable">
-          <template #icon>
-            <el-icon>
-              <SearchOutlined />
-            </el-icon>
-          </template>
-          查询
-        </el-button>
-      </el-space>
-    </el-card>
-    <el-card :bordered="false" class="proCard">
-      <BasicTable
-        :columns="columns"
-        :request="loadDataTable"
-        :row-key="(row) => row.userId"
-        ref="basicTableRef"
-        :actionColumn="actionColumn"
-        virtual-scroll
-      />
-    </el-card>
-  </PageWrapper>
-</template>
-
-<script lang="ts" setup>
-  import { h, reactive, ref } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import { BasicTable, TableAction, BasicColumn } from '@/components/Table';
-  import { onlineList, onlineLogOut } from '@/api/system/user';
-  import { SearchOutlined } from '@vicons/antd';
-  import { PageWrapper } from '@/components/Page';
-
-  import { columns } from './columns';
-
-  const message = ElMessage;
-  const basicTableRef = ref();
-  const tableData = ref();
-
-  const params = reactive({
-    keyword: '',
-  });
-
-  const actionColumn: BasicColumn = reactive({
-    width: 100,
-    title: '操作',
-    prop: 'action',
-    fixed: 'right',
-    align: 'center',
-    render(record) {
-      return h(TableAction as any, {
-        actions: [
-          {
-            label: '强退',
-            type: 'danger',
-            isConfirm: true,
-            popConfirm: {
-              onConfirm: handleLogOut.bind(null, record.row),
-              title: '您确定要强退吗?',
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-            },
-          },
-        ],
-      });
-    },
-  });
-
-  const loadDataTable = async (res) => {
-    const result = await onlineList({ ...params, ...res });
-    tableData.value = result.list;
-    return result;
-  };
-
-  function reloadTable() {
-    basicTableRef.value.reload();
-  }
-
-  function handleLogOut(row) {
-    onlineLogOut({ userId: row.userId }).then(() => {
-      message.success('强退成功');
-      reloadTable();
-    });
-  }
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 194
src/views/system/region/CreateDrawer.vue

@@ -1,194 +0,0 @@
-<template>
-  <el-drawer v-model="isDrawer" :size="width" :title="title" @close="handleReset">
-    <el-form
-      :model="formParams"
-      :rules="rules"
-      ref="formRef"
-      label-placement="left"
-      :label-width="80"
-    >
-      <el-form-item label="上级区域" prop="parentId">
-        <el-tree-select
-          :data="getRegionTreeList"
-          clearable
-          v-model="formParams.parentId"
-          placeholder="请选择区域,省份无需选择"
-        />
-      </el-form-item>
-
-      <el-form-item label="区域名称" prop="regionName">
-        <el-input placeholder="请输入区域名称" v-model="formParams.regionName" />
-      </el-form-item>
-
-      <el-form-item label="区域编码" prop="regionCode">
-        <el-input placeholder="请输入区域编码" v-model="formParams.regionCode" />
-      </el-form-item>
-
-      <el-form-item label="显示排序" prop="regionOrders">
-        <el-input-number placeholder="显示排序" v-model="formParams.regionOrders" class="w-full" />
-      </el-form-item>
-
-      <el-row :gutter="24">
-        <el-col :span="12">
-          <el-form-item label="是否省份" prop="isProinve">
-            <el-switch v-model="formParams.isProinve" />
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="12">
-          <el-form-item label="是否城市" prop="isCity">
-            <el-switch v-model="formParams.isCity" />
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-row :gutter="24">
-        <el-col :span="12">
-          <el-form-item label="是否区县" prop="isDistrict">
-            <el-switch v-model="formParams.isDistrict" />
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="12">
-          <el-form-item label="是否启用" prop="isEnable">
-            <el-switch v-model="formParams.isEnable" />
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
-
-    <template #footer>
-      <el-space>
-        <el-button @click="handleReset">重置</el-button>
-        <el-button type="primary" :loading="subLoading" @click="formSubmit">提交</el-button>
-      </el-space>
-    </template>
-  </el-drawer>
-</template>
-
-<script lang="ts" setup>
-  import { ref, computed } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import type { formParamsType } from './types';
-
-  import { addRegion, editRegion, regionInfo } from '@/api/system/region';
-  import { replaceParams } from '@/utils/helper/treeHelper';
-
-  const rules = {
-    regionName: {
-      required: true,
-      message: '区域名称不能为空',
-      trigger: 'blur',
-    },
-    regionCode: {
-      required: true,
-      message: '区域编码不能为空',
-      trigger: 'blur',
-    },
-  };
-
-  const emit = defineEmits(['change']);
-
-  const props = defineProps({
-    title: {
-      type: String,
-      default: '添加区域',
-    },
-    width: {
-      type: Number,
-      default: 380,
-    },
-    regionList: {
-      type: Array,
-    },
-  });
-
-  const getRegionTreeList = computed(() => {
-    return replaceParams(props.regionList || [], 'regionName', 'id');
-  });
-
-  const defaultValueRef = () => ({
-    id: null,
-    isCenterCity: false,
-    isProinve: false,
-    isCity: false,
-    isDistrict: false,
-    isEnable: true,
-    parentId: null,
-    regionCode: '',
-    regionName: '',
-    regionOrders: undefined,
-  });
-
-  const message = ElMessage;
-  const formRef: any = ref(null);
-  const isDrawer = ref(false);
-  const subLoading = ref(false);
-
-  const formParams = ref<formParamsType>(defaultValueRef());
-
-  function openDrawer(id?) {
-    if (id) {
-      formParams.value.id = id;
-      getInfo();
-      return;
-    }
-    isDrawer.value = true;
-  }
-
-  function closeDrawer() {
-    isDrawer.value = false;
-  }
-
-  function formSubmit() {
-    formRef.value.validate((valid) => {
-      if (!valid) {
-        return message.error('请填写完整信息');
-      }
-      if (formParams.value.id) {
-        editRegion(formParams.value).then((_) => {
-          message.success('编辑成功');
-          emit('change');
-          handleReset();
-          closeDrawer();
-        });
-      } else {
-        addRegion(formParams.value).then((_) => {
-          message.success('添加成功');
-          emit('change');
-          handleReset();
-          closeDrawer();
-        });
-      }
-    });
-  }
-
-  function handleReset() {
-    formRef.value.resetFields();
-    formParams.value = Object.assign(formParams.value, defaultValueRef());
-  }
-
-  function getInfo() {
-    regionInfo({ id: formParams.value.id }).then((res) => {
-      const info = {
-        id: res.id,
-        isCenterCity: res.isCenterCity,
-        isProinve: res.isProinve,
-        isCity: res.isCity,
-        isDistrict: res.isDistrict,
-        isEnable: res.isEnable,
-        parentId: res.parentId,
-        regionCode: res.regionCode,
-        regionName: res.regionName,
-        regionOrders: res.regionOrders,
-      };
-      formParams.value = info;
-      isDrawer.value = true;
-    });
-  }
-
-  defineExpose({
-    openDrawer,
-    closeDrawer,
-  });
-</script>

+ 0 - 50
src/views/system/region/columns.ts

@@ -1,50 +0,0 @@
-import { h } from 'vue';
-import { ElTag } from 'element-plus';
-import { BasicColumn } from '@/components/Table';
-
-export const columns: BasicColumn[] = [
-  {
-    label: '区域名称',
-    prop: 'regionName',
-  },
-  {
-    label: '区域编码',
-    prop: 'regionCode',
-  },
-  {
-    label: '区域类型',
-    prop: 'isProinve',
-    render(record) {
-      return h(
-        ElTag,
-        {},
-        {
-          default: () => (record.row.isProinve ? '省份' : record.row.isCity ? '地市' : '区县'),
-        },
-      );
-    },
-  },
-  {
-    label: '是否启用',
-    prop: 'isEnable',
-    render(record) {
-      return h(
-        ElTag,
-        {
-          type: record.row.isEnable ? 'success' : 'danger',
-        },
-        {
-          default: () => (record.row.isEnable ? '启用' : '禁用'),
-        },
-      );
-    },
-  },
-  {
-    label: '排序',
-    prop: 'regionOrders',
-  },
-  {
-    label: '更新时间',
-    prop: 'updateTime',
-  },
-];

+ 0 - 164
src/views/system/region/region.vue

@@ -1,164 +0,0 @@
-<template>
-  <page-wrapper>
-    <el-card :bordered="false" class="mb-3 proCard">
-      <el-space align="center">
-        <el-input
-          :style="{ width: '320px' }"
-          v-model="params.roleName"
-          clearable
-          placeholder="请输入区域名称"
-          @keyup.enter="reloadTable"
-        />
-        <el-button type="primary" @click="reloadTable">
-          <template #icon>
-            <el-icon>
-              <SearchOutlined />
-            </el-icon>
-          </template>
-          查询
-        </el-button>
-      </el-space>
-    </el-card>
-    <el-card :bordered="false" class="proCard">
-      <BasicTable
-        ref="tableRef"
-        :columns="columns"
-        :request="loadDataTable"
-        :row-key="(row) => row.id"
-        lazy
-        :cascade="false"
-        :pagination="false"
-        allow-checking-not-loaded
-        :actionColumn="actionColumn"
-        :load="onLoad"
-        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
-        @update:checked-row-keys="onCheckedRow"
-      >
-        <template #tableTitle>
-          <el-button type="primary" @click="openCreateDrawer">
-            <template #icon>
-              <el-icon>
-                <FileAddOutlined />
-              </el-icon>
-            </template>
-            添加区域
-          </el-button>
-        </template>
-
-        <template #action>
-          <TableAction />
-        </template>
-      </BasicTable>
-    </el-card>
-
-    <CreateDrawer
-      ref="createDrawerRef"
-      :title="drawerTitle"
-      :regionList="regionTreeData"
-      @change="reloadTable"
-    />
-  </page-wrapper>
-</template>
-
-<script lang="ts" setup>
-  import { reactive, ref, unref, h, onMounted } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import { BasicTable, TableAction, BasicColumn } from '@/components/Table';
-  import { FileAddOutlined, SearchOutlined } from '@vicons/antd';
-  import { columns } from './columns';
-  import { getProvinceList, parentList, regionTreeList, deleteRegion } from '@/api/system/region';
-  import CreateDrawer from './CreateDrawer.vue';
-
-  const message = ElMessage;
-  const tableRef = ref();
-  const createDrawerRef = ref();
-  const drawerTitle = ref('添加区域');
-  const regionTreeData = ref([]);
-
-  const params = reactive({
-    roleName: '',
-  });
-
-  const actionColumn: BasicColumn = reactive({
-    width: 150,
-    title: '操作',
-    prop: 'action',
-    fixed: 'right',
-    render(record) {
-      return h(TableAction as any, {
-        style: 'button',
-        actions: [
-          {
-            label: '删除',
-            isConfirm: true,
-            popConfirm: {
-              onConfirm: handleDelete.bind(null, record.row),
-              title: '您确定要删除吗?',
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-            },
-          },
-          {
-            label: '编辑',
-            onClick: handleEdit.bind(null, record.row),
-          },
-        ],
-      });
-    },
-  });
-
-  const loadDataTable = async (res: any) => {
-    let _params = {
-      ...unref(params),
-      ...res,
-    };
-    const tableData = await getProvinceList(_params);
-    tableData.forEach((item) => {
-      item.hasChildren = true;
-    });
-    return {
-      list: tableData,
-    };
-  };
-
-  async function onLoad(row: Record<string, unknown>, _, resolve: (date) => void) {
-    const list = await parentList({ parentId: row.id });
-    list.forEach((item) => {
-      item.hasChildren = !item.isDistrict;
-    });
-    resolve(list);
-  }
-
-  function openCreateDrawer() {
-    drawerTitle.value = '添加区域';
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer();
-  }
-
-  function onCheckedRow(rowKeys: any[]) {
-    console.log(rowKeys);
-  }
-
-  function reloadTable() {
-    tableRef.value.reload();
-  }
-
-  function handleEdit(record: Recordable) {
-    console.log('点击了编辑', record);
-    drawerTitle.value = '编辑区域';
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer(record.id);
-  }
-
-  function handleDelete(record: Recordable) {
-    deleteRegion({ id: record.id }).then(() => {
-      message.success('删除成功');
-      reloadTable();
-    });
-  }
-
-  onMounted(async () => {
-    const list = await regionTreeList();
-    regionTreeData.value = list;
-  });
-</script>

+ 0 - 12
src/views/system/region/types/index.ts

@@ -1,12 +0,0 @@
-export interface formParamsType {
-  id?: number | null;
-  regionName: string;
-  regionCode: string;
-  isCenterCity: boolean;
-  isCity: boolean;
-  isDistrict: boolean;
-  isEnable: boolean;
-  isProinve: boolean;
-  parentId: number | null;
-  regionOrders: number | undefined;
-}

+ 0 - 200
src/views/system/tasks/CreateDrawer.vue

@@ -1,200 +0,0 @@
-<template>
-  <el-drawer v-model="isDrawer" :size="width" :title="title" @close="handleReset">
-    <BasicForm @register="register">
-      <template #statusSlot="{ model, field }">
-        <el-input v-model="model[field]" />
-      </template>
-    </BasicForm>
-    <template #footer>
-      <el-space>
-        <el-button @click="handleReset">重置</el-button>
-        <el-button type="primary" :loading="subLoading" @click="formSubmit">提交</el-button>
-      </el-space>
-    </template>
-  </el-drawer>
-</template>
-
-<script lang="ts" setup>
-  import { ref, onMounted, nextTick } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
-  import type { formParamsType } from './types';
-
-  import { addTasks, editTasks, tasksInfo } from '@/api/system/tasks';
-  import { useDictionary } from '@/hooks/web/useDictionary';
-
-  const schemas: FormSchema[] = [
-    {
-      field: 'jobId',
-      hidden: true,
-    },
-    {
-      field: 'taskClass',
-      component: 'Input',
-      label: '处理类',
-      rules: [{ required: true, message: '请输入处理类', trigger: ['blur'] }],
-    },
-    {
-      field: 'taskName',
-      component: 'Input',
-      label: '任务名称',
-      rules: [{ required: true, message: '请输入任务名称', trigger: ['blur'] }],
-    },
-    {
-      field: 'groupName',
-      component: 'Input',
-      label: '任务组名',
-      rules: [{ required: true, message: '请输入任务组名', trigger: ['blur'] }],
-    },
-    {
-      field: 'jobType',
-      component: 'BasicSelect',
-      label: '任务类型',
-      componentProps: {
-        placeholder: '请选择类型',
-        request: loadSelectData,
-        block: true,
-        labelField: 'dictLabel',
-        valueField: 'dictValue',
-      },
-    },
-    {
-      field: 'cronExpression',
-      component: 'Input',
-      label: 'Cron表达式',
-    },
-    {
-      field: 'jobInterval',
-      component: 'InputNumber',
-      label: '时间间隔',
-    },
-    {
-      field: 'param',
-      component: 'Input',
-      label: '参数',
-      componentProps: {
-        type: 'textarea',
-      },
-    },
-    {
-      field: 'description',
-      component: 'Input',
-      label: '任务描述',
-      componentProps: {
-        type: 'textarea',
-      },
-    },
-    {
-      field: 'orderNum',
-      component: 'InputNumber',
-      label: '排序',
-    },
-  ];
-
-  const emit = defineEmits(['change']);
-
-  defineProps({
-    title: {
-      type: String,
-      default: '添加配置',
-    },
-    width: {
-      type: Number,
-      default: 450,
-    },
-    permissionList: {
-      type: Array,
-    },
-  });
-
-  const message = ElMessage;
-  const isDrawer = ref(false);
-  const subLoading = ref(false);
-  const { getDictTypeList } = useDictionary();
-
-  const formParams = ref<formParamsType>({
-    jobId: null,
-    cronExpression: '',
-    description: '',
-    groupName: '',
-    param: '',
-    taskClass: '',
-    taskName: '',
-    taskStatus: '',
-    jobInterval: null,
-    jobType: null,
-    orderNum: null,
-  });
-
-  const [register, { submit, getFieldsValue, setFieldsValue, resetFields }] = useForm({
-    collapsedRows: 3,
-    labelWidth: 120,
-    layout: 'horizontal',
-    submitButtonText: '保存',
-    showActionButtonGroup: false,
-    schemas,
-  });
-
-  function openDrawer(jobId?) {
-    if (jobId) {
-      formParams.value.jobId = jobId;
-      getInfo();
-      return;
-    }
-    isDrawer.value = true;
-  }
-
-  function closeDrawer() {
-    isDrawer.value = false;
-  }
-
-  async function loadSelectData() {
-    //这里可以进行数据转换处理
-    return await getDictTypeList({ dictType: 'task_type' });
-  }
-
-  async function formSubmit() {
-    const isCheck = await submit();
-    if (!isCheck) return;
-
-    const params = getFieldsValue();
-    params.jobType = parseInt(params.jobType);
-
-    if (formParams.value.jobId) {
-      editTasks(params).then((_) => {
-        message.success('编辑成功');
-        emit('change');
-        handleReset();
-        closeDrawer();
-      });
-    } else {
-      addTasks(params).then((_) => {
-        message.success('添加成功');
-        emit('change');
-        handleReset();
-        closeDrawer();
-      });
-    }
-  }
-
-  function handleReset() {
-    // formParams.value = Object.assign(formParams.value, defaultValueRef());
-    resetFields();
-  }
-
-  function getInfo() {
-    tasksInfo({ jobId: formParams.value.jobId }).then((res) => {
-      isDrawer.value = true;
-      nextTick(() => {
-        setFieldsValue(res);
-      });
-    });
-  }
-
-  onMounted(() => {});
-
-  defineExpose({
-    openDrawer,
-    closeDrawer,
-  });
-</script>

+ 0 - 41
src/views/system/tasks/columns.ts

@@ -1,41 +0,0 @@
-import { BasicColumn } from '@/components/Table';
-
-export const columns: BasicColumn[] = [
-  {
-    label: '定时任务编号',
-    prop: 'configName',
-  },
-  {
-    label: '任务名称',
-    prop: 'taskName',
-  },
-  {
-    label: '任务组名称',
-    prop: 'groupName',
-  },
-  {
-    label: '任务类型',
-    prop: 'jobType',
-  },
-  {
-    label: 'Cron表达式',
-    prop: 'cronExpression',
-  },
-  {
-    label: '时间间隔',
-    prop: 'jobInterval',
-  },
-  {
-    label: '状态',
-    prop: 'taskStatus',
-  },
-  {
-    label: '排序',
-    prop: 'orderNum',
-    width: 100,
-  },
-  {
-    label: '创建时间',
-    prop: 'createTime',
-  },
-];

+ 0 - 140
src/views/system/tasks/list.vue

@@ -1,140 +0,0 @@
-<template>
-  <page-wrapper>
-    <el-card :bordered="false" class="mb-3 proCard">
-      <el-space align="center">
-        <el-input
-          :style="{ width: '320px' }"
-          v-model="params.taskName"
-          clearable
-          placeholder="请输入定时任务名称"
-          @keyup.enter="reloadTable"
-        />
-        <el-button type="primary" @click="reloadTable">
-          <template #icon>
-            <el-icon>
-              <SearchOutlined />
-            </el-icon>
-          </template>
-          查询
-        </el-button>
-      </el-space>
-    </el-card>
-    <el-card :bordered="false" class="proCard">
-      <BasicTable
-        :columns="columns"
-        :request="loadDataTable"
-        :row-key="(row) => row.id"
-        ref="tableRef"
-        :actionColumn="actionColumn"
-        @update:checked-row-keys="onCheckedRow"
-      >
-        <template #tableTitle>
-          <el-button type="primary" @click="openCreateDrawer">
-            <template #icon>
-              <el-icon>
-                <FileAddOutlined />
-              </el-icon>
-            </template>
-            添加配置
-          </el-button>
-        </template>
-
-        <template #action>
-          <TableAction />
-        </template>
-      </BasicTable>
-    </el-card>
-
-    <CreateDrawer
-      ref="createDrawerRef"
-      :title="drawerTitle"
-      :permissionList="treeData"
-      @change="reloadTable"
-    />
-  </page-wrapper>
-</template>
-
-<script lang="ts" setup>
-  import { reactive, ref, unref, h, onMounted } from 'vue';
-  import { ElMessage } from 'element-plus';
-  import { BasicTable, TableAction, BasicColumn } from '@/components/Table';
-  import { tasksList, deleteTasks } from '@/api/system/tasks';
-  import { columns } from './columns';
-  import { FileAddOutlined, SearchOutlined } from '@vicons/antd';
-  import CreateDrawer from './CreateDrawer.vue';
-
-  const message = ElMessage;
-  const tableRef = ref();
-  const createDrawerRef = ref();
-  const drawerTitle = ref('添加定时任务');
-  const treeData = ref([]);
-
-  const params = reactive({
-    taskName: '',
-  });
-
-  const actionColumn: BasicColumn = reactive({
-    width: 150,
-    title: '操作',
-    prop: 'action',
-    fixed: 'right',
-    render(record) {
-      return h(TableAction as any, {
-        style: 'button',
-        actions: [
-          {
-            label: '删除',
-            isConfirm: true,
-            popConfirm: {
-              onConfirm: handleDelete.bind(null, record.row),
-              title: '您确定要删除吗?',
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-            },
-          },
-          {
-            label: '编辑',
-            onClick: handleEdit.bind(null, record.row),
-          },
-        ],
-      });
-    },
-  });
-
-  const loadDataTable = async (res: any) => {
-    let _params = {
-      ...unref(params),
-      ...res,
-    };
-    return await tasksList(_params);
-  };
-
-  function openCreateDrawer() {
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer();
-  }
-
-  function onCheckedRow(rowKeys: any[]) {
-    console.log(rowKeys);
-  }
-
-  function reloadTable() {
-    tableRef.value.reload();
-  }
-
-  function handleEdit(record: Recordable) {
-    console.log('点击了编辑', record);
-    drawerTitle.value = '编辑任务';
-    const { openDrawer } = createDrawerRef.value;
-    openDrawer(record.jobId);
-  }
-
-  function handleDelete(record: Recordable) {
-    deleteTasks({ jobId: record.jobId }).then(() => {
-      message.success('删除成功');
-      reloadTable();
-    });
-  }
-
-  onMounted(async () => {});
-</script>

+ 0 - 13
src/views/system/tasks/types/index.ts

@@ -1,13 +0,0 @@
-export interface formParamsType {
-  jobId?: number | null;
-  cronExpression?: string;
-  description?: string;
-  groupName?: string;
-  param?: string;
-  taskClass?: string;
-  taskName?: string;
-  taskStatus?: string;
-  jobInterval?: number | null;
-  jobType?: number | null;
-  orderNum?: number | null;
-}