Browse Source

feat: huaxing-AI智能BAS系统

main
xuziqiang 6 months ago
parent
commit
4a9b924df6
  1. 10
      hx-ai-intelligent/.env
  2. 22
      hx-ai-intelligent/.env.development
  3. 35
      hx-ai-intelligent/.env.production
  4. 1
      hx-ai-intelligent/.version
  5. 74
      hx-ai-intelligent/build.sh
  6. 19
      hx-ai-intelligent/index.html
  7. 95
      hx-ai-intelligent/mock/user.ts
  8. BIN
      hx-ai-intelligent/public/asset/file/whiteListUser.xlsx
  9. BIN
      hx-ai-intelligent/public/asset/font/QuartzMS.TTF
  10. BIN
      hx-ai-intelligent/public/asset/image/NoImage.png
  11. BIN
      hx-ai-intelligent/public/asset/image/login/adminIcon.png
  12. BIN
      hx-ai-intelligent/public/asset/image/login/background.png
  13. BIN
      hx-ai-intelligent/public/asset/image/login/icon_clear.png
  14. BIN
      hx-ai-intelligent/public/asset/image/noResource.png
  15. BIN
      hx-ai-intelligent/public/asset/image/side.png
  16. BIN
      hx-ai-intelligent/public/asset/image/sider_collapsed_background.png
  17. 1
      hx-ai-intelligent/public/asset/js/tdt.js
  18. BIN
      hx-ai-intelligent/public/favicon.ico
  19. 12
      hx-ai-intelligent/release.yaml
  20. 35
      hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/create.sh
  21. 1
      hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/delete.sh
  22. 1
      hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/setup.sh
  23. 1
      hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/start.sh
  24. 1
      hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/stop.sh
  25. 30
      hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/type.json
  26. 64
      hx-ai-intelligent/resources/templates/deploy.json
  27. 26545
      hx-ai-intelligent/routes.json
  28. 234
      hx-ai-intelligent/src/App.vue
  29. 6
      hx-ai-intelligent/src/api/index.ts
  30. 20
      hx-ai-intelligent/src/api/user.ts
  31. 71
      hx-ai-intelligent/src/config/app.config.ts
  32. 2
      hx-ai-intelligent/src/config/index.ts
  33. 4309
      hx-ai-intelligent/src/config/resource.json
  34. 22
      hx-ai-intelligent/src/enum/http-enum.ts
  35. 10
      hx-ai-intelligent/src/icon/dicizhishou.svg
  36. 5
      hx-ai-intelligent/src/icon/downArrow.svg
  37. 8
      hx-ai-intelligent/src/icon/headerAdminIcon.svg
  38. 5
      hx-ai-intelligent/src/icon/passWord.svg
  39. 5
      hx-ai-intelligent/src/icon/userName.svg
  40. 15
      hx-ai-intelligent/src/main.ts
  41. 34
      hx-ai-intelligent/src/router/home.ts
  42. 11
      hx-ai-intelligent/src/router/index.ts
  43. 82
      hx-ai-intelligent/src/router/organizationManage.ts
  44. 12
      hx-ai-intelligent/src/store/item.ts
  45. 151
      hx-ai-intelligent/src/theme/detail.less
  46. 72
      hx-ai-intelligent/src/theme/form.less
  47. 183
      hx-ai-intelligent/src/theme/global.less
  48. 73
      hx-ai-intelligent/src/theme/global.scss
  49. 2
      hx-ai-intelligent/src/theme/theme.scss
  50. 36
      hx-ai-intelligent/src/theme/variable.less
  51. 1
      hx-ai-intelligent/src/types.d.ts
  52. 21
      hx-ai-intelligent/src/util/debounce.ts
  53. 17
      hx-ai-intelligent/src/view/developing.vue
  54. 101
      hx-ai-intelligent/src/view/organizationManage/enterpriseManage/config.ts
  55. 7
      hx-ai-intelligent/src/view/organizationManage/enterpriseManage/index.vue
  56. 51
      hx-ai-intelligent/tsconfig.json
  57. 15
      hx-ai-intelligent/vite.config.ts
  58. 10
      lib/saas/config/table.config.ts
  59. 11
      lib/saas/view/system/login.vue
  60. 4
      lib/use/use-api.ts
  61. 9
      lib/util/http/axios.ts
  62. 4
      package.json
  63. 3
      vite.config.ts

10
hx-ai-intelligent/.env

@ -0,0 +1,10 @@
# port
VITE_PORT = 3301
#mode
VITE_GLOB_APP_RUN_TYPE = saas
# spa-title
VITE_GLOB_APP_TITLE = Smart Parking Depositor
# spa shortname
VITE_GLOB_APP_SHORT_NAME = smart-parking-depositor

22
hx-ai-intelligent/.env.development

@ -0,0 +1,22 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Cross-domain proxy, you can configure multiple
# Please note that no line breaks http://100.73.70.51
#VITE_PROXY = {"/community":{ "target":"http://100.73.70.51","changeOrigin": true,"prependPath":false},"/parking":{ "target":"http://100.73.70.246:8080","changeOrigin": true,"iprependPath":false}}
# VITE_PROXY=[["/api","http://100.73.70.51"],["/parking","http://100.73.70.246:8080"]]
# Delete console
VITE_DROP_CONSOLE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# File upload address, optional
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=

35
hx-ai-intelligent/.env.production

@ -0,0 +1,35 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Whether to delete origin files when using compress, default false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# File upload address, optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
# Whether to enable image compression
VITE_USE_IMAGEMIN= true
# use pwa
VITE_USE_PWA = false
# Is it compatible with older browsers
VITE_LEGACY = false

1
hx-ai-intelligent/.version

@ -0,0 +1 @@
2.1.19

74
hx-ai-intelligent/build.sh

