初始化仓库
24
.env
Normal file
@ -0,0 +1,24 @@
|
||||
# 与viteBuild.ts配合使用
|
||||
|
||||
#前端配置
|
||||
# VUE端口号
|
||||
VITE_PORT = 8080
|
||||
# 运行 npm run dev 时自动打开浏览器
|
||||
VITE_OPEN = true
|
||||
#后端配置
|
||||
# 后端服务器 配置线上环境路径(打包)
|
||||
VITE_PUBLIC_PATH = '/'
|
||||
# 后端服务器RESRful服务接口前缀
|
||||
VITE_API_URL = '/api'
|
||||
|
||||
# 远程图像服务器地址 "http://127.0.0.1:8080/lims/avatar/"+row.jszImageUrl;
|
||||
# 本地图像服务器地址 "http://www.localhost:8080/avatar/"+row.jszImageUrl;
|
||||
# http://www.localhost:8080/avatar/admin.jpg
|
||||
# VITE_FILE_SERVER='http://www.localhost:8090/'
|
||||
# 线上
|
||||
VITE_FILE_SERVER='http://127.0.0.1:8090/'
|
||||
|
||||
# 后端websocket 部署至服务器时需更改
|
||||
# VITE_SOCKET_SERVER='ws://localhost:8090/atv/websocket/web/'
|
||||
# 线上websocket地址
|
||||
VITE_SOCKET_SERVER='ws://127.0.0.1:8090/atv/websocket/web/'
|
6
global.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export { }
|
||||
declare global {
|
||||
interface Window {
|
||||
$microWidgetProps: any;//全局变量名
|
||||
}
|
||||
}
|
32
index.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<title>BJTU-ATV</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- <script type="text/javascript">-->
|
||||
<!-- var _hmt = _hmt || [];-->
|
||||
<!-- (function () {-->
|
||||
<!-- var hm = document.createElement('script');-->
|
||||
<!-- //hm.src = 'https://hm.baidu.com/hm.js?d9c8b87d10717013641458b300c552e4';-->
|
||||
<!-- var s = document.getElementsByTagName('script')[0];-->
|
||||
<!-- s.parentNode.insertBefore(hm, s);-->
|
||||
<!-- })();-->
|
||||
<!-- </script>-->
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<script type="module" src="/src/utils/qunee-min.js"></script>
|
||||
<!--百度地图
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=wsijQt8sLXrCW71YesmispvYHitfG9gv&s=1"></script>
|
||||
高德地图
|
||||
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=46d0d803658dffb0b8d9522ffd397fbc"></script>
|
||||
-->
|
||||
</body>
|
||||
|
||||
</html>
|
8104
package-lock.json
generated
Normal file
102
package.json
Normal file
@ -0,0 +1,102 @@
|
||||
{
|
||||
"name": "sam_vue",
|
||||
"version": "1.0",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vite --force",
|
||||
"build": "vite build",
|
||||
"debug": "vite build --mode staging",
|
||||
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.0.10",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
||||
"@wangeditor/editor": "^5.1.21",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"axios": "^1.1.3",
|
||||
"countup.js": "^2.2.0",
|
||||
"echarts": "^5.4.0",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-liquidfill": "^3.1.0",
|
||||
"echarts-wordcloud": "^2.0.0",
|
||||
"element-plus": "^2.2.19",
|
||||
"font-awesome": "^4.7.0",
|
||||
"js-audio-recorder": "^1.0.7",
|
||||
"js-cookie": "^3.0.1",
|
||||
"js-table2excel": "^1.0.3",
|
||||
"jsplumb": "^2.15.6",
|
||||
"less": "^4.1.3",
|
||||
"less-loader": "^11.1.0",
|
||||
"mitt": "^3.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.0.23",
|
||||
"print-js": "^1.6.0",
|
||||
"qrcodejs2-fixes": "^0.0.2",
|
||||
"qs": "^6.11.0",
|
||||
"recorder-core": "^1.2.23020100",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.0",
|
||||
"splitpanes": "^3.1.1",
|
||||
"v-viewer": "^3.0.10",
|
||||
"vue-axios": "^3.5.1",
|
||||
"vue-clipboard3": "^2.0.0",
|
||||
"vue-cropper": "next",
|
||||
"vue-cropperjs": "^5.0.0",
|
||||
"vue-grid-layout": "next",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-native-websocket-vue3": "^3.1.7",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue3-audio-player": "^1.0.7",
|
||||
"vue3-video-play": "^1.3.1-beta.6",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"wangeditor": "^4.7.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.8.3",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@types/sortablejs": "^1.15.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.39.0",
|
||||
"@typescript-eslint/parser": "^5.39.0",
|
||||
"@vitejs/plugin-vue": "^3.1.2",
|
||||
"@vue/compiler-sfc": "^3.2.40",
|
||||
"dotenv": "^16.0.3",
|
||||
"eslint": "^8.25.0",
|
||||
"eslint-plugin-vue": "^9.6.0",
|
||||
"prettier": "^2.7.1",
|
||||
"sass": "^1.55.0",
|
||||
"sass-loader": "^13.0.0",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^3.1.7",
|
||||
"vue-eslint-parser": "^9.1.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
],
|
||||
"bugs": {
|
||||
"url": ""
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0",
|
||||
"npm": ">= 6.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"vue3",
|
||||
"vuejs/vue-next",
|
||||
"element-ui",
|
||||
"element-plus",
|
||||
"vue-next-admin",
|
||||
"next-admin"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": ""
|
||||
}
|
||||
}
|
4
plugins.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module 'vue-grid-layout';
|
||||
declare module 'qrcodejs2-fixes';
|
||||
declare module 'splitpanes';
|
||||
declare module 'js-cookie';
|
BIN
public/favicon.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
46
public/static/json/TATVPassenger.json
Normal file
@ -0,0 +1,46 @@
|
||||
[
|
||||
{
|
||||
"label": "时间",
|
||||
"name": "time"
|
||||
},
|
||||
{
|
||||
"label": "车厢号",
|
||||
"name": "CarNo_2"
|
||||
},
|
||||
{
|
||||
"label": "车厢名称",
|
||||
"name": "carNo"
|
||||
},
|
||||
{
|
||||
"label": "城市编号",
|
||||
"name": "cityNo"
|
||||
},
|
||||
{
|
||||
"label": "命令类型",
|
||||
"name": "cmd_code"
|
||||
},
|
||||
{
|
||||
"label": "制冷模式",
|
||||
"name": "cold_mode"
|
||||
},
|
||||
{
|
||||
"label": "国家编号",
|
||||
"name": "country"
|
||||
},
|
||||
{
|
||||
"label": "客流人数",
|
||||
"name": "crowd"
|
||||
},
|
||||
{
|
||||
"label": "设备编号",
|
||||
"name": "deviceNo"
|
||||
},
|
||||
{
|
||||
"label": "线路编号",
|
||||
"name": "metroLine"
|
||||
},
|
||||
{
|
||||
"label": "车辆编号",
|
||||
"name": "nowID"
|
||||
}
|
||||
]
|
38
public/static/json/TAtvInventory.json
Normal file
@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"label": "主键",
|
||||
"name": "id"
|
||||
},
|
||||
{
|
||||
"label": "仓库ID",
|
||||
"name": "warehouse_id"
|
||||
},
|
||||
{
|
||||
"label": "品目类型ID",
|
||||
"name": "product_type_id"
|
||||
},
|
||||
{
|
||||
"label": "品目信息ID",
|
||||
"name": "product_id"
|
||||
},
|
||||
{
|
||||
"label": "数量",
|
||||
"name": "quantity"
|
||||
},
|
||||
{
|
||||
"label": "品目编号",
|
||||
"name": "product_sn"
|
||||
},
|
||||
{
|
||||
"label": "规格型号",
|
||||
"name": "specifications"
|
||||
},
|
||||
{
|
||||
"label": "单位",
|
||||
"name": "unit"
|
||||
},
|
||||
{
|
||||
"label": "品目名称",
|
||||
"name": "product_name"
|
||||
}
|
||||
]
|
50
public/static/json/TAtvKnowledg.json
Normal file
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"label": "主键",
|
||||
"name": "id"
|
||||
},
|
||||
{
|
||||
"label": "标题",
|
||||
"name": "title"
|
||||
},
|
||||
{
|
||||
"label": "关键字",
|
||||
"name": "keyword"
|
||||
},
|
||||
{
|
||||
"label": "是否发布",
|
||||
"name": "is_release"
|
||||
},
|
||||
{
|
||||
"label": "知识类型",
|
||||
"name": "knowledge_type"
|
||||
},
|
||||
{
|
||||
"label": "内容",
|
||||
"name": "text"
|
||||
},
|
||||
{
|
||||
"label": "文件链接",
|
||||
"name": "link"
|
||||
},
|
||||
{
|
||||
"label": "网址",
|
||||
"name": "url"
|
||||
},
|
||||
{
|
||||
"label": "板卡故障单ID",
|
||||
"name": "board_card_fault_id"
|
||||
},
|
||||
{
|
||||
"label": "故障现象",
|
||||
"name": "phenomenon"
|
||||
},
|
||||
{
|
||||
"label": "处理措施",
|
||||
"name": "handle_mode"
|
||||
},
|
||||
{
|
||||
"label": "处理结果",
|
||||
"name": "handle_outcome"
|
||||
}
|
||||
]
|
30
public/static/json/TSysUser.json
Normal file
@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"label": "用户ID",
|
||||
"name": "user_id"
|
||||
},
|
||||
{
|
||||
"label": "部门ID",
|
||||
"name": "dept_id"
|
||||
},
|
||||
{
|
||||
"label": "角色ID",
|
||||
"name": "role_ids"
|
||||
},
|
||||
{
|
||||
"label": "岗位ID",
|
||||
"name": "post_ids"
|
||||
},
|
||||
{
|
||||
"label": "用户账号",
|
||||
"name": "user_name"
|
||||
},
|
||||
{
|
||||
"label": "帐号状态",
|
||||
"name": "status"
|
||||
},
|
||||
{
|
||||
"label": "最后登陆时间",
|
||||
"name": "login_date"
|
||||
}
|
||||
]
|
10
public/static/json/common.json
Normal file
@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"uuid": "0",
|
||||
"name": "有"
|
||||
},
|
||||
{
|
||||
"uuid": "1",
|
||||
"name": "无"
|
||||
}
|
||||
]
|
3
public/static/json/grafana.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"grafanaUrl": "http://192.168.0.200:3000"
|
||||
}
|
10
readme.md
Normal file
@ -0,0 +1,10 @@
|
||||
# 运行命令
|
||||
|
||||
- npm install
|
||||
- npm run dev
|
||||
|
||||
# 参考gitignore
|
||||
.gitignore
|
||||
.DS_Store
|
||||
.vscode
|
||||
node_modules
|
13
shim.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/* eslint-disable */
|
||||
|
||||
// 声明文件,*.vue 后缀的文件交给 vue 模块来处理
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue';
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
// 声明文件,定义全局变量。其它 app.config.globalProperties.xxx,使用 getCurrentInstance() 来获取
|
||||
interface Window {
|
||||
nextLoading: boolean;
|
||||
}
|
6
source.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
declare module '*.json';
|
||||
declare module '*.png';
|
||||
declare module '*.jpg';
|
||||
declare module '*.scss';
|
||||
declare module '*.ts';
|
||||
declare module '*.js';
|
92
src/App.vue
Normal file
@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<el-config-provider :size="getGlobalComponentSize" :locale="i18nLocale">
|
||||
<router-view v-show="themeConfig.lockScreenTime > 1" />
|
||||
<LockScreen v-if="themeConfig.isLockScreen" />
|
||||
<Setings ref="setingsRef" v-show="themeConfig.lockScreenTime > 1" />
|
||||
<CloseFull v-if="!themeConfig.isLockScreen" />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, ref, getCurrentInstance, onBeforeMount, onMounted, onUnmounted, nextTick, defineComponent, watch, reactive, toRefs } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||
import other from '/@/utils/other';
|
||||
import { Local, Session } from '/@/utils/storage';
|
||||
import setIntroduction from '/@/utils/setIconfont';
|
||||
import LockScreen from '/@/layout/lockScreen/index.vue';
|
||||
import Setings from '/@/layout/navBars/breadcrumb/setings.vue';
|
||||
import CloseFull from '/@/layout/navBars/breadcrumb/closeFull.vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'app',
|
||||
components: { LockScreen, Setings, CloseFull },
|
||||
setup() {
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
const setingsRef = ref();
|
||||
const route = useRoute();
|
||||
const stores = useTagsViewRoutes();
|
||||
const storesThemeConfig = useThemeConfig();
|
||||
const { themeConfig } = storeToRefs(storesThemeConfig);
|
||||
const state = reactive({
|
||||
i18nLocale: null,
|
||||
});
|
||||
// 获取全局组件大小
|
||||
const getGlobalComponentSize = computed(() => {
|
||||
return other.globalComponentSize();
|
||||
});
|
||||
// 布局配置弹窗打开
|
||||
const openSetingsDrawer = () => {
|
||||
setingsRef.value.openDrawer();
|
||||
};
|
||||
// 设置初始化,防止刷新时恢复默认
|
||||
onBeforeMount(() => {
|
||||
// 设置批量第三方 icon 图标
|
||||
setIntroduction.cssCdn();
|
||||
// 设置批量第三方 js
|
||||
setIntroduction.jsCdn();
|
||||
});
|
||||
// 页面加载时
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
// 监听布局配置弹窗点击打开
|
||||
proxy.mittBus.on('openSetingsDrawer', () => {
|
||||
openSetingsDrawer();
|
||||
});
|
||||
// 设置 i18n,App.vue 中的 el-config-provider
|
||||
proxy.mittBus.on('getI18nConfig', (locale: string) => {
|
||||
(state.i18nLocale as string | null) = locale;
|
||||
});
|
||||
// 获取缓存中的布局配置
|
||||
if (Local.get('themeConfig')) {
|
||||
storesThemeConfig.setThemeConfig(Local.get('themeConfig'));
|
||||
document.documentElement.style.cssText = Local.get('themeConfigStyle');
|
||||
}
|
||||
// 获取缓存中的全屏配置
|
||||
if (Session.get('isTagsViewCurrenFull')) {
|
||||
stores.setCurrenFullscreen(Session.get('isTagsViewCurrenFull'));
|
||||
}
|
||||
});
|
||||
});
|
||||
// 页面销毁时,关闭监听布局配置/i18n监听
|
||||
onUnmounted(() => {
|
||||
proxy.mittBus.off('openSetingsDrawer', () => { });
|
||||
proxy.mittBus.off('getI18nConfig', () => { });
|
||||
});
|
||||
// 监听路由的变化,设置网站标题
|
||||
watch(
|
||||
() => route.path,
|
||||
() => { other.useTitle(); },
|
||||
{ deep: true, }
|
||||
);
|
||||
return {
|
||||
themeConfig,
|
||||
setingsRef,
|
||||
getGlobalComponentSize,
|
||||
...toRefs(state),
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
133
src/api/atvApi.ts
Normal file
@ -0,0 +1,133 @@
|
||||
import { AnyCnameRecord } from 'dns'
|
||||
import request from '/@/utils/ajax/request'
|
||||
|
||||
//为<el-cascader>获取部国家-城市-线路下拉树列表 数据格式:<value,label,level,leaf,children>
|
||||
export function getLineTree() {
|
||||
return request({ url: '/getLineTree', method: 'get' })
|
||||
}
|
||||
|
||||
//入库
|
||||
export function Warehouse(params: any) {
|
||||
return request({ url: '/atvOutputAndInputStock/inputAdd', method: 'post', data: params })
|
||||
}
|
||||
//出库
|
||||
export function Warehouseout(params: any) {
|
||||
return request({ url: '/atvOutputAndInputStock/outputAdd', method: 'post', data: params })
|
||||
}
|
||||
|
||||
//根据设备类型重启设备
|
||||
export function rebootAll(params: any) {
|
||||
return request({ url: '/atvEquipment/rebootAll', method: 'get', data: params })
|
||||
}
|
||||
//单个设备重启
|
||||
export function rebootOne(params: any) {
|
||||
return request({ url: '/atvEquipment/rebootOne', method: 'get', data: params })
|
||||
}
|
||||
|
||||
//升级设备单个
|
||||
export function upgradeOne(params: any) {
|
||||
return request({ url: '/atvEquipment/upgradeOne', method: 'get', data: params })
|
||||
}
|
||||
//升级设备 整个车厢或整条线
|
||||
export function upgradeAll(params: any) {
|
||||
return request({ url: '/atvEquipment/upgradeAll', method: 'get', data: params })
|
||||
}
|
||||
|
||||
//下载日志信息
|
||||
export function downloadLog(params: any) {
|
||||
return request({ url: '/atvEquipment/downloadLog', method: 'get', data: params })
|
||||
}
|
||||
//新增故障
|
||||
export function addFault(params: any) {
|
||||
return request({ url: '/atvBoardCardFault/add', method: 'post', data: params })
|
||||
}
|
||||
//编辑故障
|
||||
export function updateFault(params: any) {
|
||||
return request({ url: '/atvBoardCardFault/update', method: 'post', data: params })
|
||||
}
|
||||
//删除故障
|
||||
export function deleteFault(params: any) {
|
||||
return request({ url: '/atvBoardCardFault/delete', method: 'post', data: params })
|
||||
}
|
||||
//查看线路工人信息
|
||||
export function lineWorkers(params: any) {
|
||||
return request({ url: '/atvBoardCardFault/lineWorkers', method: 'get', data: params })
|
||||
}
|
||||
// 手动派单
|
||||
export function dispatch(params: any) {
|
||||
return request({ url: '/atvBoardCardFault/dispatch', method: 'GET', data: params })
|
||||
}
|
||||
//获取故障附件文件信息列表 原来getFile
|
||||
export function getFaultFileList(params: any) {
|
||||
return request({ url: '/atvBoardCardFaultFile/list', method: 'get', data: params })
|
||||
}
|
||||
// 入知识库
|
||||
export function saveKnowledge(params: any) {
|
||||
return request({ url: '/atvKnowledge/add', method: 'post', data: params })
|
||||
}
|
||||
// 知识库编辑
|
||||
export function updateKnowledge(params: any) {
|
||||
return request({ url: '/atvKnowledge/update', method: 'put', data: params })
|
||||
}
|
||||
//知识库删除
|
||||
export function delBatchKnowledge(params: any) {
|
||||
return request({ url: '/atvKnowledge/delBatch', method: 'delete', data: params })// 知识库是否发布
|
||||
}
|
||||
// 知识库是否发布
|
||||
export function isRelease(params: any) {
|
||||
return request({ url: '/atvKnowledge/isRelease', method: 'get', data: params })// 知识库是否发布
|
||||
}
|
||||
// 知识库详情
|
||||
export function getKnowledgeDetail(params: any) {
|
||||
return request({ url: '/atvKnowledge/getKnowledgeDetailById', method: 'get', data: params })
|
||||
}
|
||||
//知识附件表
|
||||
export function getKnowledgeFileList(params: any) {
|
||||
return request({ url: '/atvKnowledgeFile/list', method: 'get', data: params })// 知识库是否发布
|
||||
}
|
||||
// 获取日志的数量
|
||||
export function getLogCount(params: any) {
|
||||
return request({ url: '/trainMonitor/getLogCount', method: 'get', data: params })
|
||||
}
|
||||
// 日志回放
|
||||
export function trainMonitor(params: any) {
|
||||
return request({ url: '/trainMonitor/logPlayback', method: 'get', data: params })
|
||||
}
|
||||
|
||||
//上传文本信息
|
||||
export function uploadText(data: Array<object>) {
|
||||
return request({ url: '/broadcast/uploadText', method: 'post', data: data })
|
||||
}
|
||||
//上传Tts信息
|
||||
export function uploadTts(data: any) {
|
||||
return request({ url: '/broadcast/uploadTts', method: 'GET', data: data })
|
||||
}
|
||||
//远程广播
|
||||
export function playTts(data: any) {
|
||||
return request({ url: '/broadcast/playTts', method: 'Get', data: data })
|
||||
}
|
||||
//获取阈值
|
||||
export function getThreshold(boardCardType: any) {
|
||||
return request({ url: '/getThreshold', method: 'get', data: boardCardType })
|
||||
}
|
||||
|
||||
/**
|
||||
* 按orders字段排序获取车厢信息
|
||||
* @param data 车辆id
|
||||
* @return 车辆中车厢信息
|
||||
*/
|
||||
export function getCarriageListByOrder(data: any) {
|
||||
return request({ url: '/getCarriageListByOrder', method: 'GET', data: data })
|
||||
}
|
||||
//赋值车辆
|
||||
export function copyTrain(data: any) {
|
||||
return request({ url: '/copyTrain', method: 'POST', data: data })
|
||||
}
|
||||
export function updateSaveTrain(data: Array<object>, whereParam: object) {
|
||||
let param = { "data": JSON.stringify(data), "where": JSON.stringify(whereParam) }
|
||||
return request({ url: '/updateSaveTrain', method: 'post', data: param })
|
||||
}
|
||||
//计算阈值
|
||||
export function calculateThreshold(type: string) {
|
||||
return request({ url: '/calculateThreshold/' + type, method: 'GET' })
|
||||
}
|
132
src/api/crudApi.ts
Normal file
@ -0,0 +1,132 @@
|
||||
import request from '/@/utils/ajax/request'
|
||||
import { praseStrEmpty } from '/@/utils';
|
||||
|
||||
|
||||
//产生指定位数验证码
|
||||
export function genVerifyCode(digitNum: string) {
|
||||
return request({ url: '/common/genVerifyCode/' + praseStrEmpty(digitNum), method: 'get' })
|
||||
}
|
||||
|
||||
//验证字段的合法性:即验证满足查询条件keyValue([]map)的记录是否存在
|
||||
export function dupCheck(tableName: string, keyValue: object) {
|
||||
return request({ url: '/common/dupCheck/' + tableName, method: 'post', data: keyValue })
|
||||
}
|
||||
|
||||
|
||||
//所有记录的指定字段
|
||||
export function getKeySet(tableName: string, keys: string) {
|
||||
return request({ url: '/getKeySet/' + tableName + '/' + keys, method: 'get', })
|
||||
}
|
||||
|
||||
//带有where条件
|
||||
export function getKeySet_where(tableName: string, keys: string, where: string) {
|
||||
return request({ url: '/getKeySet_where/' + tableName + '/' + keys + '/' + where, method: 'get', })
|
||||
}
|
||||
//字段rField满足唯一性
|
||||
export function getKeySet_unique(tableName: string, keys: string, rField: string) {
|
||||
return request({ url: '/getKeySet_unique/' + tableName + '/' + keys + '/' + rField, method: 'get', })
|
||||
}
|
||||
//上边两个的统一体
|
||||
export function getKeySet_uw(tableName: string, keys: string, rField: string, where: string) {
|
||||
return request({ url: '/getKeySet_uw/' + tableName + '/' + keys + '/' + rField + '/' + where, method: 'get', })
|
||||
}
|
||||
|
||||
//删除所选全部记录 主键默为id
|
||||
export function delByIds(tableName: string, data: number) {
|
||||
return request({ url: '/delByIds/' + tableName + '/' + data, method: 'delete', })
|
||||
}
|
||||
|
||||
//依据给定SQL返回查询结果。data为查询条件.返回全部满足条件的统计结果
|
||||
export function getListBySql_count(sqlById: string, data: any) {
|
||||
return request({ url: '/getListBySql_count/' + sqlById, method: 'get', params: data })
|
||||
}
|
||||
|
||||
//清空表
|
||||
export function removeAll(tableName: string) {
|
||||
return request({ url: '/removeAll/' + tableName, method: 'delete' })
|
||||
}
|
||||
|
||||
//对所选记录(主键是long等数字型)的某些字段data进行赋值,比如进行逻辑删除 即对删除字段赋值1
|
||||
export function updateBatchById(tableName: string, ids: number, data: object) {
|
||||
return request({
|
||||
url: '/updateBatchById/' + tableName + '/' + ids, method: 'put', data: data
|
||||
})
|
||||
}
|
||||
//默认单一主键UUID 对所选记录的某些字段data进行赋值,比如进行逻辑删除.
|
||||
//keyValue格式相当于:id|value; 这里仅需给出value
|
||||
export function updateBatch(tableName: string, keyValue: any, setParam: object) {
|
||||
return request({ url: '/updateBatch/' + tableName + '/' + keyValue, method: 'put', data: setParam })
|
||||
}
|
||||
/*单表: 依据条件先删除,然后再插入 主要用于动态表格数据Array<object>:Ok
|
||||
let formData = new FormData();
|
||||
formData.append("data", JSON.stringify(data));
|
||||
formData.append("where", JSON.stringify(whereParam));*/
|
||||
export function delSave(tableName: string, data: Array<object>, whereParam: object) {
|
||||
let param = { "data": JSON.stringify(data), "where": JSON.stringify(whereParam) }
|
||||
return request({ url: '/delInsert/' + tableName, method: 'post', data: param })
|
||||
}
|
||||
export function updateSave(tableName: string, data: Array<object>, whereParam: object) {
|
||||
let param = { "data": JSON.stringify(data), "where": JSON.stringify(whereParam) }
|
||||
return request({ url: '/updateInsert/' + tableName, method: 'post', data: param })
|
||||
}
|
||||
//删除所选的记录 可多表。删除条件主键一样:whereParam(后端map)
|
||||
export function delBatch_where(tableName: string, whereParam: object) {
|
||||
return request({ url: '/delBatch_where/' + tableName, method: 'delete', data: whereParam })
|
||||
}
|
||||
|
||||
//为数据库产生25UUID
|
||||
export function genUUID25_num() {
|
||||
return request({ url: '/genUUID25_num', method: 'get' })
|
||||
}
|
||||
//删除所选的一条记录 自定义主键及取值 后端map
|
||||
export function delById(tableName: string, keyValue: object) {
|
||||
return request({ url: '/delById/' + tableName, method: 'delete', data: keyValue })
|
||||
}
|
||||
|
||||
//删除所选全部记录 主键默为id
|
||||
export function delBatch(tableName: string, data: any) {
|
||||
return request({ url: '/delBatch/' + tableName, method: 'delete', data: data, })
|
||||
}
|
||||
export function delBatch_num(tableName: string, data: any) {
|
||||
return request({ url: '/delBatch_num/' + tableName + '/' + data, method: 'delete', })
|
||||
}
|
||||
//删除所选全部记录
|
||||
export function delBySQL(sqlId: string, whereParam: object) {
|
||||
return request({ url: '/delBySQL/' + sqlId, method: 'delete', data: whereParam, })
|
||||
}
|
||||
//依据查询条件查询数据,最多一条记录
|
||||
export function getMap(tableName: string, param: any) {
|
||||
return request({ url: '/getMap/' + tableName, method: 'get', data: param })
|
||||
}
|
||||
//依据给定SQL返回查询结果Map
|
||||
export function getMapBySql(sqlById: string, data: any) {
|
||||
return request({ url: '/getMapBySql/' + sqlById, method: 'get', params: data })
|
||||
}
|
||||
//依据给定SQL返回查询结果List(分页)
|
||||
export function getListBySql(sqlById: string, data: any) {
|
||||
return request({ url: '/getListBySql/' + sqlById, method: 'get', params: data })
|
||||
}
|
||||
|
||||
//查询条件表格数据,分页返回
|
||||
export function getListByPage(tableName: string, param: any) {
|
||||
return request({ url: '/getListByPage/' + tableName, method: 'get', data: param })
|
||||
}
|
||||
//依据查询条件查询数据,一次性全部返回
|
||||
export function getList(tableName: string, param: any) {
|
||||
return request({ url: '/getList/' + tableName, method: 'get', data: param })
|
||||
}
|
||||
|
||||
//对所选记录的某些字段data进行赋值,自定义主键及取值keyValue格式:key|value
|
||||
export function updateBatch_where(tableName: string, keyValue: any, setParam: object) {
|
||||
return request({ url: '/updateBatch_where/' + tableName + '/' + keyValue, method: 'put', data: setParam })
|
||||
}
|
||||
//更新一条记录
|
||||
export function update(tableName: string, data: Array<object>) {
|
||||
return request({ url: '/update/' + tableName, method: 'put', data: data })
|
||||
}
|
||||
//保存一条记录
|
||||
export function save(tableName: string, data: Array<object>) {
|
||||
return request({ url: '/insert/' + tableName, method: 'post', data: data })
|
||||
}
|
||||
|
||||
|
165
src/api/fileApi.ts
Normal file
@ -0,0 +1,165 @@
|
||||
import request from '/@/utils/ajax/request'
|
||||
import $axiosJson from '/@/utils/ajax/axiosJson'
|
||||
import axios from 'axios';
|
||||
import { isNull } from '/@/utils/sam/validate';
|
||||
//即/api
|
||||
const baseURL = import.meta.env.VITE_API_URL
|
||||
|
||||
/**上传图片
|
||||
* @param {File} file 文件名
|
||||
* @param {data} 附加参数JSON.stringify(
|
||||
*/
|
||||
export function uploadFile(file: any, data: any) {
|
||||
let formData = new FormData();
|
||||
formData.append("file", file)
|
||||
formData.append("data", JSON.stringify(data))
|
||||
return request({ url: '/file/uploadFile', method: 'post', data: formData })
|
||||
/*OK 原生。 解析返回结果:res.data.data
|
||||
return axios({
|
||||
url: baseURL + "/file/uploadFile",
|
||||
headers: { "Content-Type": "multipart/form-data", },
|
||||
method: "post", data: formData,
|
||||
});*/
|
||||
}
|
||||
|
||||
/** 导出多sheet Excel文件:此方法由用户直接处理返回结果
|
||||
* 服务器响应的数据类型:responseType,默认是'json'. 可以是
|
||||
* "blob" 'arraybuffer', 'document', 'json', 'text', 'stream',
|
||||
* Excel文件下载:responseType = ‘arraybuffer’,必须设置,否则导出excel表格打不开
|
||||
* encodeURI(JSON.stringify(extParam))
|
||||
*/
|
||||
export function exportSheets(extParam: any, requestUrl: string) {
|
||||
const url = baseURL + requestUrl;
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.get(url, { params: extParam, responseType: "arraybuffer", })
|
||||
.then((res: any) => {
|
||||
const contentType = res.headers['content-type'];
|
||||
//excel文件直接下载
|
||||
if (contentType.indexOf("vnd.ms-excel") != -1) {
|
||||
// 非IE下载
|
||||
const blob = new Blob([res.data], {
|
||||
//type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
||||
type: 'application/vnd.ms-excel'
|
||||
});
|
||||
const elink = document.createElement('a');
|
||||
const href = window.URL.createObjectURL(blob); // 下载的链接
|
||||
elink.href = href;
|
||||
// 获取后台设置的文件名称
|
||||
elink.download = new Date().getTime() + '.xlsx'
|
||||
elink.download = decodeURI(
|
||||
res.headers['content-disposition'].split(';')[1].split('=')[1]
|
||||
);
|
||||
document.body.appendChild(elink);
|
||||
elink.click(); //点击下载
|
||||
document.body.removeChild(elink); // 下载完成移除元素
|
||||
window.URL.revokeObjectURL(href); // 释放掉blob对象
|
||||
}
|
||||
resolve(res.statusText);
|
||||
}).catch((err: any) => { reject(err); });
|
||||
});
|
||||
}
|
||||
//原来的
|
||||
export function exportSheet(extParam: any) {
|
||||
exportSheets(extParam, '/file/exportSheets');
|
||||
}
|
||||
|
||||
/* 直接下载服务器端的某个文件目录dirPath下文件fileName
|
||||
* 通过a标签的链接向后端服务发get请求,接收后端的文件流
|
||||
*/
|
||||
export function downloadFile(dirPath: string, fileName: string) {
|
||||
let url = baseURL + "/file/downloadFile/" + dirPath + "/" + fileName;
|
||||
return fetch(url,).then(res => res.blob().then(
|
||||
blob => {
|
||||
let a = document.createElement('a');
|
||||
let url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
if (fileName.includes(",")) {
|
||||
a.download = "download.zip";
|
||||
}
|
||||
else {
|
||||
a.download = fileName;
|
||||
}
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}))
|
||||
}
|
||||
// 获取本地json数据
|
||||
export function readJsonFile(name: string) {
|
||||
return $axiosJson({ url: '/static/json/' + name, method: 'GET', });
|
||||
};
|
||||
//批量删除多个表(逗号分割)。主键一样。同时删除指定路径下的文件
|
||||
export function delBatch_files(tableName: string, data: object, fileDir: string, fileName: string) {
|
||||
return request({ url: '/file/delBatch_files/' + tableName + '/' + fileDir + '/' + fileName, method: 'delete', data: data })
|
||||
}
|
||||
//批量删除一个表内多条记录(单一主键keyIds)。同时删除指定路径(fileDir)下的具有文件前缀filePre的所有文件
|
||||
export function delBatch_file(tableName: string, keyIds: object, fileDir: string, filePre: string) {
|
||||
return request({ url: '/file/delBatch_file/' + tableName + '/' + fileDir, method: 'delete', data: { id: keyIds, file: filePre } })
|
||||
}
|
||||
/**
|
||||
* 删除给定目录下的多个文件,文件之间用逗号隔开
|
||||
* @param paths 文件路径
|
||||
*/
|
||||
export function delFiles(dirPath: string, paths: Array<string>) {
|
||||
return request({ url: '/file/delFiles/' + dirPath, method: 'post', data: paths })
|
||||
}
|
||||
/**
|
||||
* 删除给定目录下的多个文件,文件之间用逗号隔开
|
||||
* @param paths 文件路径 filePrefix:文件前缀
|
||||
*/
|
||||
export function delFiles_P(dirPath: string, filePrefix: string, fileName: Array<string>) {
|
||||
if (isNull(filePrefix)) {
|
||||
filePrefix = "null";
|
||||
}
|
||||
return request({ url: '/file/delFiles_P/' + dirPath + "/" + filePrefix, method: 'post', data: fileName })
|
||||
}
|
||||
export function uploadExcelFile(file: any, data: any) {
|
||||
let formData = new FormData();
|
||||
formData.append("file", file)
|
||||
formData.append("data", JSON.stringify(data))
|
||||
return request({ url: '/file/uploadExcelFile', method: 'post', data: formData, })
|
||||
}
|
||||
|
||||
//获取在线PDF文件浏览的流文件
|
||||
export function getStreamFile(dirPath: string, fileName: string) {
|
||||
return request({ url: '/file/getStreamFile/' + dirPath + "/" + fileName, method: 'get', responseType: 'blob', })
|
||||
}
|
||||
|
||||
//获取满足条件的所有文件名
|
||||
export function getFilesList(params: Array<object>) {
|
||||
return request({ url: '/file/getFilesList', method: 'get', data: params })// 知识库是否发布
|
||||
}
|
||||
|
||||
//下载位于服务器上的某个文件的方法;需给出含完整路径 主要与genExcelFile配合使用
|
||||
export function getFile(fileName: any) {
|
||||
window.location.href = baseURL + "/file/getFile?fileName=" + encodeURI(fileName) + "&delete=" + true;
|
||||
}
|
||||
//产生文件,返回下载地址
|
||||
export function genExcelFile(tableName: string, template: string, rangeField: string, data: Array<object>) {
|
||||
return request({ url: '/file/genExcelFile/' + tableName + '/' + template + '/' + rangeField, method: 'get', params: data })
|
||||
}
|
||||
export function genExcelFile_sql(sqlId: string, template: string, data: Array<object>) {
|
||||
return request({ url: '/file/genExcelFile_sql/' + sqlId + '/' + template, method: 'get', params: data })
|
||||
}
|
||||
//返回web服务器特定目录下给定文件的URL
|
||||
export function getFileURI(dirPath: string, fileName: string) {
|
||||
return request({
|
||||
url: "/file/getFileURI/" + dirPath + "/" + fileName,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//获取只当路径下文件的详细信息
|
||||
export function getFilesDetail(filepath: string) {
|
||||
return request({ url: '/file/getFilesDetail/' + filepath, method: 'get', })
|
||||
}
|
||||
//上传语音
|
||||
export function broadcastVoice(formData: any) {
|
||||
return request({ url: '/file/uploadVoice/', method: 'post', data: formData })
|
||||
}
|
||||
|
||||
/*获取设备日志详细信息
|
||||
export function getEquipFilesDetail(filepath: string) {
|
||||
return request({ url: '/file/getEquipFilesDetail/' + filepath, method: 'get', })
|
||||
}*/
|
||||
|
||||
|
30
src/api/system/jobApi.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import request from '/@/utils/ajax/request'
|
||||
|
||||
// 任务状态修改
|
||||
export function changeJobStatus(jobId: any, status: any) {
|
||||
return request({ url: '/job/changeStatus', method: 'put', data: { jobId, status } })
|
||||
}
|
||||
// 删除定时任务调度
|
||||
export function delJob(jobId: any) {
|
||||
return request({ url: '/job/' + jobId, method: 'delete' })
|
||||
}
|
||||
// 新增定时任务调度
|
||||
export function saveJob(data: any) {
|
||||
return request({ url: '/job', method: 'post', data: data })
|
||||
}
|
||||
// 查询定时任务调度详细
|
||||
export function getJob(jobId: any) {
|
||||
return request({ url: '/job/' + jobId, method: 'get' })
|
||||
}
|
||||
// 修改定时任务调度
|
||||
export function updateJob(data: any) {
|
||||
return request({ url: '/job', method: 'put', data: data })
|
||||
}
|
||||
// 定时任务立即执行一次
|
||||
export function runJob(jobId: any, jobGroup: any) {
|
||||
return request({ url: '/job/run', method: 'put', data: { jobId, jobGroup } })
|
||||
}
|
||||
//关闭定时器
|
||||
export function closeJob(jobId: string, jobGroup: string) {
|
||||
return request({ url: '/job/close', method: 'put', data: { jobId, jobGroup } })
|
||||
}
|
46
src/api/system/roleApi.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import request from '/@/utils/ajax/request'
|
||||
|
||||
/**
|
||||
* 保存角色权限
|
||||
* @param menuId 菜单ID,归类权限
|
||||
* @param roleId OrUpdate
|
||||
* @param permIds
|
||||
*/
|
||||
export function saveOrUpdateRolePerms(roleId: number, menuId: any, component: string, permIds: Array<string>) {
|
||||
return request({
|
||||
url: '/role/saveOrUpdateRolePerms', method: 'put',
|
||||
data: {
|
||||
roleId: roleId, menuId: menuId,
|
||||
component: component, perm: permIds.toString()
|
||||
}
|
||||
});
|
||||
}
|
||||
/**获取角色的权限列表*/
|
||||
export function getRolePerms(roleId: number, menuId: any) {
|
||||
return request({ url: '/role/getRolePerms', method: 'get', params: { roleId: roleId, menuId: menuId } });
|
||||
}
|
||||
//查询角色权限信息
|
||||
export function getRolePermList() {
|
||||
return request({ url: '/role/getRolePermList', method: 'get' })
|
||||
}
|
||||
/**
|
||||
* 修改角色的菜单 两个参数
|
||||
* @param roleId
|
||||
* @param menuIds
|
||||
*/
|
||||
export function updateRoleMenu(roleId: number, menuIds: Array<number>) {
|
||||
return request({ url: '/role', method: 'put', data: { menuIds: menuIds, roleId: roleId } });
|
||||
}
|
||||
|
||||
//保留:删除角色
|
||||
export function delRole(roleId: number) {
|
||||
return request({ url: '/role/' + roleId, method: 'delete' })
|
||||
}
|
||||
//保留:新增角色
|
||||
export function saveRole(data: Array<object>) {
|
||||
return request({ url: '/role', method: 'post', data: data })
|
||||
}
|
||||
//保留:查询角色详细
|
||||
export function getRole(roleId: number) {
|
||||
return request({ url: '/role/' + roleId, method: 'get' })
|
||||
}
|
16
src/api/system/routerApi.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import request from '/@/utils/ajax/request'
|
||||
/**
|
||||
* 后端控制路由,isRequestRoutes 为 true,则开启后端控制路由
|
||||
* @method getMenu 获取后端动态路由菜单
|
||||
* @method getMenuTest 获取后端动态路由菜单(test)
|
||||
*/
|
||||
export function useMenuApi() {
|
||||
return {
|
||||
getMenu: (params?: object) => {
|
||||
return request({ url: '/tree/getRouters/' + params, method: 'get', });
|
||||
},
|
||||
getMenuTest: (params?: object) => {
|
||||
return request({ url: '/getRouters', method: 'get', params, });
|
||||
},
|
||||
};
|
||||
}
|
71
src/api/system/sysApi.ts
Normal file
@ -0,0 +1,71 @@
|
||||
import request from '/@/utils/ajax/request'
|
||||
import { Session } from '/@/utils/storage';
|
||||
|
||||
//删除新闻专用:需要删除服务器端的图片
|
||||
export function delNews(tableName: string, data: any) {
|
||||
return request({ url: '/sys/delNews/' + tableName + "/news", method: 'delete', data: data, })
|
||||
}
|
||||
//与登录页面有关的API
|
||||
//获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({ url: '/facade/captchaImage', method: 'get' })
|
||||
}
|
||||
//用户登录 返回令牌等信息
|
||||
export function signIn(params: any) {
|
||||
return request({ url: '/facade/login', method: 'post', data: params, });
|
||||
}
|
||||
//依据角色获取用户详细信息
|
||||
export function getUserInfoByRole(role: string) {
|
||||
return request({ url: '/facade/getUserInfoByRole/' + role, method: 'get' })
|
||||
}
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({ url: '/facade/logout/' + Session.get('token'), method: 'post' });
|
||||
}
|
||||
// 依据账号获取当前用户详细信息
|
||||
export function getUserInfoByAccount(userName: string) {
|
||||
return request({ url: '/facade/getUserInfoByAccount/' + userName, method: 'get' })
|
||||
}
|
||||
//更新用户信息put
|
||||
export function updateUserInfo(data: Array<object>) {
|
||||
return request({ url: '/facade/updateUserInfo', method: 'put', data: data })
|
||||
}
|
||||
//重置用户密码 updatePwd
|
||||
export function updatePwd(data: any) {
|
||||
return request({ url: '/facade/updatePwd', method: 'post', data: data })
|
||||
}
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data: any) {
|
||||
return request({ url: '/facade/uploadFile', method: 'post', data: data })
|
||||
}
|
||||
//用户密码
|
||||
export function encryPwd(pw: string) {
|
||||
return request({ url: '/facade/encryPwd/' + pw, method: 'GET' })
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDictData(dictType: string) {
|
||||
return request({ url: '/sys/getDictData/' + dictType, method: 'get' })
|
||||
}
|
||||
|
||||
// 清理参数缓存
|
||||
export function clearCache(configKey: string) {
|
||||
return request({ url: '/sys/clearCache/' + configKey, method: 'delete' })
|
||||
}
|
||||
|
||||
//查询缓存详细
|
||||
export function getRedisCache() {
|
||||
return request({ url: '/sys/getRedisCache', method: 'get' })
|
||||
}
|
||||
// 查询服务器详细
|
||||
export function getServerInfo() {
|
||||
return request({ url: '/sys/getServerInfo', method: 'get' })
|
||||
}
|
||||
// 查询在线用户列表
|
||||
export function getOnLineUser(query: any) {
|
||||
return request({ url: '/sys/getOnLineUserList', method: 'get', params: query })
|
||||
}
|
||||
// 强退在线用户
|
||||
export function forceLogout(tokenId: any) {
|
||||
return request({ url: '/sys/forceLogout/' + tokenId, method: 'delete' })
|
||||
}
|
71
src/api/system/treeApi.ts
Normal file
@ -0,0 +1,71 @@
|
||||
import request from '/@/utils/ajax/request'
|
||||
import { Session } from '/@/utils/storage';
|
||||
|
||||
/////////部门相关的操作/////////////////////////
|
||||
export function getDeptTree() {
|
||||
return request({ url: '/tree/getDeptTree/' + Session.get('role'), method: 'get' })
|
||||
}
|
||||
export function getDeptList(query: any) {
|
||||
return request({ url: '/tree/getDeptList', method: 'get', params: query })
|
||||
}
|
||||
// 删除部门
|
||||
export function delDept(deptId: number) {
|
||||
return request({ url: '/tree/delDept/' + deptId, method: 'delete' })
|
||||
}
|
||||
// 新增部门
|
||||
export function saveDept(data: any) {
|
||||
return request({ url: '/tree/insertDept', method: 'post', data: data })
|
||||
}
|
||||
// 修改部门
|
||||
export function updateDept(data: any) {
|
||||
return request({ url: '/tree/updateDept', method: 'put', data: data })
|
||||
}
|
||||
//依据部门编号查询部门详细:备用
|
||||
export function getDept(deptId: number) {
|
||||
return request({ url: '/tree/getDeptById/' + deptId, method: 'get' })
|
||||
}
|
||||
//根据角色ID查询部门树结构:备用
|
||||
export function getDeptTreeByRole(roleId: number) {
|
||||
return request({ url: '/tree/getDeptTreeByRole/' + roleId, method: 'get' })
|
||||
}
|
||||
//查询部门列表(排除节点):备用
|
||||
export function getDeptExcludeChild(deptId: number) {
|
||||
return request({ url: '/tree/getDeptlist/exclude/' + deptId, method: 'get' })
|
||||
}
|
||||
|
||||
////////////菜单相关的操作////////////////////////
|
||||
//查询el-tree所需树结构 全部
|
||||
export function getMenuTree() {
|
||||
return request({ url: '/tree/getMenuTree/' + Session.get('role'), method: 'get' })
|
||||
}
|
||||
// 查询菜单列表Array<object> query = [{ a: "1" }];
|
||||
export function getMenuList(query: Array<object>) {
|
||||
return request({ url: '/tree/getMenuList/' + Session.get('role'), method: 'get', params: query })
|
||||
}
|
||||
// 删除菜单
|
||||
export function delMenu(menuId: number) {
|
||||
return request({ url: '/tree/delMenu/' + menuId, method: 'delete' })
|
||||
}
|
||||
// 修改菜单
|
||||
export function updateMenu(data: any) {
|
||||
return request({ url: '/tree/updateMenu', method: 'put', data: data })
|
||||
}
|
||||
// 新增菜单
|
||||
export function saveMenu(data: any) {
|
||||
return request({ url: '/tree/insertMenu', method: 'post', data: data })
|
||||
}
|
||||
// 根据角色ID查询el-tree所需树结构
|
||||
export function getCheckedMenuByRole(roleId: any) {
|
||||
return request({ url: '/tree/getCheckedMenuByRole/' + roleId, method: 'get' })
|
||||
}
|
||||
// 根据角色ID查询el-tree所需树结构,专用于设置角色操作权限时显示的菜单。
|
||||
export function getCheckedRoleMenu(roleId: number) {
|
||||
return request({ url: '/tree/getCheckedRoleMenu/' + roleId, method: 'get' })
|
||||
}
|
||||
export function getPermMenuTree() {
|
||||
return request({ url: '/tree/getPermMenuTree/' + Session.get('role'), method: 'get' })
|
||||
}
|
||||
//保留:查询菜单详细
|
||||
export function getMenuById(menuId: number) {
|
||||
return request({ url: '/tree/getMenuById/' + menuId, method: 'get' })
|
||||
}
|
4590
src/assets/css/newstyle.css
Normal file
73
src/assets/css/twocolstyle.css
Normal file
@ -0,0 +1,73 @@
|
||||
|
||||
.box-card-aside {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.centerTitle {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.text {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 18px 0;
|
||||
}
|
||||
|
||||
|
||||
.box-card-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chartButton {
|
||||
margin-left: 0px;
|
||||
margin-bottom: 10px;
|
||||
color: white;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
.form-kuang {
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.form-large {
|
||||
margin-top: 22px;
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.form-abslt {
|
||||
margin-top: 22px;
|
||||
margin-right: 10px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.form-little {
|
||||
margin-top: 22px;
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.righttop {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
|
||||
.elForm {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
margin-left: 25px;
|
||||
margin-top: 22px;
|
||||
}
|
2337
src/assets/font-awesome/css/font-awesome.css
vendored
Normal file
4
src/assets/font-awesome/css/font-awesome.min.css
vendored
Normal file
418
src/assets/font-awesome/font_2298093_rnp72ifj3ba.css
vendored
Normal file
@ -0,0 +1,418 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2298093 */
|
||||
src: url('//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.woff2?t=1669683406059') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.woff?t=1669683406059') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.ttf?t=1669683406059') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-quanjushezhi_o:before {
|
||||
content: "\eb80";
|
||||
}
|
||||
|
||||
.icon-yunshangchuan_o:before {
|
||||
content: "\ebb3";
|
||||
}
|
||||
|
||||
.icon-yunxiazai_o:before {
|
||||
content: "\ebb4";
|
||||
}
|
||||
|
||||
.icon-shuaxin:before {
|
||||
content: "\e63e";
|
||||
}
|
||||
|
||||
.icon-diannao1:before {
|
||||
content: "\e622";
|
||||
}
|
||||
|
||||
.icon-barcode-qr:before {
|
||||
content: "\e61e";
|
||||
}
|
||||
|
||||
.icon-zhongduancanshuchaxun:before {
|
||||
content: "\e638";
|
||||
}
|
||||
|
||||
.icon-shouye_dongtaihui:before {
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.icon-putong:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.icon-dongtai:before {
|
||||
content: "\e659";
|
||||
}
|
||||
|
||||
.icon-wenducanshu-05:before {
|
||||
content: "\e634";
|
||||
}
|
||||
|
||||
.icon-zhongduancanshu:before {
|
||||
content: "\e63b";
|
||||
}
|
||||
|
||||
.icon-tongzhi1:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
|
||||
.icon-tongzhi2:before {
|
||||
content: "\e649";
|
||||
}
|
||||
|
||||
.icon-tongzhi3:before {
|
||||
content: "\e648";
|
||||
}
|
||||
|
||||
.icon-tongzhi4:before {
|
||||
content: "\e60c";
|
||||
}
|
||||
|
||||
.icon-dianhua:before {
|
||||
content: "\e615";
|
||||
}
|
||||
|
||||
.icon-xianshimima:before {
|
||||
content: "\e63c";
|
||||
}
|
||||
|
||||
.icon-yincangmima:before {
|
||||
content: "\e63d";
|
||||
}
|
||||
|
||||
.icon-shuxing:before {
|
||||
content: "\e67a";
|
||||
}
|
||||
|
||||
.icon-juxingkaobei:before {
|
||||
content: "\e7a5";
|
||||
}
|
||||
|
||||
.icon-shuxingtu:before {
|
||||
content: "\e685";
|
||||
}
|
||||
|
||||
.icon-bolangneng:before {
|
||||
content: "\e745";
|
||||
}
|
||||
|
||||
.icon-bolangnengshiyanchang:before {
|
||||
content: "\e746";
|
||||
}
|
||||
|
||||
.icon--chaifenhang:before {
|
||||
content: "\e6d1";
|
||||
}
|
||||
|
||||
.icon--chaifenlie:before {
|
||||
content: "\e6d0";
|
||||
}
|
||||
|
||||
.icon-tupianyulan:before {
|
||||
content: "\e67e";
|
||||
}
|
||||
|
||||
.icon-15tupianyulan:before {
|
||||
content: "\e624";
|
||||
}
|
||||
|
||||
.icon-728bianjiqi_zitidaxiao:before {
|
||||
content: "\e660";
|
||||
}
|
||||
|
||||
.icon-ziti:before {
|
||||
content: "\e7b1";
|
||||
}
|
||||
|
||||
.icon-font-size:before {
|
||||
content: "\eaef";
|
||||
}
|
||||
|
||||
.icon-tuodong:before {
|
||||
content: "\e6a8";
|
||||
}
|
||||
|
||||
.icon-zhongyingwen1:before {
|
||||
content: "\e7a3";
|
||||
}
|
||||
|
||||
.icon-fuhao-yingwen:before {
|
||||
content: "\e714";
|
||||
}
|
||||
|
||||
.icon-fuhao-zhongwen:before {
|
||||
content: "\e712";
|
||||
}
|
||||
|
||||
.icon-diqiu:before {
|
||||
content: "\e689";
|
||||
}
|
||||
|
||||
.icon-xingqiu:before {
|
||||
content: "\e65c";
|
||||
}
|
||||
|
||||
.icon-diqiu1:before {
|
||||
content: "\e631";
|
||||
}
|
||||
|
||||
.icon-huanjingxingqiu:before {
|
||||
content: "\e617";
|
||||
}
|
||||
|
||||
.icon-zidingyibuju:before {
|
||||
content: "\e637";
|
||||
}
|
||||
|
||||
.icon-dayin:before {
|
||||
content: "\e612";
|
||||
}
|
||||
|
||||
.icon-step:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-30xuanzhongyuanxingfill:before {
|
||||
content: "\e677";
|
||||
}
|
||||
|
||||
.icon-shibai:before {
|
||||
content: "\e60b";
|
||||
}
|
||||
|
||||
.icon-7_round_solid:before {
|
||||
content: "\e64d";
|
||||
}
|
||||
|
||||
.icon-6_round_solid:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
|
||||
.icon-9_round_solid:before {
|
||||
content: "\e64f";
|
||||
}
|
||||
|
||||
.icon-1_round_solid:before {
|
||||
content: "\e650";
|
||||
}
|
||||
|
||||
.icon-5_round_solid:before {
|
||||
content: "\e651";
|
||||
}
|
||||
|
||||
.icon-2_round_solid:before {
|
||||
content: "\e654";
|
||||
}
|
||||
|
||||
.icon-0_round_solid:before {
|
||||
content: "\e655";
|
||||
}
|
||||
|
||||
.icon-3_round_solid:before {
|
||||
content: "\e656";
|
||||
}
|
||||
|
||||
.icon-4_round_solid:before {
|
||||
content: "\e657";
|
||||
}
|
||||
|
||||
.icon-8_round_solid:before {
|
||||
content: "\e658";
|
||||
}
|
||||
|
||||
.icon-radio-off-full:before {
|
||||
content: "\ea6b";
|
||||
}
|
||||
|
||||
.icon-tongzhi:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-ditu:before {
|
||||
content: "\e8bc";
|
||||
}
|
||||
|
||||
.icon-ico:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.icon-chazhaobiaodanliebiao:before {
|
||||
content: "\e76a";
|
||||
}
|
||||
|
||||
.icon-biaodan:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.icon-siweidaotu:before {
|
||||
content: "\e614";
|
||||
}
|
||||
|
||||
.icon-jiliandongxuanzeqi:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.icon-caijian:before {
|
||||
content: "\e611";
|
||||
}
|
||||
|
||||
.icon-fuwenben:before {
|
||||
content: "\e7e4";
|
||||
}
|
||||
|
||||
.icon-fuwenbenkuang:before {
|
||||
content: "\e66f";
|
||||
}
|
||||
|
||||
.icon-shangchuan:before {
|
||||
content: "\e663";
|
||||
}
|
||||
|
||||
.icon-xuanzeqi:before {
|
||||
content: "\e635";
|
||||
}
|
||||
|
||||
.icon-fangkuang:before {
|
||||
content: "\e642";
|
||||
}
|
||||
|
||||
.icon-gouxuan-weixuanzhong-xianxingfangkuang:before {
|
||||
content: "\e77b";
|
||||
}
|
||||
|
||||
.icon-shidu:before {
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.icon-yangan:before {
|
||||
content: "\e67d";
|
||||
}
|
||||
|
||||
.icon-wendu:before {
|
||||
content: "\e686";
|
||||
}
|
||||
|
||||
.icon-zaosheng:before {
|
||||
content: "\e61c";
|
||||
}
|
||||
|
||||
.icon-jinridaiban:before {
|
||||
content: "\e60f";
|
||||
}
|
||||
|
||||
.icon-AIshiyanshi:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.icon-shenqingkaiban:before {
|
||||
content: "\e639";
|
||||
}
|
||||
|
||||
.icon-zhongyingwenqiehuan:before {
|
||||
content: "\e611";
|
||||
}
|
||||
|
||||
.icon-zhongyingwen:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.icon-zhongyingzhuanhuan:before {
|
||||
content: "\e6a2";
|
||||
}
|
||||
|
||||
.icon-zhongyingwenyuyan:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.icon-shuju:before {
|
||||
content: "\e613";
|
||||
}
|
||||
|
||||
.icon-ico_shuju:before {
|
||||
content: "\e6ff";
|
||||
}
|
||||
|
||||
.icon-shuju1:before {
|
||||
content: "\e60e";
|
||||
}
|
||||
|
||||
.icon-fuzhiyemian:before {
|
||||
content: "\e772";
|
||||
}
|
||||
|
||||
.icon-caozuo-wailian:before {
|
||||
content: "\e711";
|
||||
}
|
||||
|
||||
.icon-icon-:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.icon-gerenzhongxin:before {
|
||||
content: "\e60d";
|
||||
}
|
||||
|
||||
.icon-caidan:before {
|
||||
content: "\e652";
|
||||
}
|
||||
|
||||
.icon-xitongshezhi:before {
|
||||
content: "\e69b";
|
||||
}
|
||||
|
||||
.icon-neiqianshujuchucun:before {
|
||||
content: "\e62f";
|
||||
}
|
||||
|
||||
.icon-shouye:before {
|
||||
content: "\e653";
|
||||
}
|
||||
|
||||
.icon-quanxian:before {
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.icon-zujian:before {
|
||||
content: "\e85e";
|
||||
}
|
||||
|
||||
.icon-crew_feature:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.icon-gongju:before {
|
||||
content: "\e62d";
|
||||
}
|
||||
|
||||
.icon-skin:before {
|
||||
content: "\e636";
|
||||
}
|
||||
|
||||
.icon-shixinyuan:before {
|
||||
content: "\e669";
|
||||
}
|
||||
|
||||
.icon-webicon318:before {
|
||||
content: "\e6a9";
|
||||
}
|
||||
|
||||
.icon-dian:before {
|
||||
content: "\e608";
|
||||
}
|
||||
|
||||
.icon-fullscreen:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.icon-tuichuquanping:before {
|
||||
content: "\e641";
|
||||
}
|
BIN
src/assets/font-awesome/fonts/FontAwesome.otf
Normal file
BIN
src/assets/font-awesome/fonts/fontawesome-webfont.eot
Normal file
2671
src/assets/font-awesome/fonts/fontawesome-webfont.svg
Normal file
After Width: | Height: | Size: 434 KiB |
BIN
src/assets/font-awesome/fonts/fontawesome-webfont.ttf
Normal file
BIN
src/assets/font-awesome/fonts/fontawesome-webfont.woff
Normal file
BIN
src/assets/font-awesome/fonts/fontawesome-webfont.woff2
Normal file
BIN
src/assets/font/HWZS.ttf
Normal file
BIN
src/assets/font/NoizeSport.ttf
Normal file
BIN
src/assets/icon/055e6ae19b460a36fa99a47ab028447.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/icon/ab382358078bfa94a2a3e1f13393a56.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
src/assets/icon/arrow_left.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
src/assets/icon/arrow_right.png
Normal file
After Width: | Height: | Size: 402 B |
BIN
src/assets/icon/bg_ditie.png
Normal file
After Width: | Height: | Size: 720 KiB |
BIN
src/assets/icon/bg_jiankong1.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/icon/bg_jiankong2.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
src/assets/icon/bg_jiankong3.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/icon/bg_words.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
src/assets/icon/body_train.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
src/assets/icon/car_cont_active.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/icon/car_left_active.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/icon/car_right_active.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/icon/cont.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/icon/ditie_1.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/icon/ditie_2.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/icon/ditie_4.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/icon/end.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/assets/icon/foot_train.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
src/assets/icon/footer_train.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
src/assets/icon/header_train.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
src/assets/icon/headers_car_left.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
src/assets/icon/headers_car_right.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
src/assets/icon/iconMap.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/icon/incon_map_end.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/icon/info_border.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/icon/left_cont.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/icon/login.png
Normal file
After Width: | Height: | Size: 940 KiB |
BIN
src/assets/icon/map.png
Normal file
After Width: | Height: | Size: 696 B |
BIN
src/assets/icon/restart.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/icon/right_cont.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/icon/select.png
Normal file
After Width: | Height: | Size: 986 B |
BIN
src/assets/icon/select_train.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
src/assets/icon/start.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/assets/icon/start_map.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
src/assets/icon/tabs.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
src/assets/icon/train_cont.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/icon/train_cont_active (1).png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/icon/train_cont_active.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/icon/train_left.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/icon/train_right.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/icon/train_right_active.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/icon/xuanzeriqi.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
src/assets/images/equip/1.png
Normal file
After Width: | Height: | Size: 407 KiB |
BIN
src/assets/images/equip/10-11-12.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
src/assets/images/equip/13-14-15.png
Normal file
After Width: | Height: | Size: 227 KiB |
BIN
src/assets/images/equip/2.png
Normal file
After Width: | Height: | Size: 697 KiB |
BIN
src/assets/images/equip/3.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/images/equip/4.png
Normal file
After Width: | Height: | Size: 272 KiB |
BIN
src/assets/images/equip/5.jpg
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
src/assets/images/equip/6.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/images/equip/7.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/images/equip/8.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
src/assets/images/equip/9.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-1.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-2.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-U1-Red.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-U1.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-U10-Red.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-U10.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-U2-Red.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
src/assets/images/equip/ACSU/ACSU-U2.png
Normal file
After Width: | Height: | Size: 60 KiB |