Commit a6ad7e61 by 张杰

仲利需求

1 parent af12e043
This diff could not be displayed because it is too large.
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
"dependencies": { "dependencies": {
"axios": "^0.20.0", "axios": "^0.20.0",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.13.2", "echarts": "^5.2.2",
"element-ui": "^2.15.7",
"sass": "^1.45.1",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-router": "^3.4.6", "vue-router": "^3.4.6",
"vuex": "^3.5.1" "vuex": "^3.5.1"
...@@ -23,7 +25,6 @@ ...@@ -23,7 +25,6 @@
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.14.1",
"sass-loader": "^10.0.3", "sass-loader": "^10.0.3",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
}, },
......
<template> <template>
<div <div id="glsx-system-sub" class="glsx-system-sub">
id="glsx-system-sub"
class="glsx-system-sub"
>
<!-- <div id="nav"> <!-- <div id="nav">
<router-link to="/">Home</router-link> | <router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link> | <router-link to="/about">About</router-link> |
...@@ -21,44 +18,46 @@ ...@@ -21,44 +18,46 @@
</p> </p>
</div> --> </div> -->
<keep-alive exclude="vehicleAddUpadate,vehicleTypeManage"> <keep-alive exclude="vehicleAddUpadate,vehicleTypeManage">
<router-view /> <router-view />
</keep-alive> </keep-alive>
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from 'vuex'; import { mapMutations } from "vuex";
export default { export default {
data() { data() {
return { return {
isQiankun: window.__POWERED_BY_QIANKUN__, isQiankun: window.__POWERED_BY_QIANKUN__,
} };
}, },
watch: { watch: {
$route(to, from) { $route(to, from) {
if(this.isQiankun) { if (this.isQiankun) {
this.getBreadcrumb(); this.getBreadcrumb();
} }
} },
}, },
methods: { methods: {
...mapMutations(['updateBaseURL']), ...mapMutations(["updateBaseURL"]),
getBreadcrumb() { getBreadcrumb() {
const { getters: {curBreadCrumb}} = this.$root.parentVuex; const {
let matched = this.$route.matched.filter(item => item.name); // this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录 getters: { curBreadCrumb },
} = this.$root.parentVuex;
let matched = this.$route.matched.filter((item) => item.name); // this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const first = matched[0]; const first = matched[0];
const { meta, path } = first; const { meta, path } = first;
const basePath = '/system#'; const basePath = "/system#";
let breadcrumb = []; let breadcrumb = [];
if(meta) { if (meta) {
const { title, pushState } = meta; const { title, pushState } = meta;
if(pushState && title) { if (pushState && title) {
breadcrumb.push({ breadcrumb.push({
name: title, name: title,
path: basePath + path path: basePath + path,
}) });
history.state.pushState = pushState; history.state.pushState = pushState;
history.state.breadcrumb = [...curBreadCrumb, breadcrumb[0]]; history.state.breadcrumb = [...curBreadCrumb, breadcrumb[0]];
// this.$root.parentVuex.dispatch('menu/setBreadCrumb', [...curBreadCrumb, breadcrumb[0]]); // this.$root.parentVuex.dispatch('menu/setBreadCrumb', [...curBreadCrumb, breadcrumb[0]]);
...@@ -67,14 +66,13 @@ export default { ...@@ -67,14 +66,13 @@ export default {
}, },
goToPage(path) { goToPage(path) {
this.$root.parentRouter.push(path); this.$root.parentRouter.push(path);
} },
}, },
created() { created() {},
} };
}
</script> </script>
<style> <style lang="scss">
#glsx-system-sub { #glsx-system-sub {
font-family: Avenir, Helvetica, Arial, sans-serif; font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
...@@ -104,4 +102,57 @@ export default { ...@@ -104,4 +102,57 @@ export default {
margin: 0 15px; margin: 0 15px;
text-decoration: underline; text-decoration: underline;
} */ } */
.links_group {
position: relative;
display: flex;
align-items: flex-end;
justify-content: space-between;
padding: 10px 0;
.name {
font-size: 18px;
font-weight: bold;
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> </style>
const chartConfig = {
type: 'line',
data: {
labels: [],
datasets: [{
data: [],
label: '设备激活数(个)',
borderDash: [1],
backgroundColor: 'rgba(0,153,68,0.3)',
borderColor: 'rgba(0,153,68,0.8)',
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
legend: false,
tooltips: {
intersect: false,
displayColors: false
},
scales: {
yAxes: [{
ticks: {
beginAtZero:true,
//stepSize: 1,
callback: function(value, index, values) {
if (Math.floor(value) === value) {
return value;
}
},
autoSkip: true,
maxRotation: 10,
maxTicksLimit: 10
}
}],
xAxes: []
}
}
}
export default chartConfig;
\ No newline at end of file \ No newline at end of file
<template>
<div class="dialog_page">
<el-dialog :title="title" :visible.sync="show" :width="width" :append-to-body="appendtobody" custom-class="glsx_dialog" :close-on-press-escape="false" :close-on-click-modal="false" @close="onCancel">
<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,
},
},
data() {
return {
hasFooter: false,
}
},
created() {
let o = this.$slots
this.hasFooter = o.footer
},
mounted: function () {},
methods: {
/**
* 取消关闭弹框
*/
onCancel: function () {
// 兼容以前的页面
this.$emit('closed')
this.$emit('close')
},
/**
* 确定
*/
onConfirm: function () {},
},
}
</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>
...@@ -69,6 +69,24 @@ const routes = [ ...@@ -69,6 +69,24 @@ const routes = [
name: 'workLog', name: 'workLog',
meta: { title: '操作日志' }, meta: { title: '操作日志' },
component: () => import('../views/workLog/index.vue') component: () => import('../views/workLog/index.vue')
},
{
path: '/home/index',
name: 'homeIndex',
meta: { title: '数据看板' },
component: () => import('../views/home/index.vue')
},
{
path: '/work/order',
name: 'workOrder',
meta: { title: '工单管理' },
component: () => import('../views/work/order.vue')
},
{
path: '/work/order/add',
name: 'workOrderAdd',
meta: { title: '新增工单' },
component: () => import('../views/work/add.vue')
} }
] ]
......
import request from "@/services/request";
// 首页-数据看板-获取统计数据
export const GET_HOME_DEVICENUMBER = (params) => {
return request(params, "/trialdrive/home/getdevicenumber");
};
// 首页-数据看板-获取警情统计数据
export const GET_HOME_ALARMNUMBER = (params) => {
return request(params, "/trialdrive/home/getalarmnumber");
};
// 首页-数据看板-获取设备激活趋势
export const GET_HOME_ACTIVEDEVICEINFO = (params) => {
return request(params, "/trialdrive/home/getactivedeviceinfo");
};
// 首页-数据看板-获取角色(判断是否为仲利)
export const GET_HOME_AUTHUSERORG = (params) => {
return request(params, "/trialdrive/home/authuserorg");
};
// 首页-数据看板-总绑定数图表
export const GET_HOME_NEWBINDDEVICEINFO = (params) => {
return request(params, "/trialdrive/home/getnewbinddeviceinfo");
};
\ No newline at end of file \ No newline at end of file
.add_work_page {
padding-bottom: 30px;
}
.head_title {
position: relative;
font-size: 18px;
font-weight: bold;
padding: 10px 0;
//margin-bottom: 30px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.mb30 {
margin-bottom: 30px;
}
.el_form_box {
display: flex;
flex-wrap: wrap;
.el-form-item {
flex: 0 0 50%;
padding-right: 30px;
box-sizing: border-box;
}
.long_form_item {
flex: 0 0 100%;
}
.el_date_picker {
margin-right: 10px;
}
}
// 提交按钮区域
.submit_box {
position: fixed;
bottom: 0;
right: 0px;
left:0;
z-index:10;
padding: 30px 24px;
display: flex;
align-items: center;
justify-content: flex-end;
background: #fff;
}
.c_canvas {
width: 100%;
height: 100px;
}
.static_list_box {
display: flex;
align-items: center;
.cell_box {
flex: 1;
margin: 0 10px 0 0;
border: 1px solid #d8d8d8;
border-radius: 4px;
background: rgba($color: #d8d8d8, $alpha: 0.1);
.head {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
font-size: 14px;
color: #666;
font-weight: bold;
}
.head:after {
display: block;
content: "";
height: 1px;
background: #d8d8d8;
position: absolute;
left: 0;
right: 0;
bottom: 0;
transform: scaleY(0.5);
}
.info_box {
padding: 10px;
.title {
font-size: 30px;
color: #666;
}
.footer {
padding: 10px 0;
border-top: 2px solid #eee;
font-size: 13px;
}
}
}
.cell_box:last-child {
margin: 0;
}
}
// 常规报警
.alarm_box {
margin: 20px 0;
background: #fff;
.head {
position: relative;
padding: 10px;
font-size: 14px;
color: #666;
font-weight: bold;
border: 1px solid #d8d8d8;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
display: flex;
align-items: center;
justify-content: space-between;
}
.alarm_list {
display: flex;
align-items: center;
padding: 10px 0;
.cell {
flex: 1;
margin: 0 20px 0 0;
border: 1px solid #d8d8d8;
border-radius: 4px;
background: rgba($color: #d8d8d8, $alpha: 0.1);
cursor: pointer;
.title {
display: flex;
align-items: center;
padding: 10px;
font-size: 12px;
font-weight: bold;
color: #666;
img {
width: 20px;
height: 20px;
margin-right: 10px;
}
}
.num {
font-size: 30px;
color: #666;
padding: 10px;
}
}
.cell:hover {
background: rgba($color: #2196f3, $alpha: 0.1);
border: 1px solid #2196f3;
}
.cell:last-child {
margin: 0;
}
}
}
// 设备激活趋势
.device_box {
border: 1px solid #d8d8d8;
border-radius: 4px;
.head {
border: 0;
}
.head:after {
display: block;
content: "";
height: 1px;
background: #d8d8d8;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.chart_box {
padding: 20px 0;
.chart_wrapper {
width: 100%;
height: 300px;
}
}
}
.sort_select {
width: 100px;
}
.small_select {
width: 120px;
}
.data_picker {
width: 240px;
}
.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;
}
}
\ No newline at end of file \ No newline at end of file
<template>
<div class="add_work_page">
<!-- 工单信息 开始 -->
<div class="head_title glsx_hairline mb30">工单信息</div>
<el-form ref="addForm" :model="addForm" class="el_form_box" :rules="addFormRules" size="small" label-width="120px">
<el-form-item label="店面名称:">
<el-input v-model="addForm.test" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="店面联系人:">
<el-input v-model="addForm.test" placeholder="输入格式:姓名,手机号码"></el-input>
</el-form-item>
<el-form-item label="是否需要安装:" class="long_form_item">
<el-radio-group v-model="addForm.radio">
<el-radio :label="3">需要安装</el-radio>
<el-radio :label="6">无需安装</el-radio>
</el-radio-group>
</el-form-item>
<el-collapse-transition>
<div v-show="addForm.radio == 3" class="long_form_item el_form_box">
<el-form-item label="安装联系人:">
<el-input v-model="addForm.test" placeholder="输入格式:姓名,手机号码"></el-input>
</el-form-item>
<el-form-item label="手机号:">
<el-input v-model="addForm.test" placeholder="安装完成后短信通知对象,输入格式:手机号码"></el-input>
</el-form-item>
<el-form-item label="安装时间:">
<el-date-picker v-model="addForm.value1" class="el_date_picker" type="date" placeholder="选择日期">
</el-date-picker>
<el-radio-group v-model="addForm.radio1">
<el-radio :label="1">上午</el-radio>
<el-radio :label="2">下午</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="安装地点:">
<el-input v-model="addForm.test"></el-input>
</el-form-item>
<el-form-item label="安装备注:">
<el-input type="textarea" v-model="addForm.test" placeholder="补充说明,安装人员可见" rows="5" resize="none"></el-input>
</el-form-item>
</div>
</el-collapse-transition>
</el-form>
<!-- 工单信息 end -->
<!-- 安装车辆 开始 -->
<div class="head_title glsx_hairline">
<span>安装车辆:共5台</span>
<el-button type="success" size="small" plain icon="el-icon-plus">新增车辆</el-button>
</div>
<!-- 安装车辆 end -->
<!-- 表格区域 开始 -->
<div class="table_box">
<el-table class="el_table" :data="tableData" border size="small">
<el-table-column label="车主姓名" prop=""></el-table-column>
<el-table-column label="车架号" prop=""></el-table-column>
<el-table-column label="发动机号" prop=""></el-table-column>
<el-table-column label="车主电话号码" prop=""></el-table-column>
<el-table-column label="车牌号码" prop=""></el-table-column>
<el-table-column label="品牌/车型" prop=""></el-table-column>
<el-table-column label="设备组合" prop=""></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120px">
<template>
<el-link class="el_link" type="primary">编辑</el-link>
<el-link class="el_link" type="danger">删除</el-link>
</template>
</el-table-column>
</el-table>
</div>
<!-- 表格区域 end -->
<!-- 按钮区域 开始 -->
<div class="submit_box">
<el-button type="primary" size="small">保存</el-button>
<el-button type="default" size="small">取消</el-button>
</div>
<!-- 按钮区域 开始 -->
</div>
</template>
<script>
export default {
data() {
return {
addForm: { radio: 3 },
addFormRules: {},
tableData: [{}, {}],
};
},
mounted() {
let o = document.getElementsByClassName("add_work_page");
console.log(o);
},
methods: {
},
};
</script>
<style lang="scss" scoped>
@import "@/styles/addWork.scss";
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="">
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :inline="true" size="small">
<el-form-item>
<el-select v-model="searchForm.queryTimeType" class="sort_select" placeholder="请选择">
<el-option label="创建时间" value="1"></el-option>
<el-option label="期望安装时间" value="2"></el-option>
</el-select>
<el-date-picker v-model="searchForm.dateRange" class="data_picker" value-format="yyyy-MM-dd" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="工单类型">
<el-select v-model="searchForm.test" class="small_select">
<el-option label="全部" value=""></el-option>
<el-option label="无需安装" :value="0"></el-option>
<el-option label="需要安装" :value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="系统工单状态">
<el-select v-model="searchForm.businessStatus" class="small_select" placeholder="请选择">
<el-option label="全部" value=""></el-option>
<el-option label="草稿" :value="1"></el-option>
<el-option label="已提交" :value="2"></el-option>
<el-option label="已派单" :value="3"></el-option>
<el-option label="已激活" :value="4"></el-option>
<el-option label="已取消" :value="5"></el-option>
<el-option label="已拆除" :value="6"></el-option>
</el-select>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model="searchForm.jjj" placeholder="设备|车架号|姓名|业务工单号|系统工单号"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" type="primary">搜索</el-button>
</el-form-item>
</el-form>
</div>
<!-- 搜索区域 end -->
<!-- 操作区域 开始 -->
<div class="links_group">
<span class="name">工单管理</span>
<div>
<el-button type="success" plain size="small">图片导出</el-button>
<el-button type="success" plain size="small" @click="openDialog()">批量导入</el-button>
<el-button type="success" plain size="small" @click="addOrder">工单新增</el-button>
<el-button type="success" plain size="small">导出excel</el-button>
</div>
</div>
<!-- 操作区域 end -->
<!-- 表格区域 开始 -->
<div class="table_box">
<el-table class="el_table" :data="tableData" border size="small">
<el-table-column type="selection" width="50" />
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="系统工单号" prop=""></el-table-column>
<el-table-column label="工单类型" prop=""></el-table-column>
<el-table-column label="业务工单号" prop=""></el-table-column>
<el-table-column label="姓名" prop=""></el-table-column>
<el-table-column label="车架号" prop=""></el-table-column>
<el-table-column label="设备数量" prop=""></el-table-column>
<el-table-column label="期望安装日期" prop=""></el-table-column>
<el-table-column label="客户归属" prop=""></el-table-column>
<el-table-column label="系统工单状态" prop=""></el-table-column>
<el-table-column label="安装服务商" prop=""></el-table-column>
<el-table-column label="安装人" prop=""></el-table-column>
<el-table-column label="创建人" prop=""></el-table-column>
<el-table-column label="创建时间" prop=""></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180px">
<template>
<el-link class="el_link" type="primary">查看</el-link>
<el-link class="el_link" type="primary">编辑</el-link>
<el-link class="el_link" type="primary">激活</el-link>
</template>
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="sizes, total,prev, pager, next, jumper" :total="pageTotal" :page-size="pageSize" :page-sizes="pageSizes" @current-change="getList" @size-change="changePageSize" />
</div>
</div>
<!-- 表格区域 end -->
<!-- 弹框 开始 -->
<glsx-dialog :show="showDialog" title="批量操作" width="560px" @close="closeDialog()">
<template>
<div class="upload_box" v-if="!showResult">
<div class="input_box">
<el-input v-model="uploadFile.name" class="a_input" size="small" readonly></el-input>
<el-upload ref="elUpload" action="https://jsonplaceholder.typicode.com/posts/" :show-file-list="false" :auto-upload="false" :on-change="onFileChange" :on-success="onSuccess">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</div>
<div class="tips">*请选择需要导入的工单表格*</div>
</div>
<div class="upload_result" v-if="showResult">
<div class="cell">
<span class="num">10000</span>
<span>成功记录</span>
</div>
<div class="cell">
<span class="num cred">0</span>
<span>失败记录</span>
</div>
</div>
</template>
<template slot="footer">
<div class="dialog_links">
<div>
<el-button type="primary" size="small" v-if="!showResult">下载模板</el-button>
<el-button type="primary" size="small" v-if="showResult">导出失败记录</el-button>
</div>
<div class="">
<el-button type="primary" size="small" :loading="loading" @click="saveFile()">确认</el-button>
<el-button type="default" size="small" @click="closeDialog()">取消</el-button>
</div>
</div>
</template>
</glsx-dialog>
<!-- 弹框 end -->
</div>
</template>
<script>
import GlsxDialog from "@/components/dialog";
export default {
components: {
GlsxDialog,
},
data() {
return {
searchForm: {},
currentPage: 1,
pageSizes: [10, 20, 30, 40],
pageSize: 10,
pageTotal: 0,
tableData: [{}, {}],
showDialog: false,
uploadFile: {},
showResult: false,
loading: false,
};
},
mounted() {},
methods: {
// 获取数据列表
getList() {},
//每页展示
changePageSize(e) {
this.pageSize = e;
this.getList();
},
// 监听文件导入
onFileChange(file, fileList) {
console.log(file);
this.uploadFile = file;
},
// 打开批量导入弹框
openDialog() {
this.showDialog = true;
},
// 关闭弹框
closeDialog() {
this.showDialog = false;
this.uploadFile = {};
},
// 上传文件
saveFile() {
this.loading = true;
this.$refs.elUpload.submit();
},
// 监听文件上传成功
onSuccess(response, file, fileList) {
this.loading = false;
this.uploadResult = response;
this.showResult = true;
},
// 新增工单
addOrder(){
this.$router.push({
name:'workOrderAdd',
})
}
},
};
</script>
<style lang="scss" scoped>
@import "@/styles/order.scss";
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!