first commit
This commit is contained in:
118
.env
Normal file
118
.env
Normal file
@@ -0,0 +1,118 @@
|
||||
# 网站主标题
|
||||
VITE_GLOBAL_TITLE= 'PIGX ADMIN'
|
||||
|
||||
# footer
|
||||
VITE_FOOTER_TITLE= '©2025 pig4cloud.com'
|
||||
|
||||
# 是否是微服务架构(重要)
|
||||
VITE_IS_MICRO= true
|
||||
|
||||
# 前端访问前缀
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 后端请求前缀
|
||||
VITE_API_URL = /api
|
||||
|
||||
# ADMIN 服务地址
|
||||
VITE_ADMIN_PROXY_PATH = http://47.99.138.212:9999
|
||||
# VITE_ADMIN_PROXY_PATH = http://localhost:9999
|
||||
|
||||
# 前端加密密钥
|
||||
VITE_PWD_ENC_KEY='pigxpigxpigxpigx'
|
||||
|
||||
# OAUTH2 密码模式客户端信息
|
||||
VITE_OAUTH2_PASSWORD_CLIENT='pig:pig'
|
||||
|
||||
# OAUTH2 短信客户端信息
|
||||
VITE_OAUTH2_MOBILE_CLIENT='app:app'
|
||||
|
||||
# OAUTH2 社交登录客户端信息
|
||||
VITE_OAUTH2_SOCIAL_CLIENT='social:social'
|
||||
|
||||
# 是否开启前端滑块验证码
|
||||
VITE_VERIFY_ENABLE = true
|
||||
|
||||
# 是否开启前端图形验证码
|
||||
VITE_VERIFY_IMAGE_ENABLE = false
|
||||
|
||||
# 是否开启websocket 消息接受,
|
||||
VITE_WEBSOCKET_ENABLE = false
|
||||
|
||||
# 是否开启注册
|
||||
VITE_REGISTER_ENABLE = false
|
||||
|
||||
# 是否开启租户自动选择 (根据租户域名)
|
||||
VITE_AUTO_TENANT = false
|
||||
|
||||
# 是否开启多语言切换
|
||||
VITE_I18N_ENABLE = true
|
||||
|
||||
# 是否开启暗黑模式切换
|
||||
VITE_DARK_MODE_ENABLE = false
|
||||
|
||||
# 是否启用禁用浏览器调试功能(反爬)
|
||||
VITE_ENABLE_ANTI_DEBUG=false
|
||||
|
||||
# 绕过反爬参数值 url?ddtk=参数值P20251208172636606KPUQH
|
||||
VITE_ANTI_DEBUG_KEY=pig
|
||||
|
||||
# 根部门ID
|
||||
VITE_DEPT_ROOT_ID=1375217991800619128
|
||||
|
||||
# 投资项目储备流程登记
|
||||
VITE_FLOWID_1=1
|
||||
VITE_FLOWID_2=2
|
||||
VITE_FLOWID_3=3
|
||||
VITE_FLOWID_4=4
|
||||
# 投资项目储备流程更新
|
||||
VITE_FLOWID_5=5
|
||||
VITE_FLOWID_6=6
|
||||
VITE_FLOWID_7=7
|
||||
VITE_FLOWID_8=8
|
||||
# 对外合作单位登记
|
||||
VITE_FLOWID_9=9
|
||||
# 对外合作单位更新
|
||||
VITE_FLOWID_10=10
|
||||
VITE_FLOWID_11=11
|
||||
VITE_FLOWID_12=12
|
||||
# 专家信息申报
|
||||
VITE_FLOWID_13=13
|
||||
# 专家信息更新
|
||||
VITE_FLOWID_14=14
|
||||
# 混改管理登记
|
||||
VITE_FLOWID_15=15
|
||||
VITE_FLOWID_16=16
|
||||
# 混改管理更新
|
||||
VITE_FLOWID_17=17
|
||||
VITE_FLOWID_18=18
|
||||
# 产权管理登记
|
||||
VITE_FLOWID_19=19
|
||||
VITE_FLOWID_20=20
|
||||
# 产权管理更新
|
||||
VITE_FLOWID_21=21
|
||||
VITE_FLOWID_22=22
|
||||
#投资项目计划登记
|
||||
VITE_FLOWID_23=23
|
||||
VITE_FLOWID_24=24
|
||||
VITE_FLOWID_25=25
|
||||
VITE_FLOWID_26=26
|
||||
#投资项目计划更新
|
||||
VITE_FLOWID_27=27
|
||||
VITE_FLOWID_28=28
|
||||
VITE_FLOWID_29=29
|
||||
VITE_FLOWID_30=30
|
||||
# 项目进度申报
|
||||
VITE_FLOWID_31=31
|
||||
VITE_FLOWID_32=32
|
||||
VITE_FLOWID_33=33
|
||||
VITE_FLOWID_34=34
|
||||
# 项目退出
|
||||
VITE_FLOWID_35=35
|
||||
# 项目退出反馈
|
||||
VITE_FLOWID_36=36
|
||||
# 专委会评审登记
|
||||
VITE_FLOWID_37=37
|
||||
VITE_FLOWID_38=38
|
||||
# 专委会评审更新
|
||||
VITE_FLOWID_39=39
|
||||
VITE_FLOWID_40=40
|
||||
14
.env.development
Normal file
14
.env.development
Normal file
@@ -0,0 +1,14 @@
|
||||
# port 端口号
|
||||
VITE_PORT = 8889
|
||||
|
||||
#浏览器自动打开
|
||||
VITE_OPEN = true
|
||||
|
||||
# 本地环境
|
||||
ENV = 'development'
|
||||
|
||||
# ADMIN 服务地址
|
||||
VITE_ADMIN_PROXY_PATH = http://panel1.nanxiislet.com:9999
|
||||
# VITE_ADMIN_PROXY_PATH = http://192.168.2.102:9999
|
||||
# 罗老师本地
|
||||
# VITE_ADMIN_PROXY_PATH = http://10.30.148.198:7777
|
||||
18
.eslintignore
Normal file
18
.eslintignore
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
*.sh
|
||||
node_modules
|
||||
lib
|
||||
*.md
|
||||
*.scss
|
||||
*.woff
|
||||
*.ttf
|
||||
.vscode
|
||||
.idea
|
||||
dist
|
||||
mock
|
||||
public
|
||||
bin
|
||||
build
|
||||
config
|
||||
index.html
|
||||
src/assets
|
||||
78
.eslintrc.js
Normal file
78
.eslintrc.js
Normal file
@@ -0,0 +1,78 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
},
|
||||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 12,
|
||||
parser: '@typescript-eslint/parser',
|
||||
sourceType: 'module',
|
||||
},
|
||||
extends: ['plugin:vue/vue3-essential', 'plugin:vue/essential', 'eslint:recommended'],
|
||||
plugins: ['vue', '@typescript-eslint'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx', '*.vue'],
|
||||
rules: {
|
||||
'no-undef': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
// http://eslint.cn/docs/rules/
|
||||
// https://eslint.vuejs.org/rules/
|
||||
// https://typescript-eslint.io/rules/no-unused-vars/
|
||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/no-use-before-define': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-redeclare': 'error',
|
||||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [2],
|
||||
'vue/custom-event-name-casing': 'off',
|
||||
'vue/attributes-order': 'off',
|
||||
'vue/one-component-per-file': 'off',
|
||||
'vue/html-closing-bracket-newline': 'off',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'vue/attribute-hyphenation': 'off',
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/no-multiple-template-root': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/no-v-model-argument': 'off',
|
||||
'vue/no-arrow-functions-in-watch': 'off',
|
||||
'vue/no-template-key': 'off',
|
||||
'vue/no-v-html': 'off',
|
||||
'vue/comment-directive': 'off',
|
||||
'vue/no-mutating-props': 'off',
|
||||
'vue/no-parsing-error': 'off',
|
||||
'vue/no-deprecated-v-on-native-modifier': 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'no-useless-escape': 'off',
|
||||
'no-sparse-arrays': 'off',
|
||||
'no-prototype-builtins': 'off',
|
||||
'no-constant-condition': 'off',
|
||||
'no-use-before-define': 'off',
|
||||
'no-restricted-globals': 'off',
|
||||
'no-restricted-syntax': 'off',
|
||||
'generator-star-spacing': 'off',
|
||||
'no-unreachable': 'off',
|
||||
'no-multiple-template-root': 'off',
|
||||
'no-unused-vars': 'error',
|
||||
'no-v-model-argument': 'off',
|
||||
'no-case-declarations': 'off',
|
||||
'no-console': 'error',
|
||||
'no-redeclare': 'off',
|
||||
'no-mixed-spaces-and-tabs': 'off',
|
||||
},
|
||||
};
|
||||
30
.gitignore
vendored
Normal file
30
.gitignore
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
dist.zip
|
||||
docker/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
# lock
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
39
.prettierrc.js
Normal file
39
.prettierrc.js
Normal file
@@ -0,0 +1,39 @@
|
||||
module.exports = {
|
||||
// 一行最多多少个字符
|
||||
printWidth: 150,
|
||||
// 指定每个缩进级别的空格数
|
||||
tabWidth: 2,
|
||||
// 使用制表符而不是空格缩进行
|
||||
useTabs: true,
|
||||
// 在语句末尾打印分号
|
||||
semi: true,
|
||||
// 使用单引号而不是双引号
|
||||
singleQuote: true,
|
||||
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
||||
quoteProps: 'as-needed',
|
||||
// 在JSX中使用单引号而不是双引号
|
||||
jsxSingleQuote: false,
|
||||
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
||||
trailingComma: 'es5',
|
||||
// 在对象文字中的括号之间打印空格
|
||||
bracketSpacing: true,
|
||||
// jsx 标签的反尖括号需要换行
|
||||
jsxBracketSameLine: false,
|
||||
// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
|
||||
arrowParens: 'always',
|
||||
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
||||
rangeStart: 0,
|
||||
rangeEnd: Infinity,
|
||||
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
||||
requirePragma: false,
|
||||
// 不需要自动在文件开头插入 @prettier
|
||||
insertPragma: false,
|
||||
// 使用默认的折行标准 always\never\preserve
|
||||
proseWrap: 'preserve',
|
||||
// 指定HTML文件的全局空格敏感度 css\strict\ignore
|
||||
htmlWhitespaceSensitivity: 'css',
|
||||
// Vue文件脚本和样式标签缩进
|
||||
vueIndentScriptAndStyle: false,
|
||||
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
||||
endOfLine: 'lf',
|
||||
};
|
||||
8
README.md
Normal file
8
README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# name
|
||||
投资监管前端
|
||||
#
|
||||
项目技术栈: vue3+ts+pigx+pinia+axios
|
||||
#
|
||||
项目依赖建议使用:pnpm i
|
||||
#
|
||||
项目启动: npm run dev
|
||||
73
auto-imports.d.ts
vendored
Normal file
73
auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const createPinia: typeof import('pinia')['createPinia']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const defineStore: typeof import('pinia')['defineStore']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const getActivePinia: typeof import('pinia')['getActivePinia']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const mapActions: typeof import('pinia')['mapActions']
|
||||
const mapGetters: typeof import('pinia')['mapGetters']
|
||||
const mapState: typeof import('pinia')['mapState']
|
||||
const mapStores: typeof import('pinia')['mapStores']
|
||||
const mapWritableState: typeof import('pinia')['mapWritableState']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const resolveDirective: typeof import('vue')['resolveDirective']
|
||||
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useLink: typeof import('vue-router')['useLink']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
}
|
||||
9
docker/Dockerfile
Normal file
9
docker/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/nginx
|
||||
|
||||
COPY ./dist /data
|
||||
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
|
||||
ADD ymt-ui.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN /bin/bash -c 'echo init ok'
|
||||
19
docker/docker-compose.yaml
Normal file
19
docker/docker-compose.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: '3'
|
||||
services:
|
||||
ymt-ui:
|
||||
build:
|
||||
context: .
|
||||
restart: always
|
||||
container_name: ymt-ui
|
||||
image: ymt-ui
|
||||
networks:
|
||||
- spring_cloud_default
|
||||
external_links:
|
||||
- ymt-gateway
|
||||
ports:
|
||||
- 80:80
|
||||
|
||||
# 加入到后端网络, 默认为 ymt_default | docker network ls 查看
|
||||
networks:
|
||||
spring_cloud_default:
|
||||
external: true
|
||||
39
docker/ymt-ui.conf
Normal file
39
docker/ymt-ui.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
server_tokens off; # Nginx 版本信息关闭,避免攻击
|
||||
client_max_body_size 64m; # 最大上传文件大小!
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
gzip on;
|
||||
gzip_static on; # 需要http_gzip_static_module 模块
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 4;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/xml text/css;
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
||||
|
||||
# 前端打包好的dist目录文件
|
||||
root /data/;
|
||||
|
||||
location ^~/api/ {
|
||||
proxy_pass http://tzfz-gateway:9999/; #注意/后缀
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_read_timeout 120s;
|
||||
proxy_send_timeout 120s;
|
||||
proxy_set_header from "";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header from "";
|
||||
}
|
||||
|
||||
# 屏蔽所有敏感路径,不用改代码配置开关,双重保护
|
||||
location ~* ^/(actuator|swagger-ui|v3/api-docs|swagger-resources|webjars|doc.html) {
|
||||
return 403; # 禁止访问
|
||||
}
|
||||
}
|
||||
28
index.html
Normal file
28
index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta
|
||||
name="keywords"
|
||||
content="
|
||||
微服务,pig开发平台,oauth2,微服务框架,java微服务框架,微服务开发框架,微服务治理框架,开源微服务框架,微服务器框架,微服务框架图,微服务快速开发框架,微服务java框架,微服务开源框架,微服务开源框架,微服务架构框架,微服务基础框架,微服务常见框架,主流微服务框架,微服务框架搭建,java主流微服务框架,java微服务开发框架,微服务前端框架,Spring
|
||||
Boot,Spring Cloud,Spring"
|
||||
/>
|
||||
|
||||
<meta
|
||||
name="description"
|
||||
content="PIG应用微服务、容器、DevOps等云原生技术,封装了大量技术开发包、技术应用组件、技术场景实现能力,并支持SaaS模式应用,提供了一个可支持企业各业务系统或产品快速开发实现的微服务应用数字化融合平台,富含各类开箱即用的组件、微服务业务系统,助力企业跨越Cloud(IaaS/PaaS)与自身数字化的鸿沟,共享业务服务的组合重用,为企业服务化中台整合、数字化转型提供强力支撑,也为企业提供了最佳架构实践。"
|
||||
/>
|
||||
<!--避免微信管理防盗链机制-->
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<title>PIGX 微服务快速开发平台</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
117
package.json
Normal file
117
package.json
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"name": "ymt-ui",
|
||||
"version": "5.8.0",
|
||||
"description": "PIGCLOUD微服务开发平台",
|
||||
"author": "pig4cloud",
|
||||
"license": "不对外分发 pig4cloud 版权所有,请购买商业版权",
|
||||
"scripts": {
|
||||
"dev": "vite --force",
|
||||
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build",
|
||||
"build:docker": "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --outDir ./docker/dist/",
|
||||
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
|
||||
"prettier": "prettier --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@axolo/json-editor-vue": "^0.3.2",
|
||||
"@chenfengyuan/vue-qrcode": "^2.0.0",
|
||||
"@element-plus/icons-vue": "^2.0.10",
|
||||
"@form-create/element-ui": "3.2.16",
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@popperjs/core": "2.11.8",
|
||||
"@vueuse/core": "^10.4.1",
|
||||
"@wangeditor/editor": "5.1.23",
|
||||
"@wangeditor/editor-for-vue": "5.1.12",
|
||||
"@wecom/jssdk": "^2.3.3",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"axios": "^1.3.3",
|
||||
"codemirror": "5.65.5",
|
||||
"crypto-js": "^3.1.9-1",
|
||||
"disable-devtool": "^0.3.8",
|
||||
"driver.js": "^0.9.8",
|
||||
"echarts": "^5.4.1",
|
||||
"element-plus": "2.5.5",
|
||||
"form-create-designer": "3.2.10-oem",
|
||||
"highlight.js": "^11.7.0",
|
||||
"js-base64": "^3.7.7",
|
||||
"js-cookie": "^3.0.1",
|
||||
"json-editor-vue3": "^1.1.1",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "^12.0.2",
|
||||
"markmap-common": "0.15.6",
|
||||
"markmap-lib": "0.15.8",
|
||||
"markmap-view": "0.15.8",
|
||||
"mitt": "^3.0.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "2.0.32",
|
||||
"postcss": "8.4.40",
|
||||
"qrcode": "1.5.1",
|
||||
"qs": "^6.11.0",
|
||||
"screenfull": "^6.0.2",
|
||||
"sm-crypto": "^0.3.12",
|
||||
"sortablejs": "^1.15.0",
|
||||
"splitpanes": "^3.1.5",
|
||||
"tailwindcss": "3.4.17",
|
||||
"v-calendar": "3.1.2",
|
||||
"vue": "^3.4.15",
|
||||
"vue-clipboard3": "^2.0.0",
|
||||
"vue-echarts": "6.6.1",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vue3-video-play": "1.3.1-beta.6",
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/core": "1.6.13",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/markdown-it": "^14.1.1",
|
||||
"@types/node": "^18.14.0",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/sm-crypto": "^0.3.4",
|
||||
"@types/sortablejs": "^1.15.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
||||
"@typescript-eslint/parser": "^5.53.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/compiler-sfc": "^3.2.47",
|
||||
"consola": "^2.15.3",
|
||||
"cross-env": "7.0.3",
|
||||
"daisyui": "4.11.1",
|
||||
"eslint": "^8.34.0",
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
"pinia-plugin-persist": "^1.0.0",
|
||||
"prettier": "2.8.4",
|
||||
"sass": "1.58.3",
|
||||
"terser": "^5.31.1",
|
||||
"typescript": "^4.9.5",
|
||||
"unplugin-auto-import": "^0.13.0",
|
||||
"vite": "^4.3.3",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-style-import": "^2.0.0",
|
||||
"vite-plugin-top-level-await": "^1.3.0",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
"vue-eslint-parser": "^9.1.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://pig4cloud.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">= 7.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"vue3",
|
||||
"vuejs/vue-next",
|
||||
"element-ui",
|
||||
"element-plus"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/log4j/pig"
|
||||
}
|
||||
}
|
||||
6
postcss.config.js
Normal file
6
postcss.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
1
public/WW_verify_RjJu9jrjUgALQSuK.txt
Normal file
1
public/WW_verify_RjJu9jrjUgALQSuK.txt
Normal file
@@ -0,0 +1 @@
|
||||
RjJu9jrjUgALQSuK
|
||||
BIN
public/assets/fonts/FontAwesome.otf
Normal file
BIN
public/assets/fonts/FontAwesome.otf
Normal file
Binary file not shown.
BIN
public/assets/fonts/fontawesome-webfont.eot
Normal file
BIN
public/assets/fonts/fontawesome-webfont.eot
Normal file
Binary file not shown.
2671
public/assets/fonts/fontawesome-webfont.svg
Normal file
2671
public/assets/fonts/fontawesome-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 434 KiB |
BIN
public/assets/fonts/fontawesome-webfont.ttf
Normal file
BIN
public/assets/fonts/fontawesome-webfont.ttf
Normal file
Binary file not shown.
BIN
public/assets/fonts/fontawesome-webfont.woff
Normal file
BIN
public/assets/fonts/fontawesome-webfont.woff
Normal file
Binary file not shown.
BIN
public/assets/fonts/fontawesome-webfont.woff2
Normal file
BIN
public/assets/fonts/fontawesome-webfont.woff2
Normal file
Binary file not shown.
4
public/assets/styles/font-awesome.min.css
vendored
Normal file
4
public/assets/styles/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
86
src/App.vue
Normal file
86
src/App.vue
Normal file
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<el-config-provider :size="getGlobalComponentSize" :locale="getGlobalI18n">
|
||||
<router-view v-show="setLockScreen" />
|
||||
<LockScreen v-if="themeConfig.isLockScreen" />
|
||||
<Setings ref="settingsRef" v-show="themeConfig.lockScreenTime > 1" />
|
||||
<CloseFull v-if="!themeConfig.isLockScreen" />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="app">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||
import other from '/@/utils/other';
|
||||
import { Local, Session } from '/@/utils/storage';
|
||||
import mittBus from '/@/utils/mitt';
|
||||
import setIntroduction from '/@/utils/setIconfont';
|
||||
|
||||
// 引入组件
|
||||
const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue'));
|
||||
const Setings = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/setings.vue'));
|
||||
const CloseFull = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/closeFull.vue'));
|
||||
|
||||
// 定义变量内容
|
||||
const { messages, locale } = useI18n();
|
||||
const settingsRef = ref();
|
||||
const route = useRoute();
|
||||
const stores = useTagsViewRoutes();
|
||||
const storesThemeConfig = useThemeConfig();
|
||||
const { themeConfig } = storeToRefs(storesThemeConfig);
|
||||
|
||||
// 设置锁屏时组件显示隐藏
|
||||
const setLockScreen = computed(() => {
|
||||
// 防止锁屏后,刷新出现不相关界面
|
||||
// https://gitee.com/lyt-top/vue-next-admin/issues/I6AF8P
|
||||
return themeConfig.value.isLockScreen ? themeConfig.value.lockScreenTime > 1 : themeConfig.value.lockScreenTime >= 0;
|
||||
});
|
||||
|
||||
// 获取全局组件大小
|
||||
const getGlobalComponentSize = computed(() => {
|
||||
return other.globalComponentSize();
|
||||
});
|
||||
// 获取全局 i18n
|
||||
const getGlobalI18n = computed(() => {
|
||||
return messages.value[locale.value];
|
||||
});
|
||||
// 设置初始化,防止刷新时恢复默认
|
||||
onBeforeMount(() => {
|
||||
// 设置批量第三方 icon 图标
|
||||
setIntroduction.cssCdn();
|
||||
// 设置批量第三方 js
|
||||
setIntroduction.jsCdn();
|
||||
});
|
||||
// 页面加载时
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
// 监听布局配'置弹窗点击打开
|
||||
mittBus.on('openSetingsDrawer', () => {
|
||||
settingsRef.value.openDrawer();
|
||||
});
|
||||
// 获取缓存中的布局配置
|
||||
if (Local.get('themeConfig')) {
|
||||
storesThemeConfig.setThemeConfig({ themeConfig: useThemeConfig().themeConfig });
|
||||
document.documentElement.style.cssText = Local.get('themeConfigStyle');
|
||||
}
|
||||
// 获取缓存中的全屏配置
|
||||
if (Session.get('isTagsViewCurrenFull')) {
|
||||
stores.setCurrenFullscreen(Session.get('isTagsViewCurrenFull'));
|
||||
}
|
||||
});
|
||||
});
|
||||
// 页面销毁时,关闭监听布局配置/i18n监听
|
||||
onUnmounted(() => {
|
||||
mittBus.off('openSetingsDrawer', () => {});
|
||||
});
|
||||
// 监听路由的变化,设置网站标题
|
||||
watch(
|
||||
() => route.path,
|
||||
() => {
|
||||
other.useTitle();
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
</script>
|
||||
24
src/api/admin/audit.ts
Normal file
24
src/api/admin/audit.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/audit/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/audit/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/audit/delete',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
68
src/api/admin/client.ts
Normal file
68
src/api/admin/client.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/client/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/client',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/client/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: object) {
|
||||
return request({
|
||||
url: '/admin/client',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/client',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/admin/client/sync',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
export function getDetails(obj: Object) {
|
||||
return request({
|
||||
url: '/admin/client/getClientDetailsById/' + obj,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function validateclientId(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
getDetails(value).then((res) => {
|
||||
const result = res.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('编号已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
64
src/api/admin/config.ts
Normal file
64
src/api/admin/config.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/system-config/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/system-config',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(obj: Object) {
|
||||
return request({
|
||||
url: '/admin/system-config/details',
|
||||
method: 'get',
|
||||
params: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function refreshObj() {
|
||||
return request({
|
||||
url: '/admin/system-config/refresh',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/system-config',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/system-config',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function validateExist(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObj({configKey: value}).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null && result.length > 0) {
|
||||
callback(new Error('数据已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
90
src/api/admin/dept.ts
Normal file
90
src/api/admin/dept.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export const deptTree = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/dept/tree',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
export const selectTreeCompanyTree = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/dept/selectTreeCompanyTree',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export const addObj = (obj: Object) => {
|
||||
return request({
|
||||
url: '/admin/dept',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export const getObj = (id: string) => {
|
||||
return request({
|
||||
url: '/admin/dept/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
export const delObj = (id: string) => {
|
||||
return request({
|
||||
url: '/admin/dept/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
};
|
||||
|
||||
export const putObj = (obj: Object) => {
|
||||
return request({
|
||||
url: '/admin/dept',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export const syncUser = () => {
|
||||
return request({
|
||||
url: '/admin/connect/sync/ding/user',
|
||||
method: 'post',
|
||||
});
|
||||
};
|
||||
|
||||
export const syncDept = () => {
|
||||
return request({
|
||||
url: '/admin/connect/sync/ding/dept',
|
||||
method: 'post',
|
||||
});
|
||||
};
|
||||
|
||||
export const syncCpUser = () => {
|
||||
return request({
|
||||
url: '/admin/connect/sync/cp/user',
|
||||
method: 'post',
|
||||
});
|
||||
};
|
||||
|
||||
export const syncCpDept = () => {
|
||||
return request({
|
||||
url: '/admin/connect/sync/cp/dept',
|
||||
method: 'post',
|
||||
});
|
||||
};
|
||||
|
||||
export const orgTree = (type: String, deptId: Number) => {
|
||||
return request({
|
||||
url: '/admin/dept/org',
|
||||
method: 'get',
|
||||
params: {type: type, parentDeptId: deptId},
|
||||
});
|
||||
}
|
||||
|
||||
export const orgTreeSearcheUser = (param: Object) => {
|
||||
return request({
|
||||
url: '/admin/dept/org/user/search',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
138
src/api/admin/dict.ts
Normal file
138
src/api/admin/dict.ts
Normal file
@@ -0,0 +1,138 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export const getDicts = (type: String) => {
|
||||
return request({
|
||||
url: `/admin/dict/type/${type}`,
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
export function fetchList(query: any) {
|
||||
return request({
|
||||
url: '/admin/dict/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchItemList(query: any) {
|
||||
return request({
|
||||
url: '/admin/dict/item/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addItemObj(obj: any) {
|
||||
return request({
|
||||
url: '/admin/dict/item',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getItemObj(id: string) {
|
||||
return request({
|
||||
url: '/admin/dict/item/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getItemDetails(obj: object) {
|
||||
return request({
|
||||
url: '/admin/dict/item/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delItemObj(id: string) {
|
||||
return request({
|
||||
url: '/admin/dict/item/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putItemObj(obj: any) {
|
||||
return request({
|
||||
url: '/admin/dict/item',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj: any) {
|
||||
return request({
|
||||
url: '/admin/dict',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id: string) {
|
||||
return request({
|
||||
url: '/admin/dict/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObjDetails(obj: object) {
|
||||
return request({
|
||||
url: '/admin/dict/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids: Object) {
|
||||
return request({
|
||||
url: '/admin/dict',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj: any) {
|
||||
return request({
|
||||
url: '/admin/dict',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/admin/dict/sync',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
export function validateDictType(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ dictType: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('字典已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validateDictItemLabel(rule: any, value: any, callback: any, type: string, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getItemDetails({ dictType: type, label: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('标签已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
92
src/api/admin/file.ts
Normal file
92
src/api/admin/file.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fileList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/sys-file/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sys-file',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/sys-file/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sys-file',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function fileGroupAdd(params: Record<string, any>) {
|
||||
return request({
|
||||
url: '/admin/sys-file/group/add',
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function fileGroupUpdate(params: Record<string, any>) {
|
||||
return request({
|
||||
url: '/admin/sys-file/group/update',
|
||||
method: 'put',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 文件分类删除
|
||||
export function fileGroupDelete(params: Record<string, any>) {
|
||||
return request({
|
||||
url: '/admin/sys-file/group/delete/' + params.id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 文件分类列表
|
||||
export function fileCateLists(params: Record<string, any>) {
|
||||
return request({
|
||||
url: '/admin/sys-file/group/list',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 文件删除
|
||||
export function fileDelete(params: Record<string, any>) {
|
||||
return request({
|
||||
url: '/admin/sys-file',
|
||||
method: 'delete',
|
||||
data: params.ids,
|
||||
});
|
||||
}
|
||||
|
||||
// 文件移动
|
||||
export function fileMove(params: Record<string, any>) {
|
||||
return request({
|
||||
url: '/admin/sys-file/group/move',
|
||||
method: 'put',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 文件重命名
|
||||
export function fileRename(params: { id: number; original: string }) {
|
||||
return request({
|
||||
url: '/admin/sys-file/rename',
|
||||
method: 'put',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
115
src/api/admin/i18n.ts
Normal file
115
src/api/admin/i18n.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
import request from '/@/utils/request';
|
||||
import axios from 'axios';
|
||||
import { decrypt } from '/@/utils/apiCrypto';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/i18n/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/i18n',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/i18n/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObjDetails(obj?: object) {
|
||||
return request({
|
||||
url: '/admin/i18n/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: object) {
|
||||
return request({
|
||||
url: '/admin/i18n',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/i18n',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/admin/i18n/sync',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 注意这里使用原声axios对象进行操作,request 实例中依赖i18n 所以还没有初始化会报错
|
||||
* @returns
|
||||
*/
|
||||
export function info() {
|
||||
return axios.get(import.meta.env.VITE_API_URL + '/admin/i18n/info').then((response) => {
|
||||
if (response.data.encryption) {
|
||||
response.data = decrypt(response.data.encryption);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
}
|
||||
|
||||
export function validateName(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ name: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('国际化编码已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validateZhCn(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ zhCn: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('国际化中文已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validateEn(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ en: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('国际化英文已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
26
src/api/admin/log.ts
Normal file
26
src/api/admin/log.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export const pageList = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/log/page',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export const delObj = (ids: object) => {
|
||||
return request({
|
||||
url: '/admin/log',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
export const getSum = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/log/sum',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
78
src/api/admin/menu.ts
Normal file
78
src/api/admin/menu.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export const pageList = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/menu/tree',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export const getObj = (obj: object) => {
|
||||
return request({
|
||||
url: `/admin/menu/details`,
|
||||
method: 'get',
|
||||
params: obj
|
||||
});
|
||||
};
|
||||
|
||||
export const save = (data: Object) => {
|
||||
return request({
|
||||
url: '/admin/menu',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
export const putObj = (data: Object) => {
|
||||
return request({
|
||||
url: '/admin/menu',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
export const addObj = (data: Object) => {
|
||||
return request({
|
||||
url: '/admin/menu',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
export const delObj = (id: string) => {
|
||||
return request({
|
||||
url: '/admin/menu/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 后端控制路由,isRequestRoutes 为 true,则开启后端控制路由
|
||||
* @method getAdminMenu 获取后端动态路由菜单(admin)
|
||||
*/
|
||||
export function useMenuApi() {
|
||||
return {
|
||||
getAdminMenu: (params?: object) => {
|
||||
return request({
|
||||
url: '/admin/menu',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function validateExist(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
getObj({[rule.field]: value}).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null && result.length > 0) {
|
||||
callback(new Error('数据已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
104
src/api/admin/message.ts
Normal file
104
src/api/admin/message.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchUserMessageReadList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/user/read/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function readUserMessage(params?: object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/read',
|
||||
method: 'post',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchUserMessageList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/user/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function sendObj(params?: object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/send',
|
||||
method: 'post',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function sendSms(params?: object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/send/sms',
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function sendEmail(params?: object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/send/email',
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function sendHook(params?: object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/send/webhook',
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function list(params?: object) {
|
||||
return request({
|
||||
url: '/admin/sysMessage/list/hook',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
92
src/api/admin/param.ts
Normal file
92
src/api/admin/param.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/param/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/param',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/param/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/param',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/param',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/admin/param/sync',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObjDetails(obj?: object) {
|
||||
return request({
|
||||
url: '/admin/param/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getValue(key?: String) {
|
||||
return request({
|
||||
url: '/admin/param/publicValue/' + key,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
export function validateParamsCode(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({publicKey: value}).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('参数编码已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validateParamsName(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({publicName: value}).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('参数名称已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
86
src/api/admin/post.ts
Normal file
86
src/api/admin/post.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/post/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export const list = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/post/list',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/post',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/post/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObjDetails(obj?: object) {
|
||||
return request({
|
||||
url: '/admin/post/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: object) {
|
||||
return request({
|
||||
url: '/admin/post',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/post',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function validatePostName(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ postName: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('岗位名称已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validatePostCode(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ postCode: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('岗位编码已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
111
src/api/admin/role.ts
Normal file
111
src/api/admin/role.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export const list = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/role/list',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export const pageList = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/role/page',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export const deptRoleList = () => {
|
||||
return request({
|
||||
url: '/admin/role/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
export const getObj = (id: string) => {
|
||||
return request({
|
||||
url: '/admin/role/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
export const getObjDetails = (obj: object) => {
|
||||
return request({
|
||||
url: '/admin/role/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export const addObj = (obj: Object) => {
|
||||
return request({
|
||||
url: '/admin/role',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export const putObj = (obj: Object) => {
|
||||
return request({
|
||||
url: '/admin/role',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export const delObj = (ids: Object) => {
|
||||
return request({
|
||||
url: '/admin/role',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
};
|
||||
|
||||
export const permissionUpd = (roleId: string, menuIds: string) => {
|
||||
return request({
|
||||
url: '/admin/role/menu',
|
||||
method: 'put',
|
||||
data: {
|
||||
roleId: roleId,
|
||||
menuIds: menuIds,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export const fetchRoleTree = (roleId: string) => {
|
||||
return request({
|
||||
url: '/admin/menu/tree/' + roleId,
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
export function validateRoleCode(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ roleCode: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('角色标识已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validateRoleName(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ roleName: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('角色名称已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
38
src/api/admin/route.ts
Normal file
38
src/api/admin/route.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export const fetchList = (query?: Object) => {
|
||||
return request({
|
||||
url: '/admin/route',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
};
|
||||
|
||||
export const addObj = (obj?: object) => {
|
||||
return request({
|
||||
url: '/admin/route',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export const deleteObj = (routeId?: string) => {
|
||||
return request({
|
||||
url: '/admin/route/' + routeId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
export function validateExist(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
fetchList({[rule.field]: value}).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null && result.length > 0) {
|
||||
callback(new Error('数据已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
48
src/api/admin/schedule.ts
Normal file
48
src/api/admin/schedule.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/schedule/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function list(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/schedule/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/schedule',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/schedule/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/schedule',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/schedule',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
71
src/api/admin/sensitive.ts
Normal file
71
src/api/admin/sensitive.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysSensitiveWord/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysSensitiveWord',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(obj: Object) {
|
||||
return request({
|
||||
url: '/admin/sysSensitiveWord/details',
|
||||
method: 'get',
|
||||
params: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function refreshObj() {
|
||||
return request({
|
||||
url: '/admin/sysSensitiveWord/refresh',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysSensitiveWord',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysSensitiveWord',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function testObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysSensitiveWord/match',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function validateWord(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObj({ sensitiveWord: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('敏感词已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
47
src/api/admin/social.ts
Normal file
47
src/api/admin/social.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/social/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/social',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/social/getById/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/social',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/social',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getLoginAppList(id?: string) {
|
||||
return request({
|
||||
url: '/admin/social/getLoginAppList',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
63
src/api/admin/sysArea.ts
Normal file
63
src/api/admin/sysArea.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function fetchTree(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysArea/tree',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysArea/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysArea',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(query?: Object,) {
|
||||
return request({
|
||||
url: '/admin/sysArea/details',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysArea',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/sysArea',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function validateExist(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
getObj({ [rule.field] : value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null && result.length > 0) {
|
||||
callback(new Error('数据已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
9
src/api/admin/system.ts
Normal file
9
src/api/admin/system.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
// 系统缓存监控
|
||||
export function systemCache() {
|
||||
return request({
|
||||
url: '/admin/system/cache',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
93
src/api/admin/tenant.ts
Normal file
93
src/api/admin/tenant.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchPage(query?: Object) {
|
||||
return request({
|
||||
url: '/admin/tenant/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchList(query?: object) {
|
||||
return request({
|
||||
url: '/admin/tenant/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/tenant',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/admin/tenant/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObjDetails(obj?: object) {
|
||||
return request({
|
||||
url: '/admin/tenant/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: Object) {
|
||||
return request({
|
||||
url: '/admin/tenant',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/admin/tenant',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function validateTenantName(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ name: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('租户名称已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validateTenantCode(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ code: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('租户编码已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function treemenu() {
|
||||
return request({
|
||||
url: '/admin/tenant/tree/menu',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
17
src/api/admin/token.ts
Normal file
17
src/api/admin/token.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query: object) {
|
||||
return request({
|
||||
url: '/admin/sys-token/page',
|
||||
method: 'post',
|
||||
data: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(accessTokens: string[]) {
|
||||
return request({
|
||||
url: '/admin/sys-token/delete',
|
||||
method: 'delete',
|
||||
data: accessTokens,
|
||||
});
|
||||
}
|
||||
145
src/api/admin/user.ts
Normal file
145
src/api/admin/user.ts
Normal file
@@ -0,0 +1,145 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export const list = () => {
|
||||
return request({
|
||||
url: '/admin/user/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
export const pageList = (params?: Object) => {
|
||||
return request({
|
||||
url: '/admin/user/page',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
export const addObj = (obj: Object) => {
|
||||
return request({
|
||||
url: '/admin/user',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export const getObj = (id: String) => {
|
||||
return request({
|
||||
url: '/admin/user/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
export const delObj = (ids: Object) => {
|
||||
return request({
|
||||
url: '/admin/user',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
};
|
||||
|
||||
export const putObj = (obj: Object) => {
|
||||
return request({
|
||||
url: '/admin/user',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
export function getDetails(obj: Object) {
|
||||
return request({
|
||||
url: '/admin/user/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
// 更改个人信息
|
||||
export function editInfo(obj: Object) {
|
||||
return request({
|
||||
url: '/admin/user/personal/edit',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
// 更改个人密码
|
||||
export function password(obj: Object) {
|
||||
return request({
|
||||
url: '/admin/user/personal/password',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function unbindingUser(type) {
|
||||
return request({
|
||||
url: '/admin/user/unbinding',
|
||||
method: 'post',
|
||||
params: {
|
||||
type,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function checkPassword(password: string) {
|
||||
return request({
|
||||
url: '/admin/user/check',
|
||||
method: 'post',
|
||||
params: {
|
||||
password,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册用户
|
||||
*/
|
||||
export const registerUser = (userInfo: object) => {
|
||||
return request({
|
||||
url: '/admin/register/user',
|
||||
method: 'post',
|
||||
data: userInfo,
|
||||
});
|
||||
};
|
||||
|
||||
export const resetUserPassword = (userInfo: object) => {
|
||||
return request({
|
||||
url: '/admin/register/password',
|
||||
method: 'post',
|
||||
data: userInfo,
|
||||
});
|
||||
};
|
||||
|
||||
export function validateUsername(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
const flag = new RegExp(/^([a-z\d]+?)$/).test(value);
|
||||
if (!flag) {
|
||||
callback(new Error('用户名支持小写英文、数字'));
|
||||
}
|
||||
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getDetails({ username: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('用户名已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validatePhone(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
getDetails({ phone: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('手机号已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
40
src/api/app/appArticle.ts
Normal file
40
src/api/app/appArticle.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticle/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticle',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: `/app/appArticle/details/${id}/1`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticle',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticle',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
47
src/api/app/appArticleCategory.ts
Normal file
47
src/api/app/appArticleCategory.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticleCategory/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticleCategory',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/app/appArticleCategory/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObjList() {
|
||||
return request({
|
||||
url: '/app/appArticleCategory/list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticleCategory',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appArticleCategory',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
113
src/api/app/approle.ts
Normal file
113
src/api/app/approle.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query: any) {
|
||||
return request({
|
||||
url: '/app/approle/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function list() {
|
||||
return request({
|
||||
url: '/app/approle/list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj: any) {
|
||||
return request({
|
||||
url: '/app/approle',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id: string) {
|
||||
return request({
|
||||
url: '/app/approle/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: object) {
|
||||
return request({
|
||||
url: '/app/approle',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj: any) {
|
||||
return request({
|
||||
url: '/app/approle',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchRoleTree(roleId: string) {
|
||||
return request({
|
||||
url: '/app/appmenu/tree/' + roleId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function permissionUpd(roleId: string, menuIds: string) {
|
||||
return request({
|
||||
url: '/app/approle/menu',
|
||||
method: 'put',
|
||||
data: {
|
||||
roleId: roleId,
|
||||
menuIds: menuIds,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function getDetails(obj: Object) {
|
||||
return request({
|
||||
url: '/app/approle/details/' + obj,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getDetailsByCode(obj: Object) {
|
||||
return request({
|
||||
url: '/app/approle/detailsByCode/' + obj,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function validateApproleName(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
const flag = new RegExp(/^([a-z\u4e00-\u9fa5\d]+?)$/).test(value);
|
||||
if (!flag) {
|
||||
callback(new Error('用户名支持小写英文、数字、中文'));
|
||||
}
|
||||
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getDetails(value).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('用户名已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validateAppRoleCode(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
getDetailsByCode(value).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('角色标识已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
39
src/api/app/approlemenu.ts
Normal file
39
src/api/app/approlemenu.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query: any) {
|
||||
return request({
|
||||
url: '/app/approlemenu/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj: any) {
|
||||
return request({
|
||||
url: '/app/approlemenu',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id: string) {
|
||||
return request({
|
||||
url: '/app/approlemenu/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(id: string) {
|
||||
return request({
|
||||
url: '/app/approlemenu/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj: string) {
|
||||
return request({
|
||||
url: '/app/approlemenu',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
40
src/api/app/appsocial.ts
Normal file
40
src/api/app/appsocial.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/app/appsocial/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appsocial',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/app/appsocial/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: object) {
|
||||
return request({
|
||||
url: '/app/appsocial',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appsocial',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
86
src/api/app/appuser.ts
Normal file
86
src/api/app/appuser.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query: any) {
|
||||
return request({
|
||||
url: '/app/appuser/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj: any) {
|
||||
return request({
|
||||
url: '/app/appuser',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id: string) {
|
||||
return request({
|
||||
url: '/app/appuser/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: object) {
|
||||
return request({
|
||||
url: '/app/appuser',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj: any) {
|
||||
return request({
|
||||
url: '/app/appuser',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getDetails(obj: Object) {
|
||||
return request({
|
||||
url: '/app/appuser/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function validateUsername(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
const flag = new RegExp(/^([a-z\d]+?)$/).test(value);
|
||||
if (!flag) {
|
||||
callback(new Error('用户名支持小写英文、数字'));
|
||||
}
|
||||
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getDetails({
|
||||
username: value,
|
||||
}).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('用户名已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function validatePhone(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
getDetails({
|
||||
phone: value,
|
||||
}).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('手机号已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
39
src/api/app/appuserrole.ts
Normal file
39
src/api/app/appuserrole.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query: any) {
|
||||
return request({
|
||||
url: '/app/appuserrole/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj: any) {
|
||||
return request({
|
||||
url: '/app/appuserrole',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id: string) {
|
||||
return request({
|
||||
url: '/app/appuserrole/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(id: string) {
|
||||
return request({
|
||||
url: '/app/appuserrole/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj: any) {
|
||||
return request({
|
||||
url: '/app/appuserrole',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
40
src/api/app/page.ts
Normal file
40
src/api/app/page.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/app/page/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appPage',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/app/appPage/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/app/page',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appPage',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
40
src/api/app/tabbar.ts
Normal file
40
src/api/app/tabbar.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/app/appTabbar/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appTabbar',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/app/appTabbar/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/app/appTabbar',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/app/appTabbar',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
53
src/api/common/index.ts
Normal file
53
src/api/common/index.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from "/@/utils/request";
|
||||
///admin/reserveInvestmentProjects/userDeptBelong 判断发起人单位归属-项目储备
|
||||
export function getUserDeptBelong() {
|
||||
return request({
|
||||
url: '/admin/reserveInvestmentProjects/userDeptBelong',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// /admin/externalCooperationUnits/userDeptBelong 判断发起人单位归属-外协单位
|
||||
export function getExternalCooperationUnitsUserDeptBelong() {
|
||||
return request({
|
||||
url: '/admin/externalCooperationUnits/userDeptBelong',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// /admin/mixedReform/userBelong 判断发起人单位归属-混合整改
|
||||
export function getMixedReformUserBelong() {
|
||||
return request({
|
||||
url: '/admin/mixedReform/userBelong',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// /admin/propertyRights/userDeptBelong 判断发起人单位归属-产权管理
|
||||
export function getPropertyRightsUserDeptBelong() {
|
||||
return request({
|
||||
url: '/admin/propertyRights/userDeptBelong',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// /admin/investmentProjectsPlan/getByProcessInstanceId 根据流程实例id查询
|
||||
export function getInvestmentProjectsPlanByProcessInstanceId(processInstanceId:string) {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: { processInstanceId },
|
||||
});
|
||||
}
|
||||
// 添加模板 /admin/templateManagement/add
|
||||
export function addTemplate(data:{templateName:string,templateType:number}) {
|
||||
return request({
|
||||
url: '/admin/templateManagement/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// /admin/committeeApplication/getByProcessInstanceId 根据流程实例id查询 投资与资源利用专委会申请
|
||||
export function getCommitteeApplicationByProcessInstanceId(processInstanceId:string) {
|
||||
return request({
|
||||
url: '/admin/committeeApplication/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: { processInstanceId },
|
||||
})
|
||||
}
|
||||
51
src/api/config/institutionalCenter/index.ts
Normal file
51
src/api/config/institutionalCenter/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '/@/utils/request';
|
||||
import type { CompanyPolicyAddReq, CompanyPolicyPageReq } from './types';
|
||||
|
||||
/**
|
||||
* 分页查询制度文件
|
||||
* POST /admin/companyPolicies/page
|
||||
*/
|
||||
export function fetchCompanyPoliciesPage(query?: CompanyPolicyPageReq) {
|
||||
if (query) {
|
||||
query.page = (query as any).current
|
||||
}
|
||||
return request({
|
||||
url: '/admin/companyPolicies/page',
|
||||
method: 'post',
|
||||
data: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加制度文件
|
||||
* POST /admin/companyPolicies/add
|
||||
*/
|
||||
export function addCompanyPolicy(obj?: CompanyPolicyAddReq) {
|
||||
return request({
|
||||
url: '/admin/companyPolicies/add',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载次数统计(或登记下载)
|
||||
* PUT /admin/companyPolicies/downloadNum
|
||||
*/
|
||||
export function downloadCompanyPolicyCount(id?: string | number) {
|
||||
return request({
|
||||
url: '/admin/companyPolicies/downloadNum?id=' + id,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除制度文件
|
||||
* DELETE /admin/companyPolicies/delete
|
||||
*/
|
||||
export function deleteCompanyPolicies(id?: string) {
|
||||
return request({
|
||||
url: '/admin/companyPolicies/delete?id=' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
33
src/api/config/institutionalCenter/types.ts
Normal file
33
src/api/config/institutionalCenter/types.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export interface CompanyPolicyItem {
|
||||
id?: number | string;
|
||||
attachmentName?: string;
|
||||
downloadNum?: number | string;
|
||||
attachmentUrl?: string;
|
||||
createBy?: string;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
export interface CompanyPolicyPageReq {
|
||||
page: number;
|
||||
size: number;
|
||||
attachmentName?: string;
|
||||
}
|
||||
|
||||
export interface CompanyPolicyAddReq {
|
||||
attachmentName: string;
|
||||
attachmentUrl: string;
|
||||
}
|
||||
|
||||
export interface CompanyPolicyPageRes {
|
||||
size: number;
|
||||
records: CompanyPolicyItem[];
|
||||
total: number;
|
||||
current: number;
|
||||
pages: number;
|
||||
}
|
||||
|
||||
export type CompanyPolicyPageResponse = {
|
||||
code: number;
|
||||
msg?: string;
|
||||
data?: CompanyPolicyPageRes;
|
||||
};
|
||||
49
src/api/config/projectReviewPolicy/index.ts
Normal file
49
src/api/config/projectReviewPolicy/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import request from '/@/utils/request';
|
||||
import type { ProjectReviewPolicy, ProjectReviewPolicyPageReq } from './types';
|
||||
|
||||
/**
|
||||
* 分页查询投后评价策略
|
||||
* POST /admin/projectReviewPolicy/page
|
||||
*/
|
||||
export function fetchProjectReviewPolicyPage(query?: ProjectReviewPolicyPageReq) {
|
||||
return request({
|
||||
url: '/admin/projectReviewPolicy/page',
|
||||
method: 'post',
|
||||
data: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加投后评价策略
|
||||
* POST /admin/projectReviewPolicy/add
|
||||
*/
|
||||
export function addProjectReviewPolicy(data?: ProjectReviewPolicy) {
|
||||
return request({
|
||||
url: '/admin/projectReviewPolicy/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改投后评价策略
|
||||
* PUT /admin/projectReviewPolicy/update
|
||||
*/
|
||||
export function updateProjectReviewPolicy(data?: ProjectReviewPolicy) {
|
||||
return request({
|
||||
url: '/admin/projectReviewPolicy/update',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除投后评价策略
|
||||
* DELETE /admin/projectReviewPolicy/delete
|
||||
*/
|
||||
export function deleteProjectReviewPolicy(id?: string) {
|
||||
return request({
|
||||
url: '/admin/projectReviewPolicy/delete?id=' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
28
src/api/config/projectReviewPolicy/types.ts
Normal file
28
src/api/config/projectReviewPolicy/types.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
export interface ProjectReviewPolicy {
|
||||
id?: number | string;
|
||||
projectType?: string; // 项目类型
|
||||
finalReminderPeriod?: number; // 最终提醒期限的数值
|
||||
finalReminderUnit?: string; // 最终提醒期限单位
|
||||
advanceReminderPeriod?: number; // 提前提醒的数值
|
||||
advanceReminderUnit?: string; // 提前提醒单位
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
export interface ProjectReviewPolicyPageReq {
|
||||
page: number;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export interface ProjectReviewPolicyPageRes {
|
||||
size: number;
|
||||
records: ProjectReviewPolicy[];
|
||||
total: number;
|
||||
current: number;
|
||||
pages: number;
|
||||
}
|
||||
|
||||
export type ProjectReviewPolicyPageResponse = {
|
||||
code: number;
|
||||
msg?: string;
|
||||
data?: ProjectReviewPolicyPageRes;
|
||||
};
|
||||
28
src/api/config/templateManage/index.ts
Normal file
28
src/api/config/templateManage/index.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '/@/utils/request';
|
||||
import type { TemplatePageReq } from './types';
|
||||
|
||||
/**
|
||||
* 分页查询模板
|
||||
* POST /admin/templateManagement/page
|
||||
*/
|
||||
export function fetchTemplatesPage(query?: TemplatePageReq) {
|
||||
if (query) {
|
||||
query.page = (query as any).current
|
||||
}
|
||||
return request({
|
||||
url: '/admin/templateManagement/page',
|
||||
method: 'post',
|
||||
data: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模板
|
||||
* DELETE /admin/templateManagement/delete
|
||||
*/
|
||||
export function deleteTemplate(id?: string) {
|
||||
return request({
|
||||
url: '/admin/templateManagement/delete?id=' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
26
src/api/config/templateManage/types.ts
Normal file
26
src/api/config/templateManage/types.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
export interface TemplateItem {
|
||||
id?: number | string;
|
||||
templateName?: string;
|
||||
templateType?: string;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
export interface TemplatePageReq {
|
||||
page: number;
|
||||
size: number;
|
||||
templateName?: string;
|
||||
}
|
||||
|
||||
export interface TemplatePageRes {
|
||||
size: number;
|
||||
records: TemplateItem[];
|
||||
total: number;
|
||||
current: number;
|
||||
pages: number;
|
||||
}
|
||||
|
||||
export type TemplatePageResponse = {
|
||||
code: number;
|
||||
msg?: string;
|
||||
data?: TemplatePageRes;
|
||||
};
|
||||
17
src/api/daemon/job-log.ts
Normal file
17
src/api/daemon/job-log.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query: any) {
|
||||
return request({
|
||||
url: '/job/sys-job-log/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids: object) {
|
||||
return request({
|
||||
url: '/job/sys-job-log',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
74
src/api/daemon/job.ts
Normal file
74
src/api/daemon/job.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/job/sys-job/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/job/sys-job',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/job/sys-job/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(id?: string) {
|
||||
return request({
|
||||
url: '/job/sys-job/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/job/sys-job',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function startJobRa(jobId: string) {
|
||||
return request({
|
||||
url: '/job/sys-job/start-job/' + jobId,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
export function runJobRa(jobId: string) {
|
||||
return request({
|
||||
url: '/job/sys-job/run-job/' + jobId,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
export function shutDownJobRa(jobId: string) {
|
||||
return request({
|
||||
url: '/job/sys-job/shutdown-job/' + jobId,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
export function validateJob(rule: any, value: any, callback: any, form: any) {
|
||||
request({
|
||||
url: '/job/sys-job/validate',
|
||||
method: 'get',
|
||||
params: Object.assign(form, { field: rule.field }),
|
||||
}).then(({ data }) => {
|
||||
if (data) {
|
||||
callback(new Error(data));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
145
src/api/flow/flow/index.ts
Normal file
145
src/api/flow/flow/index.ts
Normal file
@@ -0,0 +1,145 @@
|
||||
import { FlowFormVO } from './types';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
/**
|
||||
* 创建流程
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function addFlow(data: any) {
|
||||
return request({
|
||||
url: '/task/process/create',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流程详细信息
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function getFlowDetail(flowId: string) {
|
||||
return request({
|
||||
url: '/task/process/getDetail',
|
||||
method: 'get',
|
||||
params: {flowId},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用流程
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function disableFlow(flowId: string) {
|
||||
return request({
|
||||
url: '/task/process/update/' + flowId + '?type=stop',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function deleteFlow(flowId: string) {
|
||||
return request({
|
||||
url: '/task/process/update/' + flowId + '?type=delete',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用流程
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function enableFlow(flowId: string) {
|
||||
return request({
|
||||
url: '/task/process/update/' + flowId + '?type=using',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起流程
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function startFlow(obj: any) {
|
||||
return request({
|
||||
url: '/task/process-instance/startProcessInstance',
|
||||
method: 'post',
|
||||
data: {...obj},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起流程时附加的表单数据
|
||||
*/
|
||||
export function addFlowForm(obj: FlowFormVO) {
|
||||
return request({
|
||||
url: '/task/flow/form/add',
|
||||
method: 'post',
|
||||
data: {...obj},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起流程时附加的表单数据
|
||||
*/
|
||||
export function getFlowFormByProcessInstanceId(processInstanceId: string) {
|
||||
return request({
|
||||
url: '/task/flow/form/view',
|
||||
method: 'get',
|
||||
params: { processInstanceId },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发起流程时附加的表单数据
|
||||
*/
|
||||
export function getTaskDetail(processInstanceId: string) {
|
||||
return request({
|
||||
url: '/task/process-instance/getTaskDetail',
|
||||
method: 'get',
|
||||
params: { processInstanceId },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 根据流程实例id查询
|
||||
* 项目储备审核数据
|
||||
* /admin/reserveInvestmentProjects/getByProcessInstanceId
|
||||
* */
|
||||
export function getReserveInvestmentProjectsByProcessInstanceId(processInstanceId: string) {
|
||||
return request({
|
||||
url: '/admin/reserveInvestmentProjects/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: { processInstanceId },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 根据流程实例id查询
|
||||
* 对外合作
|
||||
* /admin/externalCooperationUnits/getByProcessInstanceId
|
||||
* */
|
||||
export function getExternalCooperationUnitsByProcessInstanceId(processInstanceId: string) {
|
||||
return request({
|
||||
url: '/admin/externalCooperationUnits/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: { processInstanceId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务流程ID列表
|
||||
* */
|
||||
export function getBusinessFlowList() {
|
||||
return request<{ id: number, flowId: string }[]>({
|
||||
url: '/task/task/getBusinessFlowList',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
28
src/api/flow/flow/types.ts
Normal file
28
src/api/flow/flow/types.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 菜单视图对象类型
|
||||
*/
|
||||
export interface FlowVO {
|
||||
stop?: boolean;
|
||||
updated?: string;
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
formId?: string;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
formName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起流程时附加的表单数据
|
||||
*/
|
||||
export interface FlowFormVO {
|
||||
id?: number,
|
||||
title: string,
|
||||
description: string,
|
||||
attachments: string,
|
||||
processInstanceId: string,
|
||||
flowType: number
|
||||
}
|
||||
63
src/api/flow/group/index.ts
Normal file
63
src/api/flow/group/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '/@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { Group, GroupVO } from './types';
|
||||
|
||||
/**
|
||||
* 添加分组
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function addGroup(data: Group) {
|
||||
return request({
|
||||
url: '/task/processGroup/create',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分组
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function delGroup(id: number) {
|
||||
return request({
|
||||
url: '/task/processGroup/delete/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分组列表
|
||||
*/
|
||||
|
||||
export function queryGroupList(): AxiosPromise<GroupVO[]> {
|
||||
return request({
|
||||
url: '/task/processGroup/list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分组和流程列表
|
||||
*/
|
||||
|
||||
export function queryGroupFlowList(params?: Object) {
|
||||
return request({
|
||||
url: '/task/combination/group/listGroupWithProcess',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我可发起的组和流程
|
||||
*/
|
||||
|
||||
export function queryMineStartGroupFlowList(hidden?: string): AxiosPromise<GroupVO[]> {
|
||||
return request({
|
||||
url: '/task/combination/group/listCurrentUserStartGroup',
|
||||
method: 'get',
|
||||
params: { hidden: hidden },
|
||||
});
|
||||
}
|
||||
27
src/api/flow/group/types.ts
Normal file
27
src/api/flow/group/types.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { FlowVO } from '/@/api/flow/flow/types';
|
||||
|
||||
/**
|
||||
* 菜单查询参数类型
|
||||
*/
|
||||
export interface Group {
|
||||
groupName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单视图对象类型
|
||||
*/
|
||||
export interface GroupVO {
|
||||
/**
|
||||
* 子菜单
|
||||
*/
|
||||
items?: FlowVO[];
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
10
src/api/flow/processInstance/index.ts
Normal file
10
src/api/flow/processInstance/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
// 流程详情
|
||||
export function detail(param: any) {
|
||||
return request({
|
||||
url: '/task/process-instance/detail',
|
||||
method: 'get',
|
||||
params: param,
|
||||
});
|
||||
}
|
||||
115
src/api/flow/task/index.ts
Normal file
115
src/api/flow/task/index.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
// 查询用户首页数据看板
|
||||
export function queryTaskData() {
|
||||
return request({
|
||||
url: '/task/task/queryTaskData',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询抄送详细信息
|
||||
export function queryMineCCDetail(param: any) {
|
||||
return request({
|
||||
url: '/task/processCopy/querySingleDetail',
|
||||
method: 'get',
|
||||
params: param,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 抄送给我的
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function queryMineCC(data: any) {
|
||||
return request({
|
||||
url: '/task/process-instance/queryMineCC',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待办任务
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function queryMineTask(data: any) {
|
||||
return request({
|
||||
url: '/task/process-instance/queryMineTask',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 结束流程
|
||||
export function stopProcessInstance(param: any) {
|
||||
return request({
|
||||
url: '/task/task/stopProcessInstance',
|
||||
method: 'post',
|
||||
data: param,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我发起的任务
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function queryMineStarted(data: any) {
|
||||
return request({
|
||||
url: '/task/process-instance/queryMineStarted',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询当前用户已办任务
|
||||
export function queryMineEndTask(param) {
|
||||
return request({
|
||||
url: '/task/process-instance/queryMineEndTask',
|
||||
method: 'post',
|
||||
data: param,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务详细信息
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function queryTask(taskId: string, view: boolean) {
|
||||
return request({
|
||||
url: '/task/task/queryTask',
|
||||
method: 'get',
|
||||
params: {taskId, view},
|
||||
});
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function completeTask(param: Object) {
|
||||
return request({
|
||||
url: '/task/task/completeTask',
|
||||
method: 'post',
|
||||
data: param,
|
||||
});
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function transferTask(param: Object) {
|
||||
return request({
|
||||
url: '/task/task/setAssignee',
|
||||
method: 'post',
|
||||
data: param,
|
||||
});
|
||||
}
|
||||
|
||||
// 格式化流程节点显示
|
||||
export function formatStartNodeShow(param: Object) {
|
||||
return request({
|
||||
url: '/task/process-instance/formatStartNodeShow',
|
||||
method: 'post',
|
||||
data: {paramMap:{},...param,},
|
||||
});
|
||||
}
|
||||
55
src/api/gen/create-table.ts
Normal file
55
src/api/gen/create-table.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/create-table/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/create-table',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function tempStore(obj: any) {
|
||||
return request({
|
||||
url: '/gen/create-table/temp-store',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(id: any) {
|
||||
return request({
|
||||
url: '/gen/create-table/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObj(id: any) {
|
||||
return request({
|
||||
url: '/gen/create-table/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/gen/create-table',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/create-table',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
56
src/api/gen/datasource.ts
Normal file
56
src/api/gen/datasource.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/dsconf/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function list(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/dsconf/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function listTable(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/dsconf/table/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/dsconf',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/gen/dsconf/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: Object) {
|
||||
return request({
|
||||
url: '/gen/dsconf',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/dsconf',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
71
src/api/gen/fieldtype.ts
Normal file
71
src/api/gen/fieldtype.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/fieldtype/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function list(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/fieldtype/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/fieldtype',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/gen/fieldtype/details/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObjDetails(obj?: object) {
|
||||
return request({
|
||||
url: '/gen/fieldtype/details',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(ids?: object) {
|
||||
return request({
|
||||
url: '/gen/fieldtype',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/fieldtype',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function validateColumnType(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||
if (isEdit) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
getObjDetails({ columnType: value }).then((response) => {
|
||||
const result = response.data;
|
||||
if (result !== null) {
|
||||
callback(new Error('类型已经存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
47
src/api/gen/group.ts
Normal file
47
src/api/gen/group.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/group/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/group',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/gen/group/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/gen/group',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/group',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function list() {
|
||||
return request({
|
||||
url: '/gen/group/list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
128
src/api/gen/table.ts
Normal file
128
src/api/gen/table.ts
Normal file
@@ -0,0 +1,128 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/table/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/table',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/gen/table/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(id?: string) {
|
||||
return request({
|
||||
url: '/gen/table/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/table',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export const useSyncTableApi = (dsName: string, tableName: string) => {
|
||||
return request.get('/gen/table/sync/' + dsName + '/' + tableName);
|
||||
};
|
||||
|
||||
export const useTableApi = (dsName: string, tableName: string) => {
|
||||
return request.get('/gen/table/' + dsName + '/' + tableName);
|
||||
};
|
||||
|
||||
export const useListTableApi = (dsName: string) => {
|
||||
return request.get('/gen/table/list/' + dsName);
|
||||
};
|
||||
|
||||
export const useListTableColumnApi = (dsName: string, tableName: string) => {
|
||||
return request.get('/gen/table/column/' + dsName + '/' + tableName);
|
||||
};
|
||||
|
||||
export const useTableFieldSubmitApi = (dsName: string, tableName: string, fieldList: any) => {
|
||||
return request.put('/gen/table/field/' + dsName + '/' + tableName, fieldList);
|
||||
};
|
||||
|
||||
export const useGeneratorCodeApi = (tableIds: any) => {
|
||||
return request({
|
||||
url: '/gen/generator/code',
|
||||
method: 'get',
|
||||
params: { tableIds: tableIds },
|
||||
});
|
||||
};
|
||||
|
||||
export const useGeneratorVFormApi = (dsName: any, tableName: any) => {
|
||||
return request({
|
||||
url: '/gen/generator/vform',
|
||||
method: 'get',
|
||||
params: { dsName: dsName, tableName: tableName },
|
||||
});
|
||||
};
|
||||
|
||||
export const useGeneratorVFormSfcApi = (id: string) => {
|
||||
return request({
|
||||
url: '/gen/generator/vform/sfc',
|
||||
method: 'get',
|
||||
params: { formId: id },
|
||||
});
|
||||
};
|
||||
|
||||
export const useGeneratorPreviewApi = (tableId: any) => {
|
||||
return request({
|
||||
url: '/gen/generator/preview',
|
||||
method: 'get',
|
||||
params: { tableId: tableId },
|
||||
});
|
||||
};
|
||||
|
||||
export function fetchDictList() {
|
||||
return request({
|
||||
url: '/admin/dict/list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function useFormConfSaveApi(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/form',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchFormList(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/form/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchFormById(id?: string) {
|
||||
return request({
|
||||
url: '/gen/form/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delFormObj(id?: string) {
|
||||
return request({
|
||||
url: '/gen/form/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
61
src/api/gen/template.ts
Normal file
61
src/api/gen/template.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/gen/template/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function list() {
|
||||
return request({
|
||||
url: '/gen/template/list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function online() {
|
||||
return request({
|
||||
url: '/gen/template/online',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function checkVersion() {
|
||||
return request({
|
||||
url: '/gen/template/checkVersion',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/template',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/gen/template/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/gen/template',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/gen/template',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
12
src/api/h5/expert.ts
Normal file
12
src/api/h5/expert.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import request from "/@/utils/request";
|
||||
// 根据流程实例id查询专家信息
|
||||
// /admin/expertInformation/getByProcessInstanceId
|
||||
export const getByProcessInstanceId = (processInstanceId: any) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: {
|
||||
processInstanceId
|
||||
}
|
||||
});
|
||||
}
|
||||
45
src/api/investment/committeeApplication.ts
Normal file
45
src/api/investment/committeeApplication.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import request from '/@/utils/request';
|
||||
import { paramsData, ProjectExitFeedback } from '/@/views/invMid/committeeReview/interface/type';
|
||||
|
||||
// 新增投资与资源利用专委会申请
|
||||
export function addCommitteeApplication(data: ProjectExitFeedback) {
|
||||
return request({
|
||||
url: '/admin/committeeApplication/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 列表
|
||||
// /admin/committeeApplication/page
|
||||
export function getCommitteeApplicationPage(data: paramsData) {
|
||||
return request({
|
||||
url: '/admin/committeeApplication/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 查看
|
||||
// /admin/committeeApplication/view
|
||||
export function getCommitteeApplicationView(id: number) {
|
||||
return request({
|
||||
url: `/admin/committeeApplication/view`,
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 根据流程实例id查询
|
||||
export function getByProcessInstanceId(processInstanceId: string) {
|
||||
return request({
|
||||
url: `/admin/committeeApplication/getByProcessInstanceId`,
|
||||
method: 'get',
|
||||
params: { processInstanceId }
|
||||
})
|
||||
}
|
||||
// 根据模板id查询
|
||||
export function getByTemplateId(templateId: string) {
|
||||
return request({
|
||||
url: `/admin/committeeApplication/getByTemplate`,
|
||||
method: 'get',
|
||||
params: { templateId }
|
||||
})
|
||||
}
|
||||
329
src/api/investment/cooperationUnit.ts
Normal file
329
src/api/investment/cooperationUnit.ts
Normal file
@@ -0,0 +1,329 @@
|
||||
import request from '/@/utils/request';
|
||||
import type {
|
||||
CooperationUnitFormT,
|
||||
CooperationUnitQueryT,
|
||||
CooperationUnitPageT,
|
||||
CooperationUnitDetailT,
|
||||
} from '/@/views/investment/cooperationUnit/interface/types';
|
||||
import { startFlow } from '/@/api/flow/flow/index'
|
||||
|
||||
/**
|
||||
* 获取对外合作单位登记分页列表
|
||||
* @param query 查询参数
|
||||
* @returns 返回分页数据
|
||||
*/
|
||||
export const getCooperationUnitPageAPI = (query?: CooperationUnitQueryT) => {
|
||||
return request<CooperationUnitPageT>({
|
||||
url: '/biz/investment/cooperation-unit/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
};
|
||||
|
||||
export interface ExternalCooperationUnitQueryT {
|
||||
page?: number;
|
||||
size?: number;
|
||||
cooperationName?: string;
|
||||
cooperationNature?: string;
|
||||
unitContactPerson?: string;
|
||||
}
|
||||
|
||||
export interface ExternalCooperationUnitItemT {
|
||||
id: number | string;
|
||||
cooperationName: string;
|
||||
province?: number | string;
|
||||
city?: number | string;
|
||||
cooperationNature?: string;
|
||||
cooperationIndustry?: string;
|
||||
proposedBusinessCooperation?: string;
|
||||
cooperationAdvantage?: string;
|
||||
cooperationStatus?: number | string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
unitAddress?: string;
|
||||
unitContactPerson?: string;
|
||||
contactPersonDept?: string;
|
||||
contactPersonPhone?: string;
|
||||
potentialCooperation?: string;
|
||||
businessConnectionCompany?: string;
|
||||
shareholdingRatio?: number | string;
|
||||
createBy?: string;
|
||||
createTime?: string;
|
||||
updateBy?: string;
|
||||
updateTime?: string;
|
||||
delFlag?: string;
|
||||
processInstanceId?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface ExternalCooperationUnitPageT {
|
||||
records: ExternalCooperationUnitItemT[];
|
||||
total: number;
|
||||
current?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export const getExternalCooperationUnitsPageAPI = (query?: ExternalCooperationUnitQueryT) => {
|
||||
return request<ExternalCooperationUnitPageT>({
|
||||
url: '/admin/externalCooperationUnits/page',
|
||||
method: 'post',
|
||||
data: query,
|
||||
});
|
||||
};
|
||||
|
||||
export const viewExternalCooperationUnitAPI = (id: string | number) => {
|
||||
return request({
|
||||
url: '/admin/externalCooperationUnits/view',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
|
||||
export const addExpertInformationAPI = (data: Record<string, any>) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/add',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 根据模板id 获取专家信息
|
||||
export const getExpertInformationByTemplateIdAPI = (templateId: string) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/getByTemplateId',
|
||||
method: 'get',
|
||||
params: {
|
||||
templateId
|
||||
}
|
||||
});
|
||||
}
|
||||
export const getExpertInformationPageAPI = (query?: {
|
||||
page?: number;
|
||||
size?: number;
|
||||
expertName?: string;
|
||||
technologyField?: string;
|
||||
externalStatus?: string;
|
||||
}) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/page',
|
||||
method: 'post',
|
||||
data: query,
|
||||
});
|
||||
};
|
||||
|
||||
export const updateExpertInformationAPI = (data: Record<string, any>) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/update',
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export const deleteExpertInformationsAPI = (ids: Array<string | number>) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/delete',
|
||||
method: 'put',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Enc-Flag': true,
|
||||
},
|
||||
data: new URLSearchParams({
|
||||
ids: ids.join(','),
|
||||
}).toString(),
|
||||
});
|
||||
};
|
||||
|
||||
export const getExpertInformationDetailAPI = (id: string | number) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/view',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
export const getExpertInformationDetailByProcessInstanceId = (processInstanceId: any) => {
|
||||
return request({
|
||||
url: '/admin/expertInformation/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: {
|
||||
processInstanceId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export const startExpertInformationFlow = async (params:{paramMap:Object,startUserId?:string,processInstanceId?:string}) => {
|
||||
return startFlow({ flowId: import.meta.env.VITE_FLOWID_13, ...params})
|
||||
};
|
||||
|
||||
export const updateExternalCooperationUnitAPI = (data: Record<string, any>) => {
|
||||
return request({
|
||||
url: '/admin/externalCooperationUnits/update',
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export const deleteExternalCooperationUnitsAPI = (ids: Array<string | number>) => {
|
||||
return request({
|
||||
url: '/admin/externalCooperationUnits/delete',
|
||||
method: 'put',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Enc-Flag': true,
|
||||
},
|
||||
data: new URLSearchParams({
|
||||
ids: ids.join(','),
|
||||
}).toString(),
|
||||
});
|
||||
};
|
||||
|
||||
export const addExternalCooperationUnitAPI = (data: Record<string, any>) => {
|
||||
return request({
|
||||
url: '/admin/externalCooperationUnits/add',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取对外合作单位登记详情
|
||||
* @param id 主键ID
|
||||
* @returns 返回详情数据
|
||||
*/
|
||||
export const getCooperationUnitDetailAPI = (id: string) => {
|
||||
return request<CooperationUnitDetailT>({
|
||||
url: '/biz/investment/cooperation-unit/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增对外合作单位登记
|
||||
* @param data 表单数据
|
||||
* @returns 返回操作结果
|
||||
*/
|
||||
export const addCooperationUnitAPI = (data: CooperationUnitFormT) => {
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新对外合作单位登记
|
||||
* @param data 表单数据
|
||||
* @returns 返回操作结果
|
||||
*/
|
||||
export const updateCooperationUnitAPI = (data: CooperationUnitFormT) => {
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除对外合作单位登记
|
||||
* @param ids 主键ID数组
|
||||
* @returns 返回操作结果
|
||||
*/
|
||||
export const deleteCooperationUnitAPI = (ids: string[]) => {
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 保存为草稿
|
||||
* @param data 表单数据
|
||||
* @returns 返回操作结果
|
||||
*/
|
||||
export const saveDraftAPI = (data: CooperationUnitFormT) => {
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit/draft',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 发起审批
|
||||
* @param id 主键ID
|
||||
* @returns 返回操作结果
|
||||
*/
|
||||
export const initiateApprovalAPI = (id: string) => {
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit/approval/' + id,
|
||||
method: 'post',
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 调用模板
|
||||
* @param templateId 模板ID
|
||||
* @returns 返回模板数据
|
||||
*/
|
||||
export const loadTemplateAPI = (templateId: string) => {
|
||||
return request<CooperationUnitFormT>({
|
||||
url: '/biz/investment/cooperation-unit/template/' + templateId,
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 存为模板
|
||||
* @param data 表单数据
|
||||
* @returns 返回操作结果
|
||||
*/
|
||||
export const saveTemplateAPI = (data: { name: string; data: CooperationUnitFormT }) => {
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit/template',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出Excel
|
||||
* @param query 查询参数
|
||||
* @returns 返回文件流
|
||||
*/
|
||||
export const exportCooperationUnitAPI = (query?: CooperationUnitQueryT) => {
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit/export',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导入Excel
|
||||
* @param file 文件对象
|
||||
* @returns 返回操作结果
|
||||
*/
|
||||
export const importCooperationUnitAPI = (file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
return request({
|
||||
url: '/biz/investment/cooperation-unit/import',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
});
|
||||
};
|
||||
/**
|
||||
* /admin/externalCooperationUnits/getByTemplateId
|
||||
* */
|
||||
export const getExternalCooperationUnitsByTemplateId = (templateId: string) => {
|
||||
return request({
|
||||
url: '/admin/externalCooperationUnits/getByTemplateId',
|
||||
method: 'get',
|
||||
params: {
|
||||
templateId
|
||||
}
|
||||
});
|
||||
}
|
||||
79
src/api/investment/investmentManagement.ts
Normal file
79
src/api/investment/investmentManagement.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import request from '/@/utils/request';
|
||||
import { ProjectPlanApplyFormData, ProjectPlanApplyFormItem } from '/@/components/investment/interface/types';
|
||||
import { investmentProjectsPlanList, InvestmentProjectsPlanPageT, ProjectLibraryDetailT } from '/@/views/invMid/projectLibrary/interface/types';
|
||||
// 投资项目计划申报
|
||||
export const investmentProjectsPlanAdd = (data: ProjectPlanApplyFormData) => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/add',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 修改项目投资计划
|
||||
export const investmentProjectsPlanUpdate = (data: ProjectPlanApplyFormData) => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/update',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 投资项目计划列表
|
||||
export const investmentProjectsPlanPage = (data: investmentProjectsPlanList) => {
|
||||
return request<InvestmentProjectsPlanPageT>({
|
||||
url: '/admin/investmentProjectsPlan/page',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
// 投资项目计划详情
|
||||
export const investmentProjectsPlanGetById = (id: number|string) => {
|
||||
return request<ProjectPlanApplyFormItem>({
|
||||
url: '/admin/investmentProjectsPlan/getById',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: id,
|
||||
},
|
||||
});
|
||||
};
|
||||
// 推送国资 投资项目计划
|
||||
export const investmentProjectsPlanPush = (id: string) => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/submit',
|
||||
method: 'get',
|
||||
params:{
|
||||
id:id
|
||||
}
|
||||
})
|
||||
}
|
||||
//删除项目投资计划
|
||||
export const investmentProjectsPlanDelete = (ids: number[]) => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/delete',
|
||||
method: 'put',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Enc-Flag': true,
|
||||
},
|
||||
data: new URLSearchParams({
|
||||
ids: ids.join(','),
|
||||
}),
|
||||
})
|
||||
}
|
||||
// 删除年度项目投资信息
|
||||
export const investmentProjectsPlanDeleteInvestment = (ids: number[]) => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/deleteInvestment',
|
||||
method: 'delete',
|
||||
data: { ids },
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 发起人部门归属
|
||||
* /admin/investmentProjectsPlan/userDeptBelong
|
||||
* */
|
||||
export const investmentProjectsPlanUserDeptBelong = () => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/userDeptBelong',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
99
src/api/investment/mixedReform.ts
Normal file
99
src/api/investment/mixedReform.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export interface MixedReformPayload {
|
||||
id?: number | string;
|
||||
reportingUnit: string;
|
||||
contactPerson: string;
|
||||
contactPhone: string;
|
||||
groupBelonging: string;
|
||||
projectYear: number;
|
||||
projectName: string;
|
||||
implementEnterprise: string;
|
||||
enterpriseCreditCode: string;
|
||||
mixedReformMethod: string;
|
||||
partnerNature: string;
|
||||
isIndustryLeader: string;
|
||||
partnerName: string;
|
||||
mixedReformType: string;
|
||||
progressStatus: string;
|
||||
projectStartTime: string;
|
||||
estimatedCompletionTime: string;
|
||||
actualCompletionTime?: string;
|
||||
reformProgress: string;
|
||||
mixedCompanyCategory: string;
|
||||
mixedCompanyIndustry: string;
|
||||
mixedCompanyField: string;
|
||||
industryChainCategory: string;
|
||||
createBy: string;
|
||||
createTime: string;
|
||||
updateBy: string;
|
||||
updateTime: string;
|
||||
delFlag: string;
|
||||
processInstanceId: string;
|
||||
status: string;
|
||||
pushStatus: string;
|
||||
}
|
||||
|
||||
export const addMixedReformAPI = (data: MixedReformPayload) => {
|
||||
return request({
|
||||
url: '/admin/mixedReform/add',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
/**根据模板id查询混改*/
|
||||
export const getMixedReformByTemplateIdAPI = (templateId: string) => {
|
||||
return request({
|
||||
url: '/admin/mixedReform/getByTemplateId',
|
||||
method: 'get',
|
||||
params: {
|
||||
templateId
|
||||
}
|
||||
});
|
||||
}
|
||||
export interface MixedReformQuery {
|
||||
page?: number;
|
||||
size?: number;
|
||||
projectName?: string;
|
||||
implementEnterprise?: string;
|
||||
enterpriseCreditCode?: string;
|
||||
}
|
||||
|
||||
export interface MixedReformItem extends MixedReformPayload {
|
||||
id: number | string;
|
||||
}
|
||||
|
||||
export interface MixedReformPageResp {
|
||||
records: MixedReformItem[];
|
||||
total: number;
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export const getMixedReformPageAPI = (data: MixedReformQuery) => {
|
||||
return request<MixedReformPageResp>({
|
||||
url: '/admin/mixedReform/page',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export const getMixedReformDetailAPI = (id: string | number) => {
|
||||
return request<MixedReformItem>({
|
||||
url: '/admin/mixedReform/view',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 根据流程实例id查询
|
||||
* /admin/mixedReform/getByProcessInstanceId
|
||||
* @param processId
|
||||
* */
|
||||
export const getMixedReformByProcessInstanceIdAPI = (processId: string) => {
|
||||
return request<MixedReformItem>({
|
||||
url: '/admin/mixedReform/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: { processId:processId },
|
||||
});
|
||||
}
|
||||
35
src/api/investment/postVoteList.ts
Normal file
35
src/api/investment/postVoteList.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '/@/utils/request';
|
||||
import {
|
||||
PostInvestmentEvaluation,
|
||||
ProjectInvestmentInfo,
|
||||
requestData,
|
||||
thePostVoteListReturnsData,
|
||||
} from '/@/views/invBid/postInvestmentEvaluation/interface/type';
|
||||
//添加投后评价
|
||||
export function addInvestmentEvaluation(data: PostInvestmentEvaluation) {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/addEvaluation',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 查看投后评价
|
||||
export function getInvestmentEvaluationView(id: number|string) {
|
||||
return request<ProjectInvestmentInfo>({
|
||||
url: '/admin/investmentProjectsPlan/investmentEvaluationView',
|
||||
method: 'get',
|
||||
params:{
|
||||
id:id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 列表
|
||||
// /admin/investmentProjectsPlan/afterInvestmentPage
|
||||
export function getInvestmentEvaluationList(data: requestData) {
|
||||
return request<thePostVoteListReturnsData>({
|
||||
url: '/admin/investmentProjectsPlan/afterInvestmentPage',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
71
src/api/investment/progressOfInvestmentProjects.ts
Normal file
71
src/api/investment/progressOfInvestmentProjects.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import request from '/@/utils/request';
|
||||
import { InvestmentProjectProgress } from '/@/views/invMid/progressReport/interface/type';
|
||||
///admin/investmentProjectsProgress/add
|
||||
export interface responseData<T = any> {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: T;
|
||||
ok?: boolean;
|
||||
}
|
||||
export interface getInvestmentProjectsProgressPageT {
|
||||
size: number;
|
||||
pages: number;
|
||||
current: number;
|
||||
total: number;
|
||||
records: InvestmentProjectProgress[];
|
||||
}
|
||||
// 请求列表参数
|
||||
export interface InvestmentProjectsProgressQuery {
|
||||
size: number;
|
||||
page: number;
|
||||
projectName: string;
|
||||
projectStatus: string;
|
||||
implementingBody: string;
|
||||
}
|
||||
// 添加项目进度
|
||||
export const addInvestmentProjectsProgressAPI = (data: InvestmentProjectProgress) => {
|
||||
return request<responseData>({
|
||||
url: '/admin/investmentProjectsProgress/add',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 获取项目进度列表
|
||||
export const getInvestmentProjectsProgressPageAPI = (data: InvestmentProjectsProgressQuery) => {
|
||||
return request<getInvestmentProjectsProgressPageT>({
|
||||
url: '/admin/investmentProjectsProgress/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//查看投资项目进度
|
||||
export const getInvestmentProjectsProgressViewAPI = (id: number|string) => {
|
||||
return request<InvestmentProjectProgress>({
|
||||
url: '/admin/investmentProjectsProgress/view',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 报送国资
|
||||
export const investmentProjectsProgressSubmitAPI = (id: string) => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsProgress/submit',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// /admin/investmentProjectsProgress/userDeptBelong
|
||||
export const getInvestmentProjectsProgressUserDeptBelongAPI = () => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsProgress/userDeptBelong',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// /admin/investmentProjectsProgress/getByProcessInstanceId
|
||||
export const getInvestmentProjectsProgressGetByProcessInstanceIdAPI = (processInstanceId: string) => {
|
||||
return request<InvestmentProjectProgress>({
|
||||
url: '/admin/investmentProjectsProgress/getByProcessInstanceId',
|
||||
method: 'get',
|
||||
params: { processInstanceId }
|
||||
})
|
||||
}
|
||||
29
src/api/investment/projectExitPlan.ts
Normal file
29
src/api/investment/projectExitPlan.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import request from '/@/utils/request';
|
||||
import type { paramsDataProjectExitPlanFeedback, feedbackResponseData} from '/@/views/invMid/projectExitFeedback/interface/type';
|
||||
import { paramsDataProjectExitPlan, ProjectTask, responseData } from '/@/views/invMid/projectExitPlan/interface/type';
|
||||
// 添加项目退出计划
|
||||
export function addProjectExitPlan(data: ProjectTask) {
|
||||
return request({ url: '/admin/projectExitPlan/add', method: 'post', data })
|
||||
}
|
||||
//项目退出计划库
|
||||
// /admin/projectExitPlan/page
|
||||
export function getProjectExitPlanPage(data: paramsDataProjectExitPlan) {
|
||||
return request<responseData>({ url: '/admin/projectExitPlan/page', method: 'post', data })
|
||||
}
|
||||
// 根据流程id查询项目退出计划详情
|
||||
export function getProjectExitPlanByProcessInstanceId(processInstanceId: string) {
|
||||
return request({ url: '/admin/projectExitPlan/getByProcessInstanceId?processInstanceId=' + processInstanceId, method: 'get' })
|
||||
}
|
||||
// 项目退出计划反馈表
|
||||
// /admin/projectExitPlan/addFeedback
|
||||
export function addProjectExitPlanFeedback(data: ProjectTask) {
|
||||
return request({ url: '/admin/projectExitPlan/addFeedback', method: 'post', data })
|
||||
}
|
||||
// 根据流程id查询项目退出计划反馈详情
|
||||
export function getProjectExitPlanFeedbackByProcessInstanceId(processInstanceId: string) {
|
||||
return request({ url: '/admin/projectExitPlan/getFeedbackByProcessInstanceId?processInstanceId=' + processInstanceId, method: 'get' })
|
||||
}
|
||||
//项目退出计划反馈库
|
||||
export function getProjectExitPlanFeedbackPage(data: paramsDataProjectExitPlanFeedback) {
|
||||
return request<feedbackResponseData>({ url: '/admin/projectExitPlan/feedbackPage', method: 'post', data })
|
||||
}
|
||||
111
src/api/investment/propertyManagement.ts
Normal file
111
src/api/investment/propertyManagement.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export interface PropertyManagementPayload {
|
||||
indicatorName: string;
|
||||
indicatorCode: string;
|
||||
indicatorDescription: string;
|
||||
enterpriseName: string;
|
||||
creditCode: string;
|
||||
registrationDate: string;
|
||||
stateOwnedEnterprise: string;
|
||||
changeSupervisor: string;
|
||||
mainInvestorName: string;
|
||||
mainInvestorCode: string;
|
||||
supervisorUnit: string;
|
||||
supervisorUnitCode: string;
|
||||
belongingDepartment: string;
|
||||
enterpriseCategory: string;
|
||||
registeredCapital: number;
|
||||
enterpriseClassification: string;
|
||||
regulatoryAgency: string;
|
||||
relationStateEnterprise: string;
|
||||
organizationForm: string;
|
||||
propertyLevel: string;
|
||||
operationStatus: string;
|
||||
propertyRegistrationCase: string;
|
||||
marketTransaction: string;
|
||||
isListedCompany: string;
|
||||
isConsolidated: string;
|
||||
isHoldingMainBusiness: string;
|
||||
isOverseasToDomestic: string;
|
||||
mainBusiness: string;
|
||||
auxiliaryBusiness: string;
|
||||
mainIndustry: string;
|
||||
operationScale: string;
|
||||
mixedReformSituation: string;
|
||||
registrationAddress: string;
|
||||
changeReason: string;
|
||||
decisionDocument: string;
|
||||
businessLicense: string;
|
||||
enterpriseCharter: string;
|
||||
latestAuditReport: string;
|
||||
assetAssessmentFiling: string;
|
||||
businessApplicationFile: string;
|
||||
otherMaterials: string;
|
||||
createBy: string;
|
||||
createTime: string;
|
||||
updateBy: string;
|
||||
updateTime: string;
|
||||
delFlag: string;
|
||||
processInstanceId: string;
|
||||
status: string;
|
||||
pushStatus: string;
|
||||
}
|
||||
|
||||
export interface PropertyManagementQuery {
|
||||
page?: number;
|
||||
size?: number;
|
||||
companyName?: string;
|
||||
unifiedCode?: string;
|
||||
}
|
||||
|
||||
export interface PropertyManagementItem extends PropertyManagementPayload {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface PropertyManagementPageResp {
|
||||
records: PropertyManagementItem[];
|
||||
total: number;
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export const getPropertyManagementPageAPI = (data: PropertyManagementQuery) => {
|
||||
return request<PropertyManagementPageResp>({
|
||||
url: '/admin/propertyRights/page',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export const getPropertyManagementDetailAPI = (id: string | number) => {
|
||||
return request<PropertyManagementItem>({
|
||||
url: '/admin/propertyRights/view',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
|
||||
export const addPropertyManagementAPI = (data: PropertyManagementPayload) => {
|
||||
return request({
|
||||
url: '/admin/propertyRights/add',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export const updatePropertyManagementAPI = (data: PropertyManagementPayload) => {
|
||||
return request({
|
||||
url: '/admin/propertyRights/update',
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export const reportPropertyManagementAPI = (id: string | number) => {
|
||||
return request({
|
||||
url: '/admin/propertyRights/report',
|
||||
method: 'post',
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
285
src/api/investment/reserveRegistration.ts
Normal file
285
src/api/investment/reserveRegistration.ts
Normal file
@@ -0,0 +1,285 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export interface ReserveInvestmentProjectPayload {
|
||||
id?: string | number;
|
||||
projectName: string;
|
||||
projectOwnerUnit: string;
|
||||
projectMainEntity: string;
|
||||
projectStartTime: string;
|
||||
projectEndTime: string;
|
||||
investmentCategory: string;
|
||||
projectNature: string;
|
||||
projectLeaderName: string;
|
||||
projectLeaderPhone: string;
|
||||
projectSource: string;
|
||||
constructionNature: string;
|
||||
keyProject: string;
|
||||
majorInvestmentProjects: string;
|
||||
isMainBusiness: string;
|
||||
mainBusinessTypes: string;
|
||||
mainBusinessCode: string;
|
||||
projectInvestmentDirection: string;
|
||||
investmentDirectionSegmentation: string;
|
||||
isStrategicEmergingIndustries: string;
|
||||
urbanStrategy: string;
|
||||
isManufacturingIndustry: string;
|
||||
investmentArea: string;
|
||||
projectAddress: string;
|
||||
projectAddressDetail: string;
|
||||
isControllingStake: string;
|
||||
shareholdingRatio?: number;
|
||||
projectTotalAmount?: number;
|
||||
lastYearCompleted?: number;
|
||||
ourInvestmentTotalAmount?: number;
|
||||
ourLastYearCompleted?: number;
|
||||
projectDesc: string;
|
||||
attachmentUrl: string;
|
||||
enterpriseOwnFunds?: number;
|
||||
governmentInvestmentFunds?: number;
|
||||
externalRaisedFunds?: number;
|
||||
otherFunds?: number;
|
||||
decisionType: string;
|
||||
isProjectApprovalCompleted: string;
|
||||
projectApprovalFileNo: string;
|
||||
projectApprovalFileInfo: string;
|
||||
isDecisionProcedureCompleted: string;
|
||||
decisionProcedureFileNo: string;
|
||||
decisionFileInfo: string;
|
||||
partnerIds?: Array<string | number>;
|
||||
temporaryStorage?: {
|
||||
id?: string,
|
||||
businessType: number,
|
||||
title: string,
|
||||
}
|
||||
}
|
||||
|
||||
export const addReserveInvestmentProjectAPI = (data: ReserveInvestmentProjectPayload) => {
|
||||
return request({
|
||||
url: '/admin/reserveInvestmentProjects/add',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export interface ReserveInvestmentProjectItem {
|
||||
id: number | string;
|
||||
projectName: string;
|
||||
projectOwnerUnit?: string;
|
||||
projectMainEntity: string;
|
||||
projectStartTime?: string;
|
||||
projectEndTime?: string;
|
||||
investmentCategory?: string;
|
||||
projectNature?: string;
|
||||
projectInvestmentDirection?: string;
|
||||
investmentArea?: string;
|
||||
keyProject?: string;
|
||||
majorInvestmentProjects?: string;
|
||||
lastUpdater?: string;
|
||||
updateTime?: string;
|
||||
lastPushStatus?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface ReserveInvestmentProjectsQuery {
|
||||
page?: number;
|
||||
size?: number;
|
||||
projectName?: string;
|
||||
projectMainEntity?: string;
|
||||
projectNature?: string;
|
||||
}
|
||||
|
||||
export interface ReserveInvestmentProjectsPageResp {
|
||||
records: ReserveInvestmentProjectItem[];
|
||||
total: number;
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
const parseUploadValue = (value: any) => {
|
||||
if (!value) return [];
|
||||
if (Array.isArray(value)) return value;
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
export const normalizeDetailData = (detail: ReserveInvestmentProjectItem) => {
|
||||
const attachments = parseUploadValue(detail.attachmentUrl);
|
||||
return {
|
||||
applicant: detail.createBy || '',
|
||||
applicationUnit: detail.projectOwnerUnit || '',
|
||||
applicationDate: detail.createTime ? detail.createTime.split(' ')[0] : '',
|
||||
projectName: detail.projectName || '',
|
||||
projectMainUnit: detail.projectMainEntity || '',
|
||||
projectOwnerUnit: detail.projectOwnerUnit || '',
|
||||
projectStartDate: detail.projectStartTime || '',
|
||||
projectEndDate: detail.projectEndTime || '',
|
||||
investmentCategory: detail.investmentCategory || '',
|
||||
projectNature: detail.projectNature || '',
|
||||
projectManagerName: detail.projectLeaderName || '',
|
||||
contactNumber: detail.projectLeaderPhone || '',
|
||||
projectSource: detail.projectSource || '',
|
||||
constructionNature: detail.constructionNature || '',
|
||||
keyProject: detail.keyProject || '',
|
||||
majorInvestmentProject: detail.majorInvestmentProjects || '',
|
||||
withinMainBusiness: detail.isMainBusiness || '',
|
||||
mainBusinessType: detail.mainBusinessTypes || '',
|
||||
mainBusinessCode: detail.mainBusinessCode || '',
|
||||
projectDirection: detail.projectInvestmentDirection || '',
|
||||
directionSubdivision: detail.investmentDirectionSegmentation || '',
|
||||
strategicEmergingIndustry: detail.isStrategicEmergingIndustries || '',
|
||||
urbanStrategy: detail.urbanStrategy || '',
|
||||
isManufacturing: detail.isManufacturingIndustry || '',
|
||||
investmentRegion: detail.investmentArea || '',
|
||||
projectAddress: detail.projectAddress || '',
|
||||
projectDetailedAddress: detail.projectAddressDetail || '',
|
||||
isControllingShareholder: detail.isControllingStake || '',
|
||||
ourShareholdingRatio: detail.shareholdingRatio ? String(detail.shareholdingRatio) : '',
|
||||
totalInvestmentAmount: detail.projectTotalAmount ? String(detail.projectTotalAmount) : '',
|
||||
cumulativeInvestmentLastYear: detail.lastYearCompleted ? String(detail.lastYearCompleted) : '',
|
||||
ourTotalInvestmentAmount: detail.ourInvestmentTotalAmount ? String(detail.ourInvestmentTotalAmount) : '',
|
||||
ourCumulativeInvestmentLastYear: detail.ourLastYearCompleted ? String(detail.ourLastYearCompleted) : '',
|
||||
projectDesc: detail.projectDesc || '',
|
||||
projectProposal: attachments,
|
||||
enterpriseSelfFund: detail.enterpriseOwnFunds ? String(detail.enterpriseOwnFunds) : '',
|
||||
externalRaisedFund: detail.externalRaisedFunds ? String(detail.externalRaisedFunds) : '',
|
||||
governmentInvestmentFund: detail.governmentInvestmentFunds ? String(detail.governmentInvestmentFunds) : '',
|
||||
otherFunds: detail.otherFunds ? String(detail.otherFunds) : '',
|
||||
decisionType: detail.decisionType || '',
|
||||
isCompleteEstablishmentProcedures: detail.isProjectApprovalCompleted || '',
|
||||
establishmentDocumentNumber: detail.projectApprovalFileNo || '',
|
||||
establishmentDocumentInfo: detail.projectApprovalFileInfo || '',
|
||||
isCompleteDecisionProcedures: detail.isDecisionProcedureCompleted || '',
|
||||
decisionProgramDocumentNumber: detail.decisionProcedureFileNo || '',
|
||||
decisionDocumentInfo: detail.decisionFileInfo || '',
|
||||
progressDesc: detail.progressDesc || '',
|
||||
cooperationUnits: detail.cooperationUnits || []
|
||||
}
|
||||
};
|
||||
|
||||
export const getReserveInvestmentProjectsPageAPI = (data: ReserveInvestmentProjectsQuery) => {
|
||||
return request<ReserveInvestmentProjectsPageResp>({
|
||||
url: '/admin/reserveInvestmentProjects/page',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
export const getReserveInvestmentProjectDetailAPI = (id: string | number) => {
|
||||
return request<ReserveInvestmentProjectItem>({
|
||||
url: '/admin/reserveInvestmentProjects/view',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
|
||||
export const deleteReserveInvestmentProjectsAPI = (ids: Array<string | number>) => {
|
||||
return request({
|
||||
url: '/admin/reserveInvestmentProjects/delete',
|
||||
method: 'put',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Enc-Flag': true,
|
||||
},
|
||||
data: new URLSearchParams({
|
||||
ids: ids.join(','),
|
||||
}).toString(),
|
||||
});
|
||||
};
|
||||
|
||||
// 报送国资
|
||||
export const submitReserveInvestmentProjectsAPI = (id: string | number) => {
|
||||
return request({
|
||||
url: '/admin/reserveInvestmentProjects/submit',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
|
||||
export const convertTemplateDataToFormData = (templateData: any) => {
|
||||
return {
|
||||
// 基本信息
|
||||
applicant: '', // 从用户信息获取
|
||||
applicationUnit: '', // 从用户信息获取
|
||||
projectName: templateData.projectName || '',
|
||||
projectMainUnit: templateData.projectMainEntity || '',
|
||||
projectStartDate: templateData.projectStartTime || '',
|
||||
investmentCategory: templateData.investmentCategory || '',
|
||||
projectManagerName: templateData.projectLeaderName || '',
|
||||
projectSource: templateData.projectSource || '',
|
||||
keyProject: templateData.keyProject === 'yes' ? 'yes' : 'no',
|
||||
withinMainBusiness: templateData.isMainBusiness || '',
|
||||
mainBusinessType: templateData.mainBusinessTypes || '',
|
||||
projectDirection: templateData.projectInvestmentDirection || '',
|
||||
strategicEmergingIndustry: templateData.isStrategicEmergingIndustries || '',
|
||||
isManufacturing: templateData.isManufacturingIndustry || '',
|
||||
projectAddress: templateData.projectAddress || '',
|
||||
isControllingShareholder: templateData.isControllingStake || '',
|
||||
totalInvestmentAmount: templateData.projectTotalAmount?.toString() || '',
|
||||
ourTotalInvestmentAmount: templateData.ourInvestmentTotalAmount?.toString() || '',
|
||||
projectDesc: templateData.projectDesc || '',
|
||||
progressDesc: templateData.progressDesc || '',
|
||||
projectProposal: templateData.attachmentUrl ? JSON.parse(templateData.attachmentUrl) : [],
|
||||
applicationDate: '', // 从当前日期获取
|
||||
projectOwnerUnit: templateData.projectOwnerUnit || '',
|
||||
projectEndDate: templateData.projectEndTime || '',
|
||||
projectNature: templateData.projectNature || '',
|
||||
contactNumber: templateData.projectLeaderPhone || '',
|
||||
constructionNature: templateData.constructionNature || '',
|
||||
majorInvestmentProject: templateData.majorInvestmentProjects || '',
|
||||
mainBusinessCode: templateData.mainBusinessCode || '',
|
||||
directionSubdivision: templateData.investmentDirectionSegmentation || '',
|
||||
urbanStrategy: templateData.urbanStrategy || '',
|
||||
investmentRegion: templateData.investmentArea || '',
|
||||
projectDetailedAddress: templateData.projectAddressDetail || '',
|
||||
ourShareholdingRatio: templateData.shareholdingRatio?.toString() || '',
|
||||
cumulativeInvestmentLastYear: templateData.lastYearCompleted?.toString() || '',
|
||||
ourCumulativeInvestmentLastYear: templateData.ourLastYearCompleted?.toString() || '',
|
||||
enterpriseSelfFund: templateData.enterpriseOwnFunds?.toString() || '',
|
||||
externalRaisedFund: templateData.externalRaisedFunds?.toString() || '',
|
||||
governmentInvestmentFund: templateData.governmentInvestmentFunds?.toString() || '',
|
||||
otherFunds: templateData.otherFunds?.toString() || '',
|
||||
|
||||
// 合作伙伴信息
|
||||
partnerInfos: Array.isArray(templateData.cooperationUnits) ?
|
||||
templateData.cooperationUnits.map((unit: any) => ({
|
||||
id: unit.id || '',
|
||||
name: unit.cooperationName || '',
|
||||
nature: unit.cooperationNature || '',
|
||||
controller: unit.cooperationController || '',
|
||||
share: unit.shareholdingRatio?.toString() || ''
|
||||
})) : [],
|
||||
|
||||
// 决策信息
|
||||
decisionType: templateData.decisionType || '',
|
||||
isCompleteEstablishmentProcedures: templateData.isProjectApprovalCompleted === 'yes' ? 'yes' : 'no',
|
||||
establishmentDocumentNumber: templateData.projectApprovalFileNo || '',
|
||||
establishmentDocumentInfo: templateData.projectApprovalFileInfo || '',
|
||||
decisionProgramDocumentNumber: templateData.decisionProcedureFileNo || '',
|
||||
decisionDocumentInfo: templateData.decisionFileInfo || '',
|
||||
isCompleteDecisionProcedures: templateData.isDecisionProcedureCompleted === 'yes' ? 'yes' : 'no',
|
||||
|
||||
// 审核意见
|
||||
reviewOpinions: {
|
||||
submitUnitOpinion: '',
|
||||
groupInvestmentDeptOpinion: '',
|
||||
submitUnitLeadershipOpinion: '',
|
||||
submitUnitMainLeadershipOpinion: ''
|
||||
},
|
||||
|
||||
// 其他
|
||||
processInstanceId: templateData.processInstanceId || ''
|
||||
};
|
||||
};
|
||||
|
||||
// /admin/reserveInvestmentProjects/getByTemplateId
|
||||
export const getReserveInvestmentProjectsByTemplateIdAPI = async (templateId: string | number) => {
|
||||
const res = await request<ReserveInvestmentProjectItem>({
|
||||
url: '/admin/reserveInvestmentProjects/getByTemplateId',
|
||||
method: 'get',
|
||||
params: { templateId },
|
||||
});
|
||||
return convertTemplateDataToFormData(res.data || {})
|
||||
}
|
||||
187
src/api/login/index.ts
Normal file
187
src/api/login/index.ts
Normal file
@@ -0,0 +1,187 @@
|
||||
import request from '/@/utils/request';
|
||||
import { Session } from '/@/utils/storage';
|
||||
import { validateNull } from '/@/utils/validate';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import other from '/@/utils/other';
|
||||
|
||||
/**
|
||||
* https://www.ietf.org/rfc/rfc6749.txt
|
||||
* OAuth 协议 4.3.1 要求格式为 form 而不是 JSON 注意!
|
||||
*/
|
||||
const FORM_CONTENT_TYPE = 'application/x-www-form-urlencoded';
|
||||
|
||||
// 登录方式
|
||||
export enum LoginTypeEnum {
|
||||
PASSWORD,
|
||||
MOBILE,
|
||||
REGISTER,
|
||||
EXPIRE,
|
||||
}
|
||||
|
||||
// 登录错误信息
|
||||
export enum LoginErrorEnum {
|
||||
CREDENTIALS_EXPIRED = 'credentials_expired', // 密码过期
|
||||
}
|
||||
|
||||
/**
|
||||
* 社交登录方式枚举
|
||||
*/
|
||||
export enum SocialLoginEnum {
|
||||
SMS = 'SMS', // 验证码登录
|
||||
DINGTALK = 'DINGTALK', // 钉钉
|
||||
WEIXIN_CP = 'WEIXIN_CP', // 企业微信
|
||||
APP_SMS = 'APP-SMS', // APP验证码登录
|
||||
QQ = 'QQ', // QQ登录
|
||||
WECHAT = 'WX', // 微信登录
|
||||
MINI_APP = 'MINI', // 微信小程序
|
||||
GITEE = 'GITEE', // 码云登录
|
||||
OSC = 'OSC', // 开源中国登录
|
||||
CAS = 'CAS', // CAS 登录
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录
|
||||
* @param data
|
||||
*/
|
||||
export const login = (data: any) => {
|
||||
const basicAuth = 'Basic ' + window.btoa(import.meta.env.VITE_OAUTH2_PASSWORD_CLIENT);
|
||||
Session.set('basicAuth', basicAuth);
|
||||
// 密码加密
|
||||
const encPassword = other.encryption(data.password, import.meta.env.VITE_PWD_ENC_KEY);
|
||||
const { username, randomStr, code, grant_type, scope } = data;
|
||||
return request({
|
||||
url: '/auth/oauth2/token',
|
||||
method: 'post',
|
||||
params: { username, randomStr, code, grant_type, scope },
|
||||
data: { password: encPassword },
|
||||
headers: {
|
||||
skipToken: true,
|
||||
Authorization: basicAuth,
|
||||
'Content-Type': FORM_CONTENT_TYPE,
|
||||
'Enc-Flag': 'false',
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export const loginByMobile = (mobile: any, code: any) => {
|
||||
const grant_type = 'mobile';
|
||||
const scope = 'server';
|
||||
const basicAuth = 'Basic ' + window.btoa(import.meta.env.VITE_OAUTH2_MOBILE_CLIENT);
|
||||
Session.set('basicAuth', basicAuth);
|
||||
|
||||
return request({
|
||||
url: '/auth/oauth2/token',
|
||||
headers: {
|
||||
skipToken: true,
|
||||
Authorization: basicAuth,
|
||||
'Content-Type': FORM_CONTENT_TYPE,
|
||||
},
|
||||
method: 'post',
|
||||
params: { mobile: `${SocialLoginEnum.SMS}@${mobile}`, code: code, grant_type, scope },
|
||||
});
|
||||
};
|
||||
|
||||
export const loginBySocial = (state: SocialLoginEnum, code: string) => {
|
||||
const grant_type = 'mobile';
|
||||
const scope = 'server';
|
||||
const basicAuth = 'Basic ' + window.btoa(import.meta.env.VITE_OAUTH2_SOCIAL_CLIENT);
|
||||
Session.set('basicAuth', basicAuth);
|
||||
|
||||
return request({
|
||||
url: '/auth/oauth2/token',
|
||||
headers: {
|
||||
skipToken: true,
|
||||
Authorization: basicAuth,
|
||||
'Content-Type': FORM_CONTENT_TYPE,
|
||||
},
|
||||
method: 'post',
|
||||
params: { mobile: `${state}@${code}`, code: code, grant_type, scope },
|
||||
});
|
||||
};
|
||||
|
||||
export const sendMobileCode = (mobile: string) => {
|
||||
return request({
|
||||
url: '/admin/sysMessage/send/smsCode',
|
||||
method: 'get',
|
||||
params: { mobile },
|
||||
});
|
||||
};
|
||||
|
||||
export const refreshTokenApi = (refresh_token: string) => {
|
||||
const grant_type = 'refresh_token';
|
||||
const scope = 'server';
|
||||
// 获取当前选中的 basic 认证信息
|
||||
const basicAuth = Session.get('basicAuth');
|
||||
|
||||
return request({
|
||||
url: '/auth/oauth2/token',
|
||||
headers: {
|
||||
skipToken: true,
|
||||
Authorization: basicAuth,
|
||||
'Content-Type': FORM_CONTENT_TYPE,
|
||||
},
|
||||
method: 'post',
|
||||
params: { refresh_token, grant_type, scope },
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 校验令牌,若有效期小于半小时自动续期
|
||||
* @param refreshLock
|
||||
*/
|
||||
export const checkToken = (refreshTime: number, refreshLock: boolean) => {
|
||||
const basicAuth = Session.get('basicAuth');
|
||||
request({
|
||||
url: '/auth/token/check_token',
|
||||
headers: {
|
||||
skipToken: true,
|
||||
Authorization: basicAuth,
|
||||
'Content-Type': FORM_CONTENT_TYPE,
|
||||
},
|
||||
method: 'get',
|
||||
params: { token: Session.getToken() },
|
||||
})
|
||||
.then((response) => {
|
||||
if (validateNull(response) || response.code === 1) {
|
||||
clearInterval(refreshTime);
|
||||
return;
|
||||
}
|
||||
const expire = Date.parse(response.data.expiresAt);
|
||||
if (expire) {
|
||||
const expiredPeriod = expire - new Date().getTime();
|
||||
//小于半小时自动续约
|
||||
if (expiredPeriod <= 30 * 60 * 1000) {
|
||||
if (!refreshLock) {
|
||||
refreshLock = true;
|
||||
useUserInfo()
|
||||
.refreshToken()
|
||||
.catch(() => {
|
||||
clearInterval(refreshTime);
|
||||
});
|
||||
refreshLock = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 发生异常关闭定时器
|
||||
clearInterval(refreshTime);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
export const getUserInfo = () => {
|
||||
return request({
|
||||
url: '/admin/user/info',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
export const logout = () => {
|
||||
return request({
|
||||
url: '/auth/token/logout',
|
||||
method: 'delete',
|
||||
});
|
||||
};
|
||||
79
src/api/mp/wx-account-fans.ts
Normal file
79
src/api/mp/wx-account-fans.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, ymt All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: ymt
|
||||
*/
|
||||
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function sync(appId) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans/sync/' + appId,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(id) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function black(obj, appid) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans/black/' + appid,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function unblack(obj, appid) {
|
||||
return request({
|
||||
url: '/mp/wx-account-fans/unblack/' + appid,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
65
src/api/mp/wx-account-tag.ts
Normal file
65
src/api/mp/wx-account-tag.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, ymt All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: ymt
|
||||
*/
|
||||
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function getPage(query) {
|
||||
return request({
|
||||
url: '/mp/wx-account-tag/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-account-tag',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-account-tag',
|
||||
method: 'delete',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-account-tag',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function sync(appId) {
|
||||
return request({
|
||||
url: '/mp/wx-account-tag/sync/' + appId,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
export function list(appId) {
|
||||
return request({
|
||||
url: '/mp/wx-account-tag/list',
|
||||
method: 'get',
|
||||
params: { wxAccountAppid: appId },
|
||||
});
|
||||
}
|
||||
86
src/api/mp/wx-account.ts
Normal file
86
src/api/mp/wx-account.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, ymt All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: ymt
|
||||
*/
|
||||
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query) {
|
||||
return request({
|
||||
url: '/mp/wx-account/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-account',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-account/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function generateQr(appid) {
|
||||
return request({
|
||||
url: '/mp/wx-account/qr/' + appid,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
export function clearQuota(appid) {
|
||||
return request({
|
||||
url: '/mp/wx-account/clear-quota/' + appid,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(id) {
|
||||
return request({
|
||||
url: '/mp/wx-account/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-account',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchAccountList(obj?: object) {
|
||||
return request({
|
||||
url: '/mp/wx-account/list',
|
||||
method: 'get',
|
||||
params: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchStatistics(q) {
|
||||
return request({
|
||||
url: '/mp/wx-account/statistics',
|
||||
method: 'get',
|
||||
params: q,
|
||||
});
|
||||
}
|
||||
39
src/api/mp/wx-auto-reply.ts
Normal file
39
src/api/mp/wx-auto-reply.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function getPage(query) {
|
||||
return request({
|
||||
url: '/mp/wx-auto-reply/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-auto-reply',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-auto-reply/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-auto-reply/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-auto-reply',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
79
src/api/mp/wx-fans-msg.ts
Normal file
79
src/api/mp/wx-fans-msg.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, ymt All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: ymt
|
||||
*/
|
||||
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query) {
|
||||
return request({
|
||||
url: '/mp/wx-fans-msg/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-fans-msg',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id) {
|
||||
return request({
|
||||
url: '/mp/wxfansmsg/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(id) {
|
||||
return request({
|
||||
url: '/mp/wxfansmsg/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wxfansmsg',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchResList(query) {
|
||||
return request({
|
||||
url: '/mp/wx-fans-msg/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addResObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-fans-msg',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function delResObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-fans-msg/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
74
src/api/mp/wx-material.ts
Normal file
74
src/api/mp/wx-material.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function getPage(query) {
|
||||
return request({
|
||||
url: '/mp/wx-material/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-material/materialNews',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function materialNewsUpdate(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-material/materialNews',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-material/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObj(query) {
|
||||
return request({
|
||||
url: '/mp/wx-material',
|
||||
method: 'delete',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj) {
|
||||
return request({
|
||||
url: '/mp/wx-material',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getMaterialOther(query) {
|
||||
return request({
|
||||
url: '/mp/wx-material/materialOther',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
export function getMaterialVideo(query) {
|
||||
return request({
|
||||
url: '/mp/wx-material/materialVideo',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function getTempMaterialOther(query) {
|
||||
return request({
|
||||
url: '/mp/wx-material/tempMaterialOther',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
40
src/api/mp/wx-menu.ts
Normal file
40
src/api/mp/wx-menu.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, ymt All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: ymt
|
||||
*/
|
||||
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function getObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-menu/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function saveObj(appId, data) {
|
||||
return request({
|
||||
url: '/mp/wx-menu/' + appId,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function publishObj(id) {
|
||||
return request({
|
||||
url: '/mp/wx-menu/' + id,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
9
src/api/pay/cd.ts
Normal file
9
src/api/pay/cd.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function useBuyApi(amount?: any) {
|
||||
return request({
|
||||
url: '/pay/goods/merge/buy',
|
||||
method: 'get',
|
||||
params: { amount: amount },
|
||||
});
|
||||
}
|
||||
40
src/api/pay/channel.ts
Normal file
40
src/api/pay/channel.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/pay/channel/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/channel',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/pay/channel/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/pay/channel',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/channel',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
40
src/api/pay/goods.ts
Normal file
40
src/api/pay/goods.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/pay/goods/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/goods',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/pay/goods/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/pay/goods',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/goods',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
40
src/api/pay/record.ts
Normal file
40
src/api/pay/record.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/pay/notify/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/notify',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/pay/notify/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/pay/notify',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/notify',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
40
src/api/pay/refund.ts
Normal file
40
src/api/pay/refund.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/pay/refund/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function useRefundApi(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/refund',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/pay/refund/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/pay/refund',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/refund',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
40
src/api/pay/trade.ts
Normal file
40
src/api/pay/trade.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/pay/trade/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/trade',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/pay/trade/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/pay/trade',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/pay/trade',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user