吕天方 2 years ago
commit 17deb16a0f

@ -42,3 +42,19 @@ export function delYqbg(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusYqbg(params) {
return request({
url: '/tcZz/netWorkYq/yqbg/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importYqbg(data) {
return request({
url: '/tcZz/netWorkYq/yqbg/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delYqxxltj(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusYqxxltj(params) {
return request({
url: '/tcZz/netWorkYq/yqxxltj/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importYqxxltj(data) {
return request({
url: '/tcZz/netWorkYq/yqxxltj/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delYqyj(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusYqyj(params) {
return request({
url: '/tcZz/netWorkYq/yqyj/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importYqyj(data) {
return request({
url: '/tcZz/netWorkYq/yqyj/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delZbxq(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusZbxq(params) {
return request({
url: '/tcZz/netWorkYq/zbxq/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importZbxq(data) {
return request({
url: '/tcZz/netWorkYq/zbxq/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delBmtb(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusBmtb(params) {
return request({
url: '/tcZz/networkSecurity/bmtb/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importBmtb(data) {
return request({
url: '/tcZz/networkSecurity/bmtb/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delCybersecurity(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusCybersecurity(params) {
return request({
url: '/tcZz/networkSecurity/cybersecurity/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importCybersecurity(data) {
return request({
url: '/tcZz/networkSecurity/cybersecurity/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delDbdw(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusDbdw(params) {
return request({
url: '/tcZz/networkSecurity/dbdw/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importDbdw(data) {
return request({
url: '/tcZz/networkSecurity/dbdw/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delDbxt(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusDbxt(params) {
return request({
url: '/tcZz/networkSecurity/dbxt/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importDbxt(data) {
return request({
url: '/tcZz/networkSecurity/dbxt/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delIdcdw(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusIdcdw(params) {
return request({
url: '/tcZz/networkSecurity/idcdw/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importIdcdw(data) {
return request({
url: '/tcZz/networkSecurity/idcdw/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delJgdw(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusJgdw(params) {
return request({
url: '/tcZz/networkSecurity/jgdw/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importJgdw(data) {
return request({
url: '/tcZz/networkSecurity/jgdw/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delSdtb(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusSdtb(params) {
return request({
url: '/tcZz/networkSecurity/sdtb/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importSdtb(data) {
return request({
url: '/tcZz/networkSecurity/sdtb/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delTbcz(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusTbcz(params) {
return request({
url: '/tcZz/networkSecurity/tbcz/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importTbcz(data) {
return request({
url: '/tcZz/networkSecurity/tbcz/common/importExcel',
method: 'post',
data
})
}

@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询系统监测列表
export function listXtjc(query) {
return request({
url: '/tcZz/networkSecurity/xtjc/list',
url: '/tcZz/networkSecurity/xtjc/ListNoToken',
method: 'get',
params: query
})
@ -42,3 +42,19 @@ export function delXtjc(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusXtjc(params) {
return request({
url: '/tcZz/networkSecurity/xtjc/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importXtjc(data) {
return request({
url: '/tcZz/networkSecurity/xtjc/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delZfwz(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusZfwz(params) {
return request({
url: '/tcZz/networkSecurity/zfwz/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importZfwz(data) {
return request({
url: '/tcZz/networkSecurity/zfwz/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,19 @@ export function delZxyh(id) {
method: 'delete'
})
}
//批量启用禁用
export function isStatusZxyh(params) {
return request({
url: '/tcZz/networkSecurity/zxyh/isStatus',
method: 'get',
params
})
}
//通用导入信息
export function importZxyh(data) {
return request({
url: '/tcZz/networkSecurity/zxyh/common/importExcel',
method: 'post',
data
})
}

@ -1,9 +1,20 @@
<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="areaId">
<el-select v-model="queryParams.areaId" placeholder="请选择区域" clearable size="small">
<el-select
v-model="queryParams.areaId"
placeholder="请选择区域"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_area"
:key="dict.value"
@ -13,7 +24,12 @@
</el-select>
</el-form-item>
<el-form-item label="启用/禁用" prop="isStatus">
<el-select v-model="queryParams.isStatus" placeholder="请选择启用/禁用" clearable size="small">
<el-select
v-model="queryParams.isStatus"
placeholder="请选择启用/禁用"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_start"
:key="dict.value"
@ -23,7 +39,12 @@
</el-select>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable size="small">
<el-select
v-model="queryParams.type"
placeholder="请选择类型"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.bg_type"
:key="dict.value"
@ -32,7 +53,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="标题名称" prop="title">
<!-- <el-form-item label="标题名称" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入标题名称"
@ -40,7 +61,7 @@
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<!-- <el-form-item label="文件名称" prop="fileName">
<el-input
v-model="queryParams.fileName"
@ -84,8 +105,16 @@
></el-date-picker>
</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>
@ -103,14 +132,16 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netWorkYq:yqbg:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netWorkYq:yqbg:remove']"
>删除</el-button>
>删除</el-button
>
<el-button
type="warning"
size="mini"
@ -119,18 +150,47 @@
v-hasPermi="['tcZz/netWorkYq:yqbg:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table v-loading="loading" :data="yqbgList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="yqbgList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
<dict-tag :options="dict.type.tc_area" :value="scope.row.areaId"/>
<dict-tag :options="dict.type.tc_area" :value="scope.row.areaId" />
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :options="dict.type.bg_type" :value="scope.row.type"/>
<dict-tag :options="dict.type.bg_type" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="标题名称" align="center" prop="title" />
@ -150,7 +210,13 @@
></el-switch>
</template>
</el-table-column>
<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"
@ -164,19 +230,21 @@
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netWorkYq:yqbg:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netWorkYq:yqbg:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -184,16 +252,27 @@
/>
<!-- 添加或修改舆情报告对话框 -->
<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="areaId">
<el-select v-model="form.areaId" placeholder="请选择区域">
<el-option
v-for="dict in dict.type.tc_area"
:key="dict.value"
:label="dict.label"
:value="dict.value"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
@ -202,8 +281,9 @@
<el-radio
v-for="dict in dict.type.tc_start"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
:label="parseInt(dict.value)"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="类型" prop="type">
@ -212,7 +292,7 @@
v-for="dict in dict.type.bg_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
@ -223,7 +303,7 @@
<el-input v-model="form.fileName" placeholder="请输入文件名称" />
</el-form-item> -->
<el-form-item label="文件路径(完整路径)">
<fileUpload v-model="fileNameS"/>
<fileUpload v-model="fileNameS" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
@ -243,43 +323,70 @@
: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="区域">{{ selectDictLabel(dict.type.tc_area,form.areaId) }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ selectDictLabel(dict.type.tc_start,form.isStatus) }}</el-descriptions-item>
<el-descriptions
title="舆情报告"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="类型">{{ selectDictLabel(dict.type.bg_type,form.type) }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="标题名称">{{ form.title }}</el-descriptions-item>
<el-descriptions-item label="类型">{{
selectDictLabel(dict.type.bg_type, form.type)
}}</el-descriptions-item>
<el-descriptions-item label="文件名称">{{ form.fileName }}</el-descriptions-item>
<el-descriptions-item label="标题名称">{{
form.title
}}</el-descriptions-item>
<el-descriptions-item label="文件路径(完整路径)">{{ form.fileUrl }}</el-descriptions-item>
<el-descriptions-item label="文件名称">{{
form.fileName
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{ form.remark }}</el-descriptions-item>
<el-descriptions-item label="文件路径(完整路径)">{{
form.fileUrl
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { listYqbg, getYqbg, delYqbg, addYqbg, updateYqbg, exportYqbg } from "@/api/tcZz/netWorkYq/yqbg";
export default {
import {
listYqbg,
getYqbg,
delYqbg,
addYqbg,
updateYqbg,
exportYqbg,
isStatusYqbg,
importYqbg,
} from "@/api/tcZz/netWorkYq/yqbg";
import { Loading } from "element-ui";
export default {
name: "Yqbg",
//
dicts: ['bg_type', 'tc_area', 'tc_start'],
dicts: ["bg_type", "tc_area", "tc_start"],
data() {
return {
tableHeigth: 0,
//
infoOpen:false,
infoOpen: false,
//
infoTitle:'',
infoTitle: "",
//
loading: true,
//
@ -331,38 +438,111 @@
updateTime: null,
remark: null,
},
//
form: {},
//
rules: {
},
fileNameS:[]
rules: {},
fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
this.getList();
},
methods: {
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importYqbg(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusYqbg({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询舆情报告列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listYqbg(this.queryParams).then(response => {
listYqbg(this.queryParams).then((response) => {
this.yqbgList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//
@ -396,7 +576,6 @@
updateTime: null,
remark: null,
};
this.resetForm("form");
},
@ -414,18 +593,18 @@
},
//
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){
handleInfo(row) {
this.reset();
const id = row.id || this.ids
getYqbg(id).then(response => {
const id = row.id || this.ids;
getYqbg(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看舆情报告详情"
this.infoTitle = "查看舆情报告详情";
});
},
/** 新增按钮操作 */
@ -438,9 +617,9 @@
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.fileNameS = []
const id = row.id || this.ids
getYqbg(id).then(response => {
this.fileNameS = [];
const id = row.id || this.ids;
getYqbg(id).then((response) => {
this.form = response.data;
if (response.data.fileName && response.data.fileUrl) {
let arr1 = response.data.fileName.split(",");
@ -459,11 +638,15 @@
//
handleStatusChange(row) {
let text = row.isStatus === 1 ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '"吗?').then(function() {
return updateYqbg({id:row.id, isStatus:row.isStatus});
}).then(() => {
this.$modal
.confirm('确认要"' + text + '"吗?')
.then(function () {
return updateYqbg({ id: row.id, isStatus: row.isStatus });
})
.then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
})
.catch(function () {
row.isStatus = row.isStatus === 1 ? 2 : 1;
});
},
@ -471,7 +654,7 @@
submitForm() {
let arr1 = [];
let arr2 = [];
console.log(this.fileNameS)
console.log(this.fileNameS);
if (this.fileNameS.length > 0) {
this.fileNameS.forEach((value) => {
arr1.push(value.name);
@ -483,16 +666,16 @@
this.form.fileName = "";
this.form.fileUrl = "";
}
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateYqbg(this.form).then(response => {
updateYqbg(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addYqbg(this.form).then(response => {
addYqbg(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -507,29 +690,37 @@
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
type: "warning",
})
.then(function () {
return delYqbg(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('/tcZz/netWorkYq/yqbg/export', {
...this.queryParams
}, '舆情报告_'+ new Date().getTime() +'.xlsx')
type: "warning",
})
.then(() => {
this.download(
"/tcZz/netWorkYq/yqbg/export",
{
...this.queryParams,
},
"舆情报告_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
}).catch(() => {});
}
}
}
})
.catch(() => {});
},
},
};
</script>

@ -62,87 +62,6 @@
/>
</el-select>
</el-form-item>
<el-form-item label="标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入标题"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="来源" prop="source">
<el-input
v-model="queryParams.source"
placeholder="请输入来源"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时间">
<el-date-picker
v-model="daterangeDateTime"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<!-- <el-form-item label="创建者" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建者"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="daterangeCreateTime"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="更新者" prop="updateBy">
<el-input
v-model="queryParams.updateBy"
placeholder="请输入更新者"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间">
<el-date-picker
v-model="daterangeUpdateTime"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@ -189,6 +108,31 @@
v-hasPermi="['tcZz/netWorkYq:yqxxltj:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -411,7 +355,11 @@ import {
addYqxxltj,
updateYqxxltj,
exportYqxxltj,
isStatusYqxxltj,
importYqxxltj,
} from "@/api/tcZz/netWorkYq/yqxxltj";
import { Loading } from "element-ui";
export default {
name: "Yqxxltj",
//
@ -483,14 +431,84 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
this.getList();
},
methods: {
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importYqxxltj(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusYqxxltj({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询舆情信息量统计明細列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeDateTime && "" != this.daterangeDateTime) {
@ -511,6 +529,11 @@ export default {
this.yqxxltjList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -47,7 +47,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="标题" prop="title">
<!-- <el-form-item label="标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入标题"
@ -55,7 +55,7 @@
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="来源" prop="source">
<el-input
v-model="queryParams.source"
@ -174,6 +174,31 @@
v-hasPermi="['tcZz/netWorkYq:yqyj:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -378,7 +403,11 @@ import {
addYqyj,
updateYqyj,
exportYqyj,
isStatusYqyj,
importYqyj,
} from "@/api/tcZz/netWorkYq/yqyj";
import { Loading } from "element-ui";
export default {
name: "Yqyj",
//
@ -448,14 +477,83 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
this.getList();
},
methods: {
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importYqyj(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusYqyj({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询舆情预警列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeDateTime && "" != this.daterangeDateTime) {
@ -476,6 +574,11 @@ export default {
this.yqyjList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -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="${comment}" prop="id">
<el-input
v-model="queryParams.id"
@ -12,7 +18,12 @@
/>
</el-form-item> -->
<el-form-item label="区域" prop="areaId">
<el-select v-model="queryParams.areaId" placeholder="请选择区域" clearable size="small">
<el-select
v-model="queryParams.areaId"
placeholder="请选择区域"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_area"
:key="dict.value"
@ -22,7 +33,12 @@
</el-select>
</el-form-item>
<el-form-item label="启用/禁用" prop="isStatus">
<el-select v-model="queryParams.isStatus" placeholder="请选择启用/禁用" clearable size="small">
<el-select
v-model="queryParams.isStatus"
placeholder="请选择启用/禁用"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_start"
:key="dict.value"
@ -31,7 +47,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="舆情标题" prop="yqTitle">
<!-- <el-form-item label="舆情标题" prop="yqTitle">
<el-input
v-model="queryParams.yqTitle"
placeholder="请输入舆情标题"
@ -48,7 +64,7 @@
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="舆情状态" prop="yqState">
<el-input
v-model="queryParams.yqState"
@ -110,8 +126,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>
@ -129,14 +153,16 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netWorkYq:zbxq:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netWorkYq:zbxq:remove']"
>删除</el-button>
>删除</el-button
>
<el-button
type="warning"
size="mini"
@ -145,13 +171,42 @@
v-hasPermi="['tcZz/netWorkYq:zbxq:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table v-loading="loading" :data="zbxqList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="zbxqList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
<dict-tag :options="dict.type.tc_area" :value="scope.row.areaId"/>
<dict-tag :options="dict.type.tc_area" :value="scope.row.areaId" />
</template>
</el-table-column>
<el-table-column label="舆情标题" align="center" prop="yqTitle" />
@ -171,7 +226,13 @@
></el-switch>
</template>
</el-table-column>
<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"
@ -185,19 +246,21 @@
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netWorkYq:zbxq:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netWorkYq:zbxq:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -205,16 +268,27 @@
/>
<!-- 添加或修改 转办量转办详情对话框 -->
<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="areaId">
<el-select v-model="form.areaId" placeholder="请选择区域">
<el-option
v-for="dict in dict.type.tc_area"
:key="dict.value"
:label="dict.label"
:value="dict.value"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
@ -223,8 +297,9 @@
<el-radio
v-for="dict in dict.type.tc_start"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
:label="parseInt(dict.value)"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="舆情标题" prop="yqTitle">
@ -254,41 +329,66 @@
: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="区域">{{ selectDictLabel(dict.type.tc_area,form.areaId) }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ selectDictLabel(dict.type.tc_start,form.isStatus) }}</el-descriptions-item>
<el-descriptions
title=" 转办量、转办详情"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="舆情标题">{{ form.yqTitle }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="部门名称">{{ form.depName }}</el-descriptions-item>
<el-descriptions-item label="舆情标题">{{
form.yqTitle
}}</el-descriptions-item>
<el-descriptions-item label="舆情状态">{{ form.yqState }}</el-descriptions-item>
<el-descriptions-item label="部门名称">{{
form.depName
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{ form.remark }}</el-descriptions-item>
<el-descriptions-item label="舆情状态">{{
form.yqState
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { listZbxq, getZbxq, delZbxq, addZbxq, updateZbxq, exportZbxq } from "@/api/tcZz/netWorkYq/zbxq";
export default {
import {
listZbxq,
getZbxq,
delZbxq,
addZbxq,
updateZbxq,
exportZbxq,
isStatusZbxq,
importZbxq,
} from "@/api/tcZz/netWorkYq/zbxq";
import { Loading } from "element-ui";
export default {
name: "Zbxq",
//
dicts: ['tc_area', 'tc_start'],
dicts: ["tc_area", "tc_start"],
data() {
return {
tableHeigth: 0,
//
infoOpen:false,
infoOpen: false,
//
infoTitle:'',
infoTitle: "",
//
loading: true,
//
@ -338,37 +438,109 @@
updateTime: null,
remark: null,
},
//
form: {},
//
rules: {
}
rules: {},
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
this.getList();
},
methods: {
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importZbxq(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusZbxq({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询 转办量、转办详情列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listZbxq(this.queryParams).then(response => {
listZbxq(this.queryParams).then((response) => {
this.zbxqList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//
@ -400,7 +572,6 @@
updateTime: null,
remark: null,
};
this.resetForm("form");
},
@ -418,18 +589,18 @@
},
//
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){
handleInfo(row) {
this.reset();
const id = row.id || this.ids
getZbxq(id).then(response => {
const id = row.id || this.ids;
getZbxq(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看 转办量、转办详情详情"
this.infoTitle = "查看 转办量、转办详情详情";
});
},
/** 新增按钮操作 */
@ -441,8 +612,8 @@
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getZbxq(id).then(response => {
const id = row.id || this.ids;
getZbxq(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改 转办量、转办详情";
@ -451,26 +622,30 @@
//
handleStatusChange(row) {
let text = row.isStatus === 1 ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '"吗?').then(function() {
return updateZbxq({id:row.id, isStatus:row.isStatus});
}).then(() => {
this.$modal
.confirm('确认要"' + text + '"吗?')
.then(function () {
return updateZbxq({ id: row.id, isStatus: row.isStatus });
})
.then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
})
.catch(function () {
row.isStatus = row.isStatus === 1 ? 2 : 1;
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateZbxq(this.form).then(response => {
updateZbxq(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addZbxq(this.form).then(response => {
addZbxq(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -485,29 +660,37 @@
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
type: "warning",
})
.then(function () {
return delZbxq(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('/tcZz/netWorkYq/zbxq/export', {
...this.queryParams
}, ' 转办量、转办详情_'+ new Date().getTime() +'.xlsx')
type: "warning",
})
.then(() => {
this.download(
"/tcZz/netWorkYq/zbxq/export",
{
...this.queryParams,
},
" 转办量、转办详情_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
}).catch(() => {});
}
}
}
})
.catch(() => {});
},
},
};
</script>

@ -79,6 +79,31 @@
v-hasPermi="['tcZz/networkSecurity:bmtb:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -177,7 +202,7 @@
<el-form-item label="部门名称" prop="depName">
<el-input v-model="form.depName" placeholder="请输入部门名称" />
</el-form-item>
<el-form-item label="上传文件" >
<el-form-item label="上传文件">
<FileUpload v-model="fileNameS"></FileUpload>
</el-form-item>
<el-form-item label="备注" prop="remark">
@ -207,7 +232,7 @@
labelClassName="desLable"
>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="部门名称">{{
@ -238,7 +263,11 @@ import {
addBmtb,
updateBmtb,
exportBmtb,
isStatusBmtb,
importBmtb,
} from "@/api/tcZz/networkSecurity/bmtb";
import { Loading } from "element-ui";
export default {
name: "Bmtb",
//
@ -303,6 +332,10 @@ export default {
//
rules: {},
fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -315,8 +348,74 @@ export default {
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importBmtb(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusBmtb({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询部门通报列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -333,6 +432,11 @@ export default {
this.bmtbList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -85,6 +85,31 @@
v-hasPermi="['tcZz/networkSecurity:cybersecurity:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -222,6 +247,12 @@
placeholder="请输入受攻击IP区域"
/>
</el-form-item>
<el-form-item label="受攻击目标类型" prop="type">
<el-input
v-model="form.type"
placeholder="请输入受攻击目标类型"
/>
</el-form-item>
<el-form-item label="网站安全等级" prop="netLevel">
<el-input v-model="form.netLevel" placeholder="请输入网站安全等级" />
</el-form-item>
@ -261,11 +292,11 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="攻击发起时间">{{
@ -328,7 +359,11 @@ import {
addCybersecurity,
updateCybersecurity,
exportCybersecurity,
isStatusCybersecurity,
importCybersecurity,
} from "@/api/tcZz/networkSecurity/cybersecurity";
import { Loading } from "element-ui";
export default {
name: "Cybersecurity",
//
@ -412,6 +447,10 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -423,9 +462,75 @@ export default {
this.getList();
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importCybersecurity(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusCybersecurity({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询网络监测列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeStartTime && "" != this.daterangeStartTime) {
@ -446,6 +551,11 @@ export default {
this.cybersecurityList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -103,6 +103,31 @@
v-hasPermi="['tcZz/networkSecurity:dbdw:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -297,7 +322,7 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{
@ -357,7 +382,7 @@
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{
@ -376,7 +401,11 @@ import {
addDbdw,
updateDbdw,
exportDbdw,
isStatusDbdw,
importDbdw,
} from "@/api/tcZz/networkSecurity/dbdw";
import { Loading } from "element-ui";
export default {
name: "Dbdw",
//
@ -464,6 +493,10 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -476,8 +509,74 @@ export default {
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importDbdw(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusDbdw({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询等保单位列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -494,6 +593,11 @@ export default {
this.dbdwList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -79,6 +79,31 @@
v-hasPermi="['tcZz/networkSecurity:dbxt:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -388,7 +413,11 @@ import {
addDbxt,
updateDbxt,
exportDbxt,
isStatusDbxt,
importDbxt,
} from "@/api/tcZz/networkSecurity/dbxt";
import { Loading } from "element-ui";
export default {
name: "Dbxt",
//
@ -482,12 +511,82 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
this.getList();
},
methods: {
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importDbxt(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusDbxt({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
alter(e) {
updateDbxt(e).then(() => {
this.getList();
@ -495,7 +594,7 @@ export default {
});
},
/** 查询等保系统列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -512,6 +611,11 @@ export default {
this.dbxtList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -103,6 +103,31 @@
v-hasPermi="['tcZz/networkSecurity:idcdw:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -241,11 +266,11 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="lDC名称">{{
@ -272,7 +297,11 @@ import {
addIdcdw,
updateIdcdw,
exportIdcdw,
isStatusIdcdw,
importIdcdw,
} from "@/api/tcZz/networkSecurity/idcdw";
import { Loading } from "element-ui";
export default {
name: "Idcdw",
//
@ -336,6 +365,10 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -348,8 +381,74 @@ export default {
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importIdcdw(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusIdcdw({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询 IDC单位列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -366,6 +465,11 @@ export default {
this.idcdwList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -103,6 +103,31 @@
v-hasPermi="['tcZz/networkSecurity:jgdw:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -272,11 +297,11 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{
@ -304,7 +329,7 @@
}}</el-descriptions-item>
<el-descriptions-item label="记录类型">{{
selectDictLabel(dict.type.tc_jslx,form.type)
selectDictLabel(dict.type.tc_jslx, form.type)
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{
@ -323,7 +348,10 @@ import {
addJgdw,
updateJgdw,
exportJgdw,
isStatusJgdw,
importJgdw,
} from "@/api/tcZz/networkSecurity/jgdw";
import { Loading } from "element-ui";
export default {
name: "Jgdw",
//
@ -397,6 +425,10 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -409,8 +441,74 @@ export default {
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importJgdw(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusJgdw({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询监管单位列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -427,6 +525,11 @@ export default {
this.jgdwList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -101,7 +101,7 @@
>
<el-upload
style="display: inline-block; margin: 0 10px"
:action="uploadFileUrl"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
@ -111,7 +111,7 @@
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="warning" size="mini">导入</el-button>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
@ -411,7 +411,6 @@ export default {
//
rules: {},
//===========
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
@ -484,15 +483,14 @@ export default {
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.fileList = [];
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.fileList = [];
this.$modal.msgSuccess("导入失败");
this.getList();
this.fileList = [];
});
},
//

@ -86,6 +86,31 @@
v-hasPermi="['tcZz/networkSecurity:sdtb:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -257,7 +282,11 @@ import {
addSdtb,
updateSdtb,
exportSdtb,
isStatusSdtb,
importSdtb,
} from "@/api/tcZz/networkSecurity/sdtb";
import { Loading } from "element-ui";
export default {
name: "Sdtb",
//
@ -323,6 +352,10 @@ export default {
rules: {},
//
fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -334,9 +367,75 @@ export default {
this.getList();
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importSdtb(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusSdtb({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询属地通报列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -353,6 +452,11 @@ export default {
this.sdtbList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -103,6 +103,31 @@
v-hasPermi="['tcZz/networkSecurity:tbcz:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -218,7 +243,7 @@
<el-form-item label="处置情况" prop="czState">
<el-input v-model="form.czState" placeholder="请输入处置情况" />
</el-form-item>
<el-form-item label="上传文件" >
<el-form-item label="上传文件">
<FileUpload v-model="fileNameS"></FileUpload>
</el-form-item>
<el-form-item label="备注" prop="remark">
@ -248,11 +273,11 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{
@ -291,7 +316,11 @@ import {
addTbcz,
updateTbcz,
exportTbcz,
isStatusTbcz,
importTbcz,
} from "@/api/tcZz/networkSecurity/tbcz";
import { Loading } from "element-ui";
export default {
name: "Tbcz",
//
@ -362,7 +391,10 @@ export default {
//
rules: {},
fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -374,9 +406,75 @@ export default {
this.getList();
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importTbcz(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusTbcz({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询通报处置列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -393,6 +491,11 @@ export default {
this.tbczList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -8,7 +8,6 @@
v-show="showSearch"
label-width="auto"
>
<el-form-item label="区域" prop="areaId">
<el-select
v-model="queryParams.areaId"
@ -95,6 +94,31 @@
v-hasPermi="['tcZz/networkSecurity:xtjc:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -250,11 +274,11 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{
@ -297,7 +321,11 @@ import {
addXtjc,
updateXtjc,
exportXtjc,
isStatusXtjc,
importXtjc
} from "@/api/tcZz/networkSecurity/xtjc";
import { Loading } from "element-ui";
export default {
name: "Xtjc",
//
@ -359,6 +387,10 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -371,8 +403,74 @@ export default {
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importXtjc(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusXtjc({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询系统监测列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -389,6 +487,11 @@ export default {
this.xtjcList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -95,6 +95,31 @@
v-hasPermi="['tcZz/networkSecurity:zfwz:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -240,11 +265,11 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="网站地址">{{
@ -275,7 +300,10 @@ import {
addZfwz,
updateZfwz,
exportZfwz,
isStatusZfwz,
importZfwz,
} from "@/api/tcZz/networkSecurity/zfwz";
import { Loading } from "element-ui";
export default {
name: "Zfwz",
//
@ -341,6 +369,10 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -352,9 +384,75 @@ export default {
this.getList();
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importZfwz(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusZfwz({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询政府网站列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -371,6 +469,11 @@ export default {
this.zfwzList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

@ -103,6 +103,31 @@
v-hasPermi="['tcZz/networkSecurity:zxyh:export']"
>导出</el-button
>
<el-upload
style="display: inline-block; margin: 0 10px"
action="1"
:show-file-list="false"
:limit="limit"
:multiple="false"
:accept="accept"
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
:file-list="fileList"
>
<el-button type="primary" size="mini">导入</el-button>
</el-upload>
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
>启用</el-button
>
<el-button
type="danger"
size="mini"
@click="banned"
autofocus
:disabled="multiple"
>禁用</el-button
>
</div>
<el-table
v-loading="loading"
@ -221,7 +246,7 @@
<el-form-item label="隐患来源" prop="yhLy">
<el-input v-model="form.yhLy" placeholder="请输入隐患来源" />
</el-form-item>
<el-form-item label="上传文件" >
<el-form-item label="上传文件">
<FileUpload v-model="fileNameS"></FileUpload>
</el-form-item>
<el-form-item label="备注" prop="remark">
@ -251,11 +276,11 @@
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId)
selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus)
selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{
@ -298,7 +323,11 @@ import {
addZxyh,
updateZxyh,
exportZxyh,
isStatusZxyh,
importZxyh,
} from "@/api/tcZz/networkSecurity/zxyh";
import { Loading } from "element-ui";
export default {
name: "Zxyh",
//
@ -371,7 +400,10 @@ export default {
//
rules: {},
fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
};
},
created() {
@ -383,9 +415,75 @@ export default {
this.getList();
this.$modal.msgSuccess("修改成功");
});
},
//
handleBeforeUpload(file) {
//
const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.accept.includes(fileExt);
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
return false;
}
//
const isLt = file.size / 1024 / 1024 < 5;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
return false;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
let downloadLoadingInstance = Loading.service({
text: "正在导入数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let form = new FormData();
form.append("file", data.file);
importZxyh(form)
.then((res) => {
this.getList();
downloadLoadingInstance.close();
this.$modal.msgSuccess("导入成功");
this.getList();
this.fileList = [];
})
.catch(() => {
downloadLoadingInstance.close();
this.getList();
this.fileList = [];
});
},
//
enable(row) {
this.isStatusFuc(row, 1);
},
//
banned(row) {
this.isStatusFuc(row, 2);
},
isStatusFuc(row, e) {
const ids = row.id || this.ids.join(",");
const src = e == 1 ? "启动" : "禁用";
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return isStatusZxyh({ ids: ids, isStatus: e });
})
.then(() => {
this.getList(e);
})
.catch(() => {});
},
/** 查询最新隐患列表 */
getList() {
getList(e) {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -402,6 +500,11 @@ export default {
this.zxyhList = response.rows;
this.total = response.total;
this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
});
},
//

Loading…
Cancel
Save