first commit
@@ -0,0 +1,99 @@
|
||||
<!--
|
||||
* 主应用页面
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-12 23:46:47
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
|
||||
<template>
|
||||
<a-config-provider
|
||||
:locale="antdLocale"
|
||||
:theme="{
|
||||
algorithm: compactFlag ? theme.compactAlgorithm : theme.defaultAlgorithm,
|
||||
token: {
|
||||
colorPrimary: themeColors[colorIndex].primaryColor,
|
||||
colorLink: themeColors[colorIndex].primaryColor,
|
||||
colorLinkActive: themeColors[colorIndex].activeColor,
|
||||
colorLinkHover: themeColors[colorIndex].hoverColor,
|
||||
colorIcon: themeColors[colorIndex].primaryColor,
|
||||
borderRadius: borderRadius,
|
||||
},
|
||||
components: {
|
||||
Button: {
|
||||
colorLink: themeColors[colorIndex].primaryColor,
|
||||
colorLinkActive: themeColors[colorIndex].activeColor,
|
||||
colorLinkHover: themeColors[colorIndex].hoverColor,
|
||||
},
|
||||
Icon: {
|
||||
colorIcon: themeColors[colorIndex].primaryColor,
|
||||
},
|
||||
},
|
||||
}"
|
||||
:transformCellText="transformCellText"
|
||||
>
|
||||
<!---全局loading--->
|
||||
<a-spin :spinning="spinning" tip="稍等片刻,我在拼命加载中..." size="large">
|
||||
<!--- 路由 -->
|
||||
<RouterView />
|
||||
</a-spin>
|
||||
</a-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dayjs from 'dayjs';
|
||||
import { computed, h, useSlots } from 'vue';
|
||||
import { messages } from '/@/i18n';
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config';
|
||||
import { useSpinStore } from '/@/store/modules/system/spin';
|
||||
import { theme } from 'ant-design-vue';
|
||||
import { themeColors } from '/@/theme/color.js';
|
||||
import { Popover } from 'ant-design-vue';
|
||||
import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
|
||||
import _ from 'lodash';
|
||||
const slots = useSlots();
|
||||
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
|
||||
const dayjsLocale = computed(() => messages[useAppConfigStore().language].dayjsLocale);
|
||||
dayjs.locale(dayjsLocale);
|
||||
|
||||
// 全局loading
|
||||
let spinStore = useSpinStore();
|
||||
const spinning = computed(() => spinStore.loading);
|
||||
// 是否紧凑
|
||||
const compactFlag = computed(() => useAppConfigStore().compactFlag);
|
||||
// 主题颜色
|
||||
const colorIndex = computed(() => {
|
||||
return useAppConfigStore().colorIndex;
|
||||
});
|
||||
// 圆角
|
||||
const borderRadius = computed(() => {
|
||||
return useAppConfigStore().borderRadius;
|
||||
});
|
||||
function transformCellText({ text, column, record, index }) {
|
||||
if (column && column.textEllipsisFlag === true) {
|
||||
return h(
|
||||
Popover,
|
||||
{ placement: 'bottom' },
|
||||
{
|
||||
default: () =>
|
||||
h('div', { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }, id: `${column.dataIndex}${index}` }, text),
|
||||
content: () =>
|
||||
h('div', { style: { display: 'flex' } }, [
|
||||
h('div', text),
|
||||
h(SmartCopyIcon, { value: document.getElementById(`${column.dataIndex}${index}`).innerText }),
|
||||
]),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
:deep(.ant-table-column-sorters) {
|
||||
align-items: flex-start !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 基础数据-医院 api 封装
|
||||
*
|
||||
* @Author: xing
|
||||
* @Date: 2025-08-04 14:06:17
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const basicHospitalApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author xing
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/basicHospital/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 列表查询 @author xing
|
||||
*/
|
||||
queryList : (param) => {
|
||||
return postRequest('/basicHospital/queryList', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author xing
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/basicHospital/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author xing
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/basicHospital/update', param);
|
||||
},
|
||||
|
||||
|
||||
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* 病例库-临床-文章 api 封装
|
||||
*
|
||||
* @Author: xing
|
||||
* @Date: 2025-08-04 10:17:15
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const caseClinicalArticleApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author xing
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/caseClinicalArticle/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author xing
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/caseClinicalArticle/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author xing
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/caseClinicalArticle/update', param);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 删除 @author xing
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/caseClinicalArticle/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author xing
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/caseClinicalArticle/batchDelete', idList);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生成文章分享二维码 @author xing
|
||||
*/
|
||||
addUnlimitedQrcode: (articleId) => {
|
||||
return postRequest(`/caseClinicalArticle/addUnlimitedQrcode/${articleId}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取文章详情 @author xing
|
||||
*/
|
||||
getDetail: (articleId) => {
|
||||
return getRequest(`/caseClinicalArticle/getDetail/${articleId}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取疾病标签数据 @author xing
|
||||
*/
|
||||
getCaseLabel: (pId = '0') => {
|
||||
return getRequest(`/caseClinicalLabel/queryList?pId=${pId}`);
|
||||
},
|
||||
updateStatus: (articleId, status) => {
|
||||
return postRequest(`/caseClinicalArticle/status/update`, { articleId, status });
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* 医生管理 api 封装
|
||||
*
|
||||
* @Author: xing
|
||||
* @Date: 2025-08-04 15:24:56
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const caseClinicalDoctorApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author xing
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/caseClinicalDoctor/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 列表查询 @author xing
|
||||
*/
|
||||
queryList : (param) => {
|
||||
return postRequest('/caseClinicalDoctor/queryList', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author xing
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/caseClinicalDoctor/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author xing
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/caseClinicalDoctor/update', param);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 删除 @author xing
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/caseClinicalDoctor/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author xing
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/caseClinicalDoctor/batchDelete', idList);
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新状态 @author xing
|
||||
*/
|
||||
updateStatus: (doctorId, status) => {
|
||||
return postRequest('/caseClinicalDoctor/status/update', { doctorId, status });
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取APP医生信息 @author xing
|
||||
*/
|
||||
getAppDoctor: (doctorName) => {
|
||||
return getRequest(`/caseClinicalDoctor/getAppDoctor?doctorName=${encodeURIComponent(doctorName)}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取医生详情 @author xing
|
||||
*/
|
||||
getDetail: (doctorId) => {
|
||||
return getRequest(`/caseClinicalDoctor/getDetail/${doctorId}`);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* 病例库-临床-视频 api 封装
|
||||
*
|
||||
* @Author: xing
|
||||
* @Date: 2025-08-08 13:26:37
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const caseClinicalVideoApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author xing
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/caseClinicalVideo/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author xing
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/caseClinicalVideo/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author xing
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/caseClinicalVideo/update', param);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 删除 @author xing
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/caseClinicalVideo/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author xing
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/caseClinicalVideo/batchDelete', idList);
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新状态 @author xing
|
||||
*/
|
||||
updateStatus: (videoId, status) => {
|
||||
return postRequest('/caseClinicalVideo/updateStatus', { videoId, status });
|
||||
},
|
||||
|
||||
/**
|
||||
* 生成二维码 @author xing
|
||||
*/
|
||||
addUnlimitedQrcode: (videoId) => {
|
||||
return getRequest(`/caseClinicalVideo/addUnlimitedQrcode/${videoId}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取详情 @author xing
|
||||
*/
|
||||
getDetail: (videoId) => {
|
||||
return getRequest(`/caseClinicalVideo/getDetail/${videoId}`);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* 病例库-病例交流 api 封装
|
||||
*
|
||||
* @Author: xing
|
||||
* @Date: 2025-08-08 18:28:17
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const caseExchangeApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author xing
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/caseExchange/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author xing
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/caseExchange/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author xing
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/caseExchange/update', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除 @author xing
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/caseExchange/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author xing
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/caseExchange/batchDelete', idList);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取详情 @author xing
|
||||
*/
|
||||
getDetail: (exchangeId) => {
|
||||
return getRequest(`/caseExchange/getDetail/${exchangeId}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新状态 @author xing
|
||||
*/
|
||||
updateStatus: (exchangeId, status) => {
|
||||
return postRequest(`/caseExchange/status/update`, { exchangeId, status });
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新精选状态 @author xing
|
||||
*/
|
||||
updateSelected: (exchangeId, isSelected) => {
|
||||
return postRequest(`/caseExchange/selected/update`, { exchangeId, isSelected });
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取疾病标签数据 @author xing
|
||||
*/
|
||||
getCaseLabel: (pId = '0') => {
|
||||
return getRequest(`/caseClinicalLabel/queryList?pId=${pId}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取投票信息 @author xing
|
||||
*/
|
||||
getVoteInfo: (exchangeId) => {
|
||||
return getRequest(`/caseExchange/getVoteInfo/${exchangeId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 类目api
|
||||
*
|
||||
* @Author: 卓大
|
||||
* @Date: 2022-09-03 21:35:00
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const categoryApi = {
|
||||
// 添加类目 @author 卓大
|
||||
addCategory: (param) => {
|
||||
return postRequest('/category/add', param);
|
||||
},
|
||||
// GET
|
||||
// 删除类目 @author 卓大
|
||||
deleteCategoryById: (categoryId) => {
|
||||
return getRequest(`/category/delete/${categoryId}`);
|
||||
},
|
||||
// 查询类目层级树 @author 卓大
|
||||
queryCategoryTree: (param) => {
|
||||
return postRequest('/category/tree', param);
|
||||
},
|
||||
// 更新类目 @author 卓大
|
||||
updateCategory: (param) => {
|
||||
return postRequest('/category/update', param);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2021-11-05
|
||||
* @LastEditTime: 2022-06-23
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
import {postRequest, getRequest, getDownload} from '/@/lib/axios';
|
||||
|
||||
export const goodsApi = {
|
||||
// 添加商品 @author zhuoda
|
||||
addGoods: (param) => {
|
||||
return postRequest('/goods/add', param);
|
||||
},
|
||||
// 删除 @author zhuoda
|
||||
deleteGoods: (goodsId) => {
|
||||
return getRequest(`/goods/delete/${goodsId}`);
|
||||
},
|
||||
// 批量 @author zhuoda
|
||||
batchDelete: (goodsIdList) => {
|
||||
return postRequest('/goods/batchDelete', goodsIdList);
|
||||
},
|
||||
// 分页查询 @author zhuoda
|
||||
queryGoodsList: (param) => {
|
||||
return postRequest('/goods/query', param);
|
||||
},
|
||||
// 更新商品 @author zhuoda
|
||||
updateGoods: (param) => {
|
||||
return postRequest('/goods/update', param);
|
||||
},
|
||||
|
||||
// 导入 @author 卓大
|
||||
importGoods : (file) =>{
|
||||
return postRequest('/goods/importGoods',file);
|
||||
},
|
||||
|
||||
// 导出 @author 卓大
|
||||
exportGoods : () =>{
|
||||
return getDownload('/goods/exportGoods');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 银行卡
|
||||
*
|
||||
* @Author: 善逸
|
||||
* @Date: 2022-09-03 21:42:08
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const bankApi = {
|
||||
// 新建银行信息 @author 善逸
|
||||
create: (param) => {
|
||||
return postRequest('/oa/bank/create', param);
|
||||
},
|
||||
|
||||
// 删除银行信息 @author 善逸
|
||||
delete: (bankId) => {
|
||||
return getRequest(`/oa/bank/delete/${bankId}`);
|
||||
},
|
||||
|
||||
// 查询银行信息详情 @author 善逸
|
||||
detail: (bankId) => {
|
||||
return getRequest(`/oa/bank/get/${bankId}`);
|
||||
},
|
||||
|
||||
// 分页查询银行信息 @author 善逸
|
||||
pageQuery: (param) => {
|
||||
return postRequest('/oa/bank/page/query', param);
|
||||
},
|
||||
|
||||
// 编辑银行信息 @author 善逸
|
||||
update: (param) => {
|
||||
return postRequest('/oa/bank/update', param);
|
||||
},
|
||||
|
||||
// 根据企业ID查询不分页的银行列表 @author 善逸
|
||||
queryList: (enterpriseId) => {
|
||||
return getRequest(`/oa/bank/query/list/${enterpriseId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 企业信息
|
||||
*
|
||||
* @Author: 开云
|
||||
* @Date: 2022-09-03 21:47:28
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import {postRequest, getRequest, postDownload} from '/@/lib/axios';
|
||||
|
||||
export const enterpriseApi = {
|
||||
// 新建企业 @author 开云
|
||||
create: (param) => {
|
||||
return postRequest('/oa/enterprise/create', param);
|
||||
},
|
||||
|
||||
// 删除企业 @author 开云
|
||||
delete: (enterpriseId) => {
|
||||
return getRequest(`/oa/enterprise/delete/${enterpriseId}`);
|
||||
},
|
||||
|
||||
// 查询企业详情 @author 开云
|
||||
detail: (enterpriseId) => {
|
||||
return getRequest(`/oa/enterprise/get/${enterpriseId}`);
|
||||
},
|
||||
|
||||
// 分页查询企业模块 @author 开云
|
||||
pageQuery: (param) => {
|
||||
return postRequest('/oa/enterprise/page/query', param);
|
||||
},
|
||||
|
||||
// 导出企业数据excel @author 卓大
|
||||
exportExcel: (param) => {
|
||||
return postDownload('/oa/enterprise/exportExcel', param);
|
||||
},
|
||||
|
||||
//企业列表查询 含数据范围 @author 开云
|
||||
queryList: (type) => {
|
||||
let query = '';
|
||||
if (type) {
|
||||
query = `?type=${type}`;
|
||||
}
|
||||
return getRequest(`/oa/enterprise/query/list${query}`);
|
||||
},
|
||||
|
||||
// 编辑企业 @author 开云
|
||||
update: (param) => {
|
||||
return postRequest('/oa/enterprise/update', param);
|
||||
},
|
||||
// 企业全部员工List @author yandy
|
||||
employeeList: (param) => {
|
||||
return postRequest('/oa/enterprise/employee/list', param);
|
||||
},
|
||||
// 分页查询企业员工List @author 卓大
|
||||
queryPageEmployeeList: (param) => {
|
||||
return postRequest('/oa/enterprise/employee/queryPage', param);
|
||||
},
|
||||
// 添加员工 @author yandy
|
||||
addEmployee: (param) => {
|
||||
return postRequest('/oa/enterprise/employee/add', param);
|
||||
},
|
||||
|
||||
// 删除员工 @author yandy
|
||||
deleteEmployee: (param) => {
|
||||
return postRequest('/oa/enterprise/employee/delete', param);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* OA发票信息
|
||||
*
|
||||
* @Author: 善逸
|
||||
* @Date: 2022-09-03 21:48:54
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const invoiceApi = {
|
||||
|
||||
// 新建发票信息 @author 善逸
|
||||
create: (param) => {
|
||||
return postRequest('/oa/invoice/create', param);
|
||||
},
|
||||
|
||||
// 删除发票信息 @author 善逸
|
||||
delete: (bankId) => {
|
||||
return getRequest(`/oa/invoice/delete/${bankId}`);
|
||||
},
|
||||
|
||||
// 查询发票信息详情 @author 善逸
|
||||
detail: (bankId) => {
|
||||
return getRequest(`//oa/invoice/get/${bankId}`);
|
||||
},
|
||||
|
||||
// 分页查询发票信息 @author 善逸
|
||||
pageQuery: (param) => {
|
||||
return postRequest('/oa/invoice/page/query', param);
|
||||
},
|
||||
|
||||
// 编辑发票信息 @author 善逸
|
||||
update: (param) => {
|
||||
return postRequest('/oa/invoice/update', param);
|
||||
},
|
||||
|
||||
// 查询发票列表 @author 善逸
|
||||
queryList: (enterpriseId) => {
|
||||
return getRequest(`/oa/invoice/query/list/${enterpriseId}`);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* @Description: 公告信息、企业动态
|
||||
* @version:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2022-08-16 20:34:36
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const noticeApi = {
|
||||
// ---------------- 通知公告类型 -----------------------
|
||||
|
||||
// 通知公告类型-获取全部 @author zhuoda
|
||||
getAllNoticeTypeList() {
|
||||
return getRequest('/oa/noticeType/getAll');
|
||||
},
|
||||
|
||||
// 通知公告类型-添加 @author zhuoda
|
||||
addNoticeType(name) {
|
||||
return getRequest(`/oa/noticeType/add/${name}`);
|
||||
},
|
||||
|
||||
// 通知公告类型-修改 @author zhuoda
|
||||
updateNoticeType(noticeTypeId, name) {
|
||||
return getRequest(`/oa/noticeType/update/${noticeTypeId}/${name}`);
|
||||
},
|
||||
// 通知公告类型-删除 @author zhuoda
|
||||
deleteNoticeType(noticeTypeId) {
|
||||
return getRequest(`/oa/noticeType/delete/${noticeTypeId}`);
|
||||
},
|
||||
|
||||
// ---------------- 通知公告管理 -----------------------
|
||||
|
||||
// 通知公告-分页查询 @author zhuoda
|
||||
queryNotice(param) {
|
||||
return postRequest('/oa/notice/query', param);
|
||||
},
|
||||
|
||||
// 通知公告-添加 @author zhuoda
|
||||
addNotice(param) {
|
||||
return postRequest('/oa/notice/add', param);
|
||||
},
|
||||
|
||||
// 通知公告-更新 @author zhuoda
|
||||
updateNotice(param) {
|
||||
return postRequest('/oa/notice/update', param);
|
||||
},
|
||||
|
||||
// 通知公告-删除 @author zhuoda
|
||||
deleteNotice(noticeId) {
|
||||
return getRequest(`/oa/notice/delete/${noticeId}`);
|
||||
},
|
||||
|
||||
// 通知公告-更新详情 @author zhuoda
|
||||
getUpdateNoticeInfo(noticeId) {
|
||||
return getRequest(`/oa/notice/getUpdateVO/${noticeId}`);
|
||||
},
|
||||
|
||||
// --------------------- 【员工】查看 通知公告 -------------------------
|
||||
|
||||
// 通知公告-员工-查看详情 @author zhuoda
|
||||
view(noticeId) {
|
||||
return getRequest(`/oa/notice/employee/view/${noticeId}`);
|
||||
},
|
||||
|
||||
// 通知公告-员工-查询 @author zhuoda
|
||||
queryEmployeeNotice(param) {
|
||||
return postRequest('/oa/notice/employee/query', param);
|
||||
},
|
||||
|
||||
// 【员工】通知公告-查询 查看记录 @author zhuoda
|
||||
queryViewRecord(param) {
|
||||
return postRequest('/oa/notice/employee/queryViewRecord', param);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* 用户管理 api 封装
|
||||
*
|
||||
* @Author: xing
|
||||
* @Date: 2025-08-06 11:07:39
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const userApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author xing
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/user/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author xing
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/user/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author xing
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/user/update', param);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 删除 @author xing
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/user/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author xing
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/user/batchDelete', idList);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* 接口:加密、解密
|
||||
*
|
||||
* @Author: 1024创新实验室-主任-卓大
|
||||
* @Date: 2023-10-17 20:02:37
|
||||
* @Copyright 1024创新实验室
|
||||
*/
|
||||
import { postRequest, postEncryptRequest } from '/@/lib/axios';
|
||||
|
||||
export const encryptApi = {
|
||||
|
||||
/**
|
||||
* 测试 请求加密 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
testRequestEncrypt: (param) => {
|
||||
return postEncryptRequest('/support/apiEncrypt/testRequestEncrypt', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 测试 返回加密 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
testResponseEncrypt: (param) => {
|
||||
return postRequest('/support/apiEncrypt/testResponseEncrypt', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 测试 请求参数加密和解密、返回数据加密和解密 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
testDecryptAndEncrypt: (param) => {
|
||||
return postEncryptRequest('/support/apiEncrypt/testDecryptAndEncrypt', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 测试 数组加解密 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
testArray : (param) => {
|
||||
return postEncryptRequest('/support/apiEncrypt/testArray', param);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 缓存
|
||||
*
|
||||
* @Author: 罗伊
|
||||
* @Date: 2022-09-03 21:51:34
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import {getRequest} from '/@/lib/axios';
|
||||
|
||||
export const cacheApi = {
|
||||
// 获取某个缓存的所有key @author 罗伊
|
||||
getKeys: (cacheName) => {
|
||||
return getRequest(`/support/cache/keys/${cacheName}`);
|
||||
},
|
||||
// 移除某个缓存 @author 罗伊
|
||||
remove: (cacheName) => {
|
||||
return getRequest(`/support/cache/remove/${cacheName}`);
|
||||
},
|
||||
// 获取所有缓存 @author 罗伊
|
||||
getAllCacheNames: () => {
|
||||
return getRequest('/support/cache/names');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* 系统更新日志 api 封装
|
||||
*
|
||||
* @Author: 卓大
|
||||
* @Date: 2022-09-26 14:53:50
|
||||
* @Copyright 1024创新实验室
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const changeLogApi = {
|
||||
/**
|
||||
* 分页查询 @author 卓大
|
||||
*/
|
||||
queryPage: (param) => {
|
||||
return postRequest('/support/changeLog/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author 卓大
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/support/changeLog/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author 卓大
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/support/changeLog/update', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除 @author 卓大
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/support/changeLog/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author 卓大
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/support/changeLog/batchDelete', idList);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 代码生成器
|
||||
*
|
||||
* @Author: 卓大
|
||||
* @Date: 2022-09-03 21:51:54
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest, getDownload } from '/@/lib/axios';
|
||||
|
||||
export const codeGeneratorApi = {
|
||||
// 查询数据库的表 @author 卓大
|
||||
queryTableList: (param) => {
|
||||
return postRequest('/support/codeGenerator/table/queryTableList', param);
|
||||
},
|
||||
|
||||
// 查询表的列 @author 卓大
|
||||
getTableColumns: (table) => {
|
||||
return getRequest(`/support/codeGenerator/table/getTableColumns/${table}`);
|
||||
},
|
||||
|
||||
// ------------------- 配置 -------------------
|
||||
|
||||
// 获取表的配置信息 @author 卓大
|
||||
getConfig: (table) => {
|
||||
return getRequest(`/support/codeGenerator/table/getConfig/${table}`);
|
||||
},
|
||||
|
||||
// 更新配置信息 @author 卓大
|
||||
updateConfig: (param) => {
|
||||
return postRequest('/support/codeGenerator/table/updateConfig', param);
|
||||
},
|
||||
|
||||
// ------------------- 生成 -------------------
|
||||
|
||||
// 预览代码 @author 卓大
|
||||
preview: (param) => {
|
||||
return postRequest('/support/codeGenerator/code/preview', param);
|
||||
},
|
||||
|
||||
// 下载代码 @author 卓大
|
||||
downloadCode: (tableName) => {
|
||||
return getDownload(`/support/codeGenerator/code/download/${tableName}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 配置
|
||||
*
|
||||
* @Author: 卓大
|
||||
* @Date: 2022-09-03 21:51:54
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const configApi = {
|
||||
// 分页查询 @author 卓大
|
||||
queryList: (param) => {
|
||||
return postRequest('/support/config/query', param);
|
||||
},
|
||||
// 添加配置参数 @author 卓大
|
||||
addConfig: (param) => {
|
||||
return postRequest('/support/config/add', param);
|
||||
},
|
||||
// 修改配置参数 @author 卓大
|
||||
updateConfig: (param) => {
|
||||
return postRequest('/support/config/update', param);
|
||||
},
|
||||
// 查询配置详情 @author 卓大
|
||||
queryByKey: (param) => {
|
||||
return getRequest(`/support/config/queryByKey?configKey=${param}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 数据脱敏api
|
||||
*
|
||||
* @Author: 1024创新实验室-主任-卓大
|
||||
* @Date: 2024-07-31 21:02:37
|
||||
* @Copyright 1024创新实验室
|
||||
*/
|
||||
import { getRequest } from '/@/lib/axios';
|
||||
|
||||
export const dataMaskingApi = {
|
||||
/**
|
||||
* 查询脱敏数据
|
||||
*/
|
||||
query: () => {
|
||||
return getRequest('/support/dataMasking/demo/query');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* 数据变动
|
||||
*
|
||||
* @Author: 卓大
|
||||
* @Date: 2022-09-03 21:51:54
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest } from '/@/lib/axios';
|
||||
|
||||
export const dataTracerApi = {
|
||||
// 分页查询业务操作日志 - @author 卓大
|
||||
queryList: (param) => {
|
||||
return postRequest('/support/dataTracer/query', param);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 字典
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:55:25
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const dictApi = {
|
||||
|
||||
// 获取所有字典code @author 1024创新实验室-主任-卓大
|
||||
getAllDict: () => {
|
||||
return getRequest('/support/dict/getAllDict');
|
||||
},
|
||||
|
||||
// 获取全部字典数据 @author 1024创新实验室-主任-卓大
|
||||
getAllDictData: () => {
|
||||
return getRequest('/support/dict/getAllDictData');
|
||||
},
|
||||
|
||||
// 分页查询 @author 1024创新实验室-主任-卓大
|
||||
queryDict: (param) => {
|
||||
return postRequest('/support/dict/queryPage', param);
|
||||
},
|
||||
|
||||
// 添加 @author 1024创新实验室-主任-卓大
|
||||
addDict: (param) => {
|
||||
return postRequest('/support/dict/add', param);
|
||||
},
|
||||
|
||||
// 更新 @author 1024创新实验室-主任-卓大
|
||||
updateDict: (param) => {
|
||||
return postRequest('/support/dict/update', param);
|
||||
},
|
||||
|
||||
// 字典-删除- @author 卓大
|
||||
batchDeleteDict: (dictIdList) => {
|
||||
return postRequest('/support/dict/batchDelete', dictIdList);
|
||||
},
|
||||
|
||||
// 字典 启用 禁用 @author 1024创新实验室-主任-卓大
|
||||
updateDisabled: (dictId) => {
|
||||
return getRequest(`/support/dict/updateDisabled/${dictId}`);
|
||||
},
|
||||
|
||||
// ------------- 查询字典数据 -------------
|
||||
|
||||
// 字典数据 分页查询 @author 1024创新实验室-主任-卓大
|
||||
queryDictData: (dictId) => {
|
||||
return getRequest(`/support/dict/dictData/queryDictData/${dictId}`);
|
||||
},
|
||||
|
||||
// 字典数据 添加 - @author 卓大
|
||||
addDictData: (param) => {
|
||||
return postRequest('/support/dict/dictData/add', param);
|
||||
},
|
||||
|
||||
// 字典数据 更新- @author 卓大
|
||||
updateDictData: (param) => {
|
||||
return postRequest('/support/dict/dictData/update', param);
|
||||
},
|
||||
|
||||
// 字典数据-删除- @author 卓大
|
||||
batchDeleteDictData: (dictDataIdList) => {
|
||||
return postRequest('/support/dict/dictData/batchDelete', dictDataIdList);
|
||||
},
|
||||
|
||||
// 字典数据 启用 禁用 @author 1024创新实验室-主任-卓大
|
||||
updateDictDataDisabled: (dictDataId) => {
|
||||
return getRequest(`/support/dict/dictData/updateDisabled/${dictDataId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 意见反馈
|
||||
*
|
||||
* @Author: 1024创新实验室:开云
|
||||
* @Date: 2022-09-03 21:56:31
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest } from '/@/lib/axios';
|
||||
|
||||
export const feedbackApi = {
|
||||
// 意见反馈-新增
|
||||
addFeedback: (params) => {
|
||||
return postRequest('/support/feedback/add', params);
|
||||
},
|
||||
// 意见反馈-分页查询
|
||||
queryFeedback: (params) => {
|
||||
return postRequest('/support/feedback/query', params);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 文件上传
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:55:25
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest, getDownload } from '/@/lib/axios';
|
||||
|
||||
export const fileApi = {
|
||||
// 文件上传 @author 卓大
|
||||
uploadUrl: '/support/file/upload',
|
||||
uploadFile: (param, folder) => {
|
||||
return postRequest(`/support/file/upload?folder=${folder}`, param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 分页查询 @author 卓大
|
||||
*/
|
||||
queryPage: (param) => {
|
||||
return postRequest('/support/file/queryPage', param);
|
||||
},
|
||||
/**
|
||||
* 获取文件URL:根据fileKey @author 胡克
|
||||
*/
|
||||
getUrl: (fileKey) => {
|
||||
return getRequest(`/support/file/getFileUrl?fileKey=${fileKey}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载文件流(根据fileKey) @author 胡克
|
||||
*/
|
||||
downLoadFile: (fileKey) => {
|
||||
return getDownload('/support/file/downLoad', { fileKey });
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 心跳
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:55:47
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest } from '/@/lib/axios';
|
||||
|
||||
export const heartBeatApi = {
|
||||
// 分页查询 @author 卓大
|
||||
queryList: (param) => {
|
||||
return postRequest('/support/heartBeat/query', param);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 帮助文档
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:56:31
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const helpDocApi = {
|
||||
// 【管理】帮助文档-分页查询 @author zhuoda
|
||||
query: (param) => {
|
||||
return postRequest('/support/helpDoc/query', param);
|
||||
},
|
||||
|
||||
//【管理】帮助文档-更新 @author zhuoda
|
||||
update: (param) => {
|
||||
return postRequest('/support/helpDoc/update', param);
|
||||
},
|
||||
|
||||
// 【管理】帮助文档-添加 @author zhuoda
|
||||
add: (param) => {
|
||||
return postRequest('/support/helpDoc/add', param);
|
||||
},
|
||||
|
||||
//【管理】帮助文档-删除 @author zhuoda
|
||||
delete: (helpDocId) => {
|
||||
return getRequest(`/support/helpDoc/delete/${helpDocId}`);
|
||||
},
|
||||
|
||||
//【管理】帮助文档-获取详情 @author zhuoda
|
||||
getDetail: (helpDocId) => {
|
||||
return getRequest(`/support/helpDoc/getDetail/${helpDocId}`);
|
||||
},
|
||||
|
||||
//【管理】帮助文档-根据关联id查询 @author zhuoda
|
||||
queryHelpDocByRelationId: (relationId) => {
|
||||
return getRequest(`/support/helpDoc/queryHelpDocByRelationId/${relationId}`);
|
||||
},
|
||||
|
||||
//----------------------- 用户相关 --------------------------------
|
||||
|
||||
//【用户】帮助文档-查询全部 @author zhuoda
|
||||
getAllHelpDocList() {
|
||||
return getRequest('/support/helpDoc/user/queryAllHelpDocList');
|
||||
},
|
||||
|
||||
//【用户】帮助文档-查询全部 @author zhuoda
|
||||
view(helpDocId) {
|
||||
return getRequest(`/support/helpDoc/user/view/${helpDocId}`);
|
||||
},
|
||||
|
||||
//【用户】帮助文档-查询 查看记录 @author zhuoda
|
||||
queryViewRecord(param) {
|
||||
return postRequest('/support/helpDoc/user/queryViewRecord', param);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 帮助文档 目录
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:56:31
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const helpDocCatalogApi = {
|
||||
//帮助文档目录-获取全部 @author zhuoda
|
||||
getAll: () => {
|
||||
return getRequest('/support/helpDoc/helpDocCatalog/getAll');
|
||||
},
|
||||
|
||||
//帮助文档目录-添加 @author zhuoda
|
||||
add: (param) => {
|
||||
return postRequest('/support/helpDoc/helpDocCatalog/add', param);
|
||||
},
|
||||
|
||||
//帮助文档目录-更新 @author zhuoda
|
||||
update: (param) => {
|
||||
return postRequest('/support/helpDoc/helpDocCatalog/update', param);
|
||||
},
|
||||
|
||||
//帮助文档目录-删除 @author zhuoda
|
||||
delete: (helpDocCatalogId) => {
|
||||
return getRequest(`/support/helpDoc/helpDocCatalog/delete/${helpDocCatalogId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* job api
|
||||
*
|
||||
* @Author: huke
|
||||
* @Date: 2024/06/25
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const jobApi = {
|
||||
// 分页查询 @huke
|
||||
queryJob: (param) => {
|
||||
return postRequest('/support/job/query', param);
|
||||
},
|
||||
// 定时任务-查询详情 @huke
|
||||
queryJobInfo: (param) => {
|
||||
return getRequest(`/support/job/${param}`);
|
||||
},
|
||||
// 执行任务 @huke
|
||||
executeJob: (param) => {
|
||||
return postRequest('/support/job/execute', param);
|
||||
},
|
||||
// 定时任务-新增-任务信息 @huke
|
||||
addJob: (param) => {
|
||||
return postRequest('/support/job/add', param);
|
||||
},
|
||||
// 定时任务-更新-任务信息 @huke
|
||||
updateJob: (param) => {
|
||||
return postRequest('/support/job/update', param);
|
||||
},
|
||||
// 定时任务-更新-开启状态 @huke
|
||||
updateJobEnabled: (param) => {
|
||||
return postRequest('/support/job/update/enabled', param);
|
||||
},
|
||||
// 定时任务-执行记录-分页查询 @huke
|
||||
queryJobLog: (param) => {
|
||||
return postRequest('/support/job/log/query', param);
|
||||
},
|
||||
// 定时任务-删除 @zhuoda
|
||||
deleteJob: (param) => {
|
||||
return getRequest(`/support/job/delete?jobId=${param}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 三级等保 api 封装
|
||||
*
|
||||
* @Author: 1024创新实验室-主任-卓大
|
||||
* @Date: 2024-07-31 21:02:37
|
||||
* @Copyright 1024创新实验室
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const level3ProtectApi = {
|
||||
/**
|
||||
* 查询 三级等保配置 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
getConfig: () => {
|
||||
return getRequest('/support/protect/level3protect/getConfig');
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新三级等保配置 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
updateConfig: (form) => {
|
||||
return postRequest('/support/protect/level3protect/updateConfig', form);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 登录锁定 api 封装
|
||||
*
|
||||
* @Author: 1024创新实验室-主任-卓大
|
||||
* @Date: 2023-10-17 18:02:37
|
||||
* @Copyright 1024创新实验室
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const loginFailApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/support/protect/loginFail/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author 1024创新实验室-主任-卓大
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/support/protect/loginFail/batchDelete', idList);
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 登录日志
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:56:31
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const loginLogApi = {
|
||||
// 分页查询 @author 卓大
|
||||
queryList: (param) => {
|
||||
return postRequest('/support/loginLog/page/query', param);
|
||||
},
|
||||
// 分页查询当前登录人信息 @author 善逸
|
||||
queryListLogin: (param) => {
|
||||
return postRequest('/support/loginLog/page/query/login', param);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const messageApi = {
|
||||
// 通知消息-分页查询
|
||||
queryMessage: (param) => {
|
||||
return postRequest('/support/message/queryMyMessage', param);
|
||||
},
|
||||
// 通知消息-查询未读消息数
|
||||
queryUnreadCount: () => {
|
||||
return getRequest('/support/message/getUnreadCount');
|
||||
},
|
||||
// 通知消息-标记已读
|
||||
updateReadFlag: (messageId) => {
|
||||
return getRequest(`/support/message/read/${messageId}`);
|
||||
},
|
||||
|
||||
//通知消息-分页查询 @author 卓大
|
||||
queryAdminMessage: (param) => {
|
||||
return postRequest('/message/query', param);
|
||||
},
|
||||
|
||||
//通知消息-新建 @author 卓大
|
||||
sendMessages: (param) => {
|
||||
return postRequest('/message/sendMessages', param);
|
||||
},
|
||||
|
||||
//通知消息-删除 @author 卓大
|
||||
deleteMessage: (messageId) => {
|
||||
return getRequest(`/message/delete/${messageId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 操作日志
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:56:45
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const operateLogApi = {
|
||||
// 分页查询 @author 卓大
|
||||
queryList: (param) => {
|
||||
return postRequest('/support/operateLog/page/query', param);
|
||||
},
|
||||
// 详情 @author 卓大
|
||||
detail: (id) => {
|
||||
return getRequest(`/support/operateLog/detail/${id}`);
|
||||
},
|
||||
// 分页查询当前登录人信息 @author 善逸
|
||||
queryListLogin: (param) => {
|
||||
return postRequest('/support/operateLog/page/query/login', param);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* reload (内存热加载、钩子等)
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:57:19
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const reloadApi = {
|
||||
// 查询reload列表 @author 卓大
|
||||
queryList: () => {
|
||||
return getRequest('/support/reload/query');
|
||||
},
|
||||
// 获取reload result @author 卓大
|
||||
queryReloadResult: (tag) => {
|
||||
return getRequest(`/support/reload/result/${tag}`);
|
||||
},
|
||||
// 执行reload @author 卓大
|
||||
reload: (reloadForm) => {
|
||||
return postRequest('/support/reload/update', reloadForm);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 单据序列号
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:57:52
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const serialNumberApi = {
|
||||
// 生成单号 @author 卓大
|
||||
generate: (generateForm) => {
|
||||
return postRequest('/support/serialNumber/generate', generateForm);
|
||||
},
|
||||
// 获取所有单号定义 @author 卓大
|
||||
getAll: () => {
|
||||
return getRequest('/support/serialNumber/all');
|
||||
},
|
||||
// 获取生成记录 @author 卓大
|
||||
queryRecord: (form) => {
|
||||
return postRequest('/support/serialNumber/queryRecord', form);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* @Description:表格自定义列
|
||||
* @version:
|
||||
* @Author: zhuoda
|
||||
* @Date: 2022-08-17 23:32:36
|
||||
* @LastEditors: zhuoda
|
||||
* @LastEditTime: 2022-08-21
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const tableColumnApi = {
|
||||
// 修改表格列 @author zhuoda
|
||||
updateTableColumn: (param) => {
|
||||
return postRequest('/support/tableColumn/update', param);
|
||||
},
|
||||
|
||||
// 查询表格列 @author zhuoda
|
||||
getColumns: (tableId) => {
|
||||
return getRequest(`/support/tableColumn/getColumns/${tableId}`);
|
||||
},
|
||||
|
||||
// 删除表格列 @author zhuoda
|
||||
deleteColumns: (tableId) => {
|
||||
return getRequest(`/support/tableColumn/delete/${tableId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 部门
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:58:50
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const departmentApi = {
|
||||
/**
|
||||
* 查询部门列表 @author 卓大
|
||||
*/
|
||||
queryAllDepartment: () => {
|
||||
return getRequest('/department/listAll');
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询部门树形列表 @author 卓大
|
||||
*/
|
||||
queryDepartmentTree: () => {
|
||||
return getRequest('/department/treeList');
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加部门 @author 卓大
|
||||
*/
|
||||
addDepartment: (param) => {
|
||||
return postRequest('/department/add', param);
|
||||
},
|
||||
/**
|
||||
* 更新部门信息 @author 卓大
|
||||
*/
|
||||
updateDepartment: (param) => {
|
||||
return postRequest('/department/update', param);
|
||||
},
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
deleteDepartment: (departmentId) => {
|
||||
return getRequest(`/department/delete/${departmentId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* 员工
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:59:15
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
|
||||
import { getRequest, postEncryptRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const employeeApi = {
|
||||
/**
|
||||
* 查询所有员工 @author 卓大
|
||||
*/
|
||||
queryAll: () => {
|
||||
return getRequest('/employee/queryAll');
|
||||
},
|
||||
/**
|
||||
* 员工管理查询
|
||||
*/
|
||||
queryEmployee: (params) => {
|
||||
return postRequest('/employee/query', params);
|
||||
},
|
||||
/**
|
||||
* 添加员工
|
||||
*/
|
||||
addEmployee: (params) => {
|
||||
return postRequest('/employee/add', params);
|
||||
},
|
||||
/**
|
||||
* 更新员工信息
|
||||
*/
|
||||
updateEmployee: (params) => {
|
||||
return postRequest('/employee/update', params);
|
||||
},
|
||||
/**
|
||||
* 更新员工个人中心信息
|
||||
*/
|
||||
updateCenter: (params) => {
|
||||
return postRequest('/employee/update/center', params);
|
||||
},
|
||||
/**
|
||||
* 更新登录人头像
|
||||
*/
|
||||
updateAvatar: (params) => {
|
||||
return postRequest('/employee/update/avatar', params);
|
||||
},
|
||||
/**
|
||||
* 删除员工
|
||||
*/
|
||||
deleteEmployee: (employeeId) => {
|
||||
return getRequest(`/employee/delete/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* 批量删除员工
|
||||
*/
|
||||
batchDeleteEmployee: (employeeIdList) => {
|
||||
return postRequest('/employee/update/batch/delete', employeeIdList);
|
||||
},
|
||||
/**
|
||||
* 批量调整员工部门
|
||||
*/
|
||||
batchUpdateDepartmentEmployee: (updateParam) => {
|
||||
return postRequest('/employee/update/batch/department', updateParam);
|
||||
},
|
||||
/**
|
||||
* 重置员工密码
|
||||
*/
|
||||
resetPassword: (employeeId) => {
|
||||
return getRequest(`/employee/update/password/reset/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
updateEmployeePassword: (param) => {
|
||||
return postEncryptRequest('/employee/update/password', param);
|
||||
},
|
||||
/**
|
||||
* 获取密码复杂度
|
||||
*/
|
||||
getPasswordComplexityEnabled: () => {
|
||||
return getRequest('/employee/getPasswordComplexityEnabled');
|
||||
},
|
||||
/**
|
||||
* 更新员工禁用状态
|
||||
*/
|
||||
updateDisabled: (employeeId) => {
|
||||
return getRequest(`/employee/update/disabled/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* 查询员工-根据部门id
|
||||
*/
|
||||
queryEmployeeByDeptId: (departmentId) => {
|
||||
return getRequest(`/employee/getAllEmployeeByDepartmentId/${departmentId}`);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 首页api
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:59:39
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest } from '/@/lib/axios';
|
||||
|
||||
export const homeApi = {
|
||||
/**
|
||||
* @description: 首页-金额统计(业绩、收款、订单数等) @author 卓大
|
||||
*/
|
||||
homeAmountStatistics: () => {
|
||||
return getRequest('/home/amount/statistics');
|
||||
},
|
||||
/**
|
||||
* @description: 首页-待办信息 @author 卓大
|
||||
*/
|
||||
homeWaitHandle: () => {
|
||||
return getRequest('home/wait/handle');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 登录
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:59:58
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const loginApi = {
|
||||
/**
|
||||
* 登录 @author 卓大
|
||||
*/
|
||||
login: (param) => {
|
||||
return postRequest('/login', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 退出登录 @author 卓大
|
||||
*/
|
||||
logout: () => {
|
||||
return getRequest('/login/logout');
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取验证码 @author 卓大
|
||||
*/
|
||||
getCaptcha: () => {
|
||||
return getRequest('/login/getCaptcha');
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取登录信息 @author 卓大
|
||||
*/
|
||||
getLoginInfo: () => {
|
||||
return getRequest('/login/getLoginInfo');
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取邮箱登录验证码 @author 卓大
|
||||
*/
|
||||
sendLoginEmailCode: (loginName) => {
|
||||
return getRequest(`/login/sendEmailCode/${loginName}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取双因子登录标识 @author 卓大
|
||||
*/
|
||||
getTwoFactorLoginFlag: () => {
|
||||
return getRequest('/login/getTwoFactorLoginFlag');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 菜单
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 22:00:32
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const menuApi = {
|
||||
/**
|
||||
* 添加菜单
|
||||
*/
|
||||
addMenu: (param) => {
|
||||
return postRequest('/menu/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新菜单
|
||||
*/
|
||||
updateMenu: (param) => {
|
||||
return postRequest('/menu/update', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除菜单
|
||||
*/
|
||||
batchDeleteMenu: (menuIdList) => {
|
||||
return getRequest(`/menu/batchDelete?menuIdList=${menuIdList}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询所有菜单列表
|
||||
*/
|
||||
queryMenu: () => {
|
||||
return getRequest('/menu/query');
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询菜单树
|
||||
*/
|
||||
queryMenuTree: (onlyMenu) => {
|
||||
return getRequest(`/menu/tree?onlyMenu=${onlyMenu}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取所有请求路径
|
||||
*/
|
||||
getAuthUrl: () => {
|
||||
return getRequest('/menu/auth/url');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* 职务表 api 封装
|
||||
*
|
||||
* @Author: kaiyun
|
||||
* @Date: 2024-06-23 23:31:38
|
||||
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const positionApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author kaiyun
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/position/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author kaiyun
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/position/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author kaiyun
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/position/update', param);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 删除 @author kaiyun
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/position/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author kaiyun
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/position/batchDelete', idList);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询列表 @author kaiyun
|
||||
*/
|
||||
queryList: () => {
|
||||
return getRequest('/position/queryList');
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 角色
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 22:00:41
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const roleApi = {
|
||||
/**
|
||||
* @description: 获取所有角色
|
||||
*/
|
||||
queryAll: () => {
|
||||
return getRequest('/role/getAll');
|
||||
},
|
||||
/**
|
||||
* @description:添加角色
|
||||
*/
|
||||
addRole: (data) => {
|
||||
return postRequest('/role/add', data);
|
||||
},
|
||||
/**
|
||||
* @description:更新角色
|
||||
*/
|
||||
updateRole: (data) => {
|
||||
return postRequest('/role/update', data);
|
||||
},
|
||||
/**
|
||||
* @description: 删除角色
|
||||
*/
|
||||
deleteRole: (roleId) => {
|
||||
return getRequest(`/role/delete/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 批量设置某角色数据范围
|
||||
*/
|
||||
updateDataScope: (data) => {
|
||||
return postRequest('/role/dataScope/updateRoleDataScopeList', data);
|
||||
},
|
||||
/**
|
||||
* @description: 获取当前系统所配置的所有数据范围
|
||||
*/
|
||||
getDataScopeList: () => {
|
||||
return getRequest('/dataScope/list');
|
||||
},
|
||||
/**
|
||||
* @description: 获取某角色所设置的数据范围
|
||||
*/
|
||||
getDataScopeByRoleId: (roleId) => {
|
||||
return getRequest(`/role/dataScope/getRoleDataScopeList/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 获取角色成员-员工列表
|
||||
*/
|
||||
queryRoleEmployee: (params) => {
|
||||
return postRequest('/role/employee/queryEmployee', params);
|
||||
},
|
||||
/**
|
||||
* @description: 从角色成员列表中移除员工
|
||||
*/
|
||||
deleteEmployeeRole: (employeeId, roleId) => {
|
||||
return getRequest('/role/employee/removeEmployee?employeeId=' + employeeId + '&roleId=' + roleId);
|
||||
},
|
||||
/**
|
||||
* @description: 从角色成员列表中批量移除员工
|
||||
*/
|
||||
batchRemoveRoleEmployee: (data) => {
|
||||
return postRequest('/role/employee/batchRemoveRoleEmployee', data);
|
||||
},
|
||||
/**
|
||||
* @description: 根据角色id获取角色员工列表(无分页)
|
||||
*/
|
||||
getRoleAllEmployee: (roleId) => {
|
||||
return getRequest(`/role/employee/getAllEmployeeByRoleId/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 角色成员列表中批量添加员工
|
||||
*/
|
||||
batchAddRoleEmployee: (data) => {
|
||||
return postRequest('/role/employee/batchAddRoleEmployee', data);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 角色菜单
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 22:00:49
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
export const roleMenuApi = {
|
||||
/**
|
||||
* @description: 获取角色关联菜单权限
|
||||
*/
|
||||
getRoleSelectedMenu: (roleId) => {
|
||||
return getRequest(`role/menu/getRoleSelectedMenu/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 更新角色权限
|
||||
*/
|
||||
updateRoleMenu: (data) => {
|
||||
return postRequest('role/menu/updateRoleMenu', data);
|
||||
},
|
||||
};
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 382 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 354 KiB |
|
After Width: | Height: | Size: 234 KiB |
|
After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 272 KiB |
|
After Width: | Height: | Size: 206 KiB |
|
After Width: | Height: | Size: 394 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 MiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="35" viewBox="0 0 120 35">
|
||||
<path id="bg" data-name="bg" d="M13.444,35H1.272v0A12.461,12.461,0,0,0,13.444,22.845V8a8,8,0,0,1,8-8H70V35ZM0,34.961v0Z" fill="#e9efff"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 233 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="35" viewBox="0 0 120 35">
|
||||
<path id="bg_default" data-name="bg_default" d="M13.444,35H1.272v0A12.461,12.461,0,0,0,13.444,22.845V8a8,8,0,0,1,8-8H70V35ZM0,34.961v0Z" fill="#DEE1E6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 249 B |
|
After Width: | Height: | Size: 700 B |
|
After Width: | Height: | Size: 488 B |
@@ -0,0 +1,86 @@
|
||||
<!--
|
||||
* 目录 树形选择组件
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-12 21:01:52
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<a-tree-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width:${width}`"
|
||||
:dropdown-style="{ maxHeight: '400px', overflowX: 'auto' }"
|
||||
:tree-data="categoryTreeData"
|
||||
:placeholder="placeholder"
|
||||
:allowClear="true"
|
||||
tree-default-expand-all
|
||||
@change="onChange"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, onMounted } from 'vue';
|
||||
import { categoryApi } from '/@/api/business/category/category-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
const props = defineProps({
|
||||
value: Number,
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择',
|
||||
},
|
||||
categoryType: Number,
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
// ----------------- 查询 目录 数据 -----------------
|
||||
const categoryTreeData = ref([]);
|
||||
async function queryCategoryTree() {
|
||||
if (!props.categoryType) {
|
||||
categoryTreeData.value = [];
|
||||
return;
|
||||
}
|
||||
try {
|
||||
let param = {
|
||||
categoryType: props.categoryType,
|
||||
};
|
||||
let resp = await categoryApi.queryCategoryTree(param);
|
||||
categoryTreeData.value = resp.data;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------- 选中相关监听、事件 -----------------
|
||||
const selectValue = ref(props.value);
|
||||
// 箭头value变化
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
selectValue.value = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
// 监听类型变化
|
||||
watch(
|
||||
() => props.categoryType,
|
||||
() => {
|
||||
queryCategoryTree();
|
||||
}
|
||||
);
|
||||
|
||||
function onChange(value) {
|
||||
emit('update:value', value);
|
||||
emit('change', value);
|
||||
}
|
||||
|
||||
onMounted(queryCategoryTree);
|
||||
</script>
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--
|
||||
* 公司银行 下拉选择框
|
||||
*
|
||||
* @Author: 1024创新实验室:开云
|
||||
* @Date: 2022-09-02 22:12:20
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width: ${width}`"
|
||||
:placeholder="props.placeholder"
|
||||
:showSearch="true"
|
||||
:allowClear="true"
|
||||
:size="size"
|
||||
@change="handleChange"
|
||||
:disabled="disabled"
|
||||
:mode="multiple ? 'multiple' : ''"
|
||||
optionFilterProp="label"
|
||||
>
|
||||
<a-select-option v-for="item in dataList" :key="item.bankId" :label="item.bankName">
|
||||
{{ item.bankName }}({{ starAccountNumber(item.accountNumber) }})
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { bankApi } from '/@/api/business/oa/bank-api';
|
||||
import _ from 'lodash';
|
||||
|
||||
const props = defineProps({
|
||||
value: [Number, String, Object],
|
||||
width: {
|
||||
type: String,
|
||||
default: '200px',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
enterpriseId: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
|
||||
// ------------------------ 选中 事件 ------------------------
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
const selectValue = ref(props.value);
|
||||
// 箭头value变化
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
selectValue.value = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
// 箭头货主ID变化
|
||||
watch(
|
||||
() => props.enterpriseId,
|
||||
(newValue) => {
|
||||
queryData();
|
||||
}
|
||||
);
|
||||
|
||||
function handleChange(value) {
|
||||
emit('update:value', value);
|
||||
emit('change', value);
|
||||
}
|
||||
|
||||
// ------------------------ 数据查询 ------------------------
|
||||
const dataList = ref([]);
|
||||
async function queryData() {
|
||||
if (!props.enterpriseId) {
|
||||
return;
|
||||
}
|
||||
let res = await bankApi.queryList(props.enterpriseId);
|
||||
dataList.value = res.data;
|
||||
if (!props.value && !_.isEmpty(dataList.value)) {
|
||||
selectValue.value = res.data[0].invoiceId;
|
||||
handleChange(res.data[0].invoiceId);
|
||||
}
|
||||
}
|
||||
|
||||
// 银行卡号 中间位数 加星 处理
|
||||
function starAccountNumber(accountNumber) {
|
||||
if (accountNumber.length < 7) {
|
||||
return accountNumber;
|
||||
}
|
||||
return accountNumber.substr(0, 3) + '**' + accountNumber.substring(accountNumber.length - 3);
|
||||
}
|
||||
|
||||
onMounted(queryData);
|
||||
</script>
|
||||
@@ -0,0 +1,108 @@
|
||||
<!--
|
||||
* 公司的开票信息 下拉选择框
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-01 23:14:49
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width: ${width}`"
|
||||
:placeholder="props.placeholder"
|
||||
:showSearch="true"
|
||||
:allowClear="true"
|
||||
:size="size"
|
||||
@change="handleChange"
|
||||
:disabled="disabled"
|
||||
:mode="multiple ? 'multiple' : ''"
|
||||
optionFilterProp="label"
|
||||
>
|
||||
<a-select-option v-for="item in dataList" :key="item.invoiceId" :label="item.invoiceHeads">
|
||||
{{ item.invoiceHeads }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { invoiceApi } from '/@/api/business/oa/invoice-api';
|
||||
import _ from 'lodash';
|
||||
|
||||
const props = defineProps({
|
||||
value: [Number, String, Object],
|
||||
width: {
|
||||
type: String,
|
||||
default: '200px',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
enterpriseId: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
|
||||
// ------------------------ 选中 事件 ------------------------
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
const selectValue = ref(props.value);
|
||||
|
||||
// 箭头value变化
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
selectValue.value = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
// 箭头货主ID变化
|
||||
watch(
|
||||
() => props.enterpriseId,
|
||||
(newValue) => {
|
||||
queryData();
|
||||
}
|
||||
);
|
||||
|
||||
function handleChange(value) {
|
||||
emit('update:value', value);
|
||||
emit(
|
||||
'change',
|
||||
value,
|
||||
dataList.value.find((e) => e.invoiceId == value)
|
||||
);
|
||||
}
|
||||
|
||||
// ------------------------ 数据查询 ------------------------
|
||||
|
||||
const dataList = ref([]);
|
||||
async function queryData() {
|
||||
if (!props.enterpriseId) {
|
||||
return;
|
||||
}
|
||||
let res = await invoiceApi.queryList(props.enterpriseId);
|
||||
dataList.value = res.data;
|
||||
if (!props.value && !_.isEmpty(dataList.value)) {
|
||||
selectValue.value = res.data[0].invoiceId;
|
||||
handleChange(res.data[0].invoiceId);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(queryData);
|
||||
</script>
|
||||
@@ -0,0 +1,85 @@
|
||||
<!--
|
||||
* 企业列表 下拉选择框
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-26 19:16:24
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width: ${width}`"
|
||||
:placeholder="props.placeholder"
|
||||
:showSearch="true"
|
||||
:allowClear="true"
|
||||
:size="size"
|
||||
@change="handleChange"
|
||||
:disabled="disabled"
|
||||
:mode="multiple ? 'multiple' : ''"
|
||||
optionFilterProp="label"
|
||||
>
|
||||
<a-select-option v-for="item in dataList" :key="item.enterpriseId" :label="item.enterpriseName">
|
||||
{{ item.enterpriseName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { enterpriseApi } from '/@/api/business/oa/enterprise-api';
|
||||
|
||||
const props = defineProps({
|
||||
value: [Number, String, Object],
|
||||
width: {
|
||||
type: String,
|
||||
default: '200px',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 类型 ENTERPRISE_TYPE_ENUM
|
||||
type: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
const selectValue = ref(props.value);
|
||||
|
||||
// 箭头value变化
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
selectValue.value = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
function handleChange(value) {
|
||||
emit('update:value', value);
|
||||
emit('change', value);
|
||||
}
|
||||
|
||||
const dataList = ref([]);
|
||||
|
||||
async function queryData() {
|
||||
let res = await enterpriseApi.queryList(props.type);
|
||||
dataList.value = res.data;
|
||||
}
|
||||
onMounted(queryData);
|
||||
</script>
|
||||
@@ -0,0 +1,87 @@
|
||||
<!--
|
||||
* 地区选择框
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-12 15:22:45
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
|
||||
<template>
|
||||
<a-cascader
|
||||
:style="`width:${width}`"
|
||||
v-model:value="areaValue"
|
||||
:show-search="{ filter }"
|
||||
:options="areaOptionData"
|
||||
:placeholder="placeholder"
|
||||
:size="size"
|
||||
@change="handleChange"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { PROVINCE_CITY_DISTRICT } from './province-city-district';
|
||||
import { PROVINCE_CITY } from './province-city';
|
||||
import { ref, toRaw, watch } from 'vue';
|
||||
|
||||
// ============ 组件属性 ============
|
||||
|
||||
const TYPE_PROVINCE_CITY_DISTRICT = 'province_city_district';
|
||||
|
||||
const props = defineProps({
|
||||
type: String,
|
||||
value: [Number, Array],
|
||||
width: {
|
||||
type: String,
|
||||
default: '200px',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择地区',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
// ============ 组件业务 ============
|
||||
const areaOptionData = props.type === TYPE_PROVINCE_CITY_DISTRICT ? PROVINCE_CITY_DISTRICT : PROVINCE_CITY;
|
||||
|
||||
// 绑定地区数据
|
||||
const areaValue = ref([]);
|
||||
// 监听value变化
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
let array = [];
|
||||
for (let index = 0; index < 3; index++) {
|
||||
if (newValue[index]) {
|
||||
array.push(newValue[index].value);
|
||||
}
|
||||
}
|
||||
areaValue.value = array;
|
||||
} else {
|
||||
areaValue.value = [];
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function handleChange(value, selectedOptions) {
|
||||
emit('update:value', toRaw(selectedOptions));
|
||||
emit('change', value, toRaw(selectedOptions));
|
||||
}
|
||||
|
||||
const filter = (inputValue, path) => {
|
||||
return path.some((option) => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,80 @@
|
||||
<!--
|
||||
* 布尔 树形选择组件
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-12 21:01:52
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width: ${width}px`"
|
||||
:placeholder="placeholder"
|
||||
:showSearch="true"
|
||||
:allowClear="true"
|
||||
:size="size"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option v-for="item in $smartEnumPlugin.getValueDescList('FLAG_NUMBER_ENUM')" :key="item.value" :value="item.value">
|
||||
{{ item.desc }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import _ from 'lodash';
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
value: Boolean,
|
||||
width: {
|
||||
type: Number,
|
||||
default: 100,
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
function convertBoolean2number(value) {
|
||||
let result = null;
|
||||
if (_.isNaN(value) || _.isNull(value) || _.isUndefined(value)) {
|
||||
result = null;
|
||||
} else {
|
||||
result = value ? 1 : 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// 箭头value变化
|
||||
const selectValue = ref(convertBoolean2number(props.value));
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
selectValue.value = convertBoolean2number(newValue);
|
||||
}
|
||||
);
|
||||
|
||||
const handleChange = (value) => {
|
||||
console.log('boolean enum select', value);
|
||||
let booleanResult = null;
|
||||
if (!_.isUndefined(value)) {
|
||||
booleanResult = value === 1;
|
||||
}
|
||||
emit('update:value', booleanResult);
|
||||
emit('change', booleanResult);
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,133 @@
|
||||
<!--
|
||||
* 图标 选择
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-01 23:14:49
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<a-popover v-model:open="visible" placement="bottomLeft" trigger="click">
|
||||
<template #title>
|
||||
<a-form-item>
|
||||
<a-radio-group @change="updateSelectIconArray" v-model:value="iconStyle" style="margin: 8px">
|
||||
<a-radio-button value="outlined">线框风格</a-radio-button>
|
||||
<a-radio-button value="filled">实底风格</a-radio-button>
|
||||
<a-radio-button value="twoTone">双色风格</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-input-search v-model:value="searchValue" placeholder="输入英文关键词进行搜索" @change="updateSelectIconArray" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
<template #content>
|
||||
<div class="icon-box">
|
||||
<div v-for="item in iconLoopArray" :key="item" @click="handleClick(item)" class="icon-content">
|
||||
<component :is="$antIcons[item]" />
|
||||
</div>
|
||||
<div v-show="showMoreIndex > 0">
|
||||
<a-button type="link" @click="showMore">点击展开更多图标(因图标较多,可能会卡一小会)</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<slot name="iconSelect"></slot>
|
||||
</a-popover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as VueIcon from '@ant-design/icons-vue';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import _ from 'lodash';
|
||||
|
||||
//线框风格图标数组
|
||||
const outlinedIconArray = Object.keys(VueIcon).filter((e) => _.endsWith(e.toLowerCase(), 'outlined'));
|
||||
//实底风格图标数组
|
||||
const filledIconArray = Object.keys(VueIcon).filter((e) => _.endsWith(e.toLowerCase(), 'filled'));
|
||||
//双色风格图标数组
|
||||
const twoToneIconArray = Object.keys(VueIcon).filter((e) => _.endsWith(e.toLowerCase(), 'twotone'));
|
||||
|
||||
// ------------ 显示/隐藏 ------------
|
||||
const visible = ref(false);
|
||||
|
||||
// ------------ 展开更多 ------------
|
||||
const SHOW_MORE_LENGTH = 35;
|
||||
const showMoreIndex = ref(SHOW_MORE_LENGTH);
|
||||
function showMore() {
|
||||
showMoreIndex.value = -1;
|
||||
}
|
||||
|
||||
// ------------ 图标展示与搜索 ------------
|
||||
|
||||
const iconStyle = ref('outlined');
|
||||
const selectIconArray = ref([...outlinedIconArray]);
|
||||
|
||||
const iconLoopArray = computed(() => {
|
||||
return _.slice(selectIconArray.value, 0, showMoreIndex.value);
|
||||
});
|
||||
|
||||
watch(iconStyle, (newValue, oldValue) => {
|
||||
updateSelectIconArray();
|
||||
});
|
||||
|
||||
let searchValue = ref('');
|
||||
function updateSelectIconArray() {
|
||||
let tempArray = null;
|
||||
if (iconStyle.value === 'outlined') {
|
||||
tempArray = outlinedIconArray;
|
||||
} else if (iconStyle.value === 'filled') {
|
||||
tempArray = filledIconArray;
|
||||
} else {
|
||||
tempArray = twoToneIconArray;
|
||||
}
|
||||
if (!searchValue.value) {
|
||||
selectIconArray.value = tempArray;
|
||||
} else {
|
||||
selectIconArray.value = tempArray.filter((e) => e.toLowerCase().includes(searchValue.value.toLowerCase()));
|
||||
}
|
||||
|
||||
if (selectIconArray.value.length > SHOW_MORE_LENGTH) {
|
||||
showMoreIndex.value = SHOW_MORE_LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------ 对外抛出选择图标事件 ------------
|
||||
const emit = defineEmits(['updateIcon']);
|
||||
function handleClick(icon) {
|
||||
visible.value = false;
|
||||
emit('updateIcon', icon);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.icon-box {
|
||||
overflow: auto;
|
||||
font-size: 20px;
|
||||
width: 410px;
|
||||
height: 300px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.icon-content {
|
||||
width: 45px;
|
||||
height: 40px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #ccc;
|
||||
.more-icon {
|
||||
font-size: 14px;
|
||||
margin: 5px;
|
||||
}
|
||||
}
|
||||
.icon-content:hover {
|
||||
background: #1890ff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!--
|
||||
* iframe 组件
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-01 23:14:49
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<iframe :id="name" :src="url" frameborder="0" height="800" scrolling="yes" width="100%"></iframe>
|
||||
</template>
|
||||
<script setup>
|
||||
let props = defineProps({
|
||||
name: String,
|
||||
url: String,
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<CopyOutlined
|
||||
@click="copy"
|
||||
:style="{
|
||||
color: `${color}`,
|
||||
}"
|
||||
class="icon"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { message } from 'ant-design-vue';
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#1890ff',
|
||||
},
|
||||
});
|
||||
|
||||
function copy() {
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = props.value;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
message.success('复制成功');
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.icon {
|
||||
margin: 0 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!--
|
||||
* 枚举 多选框
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-08 20:32:30
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<a-checkbox-group :style="`width: ${width}`" v-model:value="selectValue" @change="handleChange" :disabled="disabled">
|
||||
<a-checkbox v-for="item in valueDescList" :key="item.value" :value="item.value" :disabled="disabledOption.includes(item.value)">
|
||||
{{ item.desc }}
|
||||
</a-checkbox>
|
||||
</a-checkbox-group>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, getCurrentInstance, onMounted } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
enumName: String,
|
||||
value: Array,
|
||||
width: {
|
||||
type: String,
|
||||
default: '200px',
|
||||
},
|
||||
// 禁用整个多选框
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 需要禁用的选项枚举值
|
||||
disabledOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
// 需要隐藏的选项枚举值
|
||||
hiddenOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
// ------------ 枚举数据 加载和构建 ------------
|
||||
|
||||
const valueDescList = ref([]);
|
||||
|
||||
onMounted(() => {
|
||||
const internalInstance = getCurrentInstance(); // 有效 全局
|
||||
const smartEnumPlugin = internalInstance.appContext.config.globalProperties.$smartEnumPlugin;
|
||||
valueDescList.value = smartEnumPlugin.getValueDescList(props.enumName).filter((item) => !props.hiddenOption.includes(item.value));
|
||||
});
|
||||
|
||||
// ------------ 数据选中 事件及其相关 ------------
|
||||
|
||||
const selectValue = ref(props.value);
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
// 如果传入的值是被禁用或被隐藏的选项,则移除这些选项
|
||||
selectValue.value = newValue.filter((item) => !props.hiddenOption.includes(item) && !props.disabledOption.includes(item));
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
function handleChange(value) {
|
||||
emit('update:value', value);
|
||||
emit('change', value);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,88 @@
|
||||
<!--
|
||||
* 枚举 radio
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-08 20:32:30
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<template v-if="isButton">
|
||||
<a-radio-group v-model:value="selectValue" @change="handleChange" button-style="solid" :disabled="disabled">
|
||||
<a-radio-button v-for="item in valueDescList" :key="item.value" :value="item.value" :disabled="disabledOption.includes(item.value)">
|
||||
{{ item.desc }}
|
||||
</a-radio-button>
|
||||
</a-radio-group>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-radio-group v-model:value="selectValue" @change="handleChange" :disabled="disabled">
|
||||
<a-radio v-for="item in valueDescList" :key="item.value" :value="item.value" :disabled="disabledOption.includes(item.value)">
|
||||
{{ item.desc }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, onMounted, getCurrentInstance } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
enumName: String,
|
||||
value: [Number, String],
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
isButton: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 禁用整个单选框
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 需要禁用的选项枚举值
|
||||
disabledOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
// 需要隐藏的选项枚举值
|
||||
hiddenOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const valueDescList = ref([]);
|
||||
|
||||
onMounted(() => {
|
||||
const internalInstance = getCurrentInstance(); // 有效 全局
|
||||
const smartEnumPlugin = internalInstance.appContext.config.globalProperties.$smartEnumPlugin;
|
||||
valueDescList.value = smartEnumPlugin.getValueDescList(props.enumName).filter((item) => !props.hiddenOption.includes(item.value));
|
||||
});
|
||||
|
||||
const selectValue = ref(props.value);
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
// 如果传入的值是被禁用或被隐藏的选项,则移除该选项
|
||||
selectValue.value = props.disabledOption.includes(newValue) || props.hiddenOption.includes(newValue) ? undefined : newValue;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
function handleChange(e) {
|
||||
emit('update:value', e.target.value);
|
||||
emit('change', e.target.value);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,88 @@
|
||||
<!--
|
||||
* 枚举 下拉框
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-08 20:32:30
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width: ${width}`"
|
||||
:placeholder="props.placeholder"
|
||||
:showSearch="true"
|
||||
:allowClear="true"
|
||||
:size="size"
|
||||
@change="handleChange"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<a-select-option v-for="item in valueDescList" :key="item.value" :value="item.value" :disabled="disabledOption.includes(item.value)">
|
||||
{{ item.desc }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, onMounted, getCurrentInstance } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
enumName: String,
|
||||
value: [Number, String],
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
// 禁用整个下拉选择框
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 需要禁用的选项枚举值
|
||||
disabledOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
// 需要隐藏的选项枚举值
|
||||
hiddenOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const valueDescList = ref([]);
|
||||
|
||||
onMounted(() => {
|
||||
const internalInstance = getCurrentInstance(); // 有效 全局
|
||||
const smartEnumPlugin = internalInstance.appContext.config.globalProperties.$smartEnumPlugin;
|
||||
valueDescList.value = smartEnumPlugin.getValueDescList(props.enumName).filter((item) => !props.hiddenOption.includes(item.value));
|
||||
});
|
||||
|
||||
const selectValue = ref(props.value);
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
// 如果传入的值是被禁用或被隐藏的选项,则移除该选项
|
||||
selectValue.value = props.disabledOption.includes(newValue) || props.hiddenOption.includes(newValue) ? undefined : newValue;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
function handleChange(value) {
|
||||
emit('update:value', value);
|
||||
emit('change', value);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* loading 组件
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-07-22 20:33:41
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { useSpinStore } from "/@/store/modules/system/spin";
|
||||
|
||||
export const SmartLoading = {
|
||||
show: () => {
|
||||
useSpinStore().show();
|
||||
},
|
||||
|
||||
hide: () => {
|
||||
useSpinStore().hide();
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<div :class="className">
|
||||
<div v-if="overflow" class="ellipsis-box">
|
||||
<a-popover>
|
||||
<template #content>
|
||||
{{ text }}
|
||||
<SmartCopyIcon :value="text" />
|
||||
</template>
|
||||
<div>
|
||||
<slot>
|
||||
{{ text }}
|
||||
</slot>
|
||||
</div>
|
||||
</a-popover>
|
||||
</div>
|
||||
<div v-else>
|
||||
<slot>
|
||||
{{ text }}
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, ref, nextTick } from 'vue';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
|
||||
|
||||
const props = defineProps({
|
||||
text: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
classKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const overflow = ref(false);
|
||||
const className = ref();
|
||||
onMounted(() => {
|
||||
className.value = props.classKey + uuid();
|
||||
nextTick(() => {
|
||||
let doc = document.querySelector(`.${className.value}`);
|
||||
let fontSize = window.getComputedStyle(doc).fontSize.replace('px', '');
|
||||
let clientWidth = doc.clientWidth;
|
||||
let span = document.createElement('span');
|
||||
document.body.appendChild(span);
|
||||
span.style.fontSize = `${fontSize}px`;
|
||||
span.innerText = props.text;
|
||||
let width = span.offsetWidth;
|
||||
document.body.removeChild(span);
|
||||
overflow.value = width > clientWidth;
|
||||
});
|
||||
});
|
||||
|
||||
function showModel() {
|
||||
Modal.info({
|
||||
content: props.text,
|
||||
icon: '',
|
||||
okText: '关闭',
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.ellipsis-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
div {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,118 @@
|
||||
<!--
|
||||
* 编辑器
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-12 15:34:33
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<div style="border: 1px solid #ccc">
|
||||
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editorRef" />
|
||||
<Editor
|
||||
style="overflow-y: hidden"
|
||||
:style="{ height: `${height}px` }"
|
||||
v-model="editorHtml"
|
||||
:defaultConfig="editorConfig"
|
||||
@onCreated="handleCreated"
|
||||
@onChange="handleChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { shallowRef, onBeforeUnmount, watch, ref } from 'vue';
|
||||
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const';
|
||||
import { fileApi } from '/@/api/support/file-api';
|
||||
import '@wangeditor-next/editor/dist/css/style.css';
|
||||
import { Editor, Toolbar } from '@wangeditor-next/editor-for-vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
//菜单
|
||||
const editorConfig = { MENU_CONF: {} };
|
||||
|
||||
//上传
|
||||
let customUpload = {
|
||||
async customUpload(file, insertFn) {
|
||||
try {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
let res = await fileApi.uploadFile(formData, FILE_FOLDER_TYPE_ENUM.COMMON.value);
|
||||
let data = res.data;
|
||||
insertFn(data.fileUrl);
|
||||
} catch (error) {
|
||||
smartSentry.captureError(error);
|
||||
}
|
||||
},
|
||||
};
|
||||
editorConfig.MENU_CONF['uploadImage'] = customUpload;
|
||||
editorConfig.MENU_CONF['uploadVideo'] = customUpload;
|
||||
|
||||
// ----------------------- 以下是公用变量 emits props ----------------
|
||||
const editorHtml = ref();
|
||||
let props = defineProps({
|
||||
modelValue: String,
|
||||
height: {
|
||||
type: Number,
|
||||
default: 500,
|
||||
},
|
||||
});
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(nVal) => {
|
||||
editorHtml.value = nVal;
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
|
||||
// 获取编辑器实例html
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
const editorRef = shallowRef();
|
||||
const handleCreated = (editor) => {
|
||||
editorRef.value = editor;
|
||||
};
|
||||
const handleChange = (editor) => {
|
||||
emit('update:modelValue', editorHtml.value);
|
||||
};
|
||||
|
||||
function getHtml() {
|
||||
const htmlContent = editorRef.value.getHtml();
|
||||
return htmlContent === '<p><br></p>' ? '' : htmlContent;
|
||||
}
|
||||
function getText() {
|
||||
return editorRef.value.getText();
|
||||
}
|
||||
|
||||
// 组件销毁时,也及时销毁编辑器
|
||||
onBeforeUnmount(() => {
|
||||
const editor = editorRef.value;
|
||||
if (editor == null) return;
|
||||
editor.destroy();
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
editorRef,
|
||||
getHtml,
|
||||
getText,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.w-e-full-screen-container {
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
</style>
|
||||
<!-- 解决弹窗高度警告信息显示 -->
|
||||
<style>
|
||||
::v-deep .w-e-text-container {
|
||||
height: 420px !important;
|
||||
}
|
||||
.w-e-text-container .w-e-scroll {
|
||||
height: 500px !important;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,97 @@
|
||||
<!--
|
||||
* 数据变更记录,以table形式显示
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-12 21:01:52
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-table size="small" :dataSource="tableData" :columns="columns" rowKey="dataTracerId" :pagination="false" bordered>
|
||||
<template #bodyCell="{ record, index, column }">
|
||||
<template v-if="column.dataIndex === 'dataTracerId'">
|
||||
<div>{{ index + 1 }}</div>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'userName'">
|
||||
<div>{{ record.userName }} ({{ $smartEnumPlugin.getDescByValue('USER_TYPE_ENUM', record.userType) }})</div>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'userAgent'">
|
||||
<div>{{ record.browser }} / {{ record.os }} / {{ record.device }}</div>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'content'">
|
||||
<div class="operate-content" v-html="record.content"></div>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<a-button v-if="record.diffOld || record.diffNew" @click="showDetail(record)" type="link">详情 </a-button>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['showDetail']);
|
||||
function showDetail(record) {
|
||||
emit('showDetail', record);
|
||||
}
|
||||
|
||||
const columns = reactive([
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'dataTracerId',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: '操作时间',
|
||||
dataIndex: 'createTime',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'userName',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: 'IP',
|
||||
dataIndex: 'ip',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'IP地区',
|
||||
dataIndex: 'ipRegion',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '客户端',
|
||||
dataIndex: 'userAgent',
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '操作内容',
|
||||
dataIndex: 'content',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
fixed: 'right',
|
||||
width: 80,
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.operate-content {
|
||||
font-size: 14px;
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
* 数据变更记录,以 timeline 形式显示
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-12 21:01:52
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-timeline>
|
||||
<a-timeline-item v-for="record in tableData" :key="record.dataTracerId">
|
||||
<div class="trace-div">
|
||||
<div>
|
||||
<!-- <div class="operate-content" >{{ record.content }}</div> -->
|
||||
<div class="operate-content" v-html="record.content"></div>
|
||||
<a href="javascript:void(0)" v-if="record.diffOld || record.diffNew" @click="showDetail(record)">(查看修改)</a>
|
||||
</div>
|
||||
<div class="ip-font">
|
||||
{{ record.createTime }} | {{ record.userName }} | {{ record.ipRegion }} | {{ record.ip }} | {{ record.browser }} | {{ record.os }}
|
||||
</div>
|
||||
</div>
|
||||
</a-timeline-item>
|
||||
</a-timeline>
|
||||
</template>
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
tableData: {
|
||||
type: Array,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['showDetail']);
|
||||
function showDetail(record) {
|
||||
emit('showDetail', record);
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.operate-content {
|
||||
font-size: 14px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.ip-font {
|
||||
margin-top: 5px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,180 @@
|
||||
<!--
|
||||
* 数据变动记录 表格 组件
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-12 21:01:52
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="关键字" class="smart-query-form-item">
|
||||
<a-input style="width: 300px" v-model:value="queryForm.keywords" placeholder="变更内容" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item class="smart-query-form-item smart-margin-left10">
|
||||
<a-button-group>
|
||||
<a-button type="primary" @click="onSearch">
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button @click="onReload">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
</a-button-group>
|
||||
</a-form-item>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
||||
<a-card size="small" :bordered="false">
|
||||
<!---以表格形式 显示-->
|
||||
<!-- <DataTracerTable :tableData="tableData" @showDetail="showDetail" /> -->
|
||||
|
||||
<!---以 timeline 时间轴形式 显示-->
|
||||
<DataTracerTimeline :tableData="tableData" @showDetail="showDetail" />
|
||||
|
||||
<a-pagination
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryForm.pageSize"
|
||||
v-model:current="queryForm.pageNum"
|
||||
v-model:pageSize="queryForm.pageSize"
|
||||
:total="total"
|
||||
@change="ajaxQuery"
|
||||
@showSizeChange="ajaxQuery"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
/>
|
||||
<a-modal v-model:open="visibleDiff" width="90%" title="数据比对" :footer="null">
|
||||
<div v-html="prettyHtml"></div>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import * as Diff from 'diff';
|
||||
import * as Diff2Html from 'diff2html';
|
||||
import 'diff2html/bundles/css/diff2html.min.css';
|
||||
import uaparser from 'ua-parser-js';
|
||||
import { nextTick, reactive, ref, watch } from 'vue';
|
||||
import { dataTracerApi } from '/@/api/support/data-tracer-api';
|
||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import DataTracerTimeline from './data-tracer-timeline.vue';
|
||||
|
||||
let props = defineProps({
|
||||
// 数据id
|
||||
dataId: {
|
||||
type: Number,
|
||||
},
|
||||
// 数据 类型
|
||||
type: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
|
||||
// --------------- 查询表单、查询方法 ---------------
|
||||
|
||||
const queryFormState = {
|
||||
pageNum: 1,
|
||||
pageSize: PAGE_SIZE,
|
||||
searchCount: true,
|
||||
keywords: undefined,
|
||||
};
|
||||
const queryForm = reactive({ ...queryFormState });
|
||||
const tableLoading = ref(false);
|
||||
const tableData = ref([]);
|
||||
const total = ref(0);
|
||||
|
||||
function onReload() {
|
||||
Object.assign(queryForm, queryFormState);
|
||||
onSearch();
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
queryForm.pageNum = 1;
|
||||
ajaxQuery();
|
||||
}
|
||||
|
||||
async function ajaxQuery() {
|
||||
try {
|
||||
tableLoading.value = true;
|
||||
let responseModel = await dataTracerApi.queryList(Object.assign({}, queryForm, { dataId: props.dataId, type: props.type }));
|
||||
for (const e of responseModel.data.list) {
|
||||
if (!e.userAgent) {
|
||||
continue;
|
||||
}
|
||||
// e.content = e.content.replaceAll('<br/>',';');
|
||||
let ua = uaparser(e.userAgent);
|
||||
e.browser = ua.browser.name;
|
||||
e.os = ua.os.name;
|
||||
e.device = ua.device.vendor ? ua.device.vendor + ua.device.model : '';
|
||||
}
|
||||
const list = responseModel.data.list;
|
||||
total.value = responseModel.data.total;
|
||||
tableData.value = list;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// ========= 定义 watch 监听 ===============
|
||||
watch(
|
||||
() => props.dataId,
|
||||
(e) => {
|
||||
if (e) {
|
||||
queryForm.dataId = e;
|
||||
onSearch();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// --------------- diff 特效 ---------------
|
||||
// diff
|
||||
const visibleDiff = ref(false);
|
||||
let prettyHtml = ref('');
|
||||
function showDetail(record) {
|
||||
visibleDiff.value = true;
|
||||
let diffOld = record.diffOld.replaceAll('<br/>', '\r\n');
|
||||
let diffNew = record.diffNew.replaceAll('<br/>', '\r\n');
|
||||
const args = ['', diffOld, diffNew, '变更前', '变更后'];
|
||||
|
||||
let diffPatch = Diff.createPatch(...args);
|
||||
let html = Diff2Html.html(diffPatch, {
|
||||
drawFileList: false,
|
||||
matching: 'words',
|
||||
diffMaxChanges: 1000,
|
||||
outputFormat: 'side-by-side',
|
||||
});
|
||||
|
||||
prettyHtml.value = html;
|
||||
nextTick(() => {
|
||||
let diffDiv = document.querySelectorAll('.d2h-file-side-diff');
|
||||
if (diffDiv.length > 0) {
|
||||
let left = diffDiv[0],
|
||||
right = diffDiv[1];
|
||||
left.addEventListener('scroll', function (e) {
|
||||
if (left.scrollLeft !== right.scrollLeft) {
|
||||
right.scrollLeft = left.scrollLeft;
|
||||
}
|
||||
});
|
||||
right.addEventListener('scroll', function (e) {
|
||||
if (left.scrollLeft !== right.scrollLeft) {
|
||||
left.scrollLeft = right.scrollLeft;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,73 @@
|
||||
<!---
|
||||
* 字典key 下拉选择框
|
||||
*
|
||||
* @Author: 1024创新实验室:罗伊
|
||||
* @Date: 2022-09-12 22:06:45
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<a-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width: ${width}`"
|
||||
:placeholder="props.placeholder"
|
||||
:showSearch="true"
|
||||
:allowClear="true"
|
||||
:size="size"
|
||||
@change="onChange"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<a-select-option v-for="item in dictList" :key="item.dictCode" :value="item.dictCode">
|
||||
{{ item.dictName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
|
||||
const props = defineProps({
|
||||
value: [Array, String, Number],
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择字典',
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
// 禁用标识
|
||||
disabled: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
// -------------------------- 字典数据 --------------------------
|
||||
|
||||
const dictList = computed(() => useDictStore().dictList.filter((item) => !item.disabledFlag));
|
||||
|
||||
// -------------------------- 选中 相关、事件 --------------------------
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
const selectValue = ref(props.value);
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
selectValue.value = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
function onChange(value) {
|
||||
emit('update:value', value);
|
||||
emit('change', value);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<span>{{ dataLabels }}</span>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
|
||||
const props = defineProps({
|
||||
dictCode: String,
|
||||
dataValue: [String, Number],
|
||||
});
|
||||
const dataLabels = computed(() => {
|
||||
return useDictStore().getDataLabels(props.dictCode, props.dataValue);
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,101 @@
|
||||
<!---
|
||||
* 字段 下拉选择框
|
||||
*
|
||||
* @Author: 1024创新实验室:罗伊
|
||||
* @Date: 2022-09-12 22:06:45
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<a-select
|
||||
v-model:value="selectValue"
|
||||
:style="`width: ${width}`"
|
||||
:placeholder="props.placeholder"
|
||||
:allowClear="true"
|
||||
:size="size"
|
||||
:mode="mode"
|
||||
@change="onChange"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<a-select-option v-for="item in dictDataList" :key="item.dataValue" :value="item.dataValue" :disabled="disabledOption.includes(item.valueCode)">
|
||||
{{ item.dataLabel }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
|
||||
const props = defineProps({
|
||||
dictCode: String,
|
||||
value: [Array, String, Number],
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'combobox',
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '200px',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
},
|
||||
// 禁用整个下拉选择框
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 需要禁用的选项字典值编码
|
||||
disabledOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
// 需要隐藏的选项字典值编码
|
||||
hiddenOption: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
// -------------------------- 查询 字典数据 --------------------------
|
||||
|
||||
const dictDataList = computed(() =>
|
||||
useDictStore()
|
||||
.getDictData(props.dictCode)
|
||||
.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag)
|
||||
);
|
||||
|
||||
// -------------------------- 选中 相关、事件 --------------------------
|
||||
|
||||
const selectValue = ref(props.value);
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
(newValue) => {
|
||||
// 如果传入的值是被禁用或被隐藏的选项,则移除这些选项
|
||||
if (Array.isArray(newValue)) {
|
||||
selectValue.value = newValue.filter((item) => !props.disabledOption.includes(item) && !props.hiddenOption.includes(item));
|
||||
} else {
|
||||
selectValue.value = props.hiddenOption.includes(newValue) || props.disabledOption.includes(newValue) ? undefined : newValue;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
|
||||
function onChange(value) {
|
||||
emit('update:value', value);
|
||||
emit('change', value);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,83 @@
|
||||
<!--
|
||||
* 文件预览 弹窗
|
||||
*
|
||||
* @Author: 1024创新实验室:善逸
|
||||
* @Date: 2022-09-02 20:19:39
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<div class="container">
|
||||
<a-image
|
||||
class="img-prev"
|
||||
:style="{ display: 'none' }"
|
||||
:preview="{
|
||||
visible,
|
||||
onVisibleChange: setVisible,
|
||||
}"
|
||||
:src="previewUrl"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { fileApi } from '/@/api/support/file-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
|
||||
const imgFileType = ['jpg', 'jpeg', 'png', 'gif'];
|
||||
const previewUrl = ref();
|
||||
|
||||
function showPreview(fileItem) {
|
||||
if (!fileItem.fileUrl) {
|
||||
(async () => {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
let res = await fileApi.getUrl(fileItem.fileKey);
|
||||
fileItem.fileUrl = res.data;
|
||||
showFile(fileItem);
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
})();
|
||||
} else {
|
||||
showFile(fileItem);
|
||||
}
|
||||
}
|
||||
|
||||
const visible = ref(false);
|
||||
const setVisible = (value) => {
|
||||
visible.value = value;
|
||||
};
|
||||
|
||||
function showFile(fileItem) {
|
||||
if (isImg(fileItem.fileType)) {
|
||||
previewUrl.value = fileItem.fileUrl;
|
||||
setVisible(true);
|
||||
return;
|
||||
}
|
||||
fileApi.downLoadFile(fileItem.fileKey);
|
||||
}
|
||||
|
||||
// 判断图片类型
|
||||
function isImg(fileType) {
|
||||
return imgFileType.includes(fileType);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showPreview,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,79 @@
|
||||
<!--
|
||||
* 文件预览
|
||||
*
|
||||
* @Author: 1024创新实验室:善逸
|
||||
* @Date: 2022-07-19 23:19:39
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<template v-if="type === 'text'">
|
||||
<a v-for="(item, index) in fileList" :key="index" @click="preview(item, index)">
|
||||
{{ item.fileName }}
|
||||
<span v-if="index !== fileList.length - 1" v-html="separator"></span>
|
||||
</a>
|
||||
</template>
|
||||
<a-space>
|
||||
<a-image-preview-group :preview="{ visible, onVisibleChange: setVisible, current: previewCurrent }">
|
||||
<a-image
|
||||
v-for="(item, index) in fileList"
|
||||
:key="index"
|
||||
:src="item.fileUrl"
|
||||
:style="{ display: type === 'text' ? 'none' : '', padding: '2px', height: '100px' }"
|
||||
:width="width"
|
||||
@click="preview(item, index)"
|
||||
/>
|
||||
</a-image-preview-group>
|
||||
</a-space>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { fileApi } from '/@/api/support/file-api';
|
||||
|
||||
let props = defineProps({
|
||||
fileList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
// 类型 text,picture
|
||||
type: {
|
||||
type: String,
|
||||
default: 'text',
|
||||
},
|
||||
// image 宽度
|
||||
width: {
|
||||
type: Number,
|
||||
default: 100,
|
||||
},
|
||||
// 分隔符 可设置html标签 例如:<br/>
|
||||
separator: {
|
||||
type: String,
|
||||
default: ',',
|
||||
},
|
||||
});
|
||||
const imgFileType = ['jpg', 'jpeg', 'png', 'gif'];
|
||||
|
||||
// 文件预览
|
||||
function preview(file, index) {
|
||||
if (imgFileType.some((e) => e === file.fileType)) {
|
||||
previewCurrent.value = index;
|
||||
visible.value = true;
|
||||
} else {
|
||||
fileApi.downLoadFile(file.fileKey);
|
||||
}
|
||||
}
|
||||
|
||||
// 预览
|
||||
const visible = ref(false);
|
||||
const previewCurrent = ref(0);
|
||||
|
||||
function setVisible(value) {
|
||||
visible.value = value;
|
||||
}
|
||||
</script>
|
||||