Commit 99e88a30 by 张立顺

chore: migrate legacy master snapshot

Source: git@192.168.3.233:micro-customization-system/micro-trialrun.git
Source-Commit: 977d189516b149c89b3e7d4c82609638bf8b57c1
1 parent bb8a8f24
Showing 126 changed files with 4917 additions and 0 deletions
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true
},
extends: 'eslint:recommended',
// required to lint *.vue files
plugins: [
'html'
],
// check if imports actually resolve
'settings': {
'import/resolver': {
'webpack': {
'config': 'build/webpack.base.conf.js'
}
}
},
// add your custom rules here
// it is base on https://github.com/vuejs/eslint-config-vue
rules: {
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': [2, 'allow-null'],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 2,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# glsx-micro-system-child
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
This diff could not be displayed because it is too large.
{
"name": "glsx-micro-system-child",
"version": "0.1.0",
"private": true,
"port": 10201,
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"axios": "^0.20.0",
"clipboard": "^2.0.4",
"core-js": "^3.6.5",
"element-ui": "^2.13.2",
"js-md5": "^0.7.3",
"lodash": "^4.17.10",
"moment": "^2.29.1",
"qs": "^6.10.0",
"vue": "^2.6.11",
"vue-infinite-loading": "^2.4.5",
"vue-router": "^3.4.6",
"vuex": "^3.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"sass": "1.26.8",
"sass-loader": "^10.0.3",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
No preview for this file type
<!DOCTYPE html>
<html lang="en">
<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="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="glsx-sub-system"></div>
<!-- built files will be auto injected -->
</body>
</html>
<template>
<div id="glsx-system-sub" class="glsx-system-sub">
<!-- <div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link> |
<router-link to="/user">user</router-link> |
<router-link to="/role">role</router-link> |
<router-link to="/orginizaManage">orginizaManage</router-link> |
<router-link to="/menuManage">menuManage</router-link> |
<router-link to="/dictionaryManage">dictionaryManage</router-link> |
<router-link to="/dictionaryData">dictionaryData</router-link> |
<router-link to="/workLog">workLog</router-link>
<p>a链接跳转到主项目/其他子项目的页面,页面会刷新,效果不好<a href="/about">parent About</a></p>
<p v-if="isQiankun">
主项目把router传给子项目,子项目用这个router来跳转
<span @click="goToPage('/about')">parent About</span>
<span @click="goToPage('/app-vue-history/about')">app-vue-history About</span>
</p>
</div> -->
<keep-alive :include="keepAlives">
<router-view v-if="!$route.meta.isKeepAlive" />
</keep-alive>
</div>
</template>
<script>
import { mapMutations } from "vuex";
export default {
data() {
return {
isQiankun: window.__POWERED_BY_QIANKUN__,
keepAlives: [],
};
},
watch: {
$route(to, from) {
if (to.meta.keepAlives) {
this.keepAlives.push(to.name);
}
if (this.isQiankun) {
this.getBreadcrumb();
}
},
},
methods: {
...mapMutations(["updateBaseURL"]),
getBreadcrumb() {
const {
getters: { curBreadCrumb },
} = this.$root.parentVuex;
let matched = this.$route.matched.filter((item) => item.name); // this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const first = matched[0];
const { meta, path } = first;
const basePath = "/trialRun#";
let breadcrumb = [];
if (meta) {
const { title, pushState } = meta;
if (pushState && title) {
breadcrumb.push({
name: title,
path: basePath + path,
});
history.state.pushState = pushState;
history.state.breadcrumb = [...curBreadCrumb, breadcrumb[0]];
// this.$root.parentVuex.dispatch('menu/setBreadCrumb', [...curBreadCrumb, breadcrumb[0]]);
}
}
},
goToPage(path) {
this.$root.parentRouter.push(path);
},
},
mounted() {},
};
</script>
<style lang="scss">
#glsx-system-sub {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* text-align: center; */
color: #2c3e50;
/* height: 800px; */
/* overflow-y: auto; */
}
/* .glsx-system-sub #nav {
padding: 30px;
} */
.glsx-system-sub #nav a {
font-weight: bold;
color: #2c3e50;
}
.glsx-system-sub #nav a.router-link-exact-active {
color: #42b983;
}
/* .glsx-system-sub span {
font-weight: bold;
color: #2c3e50;
cursor: pointer;
margin: 0 15px;
text-decoration: underline;
} */
.links_group {
position: relative;
display: flex;
align-items: flex-end;
justify-content: space-between;
padding: 10px 0;
.name {
font-size: 16px;
font-weight: normal;
color: #666;
}
}
.links_group:after {
display: block;
content: "";
height: 1px;
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: #d8d8d8;
transform: scaleY(0.5);
}
.el_table {
thead {
th {
background: rgba($color: #f2f2f2, $alpha: 0.5) !important;
}
}
}
.pagination_list {
text-align: right;
padding: 10px 0;
}
// 下划线
.glsx_hairline {
position: relative;
}
.glsx_hairline:after {
display: block;
content: "";
height: 1px;
background: #d8d8d8;
position: absolute;
left: 0;
right: 0;
bottom: 0;
transform: scaleY(0.5);
}
.el_link {
margin: 0 4px;
}
</style>
.icon {display: inline-block;background-image: url('./sprite.png');background-size: 119px 97px; vertical-align: middle;}
.icon-battery_empty { width: 42px; height: 20px; background-position: 0px 0px; }
.icon-battery_enough { width: 42px; height: 20px; background-position: 0px -20px; }
.icon-fullsize.active { width: 18px; height: 18px; background-position: 0px -79px; }
.icon-fullsize:active { width: 18px; height: 18px; background-position: 0px -79px; }
.icon-fullsize:hover { background-position: 0px -79px; }
.icon-fullsize { width: 18px; height: 18px; background-position: -18px -79px; }
.icon-icon_zoom_out.active { width: 18px; height: 18px; background-position: -36px -79px; }
.icon-icon_zoom_out:active { width: 18px; height: 18px; background-position: -36px -79px; }
.icon-icon_zoom_out:hover { background-position: -36px -79px; }
.icon-icon_zoom_out { width: 18px; height: 18px; background-position: -54px -79px; }
.icon-info_copy.active { width: 16px; height: 16px; background-position: -101px -36px; }
.icon-info_copy:active { width: 16px; height: 16px; background-position: -101px -36px; }
.icon-info_copy:hover { background-position: -101px -36px; }
.icon-info_copy { width: 16px; height: 16px; background-position: -101px -52px; }
.icon-info_device_alarm { width: 20px; height: 20px; background-position: -42px 0px; }
.icon-info_device_status { width: 20px; height: 20px; background-position: -42px -20px; }
.icon-info_device { width: 20px; height: 20px; background-position: 0px -40px; }
.icon-info_location { width: 20px; height: 20px; background-position: -20px -40px; }
.icon-info_stop { width: 20px; height: 20px; background-position: -40px -40px; }
.icon-info_time { width: 20px; height: 20px; background-position: -62px 0px; }
.icon-info_type { width: 20px; height: 20px; background-position: -62px -20px; }
.icon-locate.active { width: 19px; height: 19px; background-position: -62px -40px; }
.icon-locate:active { width: 19px; height: 19px; background-position: -62px -40px; }
.icon-locate:hover { background-position: -62px -40px; }
.icon-locate { width: 19px; height: 19px; background-position: 0px -60px; }
.icon-minisize.active { width: 18px; height: 19px; background-position: -82px -19px; }
.icon-minisize:active { width: 18px; height: 19px; background-position: -82px -19px; }
.icon-minisize:hover { background-position: -82px -19px; }
.icon-minisize { width: 18px; height: 18px; background-position: -72px -79px; }
.icon-refresh.active { width: 18px; height: 19px; background-position: -82px -38px; }
.icon-refresh:active { width: 18px; height: 19px; background-position: -82px -38px; }
.icon-refresh:hover { background-position: -82px -38px; }
.icon-refresh { width: 18px; height: 19px; background-position: -82px -57px; }
.icon-ruler.active { width: 19px; height: 19px; background-position: -19px -60px; }
.icon-ruler:active { width: 19px; height: 19px; background-position: -19px -60px; }
.icon-ruler:hover { background-position: -19px -60px; }
.icon-ruler { width: 19px; height: 19px; background-position: -38px -60px; }
.icon-satellite.active { width: 18px; height: 18px; background-position: -101px 0px; }
.icon-satellite:active { width: 18px; height: 18px; background-position: -101px 0px; }
.icon-satellite:hover { background-position: -101px 0px; }
.icon-satellite { width: 18px; height: 18px; background-position: -101px -18px; }
.icon-zoom_in.active { width: 19px; height: 19px; background-position: -57px -60px; }
.icon-zoom_in:active { width: 19px; height: 19px; background-position: -57px -60px; }
.icon-zoom_in:hover { background-position: -57px -60px; }
.icon-zoom_in { width: 19px; height: 19px; background-position: -82px 0px; }
\ No newline at end of file
/*
Stylus variables are information about icon's compiled state, stored under its original file name
.icon-home {
width: $icon_home_width;
}
The large array-like variables contain all information about a single icon
$icon_home = x y offset_x offset_y width height total_width total_height image_path;
At the bottom of this section, we provide information about the spritesheet itself
$spritesheet = width height image $spritesheet_sprites;
*/
$icon_fullsize_active_name = 'icon_fullsize_active';
$icon_fullsize_active_x = 54px;
$icon_fullsize_active_y = 57px;
$icon_fullsize_active_offset_x = -54px;
$icon_fullsize_active_offset_y = -57px;
$icon_fullsize_active_width = 18px;
$icon_fullsize_active_height = 18px;
$icon_fullsize_active_total_width = 76px;
$icon_fullsize_active_total_height = 75px;
$icon_fullsize_active_image = '~sprite.png';
$icon_fullsize_active = 54px 57px -54px -57px 18px 18px 76px 75px '~sprite.png' 'icon_fullsize_active';
$icon_fullsize_name = 'icon_fullsize';
$icon_fullsize_x = 0px;
$icon_fullsize_y = 57px;
$icon_fullsize_offset_x = 0px;
$icon_fullsize_offset_y = -57px;
$icon_fullsize_width = 18px;
$icon_fullsize_height = 18px;
$icon_fullsize_total_width = 76px;
$icon_fullsize_total_height = 75px;
$icon_fullsize_image = '~sprite.png';
$icon_fullsize = 0px 57px 0px -57px 18px 18px 76px 75px '~sprite.png' 'icon_fullsize';
$icon_locate_active_name = 'icon_locate_active';
$icon_locate_active_x = 19px;
$icon_locate_active_y = 0px;
$icon_locate_active_offset_x = -19px;
$icon_locate_active_offset_y = 0px;
$icon_locate_active_width = 19px;
$icon_locate_active_height = 19px;
$icon_locate_active_total_width = 76px;
$icon_locate_active_total_height = 75px;
$icon_locate_active_image = '~sprite.png';
$icon_locate_active = 19px 0px -19px 0px 19px 19px 76px 75px '~sprite.png' 'icon_locate_active';
$icon_locate_name = 'icon_locate';
$icon_locate_x = 0px;
$icon_locate_y = 19px;
$icon_locate_offset_x = 0px;
$icon_locate_offset_y = -19px;
$icon_locate_width = 19px;
$icon_locate_height = 19px;
$icon_locate_total_width = 76px;
$icon_locate_total_height = 75px;
$icon_locate_image = '~sprite.png';
$icon_locate = 0px 19px 0px -19px 19px 19px 76px 75px '~sprite.png' 'icon_locate';
$icon_minisize_active_name = 'icon_minisize_active';
$icon_minisize_active_x = 36px;
$icon_minisize_active_y = 38px;
$icon_minisize_active_offset_x = -36px;
$icon_minisize_active_offset_y = -38px;
$icon_minisize_active_width = 18px;
$icon_minisize_active_height = 19px;
$icon_minisize_active_total_width = 76px;
$icon_minisize_active_total_height = 75px;
$icon_minisize_active_image = '~sprite.png';
$icon_minisize_active = 36px 38px -36px -38px 18px 19px 76px 75px '~sprite.png' 'icon_minisize_active';
$icon_minisize_name = 'icon_minisize';
$icon_minisize_x = 18px;
$icon_minisize_y = 57px;
$icon_minisize_offset_x = -18px;
$icon_minisize_offset_y = -57px;
$icon_minisize_width = 18px;
$icon_minisize_height = 18px;
$icon_minisize_total_width = 76px;
$icon_minisize_total_height = 75px;
$icon_minisize_image = '~sprite.png';
$icon_minisize = 18px 57px -18px -57px 18px 18px 76px 75px '~sprite.png' 'icon_minisize';
$icon_refresh_active_name = 'icon_refresh_active';
$icon_refresh_active_x = 0px;
$icon_refresh_active_y = 38px;
$icon_refresh_active_offset_x = 0px;
$icon_refresh_active_offset_y = -38px;
$icon_refresh_active_width = 18px;
$icon_refresh_active_height = 19px;
$icon_refresh_active_total_width = 76px;
$icon_refresh_active_total_height = 75px;
$icon_refresh_active_image = '~sprite.png';
$icon_refresh_active = 0px 38px 0px -38px 18px 19px 76px 75px '~sprite.png' 'icon_refresh_active';
$icon_refresh_name = 'icon_refresh';
$icon_refresh_x = 18px;
$icon_refresh_y = 38px;
$icon_refresh_offset_x = -18px;
$icon_refresh_offset_y = -38px;
$icon_refresh_width = 18px;
$icon_refresh_height = 19px;
$icon_refresh_total_width = 76px;
$icon_refresh_total_height = 75px;
$icon_refresh_image = '~sprite.png';
$icon_refresh = 18px 38px -18px -38px 18px 19px 76px 75px '~sprite.png' 'icon_refresh';
$icon_ruler_active_name = 'icon_ruler_active';
$icon_ruler_active_x = 0px;
$icon_ruler_active_y = 0px;
$icon_ruler_active_offset_x = 0px;
$icon_ruler_active_offset_y = 0px;
$icon_ruler_active_width = 19px;
$icon_ruler_active_height = 19px;
$icon_ruler_active_total_width = 76px;
$icon_ruler_active_total_height = 75px;
$icon_ruler_active_image = '~sprite.png';
$icon_ruler_active = 0px 0px 0px 0px 19px 19px 76px 75px '~sprite.png' 'icon_ruler_active';
$icon_ruler_name = 'icon_ruler';
$icon_ruler_x = 38px;
$icon_ruler_y = 19px;
$icon_ruler_offset_x = -38px;
$icon_ruler_offset_y = -19px;
$icon_ruler_width = 19px;
$icon_ruler_height = 19px;
$icon_ruler_total_width = 76px;
$icon_ruler_total_height = 75px;
$icon_ruler_image = '~sprite.png';
$icon_ruler = 38px 19px -38px -19px 19px 19px 76px 75px '~sprite.png' 'icon_ruler';
$icon_satellite_active_name = 'icon_satellite_active';
$icon_satellite_active_x = 57px;
$icon_satellite_active_y = 37px;
$icon_satellite_active_offset_x = -57px;
$icon_satellite_active_offset_y = -37px;
$icon_satellite_active_width = 18px;
$icon_satellite_active_height = 18px;
$icon_satellite_active_total_width = 76px;
$icon_satellite_active_total_height = 75px;
$icon_satellite_active_image = '~sprite.png';
$icon_satellite_active = 57px 37px -57px -37px 18px 18px 76px 75px '~sprite.png' 'icon_satellite_active';
$icon_satellite_name = 'icon_satellite';
$icon_satellite_x = 57px;
$icon_satellite_y = 18px;
$icon_satellite_offset_x = -57px;
$icon_satellite_offset_y = -18px;
$icon_satellite_width = 18px;
$icon_satellite_height = 19px;
$icon_satellite_total_width = 76px;
$icon_satellite_total_height = 75px;
$icon_satellite_image = '~sprite.png';
$icon_satellite = 57px 18px -57px -18px 18px 19px 76px 75px '~sprite.png' 'icon_satellite';
$icon_zoom_in_active_name = 'icon_zoom_in_active';
$icon_zoom_in_active_x = 38px;
$icon_zoom_in_active_y = 0px;
$icon_zoom_in_active_offset_x = -38px;
$icon_zoom_in_active_offset_y = 0px;
$icon_zoom_in_active_width = 19px;
$icon_zoom_in_active_height = 19px;
$icon_zoom_in_active_total_width = 76px;
$icon_zoom_in_active_total_height = 75px;
$icon_zoom_in_active_image = '~sprite.png';
$icon_zoom_in_active = 38px 0px -38px 0px 19px 19px 76px 75px '~sprite.png' 'icon_zoom_in_active';
$icon_zoom_in_name = 'icon_zoom_in';
$icon_zoom_in_x = 19px;
$icon_zoom_in_y = 19px;
$icon_zoom_in_offset_x = -19px;
$icon_zoom_in_offset_y = -19px;
$icon_zoom_in_width = 19px;
$icon_zoom_in_height = 19px;
$icon_zoom_in_total_width = 76px;
$icon_zoom_in_total_height = 75px;
$icon_zoom_in_image = '~sprite.png';
$icon_zoom_in = 19px 19px -19px -19px 19px 19px 76px 75px '~sprite.png' 'icon_zoom_in';
$icon_zoom_out_active_name = 'icon_zoom_out_active';
$icon_zoom_out_active_x = 36px;
$icon_zoom_out_active_y = 57px;
$icon_zoom_out_active_offset_x = -36px;
$icon_zoom_out_active_offset_y = -57px;
$icon_zoom_out_active_width = 18px;
$icon_zoom_out_active_height = 18px;
$icon_zoom_out_active_total_width = 76px;
$icon_zoom_out_active_total_height = 75px;
$icon_zoom_out_active_image = '~sprite.png';
$icon_zoom_out_active = 36px 57px -36px -57px 18px 18px 76px 75px '~sprite.png' 'icon_zoom_out_active';
$icon_zoom_out_name = 'icon_zoom_out';
$icon_zoom_out_x = 57px;
$icon_zoom_out_y = 0px;
$icon_zoom_out_offset_x = -57px;
$icon_zoom_out_offset_y = 0px;
$icon_zoom_out_width = 19px;
$icon_zoom_out_height = 18px;
$icon_zoom_out_total_width = 76px;
$icon_zoom_out_total_height = 75px;
$icon_zoom_out_image = '~sprite.png';
$icon_zoom_out = 57px 0px -57px 0px 19px 18px 76px 75px '~sprite.png' 'icon_zoom_out';
$spritesheet_width = 76px;
$spritesheet_height = 75px;
$spritesheet_image = '~sprite.png';
$spritesheet_sprites = $icon_fullsize_active $icon_fullsize $icon_locate_active $icon_locate $icon_minisize_active $icon_minisize $icon_refresh_active $icon_refresh $icon_ruler_active $icon_ruler $icon_satellite_active $icon_satellite $icon_zoom_in_active $icon_zoom_in $icon_zoom_out_active $icon_zoom_out;
$spritesheet = 76px 75px '~sprite.png' $spritesheet_sprites;
/*
The provided mixins are intended to be used with the array-like variables
.icon-home {
spriteWidth($icon_home)
}
.icon-email {
sprite($icon_email)
}
Example usage in HTML:
`display: block` sprite:
<div class="icon-home"></div>
To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class:
// CSS
.icon {
display: inline-block;
}
// HTML
<i class="icon icon-home"></i>
*/
spriteWidth($sprite) {
width: $sprite[4];
}
spriteHeight($sprite) {
height: $sprite[5];
}
spritePosition($sprite) {
background-position: $sprite[2] $sprite[3];
}
spriteImage($sprite) {
background-image: url($sprite[8]);
}
sprite($sprite) {
spriteImage($sprite)
spritePosition($sprite)
spriteWidth($sprite)
spriteHeight($sprite)
}
/*
The `sprites` mixin generates identical output to the CSS template
but can be overridden inside of Stylus
This must be run when you have at least 2 sprites.
If run with a single sprite, then there will be reference errors.
sprites($spritesheet_sprites);
*/
sprites($sprites) {
for $sprite in $sprites {
$sprite_name = $sprite[9];
.{$sprite_name} {
sprite($sprite);
}
}
}
//常量定义
//车辆用途
export const VEHICLE_USE_LIST = [
{
label: '专属用途',
value: '1',
},
{
label: '非专属用途',
value: '2',
},
]
// 车辆标签
export const VEHICLE_TAG_LIST = [
{
label: '试驶车 ',
value: 1,
},
{
label: '服务车',
value: 3,
},
{
label: '代步车',
value: 4,
},
{
label: '救援车',
value: 5,
},
{
label: '办公车',
value: 6,
},
{
label: '高豪车',
value: 8,
},
{
label: '其他',
value: 7,
},
]
// 围栏列表-监控类型
export const FENCE_MONITOR_LIST = [
{ label: '驶入', value: '1' },
{ label: '驶出', value: '2' },
{ label: '驶入驶出', value: '3' },
]
// 围栏列表-状态
export const FENCE_TYPE_LIST = [
{ label: '已开启', value: '1' },
{ label: '已关闭', value: '0' },
]
// 车辆在线状态
export const VEHICLE_ONLINE_STATUS = [
{ label: '行驶中', value: 0 },
{ label: '静止', value: 1 },
{ label: '离线', value: 2 },
{ label: '在线', value: 3 },
]
// 是否结清
export const SETTLEFLAGLIST = {
0: '未结清',
1: '已结清',
}
export const SETTLE_FLAG_LIST = [
{ label: '未结清', value: 0 },
{ label: '已结清', value: 1 },
]
import moment from '@/common/moment'
// 全部
let allDays = {
text: '全部',
onClick(picker) {
picker.$emit('pick', [])
},
}
// 本月
let currentMonth = {
text: '本月',
onClick(picker) {
const start = moment().add('month', 0).format('YYYY-MM') + '-01'
const end = moment().format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
}
// 今日
let currentDay = {
text: '今日',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
picker.$emit('pick', [end, end])
},
}
// 昨日
let yesterday = {
text: '昨日',
onClick(picker) {
const start = moment()
.day(moment().day() - 1)
.format('YYYY-MM-DD')
const end = moment()
.day(moment().day() - 1)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 近3天
let nearly3Days = {
text: '近3天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 2)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
}
// 近7天
let nearly7Days = {
text: '近7天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 6)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 近15天
let nearly15Days = {
text: '近15天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 14)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 近30天
let nearly30Days = {
text: '近30天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 29)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 上月
let lastMonth = {
text: '上月',
onClick(picker) {
const end = moment()
.month(moment().month() - 1)
.endOf('month')
.format('YYYY-MM-DD')
const start = moment()
.month(moment().month() - 1)
.startOf('month')
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
}
// 上周
let lastWeek = {
text: '上周',
onClick(picker) {
let weekOfDay = parseInt(moment().format('E'))
const end = moment().subtract(weekOfDay, 'days').format('YYYY-MM-DD')
const start = moment()
.subtract(weekOfDay + 7 - 1, 'days')
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
}
// 本周
let currentWeek = {
text: '本周',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment().weekday(0).format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
}
// // 前一天
// let lastDay = {
// text: '前一天',
// onClick(picker) {
// let value = moment(picker.date).subtract(1, 'day').format('YYYY-MM-DD')
// picker.$emit('pick', value)
// },
// }
// // 后一天
// let nextDay = {
// text: '后一天',
// onClick(picker) {
// let value = moment(picker.date).subtract(-1, 'day').format('YYYY-MM-DD')
// picker.$emit('pick', value)
// }
// }
// 最近一天不在线
let latelyOneDay = {
text: "近1天不在线",
onClick(picker) {
const start = moment()
.day(moment().day() - 1)
.format("YYYY-MM-DD HH:mm:ss");
picker.$emit("pick", start);
},
}
// 最近三天不在线
let latelyThreeDay = {
text: "近3天不在线",
onClick(picker) {
const start = moment()
.day(moment().day() - 3)
.format("YYYY-MM-DD HH:mm:ss");
picker.$emit("pick", start);
},
}
// 最近7天不在线
let latelySevenDay = {
text: "近7天不在线",
onClick(picker) {
const start = moment()
.day(moment().day() - 7)
.format("YYYY-MM-DD HH:mm:ss");
picker.$emit("pick", start);
},
}
// 警情中心-围栏报警
export const fenceShortcuts = [
allDays,
currentDay,
yesterday,
nearly7Days,
nearly15Days,
nearly30Days
]
// 警情中心-停驶报警
export const shutDownShortcuts = [
allDays,
nearly3Days,
nearly7Days,
currentMonth,
]
// 里程统计详情
export const mileageDetailShortcuts = [
allDays,
yesterday,
currentWeek,
lastWeek,
currentMonth,
lastMonth
]
// 设备激活时间
export const deviceActivedShortcuts = [
allDays,
currentDay,
nearly7Days,
currentMonth,
lastMonth,
nearly30Days
]
// 超速报警
export const speedShortcuts = [
allDays,
yesterday,
lastWeek,
currentMonth,
lastMonth,
]
// 运营统计报表-车辆维度
export const staticReportCarShortcuts = [
allDays,
yesterday,
currentWeek,
lastWeek,
currentMonth,
lastMonth
]
// // 警情研判
// export const alarmShortcuts = [
// lastDay,
// nextDay
// ]
// 警情研判-处理日志
export const alarmLogShortcuts = [
currentDay,
yesterday,
nearly3Days,
nearly7Days,
nearly15Days
]
// 离线报警-离线时间
export const offlineShortcuts = [
latelyOneDay,
latelyThreeDay,
latelySevenDay
]
// 离线报警-激活时间
export const offlineActiveShortcuts = [
allDays,
nearly3Days,
nearly7Days,
currentMonth
]
//通用防拆报警-报警时间
export const tamperAlarmShortcuts = [
currentDay,
yesterday,
nearly7Days,
currentWeek,
currentMonth
]
\ No newline at end of file
import moment from 'moment';
// 设置moment的语言环境配置
moment.locale('zh-cn', {
week: {
dow: 1,
doy: 4
}
})
export default moment
\ No newline at end of file
<template>
<el-button :type="type" :icon="icon" v-if="hasPermission()" :size="size">
<slot />
</el-button>
<!-- <el-link :type="type" v-if="link && hasPermission()">
<slot />
</el-link> -->
</template>
<script>
export default {
name: "AuthButton",
props: {
uid: {
type: [String, Number],
default: "",
},
pid: {
type: [String, Number],
default: "",
},
name: {
type: String,
default: "",
},
type: {
type: [String, Number],
default: "default",
},
link: {
type: Boolean,
default: false,
},
size: {
type: String,
default: "",
},
icon:{
type:String,
default:''
}
},
data() {
return {};
},
mounted() {},
methods: {
// 判断是否有权限
hasPermission() {
let id = this.uid;
let _name = this.name;
let pid = this.pid
let list = this.$root.parentCommon.getAuthData();
if (!list || list.length <= 0) {
return false;
}
let idx = list.findIndex((k) => k.id == id || k.label == _name || k.origin.permissionTag == pid);
if (idx < 0) {
return false;
} else {
return true;
}
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<el-link class="el_link" :underline="false" :type="type" v-if="hasPermission()">
<slot />
</el-link>
</template>
<script>
export default {
name: "AuthLink",
props: {
uid: {
type: [String, Number],
default: "",
},
pid: {
type: [String, Number],
default: "",
},
name: {
type: String,
default: "",
},
type: {
type: [String, Number],
default: "default",
},
link: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
mounted() {},
methods: {
// 判断是否有权限
hasPermission() {
let id = this.uid;
let _name = this.name;
let pid = this.pid;
let list = this.$root.parentCommon.getAuthData();
if (!list || list.length <= 0) {
return false;
}
let idx = list.findIndex(
(k) => k.id == id || k.label == _name || k.origin.permissionTag == pid
);
if (idx < 0) {
return false;
} else {
return true;
}
},
},
};
</script>
<style lang="scss" scoped>
.el_link:hover {
text-decoration: none;
}
</style>
\ No newline at end of file
<template>
<div>
<el-dialog
:title="title"
:visible.sync="isVisible"
:before-close="handleClose"
:close-on-click-modal="false"
:width="width"
class="app-dialog"
:append-to-body="true"
:tabindex="1"
>
<div class="container">
<slot></slot>
</div>
<div slot="footer">
<slot name="btn-front"></slot>
<el-button
@click="handleClose"
:size="btn_size"
>取消</el-button>
<el-button
v-show="hasOk"
type="primary"
:size="btn_size"
:loading="loading"
@click="handleConfirm"
>{{btnOkLabel}}</el-button>
<slot name="btn-behind"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'basic-dialog',
props: {
title: {
type: String,
default: ''
},
isVisible: {
type: Boolean,
default: false
},
btnOkLabel: {
type: String,
default: '确定'
},
width: {
type: String,
default: '580px'
},
hasOk: {
type: Boolean,
default: true
},
loading:{
type:Boolean,
default:false
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
}
}
}
</script>
<style lang="scss">
.app-dialog {
.el-dialog__header {
padding: 20px;
}
.el-dialog__footer {
padding: 10px;
background: #fff;
}
.el-dialog__body {
padding: 0;
border-top: 1px solid #eaeefb;
border-bottom: 1px solid #eaeefb;
// min-height: 250px;
max-height: 500px;
overflow-y: auto;
.container {
> span {
display: block;
}
overflow-y: auto;
padding: 20px 20px;
}
}
}
</style>
<!-- 表格+分页 -->
<template>
<div class="d2-table">
<el-table
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
:border="tableParams.border || false"
:highlight-current-row="true"
:stripe="tableParams.stripe || true"
:size="tableParams.size || 'mini'"
@sort-change="sortChange"
@selection-change="handleSelect"
:header-cell-style="{background:'#f5f7fa'}"
>
<el-table-column
v-if="tableParams.mutiSelectUniqueKey"
type="selection"
width="55"
:reserve-selection="true"
>
</el-table-column>
<el-table-column
v-if="hasNum"
align="center"
width="70px"
:label="tableParams.numName || '序号'"
type='index'
:index="index=>index+(page.pageNumber - 1) * page.pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableParams.tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
:align="item.align||'center'"
:sortable="item.sortable"
:show-overflow-tooltip="true"
:fixed="!!item.fixed"
>
<template slot-scope="scope">
<slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:width="item.width"
></slot>
<template v-else-if="item.tagLabel">
<el-tag
v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]"
>
</el-tag>
<el-tag
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
></el-tag>
</template>
<template v-else-if="item.formatter">
<span v-html="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span v-text="data[scope.$index][item.prop]"></span>
</template>
<template v-else>
<span v-text="tableData[scope.$index][item.prop]"></span>
</template>
</template>
</el-table-column>
<el-table-column
v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align||'center'"
:width="tableParams.tableOption.width||'200'"
fixed="right"
>
<!-- <template>
<el-button
v-for="(j, idx) in tableParams.tableOption"
:key="idx"
:type="j.type"
size="mini"
>{{j.name}}</el-button>
</template> -->
<template slot-scope="scope">
<slot
name="table-button"
:scope="scope.row"
></slot>
</template>
</el-table-column>
</el-table>
<el-pagination
v-if="!tableParams.hasPage && hasPage"
background
class="el_pagination"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="page.pageNumber"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="getListApi ? total : tableTotal"
layout="sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</div>
</template>
<script>
export default {
name: 'basic-table',
data() {
return {
loading: false,
oldValue: {},
data: [],
page: {
pageSize: 10,
pageNumber: 1
},
total: 10,
// 排序
sortColum: '',
sort: '',
// pagination: {},
// 多选数组
mutiSelectArr: {}
}
},
props: {
// 搜索条件
searchForm: {
type: Object,
default: () => { }
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => [
// {
// id: 1,
// account: '胡悦',
// username: 'jkjk',
// departmentName: '平台研发中心',
// phoneNumber: '1546861321',
// enablesStatus: 1,
// createDate: '2013556'
// }
]
},
tableTotal: {
type: Number,
default: 10
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 搜索前操作
beforeSearchFn: {
type: Function,
default: () => {
return new Promise((resolve, reject) => {
resolve()
})
}
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true
},
// 序号,默认有
hasNum: {
type: Boolean,
default: true
},
tableParams: {
type: Object,
default: () => {
return {
// 多选-判断来自哪个页面
mutiSelectName: {
type: String,
default: ''
},
// 多选-唯一标识
mutiSelectUniqueKey: {
type: String,
default: ''
},
// 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000)
// btnId: {
// type: String,
// default: ''
// },
// 后端返回列表参数名
listName: {
type: String,
default: ''
},
// 标签-默认标签名为tag;若有多个,那么需要在表格栏的列中加“tagName”
// tag: {
// type: Array,
// default: () => []
// },
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: {
type: Array,
default: () => []
}
}
}
}
},
watch: {
},
mounted() {
const btn = document.getElementById(this.tableParams.btnId)
// this.tableData = [
// {
// id: 1,
// account: '胡悦',
// username: 'jkjk',
// departmentName: '平台研发中心',
// phoneNumber: '1546861321',
// enablesStatus: 1,
// createDate: '2013556'
// }
// ]
btn && btn.addEventListener('click', this.refreshEmit)
this.getListApi && this.refreshTable()
},
methods: {
// 排序
sortChange({ column, prop, order }) {
this.sortColum = order ? prop : ''
this.sort = order
this.refreshTable()
},
// 多选
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val
},
// 清空多选
clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
},
// 发布事件,以期查询条件改变后,页面图表需要刷新
refreshEmit() {
this.$emit('searchChange')
this.refreshTable(true, true)
},
refreshTable(clearMuti = true, resetCurrentPage = false) {
this.beforeSearchFn().then(res => {
// 清空多选
clearMuti && this.clearMutiSelect()
this.loading = true
console.log(this.searchForm)
resetCurrentPage && (this.page.pageNumber = 1)
var params = {
...this.page,
...this.searchForm
}
if (this.sort) {
params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0
}
this.getListApi(params).then(res => {
var data = res.data
this.data = data[this.tableParams.listName]
this.total = data.totalElements
this.loading = false
this.$emit('dataFinished', this.data);
}).catch(() => {
this.loading = false
})
})
},
// 页码
handleSizeChange(value) {
this.page.pageSize = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
},
handleCurrentChange(value) {
this.page.pageNumber = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
}
}
}
</script>
<style>
.el-table thead {
color: #909399;
font-weight: 500;
}
</style>
<style lang="scss" scoped>
.el_pagination{
padding:10px 0px;
}
</style>
<template>
<div class="dialog_page">
<el-dialog ref="glsxDialogCom" :title="title" :visible.sync="show" :width="width" :append-to-body="appendtobody" :show-close="showClose" custom-class="glsx_dialog" :close-on-press-escape="false" :close-on-click-modal="false" @close="onCancel" @opened="onDialogOpened">
<div slot="title" class="test" v-if="slotInfo.title">
<slot name="title" />
</div>
<div class="dialog_content">
<slot />
</div>
<div class="dialog_footer" v-show="hasFooter">
<slot name="footer"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "GlsxDialog",
props: {
show: {
type: Boolean,
default: false,
},
title: {
type: String,
default: "提示",
},
width: {
type: String,
default: "46%",
},
cancel: {
required: false,
type: Function,
},
confirm: {
required: false,
type: Function,
},
usefooter: {
required: false,
type: Boolean,
default: false,
},
appendtobody: {
required: false,
type: Boolean,
default: false,
},
value: {
type: Boolean,
default: false,
},
showClose: {
required: false,
type: Boolean,
default: true,
},
},
data() {
return {
hasFooter: false,
hasTitle: false,
slotInfo: {},
};
},
created() {
let o = this.$slots;
this.hasFooter = o.footer;
this.hasTitle = o.title;
this.slotInfo = o;
},
mounted: function () {
//this.$refs.glsxDialogCom.rendered = true;
},
methods: {
/**
* 取消关闭弹框
*/
onCancel: function () {
// 兼容以前的页面
this.$emit("close");
//this.$emit("input", false);
},
/**
* 确定
*/
onConfirm: function () {},
//
onDialogOpened() {},
},
};
</script>
<style lang="scss">
.glsx_dialog {
.el-dialog__header {
border-bottom: 1px solid #ddd !important;
padding-top: 10px;
font-size: 14px;
}
.el-dialog__headerbtn {
top: 10px;
right: 10px;
}
.el-dialog__body {
padding: 0;
}
.el-dialog__footer {
border-top: 1px solid #ddd;
}
}
</style>
<style lang="scss" scoped>
.dialog_content {
max-height: 600px;
overflow-y: auto;
padding: 20px;
}
.dialog_footer {
padding: 10px 15px;
border-top: 1px solid #e1e1e1;
text-align: right;
}
</style>
<template>
<div class="">
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small">
</el-input>
<div v-loading="loading">
<el-tree style="max-height:50vh;overflow:auto" class="filter-tree" :data="filterTextData" :filter-node-method="filterNode" highlight-current ref="tree" node-key="id" check-on-click-node>
</el-tree>
</div>
<p style="text-align: right; margin-top: 10px">
<el-button @click="filterConfirm" type="primary">确定</el-button>
<el-button @click="closeFilter">取消</el-button>
</p>
</div>
</template>
<script>
import { getOrgTree } from "services/common";
import { showToast } from "@/utils/util";
export default {
name: "GlsxOrganization",
data() {
return {
filterText: "",
filterTextData: [],
_timeout: "",
loading: false,
};
},
mounted() {
this.getTree();
},
watch: {
filterText(n) {
let _this = this;
_this.loading = true;
setTimeout(function () {
_this.$refs.tree.filter(n);
}, 100);
},
},
methods: {
// 确认选择树
filterConfirm() {
let o = this.$refs.tree.getCurrentNode();
if (!o) {
showToast({
message: "请选择所属组织",
type: "error",
});
return false;
}
const { label, id, origin } = o;
// if (origin && origin.type != "u") {
// showToast({
// message: "请选择下级所属组织",
// type: "error",
// });
// return false;
// }
console.log(o);
this.$emit("change", o);
// this.searchForm.specialShopName = label.split("/")[1];
// this.searchForm.specialShopCode = label.split("/")[0];
//this.$set(this, "form.specialShopName", label);
//this.searchForm.specialShopId = id;
//this.closeFilter();
},
// 获取组织机构树数据
getTree() {
getOrgTree({ hasUserLeaf: true }).then((res) => {
const { data } = res;
this.filterTextData = data || [];
});
},
// 搜索树
filterNode(value, data) {
let _this = this;
if (!value) {
_this.loading = false;
return true;
}
setTimeout(function () {
_this.loading = false;
}, 1500);
return data.label.indexOf(value) !== -1;
},
// 关闭树
closeFilter() {
this.$emit("change");
},
// 搜索树
onChange(val) {
this.loading = true;
this.$refs.tree.filter(val);
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div class="glsx_table_box">
<el-table class="el_table" :data="list" border :size="size">
<el-table-column v-for="(item,index) in column" :key="index" :label="item.label" :prop="item.prop" :formatter="item.formatter" :align="item.align" :fixed="item.fixed" :width="item.width" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" v-if="this.$scopedSlots.operate" width="120px">
<template slot-scope="scope">
<slot name="operate" :scope="scope.row"></slot>
</template>
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="sizes, total,prev, pager, next, jumper" :total="pageTotal" :page-size.sync="pageSizeNum" :page-sizes="pageSizes" :current-page.sync="currentPage" @current-change="getList" @size-change="changePageSize" />
</div>
</div>
</template>
<script>
/**
* list: 表格数据
* border:是否带边框
* size:表格尺寸
* column: 列数据
* layout:分页展示数据
* pageSizes: 默认展示多少页列表
* pageSize: 当前展示页条数
*/
export default {
name: "GlsxTable",
props: {
list: {
type: Array,
default: function () {
return [];
},
},
column: {
type: Array,
default: function () {
return [];
},
},
border: {
type: Boolean,
default: true,
},
size: {
type: String,
default: "small",
},
layout: {
type: String,
default: "sizes, total,prev, pager, next, jumper",
},
pageTotal: {
type: Number,
default: 0,
},
pageSizes: {
type: Array,
default: function () {
return [10, 20, 30, 40];
},
},
pageSize: {
type: Number,
default: 10,
},
},
data() {
return {
currentPage: 1,
pageSizeNum: 10,
};
},
created() {
this.pageSizeNum = this.pageSize;
//console.log(this.$scopedSlots);
},
mounted() {},
methods: {
/**
* 每页展示
*/
changePageSize: function (e) {
this.pageSizeNum = e;
this.$emit("change", { pageSize: e });
//this.getList();
},
// 获取列表
getList(current) {
this.$emit("change", { pageNumber: current, pageSize: this.pageSizeNum });
},
// 重置
rest(id, e) {
if (id) {
this[id] = e;
} else {
this.currentPage = 1;
this.pageSizeNum = 10;
}
},
},
};
</script>
<style lang="scss">
.el_table {
thead {
th {
//background: rgba(197, 197, 197, 0.1);
background: #f5f7fa;
}
}
}
</style>
<style lang="scss" scoped>
.glsx_table_box {
margin: 10px 0;
}
.pagination_list {
text-align: right;
padding: 10px 0;
}
</style>
\ No newline at end of file
<template>
<div class="glsx_table_box">
<el-table class="el_table" :data="tableData" border :size="size" v-loading="loading">
<el-table-column v-for="(item,index) in column" :key="index" :label="item.label" :prop="item.prop" :formatter="item.formatter" :align="item.align" :fixed="item.fixed" :width="item.width" show-overflow-tooltip>
<template slot-scope="{row}">
<template v-if="item.formatter">
<span v-html="item.formatter(row)"></span>
</template>
<template v-else>{{row[item.prop]||'--'}}</template>
</template>
</el-table-column>
<el-table-column label="操作" v-if="this.$scopedSlots.operate" width="120px">
<template slot-scope="scope">
<slot name="operate" :scope="scope.row"></slot>
</template>
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="sizes, total,prev, pager, next, jumper" :total="pageTotal" :page-size.sync="pageSize" :page-sizes="pageSizes" :current-page.sync="currentPage" @current-change="getList" @size-change="changePageSize" />
</div>
</div>
</template>
<script>
/**
* request: 接口方法
* list: 表格数据
* border:是否带边框
* size:表格尺寸
* column: 列数据
* layout:分页展示数据
* pageSizes: 默认展示多少页列表
* pageSize: 当前展示页条数
* params: 外部查询参数
*/
export default {
name: "GlsxTable",
props: {
request: {
type: Function,
},
list: {
type: Array,
default: function () {
return [];
},
},
column: {
type: Array,
default: function () {
return [];
},
},
border: {
type: Boolean,
default: true,
},
size: {
type: String,
default: "small",
},
layout: {
type: String,
default: "sizes, total,prev, pager, next, jumper",
},
pageSizes: {
type: Array,
default: function () {
return [10, 20, 30, 40];
},
},
params: {
type: Object,
default: function () {
return {};
},
},
},
data() {
return {
currentPage: 1,
pageSize: 10,
pageTotal: 0,
tableData: [],
loading: false,
};
},
watch: {
params: {
handler: function (n, o) {
if (n) {
console.log(n);
this.getList();
}
},
immediate: true,
},
},
created() {},
mounted() {
// if (this.request) {
// this.getList();
// }
},
methods: {
/**
* 每页展示
*/
changePageSize: function (e) {
this.pageSize = e;
this.currentPage = 1;
this.getList();
},
// 获取参数
getParams(current) {
console.log(this.params);
let oParams = { ...this.params };
if (current || oParams.current) {
this.currentPage = current || oParams.current;
}
oParams.pageSize = this.pageSize;
oParams.pageNumber = current || oParams.current || this.currentPage;
delete oParams.current;
return oParams;
},
// 获取列表
getList(current) {
let request = this.request;
let oParams = this.getParams(current);
console.log(oParams);
this.loading = true;
request(oParams)
.then((res) => {
this.loading = false;
if (res.code != 200) {
return false;
}
let {
data: { list, totalElements },
} = res;
this.tableData = list || [];
this.pageTotal = totalElements;
})
.catch((error) => {
this.loading = false;
});
},
// 重置
rest() {
this.pageSize = 10;
this.currentPage = 1;
this.getList();
},
// 重置分页参数
restParams() {
// this.pageSize = 10;
this.currentPage = 1;
this.pageSize = 10
},
},
};
</script>
<style lang="scss">
.el_table {
thead {
th {
//background: rgba(197, 197, 197, 0.1);
background: #f5f7fa;
}
}
}
</style>
<style lang="scss" scoped>
.glsx_table_box {
margin: 10px 0;
}
.pagination_list {
text-align: right;
padding: 10px 0;
}
</style>
\ No newline at end of file
import Vue from 'vue'
// 注意 有些组件使用异步加载会有影响
Vue.component('basic-table', () => import('./basic-table/index.vue'))
Vue.component('search-form', () => import('./search-form/index.vue'))
Vue.component('sticky-table', () => import('./sticky-table/index.vue'))
Vue.component('basic-dialog', () => import('./basic-dialog/index.vue'))
Vue.component('rule-form', () => import('./rule-form/index.vue'))
<template>
<ul class="map-control ng-scope" ui-map-control="">
<li><a title="卫星/地图切换" @click="toggleMapType"><i class="icon icon-satellite"></i></a></li>
<li><a title="测距" @click="toggleRuler" :class="isRulerOn?'active':''"><i class="icon icon-ruler"></i></a></li>
<li><a title="定位当前距离" @click="getLocation"><i class="icon icon-locate"></i></a></li>
<li><a title="放大" @click="zoomIn"><i class="icon icon-zoom_in"></i></a></li>
<li><a title="缩小" @click="zoomOut"><i class="icon icon-icon_zoom_out"></i></a></li>
<!-- <li v-if="!isModalMap"><a title="全屏切换" @click="toggleScreen">
<i class="icon icon-fullsize" :class="isFullscreen?'icon-minisize':'icon-fullsize'"></i>
</a></li> -->
<li v-if="!isModalMap"><a title="刷新" @click="$emit('onRefreshMap')"><i class="icon icon-refresh"></i></a></li></ul>
</template>
<script>
import '../../assets/spritesmith-generated/sprite.css'
import mapService from 'utils/mapService.js'
// import { mapGetters, mapActions } from 'vuex'
export default{
props: ['isModalMap'],
data(){
return {
isRulerOn: false,
isFullscreen: false
}
},
computed: {
// ...mapGetters([
// 'isCollapse'
// ])
},
methods:{
toggleMapType(){
mapService.toggleMapType();
},
toggleRuler(){
if(this.isRulerOn){
mapService.rulerTurnOff();
this.isRulerOn = false;
}else{
mapService.rulerTurnOn();
this.isRulerOn = true;
}
},
getLocation(){
mapService.getCurrentLocation();
},
zoomIn(){
mapService.zoomIn();
},
zoomOut(){
mapService.zoomOut();
},
toggleScreen(){
if(this.isFullscreen){
this.isFullscreen = false;
this.$emit('onToggleVisible', true)
// if(this.isCollapse){
// this.toggleCollapse()
// }
}else{
this.isFullscreen = true;
this.$emit('onToggleVisible', false)
// if(!this.isCollapse){
// this.toggleCollapse()
// }
}
},
refresh(){
},
// ...mapActions([
// 'toggleCollapse'
// ])
}
}
</script>
<style scoped>
ul.map-control{
position: absolute;
bottom: 260px;
right: 10px;
list-style: none;
padding: 5px;
margin: 0px;
background-color: rgba(0,0,0,0.1);
z-index: 102;
}
.map-control>li{
width: 30px;
height: 30px;
background-color: #fff;
}
.map-control a{
display: inline-block;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
cursor: pointer;
}
i{
display: inline-block;
vertical-align: middle;
}
</style>
\ No newline at end of file
<template>
<div>
<el-form :model="ruleForm" :rules="rules" :label-position="labelPosition" :label-width="labelWidth" :size="size" :inline="inline">
<el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden" v-loading="item.loading">
<template slot-scope="scope">
<template v-if="item.type === 'input'">
<el-input v-if="item.clickFunc" :type="item.inputText || 'text'" :disabled="item.disabled || false" :readonly="item.readonly || false" :placeholder="item.placeholder || '请输入'" @click.native="item.clickFunc" :class="item.clickFunc ? 'pointer' : ''" :ref="item.ref" v-model="ruleForm[item.prop]" @input="update($event)">
</el-input>
<el-input v-else :type="item.inputText || 'text'" :readonly="item.readonly || false" :disabled="item.disabled || false" :placeholder="item.placeholder || '请输入'" v-model="ruleForm[item.prop]" :maxlength="item.maxlength" :minlength="item.minlength" :show-password="item.showPassword || false" :clearable="item.clearable" :show-word-limit="item.showWordLimit || false">
</el-input>
</template>
<template v-else-if="item.type == 'select'">
<el-select v-if="item.visibleFunc" v-model="ruleForm[item.prop]" :disabled="item.disabled || false" :placeholder="item.placeholder || '请选择'" :filterable="item.filterable || false" @change="selectChange" @visible-change="item.visibleFunc">
<el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled">
</el-option>
</el-select>
<el-select v-else v-model="ruleForm[item.prop]" :disabled="item.disabled || false" :placeholder="item.placeholder || '请选择'" :filterable="item.filterable || false" @change="e => selectChange(e,item)">
<template v-if="item.group">
<el-option-group v-for="(k,idx) in item.options" :key="idx" :label="k[item.key]" :value="k[item.value]">
<el-option v-for="(j,jdx) in (k.childs||[])" :key="jdx" :label="j[item.key]" :value="j[item.value]">
</el-option>
</el-option-group>
</template>
<template v-else>
<el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled">
</el-option>
</template>
</el-select>
</template>
<template v-else-if="item.type === 'switch'">
<el-switch v-model="ruleForm[item.prop]" :active-text="item.activeText || '开'" :inactive-text="item.inactiveText || '关'"></el-switch>
</template>
<template v-else-if="item.type === 'radio'">
<el-radio-group @change="radioChange($event,item.prop)" v-model="ruleForm[item.prop]" :disabled="item.disabled">
{{ruleForm[item.prop]}}
<el-radio v-for="(child,childIndex) in item.children" :key="childIndex" :label="childIndex">{{child}}</el-radio>
</el-radio-group>
<el-select v-if="item.hasSelect" v-model="ruleForm[item.prop]" :placeholder="item.placeholder || '请选择'" @change="selectChange">
<el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled">
</el-option>
</el-select>
</template>
<template v-else-if="item.type == 'customize'">
<slot :scope="scope" :name="item.slotName">
</slot>
</template>
</template>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: "rule-form",
data() {
return {
// labelPosition: 'left'
};
},
props: {
// 表单数据
ruleData: {
type: Array,
default: () => {
return [];
},
},
inline: {
type: Boolean,
default: false,
},
// 表单model
ruleForm: {
type: Object,
default: () => {
return {};
},
},
// 表单验证规则
rules: {
type: Object,
default: () => {
return {};
},
},
// 标签位置
labelPosition: {
type: String,
default: "right",
},
size: {
type: String,
default: "small",
},
labelWidth: {
type: String,
default: "100px",
},
},
mounted() {
},
methods: {
selectChange(val,item) {
console.log(val,item)
if(item.selectChange){
item.selectChange(val,item);
}
this.$emit("selectChange", val);
},
radioChange(event, prop) {
this.$emit("radioChange", event, prop);
},
update(e) {
this.$forceUpdate();
},
},
};
</script>
<style lang="scss">
.pointer input {
cursor: pointer;
}
</style>
\ No newline at end of file
<template>
<div>
<el-form
class="clearfix search-form"
:model="formModel"
:inline="true"
:size="size"
@submit.native.prevent
>
<el-form-item
v-for="(item, index) in formList"
:key="index"
:label="item.label || ''"
:class="item.class||''"
>
<template>
<template v-if="item.type === 'input'">
<el-input
v-model="formModel[item.prop]"
:type="item.inputType || 'text'"
:placeholder="item.placeholder || '请输入'"
:readonly="item.readonly || false"
@keyup.enter.native="onInput"
clearable
></el-input>
</template>
<template v-else-if="item.type === 'select'">
<el-select
v-model="formModel[item.prop]"
:placeholder="item.placeholder || '请选择'"
clearable
>
<el-option
v-for="i in item.options"
:key="i[item.value] || i.value || i.dictValue"
:label="i[item.key] || i.label || i.dictLabel"
:value="i[item.value] || i.value || i.dictValue"
:disabled="i.disabled"
>
</el-option>
</el-select>
</template>
<template v-else-if="item.type === 'daterange'">
<el-date-picker
:style="item.selectStyle || 'width: 100%;'"
v-model="formModel[item.prop]"
type="daterange"
range-separator="至"
:start-placeholder="item.startPlaceholder || '开始日期'"
:end-placeholder="item.endPlaceholder || '结束日期'"
value-format="yyyy-MM-dd"
:picker-options="item.pickerOptions || {}"
>
</el-date-picker>
</template>
<template v-else-if="item.type === 'singleDate'">
<el-date-picker
style="width: 100%;"
v-model="formModel[item.prop]"
:type="item.dateType"
:value-format="item.format || 'yyyy-MM'"
:placeholder="item.placeholder"
:picker-options="item.pickerOptions || {}"
>
</el-date-picker>
</template>
<template v-else-if="item.type === 'selectDate'">
<el-select
:style="item.selectStyle || 'width: 100px;'"
v-model="formModel[item.prop]"
:placeholder="item.placeholder || '请选择'"
>
<el-option
v-for="i in item.options"
:key="i[item.value] || i.value"
:label="i[item.key] || i.label"
:value="i[item.value] || i.value"
:disabled="i.disabled"
>
</el-option>
</el-select>
<el-date-picker
v-model="formModel[item.dateModel]"
:type="item.dateType || date"
placeholder="选择日期"
>
</el-date-picker>
</template>
</template>
</el-form-item>
<slot name="self">
</slot>
<el-form-item>
<slot name="form-slot">
<template>
</template>
</slot>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: 'search-form',
props: {
formModel: {
type: Object,
default: () => { }
},
size: {
type: String,
default: 'small'
},
formList: {
type: Array,
default: () => []
},
input:{
type:Function
}
},
methods:{
// 监听输入
onInput(e){
console.log(e)
this.$emit('input',e)
}
}
}
</script>
<style lang="scss">
.search-form {
padding: 18px 18px 0;
.el-form-item {
display: inline-block;
// float: left;
width: calc(50% - 20px);
max-width: 420px;
margin-right: 18px;
}
.el-form-item__content {
width: 100%;
}
}
</style>
\ No newline at end of file
<template>
<div>
<basic-table
class="head-table"
v-show="showHead"
ref="headTable"
:tableParams="headTableParams"
>
</basic-table>
<basic-table
ref="addStoreTable"
:searchForm="searchForm"
:tableParams="tableParams"
:getListApi="getListApi"
>
</basic-table>
</div>
</template>
<script>
export default {
name: 'sticky-table',
props: {
tableParams: {
type: Object,
default: () => {
return {
// 多选-判断来自哪个页面
// mutiSelectName: {
// type: String,
// default: ''
// },
// 多选-唯一标识
// mutiSelectUniqueKey: {
// type: String,
// default: ''
// },
// 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000)
// btnId: {
// type: String,
// default: ''
// },
// 后端返回列表参数名
listName: {
type: String,
default: ''
},
// 标签-默认标签名为tag;若有多个,那么需要在表格栏的列中加“tagName”
// tag: {
// type: Array,
// default: () => []
// },
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: {
type: Array,
default: () => []
}
}
}
},
headTableParams: {
type: Object
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 搜索条件
searchForm: {
type: Object,
default: () => { }
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
tableTotal: {
type: Number,
default: 10
}
},
data() {
return {
showHead: false,
scrollTop: 0,
headTableHeight: 0,
tableOffset: {
top: 0,
height: 0
}
}
},
watch: {
scrollTop(val, oldVal) {
if (val > this.tableOffset.top - this.headTableHeight) {
this.showHead = true
} else {
this.showHead = false
}
}
},
mounted() {
window.addEventListener('scroll', () => {
this.scrollTop = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset
// console.log(this.scrollTop)
})
setTimeout(() => {
this.$refs.headTable.$children[0].bodyWrapper.setAttribute('style', 'display: none')
console.log(this.$refs.addStoreTable, this.$refs.addStoreTable.$el.offsetTop)
this.tableOffset.top = this.$refs.addStoreTable.$el.offsetTop
this.tableOffset.height = this.$refs.addStoreTable.$el.offsetHeight
this.headTableHeight = this.$refs.headTable.$el.offsetHeight
}, 1000)
}
}
</script>
<style scoped>
.head-table {
position: sticky;
top: 0;
z-index: 1;
}
</style>
\ No newline at end of file
// import store from '@/store/index'
// let BASE_URL = store.state.baseURL
// const MOCK_CONFIG_URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
// const env = process.env.NODE_ENV
// https://oss-config.test.glsx.com.cn/mock/5f8fda237ec90706c0f89d05/service
// http://192.168.0.63:8880
const API = {
getMockConfig() {
console.log(MOCK_CONFIG_URL)
return MOCK_CONFIG_URL + '/e-shield-trialrun_config'
},
LOGIN_ACTION: '/login_action'
}
// 公共接口
const COMMON_API = {
PROVINCE_LIST: '/publiccenter/basic/province/list',
DICTDATA_TYPE: '/publiccenter/dict/data/type',
ORGINIZA_SIMPLELIST: '/usercenter/organization/simplelist',
ORGINIZA_SIMPLEROOT: '/usercenter/organization/simpleroot'
}
// 特约店接口
const SPECIALSHOP_API = {
SHOP_SEARCH: '/trialdrive/specialshop/search',
GET_FENCE_DETAIL: '/trialdrive/specialshop/info',
SAVE_FENCE: '/trialdrive/specialshop/add',
UPDATE_FENCE: '/trialdrive/specialshop/edit',
EXPORT_TABLE: '/trialdrive/specialshop/export',
DELETE_SPECIAL_SHOP: '/trialdrive/specialshop/delete'
}
// 试驾报表
const REPORT_API = {
REPORT_SEARCH: '/trialdrive/trialdrivereport/search',
REPORT_EXPORT: '/trialdrive/trialdrivereport/export',
REPORT_YEARS: '/trialdrive/trialdrivereport/years'
}
// 上牌资料审核
const VEHICLEDOC_API = {
DOC_SEARCH: '/trialdrive/vehicleDoc/search',
DOC_BY_CONDITION: '/trialdrive/vehicleDoc/findVehDocByCondition',
CHENCK_SEARCH: '/trialdrive/approval/searchVehiclelicApp',
SAVE_DOC: '/trialdrive/vehicleDoc/saveOrUpdateVehDoc',
UPDATE_APPROVAL: '/trialdrive/approval/updateApproval',
EXPORT_APPROVAL: '/trialdrive/approval/export'
}
// 试驾车辆管理接口
const VEHICLE_API = {
VEHICLE_SEARCH: '/trialdrive/vehicle/drivevehicle/search',
VEHICLE_ADD: '/trialdrive/vehicle/drivevehicle/add',
VEHICLE_EDIT: '/trialdrive/vehicle/drivevehicle/update',
VEHICLE_DELETE: '/trialdrive/vehicle/drivevehicle/delete',
VEHICLE_UNBIND: '/trialdrive/vehicle/unbindSn',
DOWNLOAD_TEMPLATE: '/trialdrive/vehicle/drivevehicle/downloadtemplate',
VEHICLE_IMPORT: '/trialdrive/vehicle/drivevehicle/import',
VEHICLE_FAILFILE: '/trialdrive/vehicle/drivevehicle/downloadFailFile',
VEHICLE_EXPORT: '/trialdrive/vehicle/drivevehicle/export',
VEHICLE_INFO: '/trialdrive/vehicle/drivevehicle/findbyid',
SPECIAL_SHOP_LIST: '/trialdrive/specialshop/shopusers',
VEHICLE_TREE: '/trialdrive/vehicle/getSelectedTypeTree'
}
// 审批管理
const APPROVAL_API = {
TODO_SEARCH: '/trialdrive/approval/searchTodoApproval'
}
// 试驾围栏审批接口
const TEST_DRIVE_API = {
TEST_DRIVE_SEARCH: '/trialdrive/approval/searchFenceApp',
UPDATE_FENCE_APPROVAL: '/trialdrive/approval/updateApproval'
}
// 警情中心
const TEARDOWN_API = {
TEAR_SEARCH: '/trialdrive/teardown/list',
TEAR_EXPORT: '/trialdrive/teardown/export'
}
export { API, COMMON_API, SPECIALSHOP_API, VEHICLE_API, APPROVAL_API, REPORT_API, VEHICLEDOC_API, TEST_DRIVE_API, TEARDOWN_API }
function emptyAction() {
// 警告:提示当前使用的是空 Action
console.warn("Current execute action is empty!");
}
class Actions {
// 默认值为空 Action
actions = {
onGlobalStateChange: emptyAction,
setGlobalState: emptyAction
};
/**
* 设置 actions
*/
setActions(actions) {
this.actions = actions;
}
/**
* 映射
*/
onGlobalStateChange(...args) {
return this.actions.onGlobalStateChange(...args);
}
/**
* 映射
*/
setGlobalState(...args) {
return this.actions.setGlobalState(...args);
}
}
const actions = new Actions();
export default actions;
\ No newline at end of file
if (window.__POWERED_BY_QIANKUN__) {
// 动态设置 webpack publicPath,防止资源加载出错
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}
\ No newline at end of file
import Vue from 'vue';
const EventBus = new Vue();
export default EventBus;
\ No newline at end of file
import Vue from "vue";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import VueRouter from "vue-router";
import App from "./App.vue";
import routes from "./routes";
import store from "./store";
import "@/styles/index.scss";
import "@/components";
import "./core/public-path";
import { Common } from "@/utils/common.js";
import Constants from "@/utils/constants.js";
import actions from "@/core/actions";
import moment from "moment";
window.moment = moment;
// import axios from 'axios'
Vue.prototype.btn_size = "mini";
Vue.prototype.$Common = Common;
Vue.prototype.$Constants = Constants;
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.config.productionTip = false;
import AuthButton from "@/components/auth-button";
Vue.component("AuthButton", AuthButton);
let router = null;
let instance = null;
function render({ data = {}, container } = {}) {
router = new VueRouter({
base: window.__POWERED_BY_QIANKUN__ ? "/trialRun" : "/",
routes,
});
store.state.baseURL = data.baseURL;
Vue.prototype.$hasPermission = data.common.hasPermission;
instance = new Vue({
router,
store,
data() {
return {
parentRouter: data.router,
parentVuex: data.store,
parentCommon: data.common,
};
},
render: (h) => h(App),
}).$mount(
container ? container.querySelector("#glsx-sub-system") : "#glsx-sub-system"
);
}
if (!window.__POWERED_BY_QIANKUN__) {
render();
}
export async function bootstrap() {
console.log("vue app bootstraped");
}
export async function mount(props) {
console.log("props from main framework", props.data);
actions.setActions(props);
render(props);
props.setGlobalState({});
}
export async function unmount() {
instance.$destroy();
instance.$el.innerHTML = "";
instance = null;
router = null;
}
import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
Vue.use(VueRouter);
const routes = [
{
path: "/",
name: "specialShop",
component: () => import("../views/specialShop/index.vue"),
meta: {
title: "特约店列表",
keepAlive: true,
},
},
{
path: "/todo",
name: "toDo",
component: () => import("../views/toDo/index.vue"),
meta: {
title: "待办列表",
keepAlive: true,
},
},
{
path: "/otherTodo",
name: "otherTodo",
component: () => import("../views/toDo/otherToDo/index.vue"),
meta: {
title: "待办列表",
keepAlive: true,
},
},
{
path: "/vehicleManage",
name: "vehicleManage",
component: () => import("../views/vehicleManage/index.vue"),
meta: {
title: "试驾车辆列表",
keepAlive: true,
},
},
{
path: "/vehicleManage/vehicleList",
name: "vehicleManage",
component: () => import("../views/vehicleManage/vehicleList.vue"),
meta: {
title: "列表",
keepAlive: true,
},
},
{
path: "/vehicleSubmit",
name: "vehicleSubmit",
component: () => import("../views/vehicleSubmit/index.vue"),
meta: {
title: "上牌资料提交",
keepAlive: true,
},
},
{
path: "/vehicleSubmit/addVehicle",
name: "addVehicle",
component: () => import("../views/vehicleSubmit/addVehicle/index.vue"),
meta: {
title: "上牌资料详情",
pushState: true,
keepAlive: true,
},
},
{
path: "/vehicleCheck",
name: "vehicleCheck",
component: () => import("../views/vehicleSubmit/vehicleCheck/index.vue"),
meta: {
title: "上牌资料审核",
keepAlive: true,
},
},
{
path: "/reportManage",
name: "reportManage",
component: () => import("../views/reportManage/index.vue"),
meta: {
title: "有效试驾",
keepAlive: true,
},
},
{
path: "/reportManage/outStore",
name: "outStore",
component: () => import("../views/reportManage/outStore.vue"),
meta: {
title: "无在店统计",
keepAlive: true,
},
},
{
path: "/reportManage/mileage",
name: "mileage",
component: () => import("../views/reportManage/mileage.vue"),
meta: {
title: "里程统计",
keepAlive: true,
},
},
{
path: "/reportManage/mileageDetail",
name: "mileageDetail",
component: () => import("../views/reportManage/mileageDetail.vue"),
meta: {
title: "里程详情",
pushState: true,
keepAlive: true,
},
},
{
path: "/reportManage/oil",
name: "oil",
component: () => import("../views/reportManage/oil.vue"),
meta: {
title: "油耗统计",
keepAlive: true,
},
},
{
path: "/reportManage/driverDetail",
name: "driverDetail",
component: () => import("../views/reportManage/driverDetail.vue"),
meta: {
title: "试驾详情",
keepAlive: true,
},
},
{
path: "/reportManage/summary",
name: "summary",
component: () => import("../views/reportManage/summary.vue"),
meta: {
title: "汇总统计",
keepAlive: true,
},
},
{
path: "/reportManage/actived",
name: "deviceActived",
component: () => import("../views/reportManage/actived.vue"),
meta: {
title: "设备激活",
keepAlive: true,
},
},
{
path: "/reportManage/lastLocation",
name: "lastLocation",
component: () => import("../views/reportManage/lastLocation.vue"),
meta: {
title: "最后定位报表",
keepAlive: true,
},
},
{
path: "/reportManage/mileageGeneral",
name: "mileageGeneral",
component: () => import("../views/reportManage/mileageGeneral.vue"),
meta: {
title: "里程统计(通用)",
keepAlive: true,
},
},
{
path: "/reportManage/mileageGeneralDetail",
name: "mileageGeneralDetail",
component: () => import("../views/reportManage/mileageGeneralDetail.vue"),
meta: {
title: "里程详情(通用)",
pushState: true,
keepAlive: true,
},
},
{
path: "/reportManage/offline",
name: "pseudoOfflineReport",
component: () => import("../views/reportManage/offline.vue"),
meta: {
title: "假性离线报表",
keepAlive: true,
},
},
{
path: "/reportManage/electricity",
name: "pseudoOfflineReport",
component: () => import("../views/reportManage/electricity.vue"),
meta: {
title: "电量统计",
keepAlive: true,
},
},
{
path: "/specialShop",
name: "specialShop",
component: () => import("../views/specialShop/index.vue"),
meta: {
title: "特约店列表",
keepAlive: true,
},
},
{
path: "/specialShop/addShop",
name: "addShop",
component: () => import("../views/specialShop/addShop/index.vue"),
meta: {
title: "新增特约店",
pushState: true,
keepAlive: false,
},
},
{
path: "/testDrive/checkList",
name: "testDriveCheckList",
component: () => import("../views/testDrive/checkList.vue"),
meta: {
title: "试驶线路审核",
keepAlive: true,
},
},
{
path: "/alarmCenter/removeAlarm",
name: "removeAlarm",
component: () => import("../views/alarmCenter/removeAlarm.vue"),
meta: {
title: "拆除预警",
keepAlive: true,
},
},
// {
// path: "/alarmCenter/hadoop",
// name: "hadoopAlarm",
// component: () => import("../views/alarmCenter/hadoop.vue"),
// meta: {
// title: "大数据研判警情",
// keepAlive: true,
// },
// },
{
path: "/alarmCenter/hadoop",
name: "gatheringAlarm",
component: () => import("../views/alarmCenter/gatheringAlarm.vue"),
meta: {
title: "大数据研判警情",
keepAlive: true,
},
},
{
path: "/alarmCenter/tamper",
name: "tamperAlarm",
component: () => import("../views/alarmCenter/tamper.vue"),
meta: {
title: "防拆报警(通用)",
keepAlive: true,
},
},
{
path: "/alarmCenter/offline",
name: "offlineAlarm",
component: () => import("../views/alarmCenter/offline.vue"),
meta: {
title: "离线报警",
keepAlive: true,
},
},
{
path: "/alarmCenter/alarm",
name: "synthesisAlarm",
component: () => import("../views/alarmCenter/alarm.vue"),
meta: {
title: "警情研判",
keepAlive: true,
},
},
{
path: "/alarmCenter/alarmLog",
name: "synthesisAlarmLog",
component: () => import("../views/alarmCenter/alarmLog.vue"),
meta: {
title: "处理日志",
pushState: true,
keepAlive: true,
},
},
{
path: "/alarmCenter/alarm/detail",
name: "synthesisAlarmDetail",
component: () => import("../views/alarmCenter/alarmDetail.vue"),
meta: {
title: "详情",
pushState: true,
keepAlive: true,
},
},
{
path: "/alarmCenter/fence",
name: "fenceAlarm",
component: () => import("../views/alarmCenter/fence.vue"),
meta: {
title: "围栏报警",
keepAlive: true,
},
},
{
path: "/alarmCenter/shutdown",
name: "shutdownAlarm",
component: () => import("../views/alarmCenter/shutdown.vue"),
meta: {
title: "停驶报警",
keepAlive: true,
},
},
{
path: "/fence/index",
name: "fenceIndex",
component: () => import("../views/fence/index.vue"),
meta: {
title: "围栏列表",
keepAlive: true,
},
},
{
path: "/alarmCenter/speed",
name: "speedAlarm",
component: () => import("../views/alarmCenter/speed.vue"),
meta: {
title: "超速报警",
keepAlive: true,
},
},
{
path: "/reportManage/statistics",
name: "statisticsAlarm",
component: () => import("../views/reportManage/statistics.vue"),
meta: {
title: "运营统计报表",
keepAlive: true,
},
},
{
path: "/poi/index",
name: "poiList",
meta: { title: "POI列表", keepAlive: true },
component: () => import("../views/poi/index.vue"),
},
];
export default routes;
import { TEARDOWN_API } from "@/config/config";
import request from "@/services/request";
// 获取试驾围栏审核列表
export const getList = (params) => {
const url = TEARDOWN_API.TEAR_SEARCH;
return request(params, url);
}
// 警情中心-大数据研判警情-获取列表
export const GETJUDGMENTSEARCH = (params) => {
return request(params, "/trialdrive/judgment/search");
}
// 警情中心-大数据研判警情-警情车辆列表
export const GETJUDGMENTALARMVEHICLELIST = (params) => {
return request(params, "/trialdrive/judgment/alarmVehicleList");
}
// 警情中心-大数据研判警情-导出excel
export const ALARM_HADOOP_EXPORT = (params) => {
return request(params, "/trialdrive/judgment/export");
}
// 警情中心-防拆报警(通用)-获取列表
export const GETCOMMONTEARDOWNSEARCH = (params) => {
return request(params, "/trialdrive/commonteardown/search");
}
// 警情中心-防拆报警(通用)-导出excel
export const ALARM_COMMONTEARDOWN_EXPORT = (params) => {
return request(params, "/trialdrive/commonteardown/export");
}
// 警情中心-离线报警-获取列表
export const GETOFFLINESEARCH = (params) => {
return request(params, "/trialdrive/offline/search");
}
// 警情中心-离线报警-导出excel
export const ALARM_OFFLINE_EXPORT = (params) => {
return request(params, "/trialdrive/offline/export");
}
// 警情中心-停驶报警-导出excel
export const ALARM_SHUTDOWN_EXPORT = (params) => {
return request(params, "/alarmcenternew/stayalarm/export");
}
// 警情中心-停驶报警-列表
export const GET_ALARM_SHUTDOWN = (params) => {
return request(params, "/alarmcenternew/stayalarm/search");
}
// 警情中心-围栏报警-列表
export const GET_FENCEALARM_LIST = (params) => {
return request(params, "/alarmcenternew/fencealarm/search");
}
// 警情中心-围栏报警-导出excel
export const ALARM_FENCEALARM_EXPORT = (params) => {
return request(params, "/alarmcenternew/fencealarm/export");
}
// 警情中心-超速报警-获取列表
export const GET_SPEEDING_SEARCH = (params) => {
return request(params, "/alarmcenternew/speeding/search");
}
// 警情中心-超速报警-获取列表-导出excel
export const GET_SPEEDING_EXPORT = (params) => {
return request(params, "/alarmcenternew/speeding/export");
}
// 警情中心-警情研判列表
export const GET_ALARM_LIST = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyse/search")
}
// 警情中心-警情研判-导出excel
export const GET_ALARM_EXPORT = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyse/export")
}
// 警情中心-警情研判-处理日志
export const GET_ALARM_HANDLE_LOG = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyseProcess/search")
}
// 警情中心-警情研判-处理日志-导出excel
export const GET_ALARM_HANDLE_LOG_EXPORT = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyseProcess/export")
}
// 警情中心-警情研判-详情
export const GET_ALARM_INFO = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyse/detail")
}
// 警情中心-警情研判-详情-警情日历
export const GET_ALARM_INFO_CALENDAR = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyse/calendar")
}
// 警情中心-警情研判-详情-修改/处理
export const ALARM_INFO_EDIT = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyse/process", 'POST')
}
// 警情中心-警情研判-详情-最新的处理结果数据
export const GET_LAST_ALARM_RESULT = (params) => {
return request(params, "/alarmcenternew/alarmWarnAnalyseProcess/last")
}
// 警情中心-警情研判-详情-状态修改(关注/忽略) v1.8.0暂时不做
export const ALARM_INFO_EDIT_STATUS = (params) => {
return request(params, "")
}
import { APPROVAL_API } from '@/config/config'
import request from '@/services/request'
// 获取待办列表
function getTodoList (params) {
const url = APPROVAL_API.TODO_SEARCH
return request(params, url)
}
export { getTodoList }
import { COMMON_API } from '@/config/config'
import request from '@/services/request'
// 获取用户列表
function getProvinceList (params) {
const url = COMMON_API.PROVINCE_LIST
return request(params, url)
}
// 获取字典详情
function dictInfo (params) {
const url = `${COMMON_API.DICTDATA_TYPE}/${params}`
return request({}, url)
}
// 获取第一级组织列表树
function getSimpleRoot (params) {
const url = COMMON_API.ORGINIZA_SIMPLEROOT
return request(params, url)
}
// 获取组织列表树
function getSimpleList (params) {
const url = COMMON_API.ORGINIZA_SIMPLELIST
return request(params, url)
}
function getOrgTree(params) {
return request(params, '/usercenter/organization/orgtree')
}
export { getProvinceList, dictInfo, getSimpleRoot, getSimpleList, getOrgTree }
import request from '@/services/request'
// 围栏管理-获取围栏列表
export const GET_FENCE_LIST = params => {
return request(params, '/trialdrive/elecfence/search')
}
// 围栏管理-删除围栏
export const DELETE_FENCE_INFO = params => {
return request(params, '/trialdrive/elecfence/delete')
}
// 围栏管理-启用关闭围栏
export const STARTSTOP_FENCE_INFO = params => {
return request(params, '/trialdrive/elecfence/startstop')
}
// 围栏管理-获取围栏详情
export const GET_FENCE_INFO = params => {
return request(params, '/trialdrive/elecfence/info')
}
// 围栏管理-更新围栏
export const UPDATE_FENCE_INFO = params => {
return request(params, '/trialdrive/elecfence/edit', 'POST')
}
// 围栏管理-导出围栏
export const EXPORT_FENCE_INFO = params => {
return request(params, '/trialdrive/elecfence/export')
}
// 围栏管理-新建围栏
export const ADD_FENCE_INFO = params => {
return request(params, '/trialdrive/elecfence/add', 'POST')
}
\ No newline at end of file
import request from "@/services/request";
// POI管理-获取poi列表
export const GET_POI_LIST = (params) => {
return request(params, "/trialdrive/poifence/search");
};
// POI管理-导出poi列表
export const EXPORT_POI_INFO = (params) => {
return request(params, "/trialdrive/poifence/export");
};
// POI管理-删除poi信息
export const DELETE_POI_INFO = (params) => {
return request(params, "/trialdrive/poifence/delete");
};
// POI管理-更新poi状态
export const MODIFY_POI_INFO = (params) => {
return request(params, "/trialdrive/poifence/modify");
};
import { REPORT_API } from '@/config/config'
import request from '@/services/request'
import store from "@/store";
const BASEURL = store.state.baseURL
// 获取报表列表
function getList(params) {
const url = REPORT_API.REPORT_SEARCH
return request(params, url)
}
// 获取报表列表
function getYears(params) {
const url = REPORT_API.REPORT_YEARS
return request(params, url)
}
function getOutStoreList(params) {
return request(params, '/trialdrive/notinstorereport/search')
}
// 报表管理-里程统计
export const GETMILEAGESTATISTICS = params => {
return request(params, '/trialdrive/mileagestatistics/search')
}
// 报表管理-里程统计-导出excel
export const MILEAGESTATISTICSEXPORT = '/trialdrive/mileagestatistics/export'
// 报表管理-里程统计-日里程-导出excel
export const MILEAGEEXPORTDAILYDETAILS = '/trialdrive/mileagestatistics/exportdailydetails'
// 报表管理-油耗统计-查询列表
export const OIL_STATISTICS_SEARCH = params => {
return request(params, '/trialdrive/oilstatistics/search')
}
// 报表管理-油耗统计-获取有数据的年份
export const OIL_YEARS_LIST = params => {
return request(params, '/trialdrive/oilstatistics/years')
}
// 报表管理-油耗统计-导出excel
export const OIL_STATISTICS_EXPORT = '/trialdrive/oilstatistics/export'
// 报表管理-驾驶详情-获取列表
export const DRIVE_DETAIL_SEARCH = params => {
return request(params, '/trialdrive/trialdrivereport/detailsearch')
}
// 报表管理-驾驶详情-导出excel
export const DRIVE_STATISTICS_EXPORT = '/trialdrive/trialdrivereport/detailExport'
// 报表管理-里程统计-里程详情-根据车架号获取绑定过的设备
export const MILEAGE_GETSN = params => {
return request(params, '/trialdrive/mileagestatistics/getsnbyvin')
}
// 报表管理-里程统计-里程详情-获取列表
export const MILEAGE_GETDAILYSEARCH = params => {
return request(params, '/trialdrive/mileagestatistics/dailysearch')
}
// 报表管理-里程统计-里程详情-导出excel
export const MILEAGE_STATISTICS_EXPORT = '/trialdrive/mileagestatistics/dailyexport'
// 报表管理-设备激活-获取列表
export const GET_DEVICEACTIVE_SEARCH = params => {
return request(params, '/trialdrive/deviceactive/search')
}
// 报表管理-设备激活-导出excel
export const GET_DEVICEACTIVE_EXPORT = params => {
return request(params, '/trialdrive/deviceactive/export')
}
// 报表管理-最后定位报表-获取列表
export const GET_FINALPOSITIONING_SEARCH = params => {
return request(params, '/trialdrive/finalpositioning/search')
}
// 报表管理-最后定位报表-导出excel
export const GET_FINALPOSITIONING_EXPORT = params => {
return request(params, '/trialdrive/finalpositioning/export')
}
// 报表管理-里程统计(通用)-查询列表
export const GET_JOURNEYS_SEARCH = params => {
return request(params, '/trialdrive/journeys/search')
}
// 报表管理-里程统计(通用)-导出excel
export const GET_JOURNEYS_EXPORT = params => {
return request(params, '/trialdrive/journeys/export')
}
// 报表管理-里程统计(通用)-查询详情
export const GET_JOURNEYS_SEARCHDETAIL = params => {
return request(params, '/trialdrive/journeys/searchdetail')
}
// 报表管理-里程统计(通用)-详情-导出excel
export const GET_JOURNEYS_EXPORTDETAIL = params => {
return request(params, '/trialdrive/journeys/exportdetail')
}
// 报表管理-里程统计(通用)-日里程-导出excel
export const GET_JOURNEYS_DAILYEXPORT = params => {
return request(params, '/trialdrive/journeys/dailyExport')
}
// 报表管理-里程统计(通用)-里程日历
export const GET_JOURNEYS_DAILYMILEAGE = params => {
return request(params, '/trialdrive/journeys/dailyMileage')
}
// 报表管理-假性离线报警-获取列表
export const GET_FAKEOFFLINE_LIST = params => {
return request(params, '/trialdrive/fakeoffline/search')
}
// 报表管理-假性离线报警-导出excel
export const GET_FAKEOFFLINE_EXPORT = params => {
return request(params, '/trialdrive/fakeoffline/export')
}
// 报表管理-假性离线报警-下载模板
//export const GET_FAKEOFFLINE_TEMPLATEFILES = BASEURL + "/trialdrive/fakeoffline/downloadtemplate";
export const GET_FAKEOFFLINE_TEMPLATEFILES = params => {
return request(params, '/trialdrive/fakeoffline/downloadtemplate')
}
// 报表管理-假性离线报警-导入excel
export const IMPORT_FAKEOFFLINE_FILES = BASEURL + '/trialdrive/fakeoffline/import'
// 报表管理-电量统计列表-获取列表
export const GET_BATTERY_LIST = params => {
return request(params, '/alarmcenternew/battery/search')
}
// 报表管理-电量统计列表-导出excel
export const EXPORT_BATTERY_LIST = params => {
return request(params, '/alarmcenternew/battery/export')
}
// 报表管理-运营报表统计-获取设备维度列表
export const GET_OPEREPORT_DEVICE_SEARCH = params => {
return request(params, '/trialdrive/opereport/device/search')
}
// 报表管理-运营报表统计-设备维度列表-导出excel
export const GET_OPEREPORT_DEVICE_EXPORT = params => {
return request(params, '/trialdrive/opereport/device/export')
}
// 报表管理-运营报表统计-获取车辆维度列表
export const GET_OPEREPORT_VEHICLE_SEARCH = params => {
return request(params, '/trialdrive/opereport/vehicle/search')
}
// 报表管理-运营报表统计-获取车辆维度列表
export const GET_OPEREPORT_VEHICLE_EXPORT = params => {
return request(params, '/trialdrive/opereport/vehicle/export')
}
// 报表管理-运营报表统计-信息解析之SN导入模板下载
export const GET_SN_TEMPLATEFILE = "https://img01.glsx.com.cn/weapp/resource/e-shield/信息解析之SN导入模板.xls";
// 报表管理-运营报表统计-信息解析之车架号导入模板 下载
export const GET_VIN_TEMPLATEFILE = "https://img01.glsx.com.cn/weapp/resource/e-shield/信息解析之车架号导入模板.xls";
// 报表管理-运营报表统计-信息解析之工单号导入模板 下载
export const GET_WORKORDER_TEMPLATEFILE = "https://img01.glsx.com.cn/weapp/resource/e-shield/信息解析之工单号导入模板.xls";
// 报表管理-运营报表统计-信息解析导入模板
export const IMPORT_OPEREPORT_EXCEL_INFO = BASEURL + '/trialdrive/opereport/import'
export { getList, getYears, getOutStoreList }
import HTTP from '@/utils/http'
const axiosHttp = new HTTP()
function request (data = {} , url, method = 'GET') {
return new Promise((resolve, reject) => {
var reqMethod = method.toLocaleLowerCase() === 'get' ? 'axiosGet' : 'axiosPost'
axiosHttp[reqMethod]({
url: url,
data: data,
success(data) {
resolve(data)
},
error(error) {
reject(error)
}
})
})
}
export default request
import MD5 from 'js-md5'
const sign = (params, noSignAttr = []) => {
delete params.sign
const secret = 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const keys = Object.keys(params).sort()
var str = []
// for (const key in params) {
// if (typeof params[key] === 'object') params[key] = JSON.stringify(params[key])
// }
var obj = null
for (const key in params) {
obj = params[key]
if (obj === null || obj === undefined) {
obj = ''
} else if (typeof obj === 'object') {
obj = JSON.stringify(obj)
}
params[key] = obj
}
keys.forEach(e => {
!noSignAttr.includes(e) && str.push(e + params[e])
})
params.sign = MD5(secret + str.join('') + secret)
return params
}
export default sign
import { SPECIALSHOP_API } from '@/config/config'
import request from '@/services/request'
// 获取特约店列表
function getList (params) {
const url = SPECIALSHOP_API.SHOP_SEARCH
return request(params, url)
}
function getFenceDetailById (params) {
const url = SPECIALSHOP_API.GET_FENCE_DETAIL
return request(params, url)
}
function saveFence (params) {
const url = SPECIALSHOP_API.SAVE_FENCE
return request(params, url, 'post')
}
function updateFence (params) {
const url = SPECIALSHOP_API.UPDATE_FENCE
return request(params, url, 'post')
}
function deleteSpecialShop (params) {
const url = SPECIALSHOP_API.DELETE_SPECIAL_SHOP
return request(params, url, 'get')
}
export { getList, getFenceDetailById, saveFence, updateFence, deleteSpecialShop }
import { TEST_DRIVE_API } from '@/config/config'
import request from '@/services/request'
// 获取试驾围栏审核列表
function getList (params) {
const url = TEST_DRIVE_API.TEST_DRIVE_SEARCH
return request(params, url)
}
function updateFenceApproval (params) {
const url = TEST_DRIVE_API.UPDATE_FENCE_APPROVAL
return request(params, url, 'post')
}
export { getList, updateFenceApproval }
import { VEHICLE_API } from '@/config/config'
import request from '@/services/request'
// 获取车辆列表
function getList(params) {
const url = VEHICLE_API.VEHICLE_SEARCH
return request(params, url)
}
/*特约店列表*/
function getSpecialShopList(params) {
const url = VEHICLE_API.SPECIAL_SHOP_LIST
return request(params, url)
}
// 新增车辆
function addVehicle(params) {
const url = VEHICLE_API.VEHICLE_ADD
return request(params, url, 'post')
}
// 编辑车辆
function editVehicle(params) {
const url = VEHICLE_API.VEHICLE_EDIT
return request(params, url, 'post')
}
// 解绑车辆
function infoVehicle(params) {
const url = VEHICLE_API.VEHICLE_INFO
return request(params, url)
}
// 批量删除车辆
function deleteVehicle(params) {
const url = VEHICLE_API.VEHICLE_DELETE
return request(params, url)
}
// 解绑车辆
function unbindVehicle(params) {
const url = VEHICLE_API.VEHICLE_UNBIND
return request(params, url)
}
// 下载模板
function downloadtemplate(params) {
const url = VEHICLE_API.DOWNLOAD_TEMPLATE
return request(params, url)
}
// 导入车辆
function importVehicle(params) {
const url = VEHICLE_API.VEHICLE_IMPORT
return request(params, url, 'post')
}
// 导出车辆
function exportVehicle(params) {
const url = VEHICLE_API.VEHICLE_EXPORT
return request(params, url)
}
// 获取车型数据
function GETVEHICLETREE(params) {
const url = VEHICLE_API.VEHICLE_TREE
return request(params, url)
}
function getVehicleList(params) {
return request(params, '/trialdrive/vehicle/vehicleinfo/search')
}
function checkSn(params) {
return request(params, '/trialdrive/vehicle/vehicleinfo/getclassifynamebysn')
}
function verifydevice(params) {
return request(params, '/trialdrive/vehicle/vehicleinfo/verifydevice')
}
function addNewVehicle(params) {
return request(params, '/trialdrive/vehicle/vehicleinfo/save', 'post')
}
function updateNewVehicle(params) {
return request(params, '/trialdrive/vehicle/vehicleinfo/update', 'post')
}
function getVehicleInfo(params) {
return request(params, '/trialdrive/vehicle/vehicleinfo/findone')
}
function deleteNewVehicle(params) {
return request(params, '/trialdrive/vehicle/vehicleinfo/delete')
}
function adjFreq(params) {
return request(params, '/trialdrive/vehicle/adjFreq', 'post')
}
function listtestdrive(params) {
return request(params, '/trialdrive/vehicle/drivevehicle/listtestdrive')
}
function addtestdrive(params) {
return request(params, '/trialdrive/vehicle/drivevehicle/addtestdrive', 'post')
}
function getAdjFreqInfo(params) {
return request(params, '/trialdrive/vehicle/getadjfreqinfo')
}
// 获取生效调频记录详情
function GET_FREQ_DETAILS(params) {
return request(params, '/trialdrive/vehicle/effectFreqInfo')
}
// 关闭调频
function REST_FREQ_INFO(params) {
return request({}, '/trialdrive/vehicle/resetAdjFreq?sn=' + params.sn, 'post')
}
//【仲利】批量修改车辆组织层级归属
function batchUpdate(params) {
return request(params, '/trialdrive/vehicle/org/batchUpdate', 'post')
}
export { getList, getSpecialShopList, addVehicle, downloadtemplate, editVehicle, deleteVehicle, unbindVehicle, importVehicle, exportVehicle, infoVehicle, GETVEHICLETREE, getVehicleList, checkSn, verifydevice, addNewVehicle, getVehicleInfo, adjFreq, listtestdrive, addtestdrive, deleteNewVehicle, updateNewVehicle, getAdjFreqInfo, GET_FREQ_DETAILS, REST_FREQ_INFO, batchUpdate }
import { VEHICLEDOC_API } from '@/config/config'
import request from '@/services/request'
// 上牌资料提交列表
function getDocList (params) {
const url = VEHICLEDOC_API.DOC_SEARCH
return request(params, url)
}
// 上牌资料审核列表
function getCheckList (params) {
const url = VEHICLEDOC_API.CHENCK_SEARCH
return request(params, url)
}
// 查询车辆上牌资料
function findVehDoc (params) {
const url = VEHICLEDOC_API.DOC_BY_CONDITION
return request(params, url)
}
// 保存或者更新上牌资料
function saveDoc (params) {
const url = VEHICLEDOC_API.SAVE_DOC
return request(params, url, 'post')
}
// 修改审批的流程
function updateApproval (params) {
const url = VEHICLEDOC_API.UPDATE_APPROVAL
return request(params, url, 'post')
}
export { getDocList, getCheckList, findVehDoc, saveDoc, updateApproval }
import Vue from 'vue';
import Vuex from 'vuex';
import state from './state';
import mutations from './mutations';
Vue.use(Vuex);
const store = new Vuex.Store({
state,
mutations
})
export default store;
\ No newline at end of file
export default {
//更新全局baseURL
updateBaseURL(state, newBaseURL) {
state.baseURL = newBaseURL;
},
// 更新车型库
updateVehicleList(state, data) {
state.vehicleList = data;
}
}
const state = {
baseURL: '',
token: '', // 令牌
loginStatus: false, // 是否登录
userInfo: {
username: '', // 用户名
phoneNumber: '', // 手机号
tenantId: '', // 租户id
superiorId: '', // 上级id
account: '', // 登录名
email: '',
gender: '',
position: ''
},
vehicleList: [], //车型库数据
}
// try {
// } catch (e) { }
export default state;
\ No newline at end of file
.base_box {
margin: 0 0 30px 0;
padding-bottom: 30px;
border-bottom: 1px #dadada solid;
.title {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
color: #333;
display: flex;
.sub_desc {
display: flex;
flex-direction: column;
font-size: 14px;
font-weight: normal;
color: #666;
margin-left: 30px;
span {
margin-bottom: 10px;
}
}
}
.cell_list {
display: flex;
flex-wrap: wrap;
.cell {
flex: 0 0 50%;
display: flex;
padding: 4px 0;
font-size: 14px;
color: #666;
margin-bottom: 15px;
.name {
width: 130px;
flex-shrink: 0;
display: flex;
align-items: center;
color: #333;
justify-content: flex-end;
}
.txt {
flex: 1;
display: flex;
align-items: center;
color: #666;
.btn {
margin-left: 10px;
}
}
}
}
}
.base_box:last-child{
border: none;
}
.filter_date_box {
margin: 10px 0;
display: flex;
align-items: center;
.el_date_picker {
width: 120px;
margin-right: 10px;
}
.el_checkbox {
margin-left: 10px;
}
}
.calendar_box{
.date{
width: 100%;
height: 100%;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
.alarm-box{
background: #ff4949;
color: #fff;
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
margin-top: 10px;
text-align: center;
}
}
}
.alarm-wrap{
margin-top: 20px;
.alarm-main{
h3{
font-size: 18px;
i{
margin-right: 5px;
}
}
p{
padding-left: 22px;
}
label{
display: inline-block;
// width: 88px;
// text-align: right;
}
}
.alarm-box{
width: 400px;
border: 1px solid #ececec;
background-color: #f9f9f9;
padding: 0 20px;
.alarm-item{
display: flex;
label{
flex: 2;
}
span{
flex: 5
}
}
label{
display: inline-block;
width: 105px;
text-align: right;
padding: 0;
}
.user_class{
padding-right: 10px;
}
.cmd-row{
text-align: right;
}
}
}
\ No newline at end of file
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.m-l-md {
margin-left: 20px;
}
.m-b-md {
margin-bottom: 20px;
}
.inline-b {
display: inline-block;
}
.table-btn {
margin-bottom: 20px;
}
.searchTop {
margin-bottom: 30px;
}
.border-shadow {
border: 1px solid rgb(235, 235, 235);
border-image: initial;
border-radius: 3px;
transition: all 0.2s ease 0s;
}
.border-shadow:hover {
box-shadow: rgba(232, 237, 250, 0.6) 0px 0px 8px 0px,
rgba(232, 237, 250, 0.5) 0px 2px 4px 0px;
}
.system-container {
// padding: 0 0 0 10px;
// margin: 20px 24px;
background-color: #ffffff;
overflow: hidden;
.user-tree {
margin-top: 20px;
padding: 10px;
// float: left;
display: inline-block;
width: 200px;
overflow-x: auto;
.user-tree-top {
height: 30px;
}
}
.container {
// padding: 20px 10px 0px 20px;
width: 100%;
}
.user-container {
padding: 20px 10px 0px 20px;
// float: left;
display: inline-block;
vertical-align: top;
width: calc(100% - 200px);
}
}
.el-tree {
margin-top: 20px;
}
// 状态
.dot {
display: inline-block;
width: 7px;
height: 7px;
border-radius: 5px;
vertical-align: middle;
margin-right: 2px;
}
.green-text {
color: #00A854;
}
.red-text {
color: rgb(255, 0, 0);
}
.green {
background-color: #00A854;
}
.gray {
background-color: #BFBFBF;
}
.blue {
background-color: rgb(0, 81, 255);
}
.red {
background-color: rgb(255, 0, 0);
}
.yellow {
background-color: rgb(217, 255, 0);
}
.orange {
background-color: rgb(255, 145, 0);
}
.statusText {
vertical-align: middle;
}
// 导入样式
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 96px;
height: 36px;
cursor: pointer;
font-size: 0;
}
// .el-button.is-plain:focus,
// .el-button.is-plain:hover {
// background: none;
// border: 0px;
// }
// 搜索框
.search_box {
.a_input {
width: 240px;
}
.input_number_list {
.a_input_number {
width: 80px;
}
.sp {
padding: 0 10px;
}
}
.small_select {
width: 140px;
}
}
.pre_select_box {
display: flex;
align-items: center;
}
.sort_select {
width: 100px;
}
.long_select {
width: 260px;
}
.long_input {
width: 240px;
}
.small_select {
width: 120px;
}
.data_picker {
width: 240px;
}
.mr5 {
margin-right: 5px;
}
.page_title {
position: relative;
.title_tip_icon {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
font-size: 16px;
color: #999;
}
}
.popover_box {
.h3 {
font-size: 14px;
color: #666;
}
p {
font-size: 12px;
color: #999;
}
}
// 页面公共标题
.page_head_title {
.h2,
.h3 {
margin: 0;
padding: 0;
line-height: 1.8;
}
.h2 {
font-size: 18px;
}
.h3 {
font-weight: normal;
font-size: 14px;
color: #999;
}
}
\ No newline at end of file
.page_title {
margin-bottom: 30px;
.h2,
.h3 {
font-weight: normal;
margin: 0;
padding: 0;
line-height: 2;
}
.h2 {
position: relative;
font-size: 18px;
font-weight: bold;
color: #666;
}
.h3 {
font-size: 14px;
color: #999;
}
}
.pre_select_box{
display:flex;
align-items: center;
}
.sort_select {
width: 100px;
}
.long_select{
width:260px;
}
.super_long_input{
width:300px;
}
.long_input{
width:240px;
}
.small_select {
width: 120px;
}
.default_select {
width: 130px;
}
.data_picker {
width: 240px;
}
.alone_data_picker{
width: 150px;
}
.datatime_picker{
width: 360px;
}
.sort_picker{
width:190px;
}
.mr5{
margin-right:5px;
}
.table_box {
margin: 10px 0;
}
.el_link {
margin: 0 4px;
}
.upload_box {
.input_box {
display: flex;
align-items: center;
.a_input {
margin-right: 10px;
width: 320px;
}
}
.tips {
font-size: 12px;
color: #999;
line-height: 2;
}
}
.dialog_links {
display: flex;
align-items: center;
justify-content: space-between;
}
.upload_result {
display: flex;
justify-content: center;
.cell {
position: relative;
width: 200px;
display: flex;
flex-direction: column;
text-align: center;
span {
line-height: 2;
}
.num {
font-size: 18px;
font-weight: bold;
color: #666;
}
.cred {
color: #f00;
}
}
.cell:after {
display: block;
content: "";
width: 1px;
background: #d8d8d8;
position: absolute;
top: 50%;
right: 0;
height: 70%;
transform: translateY(-50%);
opacity: 0.8;
}
.cell:last-child:after {
display: none;
}
}
@import './common.scss';
@import './reset.scss';
body {
overflow: hidden;
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
html {
height: 100%;
box-sizing: border-box;
}
#app {
height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
hr {
height: 1px;
border: 0px;
background-color: #e7eaec
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
outline: none;
text-decoration: none;
}
div:focus {
outline: none;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
.clearfix {
zoom: 1;
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
//main-container全局样式
.app-main {
overflow: auto;
}
.app-container {
padding: 20px;
}
\ No newline at end of file
.title_tips {
font-size: 14px;
}
.links_group {
display: flex;
align-items: center;
justify-content: space-between;
.pull-right {
margin-left: 10px;
}
}
.search_box {
.a_input {
width: 320px;
}
}
.upload_box {
.input_box {
display: flex;
align-items: center;
.a_input {
margin-right: 10px;
width: 320px;
}
}
.tips {
font-size: 12px;
color: #999;
line-height: 2;
}
}
.dialog_links {
display: flex;
align-items: center;
justify-content: space-between;
}
.upload_result {
display: flex;
justify-content: center;
.cell {
position: relative;
//width: 200px;
flex:1;
display: flex;
flex-direction: column;
text-align: center;
span {
line-height: 2;
}
.num {
font-size: 18px;
font-weight: bold;
color: #666;
}
.cred {
color: #f00;
}
}
.cell:after {
display: block;
content: "";
width: 1px;
background: #d8d8d8;
position: absolute;
top: 50%;
right: 0;
height: 70%;
transform: translateY(-50%);
opacity: 0.8;
}
.cell:last-child:after {
display: none;
}
}
\ No newline at end of file
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
background-color: #409EFF;
color: #ffffff;
}
.el-radio-group {
line-height: 32px;
vertical-align: text-top;
}
.el-select {
width: 100%;
}
\ No newline at end of file
import actions from '@/core/actions';
import Vue from 'vue';
import { Message } from 'element-ui';
import { debounce } from 'utils/tools';
const error = debounce((msg, getToken) => {
if (window.__POWERED_BY_QIANKUN__) {
let stateRes = {
errorMsg: msg,
showLoading: false
};
if (getToken === 'removeToken') {
stateRes.token = getToken;
localStorage.removeItem('token');
}
actions.setGlobalState(stateRes);
} else {
if (msg) {
Message({
message: msg,
type: 'error'
});
}
}
}, 1000, true);
const showLoading = (status) => {
if (window.__POWERED_BY_QIANKUN__) {
actions.setGlobalState({
token: localStorage.getItem('token') || '',
errorMsg: '',
showLoading: status
})
}
}
const checkStatus = (status, msg) => {
switch (status) {
case 400:
error(`Bad Request 错误的请求`);
break;
case 401:
error('用户没有权限(令牌、用户名、密码错误)!');
break;
case 403:
error('用户得到授权,但是访问是被禁止的。!');
break;
// 404请求不存在
case 404:
error('网络请求错误,未找到该资源!');
break;
case 405:
error('网络请求错误,请求方法未允许!');
break;
case 408:
error('网络请求超时!');
break;
case 500:
error(`${msg || '服务器错误,请联系管理员!'}`);
break;
case 501:
error('网络未实现!');
break;
case 502:
error('网络错误!');
break;
case 503:
error('服务不可用,服务器暂时过载或维护!');
break;
case 504:
error('网络超时!');
break;
case 505:
error(`${msg || 'http版本不支持该请求!'}`);
break;
case 603:
error('尚未登录或登录已过期,请重新登录', 'removeToken');
localStorage.removeItem('token');
localStorage.removeItem('userInfo');
localStorage.removeItem('breadcrumb');
//store.dispatch('app/setToken', '');
setTimeout(() => {
window.location.reload();
}, 10)
break;
case 505:
error('http版本不支持该请求!');
break;
case 'fail':
error('网络连接错误');
break;
case 'custom':
error(`${msg}`);
break;
default:
}
}
export {
checkStatus,
showLoading
}
\ No newline at end of file
import axios from 'axios'
export const Common = {
// 提示框
confirmDialog: (tipData) => {
tipData.that.$confirm(tipData.tipText, tipData.tipTitle, {
confirmButtonText: tipData.confirmButtonText || '确定',
cancelButtonText: tipData.cancelButtonText || '取消',
type: tipData.type,
showCancelButton: tipData.showCancelButton
}).then(() => {
tipData.callBack ? tipData.callBack() : ''
}).catch(() => {
tipData.errorCallBack ? tipData.errorCallBack() : ''
})
},
/**
* 导出excel
* */
exportExcel: function (options) {
if (!options) {
return false
}
console.log(options.data)
axios({
method: options.method || 'POST',
url: options.url,
params: options.data,
responseType: 'blob',
headers: {
Authorization: localStorage.getItem('token') || ''
}
}).then(response => {
if (!response) {
return
}
let url = window.URL.createObjectURL(new Blob([response.data], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
}))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', options.fileName || 'excel.xlsx')
document.body.appendChild(link)
link.click()
if (options.success) {
(options.success)()
}
}).catch((error) => {
if (options.fail) {
(options.fail)(error)
}
})
},
/**
* 正整数
* */
checkRegExpNumber(rule, value, callback) {
var rxp = /^\+?[1-9][0-9]*$/
if (!rule.required) {
if (!value) {
callback()
}else if (!rxp.test(value)) {
return callback(new Error('只支持正整数'))
}
}
if (!value) {
return callback(new Error('请输入正整数'))
}else {
callback()
}
},
/**
* 手机号
* */
checkRegExpPhoneTel(rule, value, callback) {
var rxpPhone = /^1[3456789]\d{9}$/
var rxpTel = /^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/
if (!rule.required) {
if (!value) {
callback()
}else if (!rxpPhone.test(value)) {
return callback(new Error('请输入正确的手机号码'))
}
}
if (!value) {
return callback(new Error('请输入手机号码或固话'))
}else if (!rxpPhone.test(value) && !rxpTel.test(value)) {
return callback(new Error('请输入正确的手机号码或固话'))
}else {
callback()
}
},
/**
* 中文英文数字下划线括号
*/
checkName(rule, value, callback) {
var rxp = /^[\u4e00-\u9fa5_a-zA-Z0-9.\\()\\()]+$/
if (!rule.required) {
if (!value) {
callback()
}else if (!rxp.test(value)) {
return callback(new Error('请输入中文英文数字下划线或括号'))
}
}
if (!value) {
return callback(new Error('请输入'))
}else {
callback()
}
},
/**
* 车架号的验证
*/
checkvin(rule, value, callback) {
let reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{17}$/
if (!reg.test(value)) {
callback(new Error('车架号必须是17位数字+字母组合'))
} else callback()
},
/**
* 设备号的验证
*/
checksn(rule, value, callback) {
let reg = /[0-9]{8,15}/g
if (value && !reg.test(value)) {
callback(new Error('设备号必须是8-15位数字'))
} else callback()
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!