所有页面增加导入功能

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

@ -42,3 +42,11 @@ export function delCy(id) {
method: 'delete' 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' 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' 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' 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' 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' 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' 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' 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' 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"; @import "./element-variables.scss";
.container-main { .container-main {
height: calc(100vh - 84px); height: calc(100vh - 84px);
overflow: hidden; // overflow: hidden;
overflow-y:scroll ;
padding: 0 10px; padding: 0 10px;
// //
.search-hearder { .search-hearder {

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

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

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

@ -140,6 +140,9 @@
v-hasPermi="['tcZz/netWorkYq:cy:remove']" v-hasPermi="['tcZz/netWorkYq:cy:remove']"
>删除</el-button >删除</el-button
> >
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -280,6 +283,47 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </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> </div>
</template> </template>
@ -291,7 +335,9 @@ import {
addCy, addCy,
updateCy, updateCy,
exportCy, exportCy,
importCy,
} from "@/api/tcZz/netWorkYq/cy"; } from "@/api/tcZz/netWorkYq/cy";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Cy", name: "Cy",
// //
@ -355,12 +401,68 @@ export default {
rules: { rules: {
areaId: [{ required: true, message: "请选择区域", trigger: "blur" }], areaId: [{ required: true, message: "请选择区域", trigger: "blur" }],
}, },
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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() { getList() {
this.loading = true; this.loading = true;

@ -124,6 +124,9 @@
v-hasPermi="['tcZz/netWorkYq:mtlx:remove']" v-hasPermi="['tcZz/netWorkYq:mtlx:remove']"
>删除</el-button >删除</el-button
> >
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -142,7 +145,7 @@
<!-- <el-table-column label="序号" align="center" prop="id" /> --> <!-- <el-table-column label="序号" align="center" prop="id" /> -->
<el-table-column label="名称" align="center" prop="name" /> <el-table-column label="名称" align="center" prop="name" />
<el-table-column label="占比" align="center" prop="zb" /> <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 <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -242,6 +245,47 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </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> </div>
</template> </template>
@ -253,7 +297,10 @@ import {
addMtlx, addMtlx,
updateMtlx, updateMtlx,
exportMtlx, exportMtlx,
importMtlx,
} from "@/api/tcZz/netWorkYq/mtlx"; } from "@/api/tcZz/netWorkYq/mtlx";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Mtlx", name: "Mtlx",
// //
@ -312,12 +359,68 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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() { getList() {
this.loading = true; this.loading = true;

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

@ -94,10 +94,9 @@
v-hasPermi="['tcZz/netWorkYq:yqzs:remove']" v-hasPermi="['tcZz/netWorkYq:yqzs:remove']"
>删除</el-button >删除</el-button
> >
<!-- @click="handleImport" --> <el-button type="primary" size="mini" @click="importFiles"
<!-- <el-button type="info" size="mini" v-hasPermi="['system:user:import']"
>导入</el-button >导入</el-button
> --> >
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -245,8 +244,6 @@
form.dateTime form.dateTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="非敏感数量">{{ <el-descriptions-item label="非敏感数量">{{
form.count1 form.count1
}}</el-descriptions-item> }}</el-descriptions-item>
@ -254,11 +251,52 @@
<el-descriptions-item label="敏感数量">{{ <el-descriptions-item label="敏感数量">{{
form.count2 form.count2
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="备注">{{ <el-descriptions-item label="备注">{{
form.remark form.remark
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </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> </div>
</template> </template>
@ -270,7 +308,10 @@ import {
addYqzs, addYqzs,
updateYqzs, updateYqzs,
exportYqzs, exportYqzs,
importYqzs
} from "@/api/tcZz/netWorkYq/yqzs"; } from "@/api/tcZz/netWorkYq/yqzs";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Yqzs", name: "Yqzs",
// //
@ -338,15 +379,76 @@ export default {
rules: { rules: {
areaId: [{ required: true, message: "请选择区域", trigger: "blur" }], areaId: [{ required: true, message: "请选择区域", trigger: "blur" }],
dateTime: [{ required: true, message: "请选择日期", trigger: "blur" }], dateTime: [{ required: true, message: "请选择日期", trigger: "blur" }],
count1: [{ required: true, message: "请输入非敏感数量", trigger: "blur" }], count1: [
count2: [{ required: true, message: "请输入敏感数量", trigger: "blur" }], { required: true, message: "请输入非敏感数量", trigger: "blur" },
],
count2: [
{ required: true, message: "请输入敏感数量", trigger: "blur" },
],
}, },
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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() { getList() {
this.loading = true; this.loading = true;

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

@ -8,7 +8,6 @@
v-show="showSearch" v-show="showSearch"
label-width="auto" label-width="auto"
> >
<el-form-item label="隐患名称" prop="yhName"> <el-form-item label="隐患名称" prop="yhName">
<el-input <el-input
v-model="queryParams.yhName" v-model="queryParams.yhName"
@ -66,6 +65,9 @@
v-hasPermi="['tcZz/networkSecurity:aqyh:remove']" v-hasPermi="['tcZz/networkSecurity:aqyh:remove']"
>删除</el-button >删除</el-button
> >
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -184,6 +186,47 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </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> </div>
</template> </template>
@ -195,7 +238,9 @@ import {
addAqyh, addAqyh,
updateAqyh, updateAqyh,
exportAqyh, exportAqyh,
importAqyh,
} from "@/api/tcZz/networkSecurity/aqyh"; } from "@/api/tcZz/networkSecurity/aqyh";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Aqyh", name: "Aqyh",
// //
@ -254,12 +299,68 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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列表 */ /** 查询安全隐患 tc_aqyh列表 */
getList() { getList() {
this.loading = true; this.loading = true;

@ -80,6 +80,9 @@
v-hasPermi="['tcZz/networkSecurity:map:remove']" v-hasPermi="['tcZz/networkSecurity:map:remove']"
>删除</el-button >删除</el-button
> >
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -216,6 +219,47 @@
form.remark form.remark
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </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> </el-dialog>
</div> </div>
</template> </template>
@ -228,7 +272,10 @@ import {
addMap, addMap,
updateMap, updateMap,
exportMap, exportMap,
importMap
} from "@/api/tcZz/networkSecurity/map"; } from "@/api/tcZz/networkSecurity/map";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Map", name: "Map",
// //
@ -290,12 +337,68 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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() { getList() {
this.loading = true; this.loading = true;

@ -65,6 +65,9 @@
v-hasPermi="['tcZz/networkSecurity:fbqk:remove']" v-hasPermi="['tcZz/networkSecurity:fbqk:remove']"
>删除</el-button >删除</el-button
> >
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -181,6 +184,47 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </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> </div>
</template> </template>
@ -192,7 +236,10 @@ import {
addFbqk, addFbqk,
updateFbqk, updateFbqk,
exportFbqk, exportFbqk,
importFbqk,
} from "@/api/tcZz/networkSecurity/fbqk"; } from "@/api/tcZz/networkSecurity/fbqk";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Fbqk", name: "Fbqk",
// //
@ -251,12 +298,68 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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列表 */ /** 查询分布情况 tc_fbqk列表 */
getList() { getList() {
this.loading = true; this.loading = true;

@ -66,6 +66,9 @@
v-hasPermi="['tcZz/networkSecurity:top5:remove']" v-hasPermi="['tcZz/networkSecurity:top5:remove']"
>删除</el-button >删除</el-button
> >
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -187,6 +190,47 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </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> </div>
</template> </template>
@ -198,7 +242,10 @@ import {
addTop5, addTop5,
updateTop5, updateTop5,
exportTop5, exportTop5,
importTop5,
} from "@/api/tcZz/networkSecurity/top5"; } from "@/api/tcZz/networkSecurity/top5";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Top5", name: "Top5",
// //
@ -258,12 +305,64 @@ export default {
// //
rules: {}, rules: {},
addShow: false, addShow: false,
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { 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列表 */ /** 查询受攻击IPTOP5列表 */
getList() { getList() {
this.loading = true; this.loading = true;

@ -77,6 +77,9 @@
v-hasPermi="['tcZz/networkSecurity:tbwc:remove']" v-hasPermi="['tcZz/networkSecurity:tbwc:remove']"
>删除</el-button >删除</el-button
> >
<el-button type="primary" size="mini" @click="importFiles"
>导入</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
@ -238,6 +241,47 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-dialog> </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> </div>
</template> </template>
@ -249,7 +293,10 @@ import {
addTbwc, addTbwc,
updateTbwc, updateTbwc,
exportTbwc, exportTbwc,
importTbwc,
} from "@/api/tcZz/networkSecurity/tbwc"; } from "@/api/tcZz/networkSecurity/tbwc";
import { getToken } from "@/utils/auth";
export default { export default {
name: "Tbwc", name: "Tbwc",
// //
@ -325,6 +372,12 @@ export default {
], ],
year: [{ required: true, message: "请选择年份", trigger: "blur" }], year: [{ required: true, message: "请选择年份", trigger: "blur" }],
}, },
//===========
fileList: [],
limit: 1,
accept: ".xls,.xlsx",
fileOpen: false,
headers: { Authorization: "Bearer " + getToken() },
}; };
}, },
computed: { computed: {
@ -336,6 +389,56 @@ export default {
this.getList(); this.getList();
}, },
methods: { 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() { getList() {
this.loading = true; this.loading = true;
@ -419,7 +522,7 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.form.year = this.$moment(new Date()).format('yyyy'); this.form.year = this.$moment(new Date()).format("yyyy");
this.open = true; this.open = true;
this.title = "添加通报完成情况"; this.title = "添加通报完成情况";
}, },

Loading…
Cancel
Save