共享数据修复

Lvtianfang
许宏杰 2 years ago
parent 977eb062ca
commit eb9d78b5cb

@ -353,7 +353,7 @@ import {
} from "@/api/zongzhi/netManage/enterpriseMl/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Enterprise",
//

@ -316,7 +316,7 @@ import {
} from "@/api/zongzhi/netManage/netPlatform/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Pingtai",
//

@ -389,7 +389,7 @@ import {
} from "@/api/zongzhi/netManage/netReport/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Report",
//

@ -327,7 +327,7 @@ import {
} from "@/api/zongzhi/netManage/qlzx/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Zhuanxiang",
//

@ -77,7 +77,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域id" align="center" prop="areaId">
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
@ -149,7 +149,7 @@
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域id" prop="areaId">
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
@ -204,7 +204,7 @@
border
labelClassName="desLable"
>
<el-descriptions-item label="区域id">{{
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>

@ -289,7 +289,7 @@ import {
} from "@/api/zongzhi/netManage/supervise/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Domain",
//

@ -204,10 +204,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="动态名称" prop="name">
<el-input
v-model="form.name"
placeholder="请输入动态名称"
/>
<el-input v-model="form.name" placeholder="请输入动态名称" />
</el-form-item>
</el-col>
</el-row>
@ -278,7 +275,7 @@ import {
} from "@/api/zongzhi/netManage/workDynamic/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Dongtai",
//

@ -228,7 +228,6 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
@ -344,7 +343,7 @@ import {
} from "@/api/zongzhi/netManage/workItem/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Work",
//

@ -393,7 +393,7 @@ import {
} from "@/api/zongzhi/netSecurity/SafetyYh/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Danger",
//

@ -422,7 +422,7 @@ import {
export default {
name: "Detection",
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
//
dicts: ["tc_net_safety_level", "tc_attack_type"],

@ -1,7 +1,13 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="auto">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="地区名称" prop="name">
<el-input
v-model="queryParams.name"
@ -12,8 +18,16 @@
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
@ -31,14 +45,16 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['zongzhi:attack:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['zongzhi:attack:remove']"
>删除</el-button>
>删除</el-button
>
<el-button
type="warning"
size="mini"
@ -48,11 +64,22 @@
>导出</el-button
>
</div>
<el-table v-loading="loading" :data="attackList" :height="tableHeigth" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="attackList"
:height="tableHeigth"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="地区名称" align="center" prop="name" />
<el-table-column label="攻击次数" align="center" prop="attackCount" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@ -66,13 +93,15 @@
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:attack:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['zongzhi:attack:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
@ -86,9 +115,20 @@
/>
<!-- 添加或修改地区受攻击对话框 -->
<el-dialog :visible.sync="open" width="500px" append-to-body custom-class="dialog-box">
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form ref="form" :model="form" :rules="rules" label-width="auto" class="dialog-from">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="地区名称" prop="name">
<el-input v-model="form.name" placeholder="请输入地区名称" />
</el-form-item>
@ -110,26 +150,39 @@
:destroy-on-close="true"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions title="地区受攻击" :column="2" border labelClassName="desLable">
<el-descriptions-item label="地区名称">{{ form.name }}</el-descriptions-item>
<el-descriptions-item label="攻击次数">{{ form.attackCount }}</el-descriptions-item>
<el-descriptions
title="地区受攻击"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="地区名称">{{
form.name
}}</el-descriptions-item>
<el-descriptions-item label="攻击次数">{{
form.attackCount
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { listAttack, getAttack, delAttack, addAttack, updateAttack, exportAttack } from "@/api/zongzhi/netSecurity/mapData/index.js";
import {
listAttack,
getAttack,
delAttack,
addAttack,
updateAttack,
exportAttack,
} from "@/api/zongzhi/netSecurity/mapData/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Attack",
//
@ -139,7 +192,7 @@ import { mapGetters } from "vuex";
//
infoOpen: false,
//
infoTitle:'',
infoTitle: "",
//
loading: true,
//
@ -165,13 +218,11 @@ import { mapGetters } from "vuex";
pageNum: 1,
pageSize: 20,
name: null,
},
//
form: {},
//
rules: {
}
rules: {},
};
},
created() {
@ -189,7 +240,7 @@ import { mapGetters } from "vuex";
/** 查询地区受攻击列表 */
getList() {
this.loading = true;
listAttack(this.queryParams).then(response => {
listAttack(this.queryParams).then((response) => {
this.attackList = response.rows;
this.total = response.total;
this.loading = false;
@ -208,7 +259,6 @@ import { mapGetters } from "vuex";
name: null,
attackCount: null,
};
this.resetForm("form");
},
@ -224,18 +274,18 @@ import { mapGetters } from "vuex";
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
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
getAttack(id).then(response => {
const id = row.id || this.ids;
getAttack(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看地区受攻击详情"
this.infoTitle = "查看地区受攻击详情";
});
},
/** 新增按钮操作 */
@ -247,8 +297,8 @@ import { mapGetters } from "vuex";
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getAttack(id).then(response => {
const id = row.id || this.ids;
getAttack(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改地区受攻击";
@ -256,16 +306,16 @@ import { mapGetters } from "vuex";
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateAttack(this.form).then(response => {
updateAttack(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addAttack(this.form).then(response => {
addAttack(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -277,32 +327,44 @@ import { mapGetters } from "vuex";
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除地区受攻击编号为"' + ids + '"的数据项?', "警告", {
this.$confirm(
'是否确认删除地区受攻击编号为"' + ids + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
type: "warning",
}
)
.then(function () {
return delAttack(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有地区受攻击数据项?', "警告", {
this.$confirm("是否确认导出所有地区受攻击数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.download('/zongzhi/attack/export', {
...this.queryParams
}, '地区受攻击_'+ new Date().getTime() +'.xlsx')
type: "warning",
})
.then(() => {
this.download(
"/zongzhi/attack/export",
{
...this.queryParams,
},
"地区受攻击_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
}).catch(() => {});
}
}
}
})
.catch(() => {});
},
},
};
</script>

@ -482,7 +482,7 @@ export default {
//
dicts: ["tc_yes_no", "tc_net_safety_level", "tc_db_steam_state"],
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
data() {
return {

@ -418,7 +418,7 @@ import {
} from "@/api/zongzhi/netSecurity/supervise/DbUnit/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Unit",
//

@ -258,7 +258,7 @@ import {
} from "@/api/zongzhi/netSecurity/supervise/GovernmentWeb/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Web",
//

@ -224,7 +224,7 @@ import {
} from "@/api/zongzhi/netSecurity/supervise/IdcUnit/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "IDCunit",
//

@ -106,7 +106,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域id" align="center" prop="areaId">
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ $filterTown(scope.row.areaId) }}
</template>
@ -186,7 +186,7 @@
>
<el-row>
<el-col :span="12">
<el-form-item label="区域id" prop="areaId">
<el-form-item label="区域" prop="areaId">
<el-select
v-model="form.areaId"
placeholder="请选择区域"
@ -260,9 +260,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
</el-col>
<el-col :span="12"> </el-col>
<el-col :span="12">
<el-form-item label="附件上传" prop="fileName">
<FileUpload v-model="fileList" />
@ -292,7 +290,7 @@
border
labelClassName="desLable"
>
<el-descriptions-item label="区域id">{{
<el-descriptions-item label="区域">{{
$filterTown(form.areaId)
}}</el-descriptions-item>
@ -335,7 +333,7 @@ import {
} from "@/api/zongzhi/netSecurity/tb/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Tb",
//

@ -198,7 +198,7 @@ import {
} from "@/api/zongzhi/netWorkYq/dtsx/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Sx",
//

@ -479,7 +479,7 @@ import {
} from "@/api/zongzhi/netWorkYq/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Sentiment",
//

@ -92,7 +92,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域id" align="center" prop="areaId">
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
@ -171,7 +171,7 @@
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域id" prop="areaId">
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
@ -228,7 +228,7 @@
border
labelClassName="desLable"
>
<el-descriptions-item label="区域id">{{
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>

@ -77,7 +77,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域id" align="center" prop="areaId">
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
@ -149,7 +149,7 @@
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域id" prop="areaId">
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
@ -204,7 +204,7 @@
border
labelClassName="desLable"
>
<el-descriptions-item label="区域id">{{
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>

@ -71,7 +71,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域Id" align="center" prop="areaId">
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
@ -134,7 +134,7 @@
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域Id" prop="areaId">
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"

@ -324,7 +324,7 @@ import {
} from "@/api/zongzhi/netZoology/netAppraiser/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Commentator",
//

@ -263,7 +263,7 @@ import {
} from "@/api/zongzhi/netZoology/netMqPrincipal/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Principal",
//

@ -175,8 +175,8 @@
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域id" prop="areaId">
<el-input v-model="form.areaId" placeholder="请输入区域id" />
<el-form-item label="区域" prop="areaId">
<el-input v-model="form.areaId" placeholder="请输入区域" />
</el-form-item>
<el-form-item label="文章ID" prop="articleId">
<el-input v-model="form.articleId" placeholder="请输入文章ID" />
@ -264,7 +264,7 @@
border
labelClassName="desLable"
>
<el-descriptions-item label="区域id">{{
<el-descriptions-item label="区域">{{
$filterTown(form.areaId)
}}</el-descriptions-item>
@ -315,7 +315,7 @@ import {
} from "@/api/zongzhi/netZoology/netP/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Evaluate",
//

@ -310,7 +310,7 @@ import {
} from "@/api/zongzhi/netZoology/netSafety/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Safetyadmin",
//

@ -230,7 +230,7 @@ import {
} from "@/api/zongzhi/netZoology/netSafetyZcUnit/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "NetSafetyZcUnit",
//

@ -291,7 +291,7 @@ import {
} from "@/api/zongzhi/netZoology/netVolunteer/index.js";
export default {
computed: {
...mapGetters(["townList"]),
...mapGetters(["townList", "treeProps"]),
},
name: "Volunteer",
//

Loading…
Cancel
Save