From 0b49de88ce30aafdd346c85637b0d97841979589 Mon Sep 17 00:00:00 2001
From: mark <mark18340872469@163.com>
Date: 星期五, 11 十一月 2022 10:36:22 +0800
Subject: [PATCH] 添加数据报表模块
---
src/api/area.ts | 66 +
src/views/dataReport/components/reportDownload.vue | 595 ++++++++++++++++++++++++
src/views/hashrate/HashManage/components/HashCard.vue | 117 ++++
src/views/dataReport/components/dataReport.vue | 114 ++++
src/views/manageCenter/index.vue | 8
src/scripts/httpRequest.ts | 1
src/views/dataReport/components/alarmPush.vue | 401 ++++++++++++++++
src/views/dataReport/index.vue | 71 ++
src/router/index.js | 8
9 files changed, 1,348 insertions(+), 33 deletions(-)
diff --git a/src/api/area.ts b/src/api/area.ts
index a8ce2ad..f09af66 100644
--- a/src/api/area.ts
+++ b/src/api/area.ts
@@ -1,84 +1,106 @@
-import request from "@/scripts/httpRequest";
-import qs from "qs";
+import request from "@/scripts/httpRequest"
+import qs from "qs"
export const getLocalCameraTree = (data: any) => {
return request({
url: "/saas/api-s/area/localmenu",
method: "post",
data: data
- });
-};
+ })
+}
export const getGB28181CameraTree = (query: any) => {
return request({
url: "/saas/api-s/gb28181/tree",
method: "post",
data: query
- });
-};
+ })
+}
export const getClusterTree = (query: any) => {
return request({
url: "/data/api-v/camera/nodeCamera",
method: "get",
params: query
- });
-};
+ })
+}
export const addAreaTreeData = (query: any) => {
return request({
url: "/saas/api-s/area/add",
method: "post",
data: query
- });
-};
+ })
+}
export const delAreaTreeData = (query: any) => {
return request({
url: "/saas/api-s/area/del",
method: "post",
data: query
- });
-};
+ })
+}
export const updateAreaTreeData = (query: any) => {
return request({
url: "/saas/api-s/area/update",
method: "post",
data: query
- });
-};
+ })
+}
export const getCameraBaseImage = (data: any) => {
return request({
url: "/saas/api-s/gb28181/camera/capture",
method: "post",
data
- });
-};
+ })
+}
export const getGb28181Pool = (data) => {
return request({
url: "/saas/api-s/gb28181/treeSelected",
method: "post",
data
- });
-};
+ })
+}
export const refreshGB28181Tree = (data) => {
return request({
url: "/saas/api-s/gb28181/treeRefresh",
method: "post",
data
- });
-};
+ })
+}
export const updateCameraArea = (query: any) => {
return request({
url: "/data/api-v/camera/updateCameraArea",
method: "post",
data: qs.stringify(query)
- });
-};
+ })
+}
+// 鏁版嵁鎶ヨ〃
+export const reportFormGetFormType = () => {
+ return request({
+ url: "/saas/api-s/reportForm/getFormTypeList",
+ method: "get"
+ })
+}
+export const reportFormGetExport = (data) => {
+ return request({
+ url: "/saas/api-s/reportForm/getExportList",
+ method: "post",
+ data
+ })
+}
+
+export const reportFormExportForm = (data) => {
+ return request({
+ url: "/saas/api-s/reportForm/exportForm",
+ method: "post",
+ data
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index 8a736cd..2449678 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -139,6 +139,14 @@
}
},
{
+ path: "/dataReport",
+ name: "dataReport",
+ component: () => import(/* webpackChunkName: "about" */ "../views/dataReport"),
+ meta: {
+ title: "鏁版嵁鎶ヨ〃"
+ }
+ },
+ {
// 瀹炴椂鐩戞帶
path: "/video",
name: "video",
diff --git a/src/scripts/httpRequest.ts b/src/scripts/httpRequest.ts
index fad0a95..d13b461 100644
--- a/src/scripts/httpRequest.ts
+++ b/src/scripts/httpRequest.ts
@@ -12,6 +12,7 @@
/* //POST浼犲弬搴忓垪鍖�(娣诲姞璇锋眰鎷︽埅鍣�) */
Axios.interceptors.request.use(
(config) => {
+ console.log(config, "config")
if ((config.method === "post" && sessionStorage.getItem("clusterId")) || sessionStorage.getItem("devId")) {
if (!config.data) {
config.data = {}
diff --git a/src/views/dataReport/components/alarmPush.vue b/src/views/dataReport/components/alarmPush.vue
new file mode 100644
index 0000000..006450a
--- /dev/null
+++ b/src/views/dataReport/components/alarmPush.vue
@@ -0,0 +1,401 @@
+<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
new file mode 100644
index 0000000..ef3d96c
--- /dev/null
+++ b/src/views/dataReport/components/dataReport.vue
@@ -0,0 +1,114 @@
+<template>
+ <div style="padding: 20px;">
+ <el-tabs v-model="activeName">
+ <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>
+ </el-tab-pane>
+ <el-tab-pane name="point">
+ <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="createTime" label="鍒涘缓鏃堕棿"> </el-table-column> -->
+ <el-table-column label="鎿嶄綔">
+ <template slot-scope="scope">
+ <a :href="scope.row.url">{{ scope.row.url }}</a>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <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>
+ </el-tab-pane>
+ <!-- <el-tab-pane name="alarmPush">
+ <span slot="label"><i class="el-icon-phone"></i> 鎶ヨ涓婃姤鏃ュ織</span>
+ <alarmPush></alarmPush>
+ </el-tab-pane> -->
+ </el-tabs>
+ </div>
+</template>
+
+<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 {
+ page: 1,
+ size: 10, //鍒嗛〉鐩稿叧
+ total: 0, //鎬绘暟,
+
+ activeName: "reportDownload",
+ tableData: [],
+ titles: []
+ }
+ },
+ created() {},
+ mounted() {},
+ methods: {
+ refrash(page) {
+ this.page = page
+ this.lookUp()
+ },
+ handleSizeChange(size) {
+ this.size = size
+ this.lookUp()
+ },
+
+ async aaa() {
+ // console.log(row, "|row")
+ let query = {
+ FormType: "",
+ KeyWords: "",
+ StartTime: "",
+ EndTime: "",
+ Page: 10,
+ Size: 1
+ }
+ let res = await reportFormGetExport(query)
+ this.tableData = res.data.list
+ this.total = res.data.total
+
+ console.log(res, "r22222222222es")
+ }
+ // handleClick(row) {
+ // console.log(row, "row")
+ // }
+ }
+}
+</script>
+
+<style scoped lang="scss">
+.el-pagination ::v-deep {
+ margin-top: 30px;
+ margin-bottom: 30px;
+ text-align: center;
+ height: 24px;
+ .el-pagination__sizes {
+ margin-right: 0;
+ }
+}
+</style>
+
+<style></style>
diff --git a/src/views/dataReport/components/reportDownload.vue b/src/views/dataReport/components/reportDownload.vue
new file mode 100644
index 0000000..cb44b3f
--- /dev/null
+++ b/src/views/dataReport/components/reportDownload.vue
@@ -0,0 +1,595 @@
+<template>
+ <div class="sub-account">
+ <!-- <div class="add-title" @click="isShowAdd = false">
+ <span class="iconfont"></span>
+ <span>瀛愯处鎴风鐞�</span>
+ </div> -->
+ <div class="head-name" style="margin-bottom:20px">鑷畾涔夋暟鎹姤琛�</div>
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ :label-position="'left'"
+ ref="ruleForm"
+ label-width="120px"
+ class="add-ruleForm"
+ >
+ <el-form-item label="鎶ヨ〃鍚嶇О" prop="FileName">
+ <el-input
+ maxlength="15"
+ show-word-limit
+ v-model="ruleForm.FileName"
+ placeholder="璇疯緭鍏ユ姤琛ㄥ悕绉�"
+ style="width: 350px"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鎶ヨ〃绫诲瀷" prop="FormType">
+ <el-select @change="changeFormType" style="width: 350px" v-model="ruleForm.FormType" placeholder="璇烽�夋嫨">
+ <el-option v-for="item in formTypeOptions" :key="item.formType" :label="item.formName" :value="item.formType">
+ </el-option>
+ </el-select>
+ <!-- <el-input v-model="ruleForm.formType" placeholder="璇疯緭鍏ユ姤琛ㄧ被鍨�" style="width: 350px"></el-input> -->
+ </el-form-item>
+ <el-form-item label="鎶ヨ〃瀛楁閫夋嫨" prop="titles">
+ <el-select style="width: 350px" v-model="ruleForm.titles" multiple placeholder="">
+ <el-option v-for="(item, index) in titlesOptions" :key="index" :label="item" :value="item"> </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <!-- <div class="right">
+ <div class="button searchBtn" @click="saveUser">淇濆瓨</div>
+ <div class="button resetBtn" @click="resetUser">閲嶇疆</div>
+ <div class="button resetBtn" style="margin-left:20px" @click="goback">杩斿洖</div>
+ </div> -->
+ <div style="margin-left: 100px;">
+ <el-button @click="changeActive()" type="primary">鐢熸垚鎶ヨ〃</el-button>
+ </div>
+ </div>
+</template>
+
+<script>
+import { reportFormGetFormType, reportFormExportForm } from "@/api/area"
+import { getClusterDevList } from "@/api/clusterManage"
+
+export default {
+ props: {
+ activeName: String,
+ tableData: Array
+ },
+ data() {
+ return {
+ cluster_id: "",
+ titlesOptions: [],
+ formTypeOptions: [],
+ options: [],
+ value1: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
+ ruleForm: {
+ //y
+ FileName: "",
+ FormType: "",
+ titles: []
+ },
+ rules: {
+ FileName: [{ required: true, message: "璇疯緭鍏ユ姤琛ㄥ悕绉�", trigger: "blur" }],
+ FormType: [{ required: true, message: "璇烽�夋嫨鎶ヨ〃绫诲瀷", trigger: "change" }],
+ titles: [{ type: "array", required: true, message: "璇疯嚦灏戦�夋嫨涓�涓姤琛ㄥ瓧娈甸�夋嫨", trigger: "change" }]
+ // devCode: [{ required: true, message: "璇疯緭鍏ヨ澶囩紪鐮�", trigger: "blur" }],
+ // companyCode: [{ required: true, message: "璇疯緭鍏ヤ紒涓氱紪鐮�", trigger: "blur" }]
+ }
+ }
+ },
+ async created() {
+ const res = await getClusterDevList()
+ console.log(res, "res")
+ // sessionStorage.setItem("clusterId", res.data.clusterList[0].cluster_id)
+ this.cluster_id = res.data.clusterList[0].cluster_id
+ // let query = { pageIndex: this.page, pageSize: this.size, keyword: this.inputText }
+ // this.query = query
+
+ this.report()
+ // this.dataList = res.data
+ // this.total = res.total
+ },
+ mounted() {},
+ methods: {
+ submitForm(formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ alert("submit!")
+ } else {
+ console.log("error submit!!")
+ return false
+ }
+ })
+ },
+ changeFormType(val) {
+ console.log(val, "val")
+ let obj = this.formTypeOptions.find((item) => item.formType === val)
+ console.log(obj, "obj")
+ this.titlesOptions = obj.titles
+ this.ruleForm.titles = obj.titles
+ },
+ async report() {
+ let res = await reportFormGetFormType()
+ // console.log(res, "resres")
+ this.formTypeOptions = res.data.list
+ // this.ruleForm.formName = res.data.list[0].formName
+ // this.ruleForm.formType = res.data.list[0].formType
+ // this.options = res.data.list[0].titles
+ // this.ruleForm.titles = res.data.list[0].titles
+
+ // console.log(this.options, "this.options")
+ },
+ async changeActive() {
+ this.$refs["ruleForm"].validate((valid) => {
+ if (valid) {
+ // console.log(this.ruleForm.titles, "ruleForm.titles")
+ let query = {
+ ClusterId: this.cluster_id,
+ // DevId: row.id,
+ // ParentId: row.id,
+ FileName: this.ruleForm.FileName,
+ FormType: this.ruleForm.FormType,
+ Titles: this.ruleForm.titles
+ }
+ reportFormExportForm(query).then((res) => {
+ console.log(res, "res")
+ this.$emit("update:tableData", res.data.list)
+ this.$emit("aaa")
+ this.$emit("update:activeName", "point")
+ })
+ // 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
+ }
+ })
+ }
+ // async fetchDevicesList(val) {
+ // this.tbLoading = true
+ // if (val === 1) {
+ // let query = { pageIndex: this.page, pageSize: this.size, keyword: this.inputText }
+ // this.query = query
+ // let res = await getDevicesList(query)
+ // this.dataList = res.data
+ // this.total = res.total
+ // } else {
+ // let res = await getDevicesList(this.query)
+ // this.dataList = res.data
+ // this.total = res.total
+ // }
+ // setTimeout(() => {
+ // this.tbLoading = false
+ // }, 200)
+ // },
+ // delUser(row) {
+ // console.log(row, "row")
+ // this.$confirm("纭瑕佸垹闄よ澶囧悧, 鏄惁缁х画?", "鎻愮ず", {
+ // confirmButtonText: "纭畾",
+ // cancelButtonText: "鍙栨秷",
+ // type: "warning"
+ // }).then(async () => {
+ // let rsp = await devicesDelete({ id: row.id })
+ // if (rsp && rsp.success) {
+ // this.$message({
+ // type: "success",
+ // message: "鍒犻櫎鎴愬姛!"
+ // })
+ // }
+ // this.fetchDevicesList()
+ // })
+ // },
+ // //鍒嗛〉鍔熻兘
+ // handleSizeChange(size) {
+ // this.size = size
+ // this.fetchDevicesList(1)
+ // },
+ // //鍒嗛〉鍔熻兘
+ // refrash(page) {
+ // this.page = page
+ // this.fetchDevicesList(1)
+ // },
+ // addDevice() {
+ // this.isShowAdd = true
+ // this.tip = 1
+ // this.resetUser()
+ // }, //y
+ // resetUser() {
+ // //devName , devId , devIp, devCode, companyCode
+ // this.ruleForm = {
+ // devName: "",
+ // devId: "",
+ // devIp: "",
+ // devCode: "",
+ // companyCode: ""
+ // }
+ // },
+ // saveUser() {
+ // this.$refs["ruleForm"].validate((valid) => {
+ // if (valid) {
+ // if (this.tip === 1) {
+ // let params = {
+ // devName: this.ruleForm.devName,
+ // devId: this.ruleForm.devId,
+ // devIp: this.ruleForm.devIp,
+ // devCode: this.ruleForm.devCode,
+ // companyCode: this.ruleForm.companyCode
+ // }
+ // // console.log(params, "params")
+ // devicesCreate(params).then((res) => {
+ // // console.log(res, "res")
+ // if (res && res.success) {
+ // // Notification({
+ // // title: "鎴愬姛",
+ // // showClose: true,
+ // // message: res.data,
+ // // type: "success"
+ // // })
+ // this.$message({
+ // type: "success",
+ // message: res.data
+ // })
+ // this.goback()
+ // this.fetchDevicesList()
+ // }
+ // })
+ // } else if (this.tip === 2) {
+ // let params = {
+ // devName: this.ruleForm.devName,
+ // devId: this.ruleForm.devId,
+ // devIp: this.ruleForm.devIp,
+ // devCode: this.ruleForm.devCode,
+ // companyCode: this.ruleForm.companyCode,
+ // id: this.ruleForm.id,
+ // createdAt: this.ruleForm.createdAt,
+ // state: this.ruleForm.state,
+ // updatedAt: this.ruleForm.updatedAt
+ // }
+ // devicesUpdate(params).then((res) => {
+ // console.log(res, "res")
+ // if (res && res.success) {
+ // this.$message({
+ // type: "success",
+ // message: res.msg
+ // })
+ // this.goback()
+ // this.fetchDevicesList()
+ // }
+ // })
+ // }
+ // } else {
+ // return false
+ // }
+ // })
+ // },
+ // goback() {
+ // this.isShowAdd = false
+ // },
+ // editUser(row) {
+ // this.tip = 2
+ // this.isShowAdd = true
+ // this.ruleForm.devName = row.devName
+ // this.ruleForm.devId = row.devId
+ // this.ruleForm.devIp = row.devIp
+ // this.ruleForm.devCode = row.devCode
+ // this.ruleForm.companyCode = row.companyCode
+ // this.ruleForm.id = row.id
+ // this.ruleForm.createdAt = row.createdAt
+ // this.ruleForm.state = row.state
+ // this.ruleForm.updatedAt = row.updatedAt
+ // }
+ }
+}
+</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/index.vue b/src/views/dataReport/index.vue
new file mode 100644
index 0000000..f6b7ae8
--- /dev/null
+++ b/src/views/dataReport/index.vue
@@ -0,0 +1,71 @@
+<template>
+ <div class="data-report">
+ <!-- 椤靛ご -->
+ <IndexHeader :opacity="false"></IndexHeader>
+ <!-- 闈㈠寘灞� -->
+ <div class="breadcrumb">
+ <!-- <el-breadcrumb separator=">">
+ <el-breadcrumb-item :to="{ path: '/manageCenter' }">绠$悊涓績</el-breadcrumb-item>
+ <el-breadcrumb-item>鎺ㄩ�佺鐞�</el-breadcrumb-item>
+ </el-breadcrumb> -->
+ </div>
+
+ <!-- 涓昏鍐呭 -->
+ <div class="content">
+ <dataReport></dataReport>
+ </div>
+
+ <!-- 椤靛熬 -->
+ <!-- <Footer :isBlack="true"></Footer> -->
+ </div>
+</template>
+
+<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 {
+ components: {
+ IndexHeader,
+ dataReport
+ // SettingBox,
+ // Footer
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.data-report {
+ background-color: rgb(243, 245, 248);
+ position: relative;
+ min-height: 50vh;
+
+ .breadcrumb {
+ height: 10px;
+ }
+ .el-breadcrumb {
+ margin-top: 48px;
+ margin-bottom: 24px;
+
+ ::v-deep span {
+ color: #666;
+ }
+ }
+ .content {
+ min-height: 856px;
+ box-sizing: border-box;
+ background-color: #fff;
+ width: 1036px;
+ margin: 0 auto;
+ }
+ .Footer {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ }
+}
+</style>
diff --git a/src/views/hashrate/HashManage/components/HashCard.vue b/src/views/hashrate/HashManage/components/HashCard.vue
index 5a54f1f..c512a86 100644
--- a/src/views/hashrate/HashManage/components/HashCard.vue
+++ b/src/views/hashrate/HashManage/components/HashCard.vue
@@ -16,9 +16,7 @@
</div>
<div class="detail">
<div class="detailItem">
- <div class="label">
- <span class="iconfont"></span>鎵撳紑鍒嗘瀽寮�鍏�
- </div>
+ <div class="label"><span class="iconfont"></span>鎵撳紑鍒嗘瀽寮�鍏�</div>
<div class="data">
<span class="number">{{ hashrate.valid }}</span
>璺�
@@ -38,16 +36,56 @@
>璺�
</div>
</div>
- <div class="detailItem">
- <div class="label" title="鍥犳湭鐭ュ師鍥犳湭澶勭悊">
- <span class="iconfont"></span>鍥犳湭鐭ュ師鍥犳湭澶勭悊
- </div>
+ <div class="detailItem" @click="dialogVisible = true">
+ <div class="label" title="鍥犳湭鐭ュ師鍥犳湭澶勭悊"><span class="iconfont"></span>鍥犳湭鐭ュ師鍥犳湭澶勭悊</div>
<div class="data">
<span class="number">{{ hashrate.noDeal }}</span
>璺�
</div>
</div>
</div>
+ <el-dialog
+ title="寮傚父鏁版嵁鏌ヨ"
+ destroy-on-close
+ :visible.sync="dialogVisible"
+ width="40%"
+ :before-close="handleClose"
+ >
+ <!-- <div style="width: 600px">
+ v-if="dialogVisible"
+ </div> -->
+ <el-row :gutter="50">
+ <el-col :span="15">
+ <el-form label-width="140px">
+ <el-form-item label="鎽勫儚鏈哄悕绉�/閫氶亾鍙�">
+ <el-input placeholder="璇疯緭鍑烘憚鍍忔満鍚嶇О/閫氶亾鍙�" v-model="id"></el-input>
+ </el-form-item>
+ </el-form>
+ </el-col>
+ <el-col :span="9"><el-button type="primary">鏌ヨ</el-button></el-col>
+ </el-row>
+ <el-table :data="tableData" stripe style="width: 100%">
+ <el-table-column prop="date" label="鏃ユ湡" width="180"> </el-table-column>
+ <el-table-column prop="name" label="濮撳悕" width="180"> </el-table-column>
+ <el-table-column prop="address" label="鍦板潃"> </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>
+ <!-- <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="dialogVisible = false">纭� 瀹�</el-button>
+ </span> -->
+ </el-dialog>
</div>
</template>
@@ -55,12 +93,60 @@
export default {
props: {
type: {},
- hashrate: {},
+ hashrate: {}
},
data() {
- return {};
+ return {
+ page: 1,
+ size: 10, //鍒嗛〉鐩稿叧
+ total: 0, //鎬绘暟,
+
+ id: "",
+ dialogVisible: false,
+ tableData: [
+ {
+ date: "2016-05-02",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�"
+ },
+ {
+ date: "2016-05-04",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1517 寮�"
+ },
+ {
+ date: "2016-05-01",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�"
+ },
+ {
+ date: "2016-05-03",
+ name: "鐜嬪皬铏�",
+ address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�"
+ }
+ ]
+ }
},
-};
+ methods: {
+ refrash(page) {
+ this.page = page
+ this.lookUp()
+ },
+ handleSizeChange(size) {
+ this.size = size
+ this.lookUp()
+ },
+
+ handleClose(done) {
+ // this.dialogVisible = false
+ // this.$confirm("纭鍏抽棴锛�")
+ // .then((_) => {
+ done()
+ // })
+ // .catch((_) => {})
+ }
+ }
+}
</script>
<style lang="scss" scoped>
@@ -152,4 +238,13 @@
}
}
}
-</style>
\ No newline at end of file
+.el-pagination ::v-deep {
+ margin-top: 30px;
+
+ text-align: center;
+ height: 24px;
+ .el-pagination__sizes {
+ margin-right: 0;
+ }
+}
+</style>
diff --git a/src/views/manageCenter/index.vue b/src/views/manageCenter/index.vue
index 2681a49..97b7298 100644
--- a/src/views/manageCenter/index.vue
+++ b/src/views/manageCenter/index.vue
@@ -330,6 +330,14 @@
},
{
+ name: "鏁版嵁鎶ヨ〃",
+ icon: "/images/manageCenter/push.png",
+ openPath: "/dataReport",
+ path: "/dataReport",
+ permission: ""
+ },
+
+ {
name: "瀹炴椂鐩戞帶",
icon: "/images/manageCenter/video.png",
openPath: "/video",
--
Gitblit v1.8.0