所有页面增加导入功能

main
杜函宇 1 year ago
parent 39be58e2b8
commit b332c0addf

@ -42,3 +42,11 @@ export function delCy(id) {
method: 'delete'
})
}
//通用导入信息
export function importCy(data) {
return request({
url: '/tcZz/netWorkYq/cy/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delMtlx(id) {
method: 'delete'
})
}
//通用导入信息
export function importMtlx(data) {
return request({
url: '/tcZz/netWorkYq/mtlx/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delSslx(id) {
method: 'delete'
})
}
//通用导入信息
export function importSslx(data) {
return request({
url: '/tcZz/netWorkYq/sslx/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delYqzs(id) {
method: 'delete'
})
}
//通用导入信息
export function importYqzs(data) {
return request({
url: '/tcZz/netWorkYq/yqzs/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delAqyh(id) {
method: 'delete'
})
}
//通用导入信息
export function importAqyh(data) {
return request({
url: '/tcZz/networkSecurity/aqyh/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delFbqk(id) {
method: 'delete'
})
}
//通用导入信息
export function importFbqk(data) {
return request({
url: '/tcZz/networkSecurity/fbqk/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delMap(id) {
method: 'delete'
})
}
//通用导入信息
export function importMap(data) {
return request({
url: '/tcZz/networkSecurity/map/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delTbwc(id) {
method: 'delete'
})
}
//通用导入信息
export function importTbwc(data) {
return request({
url: '/tcZz/networkSecurity/tbwc/common/importExcel',
method: 'post',
data
})
}

@ -42,3 +42,11 @@ export function delTop5(id) {
method: 'delete'
})
}
//通用导入信息
export function importTop5(data) {
return request({
url: '/tcZz/networkSecurity/top5/common/importExcel',
method: 'post',
data
})
}

