
5 changed files with 355 additions and 523 deletions
@ -0,0 +1,335 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<button-bar ref="btnbar" view-title="每日回款核对记录" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" :model="queryParams" class="tab-header"> |
||||
|
<el-form-item label="数据日期"> |
||||
|
<el-date-picker v-model="queryParams.params.dataDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据开始日期" /> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="queryParams.params.dataDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据结束日期" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit" /> |
||||
|
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"> |
||||
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column prop="orderDate" label="数据日期" align="center" width="200" /> |
||||
|
<el-table-column prop="createTime" label="导入时间" align="center" width="200" /> |
||||
|
<el-table-column prop="allNum" label="总记录数" align="center" width="200" /> |
||||
|
<el-table-column prop="validNum" label="普通商品数" align="center" width="200" /> |
||||
|
<el-table-column prop="errRowNum" label="烟草商品数" align="center" width="200" /> |
||||
|
<el-table-column label="操作" wid align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div v-if="scope.row.state==1"><el-tag type="info">正在导入数据库...</el-tag><el-button type="text" icon="el-icon-refresh" style="margin-left: 5px;" @click="loadList()">刷新</el-button></div> |
||||
|
<div v-else-if="scope.row.state==2"><el-tag type="warning">正在创建报表...</el-tag><el-button type="text" icon="el-icon-refresh" style="margin-left: 5px;" @click="loadList()">刷新</el-button></div> |
||||
|
<div v-else-if="scope.row.state==3"><el-tag type="success">正在生成Excel...</el-tag><el-button type="text" icon="el-icon-refresh" style="margin-left: 5px;" @click="loadList()">刷新</el-button></div> |
||||
|
<el-button v-else-if="scope.row.state==4&&scope.row.fileUrl.length>1" type="text" @click="toDownload(scope.row)">下载库存日报表</el-button> |
||||
|
<div v-else>没有报表文件</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination |
||||
|
v-show="dataList.length > 0" |
||||
|
:total="queryParams.total" |
||||
|
:page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" |
||||
|
class="pagination" |
||||
|
@pagination="loadList" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<el-dialog title="上传《汇融银行_按日汇总对账报表.xlsx》" :visible.sync="dialogVisible" width="60%" :before-close="dialogClose"> |
||||
|
<el-card class="box-card"> |
||||
|
<div> |
||||
|
<el-upload |
||||
|
ref="upload" |
||||
|
class="upload-demo" |
||||
|
:action="updateAction" |
||||
|
:on-progress="handleProgress" |
||||
|
:on-success="handleSuccess" |
||||
|
:file-list="fileList" |
||||
|
:auto-upload="true" |
||||
|
:multiple="false" |
||||
|
:limit="1" |
||||
|
> |
||||
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
||||
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> |
||||
|
<div slot="tip" class="el-upload__tip">上传 《汇融银行_库存信息查询.xlsx》文件</div> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h3>文件上传结果</h3> |
||||
|
<el-card class="box-card"> |
||||
|
<div>{{ uploadResultMesssage }}</div> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h3>库存汇总数据</h3> |
||||
|
<el-card class="box-card"> |
||||
|
<div>{{ hzResultMesssage }}</div> |
||||
|
<div> |
||||
|
<el-button :disabled="!hzFilePath" size="small" type="primary" @click="doDownloadHz">下载库存汇总文件</el-button> |
||||
|
<!-- <el-button :disabled="!ychzFilePath" size="small" type="primary" @click="doDownloadHzYc">下载烟草汇总文件</el-button> --> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import req from '@/api/supervise/gdinventorylog' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DaydatauploadCash', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
dataDateStart: '', |
||||
|
dataDateEnd: '' |
||||
|
} |
||||
|
}, |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'upload', |
||||
|
btnKey: 'showUploadXlsx', |
||||
|
btnLabel: '上传按日汇总对账报表' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
dialogVisible: false, |
||||
|
updateAction: '/api/customer' + '/csmcash/uploadGdData', |
||||
|
name: '库存数据导入', |
||||
|
fileList: [], |
||||
|
uploadResultMesssage: '', |
||||
|
hzResultMesssage: '', |
||||
|
hzFilePath: '', |
||||
|
ychzFilePath: '', |
||||
|
fullscreenloading: null |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'showUploadXlsx': |
||||
|
this.showUploadXlsx() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
dataDateStart: '', |
||||
|
dataDateEnd: '' |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
loadList() { |
||||
|
req.listPage(this.queryParams).then(res => { |
||||
|
this.queryParams.total = res.data.total |
||||
|
this.dataList = res.data.records |
||||
|
}).catch(e => { |
||||
|
console.log('GdinventoryLog-loadList-ee:', e) |
||||
|
}) |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
showUploadXlsx() { |
||||
|
this.dialogVisible = true |
||||
|
}, |
||||
|
dialogClose() { |
||||
|
this.currentLog = {} |
||||
|
this.fileList = [] |
||||
|
this.filecandown = true |
||||
|
this.dialogVisible = false |
||||
|
}, |
||||
|
// 返回 |
||||
|
handleReturn() { |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
submitUpload() { |
||||
|
this.$refs.upload.submit() |
||||
|
}, |
||||
|
handleProgress(event, file, fileList) { |
||||
|
const _this = this |
||||
|
this.fullscreenloading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: '文件正在上传', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
console.log('111', event.percent) |
||||
|
if (event.percent >= 100) { |
||||
|
_this.fullscreenloading.text = '上传完成,正在导入数据库' |
||||
|
} |
||||
|
}, |
||||
|
handleSuccess(resp, file, fileList) { |
||||
|
// if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// this.fullscreenloading = null |
||||
|
console.log('222', resp) |
||||
|
const rdata = resp.data |
||||
|
const _this = this |
||||
|
if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
this.fullscreenloading = null |
||||
|
_this.uploadResultMesssage = '文件上传完成,正在进行数据整理~' |
||||
|
_this.loadList() |
||||
|
setTimeout(function() { |
||||
|
_this.dialogClose() |
||||
|
}, 3000) |
||||
|
// _this.fullscreenloading.text = '数据导入完成,正在生成报表~' |
||||
|
// this.fileList = [] |
||||
|
// _this.uploadResultMesssage = '共导入数据:' + rdata.allNum + ' 条;普通商品数据:' + rdata.validNum + ' 条;烟草商品数据:' + rdata.errRowNum + ' 条;用时:' + rdata.durations + ' 毫秒。' |
||||
|
// const param = { |
||||
|
// orderDate: rdata.orderDate |
||||
|
// } |
||||
|
// req.kcReport(param) |
||||
|
// .then(res => { |
||||
|
// console.log('333', res) |
||||
|
// _this.fullscreenloading.text = '报表数据完成,创建Excel文件' |
||||
|
|
||||
|
// req.kcExcel({ logid: rdata.id }) |
||||
|
// .then(res => { |
||||
|
// if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// this.fullscreenloading = null |
||||
|
// console.log('444', res) |
||||
|
// _this.hzFilePath = res.data.fileUrl |
||||
|
// }) |
||||
|
// .catch(e => { |
||||
|
// if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// this.fullscreenloading = null |
||||
|
// }) |
||||
|
// }) |
||||
|
// .catch(e => { |
||||
|
// if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// this.fullscreenloading = null |
||||
|
// }) |
||||
|
}, |
||||
|
toDownload(row) { |
||||
|
console.log('lll', row) |
||||
|
if (row.fileUrl) { |
||||
|
window.open(row.fileUrl, '_blank') |
||||
|
} |
||||
|
}, |
||||
|
doDownloadHz() { |
||||
|
window.open(this.hzFilePath, '_blank') |
||||
|
// downloadhz({ filepath: this.hzFilePath }) |
||||
|
// .then(res => { |
||||
|
// console.log('xxx', res) |
||||
|
// const blob = new Blob([res.data]) |
||||
|
// const url = window.URL.createObjectURL(blob) // 创建 url 并指向 blob |
||||
|
// const a = document.createElement('a') |
||||
|
// a.href = url |
||||
|
// a.download = '导出数据.xlsx' |
||||
|
// a.click() |
||||
|
// window.URL.revokeObjectURL(url) // 释放该 ur |
||||
|
// }) |
||||
|
// .catch(e => { |
||||
|
// console.log(e) |
||||
|
// }) |
||||
|
}, |
||||
|
doDownloadHzYc() { |
||||
|
window.open(this.ychzFilePath, '_blank') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.wenjiantit { |
||||
|
font-size: 16px; |
||||
|
font-weight: bold; |
||||
|
margin: 25px 0 10px 0; |
||||
|
} |
||||
|
|
||||
|
.forminfo { |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
} |
||||
|
|
||||
|
.listcon { |
||||
|
height: calc(100vh - 250px); |
||||
|
overflow-y: auto; |
||||
|
overflow-x: hidden; |
||||
|
} |
||||
|
</style> |
@ -1,517 +0,0 @@ |
|||||
<template> |
|
||||
|
|
||||
<div class="index" style="height: calc(100vh - 200px);overflow-x: hidden;overflow-y: auto;"> |
|
||||
|
|
||||
<div class="index_top"> |
|
||||
|
|
||||
<div style="flex: 1;"> |
|
||||
<span class="index_top_text" @click="show">数据总览</span> |
|
||||
<el-date-picker v-model="params.date" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"> |
|
||||
</el-date-picker> |
|
||||
</div> |
|
||||
|
|
||||
<div class="index_top_right">{{info.notice}}</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div class="index_content"> |
|
||||
|
|
||||
<div class="index_content_top"> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
|
||||
|
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
|
||||
<span style="font-size: 20px;">¥27608927.45</span> |
|
||||
<div style="margin-top: 10px;"> |
|
||||
<span style="font-size: 14px;color: #999;">常规商品销售额</span> |
|
||||
<span style="font-size: 14px; margin-left: 10px; color: #13BDA0 ;">↑ 25.6%</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="flex: 0.3;"></div> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
|
||||
|
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
|
||||
<span style="font-size: 20px;">¥1244255.22</span> |
|
||||
<div style="margin-top: 10px;"> |
|
||||
<span style="font-size: 14px;color: #999;">烟草商品销售额</span> |
|
||||
<span style="font-size: 14px; margin-left: 10px; color: #13BDA0 ;">↑ 9.8%</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="flex: 0.3;"></div> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
|
||||
|
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
|
||||
<span style="font-size: 20px;">¥636449.84</span> |
|
||||
<div style="margin-top: 10px;"> |
|
||||
<span style="font-size: 14px;color: #999;">库存总价值</span> |
|
||||
<span style="font-size: 14px; margin-left: 10px; color: #FF4747 ;">↓ 15.6%</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="flex: 0.3;"></div> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
|
||||
|
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
|
||||
<span style="font-size: 20px;">¥3822945.45</span> |
|
||||
<div style="margin-top: 10px;"> |
|
||||
<span style="font-size: 14px;color: #999;">在途货物总价值</span> |
|
||||
<span style="font-size: 14px; margin-left: 10px; color: #FF4747 ;">↓ 15.6%</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<div class="index_content_bottom"> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
|
||||
<span style="font-weight: 600;">阀值分析</span> |
|
||||
<div id="main1" ref="main1" class="middle"> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div style="flex: 0.1;"></div> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
|
||||
<span style="font-weight: 600;">在途货物分析</span> |
|
||||
<div id="main2" ref="main2" class="middle"> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<div class="index_bottom"> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 0.4;"> |
|
||||
<div style="display: flex;flex-direction: row; justify-content: space-between; align-items: center;"> |
|
||||
<span style="font-weight: 600;">快捷操作</span> |
|
||||
<span style="color: #4386FF; font-size: 13px; text-decoration: underline;">查看更多</span> |
|
||||
</div> |
|
||||
|
|
||||
<div style="display: flex;align-items: center; margin-top: 10px;"> |
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
<span style="font-weight: 500;margin-left: 10px;">采购申请</span> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="display: flex;align-items: center; margin-top: 10px;"> |
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
<span style="font-weight: 500;margin-left: 10px;">用款申请</span> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="display: flex;align-items: center; margin-top: 10px;"> |
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
<span style="font-weight: 500;margin-left: 10px;">供应商管理</span> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="display: flex;align-items: center; margin-top: 10px;"> |
|
||||
<img src="../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
|
||||
<span style="font-weight: 500;margin-left: 10px;">数据上报</span> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="flex: 0.1;"></div> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
|
||||
<div style="display: flex;flex-direction: row; justify-content: space-between; align-items: center;"> |
|
||||
<span style="font-weight: 600;">最新消息</span> |
|
||||
<span style="color: #4386FF; font-size: 13px; text-decoration: underline;">查看更多</span> |
|
||||
</div> |
|
||||
|
|
||||
<div style="margin-top: 20px;" v-for="(item, index) in newMessageList" :key="index"> |
|
||||
<div |
|
||||
style="display: flex;flex-direction: row; justify-content: space-between; align-items: center; padding-top: 20px;" |
|
||||
@click="companyInfo(item.sid)"> |
|
||||
<span |
|
||||
style="font-size: 16px;color: #444;overflow: hidden;margin-right:20px;flex: 1;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 1 ;-webkit-box-orient: vertical;">{{ item.name }}</span> |
|
||||
<span style="font-size: 13px;color: #999;">{{ item.date }}</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div style="flex: 0.1;"></div> |
|
||||
|
|
||||
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
|
||||
<div style="display: flex;flex-direction: row; justify-content: space-between; align-items: center;"> |
|
||||
<span style="font-weight: 600;">警报中心</span> |
|
||||
<span style="color: #4386FF; font-size: 13px; text-decoration: underline;">查看更多</span> |
|
||||
</div> |
|
||||
|
|
||||
<div style="margin-top: 20px;" v-for="(item, index) in larmCenterList" :key="index"> |
|
||||
<div |
|
||||
style="display: flex;flex-direction: row; justify-content: space-between; align-items: center; padding-top: 20px;" |
|
||||
@click="companyInfo(item.sid)"> |
|
||||
<span style="font-size: 16px;color: #444;overflow: hidden;margin-right:20px;flex: 1; |
|
||||
text-overflow: ellipsis; |
|
||||
display: -webkit-box; |
|
||||
-webkit-line-clamp: 1 ; |
|
||||
-webkit-box-orient: vertical;">{{ item.name }}</span> |
|
||||
<span style="font-size: 13px;color: #999;">{{ item.date }}</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
</div> |
|
||||
<script> |
|
||||
import * as echarts from 'echarts'; |
|
||||
import { |
|
||||
login1 |
|
||||
} from '@/api/system/user/login.js' |
|
||||
export default { |
|
||||
name: '', |
|
||||
data() { |
|
||||
return { |
|
||||
token: '', |
|
||||
params: { |
|
||||
date: null |
|
||||
}, |
|
||||
info: { |
|
||||
date: "", |
|
||||
notice: "通知:请于2023年3月3日16点向***3189帐户回款1231234元。[点击回款]" |
|
||||
}, |
|
||||
newMessageList: [{ |
|
||||
sid: "1", |
|
||||
name: "[消息]您的订单已经审核完毕等待放款。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
}, { |
|
||||
sid: "2", |
|
||||
name: "[通知]通知仓库商品产生1级风险,请及时做出回复。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
}, { |
|
||||
sid: "3", |
|
||||
name: "[消息]您的订单由于商品不存在被退回。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
}, { |
|
||||
sid: "4", |
|
||||
name: "[消息]请于2023年3月3日16点向***3189帐户回款231234元。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
}], |
|
||||
larmCenterList: [{ |
|
||||
sid: "1", |
|
||||
name: "仓库于2023年3月3日产生1级风险。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
}, { |
|
||||
sid: "2", |
|
||||
name: "[通知]通知仓库商品产生1级出回复。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
}, { |
|
||||
sid: "3", |
|
||||
name: "[消息]您的订单由于商品不存在被退回。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
}, { |
|
||||
sid: "4", |
|
||||
name: "[消息]请于2**3189帐户回款231234元。", |
|
||||
date: "2023-01-01" |
|
||||
|
|
||||
} |
|
||||
|
|
||||
] |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.drawLine1(); |
|
||||
this.drawLine2(); |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
show() { |
|
||||
this.drawLine1(); |
|
||||
this.drawLine2(); |
|
||||
}, |
|
||||
drawLine1() { |
|
||||
|
|
||||
// let mychart = echarts.init(this.$refs.main1) |
|
||||
var myChart = echarts.init(document.getElementById('main1')); |
|
||||
// 绘制图表 |
|
||||
myChart.setOption({ |
|
||||
tooltip: { |
|
||||
trigger: 'axis', |
|
||||
axisPointer: { |
|
||||
type: 'cross', |
|
||||
crossStyle: { |
|
||||
color: '#999' |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
toolbox: { |
|
||||
feature: { |
|
||||
dataView: { |
|
||||
// 数据视图 |
|
||||
show: false, |
|
||||
readOnly: false |
|
||||
}, |
|
||||
magicType: { |
|
||||
// 切换图形 |
|
||||
show: false, |
|
||||
type: ['line', 'bar'] |
|
||||
}, |
|
||||
// 还原 |
|
||||
restore: { |
|
||||
show: false |
|
||||
}, |
|
||||
// 下载 |
|
||||
saveAsImage: { |
|
||||
show: false |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
grid: { |
|
||||
height: 220 |
|
||||
}, |
|
||||
legend: { |
|
||||
data: ['仓库货值', '在途货值', '阀值'] |
|
||||
}, |
|
||||
xAxis: [{ |
|
||||
type: 'category', |
|
||||
data: ['1-1', '1-2', '1-3', '1-4', '1-5', '1-6', '1-7'], |
|
||||
axisPointer: { |
|
||||
type: 'shadow' |
|
||||
} |
|
||||
}], |
|
||||
yAxis: [{ |
|
||||
type: 'value', |
|
||||
name: '人民币/万元', |
|
||||
min: 0, |
|
||||
max: 250, |
|
||||
interval: 50, |
|
||||
axisLabel: { |
|
||||
formatter: '{value}' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
type: 'value', |
|
||||
name: '百分比%', |
|
||||
min: 0, |
|
||||
max: 25, |
|
||||
interval: 5, |
|
||||
axisLabel: { |
|
||||
formatter: '{value}' |
|
||||
} |
|
||||
} |
|
||||
], |
|
||||
series: [{ |
|
||||
name: '仓库货值', |
|
||||
type: 'bar', |
|
||||
tooltip: { |
|
||||
valueFormatter: function(value) { |
|
||||
return value + ' 万元'; |
|
||||
} |
|
||||
}, |
|
||||
data: [ |
|
||||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3 |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
name: '在途货值', |
|
||||
type: 'bar', |
|
||||
tooltip: { |
|
||||
valueFormatter: function(value) { |
|
||||
return value + ' 万元'; |
|
||||
} |
|
||||
}, |
|
||||
data: [ |
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
name: '阀值', |
|
||||
type: 'line', |
|
||||
yAxisIndex: 1, |
|
||||
tooltip: { |
|
||||
valueFormatter: function(value) { |
|
||||
return value + ' %'; |
|
||||
} |
|
||||
}, |
|
||||
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2] |
|
||||
} |
|
||||
] |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 饼状图图初始化 |
|
||||
drawLine2() { |
|
||||
// 基于准备好的dom,初始化echarts实例 |
|
||||
// let mychart = echarts.init(this.$refs.main2) |
|
||||
var myChart = echarts.init(document.getElementById('main2')); |
|
||||
// 绘制图表 |
|
||||
// console.log('option', obj) |
|
||||
myChart.setOption({ |
|
||||
legend: { |
|
||||
top: 'bottom' |
|
||||
}, |
|
||||
toolbox: { |
|
||||
show: true, |
|
||||
feature: { |
|
||||
mark: { |
|
||||
show: true |
|
||||
}, |
|
||||
// 数据图标 |
|
||||
dataView: { |
|
||||
show: false, |
|
||||
readOnly: false |
|
||||
}, |
|
||||
// 刷新图标 |
|
||||
restore: { |
|
||||
show: false |
|
||||
}, |
|
||||
// 下载图标 |
|
||||
saveAsImage: { |
|
||||
show: false |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
tooltip: { |
|
||||
show: true, |
|
||||
trigger: "item" |
|
||||
}, |
|
||||
series: [{ |
|
||||
name: '在途货物分析', |
|
||||
type: 'pie', |
|
||||
radius: [20, 100], |
|
||||
center: ['50%', '40%'], |
|
||||
roseType: 'area', |
|
||||
itemStyle: { |
|
||||
borderRadius: 8 |
|
||||
}, |
|
||||
data: [{ |
|
||||
"value": 2313123, |
|
||||
"name": "订单总额" |
|
||||
}, |
|
||||
{ |
|
||||
"value": 4359354, |
|
||||
"name": "实际到货价值" |
|
||||
}, |
|
||||
{ |
|
||||
"value": 2313123, |
|
||||
"name": "在途货价值" |
|
||||
}, |
|
||||
{ |
|
||||
"value": 2313123, |
|
||||
"name": "超出价值" |
|
||||
} |
|
||||
] |
|
||||
}] |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// getToken(){ |
|
||||
// let params = { |
|
||||
// password: "329653", |
|
||||
// roleSid: "", |
|
||||
// token: "", |
|
||||
// userName: "15097329653", |
|
||||
// verifyCode: "" |
|
||||
// } |
|
||||
// login1(params).then(res => { |
|
||||
// this.token = res.data.token |
|
||||
// window.sessionStorage.setItem('token', res.data.token) |
|
||||
// }) |
|
||||
// } |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped> |
|
||||
.imgDemo { |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
background: radial-gradient(#fff, #f5f7f4, #fff); |
|
||||
} |
|
||||
|
|
||||
.middle { |
|
||||
justify-content: center; |
|
||||
width: 100%; |
|
||||
height: 300px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
.index { |
|
||||
padding: 40px 80px; |
|
||||
background: #FFFFFF; |
|
||||
|
|
||||
.index_top { |
|
||||
|
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
align-items: center; |
|
||||
|
|
||||
.index_top_text { |
|
||||
font-size: 25px; |
|
||||
font-weight: bold; |
|
||||
color: #000; |
|
||||
margin-right: 20px; |
|
||||
} |
|
||||
|
|
||||
.index_top_right { |
|
||||
font-size: 14px; |
|
||||
font-weight: bold; |
|
||||
color: #FF5046; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.index_content { |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
margin-top: 30px; |
|
||||
|
|
||||
.index_content_top { |
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
} |
|
||||
|
|
||||
.index_content_bottom { |
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
margin-top: 30px; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.index_bottom { |
|
||||
margin-top: 20px; |
|
||||
display: flex; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
canvas {} |
|
||||
</style> |
|
Loading…
Reference in new issue