Lvtianfang
吕天方 2 years ago
commit e16b003a50

@ -11,7 +11,7 @@ ENV = 'development'
VUE_APP_BASE_API = 'http://39.101.188.84:9027' VUE_APP_BASE_API = 'http://39.101.188.84:9027'
#局域网 #局域网
# VUE_APP_BASE_API = 'http://192.168.0.108:9027' VUE_APP_BASE_API = 'http://192.168.0.108:9027'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -0,0 +1,53 @@
import request from "@/utils/request";
// 查询清郎专项行动数据统计列表
export function listQlzxxdsj(query) {
return request({
url: "/zongzhi/qlzxxdsj/list",
method: "get",
params: query,
});
}
// 查询清郎专项行动数据统计详细
export function getQlzxxdsj(id) {
return request({
url: "/zongzhi/qlzxxdsj/" + id,
method: "get",
});
}
// 新增清郎专项行动数据统计
export function addQlzxxdsj(data) {
return request({
url: "/zongzhi/qlzxxdsj",
method: "post",
data: data,
});
}
// 修改清郎专项行动数据统计
export function updateQlzxxdsj(data) {
return request({
url: "/zongzhi/qlzxxdsj",
method: "put",
data: data,
});
}
// 删除清郎专项行动数据统计
export function delQlzxxdsj(id) {
return request({
url: "/zongzhi/qlzxxdsj/" + id,
method: "delete",
});
}
// 导出清郎专项行动数据统计
export function exportQlzxxdsj(data) {
return request({
url: "/zongzhi/qlzxxdsj/export",
method: "post",
data,
});
}

@ -0,0 +1,53 @@
import request from "@/utils/request";
// 查询动态筛选列表
export function listSx(query) {
return request({
url: "/zongzhi/sx/list",
method: "get",
params: query,
});
}
// 查询动态筛选详细
export function getSx(id) {
return request({
url: "/zongzhi/sx/" + id,
method: "get",
});
}
// 新增动态筛选
export function addSx(data) {
return request({
url: "/zongzhi/sx",
method: "post",
data: data,
});
}
// 修改动态筛选
export function updateSx(data) {
return request({
url: "/zongzhi/sx",
method: "put",
data: data,
});
}
// 删除动态筛选
export function delSx(id) {
return request({
url: "/zongzhi/sx/" + id,
method: "delete",
});
}
// 导出动态筛选
export function exportSx(data) {
return request({
url: "/zongzhi/sx/export",
method: "post",
data,
});
}

@ -0,0 +1,53 @@
import request from "@/utils/request";
// 查询舆情分类列表
export function listFl(query) {
return request({
url: "/zongzhi/fl/list",
method: "get",
params: query,
});
}
// 查询舆情分类详细
export function getFl(id) {
return request({
url: "/zongzhi/fl/" + id,
method: "get",
});
}
// 新增舆情分类
export function addFl(data) {
return request({
url: "/zongzhi/fl",
method: "post",
data: data,
});
}
// 修改舆情分类
export function updateFl(data) {
return request({
url: "/zongzhi/fl",
method: "put",
data: data,
});
}
// 删除舆情分类
export function delFl(id) {
return request({
url: "/zongzhi/fl/" + id,
method: "delete",
});
}
// 导出舆情分类
export function exportFl(data) {
return request({
url: "/zongzhi/fl/export",
method: "post",
data,
});
}

@ -0,0 +1,53 @@
import request from "@/utils/request";
// 查询舆情走势图列表
export function listZs(query) {
return request({
url: "/zongzhi/zs/list",
method: "get",
params: query,
});
}
// 查询舆情走势图详细
export function getZs(id) {
return request({
url: "/zongzhi/zs/" + id,
method: "get",
});
}
// 新增舆情走势图
export function addZs(data) {
return request({
url: "/zongzhi/zs",
method: "post",
data: data,
});
}
// 修改舆情走势图
export function updateZs(data) {
return request({
url: "/zongzhi/zs",
method: "put",
data: data,
});
}
// 删除舆情走势图
export function delZs(id) {
return request({
url: "/zongzhi/zs/" + id,
method: "delete",
});
}
// 导出舆情走势图
export function exportZs(data) {
return request({
url: "/zongzhi/zs/export",
method: "post",
data,
});
}

@ -0,0 +1,53 @@
import request from "@/utils/request";
// 查询本级上级网评指令比列 (月)列表
export function listBjsj(query) {
return request({
url: "/zongzhi/bjsj/list",
method: "get",
params: query,
});
}
// 查询本级上级网评指令比列 (月)详细
export function getBjsj(id) {
return request({
url: "/zongzhi/bjsj/" + id,
method: "get",
});
}
// 新增本级上级网评指令比列 (月)
export function addBjsj(data) {
return request({
url: "/zongzhi/bjsj",
method: "post",
data: data,
});
}
// 修改本级上级网评指令比列 (月)
export function updateBjsj(data) {
return request({
url: "/zongzhi/bjsj",
method: "put",
data: data,
});
}
// 删除本级上级网评指令比列 (月)
export function delBjsj(id) {
return request({
url: "/zongzhi/bjsj/" + id,
method: "delete",
});
}
// 导出本级上级网评指令比列 (月)
export function exportBjsj(data) {
return request({
url: "/zongzhi/bjsj/export",
method: "post",
data,
});
}

@ -0,0 +1,53 @@
import request from "@/utils/request";
// 查询网评员任务完成率心列表
export function listWpyrwwcl(query) {
return request({
url: "/zongzhi/wpyrwwcl/list",
method: "get",
params: query,
});
}
// 查询网评员任务完成率心详细
export function getWpyrwwcl(id) {
return request({
url: "/zongzhi/wpyrwwcl/" + id,
method: "get",
});
}
// 新增网评员任务完成率心
export function addWpyrwwcl(data) {
return request({
url: "/zongzhi/wpyrwwcl",
method: "post",
data: data,
});
}
// 修改网评员任务完成率心
export function updateWpyrwwcl(data) {
return request({
url: "/zongzhi/wpyrwwcl",
method: "put",
data: data,
});
}
// 删除网评员任务完成率心
export function delWpyrwwcl(id) {
return request({
url: "/zongzhi/wpyrwwcl/" + id,
method: "delete",
});
}
// 导出网评员任务完成率心
export function exportWpyrwwcl(data) {
return request({
url: "/zongzhi/wpyrwwcl/export",
method: "post",
data,
});
}

@ -7,3 +7,12 @@ export function listTown(query) {
params: query, params: query,
}); });
} }
// 树结构
export function townTree(query) {
return request({
url: "/zongzhi/town/new/tree",
method: "get",
params: query,
});
}