@ -0,0 +1,74 @@
#!/bin/bash
SOURCE="$0"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ -z $WORKSPACE ];then
echo "WORKSPACE not exists"
else
set DIR=$WORKSPACE
fi
echo "current dir"
echo "$DIR"
cd "$DIR"
projectname=$(basename `pwd`)
npm run parking-build
if [ -d "$DIR/dist" ];then
cd "$DIR/dist"
# copy module.json
cp ../module.json ./
# package
VERSION=$(cat ../.version)
lastdir=../release/
if [ -d ${lastdir} ];then
echo "删除旧release文件夹"
rm -rf ${lastdir}
else
echo "文件夹不存在!"
fi
mkdir -p ${lastdir}
dir=../release/nerv/$projectname/$VERSION
mkdir -p ${dir}
tar -zcvf "${dir}/$projectname-$VERSION.tgz" ./*
templatedir=../release/resources/templates/nerv/$projectname/$VERSION/$projectname
mkdir -p ${templatedir}
cp -r ../resources/templates/* ${templatedir}
cd ../
releasefile=nerv-$projectname-$VERSION.tgz
if [ -f ${releasefile} ];then
echo "删除旧包!"
rm -rf ${releasefile}
fi
tar -zcvf ${releasefile} ./release/* release.yaml
mkdir -p ./release/nervui
cp -r ./release/nerv/* ./release/nervui
if [ -f ${releasefile} ];then
echo "编译成功!"
mv ${releasefile} ./release
else
echo "编译失败!!!"
exit 1
fi
else
echo "编译失败!!!"
exit 1
fi

19
hx-ai-intelligent/index.html

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="referrer" content="never" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: '09e43004c09d39c0e61f8fd65d5e6a5a',
};
</script>
<title>AI智能BAS系统</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./src/main.ts"></script>
</body>
</html>

95
hx-ai-intelligent/mock/user.ts

@ -0,0 +1,95 @@
import type { MockConfig, MockMethod } from 'vite-plugin-mock';
import { getRequestToken, resultError, resultSuccess } from '/nerv-base/util/mock';
const fakeUserList = [
{
userId: '1',
username: 'vben',
realName: 'Vben Admin',
avatar: '',
desc: 'manager',
password: '123456',
accessToken: 'fakeAdminToken',
homePath: '/dashboard',
roles: [
{
roleName: 'Super Admin',
value: 'super',
},
],
},
{
userId: '2',
username: 'test',
password: '123456',
realName: 'test user',
avatar: '',
desc: 'tester',
accessToken: 'fakeTestToken',
homePath: '/dashboard/workbench',
roles: [
{
roleName: 'Tester',
value: 'test',
},
],
},
];
export default (_config: MockConfig): MockMethod[] => {
return [
{
url: '/req-api/login',
timeout: 200,
method: 'post',
response: ({ body }) => {
const { username, password } = body;
const checkUser = fakeUserList.find(
(item) => item.username === username && password === item.password,
);
if (!checkUser) {
return resultError('Incorrect account or password!');
}
const { userId, username: _username, accessToken, realName, desc, roles } = checkUser;
return resultSuccess({
roles,
userId,
username: _username,
accessToken,
realName,
desc,
});
},
},
{
url: '/req-api/getUserInfo',
method: 'get',
timeout: 100,
response: (request) => {
const token = getRequestToken(request) || 'fakeAdminToken';
if (!token) return resultError('Invalid token');
const checkUser = fakeUserList.find((item) => item.accessToken === token);
if (!checkUser) {
return resultError('The corresponding user information was not obtained!');
}
const { accessToken: _token, password: _pwd, ...rest } = checkUser;
return resultSuccess(rest);
},
},
{
url: '/req-api/logout',
timeout: 200,
method: 'get',
response: (request) => {
const token = getRequestToken(request);
if (!token) return resultError('Invalid token');
const checkUser = fakeUserList.find((item) => item.accessToken === token);
if (!checkUser) {
return resultError('Invalid token!');
}
return resultSuccess(undefined, { message: 'Token has been destroyed' });
},
},
];
};

BIN
hx-ai-intelligent/public/asset/file/whiteListUser.xlsx

Binary file not shown.

BIN
hx-ai-intelligent/public/asset/font/QuartzMS.TTF

Binary file not shown.

BIN
hx-ai-intelligent/public/asset/image/NoImage.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
hx-ai-intelligent/public/asset/image/login/adminIcon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
hx-ai-intelligent/public/asset/image/login/background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 KiB

BIN
hx-ai-intelligent/public/asset/image/login/icon_clear.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
hx-ai-intelligent/public/asset/image/noResource.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
hx-ai-intelligent/public/asset/image/side.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
hx-ai-intelligent/public/asset/image/sider_collapsed_background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

1
hx-ai-intelligent/public/asset/js/tdt.js

File diff suppressed because one or more lines are too long

BIN
hx-ai-intelligent/public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

12
hx-ai-intelligent/release.yaml

@ -0,0 +1,12 @@
# 上传release目录信息到nerv-file仓库
release:
- {src: release, dest: /upload/pkg, include: [".*(.tgz)$"]}
- {src: release/resources/templates, dest: /upload/templates}
register:
name: nervui-smart-parking
version: 2.1.19
components:
- type: nervui-smart-parking
resources:
- {type: template, relativePath: /nervui-smart-parking/deploy.json}

35
hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/create.sh

@ -0,0 +1,35 @@
echo "=====================================================create====================================================="
#!/usr/bin/env bash
function create() {
if [ -d "$nervui_app_home" ];then
echo "$nervui_app_home exists!"
else
echo "start mkdir $nervui_app_home"
mkdir -p "$nervui_app_home"
fi
pkg_file_name=${pkg_url##*/}
pkg_file_path="$nervui_app_home$pkg_file_name"
echo "start download $pkg_url"
curl -L -o $pkg_file_path $pkg_url
echo "start install $pkg_file_path"
tar -xf $pkg_file_path -C $nervui_app_home
}
if [ "$pkg_url" == "" ]; then
echo {\"error\":\"pkg_url is empty\"}
exit 1
elif [ "$nervui_app_home" == "" ]; then
echo {\"error\":\"nervui_app_home is empty\"}
exit 1
else
create
fi

1
hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/delete.sh

@ -0,0 +1 @@
echo "=====================================================delete====================================================="

1
hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/setup.sh

@ -0,0 +1 @@
echo "=====================================================setup====================================================="

1
hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/start.sh

@ -0,0 +1 @@
echo "=====================================================start====================================================="

1
hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/stop.sh

@ -0,0 +1 @@
echo "=====================================================stop====================================================="

30
hx-ai-intelligent/resources/scripts/nervui/smart-parking-depositor/type.json

@ -0,0 +1,30 @@
{
"name": "/nervui/nervui-smart-parking-op",
"operations": [
{
"name": "Create",
"type": "shell",
"implementor": "create.sh"
},
{
"name": "Delete",
"type": "shell",
"implementor": "delete.sh"
},
{
"name": "Setup",
"type": "shell",
"implementor": "setup.sh"
},
{
"name": "Start",
"type": "shell",
"implementor": "start.sh"
},
{
"name": "Stop",
"type": "shell",
"implementor": "stop.sh"
}
]
}

64
hx-ai-intelligent/resources/templates/deploy.json

@ -0,0 +1,64 @@
{
"name": "/nervui/nervui-smart-parking",
"version": 1,
"inputs": [
{
"name": "server_ip",
"type": "string",
"required": true,
"description": "应用安装IP地址",
"inputType": "ipSelectType"
},
{
"name": "version",
"type": "string",
"required": true,
"description": "软件版本",
"inputType": "versionSelectType"
},
{
"name": "install_dir",
"type": "string",
"required": true,
"defaultValue": "/data",
"inputType": "textInputType",
"description": "安装目录"
}
],
"nodes": [
{
"name": "nervui-smart-parking",
"type": "/nerv/nerv-orchestrator/cluster/Nervui",
"parameters": [
{
"name": "file_repository",
"value": "${nerv_file_repository}"
},
{
"name": "install_dir",
"value": "${install_dir}"
},
{
"name": "pkg_url",
"value": "/api/pkg/nerv/nervui-smart-parking/${version}/nervui-smart-parking-${version}.tgz"
}
],
"dependencies": [
{
"type": "contained",
"target": "host"
}
]
},
{
"name": "host",
"type": "/nerv/nerv-orchestrator/compute/Host",
"parameters": [
{
"name": "address",
"value": "${server_ip}"
}
]
}
]
}

26545
hx-ai-intelligent/routes.json

File diff suppressed because it is too large

234
hx-ai-intelligent/src/App.vue

@ -0,0 +1,234 @@
<template>
<a-config-provider :locale="locale">
<router-view />
</a-config-provider>
</template>
<script lang="ts">
import { defineComponent, watch, ref } from 'vue';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import { useRouter } from 'vue-router';
import Cookies from 'js-cookie';
import { message } from 'ant-design-vue';
export default defineComponent({
name: 'App',
setup() {
const router = useRouter();
const cachedViews = ['Status'];
window.localStorage.setItem('mapKey', JSON.stringify({ type: 'tmap', url: '' }));
// watch(
// () => router.currentRoute.value,
// (e) => {
// // if (Cookies.get('nervsid') === undefined && e.fullPath !== '/login') {
// // message.warn('!', 1);
// // router.push('/login');
// // }
// // } else {
// // if (Cookies.get('nervsid') !== undefined && e === '/login') {
// // let url = window.sessionStorage.getItem('url');
// // url === null ? window.sessionStorage.setItem('url', '/doorway/visitor/audit') : '';
// // router.push(url === null ? '/doorway' : url);
// // }
// // }
// }
// );
return {
cachedViews,
locale: zhCN,
};
},
});
</script>
<style lang="less" scoped>
:deep(.ns-content) {
padding-top: 80px !important;
}
#app {
width: 100%;
height: 100%;
}
:deep(.ns-left-menu .firstMenuItem-selected .ant-menu-title-content) {
background: unset !important;
}
:deep(.ns-left-menu .ant-menu-item-selected .ant-menu-title-content) {
color: #fff !important;
background: @primary-color;
border-radius: 2px;
height: 40px;
line-height: 40px;
a {
color: #ffffff !important;
}
}
:deep(.ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover) {
background: @primary-color;
}
:deep(.ant-menu-inline .ant-menu-submenu-title) {
color: rgba(255, 255, 255, 0.9) !important;
}
:deep(.ns-left-menu .ant-layout-sider-children .ant-menu-sub.ant-menu-inline) {
position: relative;
&::before {
display: flex;
width: 2px;
height: calc(100% - 40px);
position: absolute;
top: 20px;
left: 20px;
content: '';
background-color: rgba(255, 255, 255, 0.2);
}
}
//*************************tab list */
:deep(.tabListTable) {
.ns-table-title {
text-align: left;
height: 46px;
line-height: 46px;
font-size: 18px;
font-weight: bold;
user-select: text;
padding-left: 16px;
background: #fff;
width: calc(100% + 32px);
margin-left: -16px;
}
.tabs-list {
overflow: visible !important;
}
.ant-tabs-nav {
width: calc(100% + 32px);
margin-left: -16px !important;
background: #fff;
}
.ant-tabs-nav-wrap {
padding: 0 16px;
}
}
//********************* */
:deep(.nsDetailView) {
min-height: 100%;
height: 100%;
.ns-detail-content {
padding: 0px 24px;
border-top: 16px solid #e5ebf0;
}
.ant-descriptions-item-label {
color: rgba(0, 0, 0, 0.5);
font-family: PingFang SC;
font-size: 14px;
}
.ant-descriptions-item-content {
color: rgba(0, 0, 0, 0.95);
font-family: PingFang SC;
font-size: 14px;
}
.ant-descriptions-title {
&::after {
content: '';
width: 75px;
height: 7px;
display: block;
background: linear-gradient(90deg, #537fff 0%, #fff 82.67%);
margin-left: 2px;
margin-top: -2px;
}
}
.ant-descriptions-row > th,
.ant-descriptions-row > td {
padding-bottom: 8px;
}
.ns-page-header {
margin-bottom: 0 !important;
padding-top: 7px !important;
padding-bottom: 7px !important;
width: calc(100% + 32px);
margin-left: -16px;
.title {
cursor: pointer;
font-size: 18px !important;
}
}
.ant-descriptions-header {
margin: 16px 0 16px 0 !important;
.ant-descriptions-title {
line-height: 16px;
font-size: 16px;
}
}
}
:deep(.ns-detail .ant-descriptions-header .descriptions-title) {
&:after {
content: '';
width: 75px;
height: 7px;
display: block;
background: linear-gradient(90deg, @primary-color 0%, #fff 82.67%);
margin-left: 2px;
margin-top: -2px;
}
}
:deep(.ant-descriptions-header .descriptions-title) {
&:after {
content: '';
width: 75px;
height: 7px;
display: block;
background: linear-gradient(90deg, @primary-color 0%, #fff 82.67%);
margin-left: 2px;
margin-top: -2px;
}
}
</style>
<style lang="less">
//
.listTableModal .ant-modal-title {
font-weight: 600;
}
.listTableModal .ant-modal-body {
padding: 16px !important;
.ant-tabs-nav-wrap {
padding: 0px;
}
.ns-list-table {
border-left: 16px solid #e5ebf0;
border-right: 16px solid #e5ebf0;
border-bottom: 16px solid #e5ebf0;
}
}
:deep(.ant-menu-submenu-title) {
color: #ffffff !important;
}
</style>
<style lang="less">
//************************
.ant-menu-submenu-placement-bottomLeft {
.ant-menu-submenu {
background: rgb(3 24 53) !important;
}
.ant-menu-sub {
background: rgb(3 24 53) !important;
}
.ant-menu-title-content {
color: #fff !important;
.ns-icon {
margin-right: 7px;
transform: translateY(2px);
}
}
.ant-menu-submenu-arrow {
color: #fff !important;
}
}
</style>

6
hx-ai-intelligent/src/api/index.ts

@ -0,0 +1,6 @@
/***
* module:Array<resource>
*/
export const apiModule = {
parking: ['User', 'CurrentUser', 'Organizational'],
};

20
hx-ai-intelligent/src/api/user.ts

@ -0,0 +1,20 @@
import { http } from '/nerv-lib/saas';
enum Api {
// USER_LOGIN = '/api/community/objs/Login', //用户登录
// USER_INFO = '/api/community/community/objs/CurrentUser', //获取用户信息
USER_LOGIN = 'api/web/objs/Login', //用户登录
USER_INFO = 'api/web/objs/CurrentUser', //获取用户信息
USER_RESOURCE = '/api/community/objs/User/Resource', //获取用户资源
}
export const userLogin = (data: RoomListModel) => http.post(Api.USER_LOGIN, data);
export const userInfo = () => http.get(Api.USER_INFO);
export const userResource = () => http.get(Api.USER_RESOURCE);
/**
* @description
* @property `[fatherRegionUuid]`
*/
interface RoomListModel {
data: string;
}

71
hx-ai-intelligent/src/config/app.config.ts

@ -0,0 +1,71 @@
/** @format */
import { dateUtil } from '/nerv-lib/util/date-util';
import mockResource from './resource.json';
export const appConfig = {
projectType: 'web',
baseApi: '/api',
enablePermissions: false,
siderPosition: 'left',
baseHeader: '/parkingManage',
baseRouter: '/parkingManage/parkingLotManage',
// userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => {
// console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig');
// next();
// },
// customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'),
timeout: 60 * 1000,
userLoginApi: () => {
return {
code: 200,
success: true,
data: { userToken: 123123123 },
};
},
userResourceApi: () => {
return { data: mockResource.menus };
},
userInfoApi: () => {
return {
code: 200,
success: true,
data: {
accountCode: '1305107806187376793',
accountName: 'adm*n',
accountType: 'admin',
accountStatus: 1,
accountRealName: 'admin',
organizationCode: 'dingcloud',
authConfigList: [],
organizeResCode: [],
leadDepartmentUuidList: [],
},
};
},
useHistoryTag: false,
// 修改密码配置
updatePassWordInfo: {
title: '修改密码',
subtitle: '芜优出行平台',
api: '/api/web/objs/User/changePassword',
},
// headerBellInfo: {
// isShow: true,
// api: '/api/web/objs/bulletin/readCount',
// toRouterName: 'NoticeManageIndex',
// },
resourceInfo: {
application: {
version: '1.1.74',
label: '停车业务平台',
dataScope: {
scopeMode: 0,
scopeType: '',
dataTips: '',
},
},
api: '/qa/Operation/Resources/Pc/init',
token: `${dateUtil().format('YYYYMMDD')}1a329ffasasozozxqq66cfab7`,
},
};

2
hx-ai-intelligent/src/config/index.ts

@ -0,0 +1,2 @@
import { appConfig } from '/@/config/app.config';
export { appConfig };

4309
hx-ai-intelligent/src/config/resource.json

File diff suppressed because it is too large

22
hx-ai-intelligent/src/enum/http-enum.ts

@ -0,0 +1,22 @@
export enum ResultEnum {
SUCCESS = 0,
ERROR = 1,
TIMEOUT = 401,
TOKEN_INVALID = 403,
}
export enum RequestEnum {
GET = 'POST',
POST = 'POST',
PUT = 'POST',
DELETE = 'POST',
}
export enum ContentTypeEnum {
// json
JSON = 'application/json;charset=UTF-8',
// form-data qs
FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8',
// form-data upload
FORM_DATA = 'multipart/form-data;charset=UTF-8',
}

10
hx-ai-intelligent/src/icon/dicizhishou.svg

@ -0,0 +1,10 @@
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1175_4591)">
<path d="M40.6891 16.1069C41.3414 15.2143 41.7191 14.2873 41.7191 13.3947C41.7191 9.13748 34.2346 5.66992 24.9649 5.66992C15.6952 5.66992 8.21075 9.13748 8.21075 13.3947C8.21075 14.2873 8.58841 15.2143 9.24072 16.1069C7.31812 17.5146 6.90613 18.9565 6.90613 19.8492C6.90613 20.8791 7.42111 21.7718 8.21075 22.6987V36.6033C8.21075 40.8605 15.6952 44.3281 24.9649 44.3281C34.2346 44.3281 41.7191 40.8605 41.7191 36.6033V22.6987C42.5087 21.8061 43.0237 20.8791 43.0237 19.8492C43.0237 18.9565 42.646 17.5489 40.6891 16.1069ZM34.269 11.2318C35.3333 11.2318 36.1916 11.8154 36.1916 12.502C36.1916 13.1887 35.3333 13.7723 34.269 13.7723C33.2047 13.7723 32.3463 13.1887 32.3463 12.502C32.3463 11.8154 33.2047 11.2318 34.269 11.2318ZM25.1709 7.00888C26.1665 7.00888 26.9562 7.4552 26.9562 8.00452C26.9562 8.5195 26.1665 9.00015 25.1709 9.00015C24.1753 9.00015 23.3856 8.55383 23.3856 8.00452C23.3856 7.4552 24.1753 7.00888 25.1709 7.00888ZM25.1709 15.7979C26.2352 15.7979 27.0935 16.3816 27.0935 17.0682C27.0935 17.7549 26.2352 18.3385 25.1709 18.3385C24.1066 18.3385 23.2483 17.7549 23.2483 17.0682C23.2483 16.3816 24.1066 15.7979 25.1709 15.7979ZM16.4848 11.2318C17.5491 11.2318 18.4074 11.8154 18.4074 12.502C18.4074 13.1887 17.5491 13.7723 16.4848 13.7723C15.4205 13.7723 14.5622 13.1887 14.5622 12.502C14.5622 11.8154 15.4205 11.2318 16.4848 11.2318ZM15.9698 39.1782H13.3949V26.3036H15.0772C15.3519 26.4409 15.7295 26.4409 15.9698 26.5783V39.1782ZM26.2695 41.4785H23.6946V28.6039H26.2695V41.4785ZM36.5692 39.1782H33.9943V26.5439C34.269 26.4066 34.6466 26.4066 34.8869 26.2693H36.5692V39.1782ZM25.1366 24.999C15.5922 24.999 9.68704 21.6344 9.68704 19.8492C9.54971 19.3342 10.0647 18.6819 11.0947 17.9265H11.6096C14.5622 19.8492 19.4717 21.1538 24.9992 21.1538C30.6641 21.1538 35.6766 19.8492 38.7665 17.7892C38.9038 17.7892 38.9038 17.9265 39.0411 17.9265C39.9338 18.5789 40.5861 19.3342 40.5861 19.8492C40.5861 21.6688 34.6466 24.999 25.1366 24.999Z" fill="currentColor"/>
</g>
<defs>
<clipPath id="clip0_1175_4591">
<rect width="50" height="50" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

5
hx-ai-intelligent/src/icon/downArrow.svg

@ -0,0 +1,5 @@
<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
<g id="Frame">
<path id="Vector" d="M8.99953 9.87831L12.7119 6.16602L13.7725 7.22667L8.99953 11.9997L4.22656 7.22667L5.28723 6.16602L8.99953 9.87831Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 251 B

8
hx-ai-intelligent/src/icon/headerAdminIcon.svg

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="user">
<g id="user_2">
<path d="M17.25 7.5C17.25 10.3995 14.8995 12.75 12 12.75C9.1005 12.75 6.75 10.3995 6.75 7.5C6.75 4.6005 9.1005 2.25 12 2.25C14.8995 2.25 17.25 4.6005 17.25 7.5ZM15.75 7.5C15.75 5.42893 14.0711 3.75 12 3.75C9.92893 3.75 8.25 5.42893 8.25 7.5C8.25 9.57107 9.92893 11.25 12 11.25C14.0711 11.25 15.75 9.57107 15.75 7.5Z" fill="white" fill-opacity="0.9"/>
<path d="M20.9447 16.2792C21.4455 16.5183 21.75 17.032 21.75 17.5869V21C21.75 21.4142 21.4142 21.75 21 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V17.5869C2.25 17.032 2.55452 16.5183 3.0553 16.2792C5.7741 14.9806 8.79976 14.25 12 14.25C15.2002 14.25 18.2259 14.9806 20.9447 16.2792ZM12 15.75C9.05011 15.75 6.26152 16.4186 3.75 17.6097V20.25H20.25V17.6097C17.7385 16.4186 14.9499 15.75 12 15.75Z" fill="white" fill-opacity="0.9"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 923 B

5
hx-ai-intelligent/src/icon/passWord.svg

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="12" fill-opacity="0.1"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.9352 9.87544L16.531 9.87547C16.531 8.58454 16.0608 7.36797 15.2071 6.44985C14.7866 5.99763 14.2954 5.64185 13.7472 5.39246C13.1745 5.13204 12.5662 5 11.9388 5C11.3114 5 10.7031 5.13204 10.1305 5.39243C9.58225 5.64182 9.09102 5.9976 8.67051 6.44983C7.81678 7.36797 7.34659 8.58452 7.34659 9.87544H8.94234C8.94234 8.06373 10.2865 6.58981 11.9388 6.58981C13.591 6.58981 14.9352 8.06373 14.9352 9.87544ZM7.46099 9.95703H16.539V9.95705C17.5421 9.95705 18 10.7674 18 11.7659V17.1925C18 18.191 17.5421 19.0014 16.539 19.0014H7.461C6.45786 19.0014 6 18.1919 6 17.1925V11.7659C6 10.7674 6.45787 9.95703 7.46099 9.95703ZM12.908 15.1319V16.2878C12.908 16.7871 12.5012 17.1922 12.0001 17.1922C11.4992 17.1922 11.0924 16.787 11.0924 16.2878V15.1328C10.5522 14.819 10.1846 14.242 10.1846 13.5745C10.1846 12.5751 10.997 11.7656 12.0001 11.7656C13.0034 11.7656 13.8157 12.5751 13.8157 13.5745C13.8159 14.242 13.4481 14.819 12.908 15.1319Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

5
hx-ai-intelligent/src/icon/userName.svg

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="12" fill-opacity="0.1"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3936 10.8691C12.0322 11.4221 10.4652 11.1164 9.42323 10.0946C8.56315 9.25057 8.18933 8.04123 8.42675 6.87091C8.66417 5.70058 9.48151 4.72368 10.6055 4.26681C11.4814 3.91106 12.518 3.91106 13.3939 4.26681C14.7552 4.81996 15.6428 6.12287 15.6427 7.56804C15.6427 9.01321 14.755 10.3161 13.3936 10.8691ZM9.08048 11.9575H14.9191H14.9193C16.6182 11.9575 18 13.3128 18 14.9788C18 16.6448 16.618 18 14.9193 18H9.08048C7.38197 18 6 16.6448 6 14.9788C6 13.3128 7.38176 11.9575 9.08048 11.9575Z" />
</svg>

After

Width:  |  Height:  |  Size: 686 B

15
hx-ai-intelligent/src/main.ts

@ -0,0 +1,15 @@
import { createApp } from 'vue';
import App from '/@/App.vue';
import { saasInit } from '/nerv-lib/saas';
import { apiModule } from '/@/api';
import { appConfig } from '/@/config';
import './theme/global.less';
import { LeftOutlined } from '@ant-design/icons-vue';
const app = createApp(App);
app.component('LeftOutlined', LeftOutlined);
saasInit({
app,
apiModule,
appConfig,
});
app.mount('#app');

34
hx-ai-intelligent/src/router/home.ts

@ -0,0 +1,34 @@
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
const home = {
path: '/home',
name: 'home',
meta: { title: '首页', icon: 'dicizhishou', index: 0, hideChildren: true },
redirect: { name: 'homeIndex' },
children: [
{
path: 'homeModule',
name: 'HomeModule',
meta: { title: '首页', hideChildren: true, icon: 'dicizhishou' },
component: Base,
redirect: { name: 'homeIndex' },
children: [
{
path: 'index',
name: 'homeIndex',
component: () => import('/@/view/developing.vue'),
meta: {
title: '首页',
keepAlive: true,
backApi: [
{
method: 'GET',
url: '/api/objs/FeedbackWeb/feedBackList',
},
],
},
},
],
},
],
};
export default home;

11
hx-ai-intelligent/src/router/index.ts

@ -0,0 +1,11 @@
/** @format */
const RootRoute = {
path: '/',
name: 'root',
redirect: { name: 'home' },
meta: {
title: 'Root',
},
};
export default RootRoute;

82
hx-ai-intelligent/src/router/organizationManage.ts

@ -0,0 +1,82 @@
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
const organizationManage = {
path: '/organizationManage',
name: 'organizationManage',
meta: { title: '组织管理', icon: 'dicizhishou', index: 99 },
redirect: { name: 'EnterpriseManage' },
children: [
{
path: 'enterpriseManage',
name: 'EnterpriseManage',
meta: { title: '企业管理', hideChildren: true, icon: 'dicizhishou' },
component: Base,
redirect: { name: 'enterpriseManageIndex' },
children: [
{
path: 'index',
name: 'enterpriseManageIndex',
component: () => import('/@/view/organizationManage/enterpriseManage/index.vue'),
meta: {
title: '企业管理',
keepAlive: true,
backApi: [
{
method: 'GET',
url: '/api/objs/FeedbackWeb/feedBackList',
},
],
},
},
],
},
{
path: 'userManage',
name: 'UserManage',
meta: { title: '用户管理', hideChildren: true, icon: 'dicizhishou' },
component: Base,
redirect: { name: 'userManageIndex' },
children: [
{
path: 'index',
name: 'userManageIndex',
component: () => import('/@/view/developing.vue'),
meta: {
title: '用户管理',
keepAlive: true,
backApi: [
{
method: 'GET',
url: '/api/objs/FeedbackWeb/feedBackList',
},
],
},
},
],
},
{
path: 'authorityManage',
name: 'AuthorityManage',
meta: { title: '部门/权限', hideChildren: true, icon: 'dicizhishou' },
component: Base,
redirect: { name: 'authorityManageIndex' },
children: [
{
path: 'index',
name: 'authorityManageIndex',
component: () => import('/@/view/developing.vue'),
meta: {
title: '部门/权限',
keepAlive: true,
backApi: [
{
method: 'GET',
url: '/api/objs/FeedbackWeb/feedBackList',
},
],
},
},
],
},
],
};
export default organizationManage;

12
hx-ai-intelligent/src/store/item.ts

@ -0,0 +1,12 @@
import { defineStore } from 'pinia';
export const items = defineStore({
id: 'items',
state() {
return { list: [], count: 10 };
},
getters: {
double: (state: any) => state.count * 2,
},
actions: {},
});

151
hx-ai-intelligent/src/theme/detail.less

@ -0,0 +1,151 @@
.ns-view {
min-height: 100%;
height: 100%;
background: #e5ebf0;
}
.ns-detail-content {
border-top: 16px solid #e5ebf0;
padding: 16px 21px;
background: #fff;
height: calc(100% - 50px);
}
:deep(.ant-skeleton-paragraph) {
display: flex;
flex-wrap: wrap;
}
:deep(.ant-skeleton-paragraph li:nth-child(n)) {
display: block;
margin-right: 4%;
margin-top: 16px;
margin-bottom: 4px;
}
:deep(.ant-skeleton-paragraph li:nth-child(3n + 3)) {
margin-right: 0;
}
:deep(.ant-skeleton-content) {
padding: 0 8px 10px 10px;
}
:deep(.ant-descriptions-item-label) {
color: rgba(0, 0, 0, 0.5);
}
:deep(.ant-descriptions-item-label),
:deep(.ant-descriptions-item-content) {
line-height: 22px;
}
:deep(.ant-descriptions-view) {
padding-bottom: 8px;
}
:deep(.ant-descriptions-item) {
padding-right: 20px;
&:nth-child(2n) {
padding-left: 20px;
}
&:nth-child(3n) {
padding-left: 20px;
padding-right: 0;
}
}
.descriptions-title {
&:after {
content: '';
width: 75px;
height: 7px;
display: block;
background: linear-gradient(90deg, #537fff 0%, #fff 82.67%);
margin-left: 2px;
margin-top: -2px;
}
}
.ns-page-header {
margin-bottom: 0 !important;
padding-top: 7px !important;
padding-bottom: 7px !important;
width: calc(100% + 32px);
margin-left: -16px;
.title {
cursor: pointer;
font-size: 18px !important;
}
}
.ns-detail {
border-bottom: 1px solid #ecedef;
&:last-child {
border-bottom-width: 0;
}
&:first-child {
:deep(.ant-descriptions-header) {
margin-top: 0;
}
}
:deep(.ant-descriptions-header) {
margin-top: 12px;
margin-bottom: 12px;
.ant-descriptions-title {
line-height: 16px;
font-size: 16px;
}
}
}
:deep(.ant-image) {
width: 64px;
height: 64px;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.ns-detail-html {
:deep(table) {
border-top: 1px solid #ffffff;
border-left: 1px solid #ffffff;
:deep(p) {
font-size: 12px;
color: #898e91;
}
}
:deep(th) {
border-right: 1px solid #ffffff;
font-size: 13px;
padding-top: 5px;
padding-bottom: 5px;
font-weight: normal;
background: #eff0f2;
}
:deep(td) {
border-top: 1px solid #ffffff;
border-right: 1px solid #ffffff;
padding-top: 5px;
padding-bottom: 5px;
font-size: 12px;
color: #606060;
text-align: center;
:deep(text) {
border-bottom: 1px solid #ffffff;
}
background: rgba(240, 242, 245, 0.5);
}
}

72
hx-ai-intelligent/src/theme/form.less

@ -0,0 +1,72 @@
.ns-view {
min-height: 100%;
height: 100%;
background: #e5ebf0;
}
.ns-page-header {
margin-bottom: 0 !important;
padding: 7px 16px !important;
width: calc(100% + 32px);
margin-left: -16px;
.title {
cursor: pointer;
font-size: 18px !important;
display: flex;
align-items: center;
.text {
margin-left: 6px;
}
}
}
:deep(.ant-spin-nested-loading) {
min-height: 100%;
height: 100%;
}
:deep(.ant-spin-container) {
min-height: 100%;
height: 100%;
}
:deep(.ant-divider) {
display: none;
}
.ns-add-form {
border-top: 16px solid #e5ebf0;
padding: 16px 21px;
background: #fff;
height: calc(100% - 47px) !important;
.ns-form {
// 第一个子表单Title距离顶部为0
:deep(.ns-form-item .ns-form-body .ns-child-form-title) {
padding-top: 0;
}
&:after {
display: none !important;
}
}
:deep(.ns-child-form-title) {
&:after {
content: '';
width: 75px;
height: 7px;
display: block;
background: linear-gradient(90deg, #537fff 0%, #fff 82.67%);
margin-left: 2px;
margin-top: -7px;
}
}
}
:deep(.ns-form.ns-vertical-form) {
padding-top: 16px !important;
}

183
hx-ai-intelligent/src/theme/global.less

@ -0,0 +1,183 @@
//侧边导航
// .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
// background: rgb(229, 247, 249) !important;
// }
// .ant-menu.ant-menu-dark .ant-menu-item-selected {
// color: #fff;
// background: #43BB79 !important;
// }
// .ant-menu-dark.ant-menu-horizontal>.ant-menu-item:hover {
// background-color: #43BB79 !important;
// }
.ant-menu-inline .ant-menu-item,
.ant-menu-inline .ant-menu-submenu-title {
width: 100% !important;
}
.ns-basic-table .ant-btn:hover {
border-color: transparent !important;
}
.ns-basic-table .ant-btn-link:hover {
background: none !important;
}
// .ns-detail {
// padding: 0px 24px 10px 24px !important;
// }
.ant-tabs-nav-wrap {
padding: 0 24px; // 列表tab边距
}
.ant-tabs-nav {
margin: 0 !important; // 列表tab下边距
}
.ns-richText-ZIndex {
z-index: 1;
}
.ant-input-number {
width: 100%; //inputNumber组件宽度
}
// header菜单字体样式
.ant-menu-dark.ant-menu-horizontal>.ant-menu-item,
.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu {
color: #fff;
}
.ant-menu-dark .ant-menu-item,
.ant-menu-dark .ant-menu-item-group-title,
.ant-menu-dark .ant-menu-item>a,
.ant-menu-dark .ant-menu-item>span>a {
color: #fff;
}
@font-face {
/*给字体命名*/
font-family: 'YouSheBiaoTiHei';
/*引入字体文件*/
src: url('/font/YouSheBiaoTiHei.ttf');
font-weight: normal;
font-style: normal;
}
@font-face {
/*给字体命名*/
font-family: 'DIN Alternate';
/*引入字体文件*/
src: url('/font/DIN Alternate Bold.ttf');
font-weight: normal;
font-style: normal;
}
@font-face {
/*给字体命名*/
font-family: 'PingFang Regular';
/*引入字体文件*/
src: url('/font/PingFang Regular.ttf');
font-weight: normal;
font-style: normal;
}
@font-face {
/*给字体命名*/
font-family: 'HYYakuHei';
/*引入字体文件*/
src: url('/font/HYYakuHei-85W.ttf');
font-weight: normal;
font-style: normal;
}
// .ant-popover-message {
// width: 250px !important;
// height: 198px !important;
// overflow: auto !important;
// position: relative;
// padding: 0;
// color: rgba(0, 0, 0, 0.85);
// font-size: 14px;
// }
// .ant-popover-inner-content {
// /* padding: 12px 16px; */
// padding: 0;
// color: rgba(0, 0, 0, 0.85);
// }
.ant-menu-title-content {
svg {
color: #A1ABC2;
}
}
.ant-menu-item-selected {
svg {
color: #D0DBF5;
}
}
//状态颜色
.commonStatus {
&::before{
content: '';
width: 8px;
height: 8px;
display: inline-block;
border-radius: 50%;
vertical-align: middle;
margin-right: 4px;
}
}
.statusWarn {
&::before{
background-color: #fa8214;
}
}
.statusSuccess {
&::before{
background-color: #0D9E3E;
}
}
.statusRunning {
&::before{
background-color: #1C4DDC;
}
}
.statusError {
&::before{
background-color: #D4321C;
}
}
.statusEmpty {
&::before{
width:0;
}
width:0;
}
.statusNotStart {
&::before{
background-color: #8B98AB;
}
}
.statusDone{
&::before{
background-color: #697383;
}
}
.statusInvalid{
&::before{
background-color: #AEAEAE;
}
}

73
hx-ai-intelligent/src/theme/global.scss

@ -0,0 +1,73 @@
@font-face {
font-family: 'QuartzMS';
src: url('/asset/font/QuartzMS.TTF') format('truetype');
}
@font-face {
font-family: 'FZDeSHJW_511M';
src: url('/asset/font/FZDeSHJW_511M.TTF') format('truetype');
}
@font-face {
font-family: 'Fzltth_SC';
src: url('/asset/font/Fzltth_SC.otf') format('truetype');
}
//侧边导航
// .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
// background: rgb(229, 247, 249) !important;
// }
.ant-menu-inline .ant-menu-item,
.ant-menu-inline .ant-menu-submenu-title {
width: 100% !important;
}
.ns-basic-table .ant-btn:hover {
border-color: transparent !important;
}
.ns-basic-table .ant-btn-link:hover {
background: none !important;
}
// .ns-detail {
// padding: 0px 24px 10px 24px !important;
// }
.ant-tabs-nav-wrap {
padding: 0 24px; // 列表tab边距
}
.ant-tabs-nav {
margin: 0 !important; // 列表tab下边距
}
.ns-richText-ZIndex {
z-index: 1;
}
.ant-input-number {
width: 100%; //inputNumber组件宽度
}
// header菜单字体样式
.ant-menu-dark.ant-menu-horizontal>.ant-menu-item,
.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu {
color: #fff;
}
.ant-menu-dark .ant-menu-item,
.ant-menu-dark .ant-menu-item-group-title,
.ant-menu-dark .ant-menu-item>a,
.ant-menu-dark .ant-menu-item>span>a {
color: #fff;
}
.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu:hover::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-active::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-active::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-open::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-open::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-selected::after, .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected::after {
border-bottom: unset !important;
}
.ant-menu-horizontal{
border-bottom: unset !important;
}

2
hx-ai-intelligent/src/theme/theme.scss

@ -0,0 +1,2 @@
@import "variable";
@import "global";

36
hx-ai-intelligent/src/theme/variable.less

@ -0,0 +1,36 @@
// @import "./global-antd.less";
@primary-color: #ff7602; // 全局主色
@layout-header-hover: #924908; //hover
@layout-header-background: #111519; // 头部背景色
// @layout-header-background:url(/asset/image/header_background.png) no-repeat;
// @ant-layout-sider-collapsed-background:url(/asset/image/sider_collapsed_background.png) no-repeat;
//btn
// @btn-height-base: 30px;
// @btn-height-lg: 30px;
// @btn-disable-bg: #dfe3e9; //禁用按钮background
// @btn-disable-border: 1px solid #ced0da;
// @btn-link-hover-bg: #37ABC4;
// @btn-text-hover-bg: #46ebdb;
// //input
// @input-height-base: 30px;
// //form
// @label-color: #52616f; //form-lable颜色
// @form-item-margin-bottom: 16px;
// //menu
//spin
// @border-width-base: 1px;
// @border-style-base: solid;

1
hx-ai-intelligent/src/types.d.ts

@ -0,0 +1 @@
declare module '*.vue';

21
hx-ai-intelligent/src/util/debounce.ts

@ -0,0 +1,21 @@
export function debounce(_this: any, fn: (arg0: any) => void) {
// 用rAF去做防抖
return function (...args: any) {
if (_this.lock) return;
const run = function () {
// requestIdleCallback-任务调度
window.requestIdleCallback(function (deadline) {
_this.lock = true;
// 判断空闲时间
// 显示器刷新频率HZ 16.7ms内不会重复执行
if (deadline.timeRemaining() > 1000 / 60) {
fn(...args);
_this.lock = false;
} else {
run();
}
});
};
run();
};
}

17
hx-ai-intelligent/src/view/developing.vue

@ -0,0 +1,17 @@
<template>
<div class="content">{{ content }}</div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router';
console.log(useRouter().currentRoute.value.meta);
const content = useRouter().currentRoute.value.meta.title + 'developing';
</script>
<style scoped lang="less">
.content {
font-size: 30px;
display: flex;
align-items: center;
justify-content: center;
}
</style>

101
hx-ai-intelligent/src/view/organizationManage/enterpriseManage/config.ts

@ -0,0 +1,101 @@
import { dateUtil } from '/nerv-lib/util/date-util';
export const tableConfig = {
title: '企业管理',
api: '/carbon_emission/device/getDeviceList',
params: {
page: 0,
pageSize: 10,
},
rowSelection: null,
columns: [
{
title: '设备id',
dataIndex: 'id',
},
{
title: '设备编号',
dataIndex: 'deviceCode',
},
{
title: '设备名称',
dataIndex: 'deviceName',
textNumber: 8,
textEllipsis: true,
},
{
title: '设备类别',
dataIndex: 'position',
},
],
columnActions: {
title: '操作',
actions: [
{
label: '删除',
name: 'AppointMessageRefund',
confirm: true,
},
],
},
formConfig: {
schemas: [
{
field: 'createTime',
label: '支付时间',
component: 'NsRangePicker',
fieldMap: ['queryStartDate', 'queryEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'payWay',
label: '支付方式',
component: 'NsSelect',
componentProps: {
placeholder: '请选择',
options: [
{
label: '全部',
value: '',
},
{
label: '现金',
value: 1,
},
{
label: '支付宝',
value: 2,
},
{
label: '微信',
value: 3,
},
// {
// label: '丰收互联',
// value: 4,
// },
// {
// label: '银联云闪付',
// value: 5,
// },
// {
// label: '余额',
// value: 6,
// },
{
label: '优惠支付',
value: 7,
},
],
},
},
],
params: {},
},
// pagination: { pageSizeOptions: false },
rowKey: 'uuid',
};

7
hx-ai-intelligent/src/view/organizationManage/enterpriseManage/index.vue

@ -0,0 +1,7 @@
<template>
<ns-view-list-table v-bind="tableConfig" />
</template>
<script lang="ts" setup>
import { tableConfig } from '/@/view/organizationManage/enterpriseManage/config';
</script>
<style lang="less" scoped></style>

51
hx-ai-intelligent/tsconfig.json

@ -0,0 +1,51 @@
{
"compilerOptions": {
"allowJs": true,
"baseUrl": "./",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "preserve",
"lib": ["esnext", "dom"],
"module": "esnext",
"moduleResolution": "node",
"noUnusedLocals": true,
"noUnusedParameters": true,
"paths": {
"/@/*": [
"src/*"
],
"/nerv-lib/*": [
"../lib/*"
],
"/nerv-base/*": [
"../lib/saas/*"
],
"/type/*": [
"../type/*"
]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"strictFunctionTypes": false,
"target": "esnext",
"typeRoots": [
"../node_modules/@types",
"../node_modules/@vue",
"../type"
],
"types": ["vite/client"]
},
"include": [
"src/**/*",
"type/**/*",
"mock/**/*",
"vite.config.ts"
],
"exclude": [
"node_modules",
"dist",
"**/*.js"
]
}

15
hx-ai-intelligent/vite.config.ts

@ -0,0 +1,15 @@
import configFun from '../build/vite-default.config';
const dirname = __dirname;
const proxy = {
'/qa': {
target: 'http://100.86.13.179:8080/qa',
// target: 'http://100.86.13.206:8081/qa',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/qa/, ''),
},
'/carbon_emission': {
target: 'http://140.210.143.1:14492',
changeOrigin: true,
},
};
export default configFun({ dirname, proxy, serviceMode: 'saas', baseDir: '../' });

10
lib/saas/config/table.config.ts

@ -1,15 +1,15 @@
export const tableConfig = { export const tableConfig = {
pageField: 'data.page', //当前页 pageField: 'data.pages', //当前页
pageCount: 'data.pageCount', //当前页 pageCount: 'data.pageCount', //当前页
sizeField: 'data.pageSize', // 每页数量 sizeField: 'data.size', // 每页数量
listField: 'data.data', // 数据集合 listField: 'data.records', // 数据集合
totalField: 'data.items', // 数据总数 totalField: 'data.total', // 数据总数
pageFieldOffset: 1, //前端页码1开始,后端0 偏移量 1 pageFieldOffset: 1, //前端页码1开始,后端0 偏移量 1
pageSizeOptions: ['10', '20', '40'], // 分页设置种类 pageSizeOptions: ['10', '20', '40'], // 分页设置种类
defaultPageSize: 10, // 默认每页数量 defaultPageSize: 10, // 默认每页数量
paramsPageSizeField: 'pageSize', paramsPageSizeField: 'pageSize',
paramsPageField: 'page', paramsPageField: 'pageNumber',
paramsOrderField: 'order', paramsOrderField: 'order',
columnActions: { columnActions: {
title: '操作', title: '操作',

11
lib/saas/view/system/login.vue

@ -3,10 +3,10 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%">
<a-layout style="height: 100%"> <a-layout style="height: 100%">
<a-layout-header class="home_header" style="position: relative"> <!-- <a-layout-header class="home_header" style="position: relative"> -->
<ns-icon class="test" name="login" size="64" style="width: 220px" /> <!-- <ns-icon class="test" name="login" size="64" style="width: 220px" /> -->
<!-- <img v-else :src="themeConfig.logoUrl" style="width: 220px; height: 48px" /> --> <!-- <img v-else :src="themeConfig.logoUrl" style="width: 220px; height: 48px" /> -->
</a-layout-header> <!-- </a-layout-header> -->
<a-layout-content <a-layout-content
class="center-content" class="center-content"
:style="{ :style="{
@ -16,7 +16,7 @@
backgroundSize: 'cover', backgroundSize: 'cover',
}"> }">
<div class="lg_card"> <div class="lg_card">
<h1 class="lg_card_title">账号登录cur</h1> <h1 class="lg_card_title">账号登录</h1>
<p v-show="!errorShow" style="height: 8px"></p> <p v-show="!errorShow" style="height: 8px"></p>
<p v-show="errorShow" class="lg_card_error">{{ errorMsg }}</p> <p v-show="errorShow" class="lg_card_error">{{ errorMsg }}</p>
<p class="lg_card_tip">用户名/手机号</p> <p class="lg_card_tip">用户名/手机号</p>
@ -43,7 +43,7 @@
> >
</div> </div>
</a-layout-content> </a-layout-content>
<a-layout-footer>Copyright 2021 xu科技 All Rights Reserved</a-layout-footer> <!-- <a-layout-footer>Copyright 2021 xu科技 All Rights Reserved</a-layout-footer> -->
</a-layout> </a-layout>
</div> </div>
</template> </template>
@ -232,6 +232,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
padding-right: 100px;
} }
.ant-layout-footer { .ant-layout-footer {

4
lib/use/use-api.ts

@ -2,6 +2,8 @@ import type { AxiosRequestConfig } from 'axios';
import { http } from '../util/http'; import { http } from '../util/http';
import { isFunction, isPlainObject, isString } from 'lodash-es'; import { isFunction, isPlainObject, isString } from 'lodash-es';
import { usePath } from '/nerv-lib/use/use-path'; import { usePath } from '/nerv-lib/use/use-path';
import { RequestEnum } from '/@/enum/http-enum.ts';
export type HttpRequestConfig = AxiosRequestConfig; export type HttpRequestConfig = AxiosRequestConfig;
export interface HttpRequest { export interface HttpRequest {
@ -40,7 +42,7 @@ export function useApi() {
params = paramsFilter(params); params = paramsFilter(params);
} }
if (requestConfig?.method?.toLocaleLowerCase() === 'get') { if (RequestEnum[requestConfig?.method?.toLocaleUpperCase()] === 'GET') {
if (!requestConfig.params) requestConfig.params = params; if (!requestConfig.params) requestConfig.params = params;
} else { } else {
if (!requestConfig.data) requestConfig.data = params; if (!requestConfig.data) requestConfig.data = params;

9
lib/util/http/axios.ts

@ -4,6 +4,8 @@ import type { Result } from './axios.d';
import { NsMessage } from '/nerv-lib/component/message'; import { NsMessage } from '/nerv-lib/component/message';
import { routerConfig } from '/nerv-base/config/router.config'; import { routerConfig } from '/nerv-base/config/router.config';
import { Cookies } from '/nerv-lib/util/cookie'; import { Cookies } from '/nerv-lib/util/cookie';
import { RequestEnum } from '/@/enum/http-enum.ts';
export class NSAxios { export class NSAxios {
private instance: AxiosInstance; private instance: AxiosInstance;
private readonly options: AxiosRequestConfig; private readonly options: AxiosRequestConfig;
@ -157,8 +159,13 @@ export class NSAxios {
request<T = any>(config: AxiosRequestConfig): Promise<T> { request<T = any>(config: AxiosRequestConfig): Promise<T> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const methodTransform = {
...config,
method: RequestEnum[config.method?.toLocaleUpperCase()],
};
this.instance this.instance
.request<any, AxiosResponse<Result>>(config) .request<any, AxiosResponse<Result>>(methodTransform)
.then((res: AxiosResponse<Result>) => { .then((res: AxiosResponse<Result>) => {
resolve(res.data as unknown as Promise<T>); resolve(res.data as unknown as Promise<T>);
}) })

4
package.json

@ -7,8 +7,8 @@
"main": "./dist/nerv-lib.es.js", "main": "./dist/nerv-lib.es.js",
"scripts": { "scripts": {
"start": "npm run dev", "start": "npm run dev",
"parking": "vite serve ./nervui-smart-parking --config ./nervui-smart-parking/vite.config.ts", "ai": "vite serve ./hx-ai-intelligent --config ./hx-ai-intelligent/vite.config.ts",
"parking-build": "cross-env NODE_ENV=production vite build ./nervui-smart-parking --config ./nervui-smart-parking/vite.config.ts", "ai-build": "cross-env NODE_ENV=production vite build ./hx-ai-intelligent --config ./hx-ai-intelligent/vite.config.ts",
"dev": "vite", "dev": "vite",
"lint:eslint-fix": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", "lint:eslint-fix": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"build": "cross-env NODE_ENV=production vite build ", "build": "cross-env NODE_ENV=production vite build ",

3
vite.config.ts

@ -8,7 +8,7 @@ import dayjs from 'dayjs';
import pkg from './package.json'; import pkg from './package.json';
import vueJsx from '@vitejs/plugin-vue-jsx'; import vueJsx from '@vitejs/plugin-vue-jsx';
import path from 'path'; import path from 'path';
import legacy from '@vitejs/plugin-legacy' import legacy from '@vitejs/plugin-legacy';
const { dependencies, devDependencies, name, version } = pkg; const { dependencies, devDependencies, name, version } = pkg;
const __APP_INFO__ = { const __APP_INFO__ = {
platform: process.env.PLATFORM, platform: process.env.PLATFORM,
@ -33,6 +33,7 @@ export default defineConfig(({ mode, command }) => {
host: true, host: true,
port, port,
proxy, proxy,
open: false,
}; };
return { return {
base: VITE_PUBLIC_PATH, base: VITE_PUBLIC_PATH,

Loading…
Cancel
Save