fix: 初始化

This commit is contained in:
jiaojinfeng 2023-05-30 19:27:03 +08:00
commit 28db653900
4436 changed files with 500218 additions and 0 deletions

5
.browserslistrc Normal file
View File

@ -0,0 +1,5 @@
> 1%
last 2 versions
not dead
chrome > 40
not ie 11

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

22
.eslintrc.js Normal file
View File

@ -0,0 +1,22 @@
/* eslint-env node */
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier',
],
overrides: [
{
files: ['cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}'],
extends: ['plugin:cypress/recommended'],
},
],
parserOptions: {
ecmaVersion: 'latest',
},
};

8
.gitattributes vendored Normal file
View File

@ -0,0 +1,8 @@
*.js eol=lf
*.ts eol=lf
*.jsx eol=lf
*.json eol=lf
*.css eol=lf
*.less eol=lf
*.vue eol=lf
*.md eol=lf

32
.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
#lock file
*-lock.yaml
*-lock.json

4
.npmrc Normal file
View File

@ -0,0 +1,4 @@
# registry=http://10.0.59.137:30081/repository/icpx-public/
registry=http://10.0.59.229:5055/
# registry=http://10.0.59.229:9527/
# shamefully-hoist=true

37
.prettierignore Normal file
View File

@ -0,0 +1,37 @@
**/*.svg
package.json
lib/
es/
dist/
_site/
coverage/
CNAME
LICENSE
yarn.lock
netlify.toml
yarn-error.log
*.sh
*.snap
.gitignore
.npmignore
.prettierignore
.DS_Store
.editorconfig
.eslintignore
**/*.yml
components/style/color/*.less
**/assets
.gitattributes
.stylelintrc
.vcmrc
.png
.jpg
.npmrc.template
.huskyrc
.browserslistrc
.env
.env.*
.vscode/
*.conf
Dockerfile
**/*.ico

17
.prettierrc Normal file
View File

@ -0,0 +1,17 @@
{
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf",
"printWidth": 100,
"proseWrap": "never",
"arrowParens": "avoid",
"htmlWhitespaceSensitivity": "ignore",
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
}
]
}

4
.stylelintrc.js Normal file
View File

@ -0,0 +1,4 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
rules: {},
};

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# 3dplaza-platform
基于微前端架构的3DPlaza平台
项目采用 pnpm 分包管理 packages 文件夹里的项目依赖使用 “安装依赖”命令安装
## 安装依赖(推荐使用pnpm)
```bash
pnpm install
```

8
cypress.config.ts Normal file
View File

@ -0,0 +1,8 @@
import { defineConfig } from 'cypress'
export default defineConfig({
e2e: {
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:4173'
}
})

View File

@ -0,0 +1,8 @@
// https://docs.cypress.io/api/introduction/api.html
describe('My First Test', () => {
it('visits the app root url', () => {
cy.visit('/')
cy.contains('h1', 'You did it!')
})
})

10
cypress/e2e/tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["./**/*", "../support/**/*"],
"compilerOptions": {
"isolatedModules": false,
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
}
}

View File

@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

View File

@ -0,0 +1,39 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
export {}

20
cypress/support/e2e.ts Normal file
View File

@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')

129
package.json Normal file
View File

@ -0,0 +1,129 @@
{
"name": "3dplaza-platform",
"version": "0.0.0",
"private": "true",
"author": "hoteamsoft",
"scripts": {
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"dev": "run-p vite:*",
"build:platform": "pnpm -F icpx-platform build",
"build:msg": "pnpm -F icpx-messsage build",
"build:org": "pnpm -F icpx-organization build",
"build:log": "pnpm -F icpx-log build",
"build:life": "pnpm -F icpx-lifecycle build",
"build:wb": "pnpm -F icpx-workbench build",
"build:flow": "pnpm -F icpx-workflow build",
"build:file": "pnpm -F icpx-file build",
"build:ruler": "pnpm -F icpx-ruler build",
"build:form": "pnpm -F icpx-form build",
"preview:platform": "pnpm -F icpx-platform preview",
"preview:msg": "pnpm -F icpx-messsage preview",
"preview:org": "pnpm -F icpx-organization preview",
"preview:log": "pnpm -F icpx-log preview",
"preview:life": "pnpm -F icpx-lifecycle preview",
"preview:wb": "pnpm -F icpx-workbench preview",
"preview:flow": "pnpm -F icpx-workflow preview",
"preview:file": "pnpm -F icpx-file preview",
"preview:ruler": "pnpm -F icpx-ruler preview",
"preview:form": "pnpm -F icpx-form preview",
"vite:platform": "pnpm -F icpx-platform dev",
"vite:msg": "pnpm -F icpx-messsage dev",
"vite:org": "pnpm -F icpx-organization dev",
"vite:log": "pnpm -F icpx-log dev",
"vite:life": "pnpm -F icpx-lifecycle dev",
"vite:wb": "pnpm -F icpx-workbench dev",
"vite:flow": "pnpm -F icpx-workflow dev",
"vite:file": "pnpm -F icpx-file dev",
"vite:ruler": "pnpm -F icpx-ruler dev",
"vite:form": "pnpm -F icpx-form dev",
"all-msg": "run-p preview:platform vite:msg",
"all-org": "run-p preview:platform vite:org",
"all-log": "run-p preview:platform vite:log",
"all-life": "run-p preview:platform vite:life",
"all-wb": "run-p preview:platform preview:org vite:wb",
"all-flow": "run-p preview:platform vite:flow",
"all-file": "run-p preview:platform vite:file",
"all-ruler": "run-p preview:platform vite:ruler",
"all-form": "run-p preview:platform vite:form",
"all2": "run-p vite:platform preview:platform vite:msg"
},
"dependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@crami/bui": "^2.0.501",
"@crami/bui-platform": "^2.0.376",
"@crami/bui-types": "^2.0.307",
"@crami/compiler": "^0.0.36",
"@crami/http": "^2.0.10",
"@crami/icons": "^2.0.17",
"@crami/locale": "^1.1.14",
"@crami/ui": "^2.0.249",
"@crami/ui-types": "^2.0.105",
"@crami/vite-plugin-theme-preprocessor": "0.0.2",
"@originjs/vite-plugin-federation": "^1.1.11",
"@wangeditor/editor": "^5.1.14",
"@wangeditor/editor-for-vue": "^5.1.12",
"ant-design-vue": "^3.1.1",
"axios": "^0.27.2",
"dayjs": "^1.11.5",
"gridstack": "^7.2.2",
"lodash-es": "^4.17.21",
"mitt": "^3.0.0",
"store": "^2.0.12",
"vue": "~3.2.37",
"vue-i18n": "~9.2.0-0",
"vue-router": "^4.0.14",
"vuex": "~4.0.2",
"vuex-persistedstate": "^4.1.0",
"wujie-vue3": "^1.0.0-rc.24"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.2.0",
"@types/jsdom": "^20.0.0",
"@types/lodash-es": "^4.17.6",
"@types/node": "^16.18.3",
"@typescript-eslint/eslint-plugin": "5.4.0",
"@typescript-eslint/parser": "5.4.0",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.0",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/test-utils": "^2.2.1",
"@vue/tsconfig": "^0.1.3",
"colors": "^1.4.0",
"cross-env": "7.0.3",
"eslint": "^8.26.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-vue": "^9.6.0",
"jsdom": "^20.0.2",
"lodash": "^4.17.21",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"start-server-and-test": "^1.14.0",
"stylelint": "^14.14.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^29.0.0",
"typescript": "~4.7.4",
"vite": "^3.2.1",
"vite-plugin-externals": "^0.5.1",
"vite-plugin-imp": "^2.3.0",
"vite-plugin-pages": "^0.12.2",
"vite-plugin-progress": "^0.0.3",
"vite-plugin-style-import": "^1.4.1",
"vite-plugin-svg-icons": "^2.0.1",
"vitest": "^0.24.3",
"vue-eslint-parser": "^7.11.0",
"vue-tsc": "^1.0.9"
},
"pnpm": {
"overrides": {
"vue": "3.2.37"
}
},
"packageManager": "pnpm@7.14.0",
"engines": {
"node": ">=16.13.0"
}
}

View File

View File

@ -0,0 +1,3 @@
VITE_CAD_URL = http://10.0.32.121:8099
VITE_CAD_CLIENTID = 9db5d924783f55ec
VITE_CAD_SECRET = 63c64f64c0887e2ea02c50c9

View File

@ -0,0 +1,3 @@
VITE_CAD_URL = http://10.0.32.121:8099
VITE_CAD_CLIENTID = 9db5d924783f55ec
VITE_CAD_SECRET = 63c64f64c0887e2ea02c50c9

25
packages/icpx-crowncad/.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/.history/

View File

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}

View File

@ -0,0 +1,18 @@
# Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Type Support For `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
1. Disable the built-in TypeScript Extension
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CrownCAD</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@ -0,0 +1,25 @@
{
"name": "vite-project",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"less": "^4.1.3",
"vue": "^3.2.45",
"vue-router": "^4.0.14",
"vuex": "~4.0.2",
"wujie-vue3": "^1.0.0-rc.24"
},
"devDependencies": {
"@types/node": "^18.11.18",
"@vitejs/plugin-vue": "^4.0.0",
"typescript": "^4.9.3",
"vite": "^4.0.0",
"vue-tsc": "^1.0.11"
}
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,6 @@
<template>
<RouterView></RouterView>
</template>
<script setup lang="ts"></script>
<style scoped></style>

View File

@ -0,0 +1,40 @@
import request from '@/utils/request';
/**
* iframe嵌入链接线
* @param params
* @returns
*/
export function embedCAD(params = {}) {
return request.get<any>('/thirdparty/embed', {
params,
});
}
/**
* CrownCAD
* @param params
* @returns
*/
export async function thirdpartyRegister(params = {}) {
return request('/thirdparty/register', {
method: 'POST',
data: {
...params,
},
});
}
/**
* -Token
* @param params
* @returns
*/
export async function thirdpartyToken(params = {}) {
return request('/thirdparty/token', {
method: 'POST',
data: {
...params,
},
});
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

After

Width:  |  Height:  |  Size: 496 B

View File

@ -0,0 +1,23 @@
// import Vue from 'vue'
import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
const app = createApp(App);
import router from './router/index.js';
import WujieVue from 'wujie-vue3';
console.log(app);
// app.directive('focus',{ //全局注册自定义指令
// // 将绑定的元素插入到DOM中
// mounted : function(el){
// // 聚焦元素
// el.focus()
// }
// })
// vue3全局注册组件的写法
// 在vue2中是将Vue.user(router)写到routers文件夹的index.js中v3不是
app.use(router).use(WujieVue).mount('#app'); //使用替换new Vue
// new Vue({ vue2中的写法
// router,
// render: h => h(App),
// }).$mount('#app')

View File

@ -0,0 +1,24 @@
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
// import route from 'route';
// 路由配置信息
const routes = [
{ path: '/', redirect: './crownCAD' },
{
path: '/crownCAD',
name: 'crownCAD',
// packages\icpx-crowncad\src\views\crownCAD\index.vue
component: () => import('@/views/crownCAD/index.vue'),
},
];
// 创建路由
const router = createRouter({
history: createWebHashHistory(),
routes,
});
router.beforeEach((to, from, next) => {
next();
});
export default router;

View File

@ -0,0 +1,4 @@
* {
margin: 0;
padding: 0;
}

View File

@ -0,0 +1,55 @@
import { thirdpartyRegister, thirdpartyToken } from '@/api/crownCAD/crownCAD';
// 授权码初始化
export const clientId = import.meta.env.VITE_CAD_CLIENTID;
export const clientSecret = import.meta.env.VITE_CAD_SECRET;
/**
* CrownCAD
* /thirdparty/register
* @param userName
* @param phoneNumber
* @param clientID ID
* @param clientSecret Secret
*/
const userName = 'user1';
const registerFun = async () => {
try {
const { data } = await thirdpartyRegister({
userName,
phoneNumber: '18567897654',
clientID: clientId,
clientSecret: clientSecret,
});
if (data.data && data.data === '用户已绑定') {
return userName;
} else {
data;
}
} catch (e) {
return userName;
}
};
/**
*
* /thirdparty/token
* @param userName
* @param clientID ID
* @param clientSecret Secret
*/
export const getThirdToken = async () => {
try {
const tUserName = await registerFun();
const { data } = await thirdpartyToken({
userName: tUserName,
clientID: clientId,
clientSecret: clientSecret,
});
return data.data;
} catch (e) {
return false;
}
};

View File

@ -0,0 +1,9 @@
import store from 'store';
import expirePlugin from 'store/plugins/expire';
// plugin usage:
store.addPlugin(expirePlugin);
export { store as localStorage };
export default store;

View File

@ -0,0 +1,9 @@
import axios from 'axios';
const request = axios.create({
// API 请求的默认前缀
baseURL: import.meta.env.VITE_CAD_URL,
timeout: 30 * 1000, // 请求超时时间
});
export default request;

View File

@ -0,0 +1,22 @@
import type { AxiosRequestConfig, AxiosError } from 'axios';
import axios, { AxiosResponse } from 'axios';
// import { baseParams, getInfo, ICP_CONFIG } from './commMethods';
// 这里是用于设定请求后端时,所用的 Token KEY
// 可以根据自己的需要修改,常见的如 Access-TokenAuthorization
// 需要注意的是,请尽量保证使用中横线`-` 来作为分隔符,
// 避免被 nginx 等负载均衡器丢弃了自定义的请求头
export const REQUEST_TOKEN_KEY = 'Authorization';
const request = axios.create({
// API 请求的默认前缀
baseURL: import.meta.env.VITE_CAD_URL,
timeout: 30 * 1000, // 请求超时时间
});
// token 获取用户授权码 接口返回的token /thirdparty/token
const token =
'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ1c2VyMSIsImNyZWF0ZWQiOjE2NzM5NDU5Mjk0MjAsImV4cCI6MTY3NDU1MDcyOX0.AiKJTzjQIHLybD_pGpImSgH8qJB_B5qtAeGJfuHBHF2rcXiVAWWhCoszXdXWEICLQhqg9fsvrDqbpj_NQjf0xw';
export default request;

View File

@ -0,0 +1,64 @@
<template>
<div class="ifrme-wrapper" v-if="fetchUrl">
<wujie-vue :name="documentId" :url="fetchUrl"></wujie-vue>
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
name: 'crownCAD',
props: {
// documentId: ID
documentId: { require: true, type: String, default: '63c663540d10c22256d76257' },
// accessToken: token
accessToken: {
require: true,
type: String,
default: '',
},
// write: write truewrite false
write: {
type: Boolean,
default: false,
},
// theme:
theme: {
type: Number,
default: 1,
},
// token: token 使token UUID
token: {
type: String,
default: '',
},
},
setup(props) {
const cadbaseUrl = ref(import.meta.env.VITE_CAD_URL);
// url
const fetchUrl = ref('');
const link = `${cadbaseUrl.value}/thirdparty/embed?documentId=${props.documentId}&access_token=${props.accessToken}&write=${props.write}&theme=${props.theme}&token=${props.token}`;
const xhr = new XMLHttpRequest();
xhr.open('GET', link, true);
xhr.onload = function () {
fetchUrl.value = xhr.responseURL;
};
xhr.send(null);
return {
cadbaseUrl,
fetchUrl,
};
},
});
</script>
<style lang="less" scoped>
.ifrme-wrapper {
width: 99vw;
height: 99vh;
iframe {
width: 100%;
height: 100%;
}
}
</style>

