diff --git a/src/api/zongzhi/netSecurity/SafetyYh/index.js b/src/api/zongzhi/netSecurity/SafetyYh/index.js index e69de29..d6a678c 100644 --- a/src/api/zongzhi/netSecurity/SafetyYh/index.js +++ b/src/api/zongzhi/netSecurity/SafetyYh/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询安全隐患列表 +export function listDanger(query) { + return request({ + url: "/zongzhi/danger/list", + method: "get", + params: query, + }); +} + +// 查询安全隐患详细 +export function getDanger(id) { + return request({ + url: "/zongzhi/danger/" + id, + method: "get", + }); +} + +// 新增安全隐患 +export function addDanger(data) { + return request({ + url: "/zongzhi/danger", + method: "post", + data: data, + }); +} + +// 修改安全隐患 +export function updateDanger(data) { + return request({ + url: "/zongzhi/danger", + method: "put", + data: data, + }); +} + +// 删除安全隐患 +export function delDanger(id) { + return request({ + url: "/zongzhi/danger/" + id, + method: "delete", + }); +} + +// 导出安全隐患 +export function exportDanger(data) { + return request({ + url: "/zongzhi/danger/export", + method: "post", + data, + }); +} diff --git a/src/api/zongzhi/netZoology/netArticle/index.js b/src/api/zongzhi/netZoology/netArticle/index.js index e69de29..aa3ccb3 100644 --- a/src/api/zongzhi/netZoology/netArticle/index.js +++ b/src/api/zongzhi/netZoology/netArticle/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询网络文章列表 +export function listArticle(query) { + return request({ + url: "/zongzhi/article/list", + method: "get", + params: query, + }); +} + +// 查询网络文章详细 +export function getArticle(id) { + return request({ + url: "/zongzhi/article/" + id, + method: "get", + }); +} + +// 新增网络文章 +export function addArticle(data) { + return request({ + url: "/zongzhi/article", + method: "post", + data: data, + }); +} + +// 修改网络文章 +export function updateArticle(data) { + return request({ + url: "/zongzhi/article", + method: "put", + data: data, + }); +} + +// 删除网络文章 +export function delArticle(id) { + return request({ + url: "/zongzhi/article/" + id, + method: "delete", + }); +} + +// 导出网络文章 +export function exportArticle(data) { + return request({ + url: "/zongzhi/article/export", + method: "post", + data, + }); +} diff --git a/src/api/zongzhi/netZoology/netMqPrincipal/index.js b/src/api/zongzhi/netZoology/netMqPrincipal/index.js index e69de29..c541ae4 100644 --- a/src/api/zongzhi/netZoology/netMqPrincipal/index.js +++ b/src/api/zongzhi/netZoology/netMqPrincipal/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询网络民情责任人列表 +export function listPrincipal(query) { + return request({ + url: "/zongzhi/principal/list", + method: "get", + params: query, + }); +} + +// 查询网络民情责任人详细 +export function getPrincipal(id) { + return request({ + url: "/zongzhi/principal/" + id, + method: "get", + }); +} + +// 新增网络民情责任人 +export function addPrincipal(data) { + return request({ + url: "/zongzhi/principal", + method: "post", + data: data, + }); +} + +// 修改网络民情责任人 +export function updatePrincipal(data) { + return request({ + url: "/zongzhi/principal", + method: "put", + data: data, + }); +} + +// 删除网络民情责任人 +export function delPrincipal(id) { + return request({ + url: "/zongzhi/principal/" + id, + method: "delete", + }); +} + +// 导出网络民情责任人 +export function exportPrincipal(data) { + return request({ + url: "/zongzhi/principal/export", + method: "post", + data, + }); +} diff --git a/src/api/zongzhi/netZoology/netSafetyZcUnit/index.js b/src/api/zongzhi/netZoology/netSafetyZcUnit/index.js index e69de29..359195b 100644 --- a/src/api/zongzhi/netZoology/netSafetyZcUnit/index.js +++ b/src/api/zongzhi/netZoology/netSafetyZcUnit/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询网络安全支持单位列表 +export function listNetSafetyZcUnit(query) { + return request({ + url: "/zongzhi/netSafetyZcUnit/list", + method: "get", + params: query, + }); +} + +// 查询网络安全支持单位详细 +export function getNetSafetyZcUnit(id) { + return request({ + url: "/zongzhi/netSafetyZcUnit/" + id, + method: "get", + }); +} + +// 新增网络安全支持单位 +export function addNetSafetyZcUnit(data) { + return request({ + url: "/zongzhi/netSafetyZcUnit", + method: "post", + data: data, + }); +} + +// 修改网络安全支持单位 +export function updateNetSafetyZcUnit(data) { + return request({ + url: "/zongzhi/netSafetyZcUnit", + method: "put", + data: data, + }); +} + +// 删除网络安全支持单位 +export function delNetSafetyZcUnit(id) { + return request({ + url: "/zongzhi/netSafetyZcUnit/" + id, + method: "delete", + }); +} + +// 导出网络安全支持单位 +export function exportNetSafetyZcUnit(data) { + return request({ + url: "/zongzhi/netSafetyZcUnit/export", + method: "post", + data, + }); +} diff --git a/src/api/zongzhi/netZoology/netVolunteer/index.js b/src/api/zongzhi/netZoology/netVolunteer/index.js index e69de29..801387a 100644 --- a/src/api/zongzhi/netZoology/netVolunteer/index.js +++ b/src/api/zongzhi/netZoology/netVolunteer/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询网络文明自愿者列表 +export function listVolunteer(query) { + return request({ + url: "/zongzhi/volunteer/list", + method: "get", + params: query, + }); +} + +// 查询网络文明自愿者详细 +export function getVolunteer(id) { + return request({ + url: "/zongzhi/volunteer/" + id, + method: "get", + }); +} + +// 新增网络文明自愿者 +export function addVolunteer(data) { + return request({ + url: "/zongzhi/volunteer", + method: "post", + data: data, + }); +} + +// 修改网络文明自愿者 +export function updateVolunteer(data) { + return request({ + url: "/zongzhi/volunteer", + method: "put", + data: data, + }); +} + +// 删除网络文明自愿者 +export function delVolunteer(id) { + return request({ + url: "/zongzhi/volunteer/" + id, + method: "delete", + }); +} + +// 导出网络文明自愿者 +export function exportVolunteer(data) { + return request({ + url: "/zongzhi/volunteer/export", + method: "post", + data, + }); +} diff --git a/src/utils/myselfFu.js b/src/utils/myselfFu.js index 6c7d063..c8f9e03 100644 --- a/src/utils/myselfFu.js +++ b/src/utils/myselfFu.js @@ -1,6 +1,6 @@ import store from "@/store"; -// 翻译区域id +// 翻译区域 export function filterTown(id) { if (id == undefined) return; let name = store.getters.townList.filter((item) => item.value == id); diff --git a/src/views/netManage/enterpriseMl/index.vue b/src/views/netManage/enterpriseMl/index.vue index 3078349..d9fca8c 100644 --- a/src/views/netManage/enterpriseMl/index.vue +++ b/src/views/netManage/enterpriseMl/index.vue @@ -166,7 +166,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netManage/netPlatform/index.vue b/src/views/netManage/netPlatform/index.vue index fdf7800..34d7446 100644 --- a/src/views/netManage/netPlatform/index.vue +++ b/src/views/netManage/netPlatform/index.vue @@ -132,7 +132,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netManage/netReport/index.vue b/src/views/netManage/netReport/index.vue index 765dd2e..e992de6 100644 --- a/src/views/netManage/netReport/index.vue +++ b/src/views/netManage/netReport/index.vue @@ -200,8 +200,8 @@ label-width="auto" class="dialog-from" > - - + + @@ -278,7 +278,7 @@ border labelClassName="desLable" > - {{ + {{ form.areaId }} diff --git a/src/views/netManage/qlzx/index.vue b/src/views/netManage/qlzx/index.vue index 60c9cb3..e1d7b81 100644 --- a/src/views/netManage/qlzx/index.vue +++ b/src/views/netManage/qlzx/index.vue @@ -97,7 +97,7 @@ @selection-change="handleSelectionChange" > - + @@ -177,7 +177,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ form.areaId }} diff --git a/src/views/netManage/supervise/index.vue b/src/views/netManage/supervise/index.vue index 3720756..0d1d70c 100644 --- a/src/views/netManage/supervise/index.vue +++ b/src/views/netManage/supervise/index.vue @@ -77,7 +77,7 @@ @selection-change="handleSelectionChange" > - + @@ -153,7 +153,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netManage/workDynamic/index.vue b/src/views/netManage/workDynamic/index.vue index bbfbdb4..620793c 100644 --- a/src/views/netManage/workDynamic/index.vue +++ b/src/views/netManage/workDynamic/index.vue @@ -82,7 +82,7 @@ @selection-change="handleSelectionChange" > - + - + - {{ + {{ form.areaId }} diff --git a/src/views/netManage/workItem/index.vue b/src/views/netManage/workItem/index.vue index fce246e..9fa30d8 100644 --- a/src/views/netManage/workItem/index.vue +++ b/src/views/netManage/workItem/index.vue @@ -187,7 +187,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netSecurity/DataSource/index.vue b/src/views/netSecurity/DataSource/index.vue index debe6af..0165d43 100644 --- a/src/views/netSecurity/DataSource/index.vue +++ b/src/views/netSecurity/DataSource/index.vue @@ -209,7 +209,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netSecurity/SafetyYh/index.vue b/src/views/netSecurity/SafetyYh/index.vue index 54c8ca6..bd9ec05 100644 --- a/src/views/netSecurity/SafetyYh/index.vue +++ b/src/views/netSecurity/SafetyYh/index.vue @@ -1,9 +1,37 @@ - - diff --git a/src/views/netSecurity/supervise/DbUnit/index.vue b/src/views/netSecurity/supervise/DbUnit/index.vue index b9ab1c4..a3d2f9a 100644 --- a/src/views/netSecurity/supervise/DbUnit/index.vue +++ b/src/views/netSecurity/supervise/DbUnit/index.vue @@ -173,7 +173,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netSecurity/supervise/GovernmentWeb/index.vue b/src/views/netSecurity/supervise/GovernmentWeb/index.vue index 24d547c..9488de5 100644 --- a/src/views/netSecurity/supervise/GovernmentWeb/index.vue +++ b/src/views/netSecurity/supervise/GovernmentWeb/index.vue @@ -86,7 +86,7 @@ @selection-change="handleSelectionChange" > - + @@ -157,7 +157,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netSecurity/supervise/IdcUnit/index.vue b/src/views/netSecurity/supervise/IdcUnit/index.vue index ca05c6b..e51a147 100644 --- a/src/views/netSecurity/supervise/IdcUnit/index.vue +++ b/src/views/netSecurity/supervise/IdcUnit/index.vue @@ -8,10 +8,10 @@ v-show="showSearch" label-width="auto" > - + - + - - + + @@ -172,7 +172,7 @@ border labelClassName="desLable" > - {{ + {{ form.areaId }} diff --git a/src/views/netWorkYq/index.vue b/src/views/netWorkYq/index.vue index 48eb49d..3433819 100644 --- a/src/views/netWorkYq/index.vue +++ b/src/views/netWorkYq/index.vue @@ -222,7 +222,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netZoology/netAppraiser/index.vue b/src/views/netZoology/netAppraiser/index.vue index e55d8dd..96fd8de 100644 --- a/src/views/netZoology/netAppraiser/index.vue +++ b/src/views/netZoology/netAppraiser/index.vue @@ -159,7 +159,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netZoology/netArticle/index.vue b/src/views/netZoology/netArticle/index.vue index 2bd6249..a57cf72 100644 --- a/src/views/netZoology/netArticle/index.vue +++ b/src/views/netZoology/netArticle/index.vue @@ -1,9 +1,509 @@ +import { mapGetters } from "vuex"; +import { + listArticle, + getArticle, + delArticle, + addArticle, + updateArticle, + exportArticle, +} from "@/api/zongzhi/netZoology/netArticle/index.js"; +export default { + computed: { + ...mapGetters(["townList"]), + }, + name: "Article", + //注释字典 + dicts: ["tc_wz_type", "tc_yq_media"], + data() { + return { + tableHeigth: 0, + //查看详情 + infoOpen: false, + //详情标题 + infoTitle: "", + // 遮罩层 + loading: true, + // 导出遮罩层 + exportLoading: false, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + // 网络文章表格数据 + articleList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + type: null, + + releaseTime: null, + + source: 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; + listArticle(this.queryParams).then((response) => { + this.articleList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + // 表单重置 + reset() { + this.form = { + id: null, + + areaId: null, - + type: null, + + articleTitle: null, + + releaseTime: null, + + source: null, + + url: null, + + createId: null, + + createBy: null, + + createTime: null, + + updateId: null, + + updateTime: null, + + updateBy: null, + + remark: 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; + getArticle(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; + getArticle(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) { + updateArticle(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + addArticle(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 delArticle(ids); + }) + .then(() => { + this.getList(); + this.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + const queryParams = this.queryParams; + this.$confirm("是否确认导出所有网络文章数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.download( + "/zongzhi/article/export", + { + ...this.queryParams, + }, + "网络文章_" + new Date().getTime() + ".xlsx" + ); + this.exportLoading = false; + }) + .catch(() => {}); + }, + }, +}; + diff --git a/src/views/netZoology/netMqPrincipal/index.vue b/src/views/netZoology/netMqPrincipal/index.vue index 784effa..cc3ceb4 100644 --- a/src/views/netZoology/netMqPrincipal/index.vue +++ b/src/views/netZoology/netMqPrincipal/index.vue @@ -1,9 +1,451 @@ +import { mapGetters } from "vuex"; +import { + listPrincipal, + getPrincipal, + delPrincipal, + addPrincipal, + updatePrincipal, + exportPrincipal, +} from "@/api/zongzhi/netZoology/netMqPrincipal/index.js"; +export default { + computed: { + ...mapGetters(["townList"]), + }, + name: "Principal", + //注释字典 + data() { + return { + tableHeigth: 0, + //查看详情 + infoOpen: false, + //详情标题 + infoTitle: "", + // 遮罩层 + loading: true, + // 导出遮罩层 + exportLoading: false, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + // 网络民情责任人表格数据 + principalList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + unitName: null, + + fuzeMan: 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; + listPrincipal(this.queryParams).then((response) => { + this.principalList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + // 表单重置 + reset() { + this.form = { + id: null, + + areaId: null, + + unitName: null, - + fuzeMan: null, + + duty: null, + + tel: null, + + faxNum: null, + + phoneNum: null, + + createId: null, + + createBy: null, + + createTime: null, + + updateId: null, + + updateBy: null, + + updateTime: null, + + remark: 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; + getPrincipal(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; + getPrincipal(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) { + updatePrincipal(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + addPrincipal(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 delPrincipal(ids); + }) + .then(() => { + this.getList(); + this.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + const queryParams = this.queryParams; + this.$confirm("是否确认导出所有网络民情责任人数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.download( + "/zongzhi/principal/export", + { + ...this.queryParams, + }, + "网络民情责任人_" + new Date().getTime() + ".xlsx" + ); + this.exportLoading = false; + }) + .catch(() => {}); + }, + }, +}; + diff --git a/src/views/netZoology/netSafety/index.vue b/src/views/netZoology/netSafety/index.vue index 371c690..5891284 100644 --- a/src/views/netZoology/netSafety/index.vue +++ b/src/views/netZoology/netSafety/index.vue @@ -153,7 +153,7 @@ label-width="auto" class="dialog-from" > - + - {{ + {{ $filterTown(form.areaId) }} diff --git a/src/views/netZoology/netSafetyZcUnit/index.vue b/src/views/netZoology/netSafetyZcUnit/index.vue index a9f3024..0d79ed7 100644 --- a/src/views/netZoology/netSafetyZcUnit/index.vue +++ b/src/views/netZoology/netSafetyZcUnit/index.vue @@ -1,9 +1,416 @@ +import { mapGetters } from "vuex"; +import { + listNetSafetyZcUnit, + getNetSafetyZcUnit, + delNetSafetyZcUnit, + addNetSafetyZcUnit, + updateNetSafetyZcUnit, + exportNetSafetyZcUnit, +} from "@/api/zongzhi/netZoology/netSafetyZcUnit/index.js"; +export default { + computed: { + ...mapGetters(["townList"]), + }, + name: "NetSafetyZcUnit", + //注释字典 + data() { + return { + tableHeigth: 0, + //查看详情 + infoOpen: false, + //详情标题 + infoTitle: "", + // 遮罩层 + loading: true, + // 导出遮罩层 + exportLoading: false, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + // 网络安全支持单位表格数据 + netSafetyZcUnitList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + name: null, + + linkMan: 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; + listNetSafetyZcUnit(this.queryParams).then((response) => { + this.netSafetyZcUnitList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + // 表单重置 + reset() { + this.form = { + id: null, + + areaId: null, + + name: null, - + linkMan: null, + + phoneNum: null, + + createId: null, + + createBy: null, + + createTime: null, + + updateId: null, + + updateBy: null, + + updateTime: null, + + remark: 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; + getNetSafetyZcUnit(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; + getNetSafetyZcUnit(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) { + updateNetSafetyZcUnit(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + addNetSafetyZcUnit(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 delNetSafetyZcUnit(ids); + }) + .then(() => { + this.getList(); + this.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + const queryParams = this.queryParams; + this.$confirm("是否确认导出所有网络安全支持单位数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.download( + "/zongzhi/netSafetyZcUnit/export", + { + ...this.queryParams, + }, + "网络安全支持单位_" + new Date().getTime() + ".xlsx" + ); + this.exportLoading = false; + }) + .catch(() => {}); + }, + }, +}; + diff --git a/src/views/netZoology/netVolunteer/index.vue b/src/views/netZoology/netVolunteer/index.vue index df7a763..c7fea5b 100644 --- a/src/views/netZoology/netVolunteer/index.vue +++ b/src/views/netZoology/netVolunteer/index.vue @@ -1,9 +1,478 @@ +import { mapGetters } from "vuex"; +import { + listVolunteer, + getVolunteer, + delVolunteer, + addVolunteer, + updateVolunteer, + exportVolunteer, +} from "@/api/zongzhi/netZoology/netVolunteer/index.js"; +export default { + computed: { + ...mapGetters(["townList"]), + }, + name: "Volunteer", + //注释字典 + dicts: ["tc_zyz_type"], + data() { + return { + tableHeigth: 0, + //查看详情 + infoOpen: false, + //详情标题 + infoTitle: "", + // 遮罩层 + loading: true, + // 导出遮罩层 + exportLoading: false, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + // 网络文明自愿者表格数据 + volunteerList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + type: null, + + name: 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; + listVolunteer(this.queryParams).then((response) => { + this.volunteerList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + // 表单重置 + reset() { + this.form = { + id: null, + + areaId: null, - + type: null, + + name: null, + + age: null, + + content: null, + + unit: null, + + duty: null, + + phoneNum: null, + + createId: null, + + createBy: null, + + updateId: null, + + updateBy: null, + + updateTime: null, + + remark: 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; + getVolunteer(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; + getVolunteer(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) { + updateVolunteer(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + addVolunteer(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 delVolunteer(ids); + }) + .then(() => { + this.getList(); + this.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + const queryParams = this.queryParams; + this.$confirm("是否确认导出所有网络文明自愿者数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.download( + "/zongzhi/volunteer/export", + { + ...this.queryParams, + }, + "网络文明自愿者_" + new Date().getTime() + ".xlsx" + ); + this.exportLoading = false; + }) + .catch(() => {}); + }, + }, +}; +