@ -1,7 +1,8 @@
@import "./element-variables.scss";
.container-main {
height: calc(100vh - 84px);
overflow: hidden;
// overflow: hidden;
overflow-y:scroll ;
padding: 0 10px;
//
.search-hearder {

@ -1,8 +1,13 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<!-- <el-form-item label="${comment}" prop="id">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
>
<!-- <el-form-item label="${comment}" prop="id">
<el-input
v-model="queryParams.id"
placeholder="请输入${comment}"
@ -11,15 +16,15 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="类型" prop="type">
<el-input
v-model="queryParams.type"
placeholder="请输入类型"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
<!-- <el-select v-model="queryParams.type" placeholder="请选择类型" clearable size="small">
<el-form-item label="类型" prop="type">
<el-input
v-model="queryParams.type"
placeholder="请输入类型"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
<!-- <el-select v-model="queryParams.type" placeholder="请选择类型" clearable size="small">
<el-option
v-for="dict in dict.type.tc_jbsjtype"
:key="dict.value"
@ -27,17 +32,17 @@
:value="dict.value"
/>
</el-select> -->
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input
v-model="queryParams.count"
placeholder="请输入数量"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="创建者" prop="createBy">
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input
v-model="queryParams.count"
placeholder="请输入数量"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="创建者" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建者"
@ -88,99 +93,134 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['tcZz/netManage:jbsjndfltj:add']"
v-hasPermi="['tcZz/netManage:jbsjndfltj:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netManage:jbsjndfltj:edit']"
>修改</el-button>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netManage:jbsjndfltj:remove']"
>删除</el-button>
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netManage:jbsjndfltj:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netManage:jbsjndfltj:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="exportFile"></el-button>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['tcZz/netManage:jbsjndfltj:export']"
v-hasPermi="['tcZz/netManage:jbsjndfltj:export']"
>导出</el-button
>
</div>
<el-table v-loading="loading" :data="jbsjndfltjList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="jbsjndfltjList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="类型" align="center" prop="type">
<!-- <template slot-scope="scope">
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="类型" align="center" prop="type">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.tc_jbsjtype" :value="scope.row.type"/>
</template> -->
</el-table-column>
<el-table-column label="数量" align="center" prop="count" />
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
</el-table-column>
<el-table-column label="数量" align="center" prop="count" />
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netManage:jbsjndfltj:list']"
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netManage:jbsjndfltj:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netManage:jbsjndfltj:edit']"
>修改</el-button>
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netManage:jbsjndfltj:edit']"
>修改</el-button
>
<el-button
size="mini"
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netManage:jbsjndfltj:remove']"
>删除</el-button>
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netManage:jbsjndfltj:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改举报事件年度分类统计对话框 -->
<el-dialog :visible.sync="open" width="500px" append-to-body custom-class="dialog-box">
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form ref="form" :model="form" :rules="rules" label-width="auto" class="dialog-from">
<el-form-item label="类型" prop="type">
<el-input
v-model="form.type"
placeholder="请输入类型"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
<!-- <el-select v-model="form.type" placeholder="请选择类型">
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="类型" prop="type">
<el-input
v-model="form.type"
placeholder="请输入类型"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
<!-- <el-select v-model="form.type" placeholder="请选择类型">
<el-option
v-for="dict in dict.type.tc_jbsjtype"
:key="dict.value"
@ -188,14 +228,24 @@
:value="parseInt(dict.value)"
></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input v-model="form.count" type="number" placeholder="请输入数量" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<!-- <el-input v-model="form.remark" placeholder="请输入备注" /> -->
<el-input v-model="form.remark" resize="none" :rows="5" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input
v-model="form.count"
type="number"
placeholder="请输入数量"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<!-- <el-input v-model="form.remark" placeholder="请输入备注" /> -->
<el-input
v-model="form.remark"
resize="none"
:rows="5"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -204,244 +254,276 @@
</el-dialog>
<!--查看举报事件年度分类统计详情页-->
<el-dialog
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
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-item label="类型">{{ form.type }}</el-descriptions-item>
<el-descriptions-item label="数量">{{ form.count }}</el-descriptions-item>
<el-descriptions
title="举报事件年度分类统计"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="类型">{{
form.type
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{ form.remark }}</el-descriptions-item>
<el-descriptions-item label="数量">{{
form.count
}}</el-descriptions-item>
</el-descriptions>
<el-descriptions-item label="备注">{{
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<import-dialog
ref="importdialog"
propsUrl="/tcZz/netManage/jbsjndfltj/common/importExcel"
importUrl="/tcZz/netManage/jbsjndfltj/importTemplate"
importName="举报年度事件分类统计"
:getList="getList"
></import-dialog>
</div>
</template>
<script>
import { listJbsjndfltj, getJbsjndfltj, delJbsjndfltj, addJbsjndfltj, updateJbsjndfltj, exportJbsjndfltj, importExcel } from "@/api/tcZz/netManage/jbsjndfltj";
export default {
name: "Jbsjndfltj",
//
data() {
return {
tableHeigth: 0,
//
infoOpen:false,
//
infoTitle:'',
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
jbsjndfltjList: [],
//
title: "",
//
open: false,
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
type: null,
count: null,
import {
listJbsjndfltj,
getJbsjndfltj,
delJbsjndfltj,
addJbsjndfltj,
updateJbsjndfltj,
exportJbsjndfltj,
importExcel,
} from "@/api/tcZz/netManage/jbsjndfltj";
import importDialog from "@/views/components/importDialog/index.vue";
createBy: null,
export default {
name: "Jbsjndfltj",
components: { importDialog },
//
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
jbsjndfltjList: [],
//
title: "",
//
open: false,
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
createTime: null,
type: null,
updateBy: null,
count: null,
updateTime: null,
createBy: null,
remark: null,
createTime: null,
},
//
form: {},
//
rules: {
type:[
{ required: true, message: '请输入类型', trigger: 'blur' },
],
count:[
{ required: true, message: '请输入数量', trigger: 'blur' },
],
},
fileList:[],
};
},
created() {
updateBy: null,
this.getList();
updateTime: null,
},
methods: {
/** 查询举报事件年度分类统计列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listJbsjndfltj(this.queryParams).then(response => {
this.jbsjndfltjList = response.rows;
this.total = response.total;
this.loading = false;
});
remark: null,
},
//
cancel() {
this.open = false;
this.reset();
//
form: {},
//
rules: {
type: [{ required: true, message: "请输入类型", trigger: "blur" }],
count: [{ required: true, message: "请输入数量", trigger: "blur" }],
},
//
reset() {
this.form = {
id: null,
type: null,
fileList: [],
};
},
created() {
this.getList();
},
methods: {
/** 导入按钮操作 */
exportFile() {
this.$refs.importdialog.open();
},
/** 查询举报事件年度分类统计列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listJbsjndfltj(this.queryParams).then((response) => {
this.jbsjndfltjList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
count: null,
type: null,
createBy: null,
count: null,
createTime: null,
createBy: null,
updateBy: null,
createTime: null,
updateTime: null,
updateBy: null,
remark: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/**查看按钮操作 */
handleInfo(row){
this.reset();
const id = row.id || this.ids
getJbsjndfltj(id).then(response => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看举报事件年度分类统计详情"
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
remark: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getJbsjndfltj(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看举报事件年度分类统计详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加举报事件年度分类统计";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getJbsjndfltj(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "添加举报事件年度分类统计";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getJbsjndfltj(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改举报事件年度分类统计";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateJbsjndfltj(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addJbsjndfltj(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
this.title = "修改举报事件年度分类统计";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateJbsjndfltj(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addJbsjndfltj(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delJbsjndfltj(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有举报事件年度分类统计数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.download('/tcZz/netManage/jbsjndfltj/export', {
...this.queryParams
}, '举报事件年度分类统计_'+ new Date().getTime() +'.xlsx')
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有举报事件年度分类统计数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/tcZz/netManage/jbsjndfltj/export",
{
...this.queryParams,
},
"举报事件年度分类统计_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
}).catch(() => {});
},
}
}
})
.catch(() => {});
},
},
};
</script>

@ -1,8 +1,13 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<!-- <el-form-item label="${comment}" prop="id">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
>
<!-- <el-form-item label="${comment}" prop="id">
<el-input
v-model="queryParams.id"
placeholder="请输入${comment}"
@ -11,7 +16,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<!-- <el-form-item label="日期">
<!-- <el-form-item label="日期">
<el-date-picker
v-model="daterangeDateTime"
size="small"
@ -23,25 +28,25 @@
end-placeholder="结束日期"
></el-date-picker>
</el-form-item> -->
<el-form-item label="处理有害信息数量" prop="count1">
<el-input
v-model="queryParams.count1"
placeholder="请输入处理有害信息数量"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="关闭直播平台违规账号(个)" prop="count2">
<el-input
v-model="queryParams.count2"
placeholder="请输入关闭直播平台违规账号(个)"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="创建者" prop="createBy">
<el-form-item label="处理有害信息数量" prop="count1">
<el-input
v-model="queryParams.count1"
placeholder="请输入处理有害信息数量"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="关闭直播平台违规账号(个)" prop="count2">
<el-input
v-model="queryParams.count2"
placeholder="请输入关闭直播平台违规账号(个)"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="创建者" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建者"
@ -92,109 +97,165 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:add']"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:edit']"
>修改</el-button>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:remove']"
>删除</el-button>
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="exportFile"></el-button>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:export']"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:export']"
>导出</el-button
>
</div>
<el-table v-loading="loading" :data="qlzxxdsjtjList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="qlzxxdsjtjList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="日期" align="center" prop="dateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.dateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="处理有害信息数量" align="center" prop="count1" />
<el-table-column label="关闭直播平台违规账号(个)" align="center" prop="count2" />
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="日期" align="center" prop="dateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.dateTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="处理有害信息数量" align="center" prop="count1" />
<el-table-column
label="关闭直播平台违规账号(个)"
align="center"
prop="count2"
/>
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:list']"
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:edit']"
>修改</el-button>
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:edit']"
>修改</el-button
>
<el-button
size="mini"
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:remove']"
>删除</el-button>
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netManage:qlzxxdsjtj:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改清郎专项行动数据统计对话框 -->
<el-dialog :visible.sync="open" width="500px" append-to-body custom-class="dialog-box">
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form ref="form" :model="form" :rules="rules" label-width="auto" class="dialog-from">
<el-form-item label="日期" prop="dateTime">
<el-date-picker clearable size="small"
v-model="form.dateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="处理有害信息数量" prop="count1">
<el-input v-model="form.count1" type="number" placeholder="请输入处理有害信息数量" />
</el-form-item>
<el-form-item label="关闭直播平台违规账号(个)" prop="count2">
<el-input v-model="form.count2" type="number" placeholder="请输入关闭直播平台违规账号(个)" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<!-- <el-input v-model="form.remark" placeholder="请输入备注" /> -->
<el-input v-model="form.remark" resize="none" :rows="5" type="textarea" placeholder="请输入备注" />
</el-form-item>
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="日期" prop="dateTime">
<el-date-picker
clearable
size="small"
v-model="form.dateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="处理有害信息数量" prop="count1">
<el-input
v-model="form.count1"
type="number"
placeholder="请输入处理有害信息数量"
/>
</el-form-item>
<el-form-item label="关闭直播平台违规账号(个)" prop="count2">
<el-input
v-model="form.count2"
type="number"
placeholder="请输入关闭直播平台违规账号(个)"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<!-- <el-input v-model="form.remark" placeholder="请输入备注" /> -->
<el-input
v-model="form.remark"
resize="none"
:rows="5"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -203,260 +264,304 @@
</el-dialog>
<!--查看清郎专项行动数据统计详情页-->
<el-dialog
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
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-item label="日期">{{ form.dateTime }}</el-descriptions-item>
<el-descriptions-item label="处理有害信息数量">{{ form.count1 }}</el-descriptions-item>
<el-descriptions
title="清郎专项行动数据统计"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="日期">{{
form.dateTime
}}</el-descriptions-item>
<el-descriptions-item label="关闭直播平台违规账号(个)">{{ form.count2 }}</el-descriptions-item>
<el-descriptions-item label="处理有害信息数量">{{
form.count1
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{ form.remark }}</el-descriptions-item>
<el-descriptions-item label="关闭直播平台违规账号(个)">{{
form.count2
}}</el-descriptions-item>
</el-descriptions>
<el-descriptions-item label="备注">{{
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<import-dialog
ref="importdialog"
propsUrl="/tcZz/netManage/qlzxxdsjtj/common/importExcel"
importUrl="/tcZz/netManage/qlzxxdsjtj/importTemplate"
importName="清朗专项行动数据统计"
:getList="getList"
></import-dialog>
</div>
</template>
<script>
import { listQlzxxdsjtj, getQlzxxdsjtj, delQlzxxdsjtj, addQlzxxdsjtj, updateQlzxxdsjtj, exportQlzxxdsjtj, importExcel } from "@/api/tcZz/netManage/qlzxxdsjtj";
export default {
name: "Qlzxxdsjtj",
//
data() {
return {
tableHeigth: 0,
//
infoOpen:false,
//
infoTitle:'',
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
qlzxxdsjtjList: [],
//
title: "",
//
open: false,
//
daterangeDateTime: [],
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
import {
listQlzxxdsjtj,
getQlzxxdsjtj,
delQlzxxdsjtj,
addQlzxxdsjtj,
updateQlzxxdsjtj,
exportQlzxxdsjtj,
importExcel,
} from "@/api/tcZz/netManage/qlzxxdsjtj";
import importDialog from "@/views/components/importDialog/index.vue";
dateTime: null,
export default {
name: "Qlzxxdsjtj",
components: { importDialog },
count1: null,
//
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
qlzxxdsjtjList: [],
//
title: "",
//
open: false,
//
daterangeDateTime: [],
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
count2: null,
dateTime: null,
createBy: null,
count1: null,
createTime: null,
count2: null,
updateBy: null,
createBy: null,
updateTime: null,
createTime: null,
remark: null,
},
//
form: {},
//
rules: {
dateTime:[
{ required: true, message: '请选择日期', trigger: 'blur' },
],
count1:[
{ required: true, message: '请输入处理有害信息数量', trigger: 'blur' },
],
count2:[
{ required: true, message: '请输入关闭直播平台违规账号(个)', trigger: 'blur' },
],
},
fileList:[],
};
},
created() {
updateBy: null,
this.getList();
updateTime: null,
},
methods: {
/** 查询清郎专项行动数据统计列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeDateTime && '' != this.daterangeDateTime) {
this.queryParams.params["beginDateTime"] = this.daterangeDateTime[0];
this.queryParams.params["endDateTime"] = this.daterangeDateTime[1];
}
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listQlzxxdsjtj(this.queryParams).then(response => {
this.qlzxxdsjtjList = response.rows;
this.total = response.total;
this.loading = false;
});
remark: null,
},
//
cancel() {
this.open = false;
this.reset();
//
form: {},
//
rules: {
dateTime: [{ required: true, message: "请选择日期", trigger: "blur" }],
count1: [
{
required: true,
message: "请输入处理有害信息数量",
trigger: "blur",
},
],
count2: [
{
required: true,
message: "请输入关闭直播平台违规账号(个)",
trigger: "blur",
},
],
},
//
reset() {
this.form = {
id: null,
dateTime: null,
fileList: [],
};
},
created() {
this.getList();
},
methods: {
exportFile() {
this.$refs.importdialog.open();
},
/** 查询清郎专项行动数据统计列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeDateTime && "" != this.daterangeDateTime) {
this.queryParams.params["beginDateTime"] = this.daterangeDateTime[0];
this.queryParams.params["endDateTime"] = this.daterangeDateTime[1];
}
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listQlzxxdsjtj(this.queryParams).then((response) => {
this.qlzxxdsjtjList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
count1: null,
dateTime: null,
count2: null,
count1: null,
createBy: null,
count2: null,
createTime: null,
createBy: null,
updateBy: null,
createTime: null,
updateTime: null,
updateBy: null,
remark: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeDateTime = [];
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/**查看按钮操作 */
handleInfo(row){
this.reset();
const id = row.id || this.ids
getQlzxxdsjtj(id).then(response => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看清郎专项行动数据统计详情"
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
remark: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeDateTime = [];
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getQlzxxdsjtj(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看清郎专项行动数据统计详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加清郎专项行动数据统计";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getQlzxxdsjtj(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "添加清郎专项行动数据统计";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getQlzxxdsjtj(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改清郎专项行动数据统计";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateQlzxxdsjtj(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addQlzxxdsjtj(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
this.title = "修改清郎专项行动数据统计";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateQlzxxdsjtj(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addQlzxxdsjtj(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delQlzxxdsjtj(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有清郎专项行动数据统计数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.download('/tcZz/netManage/qlzxxdsjtj/export', {
...this.queryParams
}, '清郎专项行动数据统计_'+ new Date().getTime() +'.xlsx')
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有清郎专项行动数据统计数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/tcZz/netManage/qlzxxdsjtj/export",
{
...this.queryParams,
},
"清郎专项行动数据统计_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
}).catch(() => {});
},
}
}
})
.catch(() => {});
},
},
};
</script>

@ -1,104 +1,144 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
>
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['tcZz/netManage:ytlc:add']"
v-hasPermi="['tcZz/netManage:ytlc:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netManage:ytlc:edit']"
>修改</el-button>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netManage:ytlc:remove']"
>删除</el-button>
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netManage:ytlc:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netManage:ytlc:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="exportFile"></el-button>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['tcZz/netManage:ytlc:export']"
v-hasPermi="['tcZz/netManage:ytlc:export']"
>导出</el-button
>
</div>
<el-table v-loading="loading" :data="ytlcList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="ytlcList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="文件名称" align="center" prop="fileName" />
<!-- <el-table-column label="文件路径(完整路径)" align="center" prop="fileUrl" />
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="文件名称" align="center" prop="fileName" />
<!-- <el-table-column label="文件路径(完整路径)" align="center" prop="fileUrl" />
<el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netManage:ytlc:list']"
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netManage:ytlc:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netManage:ytlc:edit']"
>修改</el-button>
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netManage:ytlc:edit']"
>修改</el-button
>
<el-button
size="mini"
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netManage:ytlc:remove']"
>删除</el-button>
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netManage:ytlc:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改约谈流程对话框 -->
<el-dialog :visible.sync="open" width="600px" append-to-body custom-class="dialog-box">
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form ref="form" :model="form" :rules="rules" label-width="auto" class="dialog-from">
<el-dialog
:visible.sync="open"
width="600px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="上传文件">
<!-- <el-button @click="addDomain" type="primary">添加文件</el-button> -->
<!-- <el-form-item label="文件路径(完整路径)"> -->
<fileUpload v-model="fileNameS" :limit="1"/>
<fileUpload v-model="fileNameS" :limit="1" />
<!-- </el-form-item> -->
</el-form-item>
<!-- <div v-for="(domain, index) in form.domains" :key="index" class="file-item">
@ -124,7 +164,13 @@
</div> -->
<el-form-item label="备注" prop="remark">
<!-- <el-input v-model="form.remark" placeholder="请输入备注" /> -->
<el-input v-model="form.remark" resize="none" :rows="5" type="textarea" placeholder="请输入备注" />
<el-input
v-model="form.remark"
resize="none"
:rows="5"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -134,334 +180,372 @@
</el-dialog>
<!--查看约谈流程详情页-->
<el-dialog
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
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-item label="名称">{{ form.name }}</el-descriptions-item>
<el-descriptions
title="约谈流程"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="名称">{{
form.name
}}</el-descriptions-item>
<!-- <el-descriptions-item label="文件名称">{{ form.fileName }}</el-descriptions-item> -->
<el-descriptions-item label="文件"><a v-for="(item,index) in files" :key="index" :href="item.url" target="blank">{{ item.name }}</a></el-descriptions-item>
<el-descriptions-item label="文件"
><a
v-for="(item, index) in files"
:key="index"
:href="item.url"
target="blank"
>{{ item.name }}</a
></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-item label="备注">{{
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<import-dialog
ref="importdialog"
propsUrl="/tcZz/netManage/ytlc/common/importExcel"
importUrl="/tcZz/netManage/ytlc/importTemplate"
importName="约谈流程"
:getList="getList"
></import-dialog>
</div>
</template>
<script>
import { listYtlc, getYtlc, delYtlc, addYtlc, updateYtlc, exportYtlc } from "@/api/tcZz/netManage/ytlc";
export default {
name: "Ytlc",
//
data() {
return {
tableHeigth: 0,
//
infoOpen:false,
//
infoTitle:'',
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ytlcList: [],
//
title: "",
//
open: false,
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
import {
listYtlc,
getYtlc,
delYtlc,
addYtlc,
updateYtlc,
exportYtlc,
} from "@/api/tcZz/netManage/ytlc";
import importDialog from "@/views/components/importDialog/index.vue"
export default {
name: "Ytlc",
components: { importDialog },
//
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ytlcList: [],
//
title: "",
//
open: false,
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
name: null,
fileName: null,
fileUrl: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
},
//
form: {
// domains: [
// {
// fileName: "",
// fileUrl: "",
// }
// ],
},
//
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
},
fileList: [],
fileNameS: [],
files: [],
};
},
created() {
this.getList();
},
methods: {
/** 导入按钮操作 */
exportFile() {
this.$refs.importdialog.open();
},
/** 查询约谈流程列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listYtlc(this.queryParams).then((response) => {
this.ytlcList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
name: null,
fileName: null,
fileName: null,
fileUrl: null,
fileUrl: null,
createBy: null,
createBy: null,
createTime: null,
createTime: null,
updateBy: null,
updateBy: null,
updateTime: null,
updateTime: null,
remark: null,
remark: null,
},
//
form: {
// domains: [
// {
// fileName: "",
// fileUrl: "",
// }
// ],
},
//
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' },
],
},
fileList:[],
fileNameS:[],
files:[],
// domains: [
// {
// fileName: "",
// fileUrl: "",
// }
// ],
};
this.resetForm("form");
},
created() {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
methods: {
/** 查询约谈流程列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
this.files = [];
const id = row.id || this.ids;
getYtlc(id).then((response) => {
this.form = response.data;
let arr1 = this.form.fileName.split(",");
let arr2 = this.form.fileUrl.split(",");
if (arr1[0] !== "" && arr1.length > 0 && arr2.length > 0) {
arr1.forEach((item, index) => {
let obj = {};
obj.name = item;
obj.url = arr2[index];
this.files.push(obj);
});
} else {
this.files = [];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
this.infoOpen = true;
this.infoTitle = "查看约谈流程详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.fileNameS = [];
this.open = true;
this.title = "添加约谈流程";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.fileNameS = [];
const id = row.id || this.ids;
getYtlc(id).then((response) => {
// console.log(response.data,'response.data')
this.form = response.data;
// this.form.name = response.data.name;
// this.form.createTime = response.data.createTime;
// this.form.remark = response.data.remark;
// this.form.id = response.data.id;
// console.log(this.form,'this.form')
if (response.data.fileName && response.data.fileUrl) {
let arr1 = response.data.fileName.split(",");
let arr2 = response.data.fileUrl.split(",");
arr1.forEach((value, index) => {
this.fileNameS.push({
name: value,
url: arr2[index],
});
});
}
listYtlc(this.queryParams).then(response => {
this.ytlcList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
fileName: null,
fileUrl: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
// domains: [
// {
// fileName: "",
// fileUrl: "",
// }
// ],
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/**查看按钮操作 */
handleInfo(row){
this.reset();
this.files = [];
const id = row.id || this.ids
getYtlc(id).then(response => {
this.form = response.data;
let arr1 = this.form.fileName.split(',');
let arr2 = this.form.fileUrl.split(',');
if(arr1[0] !== '' && arr1.length > 0 && arr2.length > 0) {
arr1.forEach((item,index)=>{
let obj = {};
obj.name = item;
obj.url = arr2[index];
this.files.push(obj);
})
// console.log(this.fileNameS,'this.fileNameS')
this.open = true;
this.title = "修改约谈流程";
});
},
/** 提交按钮 */
submitForm() {
let arr1 = [];
let arr2 = [];
let reg = new RegExp("http");
if (this.fileNameS.length > 0) {
this.fileNameS.forEach((value) => {
arr1.push(value.name);
if (reg.test(value.url)) {
arr2.push(value.url);
} else {
this.files = [];
arr2.push(process.env.VUE_APP_BASE_API + value.url);
}
this.infoOpen = true;
this.infoTitle = "查看约谈流程详情"
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.fileNameS = [];
this.open = true;
this.title = "添加约谈流程";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.fileNameS = []
const id = row.id || this.ids
getYtlc(id).then(response => {
// console.log(response.data,'response.data')
this.form = response.data;
// this.form.name = response.data.name;
// this.form.createTime = response.data.createTime;
// this.form.remark = response.data.remark;
// this.form.id = response.data.id;
// console.log(this.form,'this.form')
if (response.data.fileName && response.data.fileUrl) {
let arr1 = response.data.fileName.split(",");
let arr2 = response.data.fileUrl.split(",");
arr1.forEach((value, index) => {
this.fileNameS.push({
name: value,
url: arr2[index],
});
this.form.fileName = arr1.join(",");
this.form.fileUrl = arr2.join(",");
} else {
this.form.fileName = "";
this.form.fileUrl = "";
}
console.log(this.form, "this.form");
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
console.log(this.form);
updateYtlc(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addYtlc(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
// console.log(this.fileNameS,'this.fileNameS')
this.open = true;
this.title = "修改约谈流程";
});
},
/** 提交按钮 */
submitForm() {
let arr1 = [];
let arr2 = [];
let reg = new RegExp('http')
if (this.fileNameS.length > 0) {
this.fileNameS.forEach((value) => {
arr1.push(value.name);
if(reg.test(value.url)){
arr2.push(value.url);
} else {
arr2.push(process.env.VUE_APP_BASE_API + value.url);
}
});
this.form.fileName = arr1.join(",");
this.form.fileUrl = arr2.join(",");
} else {
this.form.fileName = "";
this.form.fileUrl = "";
}
console.log(this.form,'this.form')
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
console.log(this.form)
updateYtlc(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addYtlc(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delYtlc(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有约谈流程数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.download('/tcZz/netManage/ytlc/export', {
...this.queryParams
}, '约谈流程_'+ new Date().getTime() +'.xlsx')
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有约谈流程数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/tcZz/netManage/ytlc/export",
{
...this.queryParams,
},
"约谈流程_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
}).catch(() => {});
},
addDomain() {
this.form.domains.push({
fileUrl: '',
fileName: '',
});
console.log(this.form.domains,'domains')
},
removeDomain(item) {
var index = this.form.domains.indexOf(item)
// console.log(index,'index')
if (index !== -1) {
this.form.domains.splice(index, 1)
}
},
}
}
})
.catch(() => {});
},
addDomain() {
this.form.domains.push({
fileUrl: "",
fileName: "",
});
console.log(this.form.domains, "domains");
},
removeDomain(item) {
var index = this.form.domains.indexOf(item);
// console.log(index,'index')
if (index !== -1) {
this.form.domains.splice(index, 1);
}
},
},
};
</script>
<style lang="scss" scoped>
// ::v-deep .el-dialog {
@ -481,7 +565,7 @@
// }
// }
// }
// }
// }
a {
color: #0072c6;
margin: 0 5px;

@ -140,6 +140,9 @@
v-hasPermi="['tcZz/netWorkYq:cy:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
@ -280,6 +283,47 @@
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -291,7 +335,9 @@ import {
addCy,
updateCy,
exportCy,
importCy,
} from "@/api/tcZz/netWorkYq/cy";
import { getToken } from "@/utils/auth";
export default {
name: "Cy",
//
@ -355,12 +401,68 @@ export default {
rules: {
areaId: [{ required: true, message: "请选择区域", trigger: "blur" }],
},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/netWorkYq/cy/importTemplate",
{},
`词云模板.xlsx`
);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importCy(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询词云列表 */
getList() {
this.loading = true;

@ -124,6 +124,9 @@
v-hasPermi="['tcZz/netWorkYq:mtlx:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
@ -142,7 +145,7 @@
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="占比" align="center" prop="zb" />
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column
label="操作"
align="center"
@ -242,6 +245,47 @@
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -253,7 +297,10 @@ import {
addMtlx,
updateMtlx,
exportMtlx,
importMtlx,
} from "@/api/tcZz/netWorkYq/mtlx";
import { getToken } from "@/utils/auth";
export default {
name: "Mtlx",
//
@ -312,12 +359,68 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/netWorkYq/mtlx/importTemplate",
{},
`媒体类型模板.xlsx`
);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importMtlx(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询媒体类型列表 */
getList() {
this.loading = true;

@ -1,8 +1,14 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="auto">
<!-- <el-form-item label="${comment}" prop="id">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<!-- <el-form-item label="${comment}" prop="id">
<el-input
v-model="queryParams.id"
placeholder="请输入${comment}"
@ -11,25 +17,25 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="占比" prop="zb">
<el-input
v-model="queryParams.zb"
placeholder="请输入占比"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="创建者" prop="createBy">
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="占比" prop="zb">
<el-input
v-model="queryParams.zb"
placeholder="请输入占比"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="创建者" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建者"
@ -38,7 +44,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<!-- <el-form-item label="创建时间">
<!-- <el-form-item label="创建时间">
<el-date-picker
v-model="daterangeCreateTime"
size="small"
@ -50,7 +56,7 @@
end-placeholder="结束日期"
></el-date-picker>
</el-form-item> -->
<!-- <el-form-item label="更新者" prop="updateBy">
<!-- <el-form-item label="更新者" prop="updateBy">
<el-input
v-model="queryParams.updateBy"
placeholder="请输入更新者"
@ -80,95 +86,131 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['tcZz/netWorkYq:sslx:add']"
v-hasPermi="['tcZz/netWorkYq:sslx:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netWorkYq:sslx:edit']"
>修改</el-button>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netWorkYq:sslx:remove']"
>删除</el-button>
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['tcZz/netWorkYq:sslx:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tcZz/netWorkYq:sslx:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['tcZz/netWorkYq:sslx:export']"
v-hasPermi="['tcZz/netWorkYq:sslx:export']"
>导出</el-button
>
</div>
<el-table v-loading="loading" :data="sslxList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="sslxList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="占比" align="center" prop="zb" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
<!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="占比" align="center" prop="zb" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netWorkYq:sslx:list']"
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['tcZz/netWorkYq:sslx:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netWorkYq:sslx:edit']"
>修改</el-button>
@click="handleUpdate(scope.row)"
v-hasPermi="['tcZz/netWorkYq:sslx:edit']"
>修改</el-button
>
<el-button
size="mini"
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netWorkYq:sslx:remove']"
>删除</el-button>
@click="handleDelete(scope.row)"
v-hasPermi="['tcZz/netWorkYq:sslx:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改涉事类型对话框 -->
<el-dialog :visible.sync="open" width="500px" append-to-body custom-class="dialog-box">
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form ref="form" :model="form" :rules="rules" label-width="auto" class="dialog-from">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="占比" prop="zb">
<el-input v-model="form.zb" placeholder="请输入占比" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="占比" prop="zb">
<el-input v-model="form.zb" placeholder="请输入占比" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -177,237 +219,354 @@
</el-dialog>
<!--查看涉事类型详情页-->
<el-dialog
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
:visible.sync="infoOpen"
width="90%"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
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-item label="名称">{{ form.name }}</el-descriptions-item>
<el-descriptions-item label="占比">{{ form.zb }}</el-descriptions-item>
<el-descriptions
title="涉事类型"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="名称">{{
form.name
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{ form.remark }}</el-descriptions-item>
<el-descriptions-item label="占比">{{ form.zb }}</el-descriptions-item>
</el-descriptions>
<el-descriptions-item label="备注">{{
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listSslx, getSslx, delSslx, addSslx, updateSslx, exportSslx } from "@/api/tcZz/netWorkYq/sslx";
export default {
name: "Sslx",
//
data() {
return {
tableHeigth: 0,
//
infoOpen:false,
//
infoTitle:'',
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
sslxList: [],
//
title: "",
//
open: false,
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
import {
listSslx,
getSslx,
delSslx,
addSslx,
updateSslx,
exportSslx,
importSslx
} from "@/api/tcZz/netWorkYq/sslx";
import { getToken } from "@/utils/auth";
name: null,
export default {
name: "Sslx",
//
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
sslxList: [],
//
title: "",
//
open: false,
//
daterangeCreateTime: [],
//
daterangeUpdateTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
zb: null,
name: null,
createBy: null,
zb: null,
createTime: null,
createBy: null,
updateBy: null,
createTime: null,
updateTime: null,
updateBy: null,
remark: null,
updateTime: null,
},
//
form: {},
//
rules: {
}
};
remark: null,
},
//
form: {},
//
rules: {},
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/netWorkYq/sslx/importTemplate",
{},
`涉事类型模板.xlsx`
);
},
created() {
this.getList();
importFiles() {
this.fileOpen = true;
},
methods: {
/** 查询涉事类型列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listSslx(this.queryParams).then(response => {
this.sslxList = response.rows;
this.total = response.total;
this.loading = false;
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importSslx(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
},
/** 查询涉事类型列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] =
this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && "" != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] =
this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listSslx(this.queryParams).then((response) => {
this.sslxList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
zb: null,
name: null,
createBy: null,
zb: null,
createTime: null,
createBy: null,
updateBy: null,
createTime: null,
updateTime: null,
updateBy: null,
remark: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/**查看按钮操作 */
handleInfo(row){
this.reset();
const id = row.id || this.ids
getSslx(id).then(response => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看涉事类型详情"
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
remark: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.daterangeUpdateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getSslx(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看涉事类型详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加涉事类型";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getSslx(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "添加涉事类型";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getSslx(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改涉事类型";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateSslx(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addSslx(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
this.title = "修改涉事类型";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateSslx(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addSslx(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delSslx(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有涉事类型数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.download('/tcZz/netWorkYq/sslx/export', {
...this.queryParams
}, '涉事类型_'+ new Date().getTime() +'.xlsx')
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有涉事类型数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/tcZz/netWorkYq/sslx/export",
{
...this.queryParams,
},
"涉事类型_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
}).catch(() => {});
}
}
}
})
.catch(() => {});
},
},
};
</script>

@ -94,10 +94,9 @@
v-hasPermi="['tcZz/netWorkYq:yqzs:remove']"
>删除</el-button
>
<!-- @click="handleImport" -->
<!-- <el-button type="info" size="mini" v-hasPermi="['system:user:import']"
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
> -->
>
<el-button
type="warning"
size="mini"
@ -245,8 +244,6 @@
form.dateTime
}}</el-descriptions-item>
<el-descriptions-item label="非敏感数量">{{
form.count1
}}</el-descriptions-item>
@ -254,11 +251,52 @@
<el-descriptions-item label="敏感数量">{{
form.count2
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{
<el-descriptions-item label="备注">{{
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -270,7 +308,10 @@ import {
addYqzs,
updateYqzs,
exportYqzs,
importYqzs
} from "@/api/tcZz/netWorkYq/yqzs";
import { getToken } from "@/utils/auth";
export default {
name: "Yqzs",
//
@ -338,15 +379,76 @@ export default {
rules: {
areaId: [{ required: true, message: "请选择区域", trigger: "blur" }],
dateTime: [{ required: true, message: "请选择日期", trigger: "blur" }],
count1: [{ required: true, message: "请输入非敏感数量", trigger: "blur" }],
count2: [{ required: true, message: "请输入敏感数量", trigger: "blur" }],
count1: [
{ required: true, message: "请输入非敏感数量", trigger: "blur" },
],
count2: [
{ required: true, message: "请输入敏感数量", trigger: "blur" },
],
},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/netWorkYq/yqzs/importTemplate",
{},
`舆情走势图模板.xlsx`
);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importYqzs(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询舆情走势图列表 */
getList() {
this.loading = true;

@ -74,6 +74,8 @@
v-hasPermi="['tcZz/networkEcology:wpyrwwcl:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="exportFile"></el-button>
<el-button
type="warning"
size="mini"
@ -151,11 +153,21 @@
<el-input v-model="form.unit" placeholder="请输入单位" />
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input v-model="form.count" type="number" placeholder="请输入数量" />
<el-input
v-model="form.count"
type="number"
placeholder="请输入数量"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<!-- <el-input v-model="form.remark" placeholder="请输入备注" /> -->
<el-input v-model="form.remark" resize="none" :rows="5" type="textarea" placeholder="请输入备注" />
<el-input
v-model="form.remark"
resize="none"
:rows="5"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -193,6 +205,13 @@
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<import-dialog
ref="importdialog"
propsUrl="/tcZz/networkEcology/wpyrwwcl/common/importExcel"
importUrl="/tcZz/networkEcology/wpyrwwcl/importTemplate"
importName="网评员任务完成率(网评系统)"
:getList="getList"
></import-dialog>
</div>
</template>
@ -205,8 +224,11 @@ import {
updateWpyrwwcl,
exportWpyrwwcl,
} from "@/api/tcZz/networkEcology/wpyrwwcl";
import importDialog from "@/views/components/importDialog/index.vue";
export default {
name: "Wpyrwwcl",
components: { importDialog },
//
data() {
return {
@ -263,20 +285,19 @@ export default {
form: {},
//
rules: {
unit:[
{ required: true, message: '请输入单位', trigger: 'blur' },
],
count:[
{ required: true, message: '请输入数量', trigger: 'blur' },
],
unit: [{ required: true, message: "请输入单位", trigger: "blur" }],
count: [{ required: true, message: "请输入数量", trigger: "blur" }],
},
fileList:[],
fileList: [],
};
},
created() {
this.getList();
},
methods: {
exportFile() {
this.$refs.importdialog.open();
},
/** 查询网评员任务完成率(网评系统)列表 */
getList() {
this.loading = true;

@ -8,7 +8,6 @@
v-show="showSearch"
label-width="auto"
>
<el-form-item label="隐患名称" prop="yhName">
<el-input
v-model="queryParams.yhName"
@ -27,7 +26,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@ -66,6 +65,9 @@
v-hasPermi="['tcZz/networkSecurity:aqyh:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
@ -184,6 +186,47 @@
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -195,7 +238,9 @@ import {
addAqyh,
updateAqyh,
exportAqyh,
importAqyh,
} from "@/api/tcZz/networkSecurity/aqyh";
import { getToken } from "@/utils/auth";
export default {
name: "Aqyh",
//
@ -254,12 +299,68 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/networkSecurity/aqyh/importTemplate",
{},
`安全隐患模板.xlsx`
);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importAqyh(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询安全隐患 tc_aqyh列表 */
getList() {
this.loading = true;

@ -80,6 +80,9 @@
v-hasPermi="['tcZz/networkSecurity:map:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
@ -216,6 +219,47 @@
form.remark
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -228,7 +272,10 @@ import {
addMap,
updateMap,
exportMap,
importMap
} from "@/api/tcZz/networkSecurity/map";
import { getToken } from "@/utils/auth";
export default {
name: "Map",
//
@ -290,12 +337,68 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/networkSecurity/map/importTemplate",
{},
`分布情况模板.xlsx`
);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importMap(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询地图统计列表 */
getList() {
this.loading = true;

@ -65,6 +65,9 @@
v-hasPermi="['tcZz/networkSecurity:fbqk:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
@ -181,6 +184,47 @@
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -192,7 +236,10 @@ import {
addFbqk,
updateFbqk,
exportFbqk,
importFbqk,
} from "@/api/tcZz/networkSecurity/fbqk";
import { getToken } from "@/utils/auth";
export default {
name: "Fbqk",
//
@ -251,12 +298,68 @@ export default {
form: {},
//
rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/networkSecurity/fbqk/importTemplate",
{},
`分布情况模板.xlsx`
);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importFbqk(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询分布情况 tc_fbqk列表 */
getList() {
this.loading = true;

@ -66,6 +66,9 @@
v-hasPermi="['tcZz/networkSecurity:top5:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
@ -187,6 +190,47 @@
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -198,7 +242,10 @@ import {
addTop5,
updateTop5,
exportTop5,
importTop5,
} from "@/api/tcZz/networkSecurity/top5";
import { getToken } from "@/utils/auth";
export default {
name: "Top5",
//
@ -258,12 +305,64 @@ export default {
//
rules: {},
addShow: false,
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
created() {
this.getList();
},
methods: {
//
importTemplate() {
this.download("/tcZz/networkSecurity/top5/importTemplate", {}, `top5模板.xlsx`);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importTop5(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询受攻击IPTOP5列表 */
getList() {
this.loading = true;

@ -77,6 +77,9 @@
v-hasPermi="['tcZz/networkSecurity:tbwc:remove']"
>删除</el-button
>
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button
type="warning"
size="mini"
@ -238,6 +241,47 @@
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
<!-- 导入 -->
<el-dialog
:visible.sync="fileOpen"
width="400px"
append-to-body
custom-class="dialog-box"
@close="cancelFile"
>
<div slot="title" class="dialog-title">导入</div>
<el-upload
ref="upload"
:limit="limit"
action="666"
:accept="accept"
:headers="headers"
:file-list="fileList"
:multiple="false"
:auto-upload="false"
drag
:before-upload="handleBeforeUpload"
:on-exceed="handleExceed"
:http-request="handleFile"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFile"> </el-button>
<el-button @click="cancelFile"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -249,7 +293,10 @@ import {
addTbwc,
updateTbwc,
exportTbwc,
importTbwc,
} from "@/api/tcZz/networkSecurity/tbwc";
import { getToken } from "@/utils/auth";
export default {
name: "Tbwc",
//
@ -325,6 +372,12 @@ export default {
],
year: [{ required: true, message: "请选择年份", trigger: "blur" }],
},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
};
},
computed: {
@ -336,6 +389,56 @@ export default {
this.getList();
},
methods: {
//
importTemplate() {
this.download(
"/tcZz/networkSecurity/tbwc/importTemplate",
{},
`通报完成情况模板.xlsx`
);
},
importFiles() {
this.fileOpen = true;
},
submitFile() {
this.$refs.upload.submit();
},
cancelFile() {
this.fileOpen = false;
},
//
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;
}
},
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
handleFile(data) {
this.$modal.loading();
let form = new FormData();
form.append("file", data.file);
importTbwc(form)
.then((res) => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$modal.msgSuccess("导入成功");
this.$refs.upload.clearFiles();
this.getList();
})
.catch(() => {
this.fileOpen = false;
this.$modal.closeLoading();
this.$refs.upload.clearFiles();
this.getList();
});
},
/** 查询通报完成情况列表 */
getList() {
this.loading = true;
@ -419,7 +522,7 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.form.year = this.$moment(new Date()).format('yyyy');
this.form.year = this.$moment(new Date()).format("yyyy");
this.open = true;
this.title = "添加通报完成情况";
},

Loading…
Cancel
Save