View File

@ -0,0 +1,36 @@
<template>
<div>
<cadPreview
:documentId="documentsId"
:accessToken="tokenTes"
:write="false"
v-if="tokenTes"
></cadPreview>
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { getThirdToken } from '@/utils/commonMethonds';
import cadPreview from '@/views/components/cadPreview.vue';
export default defineComponent({
components: { cadPreview },
name: 'crownCAD',
setup() {
//TODO documentsId ID
//
// /thirdparty/inventory
const documentsId = ref('63dcce4e13f6f37d0f7c4ba4');
// accessToken /thirdparty/token
const tokenTes = ref();
getThirdToken().then((res: string) => {
tokenTes.value = res;
});
return {
tokenTes,
documentsId,
};
},
});
</script>
<style lang="less" scoped></style>

View File

@ -0,0 +1 @@
/// <reference types="vite/client" />

View File

@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"noEmit": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}

View File

@ -0,0 +1,20 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
// 这里就是需要配置resolve里的别名
'@': path.resolve(__dirname, './src'), // path记得引入
},
},
server: {
host: true,
port: 4002,
// 开启跨域
cors: true,
},
});

10
packages/icpx-file/.env Normal file
View File

@ -0,0 +1,10 @@
VUE_APP_PUBLIC_PATH=/
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/api
VITE_ENV_THEME_DEFAULT=default
VITE_APP_PUBLIC_PATH=/
VITE_APP_PREVIEW=true
VITE_APP_API_BASE_URL=/api
VITE_REMOTE_ICPX_PLATFORM = http://localhost:4000

View File

@ -0,0 +1,2 @@
NODE_ENV=production
IS_ANALYZ=true

View File

@ -0,0 +1,11 @@
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/api
MOCK=true
HTTP_MOCK=true
VUE_APP_SOCKET_URL=ws://10.0.65.251:59211/
VITE_APP_PREVIEW=true
VITE_APP_API_BASE_URL=/api
VITE_MOCK=true
VITE_HTTP_MOCK=true
VITE_APP_SOCKET_URL=ws://10.0.65.251:59211/

View File

@ -0,0 +1,6 @@
NODE_ENV=production
VUE_APP_PUBLIC_PATH=/pro/preview/
VUE_APP_API_URL=/api
VITE_APP_PUBLIC_PATH=/pro/preview/
VITE_APP_API_URL=/api

View File

@ -0,0 +1,9 @@
NODE_ENV=production
VUE_APP_PREVIEW=false
VUE_APP_API_URL=/api
VUE_APP_SOCKET_URL=ws://10.0.88.239:59211/
VITE_APP_PREVIEW=false
VITE_APP_API_URL=/api
VITE_APP_SOCKET_URL=ws://10.0.88.239:59211/

24
packages/icpx-file/.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}

View File

@ -0,0 +1,9 @@
#### 1.拉取自定义镜像名称
FROM 10.0.88.243/icpx/base_frontend:0.0.9
# 2.将打包后的代码复制到运行位置
COPY ./dist /var/www
# 3.启动nginx
ENTRYPOINT ["nginx","-g","daemon off;"]

View File

@ -0,0 +1,16 @@
# Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
## Type Support For `.vue` Imports in TS
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).

View File

@ -0,0 +1,23 @@
import { loadEnv as _loadEnv } from 'vite';
export interface IEnv {
DEV: boolean;
PROD: boolean;
VITE_ENV_THEME_DEFAULT: string;
}
export const loadEnv = (options: { command: string; mode: string }) => {
const { command, mode } = options;
const isDev = command === 'serve';
const env: IEnv = Object.assign(
{
DEV: isDev,
PROD: !isDev,
VITE_ENV_THEME_DEFAULT: '',
},
_loadEnv(isDev ? 'development' : 'production', process.cwd(), ''),
_loadEnv(mode, process.cwd(), ''),
);
return env;
};

View File

@ -0,0 +1,4 @@
import { loadEnv } from './env';
import { addThemeConfig } from './theme-config';
export { loadEnv, addThemeConfig };

View File

@ -0,0 +1,166 @@
import fs, { readdirSync } from 'fs';
import path from 'path';
import type { UserConfig, PluginOption } from 'vite';
import { themePreprocessorPlugin } from '@crami/vite-plugin-theme-preprocessor';
import { defaultsDeep } from 'lodash-es';
import colors from 'colors';
const ADDITIONALFILENAME = 'app.less';
const THEMEVARIABLESFILENAME = 'variables.less';
const PATHRESOLVETO = '../src/theme/';
const uuid = `.${new Date().getTime()}`;
type IThemeUserConfig = {
env: IThemeEnvConfig;
userConfig: UserConfig;
};
type IThemeConfig = {
additionalDataName: string;
themesName: string[];
defaultThemeName: string;
rootPath: string;
};
type IThemeLoadConfigOptions = {
defaultThemeName: string;
};
type IThemeEnvConfig = {
VITE_ENV_THEME_DEFAULT: string;
};
const loadConfig = (options: IThemeLoadConfigOptions) => {
const dirname = __dirname;
const { defaultThemeName } = options;
const config: IThemeConfig = {
additionalDataName: '',
themesName: [],
defaultThemeName: '',
rootPath: '',
};
const themeRootPath = path.resolve(dirname, PATHRESOLVETO);
let dir;
try {
dir = readdirSync(themeRootPath);
} catch (e) {
console.log(
colors.red.underline('project file directory not exist the "src/theme/default" folder!'),
);
return null;
}
if (dir.includes(ADDITIONALFILENAME)) {
config.additionalDataName = ADDITIONALFILENAME;
}
dir.forEach(name => {
const themePath = path.resolve(themeRootPath, `./${name}`);
const stats = fs.statSync(themePath);
if (stats.isDirectory()) {
const dir = readdirSync(themePath);
if (dir.includes(THEMEVARIABLESFILENAME)) {
config.themesName.push(name);
}
}
});
config.defaultThemeName = defaultThemeName || config.themesName[0] || 'default';
config.rootPath = themeRootPath;
return config;
};
const addCssAdditionalDataConfig = (themeConfig: IThemeConfig, userConfig: UserConfig) => {
const _config: UserConfig = {
css: {
preprocessorOptions: {
less: {
additionalData: (content, filePath) => {
const srcAppLess =
path.resolve(themeConfig.rootPath, '..').replace(/\\/g, '/') + '/app.less';
if (filePath === srcAppLess) {
const _content = `${content} \n @import "./theme/app.less";`;
return _content;
}
return content;
},
javascriptEnabled: true,
},
},
},
};
defaultsDeep(userConfig, _config);
};
interface IUserConfig extends UserConfig {
plugins: PluginOption[];
optimizeDeps: {
exclude: string[];
};
}
const addThemePreprocessorPluginConfig = (themeConfig: IThemeConfig, userConfig: UserConfig) => {
const pluginConfig: UserConfig = {
plugins: [],
optimizeDeps: {
exclude: [],
},
};
defaultsDeep(userConfig, pluginConfig);
const config = userConfig as IUserConfig;
config.plugins = [
...config.plugins,
themePreprocessorPlugin({
less: {
// 是否启用任意主题色模式,这里不启用
arbitraryMode: false,
// 提供多组变量文件
multipleScopeVars: themeConfig.themesName.map(name => {
const _path = path.resolve(themeConfig.rootPath, `./${name}/${THEMEVARIABLESFILENAME}`);
//console.log(_path);
return {
scopeName: name,
path: _path,
};
}),
defaultScopeName: themeConfig.defaultThemeName,
// 在生产模式是否抽取独立的主题css文件extract为true以下属性有效
// !!!【注意】这里必须是true
extract: true,
customThemeCssFileName: scopeName => scopeName + uuid,
removeCssScopeName: true,
},
}),
];
config.optimizeDeps.exclude = [
...config.optimizeDeps.exclude,
//【注意】 排除 import { toggleTheme } from "@crami/vite-plugin-theme-preprocessor/dist/browser-utils"; 在vite的缓存依赖
// 否则会造成切换失效
'@crami/vite-plugin-theme-preprocessor/dist/browser-utils',
];
};
const addThemeConfig = (options: IThemeUserConfig) => {
const { env, userConfig } = options;
const { VITE_ENV_THEME_DEFAULT: defaultThemeName } = env;
const themeConfig = loadConfig({ defaultThemeName });
if (!themeConfig) {
return;
}
if (themeConfig.additionalDataName) {
addCssAdditionalDataConfig(themeConfig, userConfig);
}
if (themeConfig.themesName && themeConfig.themesName.length > 0) {
addThemePreprocessorPluginConfig(themeConfig, userConfig);
}
};
export { addThemeConfig };

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./src/assets/login-top-logo-square.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ICP9.2</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@ -0,0 +1,23 @@
{
"name": "file",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"vite:build": "vite build",
"build:icons": "node ./build/svg-icons/index.js",
"preview": "vite preview"
},
"dependencies": {
"crypto-js": "^4.1.1"
},
"devDependencies": {
},
"pnpm":{
"overrides":{
"vue": "3.2.37"
}
}
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,168 @@
<template>
<h-b-config-provider
:locale="locale"
:component-size="sizeType"
:pro-table="proTableGlobalConfig"
:form="formGlobalConfig"
>
<h-props-provider :datePicker="datePickerGlobalConfig">
<router-view />
</h-props-provider>
</h-b-config-provider>
</template>
<script lang="ts">
import { computed, defineComponent, provide, watch, h, reactive, isRef, isShallow } from 'vue';
import { useI18n, setI18nLanguage } from '@crami/locale';
import { Icon } from '@crami/ui';
import { defaultLang, langMap } from './locales';
import type { ConfigProviderProps } from 'ant-design-vue/lib/config-provider';
import { baseInfo } from '@/store/baseInfo';
//
import { setLanguage, baseInfoHandle } from '@remote/icpx-platform/utils';
// import { locales } from '@remote/icpx-platform/lang';
// import { setLanguage } from '@/utils/localeUtils';
export default defineComponent({
name: 'App',
setup() {
//
const { t } = useI18n();
const i18n = useI18n();
//
const setGlobleLang = async (lang = defaultLang) => {
const i18n = useI18n();
//
let getLangObj = await import('@remote/icpx-platform/lang');
const langObj = await getLangObj.default(langMap[lang]);
//
i18n.mergeLocaleMessage(langMap[lang], langObj.default);
};
//
baseInfoHandle(baseInfo);
setLanguage(baseInfo.lang);
//
setGlobleLang(baseInfo.lang);
localStorage.setItem('TIME_ZONE', baseInfo.timeZone);
const getLocal = computed(() => {
const local = i18n.locale;
if (isRef(local) || isShallow(local)) {
return local.value;
}
return local;
});
const locale = computed(() => {
return i18n.getLocaleMessage(getLocal.value).antd as ConfigProviderProps['locale'];
});
//
const datePickerGlobalConfig = reactive({
timeZone: baseInfo.timeZone,
});
// const sizeType = computed(() => store.getters['app/sizeType']);
const sizeType = computed(() => 'default');
//
const proTableGlobalConfig = reactive({
toolbar: {
showSelectionTitle: true,
settingIcon: () => h(Icon, { name: 'icp-table-setting', width: '16px', height: '16px' }),
},
stripe: true,
showHeaderLine: true,
settingShowColumn: {
valueType: 'action',
},
headerAlign: 'start', //
pagination: {
showSizeChanger: true, //
showQuickJumper: true, //
pageSizeOptions: ['10', '20', '50', '100'], //
// showTotal: (total, range) => ` ${range[0]}~${range[1]} / ${total} `, //
showTotal: (total, range) =>
t('pages.table.pagination', {
total,
number1: range[0],
number2: range[1],
}), //
},
});
// form,dev使
const formGlobalConfig = reactive({
// layout: 'vertical', // horizontal vertical
// title: '',
// submitter: {
// actionButtonGroupPosition: 'top',
// //
// showAdvancedButton: true,
// // showAdvancedButton true
// autoAdvancedLine: 1,
// //
// alwaysShowLines: 1,
// },
//
queryFormProps: {
layout: 'horizontal',
title: '',
labelCol: { style: { width: '150px' } }, //
// submitter: {
// showActionButtonGroup: true,
// actionButtonGroupPosition: 'bottom',
// showAdvancedButton: true,
// autoAdvancedLine: 2,
// alwaysShowLines: 1,
// },
},
});
//
watch(
() => baseInfo.lang,
async () => {
await setGlobleLang(baseInfo.lang);
setLanguage(baseInfo.lang);
},
);
//
watch(
() => baseInfo.timeZone,
() => {
datePickerGlobalConfig.timeZone = baseInfo.timeZone;
localStorage.setItem('TIME_ZONE', baseInfo.timeZone);
},
);
return {
t,
i18n,
locale,
sizeType,
proTableGlobalConfig,
formGlobalConfig,
datePickerGlobalConfig,
baseInfo,
setGlobleLang,
};
},
});
</script>
<style scoped>
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
filter: drop-shadow(0 0 2em #42b883aa);
}
</style>

