Lvtianfang
parent
3a27b6f4a1
commit
977eb062ca
@ -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,
|
||||||
|
});
|
||||||
|
}
|
@ -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="区域id" 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="区域id" 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="区域id">{{
|
||||||
|
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>
|
@ -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"]),
|
||||||
|
},
|
||||||
|
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>
|
@ -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="区域id" 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="区域id" 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="区域id">{{
|
||||||
|
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="区域id" 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="区域id" 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="区域id">{{
|
||||||
|
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="区域Id" 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="区域Id" 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>
|
@ -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…
Reference in new issue