From 7140557b02184f19f48439a97b29b82bbfa8d24c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com>
Date: Wed, 13 Sep 2023 10:54:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=A4=E7=A7=8D=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 4 +-
.../zongzhi/netSecurity/DataSourceTj/index.js | 53 +++
src/api/zongzhi/netSecurity/sgjtj/index.js | 53 +++
src/views/netSecurity/DataSourceTj/index.vue | 377 +++++++++++++++-
src/views/netSecurity/sgjtj/index.vue | 419 +++++++++++++++++-
5 files changed, 896 insertions(+), 10 deletions(-)
create mode 100644 src/api/zongzhi/netSecurity/DataSourceTj/index.js
create mode 100644 src/api/zongzhi/netSecurity/sgjtj/index.js
diff --git a/.env.development b/.env.development
index 02df1c9..19487bd 100644
--- a/.env.development
+++ b/.env.development
@@ -8,10 +8,10 @@ ENV = 'development'
# VUE_APP_BASE_API = 'https://vue.ruoyi.vip/prod-api'
#公司接口
-VUE_APP_BASE_API = 'http://39.101.188.84:9027'
+# VUE_APP_BASE_API = 'http://39.101.188.84:9027'
#局域网
-# VUE_APP_BASE_API = 'http://192.168.0.108:9027'
+VUE_APP_BASE_API = 'http://localhost:9027'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
diff --git a/src/api/zongzhi/netSecurity/DataSourceTj/index.js b/src/api/zongzhi/netSecurity/DataSourceTj/index.js
new file mode 100644
index 0000000..8e9178e
--- /dev/null
+++ b/src/api/zongzhi/netSecurity/DataSourceTj/index.js
@@ -0,0 +1,53 @@
+import request from "@/utils/request";
+
+// 查询数据来源统计列表
+export function listSourceTj(query) {
+ return request({
+ url: "/zongzhi/sourceTj/list",
+ method: "get",
+ params: query,
+ });
+}
+
+// 查询数据来源统计详细
+export function getSourceTj(id) {
+ return request({
+ url: "/zongzhi/sourceTj/" + id,
+ method: "get",
+ });
+}
+
+// 新增数据来源统计
+export function addSourceTj(data) {
+ return request({
+ url: "/zongzhi/sourceTj",
+ method: "post",
+ data: data,
+ });
+}
+
+// 修改数据来源统计
+export function updateSourceTj(data) {
+ return request({
+ url: "/zongzhi/sourceTj",
+ method: "put",
+ data: data,
+ });
+}
+
+// 删除数据来源统计
+export function delSourceTj(id) {
+ return request({
+ url: "/zongzhi/sourceTj/" + id,
+ method: "delete",
+ });
+}
+
+// 导出数据来源统计
+export function exportSourceTj(data) {
+ return request({
+ url: "/zongzhi/sourceTj/export",
+ method: "post",
+ data,
+ });
+}
diff --git a/src/api/zongzhi/netSecurity/sgjtj/index.js b/src/api/zongzhi/netSecurity/sgjtj/index.js
new file mode 100644
index 0000000..9a1b3c3
--- /dev/null
+++ b/src/api/zongzhi/netSecurity/sgjtj/index.js
@@ -0,0 +1,53 @@
+import request from "@/utils/request";
+
+// 查询安全监测受攻击统计列表
+export function listTj(query) {
+ return request({
+ url: "/zongzhi/tj/list",
+ method: "get",
+ params: query,
+ });
+}
+
+// 查询安全监测受攻击统计详细
+export function getTj(id) {
+ return request({
+ url: "/zongzhi/tj/" + id,
+ method: "get",
+ });
+}
+
+// 新增安全监测受攻击统计
+export function addTj(data) {
+ return request({
+ url: "/zongzhi/tj",
+ method: "post",
+ data: data,
+ });
+}
+
+// 修改安全监测受攻击统计
+export function updateTj(data) {
+ return request({
+ url: "/zongzhi/tj",
+ method: "put",
+ data: data,
+ });
+}
+
+// 删除安全监测受攻击统计
+export function delTj(id) {
+ return request({
+ url: "/zongzhi/tj/" + id,
+ method: "delete",
+ });
+}
+
+// 导出安全监测受攻击统计
+export function exportTj(data) {
+ return request({
+ url: "/zongzhi/tj/export",
+ method: "post",
+ data,
+ });
+}
diff --git a/src/views/netSecurity/DataSourceTj/index.vue b/src/views/netSecurity/DataSourceTj/index.vue
index 588c4f0..c2a7a42 100644
--- a/src/views/netSecurity/DataSourceTj/index.vue
+++ b/src/views/netSecurity/DataSourceTj/index.vue
@@ -1,9 +1,378 @@
- 统计
+
+
+
+
+
+ 新增
+ 修改
+ 删除
+ 导出
+
+
+
+
+
+
+
+
+
+ 查看
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ infoTitle }}
+
+
+ {{
+ form.lable1
+ }}
+
+ {{
+ form.lable2
+ }}
+
+
+
+import { mapGetters } from "vuex";
+import {
+ listSourceTj,
+ getSourceTj,
+ delSourceTj,
+ addSourceTj,
+ updateSourceTj,
+ exportSourceTj,
+} from "@/api/zongzhi/netSecurity/DataSourceTj/index.js";
+export default {
+ computed: {
+ ...mapGetters(["townList"]),
+ },
+ name: "SourceTj",
+ //注释字典
+ data() {
+ return {
+ tableHeigth: 0,
+ //查看详情
+ infoOpen: false,
+ //详情标题
+ infoTitle: "",
+ // 遮罩层
+ loading: true,
+ // 导出遮罩层
+ exportLoading: false,
+ // 选中数组
+ ids: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 显示搜索条件
+ showSearch: true,
+ // 总条数
+ total: 0,
+ // 数据来源统计表格数据
+ sourceTjList: [],
+ // 弹出层标题
+ title: "",
+ // 是否显示弹出层
+ open: false,
+ // 查询参数
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ // 表单参数
+ form: {},
+ // 表单校验
+ rules: {},
+ };
+ },
+ created() {
+ // //给表格一个固定值
+ this.$nextTick(() => {
+ this.tableHeigth =
+ this.$refs.main.offsetHeight -
+ (this.$refs.topSearch.offsetHeight +
+ this.$refs.tableTool.offsetHeight) -
+ 46;
+ this.getList();
+ });
+ },
+ methods: {
+ /** 查询数据来源统计列表 */
+ getList() {
+ this.loading = true;
+ listSourceTj(this.queryParams).then((response) => {
+ this.sourceTjList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ // 取消按钮
+ cancel() {
+ this.open = false;
+ this.reset();
+ },
+ // 表单重置
+ reset() {
+ this.form = {
+ id: null,
+
+ areaId: null,
+
+ lable1: null,
+
+ lable2: null,
-
+ createId: null,
+
+ createBy: null,
+
+ createTime: null,
+
+ updateId: null,
+
+ updateBy: null,
+
+ updateTime: null,
+
+ remark: null,
+ };
+ this.resetForm("form");
+ },
+ /** 搜索按钮操作 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 重置按钮操作 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /**查看按钮操作 */
+ handleInfo(row) {
+ this.reset();
+ const id = row.id || this.ids;
+ getSourceTj(id).then((response) => {
+ this.form = response.data;
+ this.infoOpen = true;
+ this.infoTitle = "查看数据来源统计详情";
+ });
+ },
+ /** 新增按钮操作 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "添加数据来源统计";
+ },
+ /** 修改按钮操作 */
+ handleUpdate(row) {
+ this.reset();
+ const id = row.id || this.ids;
+ getSourceTj(id).then((response) => {
+ this.form = response.data;
+ this.open = true;
+ this.title = "修改数据来源统计";
+ });
+ },
+ /** 提交按钮 */
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ if (this.form.id != null) {
+ updateSourceTj(this.form).then((response) => {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addSourceTj(this.form).then((response) => {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ this.$confirm(
+ '是否确认删除数据来源统计编号为"' + ids + '"的数据项?',
+ "警告",
+ {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }
+ )
+ .then(function () {
+ return delSourceTj(ids);
+ })
+ .then(() => {
+ this.getList();
+ this.msgSuccess("删除成功");
+ })
+ .catch(() => {});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ const queryParams = this.queryParams;
+ this.$confirm("是否确认导出所有数据来源统计数据项?", "警告", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.download(
+ "/zongzhi/sourceTj/export",
+ {
+ ...this.queryParams,
+ },
+ "数据来源统计_" + new Date().getTime() + ".xlsx"
+ );
+ this.exportLoading = false;
+ })
+ .catch(() => {});
+ },
+ },
+};
+
diff --git a/src/views/netSecurity/sgjtj/index.vue b/src/views/netSecurity/sgjtj/index.vue
index e22a953..693dd55 100644
--- a/src/views/netSecurity/sgjtj/index.vue
+++ b/src/views/netSecurity/sgjtj/index.vue
@@ -1,9 +1,420 @@
- 受攻击统计
+
+
+
+
+
+ 新增
+ 修改
+ 删除
+ 导出
+
+
+
+
+
+
+
+
+
+
+ 查看
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ infoTitle }}
+
+
+ {{
+ form.totalSum
+ }}
+
+ {{
+ form.rqSum
+ }}
+
+ {{
+ form.eySum
+ }}
+
+ {{
+ form.jmrSum
+ }}
+
+
+
+import { mapGetters } from "vuex";
+import {
+ listTj,
+ getTj,
+ delTj,
+ addTj,
+ updateTj,
+ exportTj,
+} from "@/api/zongzhi/netSecurity/sgjtj/index.js";
+export default {
+ computed: {
+ ...mapGetters(["townList"]),
+ },
+ name: "Tj",
+ //注释字典
+ data() {
+ return {
+ tableHeigth: 0,
+ //查看详情
+ infoOpen: false,
+ //详情标题
+ infoTitle: "",
+ // 遮罩层
+ loading: true,
+ // 导出遮罩层
+ exportLoading: false,
+ // 选中数组
+ ids: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 显示搜索条件
+ showSearch: true,
+ // 总条数
+ total: 0,
+ // 安全监测受攻击统计表格数据
+ tjList: [],
+ // 弹出层标题
+ title: "",
+ // 是否显示弹出层
+ open: false,
+ // 查询参数
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ totalSum: null,
+
+ rqSum: null,
+ },
+ // 表单参数
+ form: {},
+ // 表单校验
+ rules: {},
+ };
+ },
+ created() {
+ // //给表格一个固定值
+ this.$nextTick(() => {
+ this.tableHeigth =
+ this.$refs.main.offsetHeight -
+ (this.$refs.topSearch.offsetHeight +
+ this.$refs.tableTool.offsetHeight) -
+ 46;
+ this.getList();
+ });
+ },
+ methods: {
+ /** 查询安全监测受攻击统计列表 */
+ getList() {
+ this.loading = true;
+ listTj(this.queryParams).then((response) => {
+ this.tjList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ // 取消按钮
+ cancel() {
+ this.open = false;
+ this.reset();
+ },
+ // 表单重置
+ reset() {
+ this.form = {
+ id: null,
+
+ townId: null,
+
+ villageId: null,
+
+ totalSum: null,
-
+ rqSum: null,
+
+ eySum: null,
+
+ jmrSum: null,
+
+ createId: null,
+
+ createBy: null,
+
+ createTime: null,
+
+ updateId: null,
+
+ updateBy: null,
+
+ updateTime: null,
+
+ remark: null,
+ };
+ this.resetForm("form");
+ },
+ /** 搜索按钮操作 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 重置按钮操作 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /**查看按钮操作 */
+ handleInfo(row) {
+ this.reset();
+ const id = row.id || this.ids;
+ getTj(id).then((response) => {
+ this.form = response.data;
+ this.infoOpen = true;
+ this.infoTitle = "查看安全监测受攻击统计详情";
+ });
+ },
+ /** 新增按钮操作 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "添加安全监测受攻击统计";
+ },
+ /** 修改按钮操作 */
+ handleUpdate(row) {
+ this.reset();
+ const id = row.id || this.ids;
+ getTj(id).then((response) => {
+ this.form = response.data;
+ this.open = true;
+ this.title = "修改安全监测受攻击统计";
+ });
+ },
+ /** 提交按钮 */
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ if (this.form.id != null) {
+ updateTj(this.form).then((response) => {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addTj(this.form).then((response) => {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ this.$confirm(
+ '是否确认删除安全监测受攻击统计编号为"' + ids + '"的数据项?',
+ "警告",
+ {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }
+ )
+ .then(function () {
+ return delTj(ids);
+ })
+ .then(() => {
+ this.getList();
+ this.msgSuccess("删除成功");
+ })
+ .catch(() => {});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ const queryParams = this.queryParams;
+ this.$confirm("是否确认导出所有安全监测受攻击统计数据项?", "警告", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.download(
+ "/zongzhi/tj/export",
+ {
+ ...this.queryParams,
+ },
+ "安全监测受攻击统计_" + new Date().getTime() + ".xlsx"
+ );
+ this.exportLoading = false;
+ })
+ .catch(() => {});
+ },
+ },
+};
+