View File

@ -0,0 +1,41 @@
## Axios Typescript 使用说明
目前推荐封装请求方法直接使用 `src/utils/request.ts`
使用案例如下:
#### GET
```ts
async function getUser(id: number) {
return request.get<id, UserInfo>(`/user/${id}`);
}
// 返回结果为
// Promise<UserInfo>
```
#### POST / PUT
```ts
async function saveUser(user: UserInfo) {
// 定义用于得知是 新增 还是 修改
// 可根据自己业务自定义逻辑判断
const isNewRecord = user.id > 0;
return request<UserInfo, boolean>({
url: isNewRecord ? `/user/${id}` : `/user/`,
method: isNewRecord ? 'POST' : 'PUT',
data: user,
});
}
// 返回结果为
// Promise<boolean>
```
#### DELETE
```ts
async function deleteUser(id: number) {
return request.delete<number, boolean>(`/user/${id}`);
}
// 返回结果为
// Promise<boolean>
```

View File

@ -0,0 +1,135 @@
import type { APIMethod } from '@crami/bui-types';
//通用接口参数处理
import { getInfo, ICP_CONFIG } from '@remote/icpx-platform/utils';
import { computed, reactive } from 'vue';
export const commonApi = () => {
const commonParams = computed(() => {
return getInfo(ICP_CONFIG);
});
const studioCacheParam = reactive({
//产品线
productLine: commonParams.value?.project,
//语言
lang: commonParams.value?.lang,
//视图名称
// name: commonParams.value?.listView,
//行政组
// userDept: commonParams.value?.userDept,
// //用户组
// userGroup: commonParams.value?.userGroup,
//项目实例
projectCode: commonParams.value?.projectCode,
// 多时区
timeZone: commonParams.value?.TIME_ZONE,
});
const systemParam = reactive({
// viewName: commonParams.value?.listViewName,
lang: commonParams.value?.lang,
//数据库连接
connect: commonParams.value?.connect,
//所属租户
companyId: commonParams.value?.companyId,
//行政组
userDept: commonParams.value?.userDept,
//用户组
userGroup: commonParams.value?.userGroup,
projectCode: commonParams.value?.projectCode,
// 多时区
timeZone: commonParams.value?.TIME_ZONE,
});
const paraList = {
loadAllStructure: false,
lang: commonParams.value?.lang,
connect: commonParams.value?.connect,
companyId: commonParams.value?.companyId,
userGroup: commonParams.value?.userGroup,
projectCode: commonParams.value?.projectCode,
userDept: commonParams.value?.userDept,
};
return {
studioCache: {
getMetaInfo: {
url: '/api/studio-cache/page/getMetaInfo',
params: studioCacheParam,
method: 'post' as APIMethod,
},
getByProjectAndType: {
url: '/api/studio-cache/metaData/getByProjectAndType',
params: {
productLine: commonParams.value?.project,
projectCode: commonParams.value?.projectCode,
timeZone: commonParams.value?.TIME_ZONE,
},
method: 'get' as APIMethod,
},
},
system: {
getData: {
url: '/api/system/view/getData',
params: systemParam,
method: 'post' as APIMethod,
},
getGetOnePageGridDataList: {
url: '/api/system/model/getGetOnePageGridDataList',
params: {
...systemParam,
objectType: '',
},
method: 'post' as APIMethod,
},
getGetOnePageGridDataListByTenant: {
url: '/api/system/tenant/getGetOnePageGridDataList',
params: {
...systemParam,
objectType: '',
},
method: 'post' as APIMethod,
},
getSltData: {
url: '/api/system/model/getSltData',
params: {
...systemParam,
userId: commonParams.value?.user_id,
},
method: 'post' as APIMethod,
},
getGetTreeRootDataList: {
url: '/api/system/model/getGetTreeRootDataList',
params: {
...systemParam,
paraList: JSON.stringify(paraList),
type: 'tree',
loadAllStructure: false,
},
method: 'post' as APIMethod,
},
getGetTreeChildDataList: {
url: '/api/system/model/getGetTreeChildDataList',
params: {
...systemParam,
type: 'treeChildren',
loadAllStructure: false,
},
method: 'post' as APIMethod,
},
getObjectDataTestList: {
url: '/api/system/model/GetObjectDataTestList',
params: {
...systemParam,
userId: commonParams.value?.user_id,
},
method: 'post' as APIMethod,
},
saveObjectData: {
url: '/api/msg/sender/saveOrEditMsgSender',
params: {
...systemParam,
userId: commonParams.value?.user_id,
},
method: 'post' as APIMethod,
},
},
};
};

View File

@ -0,0 +1,71 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
export interface saveData {
ObjectType: string;
companyId: string;
connect: string;
data: {
ECODE: string;
EID: string;
ENAME: string;
EXPORTTYPE: string;
FILETYPE: string;
MAXCOUNT: string;
SETTING: string;
STATE: string;
TEMPLATE: string;
};
lang: string;
mode: string;
modelName: string;
newObject: string;
objectID: string;
productLine: string;
projectCode: string;
type: string;
userId: string;
}
export async function saveDataAPI(data: any) {
return await useHttp({
url: '/system/model/saveObjectData',
method: 'post',
data,
headers: {
//根据接扣文档需要加的请求头
'Content-Type': 'application/json',
},
});
}
export interface editData {
companyId: string;
connect: string;
lang: string;
objectID: string;
// projectCode: string;
// userDept: string;
// userGroup: string;
// userId: string;
}
export async function editDataAPI(data: editData) {
return await useHttp({
url: '/system/model/GetObjectDataTestList',
method: 'post',
data,
});
}
export interface deleteRule {
companyId: string;
connect: string;
lang: string;
eidstr: string[];
}
export async function deleteRuleAPI(data: deleteRule) {
return await useHttp({
url: '/exportservice/exportMaintain/deleteRule',
method: 'post',
data,
});
}

View File

@ -0,0 +1,152 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
export interface saveData {
ObjectType: string;
companyId: string;
connect: string;
data: {
ECODE: string;
EID: string;
ENAME: string;
ERROPTION: string;
FILETYPE: string;
MAXCOUNT: string;
SETTING: string;
STATEID: string;
TEMPLATE: string;
};
lang: string;
mode: string;
modelName: string;
newObject: string;
objectID: string;
productLine: string;
projectCode: string;
type: string;
userId: string;
}
export async function saveDataAPI(data: saveData) {
return await useHttp({
url: '/system/model/saveObjectData',
method: 'post',
data,
});
}
export interface editData {
companyId: string;
connect: string;
lang: string;
objectID: string;
// userId: string;
}
export async function editDataAPI(data: editData) {
return await useHttp({
url: '/system/model/GetObjectDataTestList',
method: 'post',
data,
});
}
// sheet页
export interface analysis {
dataList: any;
dataCache: string; //可以为空
companyId: string;
objectID: string;
connect: string;
lang: string;
userId: string;
}
export async function analysisTableAPI(data: analysis) {
return await useHttp({
url: '/importservice/importMaintain/getSheetNameTab',
method: 'post',
data,
});
}
//校验
export interface analysis2 {
dataList: any;
dataCache: string; //可以为空
companyId: string;
connect: string;
lang: string;
userId: string;
}
export async function verifyDataAPI(data: analysis2) {
return await useHttp({
url: '/importservice/import/checkData',
method: 'post',
data,
timeout: 999999999,
});
}
//解析
export interface analysisData {
fileId: string;
dataList: any;
companyId: string;
connect: string;
lang: string;
userId: string;
}
export async function analysisDataAPI(data: analysisData) {
return await useHttp({
url: '/importservice/import/extractData',
method: 'post',
data,
timeout: 999999999,
});
}
//下载获取文件id
export async function getFileId(data: analysis) {
return await useHttp({
url: '/importservice/importMaintain/getFileId',
method: 'post',
data,
});
}
//导入
export interface importErrList {
ecode: string; //编码 导入按钮上默认配置
dataCache: string; //数据缓存key
customValid: [];
companyId: string;
connect: string;
userId: string;
lang: string;
}
export async function importErrListAPI(data: importErrList) {
return await useHttp({
url: '/importservice/import/saveData',
method: 'post',
data,
timeout: 999999999,
});
}
export interface ExpRule {
companyId: string;
connect: string;
lang: string;
objectType: string;
dataRoute: string;
dataCache: string;
viewName: string;
isAll: string;
eids: [];
}
export async function ExpDataAPI(data: ExpRule) {
return await useHttp({
url: '/exportservice/export/exportGridData',
method: 'post',
data,
});
}

View File

@ -0,0 +1,29 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
export interface ExpRule {
companyId: string;
connect: string;
filter: [
{
andOrFlag: string;
field: string;
operation: string;
value: string;
},
];
lang: string;
objectType: string;
page: number;
pageNo: number;
pageSize: number;
data: any;
}
export async function ExpDataAPI(data: ExpRule) {
return await useHttp({
url: '/exportservice/export/exportGridData',
method: 'post',
data,
});
}

View File

@ -0,0 +1,44 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
export interface fileUpload {
file: string;
filePath: string;
fileShowName: string;
}
export async function FileUploadAPI(data: any) {
return await useHttp({
url: '/api/file/applicationFile/upload',
method: 'post',
data,
timeout: 999999999,
});
}
export interface downloadUrl {
fileId: string;
}
export async function downloadUrlAPI(fileId: string) {
return await useHttp({
url: `/api/file/applicationFile/template/downloadUrl/${fileId}`,
method: 'get',
});
}
export interface soleData {
Data: {
coding: string;
};
NewObject: boolean;
connect: string;
lang: string;
objectID: string;
objectType: string;
}
export async function soleDataAPI(data: soleData) {
return await useHttp({
url: '/api/system/model/CheckObjectUnique',
method: 'post',
data,
});
}

