锐能派单发版

This commit is contained in:
熊丽君
2021-04-20 09:15:00 +08:00
parent 1841205a49
commit 2ce672336a
6 changed files with 81 additions and 102 deletions

View File

@ -40,6 +40,7 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git" "url": "https://gitee.com/y_project/RuoYi-Vue.git"
}, },
"dependencies": { "dependencies": {
"@jiaminghi/data-view": "^2.10.0",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"axios": "0.18.1", "axios": "0.18.1",
"clipboard": "2.0.4", "clipboard": "2.0.4",

View File

@ -27,3 +27,10 @@ export function giveUpNote(params) {
params params
}); });
} }
// 获取导出
export function exportExcelTxt(params) {
return request({
url: '/order/export',
params
});
}

View File

@ -25,6 +25,10 @@ import Pagination from "@/components/Pagination";
//自定义表格工具扩展 //自定义表格工具扩展
import RightToolbar from "@/components/RightToolbar" import RightToolbar from "@/components/RightToolbar"
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey Vue.prototype.getConfigKey = getConfigKey

View File

@ -35,7 +35,7 @@ export default {
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
line-height: 100%; line-height: 100%;
background-color: rgba(0, 0, 0, 0.2); background-color: rgba(7, 26, 72, 0.2);
border: 0px solid rgba(70, 233, 255, 1); border: 0px solid rgba(70, 233, 255, 1);
border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px;
-webkit-box-shadow: #666 0px 0px 10px; -webkit-box-shadow: #666 0px 0px 10px;

View File

@ -1,30 +1,83 @@
<template> <template>
<div style="width: 100%;height:100%;position: relative;"> <div style="width: 100vw;height:100vh;position: relative;background-color:#010b34;overflow:hidden">
<div ref="bmap" id="main" style="width: 100%;height:100%;"></div>
<div id="chart"> <div id="chart">
<div style="width: 100vw;height:40px;line-height:40px;position: absolute;padding-top:5px;display: flex;overflow:hidden;justify-content: space-between;">
<dv-decoration-10 style="width:33.3%;height:.0625rem;" />
<div style="display: flex;flex:1">
<!-- <dv-decoration-8 :color="['#568aea', '#000000']" style="width:2.5rem;height:.625rem;" /> -->
<dv-decoration-8 :color="['#568aea', '#000000']" style="height:50px;" />
<div class="" style="min-width: 200px;font-size:20px">锐能BMS管理系统</div>
<dv-decoration-8
:reverse="true"
:color="['#568aea', '#000000']"
style="height:50px;"
/>
</div>
<dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" />
</div>
<div class="center tc"> <div class="center tc">
<div class="tit">{{time}}</div> <!-- <div class="des">锐能在线设备{{devCount}}</div> -->
<div class="des">锐能在线设备{{devCount}}</div> <!-- <div class="des">锐能BMS管理系统</div> -->
<div class="tit" style="color:#fff">{{time}}</div>
<div ref="bmap" id="main" style="width: 100%;height:60%;"></div>
<div>
<div style="display:flex;color:#fff">
<dv-border-box-12 style="width:200px;height:50px;line-height: 50px;overflow:hidden">dv-border-box-12</dv-border-box-12>
<dv-border-box-12 style="width:200px;height:50px;line-height: 50px;overflow:hidden">dv-border-box-12</dv-border-box-12>
<dv-border-box-12 style="width:200px;height:50px;line-height: 50px;overflow:hidden">dv-border-box-12</dv-border-box-12>
</div>
<div style="display:flex;color:#fff">
<dv-border-box-12 style="width:200px;height:50px;line-height: 50px;overflow:hidden">dv-border-box-12</dv-border-box-12>
<dv-border-box-12 style="width:200px;height:50px;line-height: 50px;overflow:hidden">dv-border-box-12</dv-border-box-12>
<dv-border-box-12 style="width:200px;height:50px;line-height: 50px;overflow:hidden">dv-border-box-12</dv-border-box-12>
</div>
</div>
</div> </div>
<div class="left column"> <div class="left column">
<dv-border-box-4 :color="['#00c2ff', '#568aea']" :reverse="true"><div ref="ticketAll" style="width: 100%;height:100%;"></div></dv-border-box-4>
<div style="height:20px"></div>
<dv-border-box-4 :color="['#00c2ff', '#568aea']" :reverse="true"><div ref="ticketAll" style="width: 100%;height:100%;"></div></dv-border-box-4>
<div style="height:20px"></div>
<dv-border-box-4 :color="['#00c2ff', '#568aea']" :reverse="true"><div ref="ticketAll" style="width: 100%;height:100%;"></div></dv-border-box-4>
<!-- <boxBoardBody class="flex">
<boxBoardTit slot="tit" tit="总览"></boxBoardTit>
<div ref="ticketAll" style="width: 100%;height:100%;"></div>
</boxBoardBody>
<div style="height:20px"></div>
<boxBoardBody class="flex"> <boxBoardBody class="flex">
<boxBoardTit slot="tit" tit="工单总览"></boxBoardTit> <boxBoardTit slot="tit" tit="工单总览"></boxBoardTit>
<div ref="ticketAll" style="width: 100%;height:100%;"></div> <div ref="ticketAll" style="width: 100%;height:100%;"></div>
</boxBoardBody> </boxBoardBody>
<div style="height:20px"></div> <div style="height:20px"></div>
<boxBoardBody class="flex"> <boxBoardBody class="flex">
<boxBoardTit slot="tit" tit="告警总览"></boxBoardTit> <boxBoardTit slot="tit" tit="设备趋势"></boxBoardTit>
<div ref="alarmAll" style="width: 100%;height:100%;"></div> <div ref="alarmAll" style="width: 100%;height:100%;"></div>
</boxBoardBody> </boxBoardBody> -->
</div> </div>
<div class="right column"> <div class="right column">
<div class="flex"></div> <!-- <div class="flex"></div>
<div style="height:20px"></div> -->
<dv-border-box-4 :color="['#00c2ff', '#568aea']"><div ref="alarmTrend" style="width: 100%;height:100%;"></div></dv-border-box-4>
<div style="height:20px"></div>
<dv-border-box-4 :color="['#00c2ff', '#568aea']"><div ref="alarmAll" style="width: 100%;height:100%;"></div></dv-border-box-4>
<div style="height:20px"></div>
<dv-border-box-4 :color="['#00c2ff', '#568aea']"><div ref="alarmTrend" style="width: 100%;height:100%;"></div></dv-border-box-4>
<!-- <boxBoardBody class="flex">
<boxBoardTit slot="tit" tit="设备类型"></boxBoardTit>
<div ref="alarmTrend" style="width: 100%;height:100%;"></div>
</boxBoardBody>
<div style="height:20px"></div>
<boxBoardBody class="flex">
<boxBoardTit slot="tit" tit="告警数据"></boxBoardTit>
<div ref="alarmAll" style="width: 100%;height:100%;"></div>
</boxBoardBody>
<div style="height:20px"></div> <div style="height:20px"></div>
<boxBoardBody class="flex"> <boxBoardBody class="flex">
<boxBoardTit slot="tit" tit="告警趋势"></boxBoardTit> <boxBoardTit slot="tit" tit="告警趋势"></boxBoardTit>
<div ref="alarmTrend" style="width: 100%;height:100%;"></div> <div ref="alarmTrend" style="width: 100%;height:100%;"></div>
</boxBoardBody> </boxBoardBody> -->
</div> </div>
</div> </div>
</div> </div>
@ -533,11 +586,12 @@ export default {
.left, .left,
.right { .right {
position: absolute; position: absolute;
top: 0; top: 30px;
width: 28vw; width: 28vw;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
overflow: hidden;
} }
.center { .center {
width: 30vw; width: 30vw;

View File

@ -1,57 +1,5 @@
<template> <template>
<section class="app-container"> <section class="app-container">
<!-- <el-form
ref="tableData"
:inline="true"
:model="tableHeader"
label-width="85px"
>
<el-row :gutter="20">
<el-col :span="4" class="grid-content">
<el-form-item label="派单编号:">
{{ tableHeader.id }}
</el-form-item>
</el-col>
<el-col :span="4" class="grid-content">
<el-form-item label="派单时间:">
{{ tableHeader.createTime | formatDate }}
</el-form-item>
</el-col>
<el-col :span="4" class="grid-content">
<el-form-item label="处理人:">
{{ tableHeader.nick_name }}
</el-form-item>
</el-col>
<el-col :span="4" class="grid-content">
<el-form-item label="提交时间:">
{{ tableHeader.updateTime | formatDate }}
</el-form-item>
</el-col>
<el-col :span="4" class="grid-content">
<el-form-item label="通过时间:">
{{ tableHeader.finishTime | formatDate }}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="派单备注:">
{{ tableHeader.note }}
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" @click="exportExcel">报表导出</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="驳回备注:">
{{ tableHeader.rejectNote }}
</el-form-item>
</el-row>
</el-form> -->
<!-- 表格区域 -->
<el-row style="margin-bottom:20px;text-align: right;"> <el-row style="margin-bottom:20px;text-align: right;">
<el-button type="primary" @click="exportExcel">报表导出</el-button> <el-button type="primary" @click="exportExcel">报表导出</el-button>
</el-row> </el-row>
@ -75,13 +23,11 @@
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand"> <el-form label-position="left" inline class="demo-table-expand">
<!-- <el-row> -->
<el-form-item label="处理结果:"> <el-form-item label="处理结果:">
<span>{{ <span>{{
props.row.writeForm.resultNote props.row.writeForm.resultNote
}}</span> </el-form-item }}</span> </el-form-item
><br /> ><br />
<!-- </el-row> -->
<el-row> <el-row>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="是否修复:"> <el-form-item label="是否修复:">
@ -125,11 +71,7 @@
></el-table-column> ></el-table-column>
<el-table-column align="center" label="地区" min-width="150"> <el-table-column align="center" label="地区" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{ scope.row.workInfo.proName + scope.row.workInfo.cityName + scope.row.workInfo.disName }}
scope.row.workInfo.proName +
scope.row.workInfo.cityName +
scope.row.workInfo.disName
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -140,7 +82,6 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="warningLevel"
align="center" align="center"
label="告警等级" label="告警等级"
min-width="100" min-width="100"
@ -192,7 +133,7 @@
<script> <script>
import FileSaver from 'file-saver'; import FileSaver from 'file-saver';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import { getOkInfo } from '@/api/work/orderHistory'; import { getOkInfo, exportExcelTxt } from '@/api/work/orderHistory';
export default { export default {
name: 'detail', name: 'detail',
data() { data() {
@ -232,39 +173,11 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
// exportExcel () {
// /* out-table关联导出的dom节点 */
// var wb = XLSX.utils.table_to_book(document.querySelector('#out-table'))
// /* get binary string as output */
// var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' })
// try {
// FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), '工单详情.xlsx')
// } catch (e) { if (typeof console !== 'undefined') console.log(e, wbout) }
// return wbout
// },
// },
exportExcel() { exportExcel() {
let time = new Date(); exportExcelTxt({ id: this.id }).then(({ code, msg }) => {
let year = time.getFullYear(); if (code !== 200) return this.$message.error(msg);
let month = time.getMonth() + 1; this.download(msg);
let day = time.getDate();
let name = year + '' + month + '' + day;
let xlsxParam = { raw: true };
var wb = XLSX.utils.table_to_book(document.querySelector('#out-table'),xlsxParam);
var wbout = XLSX.write(wb, {
bookType: 'xlsx',
bookSST: true,
type: 'array'
}); });
try {
FileSaver.saveAs(
new Blob([wbout], { type: 'application/octet-stream' }),
name + '.xlsx'
);
} catch (e) {
if (typeof console !== 'undefined') console.log(e, wbout);
}
return wbout;
} }
}, },
created() { created() {