Commit 055abaef by 冒粤蓉

init

0 parents
Showing 219 changed files with 3517 additions and 0 deletions
{
"presets": [
[
"env",
{ "modules": false }
],
"stage-3"
],
"plugins": [
"syntax-dynamic-import",
"babel-plugin-transform-regenerator",
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
.DS_Store
node_modules/
build/
npm-debug.log
yarn-error.log
.svn
# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
基于vue和element-ui开发的项目
----
安装
----
```bash
npm install
```
开发
----
```bash
npm run dev
```
生产
----
``` bash
npm run build
```
配置说明
----
**跨域调用api**
配置webpack.config.js
```javascript
devServer: {
port: 3003,
proxy: {
'/ots': {
target: 'http://localhost:8088'
}
}
}
```
这样,我们运行项目端口在3003,但如果请求接口包含 */ots* 都会指向端口8088。
**报错处理**
---
```bash
Error: listen EADDRINUSE 127.0.0.1:3003
```
有时候运行npm run dev 会报错,这种情况是因为端口被占用,并不是代码错误,解决办法就是换个端口,或者终止被暂用端口。
\ No newline at end of file
module.exports = function (data) {
// console.log(data.sprites);
const shared = `.icon {display: inline-block;background-image: url(I);background-size: Wpx Hpx; vertical-align: middle;}`
.replace('I', data.sprites[0].image)
.replace('W', data.sprites[0].total_width)
.replace('H', data.sprites[0].total_height);
const perSprite = data.sprites.map(function (sprite) {
let style = `.icon-N { width: Wpx; height: Hpx; background-position: Xpx Ypx; }`
if(/\-active$/g.test(sprite.name)){
style = `.icon-A.active { width: Wpx; height: Hpx; background-position: Xpx Ypx; }
.icon-A:active { width: Wpx; height: Hpx; background-position: Xpx Ypx; }
.icon-A:hover { background-position: Xpx Ypx; }`
}
return style
.replace(/N/g, sprite.name)
.replace(/A/g, sprite.name.replace(/\-active$/g, ''))
.replace(/W/g, sprite.width)
.replace(/H/g, sprite.height)
.replace(/X/g, sprite.offset_x)
.replace(/Y/g, sprite.offset_y);
}).join('\n');
return shared + '\n' + perSprite;
};
\ No newline at end of file
var path = require('path')
var webpack = require('webpack')
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin')
const SpritesmithPlugin = require('webpack-spritesmith');
const templateFunction = require('./sprite')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
//localhost:10500
const IS_DEV_MODE = process.env.NODE_ENV !== 'production'
const getPublicPath = IS_DEV_MODE ? '' : '/ots/vue/build/';
module.exports = {
mode: IS_DEV_MODE ? 'development':'production',
entry: [path.resolve(__dirname, '../src/main.js')/*, 'webpack-hot-middleware/client?reload=true'*/],
output: {
path: IS_DEV_MODE ? path.resolve(__dirname, '../dist/'):path.resolve(__dirname, '../build/'),
publicPath: getPublicPath,
chunkFilename: IS_DEV_MODE ?'js/[name].bundle.js':'js/[name].[hash].bundle.js',
filename: IS_DEV_MODE ?'js/[name].bundle.js':'js/[name].[hash].bundle.js',
// 微应用的包名,这里与主应用中注册的微应用名称一致
library: `oEshield-[name]`,
// 将你的 library 暴露为所有的模块定义下都可运行的方式
libraryTarget: 'umd',
// 按需加载相关
jsonpFunction: `webpackJsonp_oEshield`
},
externals: {
vue: 'Vue',
'element-ui': 'ElementUI'
},
module: {
rules: [
{
test: /\.styl$/,
use: [
'style-loader',
'css-loader',
'stylus-loader'
],
},
{
test: /\.s?[ac]ss$/,
use: [
IS_DEV_MODE ? 'style-loader' : MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {sourceMap: true}
},
{
loader: 'postcss-loader',
options: {sourceMap: true}
},
{
loader: 'sass-loader',
options: {sourceMap: true}
}
],
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
// Since sass-loader (weirdly) has SCSS as its default parse mode, we map
// the "scss" and "sass" values for the lang attribute to the right configs here.
// other preprocessors should work out of the box, no loader config like this necessary.
'scss': [
'vue-style-loader',
'css-loader',
'sass-loader'
],
'sass': [
'vue-style-loader',
'css-loader',
'sass-loader?indentedSyntax'
]
}
// other vue-loader options go here
}
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: 'images/[name].[ext]?[hash]'
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
publicPath: '../',
name: 'fonts/[name].[hash:7].[ext]'
}
}
]
},
optimization: {
//minimize: true,
minimizer: [
new UglifyJsPlugin({
cache: true,
parallel: true,
sourceMap: true // set to true if you want JS source maps
}),
new OptimizeCSSAssetsPlugin({})
],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
/*new SpritesmithPlugin({
src: {
cwd: path.resolve(__dirname, 'src/assets/ico'),
glob: '*.png'
},
target: {
image: path.resolve(__dirname, 'src/assets/spritesmith-generated/sprite.png'),
css: path.resolve(__dirname, 'src/assets/spritesmith-generated/sprite.styl')
},
apiOptions: {
cssImageRef: "~sprite.png"
}
}),*/
new SpritesmithPlugin({
src: {
cwd: path.resolve(__dirname, '../src/assets/ico'),
glob: '*.png'
},
target: {
image: path.resolve(__dirname, '../src/assets/spritesmith-generated/sprite.png'),
css: [
[path.resolve(__dirname, '../src/assets/spritesmith-generated/sprite.css'), {
format: 'function_based_template'
}]
]
},
customTemplates: {
'function_based_template': templateFunction,
},
apiOptions: {
cssImageRef: "~sprite.png"
}
}),
new MiniCssExtractPlugin({
filename: IS_DEV_MODE ?'css/[name].min.css':'css/[name].[hash].min.css',
chunkFilename: IS_DEV_MODE ?'css/[name].min.css':'css/[name].[hash].min.css',
}),
//new BundleAnalyzerPlugin()
],
resolve: {
modules: ["node_modules", "spritesmith-generated"],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'components': path.resolve(__dirname, '../src/components'),
'utils': path.resolve(__dirname, '../src/utils'),
'pages': path.resolve(__dirname, '../src/pages'),
'scss': path.resolve(__dirname, '../src/assets/SCSS'),
'images': path.resolve(__dirname, '../src/assets/images'),
'./patterns': path.resolve(__dirname, '../src/assets/images'),
},
extensions: ['*', '.js', '.vue', '.json']
},
devServer: {
historyApiFallback: true,
/*hot: true,*/
inline: true,
noInfo: true,
overlay: true,
port: 10500,
// 关闭主机检查,使微应用可以被 fetch
disableHostCheck: true,
// 配置跨域请求头,解决开发环境的跨域问题
headers: {
'Access-Control-Allow-Origin': '*'
},
contentBase: 'dist/',
proxy: {
'/ots': {
changeOrigin: true,
target: 'http://e-shield.glsx.net'//'http://e-shield.glsx.net'//'http://192.168.1.158:8088'//'http://e-shield.didihu.com.cn'//'http://192.168.1.53:8088'//'http://localhost:8088'//'http://tiger-sso.didihu.com.cn'// http://vjg7.branch.glsx.com.cn/
}
}
},
performance: {
hints: false
},
devtool: IS_DEV_MODE?'#eval-source-map':'#source-map'
}
if(IS_DEV_MODE){
module.exports.plugins = (module.exports.plugins || []).concat([
//new HardSourceWebpackPlugin(),
new CleanWebpackPlugin(['dist/js','dist/css','dist/images', 'dist/fonts'], {
verbose: true,
dry: false,
root: path.resolve(__dirname, '../')
})
]);
}else{
module.exports.plugins = (module.exports.plugins || []).concat([
new CleanWebpackPlugin(['build/js','build/css','build/images', 'build/fonts'], {
verbose: true,
dry: false,
root: path.resolve(__dirname, '../')
})
]);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>v-simple</title>
</head>
<body>
<div id="glsx-sub-system"></div>
<script src="lib/pace.min.js"></script>
<script src="lib/vue.min.js"></script>
<script src="lib/element-ui.js"></script>
<script src="lib/moment.min.js"></script>
<script src="js/main.bundle.js"></script>
<!-- <script src="js/runtime.bundle.js"></script> -->
</body>
</html>
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{
"name": "vue-ots",
"description": "A Vue.js project",
"version": "1.0.0",
"author": "janetwume@gmail.com",
"license": "MIT",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot --config config/webpack.config.js",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules --config config/webpack.config.js"
},
"dependencies": {
"animate.css": "^3.7.0",
"axios": "^0.18.0",
"calendar-months": "^1.0.1",
"chart.js": "^2.7.2",
"clipboard": "^2.0.4",
"downloadjs": "^1.4.7",
"element-ui": "^2.13.2",
"es6-promise": "^4.2.4",
"font-awesome": "^4.7.0",
"moment": "^2.22.0",
"qs": "^6.5.1",
"vue": "^2.5.11",
"vue-infinite-loading": "^2.3.1",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"xlsx": "^0.14.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"devDependencies": {
"autoprefixer": "^9.1.5",
"babel-core": "^6.26.0",
"browserslist": "^4.16.6",
"caniuse-lite": "^1.0.30001228",
"clean-webpack-plugin": "^0.1.19",
"cross-env": "^5.0.5",
"css-loader": "^0.28.7",
"expose-loader": "^0.7.5",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.4",
"hard-source-webpack-plugin": "^0.6.4",
"http-proxy-middleware": "^0.18.0",
"mini-css-extract-plugin": "^0.4.0",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^4.0.0",
"postcss-loader": "^3.0.0",
"sass-loader": "^6.0.6",
"style-loader": "^0.21.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"uglifyjs-webpack-plugin": "^1.2.5",
"url-loader": "^1.0.1",
"vue-loader": "^14.2.2",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack": "^4.6.0",
"webpack-bundle-analyzer": "^2.11.1",
"webpack-cli": "^2.0.14",
"webpack-dev-middleware": "^3.1.2",
"webpack-dev-server": "^3.1.3",
"webpack-hot-middleware": "^2.21.2",
"webpack-spritesmith": "^0.4.1"
}
}
module.exports = {
plugins: [
require('autoprefixer')({browsers: ['> 1%', 'last 3 versions', 'Firefox >= 20', 'iOS >=7'] })
]
}
\ No newline at end of file
<template>
<div id="glsx-sub-system" :class="isFullsize?'full-size':''">
<div id="wrap" class="wrap" :class="isCollapse?'full-width':''">
<!-- 主体 -->
<main>
<!-- <el-row class="topbar">
<el-button type="primary" size="small" @click="toggle" class="toggle-btn"><i class="fa fa-bars"></i></el-button>
<img :src="logo" class="logo">
<a class="pull-right right-link" href="logout">
<i class="fa fa-sign-out"></i> 登 出
</a>
<a class="pull-right right-link" href="javascript(0)" @click.prevent="navigate">
<i class="fa fa-bell-o"></i> 系统公告
</a>
</el-row> -->
<router-view></router-view>
</main>
<!-- 主体 /-->
<!-- 左边导航栏 -->
<!-- <v-side-bar class="sidebar"></v-side-bar> -->
<!-- 左边导航栏 /-->
</div>
</div>
</template>
<script>
import store from './vuex/store.js'
import { mapGetters, mapActions } from 'vuex'
import vSideBar from 'components/SideBar.vue'
export default {
name: 'app',
data() {
return {
logo: require('images/logo.png')
}
},
mounted(){
// store.dispatch('getDeviceResources')
// store.dispatch('getLoginUser').then((res)=>{
// if(store.state.common.username === 'gqgdcx'){
// this.$router.push({path:"business/gqOrder"})
// }
// if(store.state.common.isCheckbook){
// // console.log(this.$route)
// // this.$router.push({path:"accounts/accountsList"})
// }
// })
// window.onresize = ()=>{
// const w = window,
// d = document,
// e = d.documentElement,
// g = d.getElementsByTagName('body')[0],
// x = w.innerWidth || e.clientWidth || g.clientWidth,
// y = w.innerHeight|| e.clientHeight|| g.clientHeight;
// d.getElementsByTagName('main')[0].style['minHeight'] = y+'px'
// }
// window.onresize()
},
computed: {
...mapGetters([
'isCollapse',
'isFullsize'
])
},
methods: {
toggle(){
this.toggleCollapse()
},
...mapActions([
'toggleCollapse'
]),
navigate(){
let routeData = this.$router.resolve({
path: '/notice',
query: {
}
});
window.open(routeData.href, '_blank');
}
},
components: {
vSideBar
},
store
}
</script>
<style scoped>
.topbar {
min-height: 50px;
padding: 15px 10px;
}
.toggle-btn, .logo{
vertical-align: middle;
}
.logo{
margin-left: 10px;
}
a.right-link{
color: #999;
font-size: 14px;
margin-right: 20px;
line-height: 30px;
text-decoration: none;
}
.full-size main{
margin: 0;
}
.full-size .sidebar, .full-size .topbar{
display: none;
}
</style>
import axios from 'axios'
import qs from 'qs'
import { Message } from "element-ui";
import {CONSTANT} from '../constant'
import store from '../vuex/store'
axios.interceptors.request.use(config => {
//NProgress.start()
return config
}, error => {
return Promise.reject(error)
})
axios.interceptors.response.use(response => response, error => Promise.resolve(error.response))
function checkStatus(response) {
if(response){
const { headers, status } = response;
if(headers&&headers.sessionstatus == 'timeout'){
window.location.href = '../ots/login';
return;
}
if (status === 200 || status === 304){
return response.data
}
}
return {
returnCode: -404,
message: response ? response.statusText : '',
data: response ? response.statusText : ''
}
}
function checkCode(res) {
if (('returnCode' in res && res.returnCode != 0) || res.error) {
Message({
message: res.message,
type: 'error'
});
}
return res
}
// 从mock获取基础域名配置
const MOCK_CONFIG_URL = 'https://oss-config.test.glsx.com.cn/mock/60a371eafb9c105681999ab8/microCustomizationService/e-shield-oShield-config';
let baseFlag = true;
const getBaseUrl = () => {
return new Promise((resolve, reject) => {
let BASE_URL = store.getters.baseURL;
if(!BASE_URL && baseFlag) {
baseFlag = false;
axios({
url: MOCK_CONFIG_URL,
method: 'get'
}).then((res) => {
const resData = res.data;
if(resData) {
const resBaseURL = resData.axios.baseURL;
store.commit('SET_BASE_URL', resBaseURL);
baseFlag = !resBaseURL;
resolve(resBaseURL);
} else {
baseFlag = true;
resolve(BASE_URL);
}
}).catch((err) => {
baseFlag = true;
resolve(BASE_URL)
});
} else {
resolve(BASE_URL)
}
})
};
export default {
post(url, data) {
getBaseUrl().then((baseUrl) => {
return axios({
method: 'post',
url: `${baseUrl}/ots/${url}`,
data: typeof data == 'string'?data:qs.stringify(data),
timeout: 30000,
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': typeof data == 'string'?'application/json':'application/x-www-form-urlencoded; charset=UTF-8'
}
}).then(checkStatus).then(checkCode)
}, (err) => {
})
},
get(url, params) {
getBaseUrl().then((baseUrl) => {
return axios({
method: 'get',
url: `${baseUrl}/ots/${url}`,
params,
//timeout: 300000,
headers: {
'X-Requested-With': 'XMLHttpRequest'
},
withCredentials:true
}).then(checkStatus).then(checkCode)
}, (err) => {
})
}
}
\ No newline at end of file
import SERVICES from './services'
import './config'
export const services = SERVICES
\ No newline at end of file
import api from '../config.js'
let head = 'sepacct/'
export default {
// 产品套餐-列表
getPackageList(request = {}) {
return api.get(`${head}package/options`, request)
},
// 订单状态-列表
getStatusList(request = {}) {
return api.get(`${head}orderstatus/options`, request)
},
// 订单列表
getList(request = {}) {
return api.get(`${head}order/list`, request)
},
// 获取订单详情
getOrderInfo(request = {}) {
return api.get(`${head}order/info`, request)
},
// 财务确认汇通打款接口(对账信息)
confirmHT(request = {}) {
return api.post(`${head}order/confirmHT`, request)
},
// 财务确认打款给SP接口(SP分润明细)
confirmSP(request = {}) {
return api.post(`${head}order/confirmSP`, request)
},
// 财务确认退款给汇通接口(对账信息)
refundConfirmHT(request = {}) {
return api.post(`${head}refund/confirmHT`, request)
},
// 财务确认SP退款接口(SP分润明细)
refundConfirmSP(request = {}) {
return api.post(`${head}refund/confirmSP`, request)
}
}
import api from '../config.js'
export default {
getVehicleList (request = {}) {
return api.get('vehicle/getVehicleList', request)
},
getVehicleListTotal (request = {}) {
return api.get('vehicle/getVehicleListTotal', request)
},
getDetailsByTrackId(request = {}) {
return api.get('vehicle/getDetailsByTrackId', request)
},
saveFrequency(request = {}) {
return api.post('vehicle/adjFreq', request)
},
workOrderList(request = {}) {
return api.get('vehicle/workOrderList', request)
},
saveVehicleForm(request = {}) {
return api.post('vehicle/edit', request)
},
/*工单管理*/
getWorkOrderList(request = {}) {
return api.get('workOrder/workOrderList', request)
},
getWorkOrderDetailById(request = {}) {
return api.get('workOrder/detail/'+request.id)
},
saveWorkOrderDraft(request = {}) {
return api.post('workOrder/saveDraft', request)
},
updateWorkOrderDraft(request = {}) {
return api.post('workOrder/updateDraft', request)
},
updateWorkOrder(request = {}) {
return api.post('workOrder/updateWorkOrder', request)
},
saveWorkOrder(request = {}) {
return api.post('workOrder/saveWorkOrder', request)
},
deleteWorkOrder(request = {}) {
return api.get('workOrder/deleteWorkorder', request)
},
dispatchWorkOrder(request = {}) {
return api.get('workOrder/dispatchWorkOrder', request)
},
cancelDispatchWorkOrder(request = {}) {
return api.get('workOrder/cancelDispatch', request)
},
validateDevice(request = {}) {
return api.get('workOrder/validateDevice', request)
},
activeWorkOrder(request = {}) {
return api.get('workOrder/activeWorkOrder', request)
},
saveOrder(request = {}) {
return api.post('workOrder/saveOrder', request)
},
validationOrder(request = {}) {
return api.get('workOrder/validationOrder', request)
},
//工单管理广汽
query(request = {}) {
return api.get('workordmana/query', request)
},
getOrderDetails(request = {}) {
return api.get('workordmana/get', request)
},
findAllPromise(request = {}) {
return api.get('workordmana/findAllPromise', request)
},
insurance(request = {}) {
return api.post('workordmana/insurance', request)
},
returnins(request = {}) {
return api.get('workordmana/returnins', request)
},
print(request = {}) {
return api.get('workordmana/print', request)
},
edit(request = {}) {
return api.post('workordmana/edit', request)
},
currentRoleInsurance(request = {}) {
return api.post('insurance/currentRoleInsurance', request)
},
addPOI(request = {}) {
return api.post('vepoi/add', request)
},
getPOI(request = {}) {
return api.get('vepoi/getVehiclePoi', request)
},
deletePOI(request = {}) {
return api.get('vepoi/del/'+request.id)
},
updatePOI(request = {}) {
return api.post('vepoi/update', request)
},
getAnjVerifyAccountsList(request = {}) {
return api.get('reconciliate/getAnjVerifyAccountsList', request)
},
exportAnjVerifyAccountsList(request = {}) {
return api.get('reconciliate/exportAnjVerifyAccountsList', request)
},
getAnjVerifyAccountsOpts(request = {}) {
return api.get('reconciliate/getDropDownOptions', request)
},
getAdjFreqInfo(request = {}) {
return api.get('vehicle/getAdjFreqInfo', request)
},
exportGqWindReport(request = {}) {
return api.get('report/gqWindReport/exportGqWindReport', request)
},
regenerateGqWindReport(request = {}) {
return api.get('report/gqWindReport/regenerateGqWindReport', request)
},
listGqWindReportPage(request = {}) {
return api.get('report/gqWindReport/listGqWindReportPage', request)
},
}
\ No newline at end of file
import api from '../config.js'
export default {
getLoginUser (request = {}) {
return api.get('common/getLoginUser', request)
},
/*获取用户角色信息*/
getUserRoleInfo() {
return api.get('user/getRoleInfo')
},
/*车辆品牌*/
getAllVehicleBrand (request = {}) {
return api.get('vehicle/getAllVehicleBrand', request)
},
getBrandTypeByBrandId(request = {}) {
return api.get('vehicle/getBrandTypeByBrandId', request)
},
/*车辆分组分类*/
getAllVehicleGroup (request = {}) {
return api.get('vehiclegroup/getAllVehicleGroup', request)
},
getClassListByGroupId (request = {}) {
return api.get('vehicleclass/getClassListByGroupId', request)
},
/*获取菜单权限*/
getDeviceResources (request = {}) {
return api.get('user/userDeviceResources', request)
}
}
\ No newline at end of file
import api from '../config.js'
export default {
/*设备分类*/
getDeviceTypeList(request = {}) {
return api.get('device/classify/list', request)
},
getDeviceTypeById(request = {}) {
return api.get('device/classify/detail', request)
},
addDeviceType(request = {}) {
return api.post('device/classify/create', request)
},
updateDeviceType(request = {}) {
return api.post('device/classify/update', request)
},
/*设备列表*/
getDeviceList(request = {}) {
return api.get('device/device/getDeviceList', request)
},
saveDevice(request = {}) {
return api.post('device/device/saveDevice', request)
},
updateDevice(request = {}) {
return api.post('device/device/updateDevice', request)
},
getDeviceById(request = {}) {
return api.get(`device/device/getDevice/${request.id}`)
},
getDeviceByName(request = {}) {
return api.get(`device/device/getDeviceByName`, request)
},
swichDeviceById(request = {}) {
return api.get(`device/device/swichUse/${request.id}`)
},
/*设备管理*/
getDeviceAdminList(request = {}) {
return api.get('device/deviceManage/getDeviceManageList', request)
},
deleteXFDevice(request = {}) {
return api.post('device/deviceManage/deleteXFDevice', request)
},
getDeviceManageListTotal(request = {}) {
return api.post('device/deviceManage/getDeviceManageListTotal', request)
}
}
\ No newline at end of file
import api from '../config.js'
export default {
getDeviceNumber (request = {}) {
return api.get('home/getDeviceNumber', request)
},
getNewActiveDeviceInfo (request = {}) {
return api.get('home/getNewActiveDeviceInfo', request)
},
getNewBindDeviceInfo (request = {}) {
return api.get('home/getNewBindDeviceInfo', request)
},
getAlarmNumber (request = {}) {
return api.get('home/getAlarmNumber', request)
}
}
\ No newline at end of file
import common from './common'
import menu from './menu'
import home from './home'
import report from './report'
import monitor from './monitor'
import business from './business'
import system from './system'
import device from './device'
import accounts from './accounts'
import stock from './stock'
export default {
common,
menu,
home,
report,
monitor,
business,
system,
device,
accounts,
stock
}
\ No newline at end of file
import axios from 'axios'
export default {
getAll (request = {}) {
return axios.get('http://localhost:3000/menu', request)
.then((response) => Promise.resolve(response))
.catch((error) => Promise.reject(error))
}
}
import api from '../config.js'
export default {
/*车辆监控*/
getCriteriaTreeList (request = {}) {
return api.get('vehicle/getCriteriaTreeList', request)
},
getRtTrack (request = {}) {
return api.get('track/getRtTrack', request)
},
getBaseStationTrack(request = {}) {
return api.get('track/getBaseStationTrack', request)
},
getResidentByRealTime (request = {}) {
return api.get('track/getResidentByRealTime', request)
},
getTrackHistory (request = {}) {
return api.get('track/getTrackHistory', request)
},
getBaseStationHistory(request = {}) {
return api.get('track/getBaseStationHistory', request)
},
getEcFenceList(request = {}) {
return api.get('ecFence/getEcFenceList', request)
},
getEcFenceById(request = {}) {
return api.get('ecFence/getEcFenceById/'+request.id)
},
getVehicleDeviceList(request = {}) {
return api.get('vehicle/getVehicleDeviceList', request)
},
getDevicesLocation(request = {}) {
return api.get('track/getDevicesLocation', request)
},
getSingleFence(request = {}) {
return api.get('ecFence/getSingleFence', request)
},
getHistoryLocation(request = {}) {
return api.get('track/stayPointList', request)
},
getTrackBySn(request = {}) {
return api.get('track/getTrackBySn', request)
},
/*围栏管理*/
getFenceList(request = {}) {
return api.get('ecFence/getFenceList', request)
},
getNewFenceId(request = {}) {
return api.get('ecFence/toAddEcFence', request)
},
checkFenceName(request = {}) {
return api.post('ecFence/findEcFenceByName', request)
},
getVehicleSnList(request = {}) {
return api.get('vehicle/getVehicleSnList', request)
},
saveFence(request = {}) {
return api.post('ecFence/saveFence', request)
},
getFenceDetailById(request = {}) {
return api.get('ecFence/toUpdateEcFence', request)
},
updateFence(request = {}) {
return api.post('ecFence/updateFence', request)
},
deleteFence(request = {}) {
return api.get('ecFence/deleteFence', request)
},
updateFenceStatus(request = {}) {
return api.get('ecFence/updateStatus', request)
},
deleteFenceSns(request = {}) {
return api.get('ecFence/deleteFenceSns', request)
},
getFenceSnsList(request = {}) {
return api.get('ecFence/getFenceSnsList', request)
}
}
import api from '../config.js'
export default {
deviceActive (request = {}) {
return api.get('deviceActive/findList', request)
},
fencesalarm (request = {}) {
return api.get('fencesalarm/findList', request)
},
powerOffAlarm(request = {}) {
return api.get('powerOffAlarm/poweroffqureyList', request)
},
finalPostioning(request = {}) {
return api.get('finalPostioning/findList', request)
},
finalTotal(request = {}) {
return api.get('finalPostioning/findFinalPositionListTotal', request)
},
offlineList(request = {}){
return api.get('report/offline/list',request)
},
offlineTotal(request = {}){
return api.get('report/offline/total',request)
},
offlineCheckExport(request = {}){
return api.get('report/offline/checkExport',request)
},
batteryList(request = {}){
return api.get('report/battery/list',request)
},
batteryTotal(request = {}){
return api.get('report/battery/total',request)
},
stayList(request = {}){
return api.get('report/stay/list',request)
},
stayTotal(request = {}){
return api.get('report/stay/total',request)
},
stayCheckExport(request = {}){
return api.get('report/stay/checkExport',request)
},
overspeedList(request = {}){
return api.get('report/overspeed/list',request)
},
overspeedTotal(request = {}){
return api.get('report/overspeed/total',request)
},
overspeedCheckExport(request = {}){
return api.get('report/overspeed/checkExport',request)
},
overspeedDetailList(request = {}){
return api.get('report/overspeed/detail/list',request)
},
journeysList(request = {}){
return api.get('report/journeys/list',request)
},
journeysTotal(request = {}){
return api.get('report/journeys/total',request)
},
journeysDetailTotal(request = {}){
return api.get('report/journeys/detail/list',request)
},
journeysCheckExport(request = {}){
return api.get('report/journeys/checkExport',request)
},
getCriteriaTreeList (request = {}) {
return api.get('vehicle/getCriteriaTreeList', request)
},
getGraphic (request = {}) {
return api.get('report/journeys/detail/graphic', request)
},
batteryCheck (request = {}) {
return api.get('report/battery/checkExport', request)
},
/*警情中心*/
getAlarmCenterList (request = {}) {
return api.get('alarmCenter/getList', request)
},
getAlarmDetailById (request = {}) {
return api.get('alarmCenter/getByVehicleId', request)
},
getAlarmCalendar (request = {}) {
return api.get('alarmCenter/calendar/getList', request)
},
updateAlarmResolve (request = {}) {
return api.post('alarmCenter/dealLog/update', request)
},
exportAlarmCenterList (request = {}) {
return api.post('alarmCenter/export', request)
},
getAlarmFocusList (request = {}) {
return api.get('attentionCenter/queryAttention', request)
},
exportAlarmFocusList (request = {}) {
return api.post('attentionCenter/exportAttentionAlarm', request)
},
getAlarmIgnoreList (request = {}) {
return api.get('attentionCenter/queryIgnore', request)
},
exportAlarmIgnoreList (request = {}) {
return api.post('attentionCenter/exportIgnore', request)
},
toggleAlarmItemStatus (request = {}) {
return api.get('attentionCenter/changeAIStatus', request)
},
getAlarmLogList (request = {}) {
return api.get('alarmCenterLog/qureyLog', request)
},
exportAlarmLogList (request = {}) {
return api.post('alarmCenterLog/exportLog', request)
},
getAntiOffAlarmList(request = {}) {
return api.get('tamperalarm/list', request)
},
exportAntiOffAlarmList (request = {}) {
return api.post('tamperalarm/export', request)
},
//警情配置
gqAlarmCenterList(request = {}) {
return api.get('gqAlarmCenter/gqAlarmCenterList', request)
},
gqQueryTerm(request = {}) {
return api.get('gqAlarmCenter/gqQueryTerm', request)
},
deleteAlarmRule(request = {}) {
return api.get('gqAlarmCenter/deleteAlarmRule', request)
},
addAlarmRule(request = {}) {
return api.get('gqAlarmCenter/addAlarmRule', request)
},
validateRuleName(request = {}) {
return api.get('gqAlarmCenter/validateRuleName', request)
},
getAlarmRuleById(request = {}) {
return api.get('gqAlarmCenter/getAlarmRuleById', request)
},
updateAlarmRule(request = {}) {
return api.post('gqAlarmCenter/updateAlarmRule', request)
},
getGqBusinessData(request = {}) {
return api.get('gqAlarmCenter/getGqBusinessData', request)
},
listGqBusissDataPage(request = {}) {
return api.get('gqAlarmCenter/listGqBusissDataPage', request)
},
queryAlarmBySn(request = {}) {
return api.get('gqAlarmCenter/queryAlarmBySn', request)
},
dealWithAlarm(request = {}) {
return api.post('gqAlarmCenter/dealWithAlarm', request)
},
getAlarmDataById(request = {}) {
return api.get('gqAlarmCenter/getAlarmDataById', request)
},
batchParseAddress(request = {}) {
return api.post('deviceActive/batchParseAddress', request)
},
listComplexAlarmPage(request = {}) {
return api.get('gqAlarmCenter/listComplexAlarmPage', request)
},
queryComplexAlarmInfo(request = {}) {
return api.get('gqAlarmCenter/queryComplexAlarmInfo', request)
},
dealWithComplexAlarm(request = {}) {
return api.post('gqAlarmCenter/dealWithComplexAlarm', request)
},
}
\ No newline at end of file
import api from '../config.js'
export default {
/*库存管理*/
getStockList(request = {}) {
return api.get('deviceStock/listStockPage', request)
},
/*库存管理 - 弹窗*/
getStockDetail(request = {}) {
return api.get('deviceStock/listStockNumberDetailPage', request)
},
/* 设备明细 */
getDeviceDetailList(request = {}) {
return api.get('deviceStock/listDeviceDetailPage', request)
}
}
import api from '../config.js'
export default {
getUserInfo (request = {}) {
return api.get('user/getUserInfo', request)
},
updateUserInfo (request = {}) {
return api.get('user/updateUser', request)
},
validateOldPass (request = {}) {
return api.get('user/validateOldPass', request)
},
getSystemInfo (request = {}) {
return api.get('systemInfo/getSystemInfo', request)
},
getSystemUpdating (request = {}) {
return api.get('systemInfo/queryUpdatings', request)
}
}
\ No newline at end of file
.wrap {
position: relative;
/* min-height: 949px; */
background: #2f4050;
main {
display: block;
margin: 0;
background-color: #f3f3f4;
/* min-height: 949px; */
position: relative;
-webkit-transition: margin .1s linear;
transition: margin .1s linear;
}
.sidebar {
position: absolute;
top: 0px;
left: 0px;
width: 220px;
height: 100%;
-webkit-transition: width .1s linear;
transition: width .1s linear;
font-size: 13px !important;
* {
font-size: 13px !important;
}
color:#a7b1c2;
}
&.full-width {
main {
margin-left: 64px;
/* -webkit-transition: margin .3s linear;
transition: margin .3s linear; */
}
.sidebar {
width: 64px;
/* -webkit-transition: width .3s linear;
transition: width .3s linear; */
}
.nav-footer{
display: none;
}
}
}
@media (max-width: 768px) {
main {
margin: 0px;
}
}
.main-wrap {
padding: 20px;
}
.row {
background: #fff;
padding: 10px;
}
.el-popper[x-placement^="bottom"] {
margin-top: 2px;
}
.el-input.is-disabled .el-input__inner{
color: #666;
}
/* .el-table--scrollable-x .el-table__body-wrapper{解决被遮挡
z-index: 100;
} */
.el-date-editor{
vertical-align: middle;
}
.table-header-ctrl {
margin: 0px;
min-height: 70px;
.el-input,
.el-date-editor,
.el-select {
width: 100%;
}
.el-input__suffix {
right: 15px;
}
input{
border-radius: 0px;
}
.el-date-editor{
border-radius: 0px;
margin-top: 7px;
}
}
td.ctrl-column {
padding-left: 50px;
.el-dropdown {
margin-top: 5px;
}
}
.el-button--small,
.el-table--small {
font-size: 13px;
}
.el-button--small {
padding: 8px 14px;
}
.el-table th>.cell {
color: #666;
}
.pull-right{
float: right;
}
.pull-left{
float: left;
}
.text-center{
text-align: center;
}
.table-page-wrap{
float: right;
margin: 20px 0px;
}
.el-message{//避免被el-dialog遮罩层遮住
z-index: 3000 !important;
}
.el-tree .device-invalid{
color: #999;
}
.el-tree-node:focus > .el-tree-node__content{
background-color: inherit;
}
#editOrderModal #color .el-form-item__label{
color: red !important;
}
.el-alert--success {
background-color: #f0f9eb;
color: #67c23a;
}
.el-alert--error {
background-color: #fef0f0;
color: #f56c6c;
}
\ No newline at end of file
.el-dialog__header {
border-bottom: 1px solid #e5e5e5
}
.el-dialog__footer{
border-top: 1px solid #e5e5e5
}
.el-dialog{
.dialog-header{
position: relative;
margin: -10px 0px;
overflow: auto;
.header-title{
float: left;
line-height: 47px;
font-size: 16px;
}
.header-nav{
float: right;
margin-right: 20px;
a{
display: inline-block;
padding: 15px;
color: #333;
text-decoration: none;
cursor: pointer;
font-size: 16px;
border-bottom: 2px solid transparent;
&.active{
color: #094;
border-bottom: 2px solid #094;
}
}
}
}
h3{
font-size: 14px;
}
}
\ No newline at end of file
/* 改变主题色变量 */
$--color-primary: #094;
$--font-size-base: 13px;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";
\ No newline at end of file
.ibox {
background-color: #fff;
border-top: 2px solid #e7eaec;
padding: 10px;
margin-bottom: 20px;
.ibox-title {
padding-bottom: 10px;
overflow: auto;
h3{
font-size: 14px;
padding: 10px;
color: #666;
}
.ibox-ctrl{
position: relative;
top: 5px;
right: 10px;
margin-left: 10px;
margin-bottom: 10px;
}
}
.ibox-content {
padding: 20px 20px 0px;
margin: 0px -10px;
border-top: 1px solid #e7eaec;
overflow: auto;
}
&.ibox-search{
padding: 15px 10px 0px;
.el-form-item{
margin-bottom: 15px;
}
}
}
\ No newline at end of file
.amap-sug-result{
z-index: 3000;
}
.amap-info-content{
padding: 10px 20px;
}
.uimap-info-ct{
margin: 15px 0px;
}
.uimap-info-ct .fa-inbox{
color: #1c80ec;
}
.uimap-info-ct .fa-clock-o{
color: #fdab0d;
}
.uimap-info-ct .fa-map-marker{
color: #05c55a;
}
.uimap-info-ct .fa-car{
color: #fa6828;
}
.uimap-info-ct>p>span{
width: 20px;
display: inline-block;
text-align: center;
margin-right: 5px;
font-size: 16px;
}
h3.uimap-info-title{
padding: 10px 40px 10px 5px;
margin: 0px 10px;
border-bottom: 1px solid #eee;
font-size: 14px;
word-break: break-all;
}
.amap-controls{
display: none;
}
.navg-info-window{
background-color: #fff;
border-radius: 4px;
border: 1px solid #eee;
.tit{
padding: 10px 15px;
}
.main{
padding: 5px 15px;
border-top: 1px solid #eee;
p{
margin: 5px 0;
.lb{
color: #939393;
margin-right: 5px;
}
}
}
}
\ No newline at end of file
.map-wrap{
position: absolute;
top: 100px;
left: 0;
width: 100%;
height: calc(100% - 100px);
overflow: hidden;
.map-controll{
position: absolute;
top: 20px;
right: 20px;
z-index: 102;
.fullsize-btn{
margin-left: 20px;
}
}
.map-bottom-controll{
position: absolute;
bottom: 30px;
right: 20px;
z-index: 102;
ul{
border: 1px solid #eee;
color: #094;
}
.ctrl-item{
background-color: #fff;
padding: 6px 10px;
font-size: 16px;
}
}
.controll-wrap{
position: absolute;
top: 20px;
left: 20px;
z-index: 101;
width: 320px;
max-height: 716px;
}
.menu-search{
.el-select{
width: 100px;
}
.input-with-select{
width: 100%;
}
.el-input-group__append{
background: #094;
border-color: #094;
color: #fff;
font-size: 16px;
}
.el-input-group__append:hover, .el-input-group__append:focus {
background: #33ad69;
border-color: #33ad69;
}
}
.filter-entrance{
margin-top: 10px;
background-color: rgba(255,255,255,0.9);
//border: 1px solid #dcdfe6;
box-shadow: 1px 1px 5px #dcdfe6;
.el-button{
padding: 6px;
}
}
.filter-dialog-set{
margin-top: 10px;
height: 100%;
position: relative;
}
.filter-dialog{
position: absolute;
top: 0;
left: 0;
width: 100%;
background-color: #fff;
border: 1px solid #dcdfe6;
box-sizing: border-box;
.filter-dialog-header{
text-align: center;
padding: 8px;
border-bottom: 1px solid #eee;
.el-icon-close{
font-size: 16px;
cursor: pointer;
}
}
.filter-dialog-body{
padding: 15px;
.upload-wrap{
.el-select{
width: 100px;
}
.input-with-select{
width: 100%;
}
}
}
.upload-sure-btn{
width: 100%;
}
animation-duration: .5s;
animation-delay: 0s;
display: none;
&.active{
display: block
}
.sub-filter{
padding-bottom: 15px;
border-bottom: 1px solid #eee;
}
.monitor-list{
max-height: calc(100vh - 280px);
/* max-height: 568px; */
overflow: auto;
margin-right: -10px;
padding-right: 10px;
}
.monitor-list-item{
display: flex;
border-bottom: 1px solid #eee;
.user-info{
flex: 1;
color: #666;
&>p{
margin: 8px 0;
}
.name{
color: #333;
margin-right: 15px;
}
}
&:last-child{
border-bottom: none;
}
.device-icon{
margin-right: 5px;
margin-top: 12px;
}
}
.device-icon-label{
display: inline-block;
margin-left: 5px;
}
.device-icon{
display: inline-block;
vertical-align: middle;
width: 8px;
height: 8px;
border-radius: 5px;
background-color: rgba(0,153,68,0.8);
&.offline{
background-color: rgba(255,0,0,0.8);
}
}
.filter-dialog-footer{
border-top: 1px solid #eee;
padding: 10px;
span{
vertical-align: middle;
}
}
}
.search-box{
.date-filter{
position: absolute;
top: 0px;
right: 0px;
}
.el-form--inline .el-form-item{
margin-right: 0px;
}
.stay-ctrl{
margin-top: 5px;
input{
width: 100%;
}
.el-form-item{
margin-bottom: 0px;
}
.unit{
line-height: 30px;
margin-left: 10px;
}
}
.el-range-editor--mini .el-range-input{
width: 115px;
}
.el-form-item{
margin-bottom: 15px;
}
.submit-el-form-item{
margin-top: 20px;
}
}
.search-box, .result-box{
padding: 20px;
background: #fff;
box-shadow: 1px 1px 4px #ccc;
display: none;
}
.search-box.active, .result-box.active{
display: block;
}
.result-box{
/* height: 100%;
max-height: 660px; */
padding: 0px;
.result-box-head{
text-align: center;
border-bottom: 1px solid #ddd;
padding: 10px 15px;
&>*{
vertical-align: middle;
}
}
.result-box-filter{
font-size: 0px;
padding: 5px 0px;
border-bottom: 1px solid #eee;
.el-button{
font-size: 13px;
padding: 2px 10px;
margin: 0;
&:first-child{
border-right: 1px solid #eee;
}
i{
margin: 0 3px;
}
}
}
.stay-list{
/* height: calc(100% - 70px); */
max-height: calc(100vh - 120px);
overflow-y: auto;
}
.stay-list-item{
line-height: 1.5;
padding: 10px 15px;
border-bottom: 1px solid #eee;
p{
margin: 0px;
}
.datetime{
font-size: 13px;
color: #666;
}
}
}
.replay-player{
max-width: 400px;
position: absolute;
top: 20px;
right: 20px;
z-index: 500;
background: #fff;
padding: 5px 10px;
margin-top: 10px;
.el-progress{
display: inline-block;
width: 200px;
margin: 0;
height: 10px;
border-radius: 0;
}
&>a{
margin: 0 5px;
cursor: pointer;
&:hover{
color: #094;
}
}
}
.row-form-item .el-form-item__label{
float: none;
}
}
.full-width .map-wrap{
top: 0px;
height: 100%;
}
.map-container{
width: 100%;
height: 100%;
z-index: 100;
}
.el-loading-mask{
z-index: 500;
}
.map-infowindow-ct{
&>p{
display: flex;
}
.lb{
}
.des{
flex: 1;
word-break: break-all;
}
.icon{
margin-right: 5px;
}
.battery{
position: relative;
width: 42px;
height: 20px;
i{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.fill{
width: 39px;
}
.fill-percentage{
padding: 3px;
box-sizing: border-box;
background-color: #d4f1dc;
}
.text{
color: #37c060;
font-size: 12px;
text-align: center;
}
&.empty .fill-percentage{
background-color: #f0d0d0;
}
&.empty .fill-percentage{
color: #df2222;
}
&.hide{
display: none;
}
}
.redirect-row{
display: flex;
}
a.redirect-btn{
flex: 1;
border: 1px solid rgba(0,153,68,0.8);
border-radius: 2px;
text-align: center;
padding: 4px 0px;
color: rgba(0,153,68,0.8);
margin: 2px;
cursor: pointer;
&:hover{
color: rgba(0,153,68, 1);
border-color: rgba(0,153,68, 1);
}
}
a.locate-btn{
padding: 2px 8px;
border: 1px solid #094;
border-radius: 4px 0 0 4px;
& + .locate-btn{
border-radius: 0 4px 4px 0;
border-left: none;
}
&.active{
background-color: #094;
color: #fff;
}
}
}
.poi_marker{
display: inline-block;
width: 40px;
height: 48px;
background-image: url('../images/poi-marker-default.png');
background-size: 40px 50px;
text-align: center;
color: #fff;
padding-top: 2px;
}
.poi_infowin{
.poi_item{
display: flex;
justify-content: space-between;
label{
color: #666;
}
span, input{
flex: 1;
}
input{
border: 1px solid #ccc;
height: 22px;
padding: 2px 8px;
}
}
.poi_ctrl{
justify-content: flex-end;
&>a{
display: inline-block;
border: 1px solid rgba(0, 153, 68, 0.8);
border-radius: 12px;
text-align: center;
padding: 2px 10px;
color: rgba(0, 153, 68, 0.8);
margin-left: 10px;
cursor: pointer;
}
&>a[data-delete]{
border: 1px solid #dcdfe6;
color: #606266;
}
}
}
\ No newline at end of file
.pace {
-webkit-pointer-events: none;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.pace-inactive {
display: none; }
.pace .pace-progress {
background: #009944;
position: fixed;
z-index: 2040;
top: 0;
right: 100%;
width: 100%;
height: 2px; }
.pace-inactive {
display: none; }
.pace-done .wrap {
-webkit-transition: all 0.4s;
-moz-transition: all 0.4s;
-o-transition: all 0.4s;
transition: all 0.4s; }
\ No newline at end of file
/*电量统计*/
.Electric{
width:259px;
border:1px solid #e7eaec;;
border-radius:5px;
margin-top:4px;
color:#606266;
height:31px;
line-height: 31px;
.ElectricInp{
border:none;
width:60px;
outline:none;
margin-left:5px;
}
.ElectricTxt{
margin-left:20px;
}
}
.searchResult{
width:357px;
border:1px solid #e7eaec;
margin-top: -21px;
margin-right: 20px;
height: 133px;
border-radius:5px;
overflow-y: auto;
background: #fff;
z-index: 1001;
p{
padding-left: 20px;
}
}
\ No newline at end of file
body {
margin: 0px;
font-size: 13px;
background: #2f4050;
}
h1,
h2,
h3,
h4,
h5 {
margin: 0px;
}
ul,li{
margin: 0px;
list-style: none;
padding: 0px;
}
.el-form-item__content .el-input-group {
vertical-align: middle;
}
\ No newline at end of file
@import './reset';
@import './common';
@import './ibox';
@import './dialog';
@import './pace';
@import './map';
@import './report';
@import './monitor'
.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);
}
}
}
<template>
<el-form-item :label="label" :prop="prop">
<el-select v-model="provinceId" @change="povinceChange" filterable placeholder="请选择" size="small" class="el-slect" :disabled="disabled">
<el-option
v-for="item in provinceOpts"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="cityId" @change="cityChange" v-show="!isHideCity" placeholder="" size="small" class="el-slect" :disabled="disabled">
<el-option
v-for="item in cityOpts"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="areaId" @change="areaChange" v-show="!isHideArea" placeholder="" size="small" class="el-slect" :disabled="disabled">
<el-option
v-for="item in areaOpts"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</template>
<script>
import chinaData from './china'
export default{
props:['label', 'prop', 'id', 'init', 'disabled'],
data(){
const provinceOptions= chinaData.province;
const slectedProvince = provinceOptions[0];
return {
province: '',
provinceId: '',
provinceOpts: provinceOptions,
city: '',
cityId: '',
cityOpts: [],
isHideCity: true,
isHideArea: true,
area: '',
areaId: '',
areaOpts: []
}
},
computed: {
areaStr:{
get(){
return this.province+this.city+this.area;
}
},
areaStrSplit:{
get(){
let str = this.province
if(this.city){
str += `,${this.city}`
}
if(this.area){
str += `,${this.area}`
}
return str
}
},
},
watch: {
id(newVal){
if(this.init){
if(newVal){
const s1 = newVal.substr(0,2)+'0000';
const s2 = newVal.substr(0,4)+'00';
this.provinceId = s1;
this.povinceChange(this.provinceId)
this.cityId = s2;
this.pickCity(this.cityId);
this.areaId = newVal;
}else{
this.provinceId = '';
this.cityId = '';
this.areaId = '';
this.isHideCity = true;
this.isHideArea = true;
}
this.$emit('areaChangeInit')
}
}
},
methods: {
povinceChange(provinceId){
this.provinceId = provinceId;
const cityOptions = chinaData.city[provinceId];
if(cityOptions){
const selectedCity = cityOptions[0];
this.province = selectedCity.province;
this.cityId = selectedCity.id;
this.city = selectedCity.name;
this.cityOpts = cityOptions;
this.cityChange();
if(selectedCity.name == '市辖区'){
this.isHideCity = true;
}else{
this.isHideCity = false;
}
}else{
this.isHideCity = true;
this.isHideArea = true;
const provinceItem = chinaData.province.find((item) => item.id === provinceId);
this.province = provinceItem.name;
this.city = '';
this.area = '';
this.$emit('onAreaSelectChange', this.areaStr, this.provinceId, this.areaStrSplit)
}
},
pickCity(cityId){
this.cityId = cityId
const areaOptions = chinaData.area[cityId];
if(areaOptions.length){
if (areaOptions[0].name == '市辖区') {
areaOptions.splice(0, 1);
}
this.areaOpts = areaOptions;
const selectedArea = areaOptions[0];
this.city = selectedArea.city;
this.areaId = selectedArea.id;
this.area = selectedArea.name;
this.isHideArea = false;
this.$emit('onAreaSelectChange', this.areaStr, this.areaId, this.areaStrSplit)
}else{
this.isHideArea = true;
const cityItem = chinaData.city[this.provinceId].find((item) => item.id === cityId);
this.city = cityItem.name;
this.area = '';
this.areaId = '';
this.$emit('onAreaSelectChange', this.areaStr, this.cityId, this.areaStrSplit)
}
},
cityChange(){
this.pickCity(this.cityId)
},
areaChange(){
const areaOptions = chinaData.area[this.cityId];
const selectedArea = areaOptions.find((o)=>{
return o.id == this.areaId
});
this.area = selectedArea.name;
this.$emit('onAreaSelectChange', this.areaStr, this.areaId, this.areaStrSplit)
}
}
}
</script>
<style scoped>
.el-select{
width: 120px;
}
</style>
\ No newline at end of file
<template>
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '/' }" v-show="!isIndex">首页</el-breadcrumb-item>
<slot></slot>
</el-breadcrumb>
</template>
<script>
export default{
props: ['isIndex']
}
</script>
<style>
.el-breadcrumb{
background: #fff;
padding: 13px 20px;
font-size: 13px;
position: relative;
}
.el-breadcrumb__item.last .el-breadcrumb__separator{
display: none;
}
</style>
\ No newline at end of file
<template>
<div class="date-range">
<el-date-picker
v-model="dateRange"
type="daterange"
size="small"
:clearable="false"
:editable="false"
:unlink-panels="true"
:picker-options="{
disabledDate(time){
return time.getTime() > new Date()
}
}"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<el-button-group >
<el-button size="small"
:type="getButtonType('all')"
v-if="showBtn('all')"
plain
@click.native="chooseType('all')"
>全部</el-button>
<el-button size="small"
:type="getButtonType('today')"
v-if="showBtn('today')"
plain
@click.native="chooseType('today')"
>今天</el-button>
<el-button size="small"
:type="getButtonType('yesterday')"
v-if="showBtn('yesterday')"
plain
@click.native="chooseType('yesterday')"
>昨日</el-button>
<el-button size="small"
:type="getButtonType('last3')"
v-if="showBtn('last3')"
plain
@click.native="chooseType('last3')"
>近3天</el-button>
<el-button size="small"
:type="getButtonType('last7')"
v-if="showBtn('last7')"
plain
@click.native="chooseType('last7')"
>近7天</el-button>
<el-button size="small"
:type="getButtonType('last15')"
v-if="showBtn('last15')"
plain
@click.native="chooseType('last15')"
>近15天</el-button>
<el-button size="small"
:type="getButtonType('thisMonth')"
v-if="showBtn('thisMonth')"
plain
@click.native="chooseType('thisMonth')"
>本月</el-button>
<el-button size="small"
:type="getButtonType('lastMonth')"
v-if="showBtn('lastMonth')"
plain
@click.native="chooseType('lastMonth')"
>上月</el-button>
<el-button size="small"
:type="getButtonType('last30')"
v-if="showBtn('last30')"
plain
@click.native="chooseType('last30')"
>近30天</el-button>
</el-button-group>
</div>
</template>
<script>
export default {
props: {
date: {
type: Array
},
options: {
type: Array
},
activeType: {
type: String,
default: ''
}
},
data(){
return {
dateRange: this.date,
type: this.activeType
}
},
watch: {
dateRange(newVal){
if(newVal.length){
newVal[0] = moment(newVal[0])
newVal[1] = moment(newVal[1])
}
this.$emit('onDateRangeChange', newVal)
}
},
created(){
this.getDateRange(this.activeType)
},
methods: {
getButtonType(type){
if(type==this.type){
return 'primary'
}
},
showBtn(type){
return !this.options || (this.options&&this.options.indexOf(type)>-1)
},
chooseType(type){
this.type = type;
this.getDateRange(type)
},
getDateRange(type){
switch(type){
case('today'):
this.dateRange = [moment(),moment()]
break;
case('yesterday'):
this.dateRange = [moment().subtract(1, 'days'),moment().subtract(1, 'days')]
break;
case('last3'):
this.dateRange = [moment().subtract(2, 'days'),moment()]
break;
case('last7'):
this.dateRange = [moment().subtract(6, 'days'),moment()]
break;
case('thisMonth'):
this.dateRange = [moment().startOf('month'), moment().endOf('month')]
break;
case('lastMonth'):
this.dateRange = [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
break;
case('last30'):
this.dateRange = [moment().subtract(29, 'days'),moment()]
break;
case('last15'):
this.dateRange = [moment().subtract(14, 'days'),moment()]
break;
default:
this.dateRange = [];
}
},
reset(){
this.type = this.activeType;
this.dateRange = []
}
},
components: {
}
}
</script>
<style scoped>
.date-range, .el-date-editor{
vertical-align: middle;
}
</style>
\ No newline at end of file
<template>
<el-form-item :label="label" :prop="prop" >
<el-button v-popover:popover class="select-btn" :disabled="disabled">
{{term?term:'请选择'}}
<i :class="visible?'el-icon-arrow-up':'el-icon-arrow-down'"></i>
</el-button>
<el-input maxlength="8" size="mini" placeholder="请输入剩余车牌号" v-model.trim="restNum" style="width:128px" @change="restNumChange" :disabled="disabled"></el-input>
<el-popover
ref="popover"
placement="bottom-start"
width="340"
v-model="visible"
v-show="!disabled"
trigger="click">
<div class="province-select">
<el-button :type="provinceSelected==item?'primary':'text'" v-for="item in provinceArr" :key="item" @click="selectProvince(item)">{{item}}</el-button>
</div>
<div class="no-select">
<el-button :type="noSelected==item?'primary':'text'" v-for="item in noArr" :key="item" @click="selectNo(item)">{{item}}</el-button>
</div>
</el-popover>
</el-form-item>
</template>
<script>
export default{
props: ['plateNumber', 'prop', 'label', 'init', 'disabled'],
data(){
return {
restain: this.plateNumber,
provinceArr: ["粤","京","沪","闽","川","辽","皖","苏","鄂","晋","吉","冀","宁","豫","黑","鲁","浙","桂","蒙","渝","津","云","湘","新","赣","甘","陕","贵","青","藏","琼"],
noArr: ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],
provinceSelected: '',
noSelected: '',
visible: false,
restNum: ''
}
},
computed:{
term:{
get(){
let term = '请选择';
if(this.init){
this.provinceSelected = '';
this.noSelected = '';
this.restNum = '';
this.$emit('onPlateNumberInitChange');
}else{
if(this.plateNumber&&this.plateNumber.length>1){
const s1 = this.plateNumber.substr(0,1);
const s2 = this.plateNumber.substr(1,1);
if(this.provinceArr.indexOf(s1)>-1 && this.noArr.indexOf(s2)>-1){
this.provinceSelected = s1;
this.noSelected = s2;
term = this.provinceSelected+this.noSelected;
this.restNum = this.plateNumber.substr(2);
}else{
this.restNum = this.plateNumber;
//this.$emit('onPlateNumberChange', '');
}
//this.restain = '';
}else if(this.provinceSelected && this.noSelected){
term = this.provinceSelected+this.noSelected;
}
}
return term;
}
}
},
watch:{
plateNumber(newValue){
//this.restain = newValue;
}
},
methods: {
selectProvince(province){
this.provinceSelected = province;
if(/^\w{5,8}$/.test(this.restNum)&&this.provinceSelected&&this.noSelected){
this.$emit('onPlateNumberChange', this.provinceSelected+this.noSelected+this.restNum)
}
},
selectNo(no){
this.noSelected = no;
if(/^\w{5,8}$/.test(this.restNum)&&this.provinceSelected&&this.noSelected){
this.$emit('onPlateNumberChange', this.provinceSelected+this.noSelected+this.restNum)
}
},
restNumChange(){
if(/^\w{5,8}$/.test(this.restNum)&&this.provinceSelected&&this.noSelected){
this.$emit('onPlateNumberChange', this.provinceSelected+this.noSelected+this.restNum)
}else{
this.restNum = ''
this.$emit('onPlateNumberChange', this.provinceSelected+this.noSelected)
}
}
}
}
</script>
<style scoped>
.el-button.select-btn{
padding: 7px 10px;
}
.el-button{
margin: 0px 5px;
padding: 4px 8px;
color: #999;
}
.el-button.el-button--primary{
color: #fff;
}
.el-button.el-button--primary:hover{
color: #fff;
}
.el-button:hover{
background-color: #094;
color: #fff;
}
.no-select{
border-top: 1px solid #eee;
padding-top: 10px;
margin-top: 10px;
}
</style>
\ No newline at end of file
<template>
<nav >
<div class="nav-user-name"><strong>{{name}}</strong></div>
<el-menu
:default-active="activePath"
class="main-menu"
@open="handleOpen"
@close="handleClose"
:collapse="isCollapse"
:router="true"
:collapse-transition="false"
:unique-opened="true"
background-color="#2f4050"
text-color="#a7b1c2"
active-text-color="#fff"
v-show="$store.getters.roleType!==undefined">
<template v-for="menuItem in permission">
<el-submenu
:index="menuItem.index"
v-if="menuItem.children && menuItem.children.length"
:key="menuItem.index"
v-show="getPermission(menuItem.index)">
<template slot="title">
<i class="fa" :class="menuItem.icon"></i>
<span slot="title">{{menuItem.title}}</span>
</template>
<el-menu-item
v-for="subMenuItem in menuItem.children"
:index="subMenuItem.index"
:key="subMenuItem.index"
:route="'../'+subMenuItem.index"
v-show="getPermission(subMenuItem.index)">
{{subMenuItem.title}}
</el-menu-item>
</el-submenu>
<el-menu-item
:index="menuItem.index"
:route="'../'+menuItem.index"
:key="menuItem.index"
v-show="getPermission(menuItem.index)"
v-else>
<i class="fa" :class="menuItem.icon"></i>
<span slot="title">{{menuItem.title}}</span>
</el-menu-item>
</template>
</el-menu>
<p class="nav-footer">©深圳广联赛讯</p>
</nav>
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
export default{
data() {
return {
collapse: this.isCollapse,
activePath: '',
auth:'',
menuList: this.$store.state.common.permission,
}
},
created(){
const store = this.$store;
store.dispatch('getRoleInfo').then(()=>{
this.auth = store.state.common.roleType;
});
this.getLoginUser()
console.log(this.menuList)
},
computed: {
...mapGetters([
'isCollapse',
'username',
'deviceResources',
'name',
'isGq',
'isCheckbook',
'isWorkOrderAdmin',
'compareLocate',
'anjiAccount',
'customerService',
'zlAccount',
'permission',
]),
isGqUser(){
return this.username === 'guangqi'||this.username === 'gqfxb'||this.username === 'gqspb'
},
is_gqgdcx(){
return this.username === 'gqgdcx'//''
},
permission(){
return this.$store.state.common.permission
}
},
watch:{
'$route.path'(newVal){
this.activePath = newVal.substr(1);
}
},
methods: {
getPermission(path){
//console.log(path)
return true
},
getIndex(url){
return `device/${url}`
},
getRoute(url){
return `../device/${url}`
},
handleOpen(key, keyPath) {
//this.toggleCollapse()
},
handleClose(key, keyPath) {
//this.toggleCollapse()
},
...mapActions([
'getLoginUser'
])
},
}
</script>
<style lang="scss">
.nav-user-name{
padding: 40px 25px 30px;
color: #dfe4ed;
}
.main-menu{
border-right: 0px;
&>.is-opened{
border-left: 4px solid #008f3f;
}
.is-opened{
*{
background: #293846!important;
&>*{
color: #fff;
}
}
}
.el-submenu__title{
height: 46px;
line-height: 46px;
}
.el-menu-item{
min-width: auto;
height: 32px;
line-height: 32px;
}
.el-submenu .el-menu{
padding-bottom: 10px;
padding-left: 10px;
}
}
.full-width{
.nav-user-name{
display: none
}
.main-menu{
margin-top: 60px;
}
}
.nav-footer{
position: absolute;
width: 100%;
bottom: 0px;
text-align: center;
}
</style>
\ No newline at end of file
<template>
<div class="row border-bottom">
<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header" ng-if="userInfo.islogin">
<a class="navbar-minimalize minimalize-styl-2 btn btn-primary"
@click.prevent="minimalize">
<i class="fa fa-bars"></i>
</a>
<h2 class="pull-left system-title font-bold"><img src="images/logo.png"></h2>
</div>
<ul class="nav navbar-top-links navbar-right" ng-if="userInfo.islogin">
<li>
<a class="ng-binding" @click.prevent="logout">
<i class="fa fa-sign-out"></i> 登 出
</a>
</li>
</ul>
</nav>
</div>
</template>
<script>
export default {
data(){
return {
islogin: false
}
},
methods: {
minimalize(){
$("body").toggleClass("mini-navbar");
if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {
$('#side-menu').hide();
setTimeout(() => $('#side-menu').fadeIn(400), 200)
} else if ($('body').hasClass('fixed-sidebar')) {
$('#side-menu').hide();
setTimeout(() => $('#side-menu').fadeIn(400),100);
} else {
$('#side-menu').removeAttr('style');
}
}
},
mounted(){
}
}
</script>
\ No newline at end of file
<template>
<el-form-item :label="label" :prop="prop">
<el-select v-model="brandId" @change="brandChange" filterable placeholder="请选择" size="mini" class="el-slect" :disabled="disabled">
<el-option
v-for="item in brandOpts"
:key="item.brandId"
:label="item.brandName"
:value="item.brandId">
</el-option>
</el-select>
<el-select v-model="typeId" @change="typeChange" placeholder="" size="mini" class="el-slect" :disabled="disabled">
<el-option
v-for="item in typeOpts"
:key="item.vehicleTypeId"
:label="item.vehicleTypeName"
:value="item.vehicleTypeId">
</el-option>
</el-select>
</el-form-item>
</template>
<script>
import {services} from '../api'
const COMMON_SERVICE = services.common;
export default{
props:['label', 'prop', 'brandId', 'typeId', 'disabled', 'init'],
data(){
return {
//brandId: this.initBrandId?this.initBrandId:'',
brandOpts: [],
//typeId: this.initTypeId?this.initTypeId:'',
typeOpts: [],
bid: this.brandId,
tid: this.typeId,
_promise: null
}
},
computed: {
areaStr:{
get(){
return this.province+this.city+this.area;
}
}
},
created(){
this._promise = new Promise((resolve, reject)=>{
COMMON_SERVICE.getAllVehicleBrand({}).then((result)=>{
if(result.returnCode == 0){
this.brandOpts = result.data;
resolve()
}
})
})
},
watch: {
/* brandId(newVal, oldValue){console.log('watch brandId')
this._promise.then(()=>{
this.bid = newVal
if(this.init){
if(newVal && newVal!=oldValue){
if(this.brandOpts.length){
this.ing = true
COMMON_SERVICE.getBrandTypeByBrandId({vehicleBrandId: newVal}).then((result)=>{
if(result.returnCode == '0'){
this.typeOpts = result.data;
}
});
}
}
}
})
},
typeId(newVal){console.log('watch typeId')
if(newVal){
this.tid = parseInt(newVal)
}else{
this.tid = ''
this.typeOpts = []
}
} */
init(newVal){
if(newVal === true){
this.$emit('onBrandInitChange')
this._promise.then(()=>{
COMMON_SERVICE.getBrandTypeByBrandId({vehicleBrandId: this.brandId}).then((result)=>{
if(result.returnCode == '0'){
this.typeOpts = result.data;
}
});
})
}
}
},
methods: {
brandChange(){
if(this.brandOpts.length){
this.$emit('onBrandInitChange')
COMMON_SERVICE.getBrandTypeByBrandId({vehicleBrandId: this.brandId}).then((result)=>{
if(result.returnCode == '0'){
this.typeOpts = result.data;
this.typeId = this.typeOpts[0].vehicleTypeId;
this.brandName = this.brandOpts.find(item => item.brandId === this.brandId).brandName
this.typeName = this.typeOpts.find(item => item.vehicleTypeId === this.typeId).vehicleTypeName
this.$emit('onBrandChange', this.brandId, this.typeId, this.brandName, this.typeName)
}
});
}
},
typeChange(){
this.brandName = this.brandOpts.find(item => item.brandId === this.brandId).brandName
this.typeName = this.typeOpts.find(item => item.vehicleTypeId === this.typeId).vehicleTypeName
this.$emit('onBrandChange', this.brandId, this.typeId, this.brandName, this.typeName)
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<el-form-item :label="label" :prop="prop">
<el-select v-model="groupId" @change="groupChange" :placeholder="groupPlaceholder" size="small" class="el-slect" :disabled="orderStatus<=0">
<el-option
v-for="item in groupOpts"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-select v-show="classOpts.length||classId" v-model="classId" @change="classChange" :placeholder="classPlaceholder" size="small" class="el-slect" :disabled="orderStatus<=0">
<el-option
v-for="item in classOpts"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</template>
<script>
import {services} from '../api'
const COMMON_SERVICE = services.common;
export default{
props:['label', 'prop', 'notPrependFirst' ,'groupIds','classIds','orderStatus','groupPlaceholder','classPlaceholder'],
data(){
return {
groupId: '',
groupOpts: [],
classId: '',
classOpts: []
}
},
computed: {
},
created(){
COMMON_SERVICE.getAllVehicleGroup({}).then((result)=>{
if(result.returnCode == '0'){
if(!this.notPrependFirst){
this.groupOpts = [{name:'全部',id:''}].concat(result.data);
}else{
this.groupOpts = result.data;
this.groupId = this.groupOpts[0].id;
this.groupChange();
}
}
if(this.groupIds){
this.groupId = this.groupIds
}else{
this.groupId = ''
}
if(this.classIds){
this.classId =this.classIds
}
})
},
watch: {
groupIds(newVal,oldValue){
if(newVal){
this.groupId = newVal
}else{
this.groupId = ''
}
}
,
classIds(newVal,oldValue){
if(newVal){
this.classId = newVal
}else{
this.classId = ''
this.classOpts = [];
}
}
},
methods: {
groupChange(){
if(this.groupId){
COMMON_SERVICE.getClassListByGroupId({groupId: this.groupId}).then((result)=>{
if(result.returnCode == '0'){
this.classOpts = [{name:'全部',id:''}].concat(result.data);
//this.classId = this.classOpts[0].id;
this.classId = "";
this.$emit('onVechicleChange', this.groupId, this.classId, this.classOpts[0].name)
}
});
}else{
this.classOpts = [];
this.classId = '';
this.$emit('onVechicleChange', this.groupId, this.classId)
}
},
classChange(){
const item = this.classOpts.find((o)=>{
return o.id === this.classId
});
this.$emit('onVechicleChange', this.groupId, this.classId, item.name)
},
resetSelet(){
this.groupId = "";
this.classId="";
this.groupChange()
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<el-form-item :label="label" :prop="prop">
<el-select v-model="groupId" @change="groupChange" filterable placeholder="请选择" size="small" class="el-slect" >
<el-option
v-for="item in groupOpts"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-select v-show="classOpts.length" v-model="classId" @change="classChange" filterable placeholder="请选择" size="small" class="el-slect">
<el-option
v-for="item in classOpts"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</template>
<script>
import {services} from '../api'
const COMMON_SERVICE = services.common;
export default{
props:['label', 'prop', 'notPrependFirst'],
data(){
return {
groupId: '',
groupOpts: [],
classId: '',
classOpts: []
}
},
computed: {
},
created(){
COMMON_SERVICE.getAllVehicleGroup({}).then((result)=>{
if(result.returnCode == '0'){
if(!this.notPrependFirst){
this.groupOpts = [{name:'全部',id:''}].concat(result.data);
}else{
this.groupOpts = result.data;
this.groupId = this.groupOpts[0].id;
this.groupChange();
}
}
})
},
methods: {
groupChange(){
if(this.groupId){
COMMON_SERVICE.getClassListByGroupId({groupId: this.groupId}).then((result)=>{
if(result.returnCode == '0'){
this.classOpts = result.data;
this.classId = this.classOpts[0].id;
this.$emit('onVechicleChange', this.groupId, this.classId, this.classOpts[0].name)
}
});
}else{
this.classOpts = [];
this.classId = '';
this.$emit('onVechicleChange', this.groupId, this.classId)
}
},
classChange(){
const item = this.classOpts.find((o)=>{
return o.id === this.classId
});
this.$emit('onVechicleChange', this.groupId, this.classId, item.name)
},
resetSelet(){
this.groupId = "";
this.classId="";
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
This diff could not be displayed because it is too large.
export default function remoteLoad (url, hasCallback) {
return createScript(url)
/**
* 创建script
* @param url
* @returns {Promise}
*/
function createScript (url) {
var scriptElement = document.createElement('script')
document.body.appendChild(scriptElement)
var promise = new Promise((resolve, reject) => {
scriptElement.addEventListener('load', e => {
removeScript(scriptElement)
if (!hasCallback) {
resolve(e)
}
}, false)
scriptElement.addEventListener('error', e => {
removeScript(scriptElement)
reject(e)
}, false)
if (hasCallback) {
window.____callback____ = function () {
resolve()
window.____callback____ = null
}
}
})
if (hasCallback) {
url += '&callback=____callback____'
}
scriptElement.src = url
return promise
}
/**
* 移除script标签
* @param scriptElement script dom
*/
function removeScript (scriptElement) {
document.body.removeChild(scriptElement)
}
}
const MAP_KEY = '75116f653f3b2e4568116dad8cd9b899'
export const CONSTANT = {
//ROOT: process.env.NODE_ENV === 'development'?'ots/':'',
API_URL: '/ots/',
MAP_KEY,
AMAP_URL: `https://webapi.amap.com/maps?v=1.4.2&key=${MAP_KEY}&plugin=AMap.PolyEditor,AMap.CircleEditor,AMap.DistrictSearch,AMap.Autocomplete,AMap.MarkerClusterer,AMap.MouseTool,AMap.Text`
}
\ No newline at end of file
function emptyAction() {
// 警告:提示当前使用的是空 Action
console.warn("Current execute action is empty!");
}
class Actions {
// 默认值为空 Action
constructor() {
this.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
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!