View File

@ -0,0 +1,30 @@
import request from '@/utils/request';
import { useHttp } from '@crami/http';
interface SaveMenu {
lang: string;
connect: string;
companyId: string;
objectId: string;
appId: string;
permissionType: string; // PC/MOBILE/API
userId: string;
data: Array<any>;
}
// 获取授权应用
export async function getApplication() {
return request.request<any, any>({
url: '/system/fun/getApplication',
method: 'POST',
});
}
// 授权菜单保存
export async function saveMenu(data: SaveMenu) {
return await useHttp({
url: '/api/menupermission/menuPer/saveMenuPer',
method: 'post',
params: data,
});
}

View File

@ -0,0 +1,52 @@
import request from '@/utils/request';
interface MetaData {
EID: string;
ECODE: string;
ENAME: string;
PUBLISHER: string;
PUBLISHDATE: string;
}
export interface RegisterResp {
data: Record<any, any>;
success: boolean;
}
interface deleteData {
EID: string;
}
// 新增
export async function addList(data: MetaData) {
return request.request<MetaData, RegisterResp>({
url: '/practice/tclBook/add',
method: 'POST',
data,
});
}
// 查询
export async function searchList(data: MetaData) {
return request.request<MetaData, RegisterResp>({
url: '/practice/tclBook/list ',
method: 'POST',
data,
});
}
export async function deleteList(data: deleteData) {
return request.request<deleteData, RegisterResp>({
url: '/practice/tclBook/delete',
method: 'POST',
data,
});
}
export async function updateList(data: MetaData) {
return request.request<MetaData, RegisterResp>({
url: '/practice/tclBook/update',
method: 'POST',
data,
});
}

View File

@ -0,0 +1,15 @@
import request from '@/utils/request';
export interface MetaData {
type: string;
project: string;
name: string;
}
export async function getByProjectAndType(data: MetaData) {
return request.request<MetaData, any>({
url: '/studio-cache/page/getMetaInfo',
method: 'POST',
data,
});
}

View File

@ -0,0 +1,87 @@
import { useHttp } from '@crami/http';
//获取转换服务左侧树
export async function getConvertTreeData() {
return await useHttp({
method: 'get',
url: '/api/file/conversion/console/clusterTree',
});
}
interface TableParams {
clusterName: string;
conversionDeal: string;
endPointName: string;
pageNumber: number;
pageSize: number;
}
//获取未完成列表
export async function getNoFinishList(params: TableParams) {
return await useHttp({
method: 'post',
url: '/api/file/conversion/console/listUnfinished',
params,
});
}
//获取已完成列表
export async function getFinishedList(params: TableParams) {
return await useHttp({
method: 'post',
url: '/api/file/conversion/console/listFinished',
params,
});
}
//已完成列表-删除
interface DeleteParams {
commandIds: string[];
}
export async function batchDelete(params: DeleteParams) {
return await useHttp({
method: 'delete',
url: '/api/file/conversion/console/batchDelete',
params,
});
}
interface CommandTextParams {
commandId: string;
}
//已完成列表--重新转换
export async function reConvert(params: CommandTextParams) {
return await useHttp({
method: 'get',
url: '/api/file/conversion/console/reCovert',
params,
});
}
//日志详情--获取命令正文
export async function getCommandText(params: CommandTextParams) {
return await useHttp({
method: 'get',
url: '/api/file/conversion/console/commandInfo',
params,
});
}
interface LogParams {
commandId: string;
//conversionId: string;
pageNumber: number;
pageSize: number;
}
//日志详情--转换服务日志
export async function getServiceLog(params: LogParams) {
return await useHttp({
method: 'post',
url: '/api/file/conversion/console/commandLog',
params,
});
}
//日志详情--转换程序日志
export async function getProgramLog(params: LogParams) {
return await useHttp({
method: 'post',
url: '/api/file/conversion/console/covertLog',
params,
});
}

View File

@ -0,0 +1,17 @@
import { commonApi } from '@remote/icpx-platform/commonApi';
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
export interface MetaData {
type: string;
productLine: string;
name: string;
}
export async function getByProjectAndType(params: MetaData) {
return useHttp({
url: commonApi().studioCache.getMetaInfo.url,
method: commonApi().studioCache.getMetaInfo.method,
params,
});
}

View File

@ -0,0 +1,91 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
interface saveTransfer {
transferStrategyName: string;
transferStrategyDescription: string;
transferStrategyCode: string;
inUse: string;
eid: string;
strategyList: Array<any>;
companyId: string;
}
interface deleteTransferr {
eidList: Array<any>;
}
interface getOneTransfer {
eid: string;
}
//替换当前版本
export async function getPluginList() {
return await useHttp({
method: 'get',
url: '/api/file/transfer/getPluginList',
});
}
// 传输策略新增
export async function saveTransfer(params: saveTransfer) {
return await useHttp({
method: 'post',
url: '/api/file/transfer/saveTransfer',
params,
});
}
// 传输策略编辑
export async function editTransfer(params: saveTransfer) {
return await useHttp({
method: 'post',
url: '/api/file/transfer/editTransfer',
params,
});
}
// 传输策略编辑回显
export async function getOneTransfer(eid: string) {
return await useHttp({
method: 'get',
url: '/api/file/transfer/getOneTransfer?eid=' + eid,
});
}
// 删除
export async function deleteTransferr(params: deleteTransferr) {
return await useHttp({
method: 'post',
url: '/api/file/transfer/deleteTransfer',
params,
});
}
export async function getList() {
return await useHttp({
method: 'get',
url: '/api/file/transfer/getPluginList',
});
}
// 拓展插件删除
export async function deleteExtensions(eid: string) {
return await useHttp({
method: 'get',
url: '/api/file/transfer/deleteExtensions?eid=' + eid,
});
}
// 1.查看插件详情
export async function getExtensionsDetail(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/transfer/getExtensionsDetail/${eid}`,
});
}

View File

@ -0,0 +1,353 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
interface createFileVolume {
appCode: string;
volumeCode: string;
volumeName: string;
volumeDescription: string;
storageCode: string;
fileLimitType: string; //文件类型
singleFileLimit: string; //单文件大小限制(KB)
volumeCapacityLimit: string; //文件卷容量上限(GB)
volumeUsedCapacity: string; //文件卷已使用容量(GB)
volumeCapacityWarning: string; //文件卷容量预警值(GB)
typeLimit: string; //类型限制
}
interface editFileVolume {
eid: string;
appCode: string;
volumeCode: string;
volumeName: string;
volumeDescription: string;
storageCode: string;
fileLimitType: string; //文件类型
singleFileLimit: string; //单文件大小限制(KB)
volumeCapacityLimit: string; //文件卷容量上限(GB)
volumeUsedCapacity: string; //文件卷已使用容量(GB)
volumeCapacityWarning: string; //文件卷容量预警值(GB)
typeLimit: string; //类型限制
}
interface editApplication {
eid: string;
appCode: string;
appName: string;
appDescription: string;
}
interface createApplication {
appCode: string;
appName: string;
appDescription: string;
}
interface deleteFileVolume {
EID: string;
}
interface fileList {
eid: string;
appCode: string;
volumeCode: string;
filePath: string;
fileShowName: string;
fileDescription: string;
versionCode: string;
metaInfo: string;
expiresOn: string;
isgeneralfile: string;
fileSize: string;
fileType: string;
}
interface createExtensions {
eid: string;
extensionName: string; //插件名称
extensionDescription: string; //插件描述
extensionId: string; //插string;件标识
serviceCode: string; //服务标识
inUse: string; //是否启用
fileTypes: string; //文件类型
}
interface createStorage {
eid: string;
storageName: string; //存储名称
storageDescription: string; //存储描述
states: string; //状态
accAddress: string; //地址
accUser: string; //用户
accPwd: string; //密码
capacityWarning: BigInt;
usedCapacity: BigInt;
}
/*
*/
export async function createFileVolume(params: createFileVolume) {
return await useHttp({
method: 'post',
url: '/api/file/fileVolume/createFileVolume',
params,
});
}
/*
*/
export async function editFileVolume(params: editFileVolume) {
return await useHttp({
method: 'put',
url: '/api/file/fileVolume/editFileVolume',
params,
});
}
/*
*/
export async function deleteFileVolume(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/fileVolume/${eid}`,
});
}
/*
*/
export async function duplicationStrategy() {
return await useHttp({
method: 'get',
url: '/api/file/storage/getOtherStrategy',
});
}
/*
*/
export async function getDetail(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/fileVolume/getDetailMsg/${eid}`,
});
}
//删除历史版本
export async function deleteHistory(eid: string) {
return await useHttp({
method: 'delete',
url: `/api/file/applicationFile/deleteHistoryFile/${eid}`,
});
}
//替换当前版本
export async function updateHistory(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/applicationFile/changeHistoryVersion/${eid}`,
});
}
// 新增应用仓库
export async function createApplication(params: createApplication) {
return await useHttp({
method: 'post',
url: '/api/file/applications/createApplication',
params,
});
}
// 编辑应用仓库
export async function editApplication(params: editApplication) {
return await useHttp({
method: 'put',
url: '/api/file/applications/editApplication',
params,
});
}
// 删除应用仓库
export async function deleteApplication(eid: string) {
return await useHttp({
method: 'delete',
url: `/api/file/applications/${eid}`,
});
}
// 新建文件信息保存
export async function createApplicationFile(params: fileList) {
return await useHttp({
method: 'post',
url: '/api/file/applicationFile/createApplicationFile',
params,
});
}
// 编辑文件信息保存
export async function editApplicationFile(params: fileList) {
return await useHttp({
method: 'put',
url: '/api/file/applicationFile/editApplicationFile',
params,
});
}
// 删除文件信息列表
export async function applicationFile(eid: string) {
return await useHttp({
method: 'delete',
url: `/api/file/applicationFile/${eid}`,
});
}
// 存储结构禁用
export async function changeStateDisable(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/storage/changeStateDisable/${eid}`,
});
}
// 存储结构启用
export async function changeStateEnable(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/storage/changeStateEnable/${eid}`,
});
}
// 传输策略启用
export async function transferEnable(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/transfer/changeStateEnable/${eid}`,
});
}
// 传输策略禁用
export async function transferDisable(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/transfer/changeStateDisable/${eid}`,
});
}
// 插件管理新增保存
export async function createExtensions(params: createExtensions) {
return await useHttp({
method: 'post',
url: '/api/file/transfer/createExtensions',
params,
});
}
// 插件管理编辑保存
export async function editExtensions(params: createExtensions) {
return await useHttp({
method: 'put',
url: '/api/file/transfer/editExtensions',
params,
});
}
// 存储结构新增保存
export async function createStorage(params: createStorage) {
return await useHttp({
method: 'post',
url: '/api/file/storage/createStorage',
params,
});
}
// 存储结构编辑保存
export async function editStorage(params: createStorage) {
return await useHttp({
method: 'put',
url: '/api/file/storage/editStorage',
params,
});
}
// 存储结构管理删除
export async function deleteStorage(eid: string) {
return await useHttp({
method: 'delete',
url: `/api/file/storage/Storage/${eid}`,
});
}
//文件同步服务--删除
interface DeleteParams {
eidstr: Array<string>;
}
export async function deleteFileSync(params: DeleteParams) {
return await useHttp({
method: 'post',
url: '/api/system/model/deleteObjectData',
params,
});
}
//重试同步
export async function reTrySync(params: DeleteParams) {
return await useHttp({
method: 'post',
url: '/api/file/syncRecord/retryFileSync',
params,
});
}
// interface eidArr {
// eid: Array;
// }
interface storageIds {
storageIds: Array<string>;
}
export async function getResetAlert(params: storageIds) {
return await useHttp({
method: 'post',
url: '/api/file/storage/getResetAlert',
params,
});
}
//文件卷容量预警
interface volumeIds {
volumeIds: Array<string>;
}
export async function resetWarn(params: volumeIds) {
return await useHttp({
method: 'post',
url: '/api/file/fileVolume/resetWarn',
params,
});
}
//存储集群详情
export async function getStorageByData(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/storage/getStorageByData/${eid}`,
});
}
//查看文件信息列表
export async function getFileByData(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/applicationFile/getFileByData/${eid}`,
});
}

View File