@ -68,7 +68,7 @@ export default {
// //
limit: { limit: {
type: Number, type: Number,
default: 5, default: 1,
}, },
// (MB) // (MB)
fileSize: { fileSize: {
@ -83,7 +83,7 @@ export default {
// , ['png', 'jpg', 'jpeg'] // , ['png', 'jpg', 'jpeg']
fileType: { fileType: {
type: Array, type: Array,
default: () => ["doc", "docx", "xls", "xlsx", "ppt", "txt", "pdf"], default: () => ["docx", "pdf"],//"xls", "xlsx", "ppt", "txt",
}, },
// //
isShowTip: { isShowTip: {

@ -17,5 +17,6 @@ const getters = {
defaultRoutes: (state) => state.permission.defaultRoutes, defaultRoutes: (state) => state.permission.defaultRoutes,
sidebarRouters: (state) => state.permission.sidebarRouters, sidebarRouters: (state) => state.permission.sidebarRouters,
townList: (state) => state.user.townList, townList: (state) => state.user.townList,
treeProps: (state) => state.user.treeProps,
}; };
export default getters; export default getters;

@ -1,6 +1,6 @@
import { login, logout, getInfo } from "@/api/login"; import { login, logout, getInfo } from "@/api/login";
import { getToken, setToken, removeToken } from "@/utils/auth"; import { getToken, setToken, removeToken } from "@/utils/auth";
import { listTown } from "@/api/zongzhi/town/index.js"; import { listTown, townTree } from "@/api/zongzhi/town/index.js";
const user = { const user = {
state: { state: {
@ -10,6 +10,11 @@ const user = {
roles: [], roles: [],
permissions: [], permissions: [],
townList: [], townList: [],
treeProps: {
label: "label",
value: "label",
checkStrictly: true,
},
userId: null, userId: null,
}, },
@ -119,12 +124,11 @@ const user = {
function getownList() { function getownList() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let lsit = []; let lsit = [];
listTown({ pageNum: 1, pageSize: 200 }) townTree()
.then((res) => { .then((res) => {
res.rows.forEach((item) => { console.log(res, "树结构");
lsit.push({ value: item.id, label: item.name });
}); resolve(res.data);
resolve(lsit);
}) })
.catch((error) => { .catch((error) => {
reject(error); reject(error);

@ -169,18 +169,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -294,7 +288,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="企业名称">{{ <el-descriptions-item label="企业名称">{{
@ -353,7 +347,7 @@ import {
} from "@/api/zongzhi/netManage/enterpriseMl/index.js"; } from "@/api/zongzhi/netManage/enterpriseMl/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Enterprise", name: "Enterprise",
// //
@ -388,7 +382,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
enterpriseName: null, enterpriseName: null,
networkYewu: null, networkYewu: null,
@ -487,6 +481,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getEnterprise(id).then((response) => { getEnterprise(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看重点企业名录详情"; this.infoTitle = "查看重点企业名录详情";
@ -503,6 +506,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getEnterprise(id).then((response) => { getEnterprise(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改重点企业名录"; this.title = "修改重点企业名录";
@ -512,6 +516,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateEnterprise(this.form).then((response) => { updateEnterprise(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -135,18 +135,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -258,7 +252,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="平台类别"> <el-descriptions-item label="平台类别">
@ -316,7 +310,7 @@ import {
} from "@/api/zongzhi/netManage/netPlatform/index.js"; } from "@/api/zongzhi/netManage/netPlatform/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Pingtai", name: "Pingtai",
// //
@ -351,7 +345,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
}, },
// //
form: {}, form: {},
@ -449,6 +443,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPingtai(id).then((response) => { getPingtai(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看网络平台详情"; this.infoTitle = "查看网络平台详情";
@ -465,6 +468,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPingtai(id).then((response) => { getPingtai(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网络平台"; this.title = "修改网络平台";
@ -474,6 +478,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updatePingtai(this.form).then((response) => { updatePingtai(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -202,18 +202,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -327,7 +321,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="举报人">{{ <el-descriptions-item label="举报人">{{
@ -389,7 +383,7 @@ import {
} from "@/api/zongzhi/netManage/netReport/index.js"; } from "@/api/zongzhi/netManage/netReport/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Report", name: "Report",
// //
@ -424,7 +418,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
jbMan: null, jbMan: null,
jbTime: null, jbTime: null,
@ -529,6 +523,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getReport(id).then((response) => { getReport(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看网络举报详情"; this.infoTitle = "查看网络举报详情";
@ -545,6 +548,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getReport(id).then((response) => { getReport(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网络举报"; this.title = "修改网络举报";
@ -554,6 +558,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateReport(this.form).then((response) => { updateReport(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -99,7 +99,7 @@
<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="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $filterTown(scope.row.areaId) }} {{ scope.row.areaId | filterTown }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="专项标题" align="center" prop="zhuanxiangTitle" /> <el-table-column label="专项标题" align="center" prop="zhuanxiangTitle" />
@ -180,18 +180,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -327,7 +321,7 @@ import {
} from "@/api/zongzhi/netManage/qlzx/index.js"; } from "@/api/zongzhi/netManage/qlzx/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Zhuanxiang", name: "Zhuanxiang",
// //
@ -363,7 +357,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
zhuanxiangTitle: null, zhuanxiangTitle: null,
zhuanxiangTime: null, zhuanxiangTime: null,
@ -387,6 +381,18 @@ export default {
this.getList(); this.getList();
}); });
}, },
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: { methods: {
/** 查询清朗专项列表 */ /** 查询清朗专项列表 */
getList() { getList() {
@ -457,6 +463,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getZhuanxiang(id).then((response) => { getZhuanxiang(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
if (response.data.zhuanxiangImg) { if (response.data.zhuanxiangImg) {
this.imageList = response.data.zhuanxiangImg.split(","); this.imageList = response.data.zhuanxiangImg.split(",");
} else { } else {
@ -478,6 +493,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getZhuanxiang(id).then((response) => { getZhuanxiang(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改清朗专项"; this.title = "修改清朗专项";
@ -487,6 +503,8 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateZhuanxiang(this.form).then((response) => { updateZhuanxiang(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -0,0 +1,454 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="类型" prop="type">
<el-select
v-model="queryParams.type"
placeholder="请选择类型"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_zx_tj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['zongzhi:qlzxxdsj:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['zongzhi:qlzxxdsj:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['zongzhi:qlzxxdsj:remove']"
>删除</el-button
>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['zongzhi:qlzxxdsj:export']"
>导出</el-button
>
</div>
<el-table
v-loading="loading"
:data="qlzxxdsjList"
:height="tableHeigth"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :options="dict.type.tc_zx_tj" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="年月" align="center" prop="yearMonth" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.yearMonth, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="count" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['zongzhi:qlzxxdsj:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:qlzxxdsj:edit']"
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['zongzhi:qlzxxdsj:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改清郎专项行动数据统计对话框 -->
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
:props="treeProps"
clearable
></el-cascader>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="form.type" placeholder="请选择类型">
<el-option
v-for="dict in dict.type.tc_zx_tj"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="年月" prop="yearMonth">
<el-date-picker
clearable
size="small"
v-model="form.yearMonth"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择年月"
>
</el-date-picker>
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input v-model="form.count" placeholder="请输入数量" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看清郎专项行动数据统计详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions
title="清郎专项行动数据统计"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>
<el-descriptions-item label="类型">
<dict-tag :options="dict.type.tc_zx_tj" :value="form.type" />
</el-descriptions-item>
<el-descriptions-item label="年月">{{
form.yearMonth
}}</el-descriptions-item>
<el-descriptions-item label="数量">{{
form.count
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import {
listQlzxxdsj,
getQlzxxdsj,
delQlzxxdsj,
addQlzxxdsj,
updateQlzxxdsj,
exportQlzxxdsj,
} from "@/api/zongzhi/netManage/qlzxTj/index";
export default {
computed: {
...mapGetters(["townList", "treeProps"]),
},
name: "Qlzxxdsj",
//
dicts: ["tc_zx_tj"],
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
qlzxxdsjList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
type: null,
},
//
form: {},
//
rules: {},
};
},
created() {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight -
(this.$refs.topSearch.offsetHeight +
this.$refs.tableTool.offsetHeight) -
46;
this.getList();
});
},
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: {
/** 查询清郎专项行动数据统计列表 */
getList() {
this.loading = true;
listQlzxxdsj(this.queryParams).then((response) => {
this.qlzxxdsjList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
areaId: null,
type: null,
yearMonth: null,
count: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getQlzxxdsj(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看清郎专项行动数据统计详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加清郎专项行动数据统计";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getQlzxxdsj(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data;
this.open = true;
this.title = "修改清郎专项行动数据统计";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) {
updateQlzxxdsj(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addQlzxxdsj(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 delQlzxxdsj(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有清郎专项行动数据统计数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/zongzhi/qlzxxdsj/export",
{
...this.queryParams,
},
"清郎专项行动数据统计_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

@ -79,7 +79,7 @@
<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="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $filterTown(scope.row.areaId) }} {{ scope.row.areaId | filterTown }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="企业类型" align="center" prop="enterpriseType"> <el-table-column label="企业类型" align="center" prop="enterpriseType">
@ -156,18 +156,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -247,7 +241,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="企业类型"> <el-descriptions-item label="企业类型">
@ -289,7 +283,7 @@ import {
} from "@/api/zongzhi/netManage/supervise/index.js"; } from "@/api/zongzhi/netManage/supervise/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Domain", name: "Domain",
// //
@ -324,7 +318,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
enterpriseType: null, enterpriseType: null,
}, },
// //
@ -344,6 +338,18 @@ export default {
this.getList(); this.getList();
}); });
}, },
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: { methods: {
/** 查询重点领域监管列表 */ /** 查询重点领域监管列表 */
getList() { getList() {
@ -413,6 +419,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDomain(id).then((response) => { getDomain(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看重点领域监管详情"; this.infoTitle = "查看重点领域监管详情";
@ -429,6 +444,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDomain(id).then((response) => { getDomain(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改重点领域监管"; this.title = "修改重点领域监管";
@ -438,6 +454,8 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateDomain(this.form).then((response) => { updateDomain(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -84,7 +84,7 @@
<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="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ $filterTown(scope.row.areaId) }}</span> <span>{{ scope.row.areaId | filterTown }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="类型" align="center" prop="type" /> <el-table-column label="类型" align="center" prop="type" />
@ -158,18 +158,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -204,10 +198,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="动态名称" prop="name"> <el-form-item label="动态名称" prop="name">
<el-input <el-input v-model="form.name" placeholder="请输入动态名称" />
v-model="form.name"
placeholder="请输入动态名称"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -242,7 +233,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="类型">{{ <el-descriptions-item label="类型">{{
@ -278,7 +269,7 @@ import {
} from "@/api/zongzhi/netManage/workDynamic/index.js"; } from "@/api/zongzhi/netManage/workDynamic/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Dongtai", name: "Dongtai",
// //
@ -313,7 +304,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
materialsName: null, materialsName: null,
fabuTime: null, fabuTime: null,
@ -335,6 +326,18 @@ export default {
this.getList(); this.getList();
}); });
}, },
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: { methods: {
/** 查询工作动态列表 */ /** 查询工作动态列表 */
getList() { getList() {
@ -407,6 +410,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDongtai(id).then((response) => { getDongtai(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.filterFile( this.filterFile(
2, 2,
response.data.materialsFileName, response.data.materialsFileName,
@ -429,6 +441,8 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDongtai(id).then((response) => { getDongtai(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.filterFile( this.filterFile(
2, 2,
response.data.materialsFileName, response.data.materialsFileName,
@ -475,6 +489,8 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
this.filterFile(1); this.filterFile(1);
if (this.form.id != null) { if (this.form.id != null) {
updateDongtai(this.form).then((response) => { updateDongtai(this.form).then((response) => {

@ -190,18 +190,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -220,15 +214,14 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="项目内容" prop="projectContent"> <el-form-item label="项目内容" prop="projectContent">
<el-input <el-input
v-model="form.projectContent" v-model="form.projectContent"
type="textarea" type="textarea"
placeholder="请输入内容" placeholder="请输入内容"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -294,7 +287,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="推进单位">{{ <el-descriptions-item label="推进单位">{{
@ -344,7 +337,7 @@ import {
} from "@/api/zongzhi/netManage/workItem/index.js"; } from "@/api/zongzhi/netManage/workItem/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Work", name: "Work",
// //
@ -379,7 +372,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
projectName: null, projectName: null,
projectType: null, projectType: null,
@ -480,6 +473,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getWork(id).then((response) => { getWork(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看重点工作项目详情"; this.infoTitle = "查看重点工作项目详情";
@ -496,6 +498,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getWork(id).then((response) => { getWork(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改重点工作项目"; this.title = "修改重点工作项目";
@ -505,6 +508,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateWork(this.form).then((response) => { updateWork(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -210,20 +210,14 @@
class="dialog-from" class="dialog-from"
> >
<el-row> <el-row>
<el-col :span="12" <el-col :span="12">
><el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader> </el-form-item
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select> </el-form-item
></el-col> ></el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="来源类型" prop="type"> <el-form-item label="来源类型" prop="type">
@ -356,7 +350,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="来源类型"> <el-descriptions-item label="来源类型">
@ -425,7 +419,7 @@ import {
} from "@/api/zongzhi/netSecurity/DataSource/index.js"; } from "@/api/zongzhi/netSecurity/DataSource/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Source", name: "Source",
// //
@ -460,7 +454,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
type: null, type: null,
assetName: null, assetName: null,
@ -565,6 +559,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSource(id).then((response) => { getSource(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看数据来源详情"; this.infoTitle = "查看数据来源详情";
@ -581,6 +584,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSource(id).then((response) => { getSource(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改数据来源"; this.title = "修改数据来源";
@ -590,6 +594,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateSource(this.form).then((response) => { updateSource(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -174,18 +174,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -322,7 +316,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="隐患类型"> <el-descriptions-item label="隐患类型">
@ -393,7 +387,7 @@ import {
} from "@/api/zongzhi/netSecurity/SafetyYh/index.js"; } from "@/api/zongzhi/netSecurity/SafetyYh/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Danger", name: "Danger",
// //
@ -429,7 +423,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
type: null, type: null,
riskName: null, riskName: null,
@ -451,6 +445,7 @@ export default {
this.getList(); this.getList();
}); });
}, },
methods: { methods: {
/** 查询安全隐患列表 */ /** 查询安全隐患列表 */
getList() { getList() {
@ -535,6 +530,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDanger(id).then((response) => { getDanger(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.filterFile(2, response.data.fileName, response.data.fileUrl); this.filterFile(2, response.data.fileName, response.data.fileUrl);
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
@ -552,6 +556,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDanger(id).then((response) => { getDanger(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.filterFile(2, response.data.fileName, response.data.fileUrl); this.filterFile(2, response.data.fileName, response.data.fileUrl);
this.form = response.data; this.form = response.data;
console.log(this.fileList); console.log(this.fileList);
@ -595,6 +600,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
this.filterFile(1); this.filterFile(1);
if (this.form.id != null) { if (this.form.id != null) {
updateDanger(this.form).then((response) => { updateDanger(this.form).then((response) => {

@ -174,18 +174,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -340,7 +334,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="攻击发起时间">{{ <el-descriptions-item label="攻击发起时间">{{
@ -422,7 +416,7 @@ import {
export default { export default {
name: "Detection", name: "Detection",
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
// //
dicts: ["tc_net_safety_level", "tc_attack_type"], dicts: ["tc_net_safety_level", "tc_attack_type"],
@ -456,7 +450,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
attackType: null, attackType: null,
level: null, level: null,
affUnit: null, affUnit: null,
@ -551,6 +545,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDetection(id).then((response) => { getDetection(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看安全检测详情"; this.infoTitle = "查看安全检测详情";
@ -567,6 +570,8 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getDetection(id).then((response) => { getDetection(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改安全检测"; this.title = "修改安全检测";
@ -576,6 +581,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateDetection(this.form).then((response) => { updateDetection(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -1,100 +1,140 @@
<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="地区名称" prop="name"> :model="queryParams"
<el-input ref="queryForm"
v-model="queryParams.name" :inline="true"
placeholder="请输入地区名称" v-show="showSearch"
clearable label-width="auto"
size="small" >
@keyup.enter.native="handleQuery" <el-form-item label="地区名称" prop="name">
/> <el-input
</el-form-item> v-model="queryParams.name"
<el-form-item> placeholder="请输入地区名称"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> clearable
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> size="small"
</el-form-item> @keyup.enter.native="handleQuery"
</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="['zongzhi:attack:add']" v-hasPermi="['zongzhi:attack: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="['zongzhi:attack:edit']" v-hasPermi="['zongzhi:attack: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="['zongzhi:attack:remove']" @click="handleDelete"
>删除</el-button> v-hasPermi="['zongzhi:attack:remove']"
>删除</el-button
>
<el-button <el-button
type="warning" type="warning"
size="mini" size="mini"
:loading="exportLoading" :loading="exportLoading"
@click="handleExport" @click="handleExport"
v-hasPermi="['zongzhi:attack:export']" v-hasPermi="['zongzhi:attack:export']"
>导出</el-button >导出</el-button
> >
</div> </div>
<el-table v-loading="loading" :data="attackList" :height="tableHeigth" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="attackList"
:height="tableHeigth"
@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="name" /> <el-table-column label="地区名称" align="center" prop="name" />
<el-table-column label="攻击次数" align="center" prop="attackCount" /> <el-table-column label="攻击次数" align="center" prop="attackCount" />
<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="['zongzhi:attack:list']" v-hasPermi="['zongzhi:attack: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="['zongzhi:attack:edit']" v-hasPermi="['zongzhi:attack: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="['zongzhi:attack:remove']" v-hasPermi="['zongzhi:attack: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="attackCount"> <div slot="title" class="dialog-title">{{ title }}</div>
<el-input v-model="form.attackCount" placeholder="请输入攻击次数" /> <el-form
</el-form-item> ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="地区名称" prop="name">
<el-input v-model="form.name" placeholder="请输入地区名称" />
</el-form-item>
<el-form-item label="攻击次数" prop="attackCount">
<el-input v-model="form.attackCount" 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>
@ -103,79 +143,90 @@
</el-dialog> </el-dialog>
<!--查看地区受攻击详情页--> <!--查看地区受攻击详情页-->
<el-dialog <el-dialog
:visible.sync="infoOpen" :visible.sync="infoOpen"
width="1200px" width="1200px"
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.attackCount }}</el-descriptions-item> >
<el-descriptions-item label="地区名称">{{
form.name
}}</el-descriptions-item>
</el-descriptions> <el-descriptions-item label="攻击次数">{{
form.attackCount
}}</el-descriptions-item>
</el-descriptions>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { listAttack, getAttack, delAttack, addAttack, updateAttack, exportAttack } from "@/api/zongzhi/netSecurity/mapData/index.js"; import {
export default { listAttack,
computed: { getAttack,
...mapGetters(["townList"]), delAttack,
addAttack,
updateAttack,
exportAttack,
} from "@/api/zongzhi/netSecurity/mapData/index.js";
export default {
computed: {
...mapGetters(["townList", "treeProps"]),
}, },
name: "Attack", name: "Attack",
// //
data() { data() {
return { return {
tableHeigth: 0, tableHeigth: 0,
// //
infoOpen:false, infoOpen: false,
// //
infoTitle:'', infoTitle: "",
// //
loading: true, loading: true,
// //
exportLoading: false, exportLoading: false,
// //
ids: [], ids: [],
// //
single: true, single: true,
// //
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
attackList: [], attackList: [],
// //
title: "", title: "",
// //
open: false, open: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
name: null, name: null,
},
}, //
// form: {},
form: {}, //
// rules: {},
rules: { };
} },
}; created() {
}, // //
created() {
// //
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeigth = this.tableHeigth =
this.$refs.main.offsetHeight - this.$refs.main.offsetHeight -
@ -184,125 +235,136 @@ import { mapGetters } from "vuex";
46; 46;
this.getList(); this.getList();
}); });
},
methods: {
/** 查询地区受攻击列表 */
getList() {
this.loading = true;
listAttack(this.queryParams).then((response) => {
this.attackList = response.rows;
this.total = response.total;
this.loading = false;
});
}, },
methods: { //
/** 查询地区受攻击列表 */ cancel() {
getList() { this.open = false;
this.loading = true; this.reset();
listAttack(this.queryParams).then(response => { },
this.attackList = response.rows; //
this.total = response.total; reset() {
this.loading = false; this.form = {
}); id: null,
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
attackCount: null, name: null,
}; attackCount: null,
this.resetForm("form"); };
}, this.resetForm("form");
/** 搜索按钮操作 */ },
handleQuery() { /** 搜索按钮操作 */
this.queryParams.pageNum = 1; handleQuery() {
this.getList(); this.queryParams.pageNum = 1;
}, this.getList();
/** 重置按钮操作 */ },
resetQuery() { /** 重置按钮操作 */
this.resetForm("queryForm"); resetQuery() {
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();
getAttack(id).then(response => { const id = row.id || this.ids;
this.form = response.data; getAttack(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;
getAttack(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) => {
getAttack(id).then(response => { if (valid) {
this.form = response.data; if (this.form.id != null) {
this.open = true; updateAttack(this.form).then((response) => {
this.title = "修改地区受攻击"; this.$modal.msgSuccess("修改成功");
}); this.open = false;
}, this.getList();
/** 提交按钮 */ });
submitForm() { } else {
this.$refs["form"].validate(valid => { addAttack(this.form).then((response) => {
if (valid) { this.$modal.msgSuccess("新增成功");
if (this.form.id != null) { this.open = false;
updateAttack(this.form).then(response => { this.getList();
this.$modal.msgSuccess("修改成功"); });
this.open = false;
this.getList();
});
} else {
addAttack(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;
this.$confirm(
'是否确认删除地区受攻击编号为"' + ids + '"的数据项?',
"警告",
{
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(function() { }
)
.then(function () {
return delAttack(ids); return delAttack(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('/zongzhi/attack/export', { })
...this.queryParams .then(() => {
}, '地区受攻击_'+ new Date().getTime() +'.xlsx') this.download(
"/zongzhi/attack/export",
{
...this.queryParams,
},
"地区受攻击_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); })
} .catch(() => {});
} },
} },
};
</script> </script>

@ -175,18 +175,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -391,7 +385,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="系统名称">{{ <el-descriptions-item label="系统名称">{{
@ -482,7 +476,7 @@ export default {
// //
dicts: ["tc_yes_no", "tc_net_safety_level", "tc_db_steam_state"], dicts: ["tc_yes_no", "tc_net_safety_level", "tc_db_steam_state"],
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
data() { data() {
return { return {
@ -514,7 +508,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
steamName: null, steamName: null,
unitName: null, unitName: null,
@ -631,6 +625,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSystem(id).then((response) => { getSystem(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看等保系统详情"; this.infoTitle = "查看等保系统详情";
@ -647,6 +650,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSystem(id).then((response) => { getSystem(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改等保系统"; this.title = "修改等保系统";
@ -656,6 +660,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateSystem(this.form).then((response) => { updateSystem(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -176,18 +176,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -343,7 +337,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -418,7 +412,7 @@ import {
} from "@/api/zongzhi/netSecurity/supervise/DbUnit/index.js"; } from "@/api/zongzhi/netSecurity/supervise/DbUnit/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Unit", name: "Unit",
// //
@ -453,7 +447,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
unitName: null, unitName: null,
unitType: null, unitType: null,
@ -564,6 +558,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getUnit(id).then((response) => { getUnit(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看等保单位详情"; this.infoTitle = "查看等保单位详情";
@ -580,6 +583,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getUnit(id).then((response) => { getUnit(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改等保单位"; this.title = "修改等保单位";
@ -589,6 +593,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateUnit(this.form).then((response) => { updateUnit(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -88,7 +88,7 @@
<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="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $filterTown(scope.row.areaId) }} {{ scope.row.areaId | filterTown }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="网址" align="center" prop="url" /> <el-table-column label="网址" align="center" prop="url" />
@ -160,18 +160,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -226,7 +220,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="网址">{{ form.url }}</el-descriptions-item> <el-descriptions-item label="网址">{{ form.url }}</el-descriptions-item>
@ -258,7 +252,7 @@ import {
} from "@/api/zongzhi/netSecurity/supervise/GovernmentWeb/index.js"; } from "@/api/zongzhi/netSecurity/supervise/GovernmentWeb/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Web", name: "Web",
// //
@ -293,7 +287,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
assetName: null, assetName: null,
assetLevel: null, assetLevel: null,
@ -315,6 +309,18 @@ export default {
this.getList(); this.getList();
}); });
}, },
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: { methods: {
/** 查询政府网站列表 */ /** 查询政府网站列表 */
getList() { getList() {
@ -380,6 +386,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getWeb(id).then((response) => { getWeb(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看政府网站详情"; this.infoTitle = "查看政府网站详情";
@ -396,6 +411,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getWeb(id).then((response) => { getWeb(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改政府网站"; this.title = "修改政府网站";
@ -405,6 +421,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateWeb(this.form).then((response) => { updateWeb(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -82,7 +82,7 @@
<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="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $filterTown(scope.row.areaId) }} {{ scope.row.areaId | filterTown }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="名称" align="center" prop="unitName" /> <el-table-column label="名称" align="center" prop="unitName" />
@ -146,18 +146,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -197,7 +191,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="名称">{{ <el-descriptions-item label="名称">{{
@ -224,7 +218,7 @@ import {
} from "@/api/zongzhi/netSecurity/supervise/IdcUnit/index.js"; } from "@/api/zongzhi/netSecurity/supervise/IdcUnit/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "IDCunit", name: "IDCunit",
// //
@ -258,7 +252,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
areaId: null, areaId: null,
unitName: null, unitName: null,
@ -280,6 +274,18 @@ export default {
this.getList(); this.getList();
}); });
}, },
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: { methods: {
/** 查询IDC单位列表 */ /** 查询IDC单位列表 */
getList() { getList() {
@ -345,6 +351,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getIDCunit(id).then((response) => { getIDCunit(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看IDC单位详情"; this.infoTitle = "查看IDC单位详情";
@ -361,6 +376,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getIDCunit(id).then((response) => { getIDCunit(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改IDC单位"; this.title = "修改IDC单位";
@ -370,6 +386,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateIDCunit(this.form).then((response) => { updateIDCunit(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -17,7 +17,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="属地名称" prop="locationName"> <!-- <el-form-item label="属地名称" prop="locationName">
<el-input <el-input
v-model="queryParams.locationName" v-model="queryParams.locationName"
placeholder="请输入属地名称" placeholder="请输入属地名称"
@ -25,7 +25,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="通报类型" prop="tbType"> <el-form-item label="通报类型" prop="tbType">
<el-select <el-select
v-model="queryParams.tbType" v-model="queryParams.tbType"
@ -106,13 +106,13 @@
@selection-change="handleSelectionChange" @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="区域id" align="center" prop="areaId"> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $filterTown(scope.row.areaId) }} {{ scope.row.areaId | filterTown }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部门名称" align="center" prop="depName" /> <el-table-column label="部门名称" align="center" prop="depName" />
<el-table-column label="属地名称" align="center" prop="locationName" /> <!-- <el-table-column label="属地名称" align="center" prop="locationName" /> -->
<el-table-column label="通报类型" align="center" prop="tbType"> <el-table-column label="通报类型" align="center" prop="tbType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.tc_tb_type" :value="scope.row.tbType" /> <dict-tag :options="dict.type.tc_tb_type" :value="scope.row.tbType" />
@ -186,19 +186,13 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域id" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -240,16 +234,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="属地名称" prop="locationName"> <!-- <el-form-item label="属地名称" prop="locationName">
<el-input <el-input
v-model="form.locationName" v-model="form.locationName"
placeholder="请输入属地名称" placeholder="请输入属地名称"
/> />
</el-form-item> </el-form-item> -->
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="通报时间" prop="tbTime"> <el-form-item label="通报时间" prop="tbTime">
<el-date-picker <el-date-picker
clearable clearable
@ -262,6 +252,9 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="附件上传" prop="fileName"> <el-form-item label="附件上传" prop="fileName">
<FileUpload v-model="fileList" /> <FileUpload v-model="fileList" />
@ -291,8 +284,8 @@
border border
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域id">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="通报类型"> <el-descriptions-item label="通报类型">
@ -334,7 +327,7 @@ import {
} from "@/api/zongzhi/netSecurity/tb/index.js"; } from "@/api/zongzhi/netSecurity/tb/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Tb", name: "Tb",
// //
@ -370,7 +363,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
depName: null, depName: null,
locationName: null, locationName: null,
tbType: null, tbType: null,
@ -397,6 +390,18 @@ export default {
this.getList(); this.getList();
}); });
}, },
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: { methods: {
/** 查询通报列表 */ /** 查询通报列表 */
getList() { getList() {
@ -469,6 +474,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getTb(id).then((response) => { getTb(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.filterFile(2, response.data.fileName, response.data.fileUrl); this.filterFile(2, response.data.fileName, response.data.fileUrl);
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
@ -486,6 +500,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getTb(id).then((response) => { getTb(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.filterFile(2, response.data.fileName, response.data.fileUrl); this.filterFile(2, response.data.fileName, response.data.fileUrl);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
@ -527,6 +542,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
this.filterFile(1); this.filterFile(1);
if (this.form.id != null) { if (this.form.id != null) {
updateTb(this.form).then((response) => { updateTb(this.form).then((response) => {

@ -0,0 +1,392 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="监测信息总数" prop="jcxxCount">
<el-input
v-model="queryParams.jcxxCount"
placeholder="请输入监测信息总数"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['zongzhi:sx:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['zongzhi:sx:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['zongzhi:sx:remove']"
>删除</el-button
>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['zongzhi:sx:export']"
>导出</el-button
>
</div>
<el-table
v-loading="loading"
:data="sxList"
:height="tableHeigth"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="监测信息总数" align="center" prop="jcxxCount" />
<el-table-column label="排除信息总数" align="center" prop="pcxxCount" />
<el-table-column label="舆情预警总数" align="center" prop="yqyjCount" />
<el-table-column label="舆情预警占比" align="center" prop="yqyjZb" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['zongzhi:sx:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:sx:edit']"
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['zongzhi:sx:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改动态筛选对话框 -->
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="监测信息总数" prop="jcxxCount">
<el-input v-model="form.jcxxCount" placeholder="请输入监测信息总数" />
</el-form-item>
<el-form-item label="排除信息总数" prop="pcxxCount">
<el-input v-model="form.pcxxCount" placeholder="请输入排除信息总数" />
</el-form-item>
<el-form-item label="舆情预警总数" prop="yqyjCount">
<el-input v-model="form.yqyjCount" placeholder="请输入舆情预警总数" />
</el-form-item>
<el-form-item label="舆情预警占比" prop="yqyjZb">
<el-input v-model="form.yqyjZb" placeholder="请输入舆情预警占比" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看动态筛选详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions
title="动态筛选"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="监测信息总数">{{
form.jcxxCount
}}</el-descriptions-item>
<el-descriptions-item label="排除信息总数">{{
form.pcxxCount
}}</el-descriptions-item>
<el-descriptions-item label="舆情预警总数">{{
form.yqyjCount
}}</el-descriptions-item>
<el-descriptions-item label="舆情预警占比">{{
form.yqyjZb
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import {
listSx,
getSx,
delSx,
addSx,
updateSx,
exportSx,
} from "@/api/zongzhi/netWorkYq/dtsx/index.js";
export default {
computed: {
...mapGetters(["townList", "treeProps"]),
},
name: "Sx",
//
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
sxList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
jcxxCount: null,
},
//
form: {},
//
rules: {},
};
},
created() {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight -
(this.$refs.topSearch.offsetHeight +
this.$refs.tableTool.offsetHeight) -
46;
this.getList();
});
},
methods: {
/** 查询动态筛选列表 */
getList() {
this.loading = true;
listSx(this.queryParams).then((response) => {
this.sxList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
areaId: null,
jcxxCount: null,
pcxxCount: null,
yqyjCount: null,
yqyjZb: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getSx(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看动态筛选详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加动态筛选";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getSx(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改动态筛选";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateSx(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addSx(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 delSx(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有动态筛选数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/zongzhi/sx/export",
{
...this.queryParams,
},
"动态筛选_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

@ -1,3 +1,11 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-08-28 13:56:14
* @LastEditors: JC9527
* @LastEditTime: 2023-08-28 13:56:39
-->
<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">
@ -225,18 +233,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -420,17 +422,13 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="舆情名称">{{ <el-descriptions-item label="舆情名称">{{
form.sentimentName form.sentimentName
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="舆情内容">{{
form.sentimentContent
}}</el-descriptions-item>
<el-descriptions-item label="部门名称">{{ <el-descriptions-item label="部门名称">{{
form.depName form.depName
}}</el-descriptions-item> }}</el-descriptions-item>
@ -472,13 +470,12 @@
<dict-tag :options="dict.type.tc_yq_media" :value="form.source" /> <dict-tag :options="dict.type.tc_yq_media" :value="form.source" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="是否转办"> <el-descriptions-item label="是否转办" :span="2">
<dict-tag :options="dict.type.tc_yes_no" :value="form.isturn" /> <dict-tag :options="dict.type.tc_yes_no" :value="form.isturn" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="舆情内容" :span="2">{{
<el-descriptions-item label="舆情报告类型"> form.sentimentContent
<dict-tag :options="dict.type.tc_yqbg_type" :value="form.sentimentReportType" /> }}</el-descriptions-item>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<FileView :fileList="fileList" /> <FileView :fileList="fileList" />
</el-dialog> </el-dialog>
@ -497,7 +494,7 @@ import {
} from "@/api/zongzhi/netWorkYq/index.js"; } from "@/api/zongzhi/netWorkYq/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Sentiment", name: "Sentiment",
// //
@ -541,7 +538,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
sentimentName: null, sentimentName: null,
sentimentState: null, sentimentState: null,
@ -666,6 +663,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSentiment(id).then((response) => { getSentiment(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.filterFile(2, response.data.fileName, response.data.fileUrl); this.filterFile(2, response.data.fileName, response.data.fileUrl);
this.form = response.data; this.form = response.data;
@ -684,6 +690,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSentiment(id).then((response) => { getSentiment(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.filterFile(2, response.data.fileName, response.data.fileUrl); this.filterFile(2, response.data.fileName, response.data.fileUrl);
this.form = response.data; this.form = response.data;
@ -727,6 +734,9 @@ export default {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
this.form.areaId = JSON.stringify(this.form.areaId);
this.filterFile(1);
updateSentiment(this.form).then((response) => { updateSentiment(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;

@ -0,0 +1,486 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="媒体类型" prop="mediaType">
<el-select
v-model="queryParams.mediaType"
placeholder="请选择媒体类型"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_yq_media"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="涉事类型" prop="eventType">
<el-select
v-model="queryParams.eventType"
placeholder="请选择涉事类型"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_ss_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['zongzhi:fl:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['zongzhi:fl:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['zongzhi:fl:remove']"
>删除</el-button
>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['zongzhi:fl:export']"
>导出</el-button
>
</div>
<el-table
v-loading="loading"
:data="flList"
:height="tableHeigth"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
</el-table-column>
<el-table-column label="媒体类型" align="center" prop="mediaType">
<template slot-scope="scope">
<dict-tag
:options="dict.type.tc_yq_media"
:value="scope.row.mediaType"
/>
</template>
</el-table-column>
<el-table-column label="涉事类型" align="center" prop="eventType">
<template slot-scope="scope">
<dict-tag
:options="dict.type.tc_ss_type"
:value="scope.row.eventType"
/>
</template>
</el-table-column>
<el-table-column label="媒体数据" align="center" prop="mediaCount" />
<el-table-column label="涉事数量" align="center" prop="eventCount" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['zongzhi:fl:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:fl:edit']"
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['zongzhi:fl:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改舆情分类对话框 -->
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
:props="treeProps"
clearable
></el-cascader>
</el-form-item>
<el-form-item label="媒体类型" prop="mediaType">
<el-select v-model="form.mediaType" placeholder="请选择媒体类型">
<el-option
v-for="dict in dict.type.tc_yq_media"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="涉事类型" prop="eventType">
<el-select v-model="form.eventType" placeholder="请选择涉事类型">
<el-option
v-for="dict in dict.type.tc_ss_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="媒体数据" prop="mediaCount">
<el-input v-model="form.mediaCount" placeholder="请输入媒体数据" />
</el-form-item>
<el-form-item label="涉事数量" prop="eventCount">
<el-input v-model="form.eventCount" placeholder="请输入涉事数量" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看舆情分类详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions
title="舆情分类"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>
<el-descriptions-item label="媒体类型">
<dict-tag :options="dict.type.tc_yq_media" :value="form.mediaType" />
</el-descriptions-item>
<el-descriptions-item label="涉事类型">
<dict-tag :options="dict.type.tc_ss_type" :value="form.eventType" />
</el-descriptions-item>
<el-descriptions-item label="媒体数据">{{
form.mediaCount
}}</el-descriptions-item>
<el-descriptions-item label="涉事数量">{{
form.eventCount
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import {
listFl,
getFl,
delFl,
addFl,
updateFl,
exportFl,
} from "@/api/zongzhi/netWorkYq/yqfl/index.js";
export default {
computed: {
...mapGetters(["townList", "treeProps"]),
},
name: "Fl",
//
dicts: ["tc_yq_media", "tc_ss_type"],
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
flList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
mediaType: null,
eventType: null,
},
//
form: {},
//
rules: {},
};
},
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
created() {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight -
(this.$refs.topSearch.offsetHeight +
this.$refs.tableTool.offsetHeight) -
46;
this.getList();
});
},
methods: {
/** 查询舆情分类列表 */
getList() {
this.loading = true;
listFl(this.queryParams).then((response) => {
this.flList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
areaId: null,
mediaType: null,
eventType: null,
mediaCount: null,
eventCount: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getFl(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看舆情分类详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加舆情分类";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getFl(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data;
this.open = true;
this.title = "修改舆情分类";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) {
updateFl(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addFl(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 delFl(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有舆情分类数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/zongzhi/fl/export",
{
...this.queryParams,
},
"舆情分类_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

@ -0,0 +1,454 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="类型" prop="type">
<el-select
v-model="queryParams.type"
placeholder="请选择类型"
clearable
size="small"
>
<el-option
v-for="dict in dict.type.tc_yqzs"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['zongzhi:zs:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['zongzhi:zs:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['zongzhi:zs:remove']"
>删除</el-button
>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['zongzhi:zs:export']"
>导出</el-button
>
</div>
<el-table
v-loading="loading"
:data="zsList"
:height="tableHeigth"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :options="dict.type.tc_yqzs" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="日期" align="center" prop="dateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.dateTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="count" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['zongzhi:zs:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:zs:edit']"
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['zongzhi:zs:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改舆情走势图对话框 -->
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
:props="treeProps"
clearable
></el-cascader>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="form.type" placeholder="请选择类型">
<el-option
v-for="dict in dict.type.tc_yqzs"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="日期" prop="dateTime">
<el-date-picker
clearable
size="small"
v-model="form.dateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input v-model="form.count" placeholder="请输入数量" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看舆情走势图详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions
title="舆情走势图"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>
<el-descriptions-item label="类型">
<dict-tag :options="dict.type.tc_yqzs" :value="form.type" />
</el-descriptions-item>
<el-descriptions-item label="日期">{{
form.dateTime
}}</el-descriptions-item>
<el-descriptions-item label="数量">{{
form.count
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import {
listZs,
getZs,
delZs,
addZs,
updateZs,
exportZs,
} from "@/api/zongzhi/netWorkYq/yqzst/index.js";
export default {
computed: {
...mapGetters(["townList", "treeProps"]),
},
name: "Zs",
//
dicts: ["tc_yqzs"],
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
zsList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
type: null,
},
//
form: {},
//
rules: {},
};
},
created() {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight -
(this.$refs.topSearch.offsetHeight +
this.$refs.tableTool.offsetHeight) -
46;
this.getList();
});
},
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: {
/** 查询舆情走势图列表 */
getList() {
this.loading = true;
listZs(this.queryParams).then((response) => {
this.zsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
areaId: null,
type: null,
dateTime: null,
count: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getZs(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看舆情走势图详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加舆情走势图";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getZs(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data;
this.open = true;
this.title = "修改舆情走势图";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) {
updateZs(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addZs(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 delZs(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有舆情走势图数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/zongzhi/zs/export",
{
...this.queryParams,
},
"舆情走势图_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

@ -0,0 +1,416 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="占比名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入占比名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['zongzhi:bjsj:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['zongzhi:bjsj:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['zongzhi:bjsj:remove']"
>删除</el-button
>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['zongzhi:bjsj:export']"
>导出</el-button
>
</div>
<el-table
v-loading="loading"
:data="bjsjList"
:height="tableHeigth"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
</el-table-column>
<el-table-column label="占比名称" align="center" prop="name" />
<el-table-column label="所占百分比" align="center" prop="percent" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['zongzhi:bjsj:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:bjsj:edit']"
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['zongzhi:bjsj:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改本级上级网评指令比列 ()对话框 -->
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
:props="treeProps"
clearable
></el-cascader>
</el-form-item>
<el-form-item label="占比名称" prop="name">
<el-input v-model="form.name" placeholder="请输入占比名称" />
</el-form-item>
<el-form-item label="所占百分比" prop="percent">
<el-input v-model="form.percent" placeholder="请输入所占百分比" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看本级上级网评指令比列 ()详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions
title="本级上级网评指令比列 (月)"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>
<el-descriptions-item label="占比名称">{{
form.name
}}</el-descriptions-item>
<el-descriptions-item label="所占百分比">{{
form.percent
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import {
listBjsj,
getBjsj,
delBjsj,
addBjsj,
updateBjsj,
exportBjsj,
} from "@/api/zongzhi/netZoology/bjsjzb/index.js";
export default {
computed: {
...mapGetters(["townList", "treeProps"]),
},
name: "Bjsj",
//
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// ()
bjsjList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
},
//
form: {},
//
rules: {},
};
},
created() {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight -
(this.$refs.topSearch.offsetHeight +
this.$refs.tableTool.offsetHeight) -
46;
this.getList();
});
},
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: {
/** 查询本级上级网评指令比列 (月)列表 */
getList() {
this.loading = true;
listBjsj(this.queryParams).then((response) => {
this.bjsjList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
areaId: null,
name: null,
percent: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getBjsj(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看本级上级网评指令比列 (月)详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加本级上级网评指令比列 (月)";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getBjsj(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data;
this.open = true;
this.title = "修改本级上级网评指令比列 (月)";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) {
updateBjsj(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBjsj(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 delBjsj(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm(
"是否确认导出所有本级上级网评指令比列 (月)数据项?",
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.download(
"/zongzhi/bjsj/export",
{
...this.queryParams,
},
"本级上级网评指令比列 (月)_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

@ -162,18 +162,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -271,7 +265,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ <el-descriptions-item label="姓名">{{
@ -324,7 +318,7 @@ import {
} from "@/api/zongzhi/netZoology/netAppraiser/index.js"; } from "@/api/zongzhi/netZoology/netAppraiser/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Commentator", name: "Commentator",
// //
@ -359,7 +353,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
name: null, name: null,
type: null, type: null,
@ -458,6 +452,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getCommentator(id).then((response) => { getCommentator(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看网评员详情"; this.infoTitle = "查看网评员详情";
@ -474,6 +477,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getCommentator(id).then((response) => { getCommentator(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网评员"; this.title = "修改网评员";
@ -483,6 +487,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateCommentator(this.form).then((response) => { updateCommentator(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -144,13 +144,13 @@
查看 查看
</el-button> </el-button>
<!-- v-show="scope.row.status == 2" --> <!-- v-show="scope.row.status == 2" -->
<el-button type="info" size="mini" @click="handPj(scope.row)" <!-- <el-button type="info" size="mini" @click="handPj(scope.row)"
>评价</el-button >评价</el-button
> > -->
<!-- v-show="scope.row.status == 2" -->
<el-button <el-button
type="success" type="success"
size="mini" size="mini"
v-show="scope.row.status == 2"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:article:edit']" v-hasPermi="['zongzhi:article:edit']"
>修改</el-button >修改</el-button
@ -192,18 +192,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -285,7 +279,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="文章类型"> <el-descriptions-item label="文章类型">
@ -311,7 +305,7 @@
<dict-tag :options="dict.type.tc_pj_status" :value="form.status" /> <dict-tag :options="dict.type.tc_pj_status" :value="form.status" />
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<div <!-- <div
style="margin: 10px; font-size: 16px; font-weight: bold; color: #333" style="margin: 10px; font-size: 16px; font-weight: bold; color: #333"
> >
评价列表 评价列表
@ -325,17 +319,17 @@
prop="pjContent" prop="pjContent"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
</el-table> </el-table> -->
<pagination <!-- <pagination
v-show="totalPj > 0" v-show="totalPj > 0"
:total="totalPj" :total="totalPj"
:page.sync="PjParams.pageNum" :page.sync="PjParams.pageNum"
:limit.sync="PjParams.pageSize" :limit.sync="PjParams.pageSize"
@pagination="getListPj" @pagination="getListPj"
/> /> -->
</el-dialog> </el-dialog>
<el-dialog <!-- <el-dialog
:visible.sync="pjShow" :visible.sync="pjShow"
width="500px" width="500px"
append-to-body append-to-body
@ -362,7 +356,7 @@
<el-button type="primary" @click="submitFormPj"> </el-button> <el-button type="primary" @click="submitFormPj"> </el-button>
<el-button @click="cancelPj"> </el-button> <el-button @click="cancelPj"> </el-button>
</div> </div>
</el-dialog> </el-dialog> -->
</div> </div>
</template> </template>
@ -383,7 +377,7 @@ import {
} from "@/api/zongzhi/netZoology/netP/index.js"; } from "@/api/zongzhi/netZoology/netP/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList", "name", "userId"]), ...mapGetters(["townList", "name", "userId", "treeProps"]),
}, },
name: "Article", name: "Article",
// //
@ -419,7 +413,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
type: null, type: null,
releaseTime: null, releaseTime: null,
source: null, source: null,
@ -433,7 +427,7 @@ export default {
PjParams: { PjParams: {
articleId: null, articleId: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
}, },
loadingPj: true, loadingPj: true,
totalPj: 0, totalPj: 0,
@ -541,7 +535,7 @@ export default {
this.PjParams = { this.PjParams = {
articleId: null, articleId: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
}; };
this.totalPj = 0; this.totalPj = 0;
}, },
@ -566,27 +560,38 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getArticle(id).then((response) => { getArticle(id).then((response) => {
this.form = response.data; response.data.areaId = JSON.parse(response.data.areaId);
if (row.status == 1) { if (
// response.data.areaId.length > 0 &&
this.PjParams.articleId = id; Array.isArray(response.data.areaId)
this.getListPj(); ) {
this.infoOpen = true; response.data.areaId = response.data.areaId.join("、");
this.infoTitle = "查看网络文章详情";
} else { } else {
this.infoOpen = true; response.data.areaId = "";
this.infoTitle = "查看网络文章详情";
} }
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看网络文章详情";
// if (row.status == 1) {
// //
// this.PjParams.articleId = id;
// this.getListPj();
// this.infoOpen = true;
// this.infoTitle = "";
// } else {
// this.infoOpen = true;
// this.infoTitle = "";
// }
}); });
}, },
getListPj() { // getListPj() {
this.loadingPj = true; // this.loadingPj = true;
listEvaluate(this.PjParams).then((response) => { // listEvaluate(this.PjParams).then((response) => {
this.pjData = response.rows; // this.pjData = response.rows;
this.totalPj = response.total; // this.totalPj = response.total;
this.loadingPj = false; // this.loadingPj = false;
}); // });
}, // },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -599,6 +604,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getArticle(id).then((response) => { getArticle(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网络文章"; this.title = "修改网络文章";
@ -608,6 +614,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
this.form.status = 2; // this.form.status = 2; //
if (this.form.id != null) { if (this.form.id != null) {
updateArticle(this.form).then((response) => { updateArticle(this.form).then((response) => {

@ -145,18 +145,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -220,7 +214,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -263,7 +257,7 @@ import {
} from "@/api/zongzhi/netZoology/netMqPrincipal/index.js"; } from "@/api/zongzhi/netZoology/netMqPrincipal/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Principal", name: "Principal",
// //
@ -297,7 +291,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
unitName: null, unitName: null,
fuzeMan: null, fuzeMan: null,
@ -390,6 +384,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPrincipal(id).then((response) => { getPrincipal(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看网络民情责任人详情"; this.infoTitle = "查看网络民情责任人详情";
@ -406,6 +409,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPrincipal(id).then((response) => { getPrincipal(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网络民情责任人"; this.title = "修改网络民情责任人";
@ -415,6 +419,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updatePrincipal(this.form).then((response) => { updatePrincipal(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -175,8 +175,8 @@
label-width="auto" label-width="auto"
class="dialog-from" class="dialog-from"
> >
<el-form-item label="区域id" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-input v-model="form.areaId" placeholder="请输入区域id" /> <el-input v-model="form.areaId" placeholder="请输入区域" />
</el-form-item> </el-form-item>
<el-form-item label="文章ID" prop="articleId"> <el-form-item label="文章ID" prop="articleId">
<el-input v-model="form.articleId" placeholder="请输入文章ID" /> <el-input v-model="form.articleId" placeholder="请输入文章ID" />
@ -264,8 +264,8 @@
border border
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域id">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="文章类型"> <el-descriptions-item label="文章类型">
@ -315,7 +315,7 @@ import {
} from "@/api/zongzhi/netZoology/netP/index.js"; } from "@/api/zongzhi/netZoology/netP/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Evaluate", name: "Evaluate",
// //
@ -350,7 +350,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
articleType: null, articleType: null,
appraiserName: null, appraiserName: null,

@ -156,18 +156,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -257,7 +251,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位">{{ <el-descriptions-item label="单位">{{
@ -310,7 +304,7 @@ import {
} from "@/api/zongzhi/netZoology/netSafety/index.js"; } from "@/api/zongzhi/netZoology/netSafety/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Safetyadmin", name: "Safetyadmin",
// //
@ -344,7 +338,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
unit: null, unit: null,
networkAqg: null, networkAqg: null,
@ -443,6 +437,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSafetyadmin(id).then((response) => { getSafetyadmin(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看网络安全官详情"; this.infoTitle = "查看网络安全官详情";
@ -459,6 +462,8 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getSafetyadmin(id).then((response) => { getSafetyadmin(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网络安全官"; this.title = "修改网络安全官";
@ -468,6 +473,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateSafetyadmin(this.form).then((response) => { updateSafetyadmin(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -80,7 +80,11 @@
@selection-change="handleSelectionChange" @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="areaId" /> <el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
</el-table-column>
<el-table-column label="单位名称" align="center" prop="name" /> <el-table-column label="单位名称" align="center" prop="name" />
<el-table-column label="联系人" align="center" prop="linkMan" /> <el-table-column label="联系人" align="center" prop="linkMan" />
<el-table-column label="联系电话" align="center" prop="phoneNum" /> <el-table-column label="联系电话" align="center" prop="phoneNum" />
@ -143,18 +147,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -199,7 +197,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="单位名称">{{ <el-descriptions-item label="单位名称">{{
@ -230,7 +228,7 @@ import {
} from "@/api/zongzhi/netZoology/netSafetyZcUnit/index.js"; } from "@/api/zongzhi/netZoology/netSafetyZcUnit/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "NetSafetyZcUnit", name: "NetSafetyZcUnit",
// //
@ -264,7 +262,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
name: null, name: null,
linkMan: null, linkMan: null,
@ -286,6 +284,18 @@ export default {
this.getList(); this.getList();
}); });
}, },
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: { methods: {
/** 查询网络安全支持单位列表 */ /** 查询网络安全支持单位列表 */
getList() { getList() {
@ -351,6 +361,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getNetSafetyZcUnit(id).then((response) => { getNetSafetyZcUnit(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看网络安全支持单位详情"; this.infoTitle = "查看网络安全支持单位详情";
@ -367,6 +386,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getNetSafetyZcUnit(id).then((response) => { getNetSafetyZcUnit(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网络安全支持单位"; this.title = "修改网络安全支持单位";
@ -376,6 +396,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateNetSafetyZcUnit(this.form).then((response) => { updateNetSafetyZcUnit(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -155,18 +155,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="区域" prop="areaId"> <el-form-item label="区域" prop="areaId">
<el-select <el-cascader
v-model="form.areaId" v-model="form.areaId"
placeholder="请选择区域" :options="townList"
filterable :props="treeProps"
> clearable
<el-option ></el-cascader>
v-for="dict in townList"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -246,7 +240,7 @@
labelClassName="desLable" labelClassName="desLable"
> >
<el-descriptions-item label="区域">{{ <el-descriptions-item label="区域">{{
$filterTown(form.areaId) form.areaId
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="类别"> <el-descriptions-item label="类别">
@ -291,7 +285,7 @@ import {
} from "@/api/zongzhi/netZoology/netVolunteer/index.js"; } from "@/api/zongzhi/netZoology/netVolunteer/index.js";
export default { export default {
computed: { computed: {
...mapGetters(["townList"]), ...mapGetters(["townList", "treeProps"]),
}, },
name: "Volunteer", name: "Volunteer",
// //
@ -326,7 +320,7 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
type: null, type: null,
name: null, name: null,
@ -419,6 +413,15 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getVolunteer(id).then((response) => { getVolunteer(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data; this.form = response.data;
this.infoOpen = true; this.infoOpen = true;
this.infoTitle = "查看网络文明自愿者详情"; this.infoTitle = "查看网络文明自愿者详情";
@ -435,6 +438,7 @@ export default {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getVolunteer(id).then((response) => { getVolunteer(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改网络文明自愿者"; this.title = "修改网络文明自愿者";
@ -444,6 +448,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) { if (this.form.id != null) {
updateVolunteer(this.form).then((response) => { updateVolunteer(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -0,0 +1,414 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="区域" prop="areaId">
<el-input
v-model="queryParams.areaId"
placeholder="请输入区域"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="完成率" prop="finish">
<el-input
v-model="queryParams.finish"
placeholder="请输入完成率"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-button
type="primary"
size="mini"
@click="handleAdd()"
v-hasPermi="['zongzhi:wpyrwwcl:add']"
>新增</el-button
>
<el-button
type="success"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['zongzhi:wpyrwwcl:edit']"
>修改</el-button
>
<el-button
type="danger"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['zongzhi:wpyrwwcl:remove']"
>删除</el-button
>
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['zongzhi:wpyrwwcl:export']"
>导出</el-button
>
</div>
<el-table
v-loading="loading"
:data="wpyrwwclList"
:height="tableHeigth"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域" align="center" prop="areaId">
<template slot-scope="scope">
{{ scope.row.areaId | filterTown }}
</template>
</el-table-column>
<el-table-column label="完成率" align="center" prop="finish" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@click="handleInfo(scope.row)"
v-hasPermi="['zongzhi:wpyrwwcl:list']"
>
查看
</el-button>
<el-button
type="success"
size="mini"
@click="handleUpdate(scope.row)"
v-hasPermi="['zongzhi:wpyrwwcl:edit']"
>修改</el-button
>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
v-hasPermi="['zongzhi:wpyrwwcl:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改网评员任务完成率心对话框 -->
<el-dialog
:visible.sync="open"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ title }}</div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="auto"
class="dialog-from"
>
<el-form-item label="区域" prop="areaId">
<el-cascader
v-model="form.areaId"
:options="townList"
:props="treeProps"
clearable
></el-cascader>
</el-form-item>
<el-form-item label="完成率" prop="finish">
<el-input v-model="form.finish" placeholder="请输入完成率" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看网评员任务完成率心详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<el-descriptions
title="网评员任务完成率心"
:column="2"
border
labelClassName="desLable"
>
<el-descriptions-item label="区域">{{
form.areaId
}}</el-descriptions-item>
<el-descriptions-item label="完成率">{{
form.finish
}}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import {
listWpyrwwcl,
getWpyrwwcl,
delWpyrwwcl,
addWpyrwwcl,
updateWpyrwwcl,
exportWpyrwwcl,
} from "@/api/zongzhi/netZoology/wpywcl/index.js";
export default {
computed: {
...mapGetters(["townList", "treeProps"]),
},
name: "Wpyrwwcl",
//
data() {
return {
tableHeigth: 0,
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
wpyrwwclList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
areaId: null,
finish: null,
},
//
form: {},
//
rules: {},
};
},
created() {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight -
(this.$refs.topSearch.offsetHeight +
this.$refs.tableTool.offsetHeight) -
46;
this.getList();
});
},
filters: {
filterTown(target) {
if (target) {
target = JSON.parse(target);
if (target.length > 0 && Array.isArray(target)) {
return target.join("、");
} else {
return "";
}
}
},
},
methods: {
/** 查询网评员任务完成率心列表 */
getList() {
this.loading = true;
listWpyrwwcl(this.queryParams).then((response) => {
this.wpyrwwclList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
areaId: null,
finish: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getWpyrwwcl(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
if (
response.data.areaId.length > 0 &&
Array.isArray(response.data.areaId)
) {
response.data.areaId = response.data.areaId.join("、");
} else {
response.data.areaId = "";
}
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看网评员任务完成率心详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加网评员任务完成率心";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getWpyrwwcl(id).then((response) => {
response.data.areaId = JSON.parse(response.data.areaId);
this.form = response.data;
this.open = true;
this.title = "修改网评员任务完成率心";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.areaId = JSON.stringify(this.form.areaId);
if (this.form.id != null) {
updateWpyrwwcl(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addWpyrwwcl(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 delWpyrwwcl(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有网评员任务完成率心数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/zongzhi/wpyrwwcl/export",
{
...this.queryParams,
},
"网评员任务完成率心_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>
Loading…
Cancel
Save