From 610a3c14abbd833de453bf4fe4dc0ce771482681 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期五, 25 十一月 2022 14:24:35 +0800
Subject: [PATCH] 完善数据上报
---
/dev/null | 401 --------------------------------------------------
src/views/dataReport/components/reportDownload.vue | 11 -
src/views/dataReport/components/dataReport.vue | 41 ++--
src/views/dataReport/index.vue | 2
4 files changed, 22 insertions(+), 433 deletions(-)
diff --git a/src/views/dataReport/components/alarmPush.vue b/src/views/dataReport/components/alarmPush.vue
deleted file mode 100644
index 006450a..0000000
--- a/src/views/dataReport/components/alarmPush.vue
+++ /dev/null
@@ -1,401 +0,0 @@
-<template>
- <div class="sub-account">
- <div class="table-area">
- <el-table
- id="multipleTable"
- ref="multipleTable"
- :data="dataList"
- :fit="true"
- :default-sort="{ prop: 'createTime', order: 'descending' }"
- >
- <el-table-column prop="alarmDate" label="鎶ヨ鏃ユ湡" show-overflow-tooltip></el-table-column>
- <el-table-column prop="channelName" label="閫氶亾鍚嶇О" show-overflow-tooltip></el-table-column>
- <el-table-column prop="alarmType" label="鎶ヨ绫诲瀷" show-overflow-tooltip></el-table-column>
- <el-table-column prop="alarmAction" label="鎶ヨ鍔ㄤ綔" show-overflow-tooltip></el-table-column>
- <el-table-column prop="channelCode" label="閫氶亾缂栫爜" show-overflow-tooltip></el-table-column>
- <el-table-column prop="alarmImage" label="鍥剧墖鍦板潃" show-overflow-tooltip></el-table-column>
- <el-table-column prop="state" label="涓婃姤缁撴灉" show-overflow-tooltip>
- <template slot-scope="scope">
- <div v-if="scope.row.state == 0" class="status green">澶辫触</div>
- <div v-else class="status">鎴愬姛</div>
- </template>
- </el-table-column>
- <el-table-column prop="resultMsg" label="涓婃姤杩斿洖淇℃伅" show-overflow-tooltip></el-table-column>
-
- <!-- <el-table-column label="鎿嶄綔" align="center" width="100px">
- <template slot-scope="scope">
- <span class="iconfont option" @click="editUser(scope.row)">缂栬緫</span>
- <span class="iconfont option" style="color:red" @click="delUser(scope.row)">鍒犻櫎</span>
- </template>
- </el-table-column> -->
- </el-table>
- <div>
- <el-pagination
- @current-change="refrash"
- @size-change="handleSizeChange"
- :current-page="page"
- :page-size="size"
- layout="total, sizes, prev, pager, next, jumper"
- :page-sizes="[5, 10, 15, 20, 25]"
- :total="total"
- background
- ></el-pagination>
- </div>
- </div>
- </div>
-</template>
-
-<script>
-import { camerasReportLog } from "@/api/report"
-
-export default {
- data() {
- return {
- dataList: [],
- page: 1,
- size: 10, //鍒嗛〉鐩稿叧
- total: 0 //鎬绘暟,
- }
- },
- async created() {
- this.lookUp()
- // GET /api-a/v1/cameras/reportLog
- // 鍒嗛〉鏌ヨ涓婃姤鏃ュ織
- // alarmDate string // 鎶ヨ鏃ユ湡
- // channelName string // 璁惧鐨勭湡瀹炴姤璀﹂�氶亾鍚嶇О
- // alarmType string // 鎶ヨ绫诲瀷
- // alarmAction string // 鎶ヨ鍔ㄤ綔
- // channelCode string // 璁惧鐨勭湡瀹炴姤璀﹂�氶亾缂栫爜
- // alarmImage string // 鎶ヨ/閿�璀﹀浘鐗噓rl A閾炬帴
- // state int // 涓婃姤缁撴灉, 0 澶辫触 1 鎴愬姛
- // resultMsg string // 涓婃姤杩斿洖淇℃伅
- },
- mounted() {},
- methods: {
- handleSizeChange(size) {
- this.size = size
- this.lookUp()
- },
- //鍒嗛〉鍔熻兘
- refrash(page) {
- this.page = page
- this.lookUp()
- },
-
- async lookUp() {
- let res = await camerasReportLog({ pageIndex: this.page, pageSize: this.size })
- this.dataList = res.data
- this.total = res.total
- }
- }
-}
-</script>
-
-<style scoped lang="scss">
-.sub-account {
- padding: 20px;
- .head-name {
- font-weight: 700;
- font-size: 16px;
- line-height: 22px;
- color: #3d3d3d;
- border-left: 4px solid #0065ff;
- padding-left: 10px;
- }
- .add-title {
- font-weight: 700;
- font-size: 16px;
- cursor: pointer;
- line-height: 22px;
- color: #3d3d3d;
- margin-bottom: 30px;
- .iconfont {
- margin-right: 10px;
- }
- }
- .add-ruleForm::v-deep {
- .el-input__inner {
- color: #3d3d3d;
- border-radius: 4px;
- border-color: #c0c5cc;
- height: 32px;
- line-height: 32px;
- border-color: #c0c5cc;
- }
- .user-tree {
- .el-form-item__label:before {
- content: "*";
- color: #f52323;
- margin-right: 4px;
- }
- .el-form-item__content {
- display: flex;
- .tree-box {
- .t {
- height: 32px;
- background: #f0f5fa;
- border-radius: 3px 3px 0px 0px;
- line-height: 32px;
- text-align: center;
- border-bottom: 1px solid #c0c5cc;
- }
- width: 336px;
- height: 480px;
- border: 1px solid #c0c5cc;
- margin-right: 20px;
- box-sizing: border-box;
- }
- }
- }
- }
- .searchBtn {
- width: 50px;
- height: 25px;
- line-height: 25px;
- font-size: 14px;
- text-align: center;
- color: #fff;
- background: #0065ff;
- margin-right: 20px;
- }
- .right {
- display: flex;
- }
- .resetBtn {
- width: 50px;
- height: 25px;
- line-height: 25px;
- font-size: 14px;
- text-align: center;
- color: #0065ff;
- box-sizing: border-box;
- border: 1px solid #0065ff;
- }
- .search {
- display: flex;
- font-size: 14px;
- border-bottom: 1px solid #e9ebee;
- margin-top: 30px;
- padding-bottom: 20px;
- .left,
- .right,
- .id,
- .time,
- .cluster {
- display: flex;
- align-items: center;
- .el-select {
- width: auto;
- }
- }
-
- .id .el-input ::v-deep {
- width: 200px;
- }
-
- .cluster::v-deep .el-input {
- width: 300px;
-
- margin-left: 10px;
- margin-right: 20px;
- .el-input__icon {
- line-height: 32px;
- }
- input {
- border-radius: 0;
-
- &::-webkit-input-placeholder {
- color: #999;
- }
-
- &:focus {
- border-color: #0065ff;
- }
- }
- }
-
- .el-input ::v-deep {
- width: 200px;
- margin-left: 10px;
- margin-right: 20px;
- height: 32px;
- line-height: 32px;
- input {
- border-radius: 0;
- height: 32px;
- line-height: 32px;
- &::-webkit-input-placeholder {
- color: #999;
- }
-
- &:focus {
- border-color: #0065ff;
- }
- }
- }
-
- .el-date-editor {
- width: 318px;
- height: 40px;
- margin-left: 10px;
- margin-right: 20px;
- border-radius: 0;
-
- &::-webkit-input-placeholder {
- color: #999;
- }
-
- &.is-active {
- border-color: #0065ff;
- }
- }
- }
-
- .btns {
- display: flex;
- margin: 20px 0;
- text-align: center;
- .add {
- margin-right: 20px;
- width: 126px;
- height: 32px;
- background: #0065ff;
- color: #fff;
- span {
- margin-right: 5px;
- line-height: 32px;
- font-size: 14px;
- }
- }
-
- .export {
- width: 126px;
- height: 32px;
- border: 1px solid #0065ff;
- color: #0065ff;
- box-sizing: border-box;
- span {
- margin-right: 5px;
- line-height: 32px;
- font-size: 14px;
- }
- }
- }
-
- .el-table ::v-deep {
- background-color: rgb(233, 235, 238);
- padding: 1px;
-
- &::after {
- display: none;
- }
-
- td.index .cell {
- padding-left: 16px;
- padding-right: 4px;
- }
-
- .has-gutter tr th {
- background: #f0f3f5;
- font-size: 16px;
- color: #3d3d3d;
- font-weight: 700;
- }
-
- td .cell {
- color: #3d3d3d;
- }
-
- tr:hover > td.el-table__cell {
- background-color: #fff;
- }
-
- .el-table__row--striped .el-table__cell {
- background-color: #f0f5fa !important;
- }
- tr:hover > td.el-table__cell {
- background-color: #fff;
- }
-
- .el-table__row--striped .el-table__cell {
- background-color: #f0f5fa !important;
- }
-
- .status {
- color: #ff4b33;
-
- &.green {
- color: #36b24a;
- }
- }
-
- .option {
- margin-right: 10px;
- font-size: 14px;
- color: rgb(0, 101, 255);
- cursor: pointer;
- }
- }
-
- .el-pagination ::v-deep {
- margin-top: 30px;
- text-align: center;
- height: 24px;
- .el-pagination__sizes {
- margin-right: 0;
- }
-
- button {
- margin: 0;
- background-color: #fff;
- border: 1px solid #c0c5cc;
- border-radius: 2px;
- }
-
- .number {
- background-color: #fff;
-
- &:not(.disabled):hover {
- color: #0065ff;
- }
-
- &:not(.disabled).active {
- background-color: #0065ff;
- color: #fff;
- }
- }
-
- .el-input .el-input__inner {
- padding-left: 0;
-
- &:hover,
- &:focus {
- border-color: #0065ff;
- }
- }
- }
-
- .el-select ::v-deep {
- .el-select__tags-text {
- color: #3d3d3d;
- }
- }
-}
-</style>
-
-<style>
-.el-date-table td.start-date span,
-.el-date-table td.end-date span {
- background-color: #0065ff;
-}
-
-.el-button--text span {
- color: #0065ff;
-}
-
-.el-button.is-plain:hover,
-.el-button.is-plain:focus {
- color: #0065ff;
- border-color: #0065ff;
-}
-</style>
diff --git a/src/views/dataReport/components/dataReport.vue b/src/views/dataReport/components/dataReport.vue
index ef3d96c..c9466cf 100644
--- a/src/views/dataReport/components/dataReport.vue
+++ b/src/views/dataReport/components/dataReport.vue
@@ -1,21 +1,21 @@
<template>
<div style="padding: 20px;">
- <el-tabs v-model="activeName">
+ <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane name="reportDownload">
<span slot="label"><i class="el-icon-s-home"></i> 鑷畾涔夋姤琛�</span>
- <reportDownload :activeName.sync="activeName" @aaa="aaa" :tableData.sync="tableData"></reportDownload>
+ <reportDownload :activeName.sync="activeName" @commit="getFormList" :tableData.sync="tableData"></reportDownload>
</el-tab-pane>
- <el-tab-pane name="point">
+ <el-tab-pane name="formList">
<span slot="label"><i class="el-icon-s-platform"></i> 鎶ヨ〃涓嬭浇</span>
<div>
<el-table :data="tableData" stripe style="width: 100%">
- <el-table-column prop="formName" label="鎶ヨ〃鍚嶇О" width="180"> </el-table-column>
- <el-table-column prop="formType" label="鎶ヨ〃绫诲瀷" width="180"> </el-table-column>
- <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="280"> </el-table-column>
+ <el-table-column prop="formName" label="鎶ヨ〃鍚嶇О"> </el-table-column>
+ <el-table-column prop="formType" label="鎶ヨ〃绫诲瀷"> </el-table-column>
+ <el-table-column prop="createTime" label="鍒涘缓鏃堕棿"> </el-table-column>
<!-- <el-table-column prop="createTime" label="鍒涘缓鏃堕棿"> </el-table-column> -->
- <el-table-column label="鎿嶄綔">
+ <el-table-column label="鎿嶄綔" width="100">
<template slot-scope="scope">
- <a :href="scope.row.url">{{ scope.row.url }}</a>
+ <a :href="scope.row.url">{{ "涓嬭浇" }}</a>
</template>
</el-table-column>
</el-table>
@@ -43,15 +43,11 @@
<script>
import reportDownload from "./reportDownload.vue"
-// import point from "./point.vue"
-// import alarmPush from "./alarmPush.vue"
import { addAreaTreeData, reportFormGetExport } from "@/api/area"
export default {
components: {
reportDownload
- // point,
- // alarmPush
},
data() {
return {
@@ -69,32 +65,33 @@
methods: {
refrash(page) {
this.page = page
- this.lookUp()
+ this.getFormList()
},
handleSizeChange(size) {
this.size = size
- this.lookUp()
+ this.getFormList()
},
- async aaa() {
+ async getFormList() {
// console.log(row, "|row")
let query = {
FormType: "",
KeyWords: "",
StartTime: "",
EndTime: "",
- Page: 10,
- Size: 1
+ Page: this.page,
+ Size: this.size
}
let res = await reportFormGetExport(query)
this.tableData = res.data.list
this.total = res.data.total
-
- console.log(res, "r22222222222es")
+ },
+ handleClick(tab,event) {
+ console.log(tab, event)
+ if (tab.name == "formList") {
+ this.getFormList()
+ }
}
- // handleClick(row) {
- // console.log(row, "row")
- // }
}
}
</script>
diff --git a/src/views/dataReport/components/reportDownload.vue b/src/views/dataReport/components/reportDownload.vue
index cb44b3f..86a0934 100644
--- a/src/views/dataReport/components/reportDownload.vue
+++ b/src/views/dataReport/components/reportDownload.vue
@@ -133,15 +133,10 @@
}
reportFormExportForm(query).then((res) => {
console.log(res, "res")
- this.$emit("update:tableData", res.data.list)
- this.$emit("aaa")
- this.$emit("update:activeName", "point")
+ // this.$emit("update:tableData", res.data.list)
+ this.$emit("commit")
+ this.$emit("update:activeName", "formList")
})
- // let res = await reportFormExportForm(query)
-
- // console.log(this.activeName, "activeName")
- // this.$emit("update:titles", this.ruleForm.titles)
- // console.log(this.activeName, "activeName")
} else {
console.log("error submit!!")
return false
diff --git a/src/views/dataReport/index.vue b/src/views/dataReport/index.vue
index f6b7ae8..5017409 100644
--- a/src/views/dataReport/index.vue
+++ b/src/views/dataReport/index.vue
@@ -22,9 +22,7 @@
<script>
import IndexHeader from "@/components/IndexHeader"
-// import DevList from "@/views/report/components/DevList"
import dataReport from "./components/dataReport.vue"
-// import SettingBox from "@ /views/report/components/SettingBox"
import Footer from "@/components/Footer"
export default {
--
Gitblit v1.8.0