@ -0,0 +1,92 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
//保存批注
interface savaAnnotationFile {
fileCode: string;
userId: string;
}
export async function savaAnnotationFile(fileCode, params, userId) {
return await useHttp({
url: '/api/file/fileAnnotation/savaAnnotationFile?fileCode=' + fileCode + '&&userId=' + userId,
method: 'post',
params,
});
}
//获取用户id
export async function getFileCreateUser(fileCode) {
return await useHttp({
url: `/api/file/fileAnnotation/getFileCreateUser/${fileCode}`,
method: 'get',
});
}
//获取批注参数化树数据
export async function getAnnotationTree(fileCode) {
return await useHttp({
url: `/api/file/fileAnnotation/getAnnotationTree/${fileCode}`,
method: 'get',
});
}
//编辑批注
export async function updateAnnotationFile(params) {
return await useHttp({
url: '/api/file/fileAnnotation/updateAnnotationFile',
method: 'post',
params,
});
}
//根据id查询批注
interface getAnnotationFileByList {
fileCode: string;
userId: string;
state: number;
}
export async function getAnnotationFileByList(params: getAnnotationFileByList) {
return await useHttp({
url: `/api/file/fileAnnotation/getAnnotationFileByList`,
method: 'get',
params,
});
}
//根据id删除批注
interface deleteAnnotation {
eid: string;
preview: number;
}
export async function deleteAnnotation(eid: string) {
return await useHttp({
url: `/api/file/fileAnnotation/deleteAnnotation/${eid}`,
method: 'delete',
});
}
//预览
export async function download(eid: string, preview: number) {
return await useHttp({
url: `/api/file/applicationFile/download?eid=` + eid + '&&preview=' + preview,
method: 'get',
});
}
//批注权限
interface accessControl {
objId: string;
objType: string;
action: string; //( DOWNLOAD 下载 PRINT 打印)
}
export async function accessControl(params: accessControl) {
return await useHttp({
url: '/api/file/fileAnnotation/accessControl',
method: 'post',
params,
});
}

View File

@ -0,0 +1,102 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
import { commonApi } from '@remote/icpx-platform/commonApi';
export interface MetaData {
type: string;
productLine: string;
name: string;
mode: string;
}
export interface treeData {
type: string;
productLine: string;
// name: string;
loadAll: boolean;
objectType: string;
treeViewName: string;
userDept: string;
userGroup: string;
userId: string;
}
export async function getSelectData(params: MetaData) {
return await useHttp({
url: commonApi().studioCache.getMetaInfo.url,
method: commonApi().studioCache.getMetaInfo.method,
params,
});
}
export async function storageListAPI() {
return await useHttp({
method: 'get',
url: '/api/file/storage/getVolumeAcquireDuplicationStrategy',
});
}
export async function storageChildListAPI(eid: string) {
return await useHttp({
method: 'get',
url: `/api/file/storage/getOtherStorage/${eid}`,
});
}
export interface saveData {
eid: string;
mainStorageName: string;
mainStorageId: string; //主存储集群标识
duplicationParam: string; //调度参数
duplicationMode: string; //启动方式
inUse: string; //启用中
expiresMode: string; //过期策略
blockMode: string; //阻塞模式
expiresTimeLong: string; //任务超时时间
mayFailTime: string; //默认重试次数
// eslint-disable-next-line @typescript-eslint/ban-types
sequenceList: {};
}
export async function saveDataAPI(params: saveData) {
return await useHttp({
url: '/api/file/duplicationStrategy/saveDuplicationStrategy',
method: 'post',
params,
});
}
export async function showListAPI(storageId) {
return await useHttp({
url: `/api/file/orgStorage/${storageId}`,
method: 'get',
});
}
export interface saveList {
storageId: string;
organizationIds: string[];
}
export async function saveDataListAPI(params: saveList) {
return await useHttp({
url: '/api/file/orgStorage/saveOrgStorage',
method: 'post',
params,
});
}
export async function getDuplicationAPI() {
return await useHttp({
url: '/api/file/duplicationStrategy/getDuplicationStrategy',
method: 'get',
});
}
export async function getByProjectAndType(params: treeData) {
return useHttp({
url: commonApi().studioCache.getMetaInfo.url,
method: commonApi().studioCache.getMetaInfo.method,
params,
});
}

View File

@ -0,0 +1,80 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
import { commonApi } from '@remote/icpx-platform/commonApi';
interface uploadFile {
eid?: string;
filePath: string;
fileShowName: string;
fileDescription: string;
versionCode?: string;
metaInfo?: string;
volumeCode?: string;
fileSize: string;
fileType: string;
}
interface uploadFinished {
eid?: string;
storageId: string;
bucketCode: string;
objectCode: string;
fileId: string;
templateUrl: string;
fileShowName: string;
versionCode?: string;
fileSize: string;
fileType: string;
volumeCode?:string;
}
interface downloadUrl {
fileId: string;
}
export interface MetaData {
type: string;
productLine: string;
name: string;
mode: string;
}
export async function getByProjectAndType(params: MetaData) {
return await useHttp({
url: commonApi().studioCache.getMetaInfo.url,
method: commonApi().studioCache.getMetaInfo.method,
params,
});
}
export async function uploadFile(params: uploadFile) {
return await useHttp({
url: '/api/file/applicationFile/template/uploadUrl',
method: 'post',
timeout: 999999999,
params,
});
}
export async function uploadFinished(params: uploadFinished) {
return await useHttp({
url: '/api/file/applicationFile/template/uploadFinished',
timeout: 999999999,
method: 'put',
params,
});
}
export async function downloadUrl(fileId: string) {
return await useHttp({
url: `/api/file/applicationFile/template/downloadUrl/${fileId}`,
method: 'get',
});
}
export async function uploadMessage(eid: string) {
return await useHttp({
url: `/api/file/applicationFile/getOneFile/${eid}`,
method: 'get',
});
}

View File

@ -0,0 +1,144 @@
//import request from '@/utils/request';
import { useHttp } from '@crami/http';
import { commonApi } from '@remote/icpx-platform/commonApi';
export interface MetaData {
type: string;
productLine: string;
name: string;
}
export async function getLifeCycleData(params: MetaData) {
return useHttp({
url: commonApi().studioCache.getMetaInfo.url,
method: commonApi().studioCache.getMetaInfo.method,
params,
});
}
// 获取生命周期状态分组
export async function getLiftStatusList(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/getLifeStatusList',
method: 'post',
params,
});
}
// 获取生命周期详情
export async function getLiftCycleInfo(params: any) {
return useHttp({
url: '/api/lifecycle/lifeCycle/getLifeCircleById',
method: 'post',
params,
});
}
// 获取使用对象数据
export async function getModelList(params: any) {
return useHttp({
url: '/api/lifecycle/lifeCycle/getModelList',
method: 'post',
params,
});
}
// 保存生命周期
export async function saveLifeCircleData(params: any) {
return useHttp({
url: '/api/lifecycle/lifeCycle/saveLifeCircleData',
method: 'post',
params,
});
}
// 删除生命周期
export async function deleteLifeCircleDatas(params: any) {
return useHttp({
url: '/api/lifecycle/lifeCycle/deleteLifeCircleData',
method: 'post',
params,
});
}
// 删除生命周期校验
export async function deleteLifeCircleCheck(params: any) {
return useHttp({
url: '/api/lifecycle/lifeCycle/deleteLifeCircleCheck',
method: 'post',
params,
});
}
//删除状态列表
export async function deleteState(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/deleteLifeStatus',
method: 'post',
params,
});
}
//删除状态列表校验
export async function checkDeleteState(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/checkDelete',
method: 'post',
params,
});
}
// 获取节点插件数据
export async function getLifeCyclePlugins(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/getLifeCyclePlugins',
method: 'post',
params,
});
}
//获取状态分类下拉列表
export async function getStateTypeList(params: any) {
return useHttp({
//commonApi().system.getSltData.url
url: commonApi().system.getSltData.url,
method: commonApi().system.getSltData.method,
params,
});
}
//保存生命周期状态
export async function saveState(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/saveLifeStatus',
method: 'post',
params,
});
}
//获取多语言列表
export async function getLangList(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/getMutilLanuageList',
method: 'post',
params,
});
}
//上传文件
export async function uploadFile(data: any) {
return useHttp({
url: '/api/file/applicationFile/upload',
method: 'post',
data,
});
}
//获取单条数据
export async function getData(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/getSingleData',
method: 'post',
params,
});
}
//ID唯一性校验
export async function checkIDUnique(params: any) {
return useHttp({
url: '/api/lifecycle/lifeStatus/checkObjectUnique',
method: 'post',
params,
});
}

View File

@ -0,0 +1,30 @@
//import request from '@/utils/request';
import { useHttp } from '@crami/http';
import { commonApi } from '@remote/icpx-platform/commonApi';
export interface MetaData {
type: string;
productLine: string;
name: string;
}
export interface UserData {
lang: string;
connect: string;
companyId: string;
data: { id: string; ids: string };
}
export async function getByProjectAndType(params: MetaData) {
return useHttp({
url: commonApi().studioCache.getMetaInfo.url,
method: commonApi().studioCache.getMetaInfo.method,
params,
});
}
export async function saveUser(params: UserData) {
return useHttp({
url: '/system/dept/saveUser',
method: 'post',
params,
});
}

View File

@ -0,0 +1,16 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
export interface deleteConditionTag {
companyId: string;
connect: string;
lang: string;
eid: string;
}
export async function deleteConditionTag(data: deleteConditionTag) {
return await useHttp({
url: '/api/seniorquery/seniorQuery/delSeniorQueryByEid',
method: 'post',
data,
});
}

View File

@ -0,0 +1,52 @@
import request from '@/utils/request';
export interface getUserSetData {
}
export interface UserSetData {
// ENAME: string;
// USER_EMAIL: string;
// POST_IDS: string;
// USER_PHONE: string;
// USER_ADDRESS: string;
// AVATAR: string;
// PREFER:boolean;
// data:any;
// NewObject:boolean;
// ObjectType:string;
}
export interface UserSetResp {
data: Record<any, any>;
success: boolean;
}
export interface UpdateUserPassword {
}
//获取用户设置信息
export async function getUserSetting() {
return request.request<getUserSetData, UserSetResp>({
url: '/system/user/getUseInfo',
method: 'GET',
data: {},
});
}
//更新用户信息,更新用户偏好选择
export async function updateUserSetting(data: UserSetData) {
return request.request<UserSetData, UserSetResp>({
url: '/system/user/saveUserData',
method: 'POST',
data,
});
}
//更新登录密码
export async function updateUserPassword(data: UpdateUserPassword) {
return request.request<UpdateUserPassword, UserSetResp>({
url: '/system/user/updatePwd',
method: 'POST',
data,
});
}

View File

@ -0,0 +1,18 @@
import request from '@/utils/request';
import { useHttp } from '@crami/http';
// export async function getLoginPageInfo() {
// return request.get<any, any>('/system/loginPageElement/GetLoginPageInfo');
// }
export async function getLoginPageInfo() {
return useHttp({
url: '/system/loginPageElement/GetLoginPageInfo',
method: 'get',
});
// return request.get<any, any>('/system/loginPageElement/GetLoginPageInfo');
}
export async function saveLoginPageInfo(params) {
return request.post<any, any>('/system/loginPageElement/saveLoginPageInfo', params);
}

View File

@ -0,0 +1,43 @@
// import request from '@/utils/request';
import { useHttp } from '@crami/http';
export interface fileUpload {
file: string;
filePath: string;
fileShowName: string;
}
export async function FileUploadAPI(data: any) {
return await useHttp({
url: '/api/file/applicationFile/upload',
method: 'post',
data,
});
}
export interface downloadUrl {
fileId: string;
}
export async function downloadUrlAPI(fileId: string) {
return await useHttp({
url: `/api/file/applicationFile/template/downloadUrl/${fileId}`,
method: 'get',
});
}
export interface soleData {
Data: {
coding: string;
};
NewObject: boolean;
connect: string;
lang: string;
objectID: string;
objectType: string;
}
export async function soleDataAPI(data: soleData) {
return await useHttp({
url: '/api/system/model/CheckObjectUnique',
method: 'post',
data,
});
}

View File

@ -0,0 +1,19 @@
import { useHttp } from '@crami/http';
interface MenuLog {
uniqueId?: string;
title?: string;
operUrl?: string;
status?: string;
msg?: string;
companyId?: string;
}
// 菜单日志发送
export async function openMenuLog(data: MenuLog) {
return await useHttp({
url: '/api/log/operMenuLog/save',
method: 'post',
params: data,
});
}

View File

