吕天方 2 years ago
commit 17deb16a0f

@ -42,3 +42,19 @@ export function delYqbg(id) {
method: 'delete' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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) { export function listXtjc(query) {
return request({ return request({
url: '/tcZz/networkSecurity/xtjc/list', url: '/tcZz/networkSecurity/xtjc/ListNoToken',
method: 'get', method: 'get',
params: query params: query
}) })
@ -42,3 +42,19 @@ export function delXtjc(id) {
method: 'delete' 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' 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' 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> <template>
<div class="container-main" ref="main"> <div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch"> <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-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 <el-option
v-for="dict in dict.type.tc_area" v-for="dict in dict.type.tc_area"
:key="dict.value" :key="dict.value"
@ -13,7 +24,12 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="启用/禁用" prop="isStatus"> <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 <el-option
v-for="dict in dict.type.tc_start" v-for="dict in dict.type.tc_start"
:key="dict.value" :key="dict.value"
@ -23,7 +39,12 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="type"> <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 <el-option
v-for="dict in dict.type.bg_type" v-for="dict in dict.type.bg_type"
:key="dict.value" :key="dict.value"
@ -32,7 +53,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标题名称" prop="title"> <!-- <el-form-item label="标题名称" prop="title">
<el-input <el-input
v-model="queryParams.title" v-model="queryParams.title"
placeholder="请输入标题名称" placeholder="请输入标题名称"
@ -40,7 +61,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<!-- <el-form-item label="文件名称" prop="fileName"> <!-- <el-form-item label="文件名称" prop="fileName">
<el-input <el-input
v-model="queryParams.fileName" v-model="queryParams.fileName"
@ -84,8 +105,16 @@
></el-date-picker> ></el-date-picker>
</el-form-item> --> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></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-item>
</el-form> </el-form>
</div> </div>
@ -103,14 +132,16 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['tcZz/netWorkYq:yqbg:edit']" v-hasPermi="['tcZz/netWorkYq:yqbg:edit']"
>修改</el-button> >修改</el-button
>
<el-button <el-button
type="danger" type="danger"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['tcZz/netWorkYq:yqbg:remove']" v-hasPermi="['tcZz/netWorkYq:yqbg:remove']"
>删除</el-button> >删除</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -119,18 +150,47 @@
v-hasPermi="['tcZz/netWorkYq:yqbg:export']" v-hasPermi="['tcZz/netWorkYq:yqbg:export']"
>导出</el-button >导出</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> </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 type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> --> <!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="区域" align="center" prop="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="类型" align="center" prop="type"> <el-table-column label="类型" align="center" prop="type">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="标题名称" align="center" prop="title" /> <el-table-column label="标题名称" align="center" prop="title" />
@ -150,7 +210,13 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -164,19 +230,21 @@
size="mini" size="mini"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netWorkYq:yqbg:edit']" v-hasPermi="['tcZz/netWorkYq:yqbg:edit']"
>修改</el-button> >修改</el-button
>
<el-button <el-button
size="mini" size="mini"
type="danger" type="danger"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netWorkYq:yqbg:remove']" v-hasPermi="['tcZz/netWorkYq:yqbg:remove']"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :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> <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-form-item label="区域" prop="areaId">
<el-select v-model="form.areaId" placeholder="请选择区域"> <el-select v-model="form.areaId" placeholder="请选择区域">
<el-option <el-option
v-for="dict in dict.type.tc_area" v-for="dict in dict.type.tc_area"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -202,8 +281,9 @@
<el-radio <el-radio
v-for="dict in dict.type.tc_start" v-for="dict in dict.type.tc_start"
:key="dict.value" :key="dict.value"
:label="parseInt(dict.value)" :label="parseInt(dict.value)"
>{{dict.label}}</el-radio> >{{ dict.label }}</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="type"> <el-form-item label="类型" prop="type">
@ -212,7 +292,7 @@
v-for="dict in dict.type.bg_type" v-for="dict in dict.type.bg_type"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="parseInt(dict.value)" :value="parseInt(dict.value)"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -223,7 +303,7 @@
<el-input v-model="form.fileName" placeholder="请输入文件名称" /> <el-input v-model="form.fileName" placeholder="请输入文件名称" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="文件路径(完整路径)"> <el-form-item label="文件路径(完整路径)">
<fileUpload v-model="fileNameS"/> <fileUpload v-model="fileNameS" />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input v-model="form.remark" placeholder="请输入备注" />
@ -243,43 +323,70 @@
:destroy-on-close="true" :destroy-on-close="true"
custom-class="dialog-box" custom-class="dialog-box"
> >
<div slot="title" class="dialog-title">{{ infoTitle }}</div> <div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions title="舆情报告" :column="2" border labelClassName="desLable"> <el-descriptions
<el-descriptions-item label="区域">{{ selectDictLabel(dict.type.tc_area,form.areaId) }}</el-descriptions-item> title="舆情报告"
:column="2"
<el-descriptions-item label="启用/禁用">{{ selectDictLabel(dict.type.tc_start,form.isStatus) }}</el-descriptions-item> 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-descriptions>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listYqbg, getYqbg, delYqbg, addYqbg, updateYqbg, exportYqbg } from "@/api/tcZz/netWorkYq/yqbg"; import {
export default { listYqbg,
getYqbg,
delYqbg,
addYqbg,
updateYqbg,
exportYqbg,
isStatusYqbg,
importYqbg,
} from "@/api/tcZz/netWorkYq/yqbg";
import { Loading } from "element-ui";
export default {
name: "Yqbg", name: "Yqbg",
// //
dicts: ['bg_type', 'tc_area', 'tc_start'], dicts: ["bg_type", "tc_area", "tc_start"],
data() { data() {
return { return {
tableHeigth: 0, tableHeigth: 0,
// //
infoOpen:false, infoOpen: false,
// //
infoTitle:'', infoTitle: "",
// //
loading: true, loading: true,
// //
@ -331,38 +438,111 @@
updateTime: null, updateTime: null,
remark: null, remark: null,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {},
}, fileNameS: [],
fileNameS:[] //===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0]; this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1]; this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
} }
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) { if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0]; this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1]; this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
} }
listYqbg(this.queryParams).then(response => { listYqbg(this.queryParams).then((response) => {
this.yqbgList = response.rows; this.yqbgList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
}); });
}, },
// //
@ -396,7 +576,6 @@
updateTime: null, updateTime: null,
remark: null, remark: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -414,18 +593,18 @@
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length!==1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/**查看按钮操作 */ /**查看按钮操作 */
handleInfo(row){ handleInfo(row) {
this.reset(); this.reset();
const id = row.id || this.ids const id = row.id || this.ids;
getYqbg(id).then(response => { getYqbg(id).then((response) => {
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看舆情报告详情" this.infoTitle = "查看舆情报告详情";
}); });
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
@ -438,9 +617,9 @@
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.fileNameS = [] this.fileNameS = [];
const id = row.id || this.ids const id = row.id || this.ids;
getYqbg(id).then(response => { getYqbg(id).then((response) => {
this.form = response.data; this.form = response.data;
if (response.data.fileName && response.data.fileUrl) { if (response.data.fileName && response.data.fileUrl) {
let arr1 = response.data.fileName.split(","); let arr1 = response.data.fileName.split(",");
@ -459,11 +638,15 @@
// //
handleStatusChange(row) { handleStatusChange(row) {
let text = row.isStatus === 1 ? "启用" : "停用"; let text = row.isStatus === 1 ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '"吗?').then(function() { this.$modal
return updateYqbg({id:row.id, isStatus:row.isStatus}); .confirm('确认要"' + text + '"吗?')
}).then(() => { .then(function () {
return updateYqbg({ id: row.id, isStatus: row.isStatus });
})
.then(() => {
this.$modal.msgSuccess(text + "成功"); this.$modal.msgSuccess(text + "成功");
}).catch(function() { })
.catch(function () {
row.isStatus = row.isStatus === 1 ? 2 : 1; row.isStatus = row.isStatus === 1 ? 2 : 1;
}); });
}, },
@ -471,7 +654,7 @@
submitForm() { submitForm() {
let arr1 = []; let arr1 = [];
let arr2 = []; let arr2 = [];
console.log(this.fileNameS) console.log(this.fileNameS);
if (this.fileNameS.length > 0) { if (this.fileNameS.length > 0) {
this.fileNameS.forEach((value) => { this.fileNameS.forEach((value) => {
arr1.push(value.name); arr1.push(value.name);
@ -483,16 +666,16 @@
this.form.fileName = ""; this.form.fileName = "";
this.form.fileUrl = ""; this.form.fileUrl = "";
} }
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateYqbg(this.form).then(response => { updateYqbg(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addYqbg(this.form).then(response => { addYqbg(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -507,29 +690,37 @@
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", { this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(function() { })
.then(function () {
return delYqbg(ids); return delYqbg(ids);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
this.$confirm('是否确认导出所有舆情报告数据项?', "警告", { this.$confirm("是否确认导出所有舆情报告数据项?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(() => { })
this.download('/tcZz/netWorkYq/yqbg/export', { .then(() => {
...this.queryParams this.download(
}, '舆情报告_'+ new Date().getTime() +'.xlsx') "/tcZz/netWorkYq/yqbg/export",
{
...this.queryParams,
},
"舆情报告_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); })
} .catch(() => {});
} },
} },
};
</script> </script>

@ -62,87 +62,6 @@
/> />
</el-select> </el-select>
</el-form-item> </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-form-item>
<el-button <el-button
type="primary" type="primary"
@ -189,6 +108,31 @@
v-hasPermi="['tcZz/netWorkYq:yqxxltj:export']" v-hasPermi="['tcZz/netWorkYq:yqxxltj:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -411,7 +355,11 @@ import {
addYqxxltj, addYqxxltj,
updateYqxxltj, updateYqxxltj,
exportYqxxltj, exportYqxxltj,
isStatusYqxxltj,
importYqxxltj,
} from "@/api/tcZz/netWorkYq/yqxxltj"; } from "@/api/tcZz/netWorkYq/yqxxltj";
import { Loading } from "element-ui";
export default { export default {
name: "Yqxxltj", name: "Yqxxltj",
// //
@ -483,14 +431,84 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeDateTime && "" != this.daterangeDateTime) { if (null != this.daterangeDateTime && "" != this.daterangeDateTime) {
@ -511,6 +529,11 @@ export default {
this.yqxxltjList = response.rows; this.yqxxltjList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
}); });
}, },
// //

@ -47,7 +47,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标题" prop="title"> <!-- <el-form-item label="标题" prop="title">
<el-input <el-input
v-model="queryParams.title" v-model="queryParams.title"
placeholder="请输入标题" placeholder="请输入标题"
@ -55,7 +55,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="来源" prop="source"> <el-form-item label="来源" prop="source">
<el-input <el-input
v-model="queryParams.source" v-model="queryParams.source"
@ -174,6 +174,31 @@
v-hasPermi="['tcZz/netWorkYq:yqyj:export']" v-hasPermi="['tcZz/netWorkYq:yqyj:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -378,7 +403,11 @@ import {
addYqyj, addYqyj,
updateYqyj, updateYqyj,
exportYqyj, exportYqyj,
isStatusYqyj,
importYqyj,
} from "@/api/tcZz/netWorkYq/yqyj"; } from "@/api/tcZz/netWorkYq/yqyj";
import { Loading } from "element-ui";
export default { export default {
name: "Yqyj", name: "Yqyj",
// //
@ -448,14 +477,83 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeDateTime && "" != this.daterangeDateTime) { if (null != this.daterangeDateTime && "" != this.daterangeDateTime) {
@ -476,6 +574,11 @@ export default {
this.yqyjList = response.rows; this.yqyjList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
}); });
}, },
// //

@ -1,7 +1,13 @@
<template> <template>
<div class="container-main" ref="main"> <div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch"> <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-form-item label="${comment}" prop="id">
<el-input <el-input
v-model="queryParams.id" v-model="queryParams.id"
@ -12,7 +18,12 @@
/> />
</el-form-item> --> </el-form-item> -->
<el-form-item label="区域" prop="areaId"> <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 <el-option
v-for="dict in dict.type.tc_area" v-for="dict in dict.type.tc_area"
:key="dict.value" :key="dict.value"
@ -22,7 +33,12 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="启用/禁用" prop="isStatus"> <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 <el-option
v-for="dict in dict.type.tc_start" v-for="dict in dict.type.tc_start"
:key="dict.value" :key="dict.value"
@ -31,7 +47,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="舆情标题" prop="yqTitle"> <!-- <el-form-item label="舆情标题" prop="yqTitle">
<el-input <el-input
v-model="queryParams.yqTitle" v-model="queryParams.yqTitle"
placeholder="请输入舆情标题" placeholder="请输入舆情标题"
@ -48,7 +64,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="舆情状态" prop="yqState"> <el-form-item label="舆情状态" prop="yqState">
<el-input <el-input
v-model="queryParams.yqState" v-model="queryParams.yqState"
@ -110,8 +126,16 @@
/> />
</el-form-item> --> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></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-item>
</el-form> </el-form>
</div> </div>
@ -129,14 +153,16 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['tcZz/netWorkYq:zbxq:edit']" v-hasPermi="['tcZz/netWorkYq:zbxq:edit']"
>修改</el-button> >修改</el-button
>
<el-button <el-button
type="danger" type="danger"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['tcZz/netWorkYq:zbxq:remove']" v-hasPermi="['tcZz/netWorkYq:zbxq:remove']"
>删除</el-button> >删除</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -145,13 +171,42 @@
v-hasPermi="['tcZz/netWorkYq:zbxq:export']" v-hasPermi="['tcZz/netWorkYq:zbxq:export']"
>导出</el-button >导出</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> </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 type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> --> <!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="区域" align="center" prop="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="舆情标题" align="center" prop="yqTitle" /> <el-table-column label="舆情标题" align="center" prop="yqTitle" />
@ -171,7 +226,13 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -185,19 +246,21 @@
size="mini" size="mini"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netWorkYq:zbxq:edit']" v-hasPermi="['tcZz/netWorkYq:zbxq:edit']"
>修改</el-button> >修改</el-button
>
<el-button <el-button
size="mini" size="mini"
type="danger" type="danger"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netWorkYq:zbxq:remove']" v-hasPermi="['tcZz/netWorkYq:zbxq:remove']"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :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> <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-form-item label="区域" prop="areaId">
<el-select v-model="form.areaId" placeholder="请选择区域"> <el-select v-model="form.areaId" placeholder="请选择区域">
<el-option <el-option
v-for="dict in dict.type.tc_area" v-for="dict in dict.type.tc_area"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -223,8 +297,9 @@
<el-radio <el-radio
v-for="dict in dict.type.tc_start" v-for="dict in dict.type.tc_start"
:key="dict.value" :key="dict.value"
:label="parseInt(dict.value)" :label="parseInt(dict.value)"
>{{dict.label}}</el-radio> >{{ dict.label }}</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="舆情标题" prop="yqTitle"> <el-form-item label="舆情标题" prop="yqTitle">
@ -254,41 +329,66 @@
:destroy-on-close="true" :destroy-on-close="true"
custom-class="dialog-box" custom-class="dialog-box"
> >
<div slot="title" class="dialog-title">{{ infoTitle }}</div> <div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions title=" 转办量、转办详情" :column="2" border labelClassName="desLable"> <el-descriptions
<el-descriptions-item label="区域">{{ selectDictLabel(dict.type.tc_area,form.areaId) }}</el-descriptions-item> title=" 转办量、转办详情"
:column="2"
<el-descriptions-item label="启用/禁用">{{ selectDictLabel(dict.type.tc_start,form.isStatus) }}</el-descriptions-item> 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-descriptions>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listZbxq, getZbxq, delZbxq, addZbxq, updateZbxq, exportZbxq } from "@/api/tcZz/netWorkYq/zbxq"; import {
export default { listZbxq,
getZbxq,
delZbxq,
addZbxq,
updateZbxq,
exportZbxq,
isStatusZbxq,
importZbxq,
} from "@/api/tcZz/netWorkYq/zbxq";
import { Loading } from "element-ui";
export default {
name: "Zbxq", name: "Zbxq",
// //
dicts: ['tc_area', 'tc_start'], dicts: ["tc_area", "tc_start"],
data() { data() {
return { return {
tableHeigth: 0, tableHeigth: 0,
// //
infoOpen:false, infoOpen: false,
// //
infoTitle:'', infoTitle: "",
// //
loading: true, loading: true,
// //
@ -338,37 +438,109 @@
updateTime: null, updateTime: null,
remark: null, remark: null,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {},
} fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0]; this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1]; this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
} }
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) { if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0]; this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1]; this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
} }
listZbxq(this.queryParams).then(response => { listZbxq(this.queryParams).then((response) => {
this.zbxqList = response.rows; this.zbxqList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
}); });
}, },
// //
@ -400,7 +572,6 @@
updateTime: null, updateTime: null,
remark: null, remark: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -418,18 +589,18 @@
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length!==1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/**查看按钮操作 */ /**查看按钮操作 */
handleInfo(row){ handleInfo(row) {
this.reset(); this.reset();
const id = row.id || this.ids const id = row.id || this.ids;
getZbxq(id).then(response => { getZbxq(id).then((response) => {
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看 转办量、转办详情详情" this.infoTitle = "查看 转办量、转办详情详情";
}); });
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
@ -441,8 +612,8 @@
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids const id = row.id || this.ids;
getZbxq(id).then(response => { getZbxq(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改 转办量、转办详情"; this.title = "修改 转办量、转办详情";
@ -451,26 +622,30 @@
// //
handleStatusChange(row) { handleStatusChange(row) {
let text = row.isStatus === 1 ? "启用" : "停用"; let text = row.isStatus === 1 ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '"吗?').then(function() { this.$modal
return updateZbxq({id:row.id, isStatus:row.isStatus}); .confirm('确认要"' + text + '"吗?')
}).then(() => { .then(function () {
return updateZbxq({ id: row.id, isStatus: row.isStatus });
})
.then(() => {
this.$modal.msgSuccess(text + "成功"); this.$modal.msgSuccess(text + "成功");
}).catch(function() { })
.catch(function () {
row.isStatus = row.isStatus === 1 ? 2 : 1; row.isStatus = row.isStatus === 1 ? 2 : 1;
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateZbxq(this.form).then(response => { updateZbxq(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addZbxq(this.form).then(response => { addZbxq(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -485,29 +660,37 @@
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", { this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(function() { })
.then(function () {
return delZbxq(ids); return delZbxq(ids);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
this.$confirm('是否确认导出所有 转办量、转办详情数据项?', "警告", { this.$confirm("是否确认导出所有 转办量、转办详情数据项?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(() => { })
this.download('/tcZz/netWorkYq/zbxq/export', { .then(() => {
...this.queryParams this.download(
}, ' 转办量、转办详情_'+ new Date().getTime() +'.xlsx') "/tcZz/netWorkYq/zbxq/export",
{
...this.queryParams,
},
" 转办量、转办详情_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); })
} .catch(() => {});
} },
} },
};
</script> </script>

@ -79,6 +79,31 @@
v-hasPermi="['tcZz/networkSecurity:bmtb:export']" v-hasPermi="['tcZz/networkSecurity:bmtb:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -177,7 +202,7 @@
<el-form-item label="部门名称" prop="depName"> <el-form-item label="部门名称" prop="depName">
<el-input v-model="form.depName" placeholder="请输入部门名称" /> <el-input v-model="form.depName" placeholder="请输入部门名称" />
</el-form-item> </el-form-item>
<el-form-item label="上传文件" > <el-form-item label="上传文件">
<FileUpload v-model="fileNameS"></FileUpload> <FileUpload v-model="fileNameS"></FileUpload>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
@ -207,7 +232,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="部门名称">{{ <el-descriptions-item label="部门名称">{{
@ -238,7 +263,11 @@ import {
addBmtb, addBmtb,
updateBmtb, updateBmtb,
exportBmtb, exportBmtb,
isStatusBmtb,
importBmtb,
} from "@/api/tcZz/networkSecurity/bmtb"; } from "@/api/tcZz/networkSecurity/bmtb";
import { Loading } from "element-ui";
export default { export default {
name: "Bmtb", name: "Bmtb",
// //
@ -303,6 +332,10 @@ export default {
// //
rules: {}, rules: {},
fileNameS: [], fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -315,8 +348,74 @@ export default {
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -333,6 +432,11 @@ export default {
this.bmtbList = response.rows; this.bmtbList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:cybersecurity:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -222,6 +247,12 @@
placeholder="请输入受攻击IP区域" placeholder="请输入受攻击IP区域"
/> />
</el-form-item> </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-form-item label="网站安全等级" prop="netLevel">
<el-input v-model="form.netLevel" placeholder="请输入网站安全等级" /> <el-input v-model="form.netLevel" placeholder="请输入网站安全等级" />
</el-form-item> </el-form-item>
@ -261,11 +292,11 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="攻击发起时间">{{ <el-descriptions-item label="攻击发起时间">{{
@ -328,7 +359,11 @@ import {
addCybersecurity, addCybersecurity,
updateCybersecurity, updateCybersecurity,
exportCybersecurity, exportCybersecurity,
isStatusCybersecurity,
importCybersecurity,
} from "@/api/tcZz/networkSecurity/cybersecurity"; } from "@/api/tcZz/networkSecurity/cybersecurity";
import { Loading } from "element-ui";
export default { export default {
name: "Cybersecurity", name: "Cybersecurity",
// //
@ -412,6 +447,10 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -423,9 +462,75 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeStartTime && "" != this.daterangeStartTime) { if (null != this.daterangeStartTime && "" != this.daterangeStartTime) {
@ -446,6 +551,11 @@ export default {
this.cybersecurityList = response.rows; this.cybersecurityList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:dbdw:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -297,7 +322,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -357,7 +382,7 @@
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="备注">{{ <el-descriptions-item label="备注">{{
@ -376,7 +401,11 @@ import {
addDbdw, addDbdw,
updateDbdw, updateDbdw,
exportDbdw, exportDbdw,
isStatusDbdw,
importDbdw,
} from "@/api/tcZz/networkSecurity/dbdw"; } from "@/api/tcZz/networkSecurity/dbdw";
import { Loading } from "element-ui";
export default { export default {
name: "Dbdw", name: "Dbdw",
// //
@ -464,6 +493,10 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -476,8 +509,74 @@ export default {
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -494,6 +593,11 @@ export default {
this.dbdwList = response.rows; this.dbdwList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:dbxt:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -388,7 +413,11 @@ import {
addDbxt, addDbxt,
updateDbxt, updateDbxt,
exportDbxt, exportDbxt,
isStatusDbxt,
importDbxt,
} from "@/api/tcZz/networkSecurity/dbxt"; } from "@/api/tcZz/networkSecurity/dbxt";
import { Loading } from "element-ui";
export default { export default {
name: "Dbxt", name: "Dbxt",
// //
@ -482,12 +511,82 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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) { alter(e) {
updateDbxt(e).then(() => { updateDbxt(e).then(() => {
this.getList(); this.getList();
@ -495,7 +594,7 @@ export default {
}); });
}, },
/** 查询等保系统列表 */ /** 查询等保系统列表 */
getList() { getList(e) {
this.loading = true; this.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -512,6 +611,11 @@ export default {
this.dbxtList = response.rows; this.dbxtList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:idcdw:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -241,11 +266,11 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="lDC名称">{{ <el-descriptions-item label="lDC名称">{{
@ -272,7 +297,11 @@ import {
addIdcdw, addIdcdw,
updateIdcdw, updateIdcdw,
exportIdcdw, exportIdcdw,
isStatusIdcdw,
importIdcdw,
} from "@/api/tcZz/networkSecurity/idcdw"; } from "@/api/tcZz/networkSecurity/idcdw";
import { Loading } from "element-ui";
export default { export default {
name: "Idcdw", name: "Idcdw",
// //
@ -336,6 +365,10 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -348,8 +381,74 @@ export default {
this.$modal.msgSuccess("修改成功"); 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单位列表 */ /** 查询 IDC单位列表 */
getList() { getList(e) {
this.loading = true; this.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -366,6 +465,11 @@ export default {
this.idcdwList = response.rows; this.idcdwList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:jgdw:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -272,11 +297,11 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -304,7 +329,7 @@
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="记录类型">{{ <el-descriptions-item label="记录类型">{{
selectDictLabel(dict.type.tc_jslx,form.type) selectDictLabel(dict.type.tc_jslx, form.type)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="备注">{{ <el-descriptions-item label="备注">{{
@ -323,7 +348,10 @@ import {
addJgdw, addJgdw,
updateJgdw, updateJgdw,
exportJgdw, exportJgdw,
isStatusJgdw,
importJgdw,
} from "@/api/tcZz/networkSecurity/jgdw"; } from "@/api/tcZz/networkSecurity/jgdw";
import { Loading } from "element-ui";
export default { export default {
name: "Jgdw", name: "Jgdw",
// //
@ -397,6 +425,10 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -409,8 +441,74 @@ export default {
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -427,6 +525,11 @@ export default {
this.jgdwList = response.rows; this.jgdwList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
}); });
}, },
// //

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

@ -86,6 +86,31 @@
v-hasPermi="['tcZz/networkSecurity:sdtb:export']" v-hasPermi="['tcZz/networkSecurity:sdtb:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -257,7 +282,11 @@ import {
addSdtb, addSdtb,
updateSdtb, updateSdtb,
exportSdtb, exportSdtb,
isStatusSdtb,
importSdtb,
} from "@/api/tcZz/networkSecurity/sdtb"; } from "@/api/tcZz/networkSecurity/sdtb";
import { Loading } from "element-ui";
export default { export default {
name: "Sdtb", name: "Sdtb",
// //
@ -323,6 +352,10 @@ export default {
rules: {}, rules: {},
// //
fileNameS: [], fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -334,9 +367,75 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -353,6 +452,11 @@ export default {
this.sdtbList = response.rows; this.sdtbList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:tbcz:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -218,7 +243,7 @@
<el-form-item label="处置情况" prop="czState"> <el-form-item label="处置情况" prop="czState">
<el-input v-model="form.czState" placeholder="请输入处置情况" /> <el-input v-model="form.czState" placeholder="请输入处置情况" />
</el-form-item> </el-form-item>
<el-form-item label="上传文件" > <el-form-item label="上传文件">
<FileUpload v-model="fileNameS"></FileUpload> <FileUpload v-model="fileNameS"></FileUpload>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
@ -248,11 +273,11 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -291,7 +316,11 @@ import {
addTbcz, addTbcz,
updateTbcz, updateTbcz,
exportTbcz, exportTbcz,
isStatusTbcz,
importTbcz,
} from "@/api/tcZz/networkSecurity/tbcz"; } from "@/api/tcZz/networkSecurity/tbcz";
import { Loading } from "element-ui";
export default { export default {
name: "Tbcz", name: "Tbcz",
// //
@ -362,7 +391,10 @@ export default {
// //
rules: {}, rules: {},
fileNameS: [], fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -374,9 +406,75 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -393,6 +491,11 @@ export default {
this.tbczList = response.rows; this.tbczList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
}); });
}, },
// //

@ -8,7 +8,6 @@
v-show="showSearch" v-show="showSearch"
label-width="auto" label-width="auto"
> >
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-select
v-model="queryParams.areaId" v-model="queryParams.areaId"
@ -95,6 +94,31 @@
v-hasPermi="['tcZz/networkSecurity:xtjc:export']" v-hasPermi="['tcZz/networkSecurity:xtjc:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -250,11 +274,11 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -297,7 +321,11 @@ import {
addXtjc, addXtjc,
updateXtjc, updateXtjc,
exportXtjc, exportXtjc,
isStatusXtjc,
importXtjc
} from "@/api/tcZz/networkSecurity/xtjc"; } from "@/api/tcZz/networkSecurity/xtjc";
import { Loading } from "element-ui";
export default { export default {
name: "Xtjc", name: "Xtjc",
// //
@ -359,6 +387,10 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -371,8 +403,74 @@ export default {
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -389,6 +487,11 @@ export default {
this.xtjcList = response.rows; this.xtjcList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:zfwz:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -240,11 +265,11 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="网站地址">{{ <el-descriptions-item label="网站地址">{{
@ -275,7 +300,10 @@ import {
addZfwz, addZfwz,
updateZfwz, updateZfwz,
exportZfwz, exportZfwz,
isStatusZfwz,
importZfwz,
} from "@/api/tcZz/networkSecurity/zfwz"; } from "@/api/tcZz/networkSecurity/zfwz";
import { Loading } from "element-ui";
export default { export default {
name: "Zfwz", name: "Zfwz",
// //
@ -341,6 +369,10 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -352,9 +384,75 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -371,6 +469,11 @@ export default {
this.zfwzList = response.rows; this.zfwzList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; 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']" v-hasPermi="['tcZz/networkSecurity:zxyh:export']"
>导出</el-button >导出</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> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -221,7 +246,7 @@
<el-form-item label="隐患来源" prop="yhLy"> <el-form-item label="隐患来源" prop="yhLy">
<el-input v-model="form.yhLy" placeholder="请输入隐患来源" /> <el-input v-model="form.yhLy" placeholder="请输入隐患来源" />
</el-form-item> </el-form-item>
<el-form-item label="上传文件" > <el-form-item label="上传文件">
<FileUpload v-model="fileNameS"></FileUpload> <FileUpload v-model="fileNameS"></FileUpload>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
@ -251,11 +276,11 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
selectDictLabel(dict.type.tc_area,form.areaId) selectDictLabel(dict.type.tc_area, form.areaId)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="启用/禁用">{{ <el-descriptions-item label="启用/禁用">{{
selectDictLabel(dict.type.tc_start,form.isStatus) selectDictLabel(dict.type.tc_start, form.isStatus)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -298,7 +323,11 @@ import {
addZxyh, addZxyh,
updateZxyh, updateZxyh,
exportZxyh, exportZxyh,
isStatusZxyh,
importZxyh,
} from "@/api/tcZz/networkSecurity/zxyh"; } from "@/api/tcZz/networkSecurity/zxyh";
import { Loading } from "element-ui";
export default { export default {
name: "Zxyh", name: "Zxyh",
// //
@ -371,7 +400,10 @@ export default {
// //
rules: {}, rules: {},
fileNameS: [], fileNameS: [],
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
}; };
}, },
created() { created() {
@ -383,9 +415,75 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); 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.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) { if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
@ -402,6 +500,11 @@ export default {
this.zxyhList = response.rows; this.zxyhList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
if (e == 1) {
this.$modal.msgSuccess("启动成功");
} else if (e == 2) {
this.$modal.msgSuccess("禁用成功");
}
}); });
}, },
// //

Loading…
Cancel
Save