吕天方 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
})
}

File diff suppressed because it is too large Load Diff

@ -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("禁用成功");
}
}); });
}, },
// //

File diff suppressed because it is too large Load Diff

@ -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"
@ -115,7 +140,7 @@
<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="unitName" /> <el-table-column label="单位名称" align="center" prop="unitName" />
<el-table-column label="邮政编码" align="center" prop="postalCode" /> <el-table-column label="邮政编码" align="center" prop="postalCode" />
<el-table-column label="单位地址" align="center" prop="unitAddress" /> <el-table-column label="单位地址" align="center" prop="unitAddress" />
@ -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("禁用成功");
}
}); });
}, },
// //

@ -32,7 +32,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -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"
@ -107,7 +131,7 @@
<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="unitName" /> <el-table-column label="单位名称" align="center" prop="unitName" />
<el-table-column label="网站/系统名称" align="center" prop="systemName" /> <el-table-column label="网站/系统名称" align="center" prop="systemName" />
<el-table-column label="是否关注重点" align="center" prop="isFocus" /> <el-table-column label="是否关注重点" align="center" prop="isFocus" />
@ -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