@ -0,0 +1,148 @@
import request from '@/utils/request';
import { useHttp } from '@crami/http';
export type LoginData = 'account' | 'telephone';
export type LoginStatus = 'ok' | 'error';
import { commonApi } from '@remote/icpx-platform/commonApi';
export interface LoginParams {
username: string;
password: string;
code: string;
uuid: string;
loginMode?: string;
}
export interface LoginResp {
code: number;
msg: string;
data: {
[key: string]: any;
};
// currentAuthority: string;
}
export interface UserInfo {
companyId: string;
connect: string;
avatar: string;
lang: string;
user_id: string;
user_name: string;
email: string;
group: string;
name: string;
phone: string;
signature: string;
user_type: string;
role: {
[key: string]: any;
};
}
export interface CaptchaResp {
captcha: number;
}
export interface SmsCaptchaRequest {
mobile: string;
}
// 后端的结构体定义
export type RouteItem = {
id: number | string;
parentId: number | string;
name: string;
path: string;
redirect: string;
component: string;
meta: {
title: string | false;
icon?: string;
target?: '_blank' | '_self';
hideInMenu?: boolean;
hideChildrenInMenu?: boolean;
authority?: string | string[];
[key: string]: any;
};
};
export interface PermissionRequest {
lang: string;
objectId: string;
productLine: string;
companyId: string;
connect: string;
userType: string;
userName: string;
orgId: string;
projectCode: string;
permissionType: string;
}
export async function getLoginCode() {
return request.get<any, any>('/code');
}
export async function getTenant() {
return request.get<any, any>('/system/tenant/getTenant');
}
export async function postAccountLogin(params: LoginParams) {
return request.post<LoginParams, LoginResp>('/auth/login', params);
}
// 获取组织列表接口
export async function getOrgByUserName(params) {
return request.post<any, any>('/system/org/getOrgByUserName', params);
}
export async function getLoginOrg() {
return request.get<any, any>('/system/org/getOrg');
}
export async function getCurrentUser(info: any) {
return request.get<any, UserInfo>('/system/user/getUseInfo', { params: info });
}
export async function getProjectRoutes(info: any) {
const method = commonApi().studioCache.getByProjectAndType.method;
const url = commonApi().studioCache.getByProjectAndType.url;
return request[method]<any, any>(url.replace('/api', ''), { params: info });
}
export async function getCurrentUserNav() {
return request.get<any, RouteItem[]>('/currentUserNav');
}
// export async function postLogout() {
// return request.delete<any, any>('/auth/logout');
// }
export async function postLogout(isClear) {
const url = isClear ? '/api/auth/logout/1' : '/api/auth/logout/0';
return await useHttp({
method: 'delete',
url: url,
});
}
export async function getSmsCaptcha(params: SmsCaptchaRequest) {
return request.get<SmsCaptchaRequest, CaptchaResp>('/message/captcha/sms', {
params,
});
}
// 获取当前用户的导航和menu权限
export async function getPermissionData(params: PermissionRequest) {
return request.post<any, any>('/menuperservice/function/getPermissionData', params);
}
// 获取当前用户的导航和menu权限
export async function changeOrgIdOfUserInRedis(params: any) {
return request.post<any, any>('/auth/changeOrgIdOfUserInRedis', params);
}
// 根据当前用户获取默认的登录方式
export async function getLoginModeByUserName(params: any) {
return request.post<any, any>('/system/org/getLoginModeByUserName', params);
}

View File

@ -0,0 +1,27 @@
import request from '@/utils/request';
import type { CSSProperties } from 'vue';
export type NoticeIconData = {
avatar?: string;
title?: string;
description?: string;
datetime?: string;
extra?: string;
style?: CSSProperties;
key?: string | number;
read?: boolean;
};
export type NoticeItem = {
id: string;
type: string;
status: string;
} & NoticeIconData;
export async function queryNotices() {
return request.get<any, NoticeItem[]>('/notices');
}
export async function changeNoticeReadState(notices: any[]): Promise<any> {
return request.post('/change-notices-read', notices);
}

View File

@ -0,0 +1,30 @@
import request from '@/utils/request';
export interface RegisterData {
lang: string;
connect: string;
project: string;
companyId: string;
orgId: string;
roleId: string;
username: string;
password: string;
password2: string;
userPhone: string;
code: string;
}
export interface RegisterResp {
data: Record<any, any>;
success: boolean;
code?: number | undefined;
msg?: string | undefined;
}
export async function postRegister(data: RegisterData) {
return request.request<RegisterData, RegisterResp>({
url: '/auth/register',
method: 'POST',
data,
});
}

View File

@ -0,0 +1,130 @@
import { useHttp } from '@crami/http';
export interface MetaData {
connect: string;
lang: string;
companyId: string;
userId: string;
}
export interface BoardMetaData extends MetaData {
boardId: string,
}
export interface TreeMetaData extends MetaData {
cardGroup: string,
}
export interface SimplifyCardData {
// 虽然属性名为cardId其实是指卡片编码属性
cardId: string,
cardName: string,
abscissa: number | string,
ordinate: number | string,
width: number | string,
height: number | string,
}
export interface CardData extends SimplifyCardData {
boardId: string,
}
export interface AddPageMetaData extends MetaData {
boardName: string,
boardDefault: 'YSE' | 'NO',
workBenchParas: SimplifyCardData[],
}
export interface EditPageMetaData extends AddPageMetaData {
boardId: string,
stateID: string,
boardType: string,
// stateID: 'ENABLE',
// boardType: 'CUSTOM_CARD',
}
export interface BoardDetailMetaData {
code: number,
msg: string,
data: {
boardId: string,
boardName: string,
// 看板状态
stateID: 'ENABLE',
// 是否默认看板
boardDefault: 'NO',
// 看板类型
boardType: 'CUSTOM_CARD',
createUid: string,
createTime: string,
updateUid: string,
updateTime: string,
// 租户
companyId: string,
workBenchs: CardData[],
}
}
// 新增、编辑看板
export async function saveBoard(params: AddPageMetaData | EditPageMetaData | any) {
return useHttp({
url: '/api/workbench/board/saveBoard',
method: 'post',
params,
});
}
// 查询看板详情
export async function queryBoardDetail(params: BoardMetaData): Promise<BoardDetailMetaData> {
return useHttp({
url: '/api/workbench/board/queryBoard',
method: 'post',
params,
});
}
// 停用看板
export async function disableBoard(params: BoardMetaData) {
return useHttp({
url: '/api/workbench/board/disableBoard',
method: 'post',
params,
});
}
// 启用看板
export async function enableBoard(params: BoardMetaData) {
return useHttp({
url: '/api/workbench/board/enableBoard',
method: 'post',
params,
});
}
// 查询卡片分类/卡片树接口
export async function getBoardCardTypeListTree(params: TreeMetaData) {
return useHttp({
url: '/api/workbench/cardType/getBoardCardTypeListTree',
method: 'post',
params,
});
}
// 看板设为默认
export async function setDefaultBoard(params: BoardMetaData) {
return useHttp({
url: '/api/workbench/board/setDefaultBoard',
method: 'post',
params,
});
}
// 查询我的看板列表
export async function getMyBoardList(params: MetaData) {
return useHttp({
url: '/api/workbench/board/getMyBoardList',
method: 'post',
params,
});
}

View File

@ -0,0 +1,67 @@
import { useHttp } from '@crami/http';
export interface MetaData {
connect: string;
lang: string;
companyId: string;
userId: string;
}
export interface CardMetaData extends MetaData {
// 虽然属性名为cardId其实是指卡片编码属性
cardId: string;
}
// 卡片管理-删除卡片
export async function deleteCard(params: CardMetaData) {
return useHttp({
url: '/api/workbench/card/deleteCard',
method: 'post',
params,
});
}
// 卡片管理-校验卡片是否在使用
export async function checkCardUsed(params: CardMetaData) {
return useHttp({
url: '/api/workbench/card/checkCardUsed',
method: 'post',
params,
});
}
// 卡片管理-启用卡片
export async function enableCard(params: CardMetaData) {
return useHttp({
url: '/api/workbench/card/enableCard',
method: 'post',
params,
});
}
// 卡片管理-停用卡片
export async function disableCard(params: CardMetaData) {
return useHttp({
url: '/api/workbench/card/disableCard',
method: 'post',
params,
});
}
// 查询卡片分类树接口
export async function getCardTypeListTree(params: MetaData) {
return useHttp({
url: '/api/workbench/cardType/getCardTypeListTree',
method: 'post',
params,
});
}
// 查询卡片列表
export async function getCardList(params: MetaData) {
return useHttp({
url: '/api/workbench/card/getCardList',
method: 'post',
params,
});
}

View File

@ -0,0 +1,21 @@
export interface ResponseBody<T = any> {
message: string;
code: number;
data?: T | T[];
}
/** 统一返回结构体 */
export interface PageResult<T = any> {
data: T[];
current?: number;
pageSize?: number;
total?: number;
success: boolean;
}
export interface RequestResult<T = any> {
data: T;
success: boolean;
errorMessage: string;
}

View File

@ -0,0 +1,130 @@
import request from '@/utils/request';
import { commonApi } from '@remote/icpx-platform/commonApi';
export interface MetaData {
type: string;
project: string;
name: string;
}
export interface ProcessInfoData {
processDefinitionName?: string;
processState?: string;
nodeTime?: string;
remainderTime?: string;
operationList?: string;
routerName?: string;
[key: string]: any;
}
export interface ApproverDataItem {
key: string;
[key: string]: any;
approverType: string;
approverName: string;
approvalUserList: Array<any>;
// users: UserItem[];
}
export interface MakerItemDataItem {
key: string;
[key: string]: any;
ccType: string;
ccName: string;
makeUserList: Array<any>;
}
export interface ParameterDataItem {
name: string;
value: string;
}
export interface ProcessDataBase {
processDefinitionName: string;
processDefinitionKey: string;
categoryId: string;
processDesc: string;
launchDisplay: string;
}
export interface ProcessCopyListMember {
makeType?: string; // "user",
makeTypeName?: string; // "用户"
optionList?: Array<any> | string;
key?: string;
[key: string]: any;
}
export interface ProcessDataCopyList {
makeTimeType?: string; // "抄送时间类型" 1、流程结束(默认)。0、流程发起
makeList?: Array<ProcessCopyListMember>;
}
// 发起人范围信息
export interface ProcessDataSpon {
sponType: string;
sponTypeName: string;
sponUsers: Array<any> | string;
key: string;
[key: string]: any;
}
export interface ProcessDataFormInfo {
bindFormType?: string; // '绑定表单类型';
defaultFormId?: string; // '在线表单Id';
pageCode?: string; // '表单编码';
defaultRouterName?: string; // '在线表单的缺省路由名称';
}
export interface ProcessNodeModel {
nodeKey?: string; //"节点编码",
nodeName?: string; //"节点名称",
allowUpdate?: string; //"允许修改", 1允许/0禁止。
acceptanceEmpty?: string; //"验收手动指定为空" 1允许/0不允许
}
export interface PlugItem {
id: string;
name: string;
page: string;
}
export interface ProcessData extends ProcessDataBase, ProcessDataFormInfo {
sponScope?: string; //发起人范围 1无限制/0限制范围
flowSponDtoList?: Array<ProcessDataSpon>;
// [{
// sponType:string;
// sponTypeName:string;
// "sponUsers": [{
// "sponId":string;
// "sponName":string;
// }]
// }],
modelScope?: string; //"适用模型是否限制", 1无限制/0适用模型限制范围
flowApplyModelDtoList?: Array<any>;
// [{
// "processApplyModelId"?: string;//"流程适用模型对象id",
// "processApplyModelName"?: string;//"流程适用模型对象名称"
// }];
sponRetreat?: string; //"发起人是否可撤回", 1允许/0禁止
flowNodes?: Array<string>; // ['', ''];
updateApprover?: string; //"能否修改执行人", 1允许/0禁止
flowNodeModel?: {
modifier_type?: Array<string>; //["sponsor","executor"],
flowNodeModels?: Array<ProcessNodeModel>;
};
canUrge?: string; //"能否催办", 1允许/0禁止
flowMakeUp?: ProcessDataCopyList; //抄送人
pluginData?: Array<PlugItem>;
bpmnXml?: string; // '流程定义的xml';
}
export async function getByProjectAndType(data: MetaData) {
return request.request<MetaData, any>({
url: '/studio-cache/page/getMetaInfo',
method: 'POST',
data,
});
}
export async function getFlowCategory() {
return request.request<MetaData, any>({
url: '/system/model/getSltData',
method: commonApi().system.getSltData.method,
data: {
...commonApi().system.getSltData.params,
paraList: '{}',
type: 'tree',
// userId: 'P_SYS_USER_0162a3c2c85c45f2b4fa3baffc350d6d',
viewName: 'P_FLOW_CLASSIFYPULL_LISTVIEW',
},
});
}

View File

