From d393c2098a352ea951fb4ce21fb0027b5a438941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com> Date: Mon, 14 Aug 2023 16:20:12 +0800 Subject: [PATCH] +1 --- src/api/zongzhi/netManage/qlzx/index.js | 53 ++ src/api/zongzhi/netManage/supervise/index.js | 53 ++ src/api/zongzhi/netManage/workItem/index.js | 53 ++ src/views/netManage/qlzx/index.vue | 505 +++++++++++++++++- src/views/netManage/supervise/index.vue | 468 +++++++++++++++- src/views/netManage/workItem/index.vue | 528 ++++++++++++++++++- 6 files changed, 1648 insertions(+), 12 deletions(-) diff --git a/src/api/zongzhi/netManage/qlzx/index.js b/src/api/zongzhi/netManage/qlzx/index.js index e69de29..7872633 100644 --- a/src/api/zongzhi/netManage/qlzx/index.js +++ b/src/api/zongzhi/netManage/qlzx/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询清朗专项列表 +export function listZhuanxiang(query) { + return request({ + url: "/zongzhi/zhuanxiang/list", + method: "get", + params: query, + }); +} + +// 查询清朗专项详细 +export function getZhuanxiang(id) { + return request({ + url: "/zongzhi/zhuanxiang/" + id, + method: "get", + }); +} + +// 新增清朗专项 +export function addZhuanxiang(data) { + return request({ + url: "/zongzhi/zhuanxiang", + method: "post", + data: data, + }); +} + +// 修改清朗专项 +export function updateZhuanxiang(data) { + return request({ + url: "/zongzhi/zhuanxiang", + method: "put", + data: data, + }); +} + +// 删除清朗专项 +export function delZhuanxiang(id) { + return request({ + url: "/zongzhi/zhuanxiang/" + id, + method: "delete", + }); +} + +// 导出清朗专项 +export function exportZhuanxiang(data) { + return request({ + url: "/zongzhi/zhuanxiang/export", + method: "post", + data, + }); +} diff --git a/src/api/zongzhi/netManage/supervise/index.js b/src/api/zongzhi/netManage/supervise/index.js index e69de29..18bdf50 100644 --- a/src/api/zongzhi/netManage/supervise/index.js +++ b/src/api/zongzhi/netManage/supervise/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询重点领域监管列表 +export function listDomain(query) { + return request({ + url: "/zongzhi/domain/list", + method: "get", + params: query, + }); +} + +// 查询重点领域监管详细 +export function getDomain(id) { + return request({ + url: "/zongzhi/domain/" + id, + method: "get", + }); +} + +// 新增重点领域监管 +export function addDomain(data) { + return request({ + url: "/zongzhi/domain", + method: "post", + data: data, + }); +} + +// 修改重点领域监管 +export function updateDomain(data) { + return request({ + url: "/zongzhi/domain", + method: "put", + data: data, + }); +} + +// 删除重点领域监管 +export function delDomain(id) { + return request({ + url: "/zongzhi/domain/" + id, + method: "delete", + }); +} + +// 导出重点领域监管 +export function exportDomain(data) { + return request({ + url: "/zongzhi/domain/export", + method: "post", + data, + }); +} diff --git a/src/api/zongzhi/netManage/workItem/index.js b/src/api/zongzhi/netManage/workItem/index.js index e69de29..51ad356 100644 --- a/src/api/zongzhi/netManage/workItem/index.js +++ b/src/api/zongzhi/netManage/workItem/index.js @@ -0,0 +1,53 @@ +import request from "@/utils/request"; + +// 查询重点工作项目列表 +export function listWork(query) { + return request({ + url: "/zongzhi/work/list", + method: "get", + params: query, + }); +} + +// 查询重点工作项目详细 +export function getWork(id) { + return request({ + url: "/zongzhi/work/" + id, + method: "get", + }); +} + +// 新增重点工作项目 +export function addWork(data) { + return request({ + url: "/zongzhi/work", + method: "post", + data: data, + }); +} + +// 修改重点工作项目 +export function updateWork(data) { + return request({ + url: "/zongzhi/work", + method: "put", + data: data, + }); +} + +// 删除重点工作项目 +export function delWork(id) { + return request({ + url: "/zongzhi/work/" + id, + method: "delete", + }); +} + +// 导出重点工作项目 +export function exportWork(data) { + return request({ + url: "/zongzhi/work/export", + method: "post", + data, + }); +} diff --git a/src/views/netManage/qlzx/index.vue b/src/views/netManage/qlzx/index.vue index 87f8805..60c9cb3 100644 --- a/src/views/netManage/qlzx/index.vue +++ b/src/views/netManage/qlzx/index.vue @@ -1,9 +1,506 @@ +import { mapGetters } from "vuex"; +import { + listZhuanxiang, + getZhuanxiang, + delZhuanxiang, + addZhuanxiang, + updateZhuanxiang, + exportZhuanxiang, +} from "@/api/zongzhi/netManage/qlzx/index.js"; +export default { + computed: { + ...mapGetters(["townList"]), + }, + name: "Zhuanxiang", + //注释字典 + dicts: ["tc_chuli_type"], + data() { + return { + tableHeigth: 0, + //查看详情 + infoOpen: false, + //详情标题 + infoTitle: "", + // 遮罩层 + loading: true, + // 导出遮罩层 + exportLoading: false, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + // 清朗专项表格数据 + zhuanxiangList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + zhuanxiangTitle: null, + + zhuanxiangTime: null, + + zhuanxiangType: 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; + listZhuanxiang(this.queryParams).then((response) => { + this.zhuanxiangList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + // 表单重置 + reset() { + this.form = { + id: null, + + areaId: null, - + zhuanxiangTitle: null, + + zhuanxiangTime: null, + + zhuanxiangContent: null, + + zhuanxiangImg: null, + + zhuanxiangType: 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; + getZhuanxiang(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; + getZhuanxiang(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) { + updateZhuanxiang(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + addZhuanxiang(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 delZhuanxiang(ids); + }) + .then(() => { + this.getList(); + this.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + const queryParams = this.queryParams; + this.$confirm("是否确认导出所有清朗专项数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.download( + "/zongzhi/zhuanxiang/export", + { + ...this.queryParams, + }, + "清朗专项_" + new Date().getTime() + ".xlsx" + ); + this.exportLoading = false; + }) + .catch(() => {}); + }, + }, +}; + diff --git a/src/views/netManage/supervise/index.vue b/src/views/netManage/supervise/index.vue index d8e4de9..3720756 100644 --- a/src/views/netManage/supervise/index.vue +++ b/src/views/netManage/supervise/index.vue @@ -1,9 +1,469 @@ +import { mapGetters } from "vuex"; +import { + listDomain, + getDomain, + delDomain, + addDomain, + updateDomain, + exportDomain, +} from "@/api/zongzhi/netManage/supervise/index.js"; +export default { + computed: { + ...mapGetters(["townList"]), + }, + name: "Domain", + //注释字典 + dicts: ["tc_enter_type"], + data() { + return { + tableHeigth: 0, + //查看详情 + infoOpen: false, + //详情标题 + infoTitle: "", + // 遮罩层 + loading: true, + // 导出遮罩层 + exportLoading: false, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + // 重点领域监管表格数据 + domainList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + enterpriseType: 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; + listDomain(this.queryParams).then((response) => { + this.domainList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + // 表单重置 + reset() { + this.form = { + id: null, + + areaId: null, + + enterpriseType: null, - + zdjgContent: null, + + weifaXingwei: null, + + dep: null, + + zhuyaoYiju: 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; + getDomain(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; + getDomain(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) { + updateDomain(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + addDomain(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 delDomain(ids); + }) + .then(() => { + this.getList(); + this.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + const queryParams = this.queryParams; + this.$confirm("是否确认导出所有重点领域监管数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.download( + "/zongzhi/domain/export", + { + ...this.queryParams, + }, + "重点领域监管_" + new Date().getTime() + ".xlsx" + ); + this.exportLoading = false; + }) + .catch(() => {}); + }, + }, +}; + diff --git a/src/views/netManage/workItem/index.vue b/src/views/netManage/workItem/index.vue index 53a8bfa..fce246e 100644 --- a/src/views/netManage/workItem/index.vue +++ b/src/views/netManage/workItem/index.vue @@ -1,9 +1,529 @@ +import { mapGetters } from "vuex"; +import { + listWork, + getWork, + delWork, + addWork, + updateWork, + exportWork, +} from "@/api/zongzhi/netManage/workItem/index.js"; +export default { + computed: { + ...mapGetters(["townList"]), + }, + name: "Work", + //注释字典 + dicts: ["tc_item_type"], + data() { + return { + tableHeigth: 0, + //查看详情 + infoOpen: false, + //详情标题 + infoTitle: "", + // 遮罩层 + loading: true, + // 导出遮罩层 + exportLoading: false, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + // 重点工作项目表格数据 + workList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + projectName: null, + + projectType: null, + + projectLinkMan: null, + + phoneNum: null, + + linkManDuty: 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; + listWork(this.queryParams).then((response) => { + this.workList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + // 表单重置 + reset() { + this.form = { + id: null, - + areaId: null, + + unitName: null, + + projectName: null, + + projectContent: null, + + projectType: null, + + projectLinkMan: null, + + phoneNum: null, + + linkManDuty: 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; + getWork(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; + getWork(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) { + updateWork(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + addWork(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 delWork(ids); + }) + .then(() => { + this.getList(); + this.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + const queryParams = this.queryParams; + this.$confirm("是否确认导出所有重点工作项目数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.download( + "/zongzhi/work/export", + { + ...this.queryParams, + }, + "重点工作项目_" + new Date().getTime() + ".xlsx" + ); + this.exportLoading = false; + }) + .catch(() => {}); + }, + }, +}; +