@ -0,0 +1,677 @@
// @import './components/header-dropdown.less';
// @import './components/table/pro-table.less';
@import '../src/theme/default/variables.less';
body::-webkit-scrollbar {
width: 0 !important;
}
body {
width: 100% !important;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
}
#app {
height: 100%;
}
.slide-fadein-up-enter-active,
.slide-fadein-up-leave-active {
transition: opacity 0.3s, transform 0.4s;
}
.slide-fadein-up-enter-from {
transform: translateY(20px);
opacity: 0;
}
.slide-fadein-up-leave-to {
transform: translateY(-20px);
opacity: 0;
}
.slide-fadein-right-enter-active,
.slide-fadein-right-leave-active {
transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
}
.slide-fadein-right-enter-from {
transform: translateX(-20px);
opacity: 0;
}
.slide-fadein-right-leave-to {
transform: translateX(20px);
opacity: 0;
}
.zoom-fadein-enter-active,
.zoom-fadein-leave-active {
transition: transform 0.3s, opacity 0.3s ease-in-out;
}
.zoom-fadein-enter-from {
transform: scale(0.99);
opacity: 0;
}
.zoom-fadein-leave-to {
transform: scale(1.01);
opacity: 0;
}
.fadein-enter-active,
.fadein-leave-active {
transition: opacity 0.3s ease-in-out !important;
}
.fadein-enter-from,
.fadein-leave-to {
opacity: 0 !important;
}
@media (max-width: 480px) {
.pro-components-header-dropdown-index-container {
width: 100% !important;
}
.ant-table {
width: 100%;
overflow-x: auto;
}
.ant-table-tbody > tr > td,
.ant-table-tbody > tr > th,
.ant-table-thead > tr > td,
.ant-table-thead > tr > th {
white-space: pre;
}
.ant-table-tbody > tr > td > span,
.ant-table-tbody > tr > th > span,
.ant-table-thead > tr > td > span,
.ant-table-thead > tr > th > span {
display: block;
}
}
.pb10 {
padding-bottom: 10px;
}
[data-pro-theme='antdv-pro-theme-dark'] {
&,
* {
color-scheme: dark !important;
}
}
// 隐藏树的连接线
.ant-tree-indent {
.ant-tree-indent-unit::before {
display: none;
}
}
// 账号设置页面专属tabs-left布局
.setPage {
.ant-tabs.ant-tabs-left {
& > .ant-tabs-nav {
// height: 120px !important;
.ant-tabs-tab {
margin: 0 !important;
padding: 0 34px !important;
padding-bottom: 0;
line-height: 40px;
}
.ant-tabs-tab-active {
background: #1890ff;
border-left: 0 solid #eee;
.ant-tabs-tab-btn {
color: #fff;
}
}
}
}
}
// table操作列更多按钮字体颜色样式
.surely-table-cell-inner .surely-table-cell-content .ant-space .ant-space-item .ant-btn-text {
color: #1890ff;
}
.surely-table-cell-text-ellipsis,
.surely-table-cell-ellipsis,
.ant-select-item-option-content span,
.ant-select-selection-item,
.crami-hbtree-tree-title-text {
white-space: pre !important;
}
// 修改InputNumber宽度
.ant-input-number {
width: 100% !important;
}
//树列表菜单按钮背景色
#h-context-menu .ant-menu-light .ant-menu-item-active {
background: #e8f0fd !important;
color: #3979f9 !important;
}
.cron-div .ant-input-number {
width: 58px !important;
}
.cron-div .ant-tabs-nav {
margin: 0 !important;
}
.cron-div .ant-tabs-tab {
border-radius: 0 !important;
background: #fafafa !important;
}
// .file-application .ant-input-affix-wrapper{
// height: 40px;
// }
.cron-div .ant-tabs-nav .ant-tabs-tab-active {
background: none !important;
color: #1890ff !important;
}
.cron-div .fas-icon-list-checked {
background: #3979f9 !important;
}
.app-custom-edit-form-header {
height: 36px;
padding: 0 20px;
color: #333;
font-weight: bold;
font-size: 14px;
line-height: 36px;
background-color: #f5f6f7;
}
.app-custom-edit-form-operation {
text-align: right;
.ant-form-item {
width: 100% !important;
}
}
.app-custom-edit-form-body {
// padding: 0 5px 0 20px;
.ant-form-item {
width: 90%;
margin: 10px 0;
}
& > .ant-row {
padding: 0 5px 0 20px;
}
& > .ant-row:nth-of-type(2n) {
background: #f9f9f9;
}
& > .ant-row:nth-last-child(1) {
width: 100% !important;
padding-right: 15px;
background: transparent;
}
}
.ant-pagination {
.ant-pagination-item,
.ant-pagination-item > a,
.ant-pagination-item-active,
.ant-pagination-item:hover {
overflow: hidden;
border-radius: 4px !important;
}
.ant-pagination-prev .ant-pagination-item-link,
.ant-pagination-next .ant-pagination-item-link {
border-radius: 4px !important;
}
}
.workflow_content {
height: calc(100vh - 159px) !important;
}
//选中项得菜单导航背景色
.ant-menu-vertical .ant-menu-submenu-selected,
.ant-menu-vertical-left .ant-menu-submenu-selected,
.ant-menu-vertical-right .ant-menu-submenu-selected {
background: @menu-item-active-bg;
}
//菜单收起时2级菜单隐藏滚动条
.ant-menu-vertical.ant-menu-sub::-webkit-scrollbar {
width: 0;
}
// 查看样式
.platform-b-description-form {
// 此处修改不更新HT-TCL只用于平台
.ant-form-item-label.ant-col-12 {
// width: 100% !important;
flex: inherit;
}
.hoteam-b-form-col-item {
overflow: hidden;
}
.crami-form-item-body {
margin-right: 0 !important;
margin-left: 0 !important;
padding-bottom: 10px;
}
.hoteam-b-form-col-item-divider {
padding: 0 !important;
border: none !important;
.hoteam-b-form-divider {
margin: 0 !important;
padding-right: 0 !important;
padding-left: 0 !important;
background: transparent !important;
}
&:nth-of-type(n + 2) {
margin-top: 24px;
}
}
.ant-form-item-label {
.hoteam-b-form-item-label-break {
font-weight: 600;
}
}
.ant-form-item-control .ant-form-item-control-input-content {
white-space: nowrap;
}
.ant-form-item-control .ant-form-item-control-input-content .hoteam-b-form-item-content {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
//工作流-设计器样式 右侧选项栏更改
.process-design-wrapper {
.process-design-options {
.process-panel__container.process-panel {
.process-panel__container-button {
.process-panel__container-form {
.ant-tabs-content.ant-tabs-content-top {
padding: 1px 20px;
overflow-y: auto;
}
}
}
}
}
}
.h-color-picker-div {
width: 32px;
height: 32px;
}
// rule 红色提示语样式
.ant-form-item-with-help .ant-form-item-explain {
min-height: 18px;
line-height: 18px;
font-size: 12px;
margin-bottom: 6px;
}
//布局调整相关class
//页面最外层的padding
.main-content-padding {
padding: @main-content-padding;
}
//所有页面统一得class
.main-content {
}
//盒子间的margin(统一使用margin-right 和 margin-bottom)
.margin-left {
margin-left: @margin-left;
}
.margin-right {
margin-right: @margin-right;
}
.margin-top {
margin-top: @margin-top;
}
.margin-bottom {
margin-bottom: @margin-bottom;
}
.margin-all {
margin: @margin-all;
}
//flex布局(页面排列方式横向时用,例如左树右表结构)
.flex-content {
display: flex;
height: 100%;
}
//固定宽度(一般用于左侧树)
.width-fixed {
width: @width-fixed;
}
//右侧计算宽度(一般用于右侧表格)
.width-computed {
width: calc(100% - @margin-right - @width-fixed);
}
//无card-header时的card-body(左侧是树组件或其他时用)
.no-card-head {
.ant-card-body {
height: 100%;
}
}
//有card-header时的card-body(左侧是树组件或其他时用)
.has-card-head {
.ant-card-body {
height: calc(100% - 65px);
}
}
//根据组件模块划分得class(加载包裹组件的card上)
//页面
//查询表单
.list-query-form {
//修改查询表单的padding-bottom:
.ant-card-body {
// padding-bottom: 0;
padding: 12px 24px 0;
//修改标题得样式
.hoteam-b-form {
.hoteam-b-form-title {
//颜色#333
color: @heading-color;
//字重600
font-weight: 600;
//字号16
font-size: 16px;
//行高22
line-height: 34px;
}
//分割线样式
.ant-row .ant-divider-horizontal {
margin: 0;
margin-bottom: 12px;
}
//输入框label与属于框得间距
.hoteam-b-form-col-item {
.hoteam-b-form-item-break {
// margin-bottom: 24px;
.ant-form-item-label {
padding: 0 0 4px;
}
}
}
}
}
}
//树
.list-tree {
}
//表格
.list-table {
> .ant-card-body {
padding: 0 24px;
}
//统一修改list-table的标题
.hoteam-b-table-list-toolbar-container {
height: auto;
padding-top: 12px;
padding-bottom: 12px;
line-height: 32px;
}
.hoteam-b-table-list-toolbar-title {
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 16px;
}
}
.list-table-not-hb {
> .ant-card-body {
padding: 15px 24px 0 24px;
}
}
//tab页(纯table)
.list-tab-box {
.ant-card-body {
padding: 0 24px 0 46px;
.ant-tabs-top > .ant-tabs-nav,
.ant-tabs-bottom > .ant-tabs-nav,
.ant-tabs-top > div > .ant-tabs-nav,
.ant-tabs-bottom > div > .ant-tabs-nav {
margin: 0;
}
.ant-tabs-tab {
padding: 16px 0;
color: #999;
font-size: 16px;
line-height: 24px;
}
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
}
.ant-tabs-tab + .ant-tabs-tab {
margin: 0 0 0 28px;
}
.ant-space-item span {
font-size: 16px;
}
}
}
//tab页(内有其他内容)
.list-tab-box-has-content {
> .ant-card-body {
padding: 0 24px 0;
.ant-tabs-top > .ant-tabs-nav,
.ant-tabs-bottom > .ant-tabs-nav,
.ant-tabs-top > div > .ant-tabs-nav,
.ant-tabs-bottom > div > .ant-tabs-nav {
margin: 0;
}
.ant-tabs-tab {
padding: 16px 0;
color: #999;
font-size: 16px;
line-height: 24px;
}
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
}
.ant-tabs-tab + .ant-tabs-tab {
margin: 0 0 0 24px;
}
.ant-space-item span {
font-size: 16px;
}
}
}
//switch开关样式重写
.list-switch,
.ant-switch {
width: 45px;
height: 18px;
border: none;
box-shadow: none;
.ant-switch-handle {
top: -3px;
width: 24px;
height: 24px;
border: none;
border-radius: 24px;
}
.ant-switch-handle::before {
right: 3px;
left: -3px;
border: 1px solid #e1e2e6;
border-radius: 24px;
}
}
//项目上发现新的通用组件的时可以加在这里;
//增加一个class主要给租户页面和工作流中卡片类型的页面 该类的card-body的上下间距是一致的如果有标题标题的间距
.list-card-form {
.ant-card-head {
//间距20
padding: 0 20px;
//增加下边框
.ant-card-head-wrapper {
//标题样式
.ant-card-head-title {
color: #000;
font-weight: 600;
font-size: 18px;
line-height: 25px;
}
//额外按钮样式
.ant-card-extra {
//padding0
padding: 0;
}
}
}
.ant-card-body {
padding: 16px 24px;
}
}
//重置包裹组件得card得边框为0
.list-query-form.ant-card-bordered,
.list-tree.ant-card-bordered,
.list-table.ant-card-bordered,
.list-tab-box.ant-card-bordered,
.list-table-has-card-head.ant-card,
.list-form-has-card-head.ant-card,
.list-form-has-card-head-normal.ant-card,
.list-card-form.ant-card,
.list-tab-box-has-content.ant-card,
.list-table-no-bottom.ant-card,
.list-descriptions.ant-card {
border: 0;
}
//统一修改card组件包裹时的圆角
.list-query-form.ant-card,
.list-tree.ant-card,
.list-table.ant-card,
.list-tab-box.ant-card,
.list-table-has-card-head.ant-card,
.list-form-has-card-head.ant-card,
.list-form-has-card-head-normal.ant-card,
.list-card-form.ant-card,
.list-tab-box-has-content.ant-card,
.list-table-no-bottom.ant-card,
.list-descriptions.ant-card {
border-radius: 8px;
}
//统一修改list-tree的样式
//带标题的
.has-card-head.list-tree {
.ant-card-head {
//间距20
padding: 0 20px;
//下边框0
border-bottom: 0;
//增加下边框
.ant-card-head-wrapper {
border-bottom: 1px dashed #e9e9e9;
//标题样式
.ant-card-head-title {
color: #000;
font-weight: 600;
font-size: 16px;
line-height: 22px;
}
//额外按钮样式
.ant-card-extra {
//padding0
padding: 0;
}
}
}
.ant-card-body {
padding: 15px 20px 24px;
}
}
//不带标题的
.no-card-head.list-tree {
.ant-card-body {
padding: 16px 20px 24px;
}
}
//统一修改list-table-has-card-head得样式
.list-table-has-card-head,
.list-table-no-bottom {
.ant-card-head {
//下边框0
border-bottom: 0;
//增加下边框
.ant-card-head-wrapper {
border-bottom: 1px dashed #e9e9e9;
//标题样式
.ant-card-head-title {
color: #333;
font-weight: 600;
font-size: 16px;
line-height: 22px;
}
//额外按钮样式
.ant-card-extra {
//padding0
padding: 0;
}
}
}
}
.list-table-has-card-head {
> .ant-card-body {
padding: 15px 24px 24px;
}
}
.list-table-no-bottom {
> .ant-card-body {
padding: 15px 24px 0 24px;
}
}
//统一修改list-form-has-card-head,.list-form-has-card-head-normal(此class与list-form-has-card-head的区别为card-padding 不同) 得样式
.list-form-has-card-head,
.list-form-has-card-head-normal {
.ant-card-head {
//下边框0
border-bottom: 0;
//增加下边框
.ant-card-head-wrapper {
border-bottom: 1px dashed #e9e9e9;
//标题样式
.ant-card-head-title {
color: #333;
font-weight: 600;
font-size: 16px;
line-height: 22px;
}
//额外按钮样式
.ant-card-extra {
//padding0
padding: 0;
}
}
}
}
.list-form-has-card-head-normal {
.ant-card-body {
padding: 16px 24px;
}
}
.list-form-has-card-head {
.ant-card-body {
padding: 15px 24px 0;
}
}
//弹框下的card的边框,间距都为0
.ant-modal-body {
> .ant-card.ant-card-bordered {
margin: 0;
padding: 0;
border: 0;
}
}
//解决HBTable自定义展开icon换行问题
.hoteam-b-table {
.surely-table-append-node {
display: contents;
}
}
// 调整工作流自定义表单浏览模式下样式
.formbuilder-view-workspace {
padding: 20px 0;
}
// TODO: 去掉行内按钮的padding
.surely-table-cell-inner .surely-table-cell-content .ant-space.ant-space-horizontal.ant-space-align-center .ant-space-item .ant-btn { padding: 0
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>收起(1)</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="收起(1)" fill-rule="nonzero">
<rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="12" height="12"></rect>
<g id="编组-8" transform="translate(2.414214, 1.433607)" fill="#999999">
<path d="M1.70710678,0.773499349 L5.22650065,4.29289322 C5.61702494,4.68341751 5.61702494,5.31658249 5.22650065,5.70710678 L1.70710678,9.22650067 C1.31658249,9.61702497 0.683417511,9.61702497 0.292893219,9.22650067 C0.10535684,9.03896427 4.4408921e-16,8.78461036 4.4408921e-16,8.51939387 L4.4408921e-16,1.48060613 C4.4408921e-16,0.928321379 0.44771525,0.480606129 1,0.480606129 C1.26521649,0.480606129 1.5195704,0.585962969 1.70710678,0.773499349 Z" id="路径" transform="translate(2.759697, 5.000000) scale(-1, 1) translate(-2.759697, -5.000000) "></path>
<rect id="矩形" x="6.58578587" y="-4.4408921e-16" width="1" height="10" rx="0.5"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>展开(1)</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="展开(1)" fill-rule="nonzero">
<rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="12" height="12"></rect>
<g id="编组-8" transform="translate(5.792893, 6.433607) scale(-1, 1) translate(-5.792893, -6.433607) translate(2.000000, 1.433607)" fill="#999999">
<path d="M1.70710678,0.773499349 L5.22650065,4.29289322 C5.61702494,4.68341751 5.61702494,5.31658249 5.22650065,5.70710678 L1.70710678,9.22650067 C1.31658249,9.61702497 0.683417511,9.61702497 0.292893219,9.22650067 C0.10535684,9.03896427 4.4408921e-16,8.78461036 4.4408921e-16,8.51939387 L4.4408921e-16,1.48060613 C4.4408921e-16,0.928321379 0.44771525,0.480606129 1,0.480606129 C1.26521649,0.480606129 1.5195704,0.585962969 1.70710678,0.773499349 Z" id="路径" transform="translate(2.759697, 5.000000) scale(-1, 1) translate(-2.759697, -5.000000) "></path>
<rect id="矩形" x="6.58578587" y="-4.4408921e-16" width="1" height="10" rx="0.5"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M13.4,11.6A5.8,5.8,0,0,0,14,9a6.2,6.2,0,0,0-4-5.7V3A2,2,0,0,0,6,3v.3A6.2,6.2,0,0,0,2,9a5.8,5.8,0,0,0,.6,2.6A1.7,1.7,0,0,0,2,13a2,2,0,0,0,2,2,1.7,1.7,0,0,0,1.4-.6,5.9,5.9,0,0,0,5.2,0A1.7,1.7,0,0,0,12,15a2,2,0,0,0,2-2A1.7,1.7,0,0,0,13.4,11.6ZM8,2A.9.9,0,0,1,9,3,.9.9,0,0,1,8,4,.9.9,0,0,1,7,3,.9.9,0,0,1,8,2ZM4,14a1,1,0,0,1,0-2,1,1,0,0,1,0,2Zm1.9-.5A.7.7,0,0,0,6,13a2,2,0,0,0-2-2H3.5A5.4,5.4,0,0,1,3,9,4.8,4.8,0,0,1,6.5,4.3a2,2,0,0,0,3,0A4.8,4.8,0,0,1,13,9a5.4,5.4,0,0,1-.5,2.1H12a2,2,0,0,0-2,2,.7.7,0,0,0,.1.5A5.1,5.1,0,0,1,5.9,13.5ZM12,14a1,1,0,1,1,1-1A.9.9,0,0,1,12,14Z"/></svg>

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M8,1H8L2.1,2.9H2V9.2c0,2.7,4.3,5,5.7,5.6L8,15l.3-.2c1.4-.6,5.7-2.9,5.7-5.6V2.9Zm5,8c0,2.6-4.5,4.8-5,5S3,11.6,3,9V3.7L8,2l5,1.7Z"/><path class="cls-1" d="M5.8,5.9a2.1,2.1,0,0,0,1.5,2v3.7a.6.6,0,0,0,.6.5c.4,0,.6-.2.6-.5V9.8H9.6a.6.6,0,0,0,.6-.6.6.6,0,0,0-.6-.5H8.5V7.9h0a2.1,2.1,0,0,0,1.5-2,2.1,2.1,0,0,0-2.1-2A2,2,0,0,0,5.8,5.9ZM9,5.9a1.1,1.1,0,0,1-2.2,0,1,1,0,0,1,1.1-1A1,1,0,0,1,9,5.9Z"/></svg>

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M6.6,6.9a2.7,2.7,0,0,0,1.6.4,3.1,3.1,0,0,0,3.2-3.1A3.3,3.3,0,0,0,8.2,1,3.3,3.3,0,0,0,4.9,4.2,3.3,3.3,0,0,0,6.6,6.9ZM8.2,2a2.2,2.2,0,0,1,2.2,2.2A2.2,2.2,0,0,1,9.3,6,2.4,2.4,0,0,1,7,6,2.2,2.2,0,0,1,5.9,4.2,2.2,2.2,0,0,1,8.2,2Z"/><path class="cls-1" d="M8.8,8H7.5a4.8,4.8,0,0,0-4.9,4.8A2.3,2.3,0,0,0,5,15h6.4a2.3,2.3,0,0,0,2.3-2.2A4.8,4.8,0,0,0,8.8,8Zm2.6,6H5a1.3,1.3,0,0,1-1.4-1.2A3.9,3.9,0,0,1,7.5,9H8.8a3.8,3.8,0,0,1,3.9,3.8A1.2,1.2,0,0,1,11.4,14Z"/></svg>

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M10.5,6a4.4,4.4,0,0,0-4.4,4H4.5A1.5,1.5,0,0,1,3,8.5V3H9.1a1.4,1.4,0,0,0,1.4,1A1.5,1.5,0,0,0,12,2.5,1.5,1.5,0,0,0,10.5,1,1.4,1.4,0,0,0,9.1,2H1.5a.5.5,0,0,0-.5.5.5.5,0,0,0,.5.5H2V8.5A2.5,2.5,0,0,0,4.5,11H6.1a4.5,4.5,0,1,0,4.4-5Zm0-4a.5.5,0,0,1,.5.5.5.5,0,0,1-1,0A.5.5,0,0,1,10.5,2Zm0,12A3.5,3.5,0,1,1,14,10.5,3.5,3.5,0,0,1,10.5,14Z"/><path class="cls-1" d="M12.5,10H11V8.5a.5.5,0,0,0-1,0V10H8.5a.5.5,0,0,0,0,1H10v1.5a.5.5,0,0,0,1,0V11h1.5a.5.5,0,0,0,0-1Z"/></svg>

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M10,5.5H8.5V4a.5.5,0,0,0-1,0V5.5H6a.5.5,0,0,0,0,1H7.5V8a.5.5,0,0,0,1,0V6.5H10a.5.5,0,0,0,0-1Z"/><path class="cls-1" d="M8,1A4.9,4.9,0,0,0,3,5.9c-.1,2.3,1.8,5.7,4.6,8.7a.6.6,0,0,0,.8,0c2.7-2.9,4.7-6.4,4.6-8.7A4.9,4.9,0,0,0,8,1ZM7.6,12.9a9.5,9.5,0,0,1-1.5-2,8.3,8.3,0,0,1-2-5,3.9,3.9,0,0,1,7.8,0c.1,1.9-1.3,4.5-3.5,7A.5.5,0,0,1,7.6,12.9Z"/></svg>

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M12,5A4,4,0,0,0,4,5,3.9,3.9,0,0,0,6,8.4a6.7,6.7,0,0,0-4,6.1.5.5,0,0,0,.5.5.5.5,0,0,0,.5-.5C3,11.6,5.4,9,8,9A4,4,0,0,0,12,5ZM8,8A2.9,2.9,0,0,1,5,5,2.9,2.9,0,0,1,8,2a2.9,2.9,0,0,1,3,3A2.9,2.9,0,0,1,8,8Z"/><path class="cls-1" d="M13.5,12H12V10.5a.5.5,0,0,0-1,0V12H9.5a.5.5,0,0,0,0,1H11v1.5a.5.5,0,0,0,1,0V13h1.5a.5.5,0,0,0,0-1Z"/></svg>

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M10.7,1.5A7.1,7.1,0,0,0,3,3,7.4,7.4,0,0,0,1,8a7,7,0,0,0,7,7,7,7,0,0,0,7-7A7.1,7.1,0,0,0,10.7,1.5ZM8,14A5.9,5.9,0,0,1,2.1,8,5.5,5.5,0,0,1,3.8,3.8,6,6,0,0,1,14,8,6,6,0,0,1,8,14Z"/><path class="cls-1" d="M11.5,7.5h-3v-3a.5.5,0,0,0-1,0v3h-3a.5.5,0,0,0,0,1h3v3a.5.5,0,0,0,1,0v-3h3a.5.5,0,0,0,0-1Z"/></svg>

View File

@ -0,0 +1 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs></defs><path class="cls-1" d="M14.6,7.5H13.5a5.7,5.7,0,0,0-5-5V1.3A.5.5,0,0,0,8,.8a.5.5,0,0,0-.5.5V2.5A5.5,5.5,0,0,0,2.6,7.4H1.4a.5.5,0,0,0,0,1H2.5a5.6,5.6,0,0,0,5,5.1v1a.5.5,0,0,0,1,0v-1a5.5,5.5,0,0,0,5-5h1.1a.5.5,0,0,0,.5-.5A.5.5,0,0,0,14.6,7.5Zm-6.1,5v-.7a.5.5,0,0,0-1,0v.7a4.7,4.7,0,0,1-4-4.1h.6a.5.5,0,0,0,0-1H3.6A4.5,4.5,0,0,1,7.5,3.6V4a.5.5,0,0,0,.5.5A.5.5,0,0,0,8.5,4V3.6a4.5,4.5,0,0,1,4,3.9h-.6a.5.5,0,0,0-.5.5.5.5,0,0,0,.5.5h.6A4.5,4.5,0,0,1,8.5,12.5Z"/><path class="cls-1" d="M8,6.5A1.5,1.5,0,0,0,6.6,8,1.5,1.5,0,0,0,8,9.5a1.5,1.5,0,0,0,0-3Zm0,2A.5.5,0,0,1,7.6,8,.5.5,0,0,1,8,7.5a.5.5,0,0,1,0,1Z"/></svg>

Some files were not shown because too many files have changed in this diff Show More