From d9bc87c2a1152f07c5b03dda2db23b35df5ab443 Mon Sep 17 00:00:00 2001 From: TiaStars Date: Sat, 21 Oct 2023 16:50:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=A8=A1=E6=9D=BF=E5=8F=8A?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/tcZz/networkEcology/bjsjwp.js | 12 + src/api/tcZz/networkEcology/wpyrwwcl.js | 12 + src/assets/styles/diythem.scss | 7 + src/views/components/importDialog/index.vue | 120 +++++++++ src/views/tcZz/netManage/bzhan/index.vue | 122 ++++++---- src/views/tcZz/netManage/dy/index.vue | 120 +++++---- src/views/tcZz/netManage/gzdt/index.vue | 215 +++++++++++------ src/views/tcZz/netManage/jbmap/index.vue | 175 ++++++++------ src/views/tcZz/netManage/jbsjndfltj/index.vue | 86 +++---- src/views/tcZz/netManage/qlzxxddt/index.vue | 190 ++++++++++----- src/views/tcZz/netManage/qlzxxdsjtj/index.vue | 103 +++----- src/views/tcZz/netManage/ttsum/index.vue | 213 +++++++--------- src/views/tcZz/netManage/vx/index.vue | 167 +++++-------- src/views/tcZz/netManage/wb/index.vue | 177 +++++--------- src/views/tcZz/netManage/wz/index.vue | 130 +++++----- src/views/tcZz/netManage/ytlc/index.vue | 228 ++++++++---------- src/views/tcZz/netManage/zdgzxm/index.vue | 199 ++++++--------- src/views/tcZz/netManage/zdlyjg/index.vue | 122 +++++----- src/views/tcZz/netManage/zdqyml/index.vue | 155 ++++++------ src/views/tcZz/networkEcology/aqg/index.vue | 133 +++++++++- .../tcZz/networkEcology/bjsjwp/index.vue | 43 +++- src/views/tcZz/networkEcology/fb/index.vue | 119 ++++++++- .../tcZz/networkEcology/wlaqzcqy/index.vue | 113 ++++++++- src/views/tcZz/networkEcology/wldv/index.vue | 190 +++++++++++---- .../tcZz/networkEcology/wlmqfzr/index.vue | 122 +++++++++- .../tcZz/networkEcology/wlwmzyz/index.vue | 146 +++++++++-- .../tcZz/networkEcology/wpwzlyqk/index.vue | 125 +++++++++- src/views/tcZz/networkEcology/wpy/index.vue | 149 ++++++++++-- .../tcZz/networkEcology/wpyrwwcl/index.vue | 15 +- 29 files changed, 2335 insertions(+), 1373 deletions(-) create mode 100644 src/views/components/importDialog/index.vue diff --git a/src/api/tcZz/networkEcology/bjsjwp.js b/src/api/tcZz/networkEcology/bjsjwp.js index 63772e9..e2762c7 100644 --- a/src/api/tcZz/networkEcology/bjsjwp.js +++ b/src/api/tcZz/networkEcology/bjsjwp.js @@ -42,3 +42,15 @@ export function delBjsjwp(id) { method: 'delete' }) } + +// 通用导入 +export function importExcel(data) { + return request({ + url: '/tcZz/networkEcology/bjsjwp/common/importExcel', + method: 'post', + data, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) +} \ No newline at end of file diff --git a/src/api/tcZz/networkEcology/wpyrwwcl.js b/src/api/tcZz/networkEcology/wpyrwwcl.js index 3a1ae3f..4e4ec59 100644 --- a/src/api/tcZz/networkEcology/wpyrwwcl.js +++ b/src/api/tcZz/networkEcology/wpyrwwcl.js @@ -42,3 +42,15 @@ export function delWpyrwwcl(id) { method: 'delete' }) } + +// 通用导入 +export function importExcel(data) { + return request({ + url: '/tcZz/networkEcology/wpyrwwcl/common/importExcel', + method: 'post', + data, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) +} \ No newline at end of file diff --git a/src/assets/styles/diythem.scss b/src/assets/styles/diythem.scss index 57f3636..c56541e 100644 --- a/src/assets/styles/diythem.scss +++ b/src/assets/styles/diythem.scss @@ -63,6 +63,13 @@ } //分页 } +input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { + -webkit-appearance: none; +} + +input[type="number"] { + -moz-appearance: textfield; +} // 弹窗 .dialog-box { .el-dialog__header { diff --git a/src/views/components/importDialog/index.vue b/src/views/components/importDialog/index.vue new file mode 100644 index 0000000..2074ed1 --- /dev/null +++ b/src/views/components/importDialog/index.vue @@ -0,0 +1,120 @@ + + + \ No newline at end of file diff --git a/src/views/tcZz/netManage/bzhan/index.vue b/src/views/tcZz/netManage/bzhan/index.vue index 64e40dd..72f9897 100644 --- a/src/views/tcZz/netManage/bzhan/index.vue +++ b/src/views/tcZz/netManage/bzhan/index.vue @@ -1,7 +1,7 @@ - \ No newline at end of file diff --git a/src/views/tcZz/netManage/jbmap/index.vue b/src/views/tcZz/netManage/jbmap/index.vue index 1a2b268..20e5ea6 100644 --- a/src/views/tcZz/netManage/jbmap/index.vue +++ b/src/views/tcZz/netManage/jbmap/index.vue @@ -1,7 +1,7 @@ + \ No newline at end of file diff --git a/src/views/tcZz/netManage/qlzxxdsjtj/index.vue b/src/views/tcZz/netManage/qlzxxdsjtj/index.vue index bf0e3ec..187385e 100644 --- a/src/views/tcZz/netManage/qlzxxdsjtj/index.vue +++ b/src/views/tcZz/netManage/qlzxxdsjtj/index.vue @@ -1,7 +1,7 @@ @@ -308,11 +337,15 @@ import { addFb, updateFb, exportFb, + updateIsStatus, + importExcel } from "@/api/tcZz/networkEcology/fb"; +import importDialog from "@/views/components/importDialog/index.vue" export default { name: "Fb", //注释字典 dicts: ["tc_sjbd", "tc_area", "tc_start"], + components: { importDialog }, data() { return { tableHeigth: 0, @@ -377,7 +410,27 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + areaId:[ + { required: true, message: '请选择区域', trigger: 'blur' }, + ], + type:[ + { required: true, message: '请选择类型', trigger: 'blur' }, + ], + title:[ + { required: true, message: '请输入标题', trigger: 'blur' }, + ], + source:[ + { required: true, message: '请输入来源', trigger: 'blur' }, + ], + dateTime:[ + { required: true, message: '请选择发布时间', trigger: 'blur' }, + ], + url:[ + { required: true, message: '请输入网址', trigger: 'blur' }, + ], + }, + fileList:[], }; }, created() { @@ -422,7 +475,7 @@ export default { areaId: null, - isStatus: null, + isStatus: 1, type: null, @@ -464,6 +517,30 @@ export default { this.single = selection.length !== 1; this.multiple = !selection.length; }, + //批量启用 + enable(row) { + this.isStatusFuc(row, 1); + }, + //批量禁用 + banned(row) { + this.isStatusFuc(row, 2); + }, + isStatusFuc(row, e) { + const ids = row.id || this.ids.join(","); + const src = e == 1 ? "启动" : "禁用"; + this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(function () { + return updateIsStatus({ ids: ids, isStatus: e }); + }) + .then(() => { + this.getList(e); + }) + .catch(() => {}); + }, /**查看按钮操作 */ handleInfo(row) { this.reset(); @@ -547,6 +624,28 @@ export default { }) .catch(() => {}); }, + /** 导入按钮操作 */ + exportFile(e) { + this.$refs.importdialog.open() + // let downloadLoadingInstance = Loading.service({ + // text: "正在导入数据,请稍候", + // spinner: "el-icon-loading", + // background: "rgba(0, 0, 0, 0.7)", + // }); + // let a = new FormData(); + // a.append("file", e.file); + // importExcel(a) + // .then((res) => { + // downloadLoadingInstance.close(); + // this.$model.msgSuccess("导入成功"); + // this.getList(); + // this.$refs.upload.clearFiles(); + // }) + // .catch(() => { + // downloadLoadingInstance.close(); + // this.$model.msgError("导入失败"); + // }); + }, }, }; diff --git a/src/views/tcZz/networkEcology/wlaqzcqy/index.vue b/src/views/tcZz/networkEcology/wlaqzcqy/index.vue index 0ad30a7..7df8250 100644 --- a/src/views/tcZz/networkEcology/wlaqzcqy/index.vue +++ b/src/views/tcZz/networkEcology/wlaqzcqy/index.vue @@ -6,7 +6,6 @@ ref="queryForm" :inline="true" v-show="showSearch" - label-width="auto" > 导出 + + 导入 + + 启用 + 禁用 - - + - + :label="parseInt(dict.value)" + >{{dict.label}} + @@ -219,7 +241,8 @@ - + + @@ -280,11 +309,15 @@ import { addWlaqzcqy, updateWlaqzcqy, exportWlaqzcqy, + updateIsStatus, + importExcel } from "@/api/tcZz/networkEcology/wlaqzcqy"; +import importDialog from "@/views/components/importDialog/index.vue" export default { name: "Wlaqzcqy", //注释字典 dicts: ["tc_area", "tc_start",], + components: { importDialog }, data() { return { tableHeigth: 0, @@ -345,7 +378,21 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + areaId:[ + { required: true, message: '请选择区域', trigger: 'blur' }, + ], + zzUnit:[ + { required: true, message: '请输入支撑单位', trigger: 'blur' }, + ], + linkMan:[ + { required: true, message: '请输入联系人', trigger: 'blur' }, + ], + linkTel:[ + { required: true, message: '请输入联系方式', trigger: 'blur' }, + ], + }, + fileList:[], }; }, created() { @@ -390,7 +437,7 @@ export default { areaId: null, - isStatus: null, + isStatus: 1, zzUnit: null, @@ -428,6 +475,30 @@ export default { this.single = selection.length !== 1; this.multiple = !selection.length; }, + //批量启用 + enable(row) { + this.isStatusFuc(row, 1); + }, + //批量禁用 + banned(row) { + this.isStatusFuc(row, 2); + }, + isStatusFuc(row, e) { + const ids = row.id || this.ids.join(","); + const src = e == 1 ? "启动" : "禁用"; + this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(function () { + return updateIsStatus({ ids: ids, isStatus: e }); + }) + .then(() => { + this.getList(e); + }) + .catch(() => {}); + }, /**查看按钮操作 */ handleInfo(row) { this.reset(); @@ -511,6 +582,28 @@ export default { }) .catch(() => {}); }, + /** 导入按钮操作 */ + exportFile(e) { + this.$refs.importdialog.open() + // let downloadLoadingInstance = Loading.service({ + // text: "正在导入数据,请稍候", + // spinner: "el-icon-loading", + // background: "rgba(0, 0, 0, 0.7)", + // }); + // let a = new FormData(); + // a.append("file", e.file); + // importExcel(a) + // .then((res) => { + // downloadLoadingInstance.close(); + // this.$model.msgSuccess("导入成功"); + // this.getList(); + // this.$refs.upload.clearFiles(); + // }) + // .catch(() => { + // downloadLoadingInstance.close(); + // this.$model.msgError("导入失败"); + // }); + }, }, }; diff --git a/src/views/tcZz/networkEcology/wldv/index.vue b/src/views/tcZz/networkEcology/wldv/index.vue index be28b58..7e5278f 100644 --- a/src/views/tcZz/networkEcology/wldv/index.vue +++ b/src/views/tcZz/networkEcology/wldv/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/tcZz/networkEcology/wlwmzyz/index.vue b/src/views/tcZz/networkEcology/wlwmzyz/index.vue index 828d13f..12ee86c 100644 --- a/src/views/tcZz/networkEcology/wlwmzyz/index.vue +++ b/src/views/tcZz/networkEcology/wlwmzyz/index.vue @@ -6,7 +6,6 @@ ref="queryForm" :inline="true" v-show="showSearch" - label-width="auto" > 导出 + + 导入 + + 启用 + 禁用 - - + {{dict.label}} + + + + + @@ -216,10 +248,7 @@ - - - - + @@ -228,20 +257,15 @@ - + - - - - + + + - + + @@ -314,11 +344,15 @@ import { addWlwmzyz, updateWlwmzyz, exportWlwmzyz, + updateIsStatus, + importExcel } from "@/api/tcZz/networkEcology/wlwmzyz"; +import importDialog from "@/views/components/importDialog/index.vue" export default { name: "Wlwmzyz", //注释字典 dicts: ["tc_wlwmzyzlx", "tc_area", "tc_start"], + components: { importDialog }, data() { return { tableHeigth: 0, @@ -387,7 +421,33 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + areaId:[ + { required: true, message: '请选择区域', trigger: 'blur' }, + ], + type:[ + { required: true, message: '请选择志愿者类型', trigger: 'blur' }, + ], + name:[ + { required: true, message: '请输入姓名', trigger: 'blur' }, + ], + age:[ + { required: true, message: '请输入年龄', trigger: 'blur' }, + ], + unit:[ + { required: true, message: '请输入单位', trigger: 'blur' }, + ], + duty:[ + { required: true, message: '请输入职务', trigger: 'blur' }, + ], + linkTel:[ + { required: true, message: '请输入联系电话', trigger: 'blur' }, + ], + activityContent:[ + { required: true, message: '请输入活动内容', trigger: 'blur' }, + ], + }, + fileList:[], }; }, created() { @@ -432,7 +492,7 @@ export default { areaId: null, - isStatus: null, + isStatus: 1, name: null, @@ -478,6 +538,30 @@ export default { this.single = selection.length !== 1; this.multiple = !selection.length; }, + //批量启用 + enable(row) { + this.isStatusFuc(row, 1); + }, + //批量禁用 + banned(row) { + this.isStatusFuc(row, 2); + }, + isStatusFuc(row, e) { + const ids = row.id || this.ids.join(","); + const src = e == 1 ? "启动" : "禁用"; + this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(function () { + return updateIsStatus({ ids: ids, isStatus: e }); + }) + .then(() => { + this.getList(e); + }) + .catch(() => {}); + }, /**查看按钮操作 */ handleInfo(row) { this.reset(); @@ -561,6 +645,28 @@ export default { }) .catch(() => {}); }, + /** 导入按钮操作 */ + exportFile(e) { + this.$refs.importdialog.open() + // let downloadLoadingInstance = Loading.service({ + // text: "正在导入数据,请稍候", + // spinner: "el-icon-loading", + // background: "rgba(0, 0, 0, 0.7)", + // }); + // let a = new FormData(); + // a.append("file", e.file); + // importExcel(a) + // .then((res) => { + // downloadLoadingInstance.close(); + // this.$model.msgSuccess("导入成功"); + // this.getList(); + // this.$refs.upload.clearFiles(); + // }) + // .catch(() => { + // downloadLoadingInstance.close(); + // this.$model.msgError("导入失败"); + // }); + }, }, }; diff --git a/src/views/tcZz/networkEcology/wpwzlyqk/index.vue b/src/views/tcZz/networkEcology/wpwzlyqk/index.vue index ff9415c..16516d9 100644 --- a/src/views/tcZz/networkEcology/wpwzlyqk/index.vue +++ b/src/views/tcZz/networkEcology/wpwzlyqk/index.vue @@ -6,7 +6,6 @@ ref="queryForm" :inline="true" v-show="showSearch" - label-width="auto" > - + + + 导出 + + 导入 + + 启用 + 禁用 - + @@ -286,11 +323,15 @@ import { addWpwzlyqk, updateWpwzlyqk, exportWpwzlyqk, + updateIsStatus, + importExcel } from "@/api/tcZz/networkEcology/wpwzlyqk"; +import importDialog from "@/views/components/importDialog/index.vue" export default { name: "Wpwzlyqk", //注释字典 dicts: ["tc_wpwzlylx", "tc_area", "tc_start"], + components: { importDialog }, data() { return { tableHeigth: 0, @@ -351,7 +392,21 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + areaId:[ + { required: true, message: '请选择区域', trigger: 'blur' }, + ], + type:[ + { required: true, message: '请选择类型', trigger: 'blur' }, + ], + title:[ + { required: true, message: '请输入标题', trigger: 'blur' }, + ], + url:[ + { required: true, message: '请输入网址', trigger: 'blur' }, + ], + }, + fileList:[], }; }, created() { @@ -396,7 +451,7 @@ export default { areaId: null, - isStatus: null, + isStatus: 1, type: null, @@ -434,6 +489,30 @@ export default { this.single = selection.length !== 1; this.multiple = !selection.length; }, + //批量启用 + enable(row) { + this.isStatusFuc(row, 1); + }, + //批量禁用 + banned(row) { + this.isStatusFuc(row, 2); + }, + isStatusFuc(row, e) { + const ids = row.id || this.ids.join(","); + const src = e == 1 ? "启动" : "禁用"; + this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(function () { + return updateIsStatus({ ids: ids, isStatus: e }); + }) + .then(() => { + this.getList(e); + }) + .catch(() => {}); + }, /**查看按钮操作 */ handleInfo(row) { this.reset(); @@ -517,6 +596,28 @@ export default { }) .catch(() => {}); }, + /** 导入按钮操作 */ + exportFile(e) { + this.$refs.importdialog.open() + // let downloadLoadingInstance = Loading.service({ + // text: "正在导入数据,请稍候", + // spinner: "el-icon-loading", + // background: "rgba(0, 0, 0, 0.7)", + // }); + // let a = new FormData(); + // a.append("file", e.file); + // importExcel(a) + // .then((res) => { + // downloadLoadingInstance.close(); + // this.$model.msgSuccess("导入成功"); + // this.getList(); + // this.$refs.upload.clearFiles(); + // }) + // .catch(() => { + // downloadLoadingInstance.close(); + // this.$model.msgError("导入失败"); + // }); + }, }, }; diff --git a/src/views/tcZz/networkEcology/wpy/index.vue b/src/views/tcZz/networkEcology/wpy/index.vue index f474477..e10d9d3 100644 --- a/src/views/tcZz/networkEcology/wpy/index.vue +++ b/src/views/tcZz/networkEcology/wpy/index.vue @@ -6,7 +6,6 @@ ref="queryForm" :inline="true" v-show="showSearch" - label-width="auto" > 导出 + + 导入 + + 启用 + 禁用 - + + {{dict.label}} + + + + - + @@ -232,23 +264,14 @@ - + - - - - - - + - + + @@ -329,11 +358,15 @@ import { addWpy, updateWpy, exportWpy, + updateIsStatus, + importExcel } from "@/api/tcZz/networkEcology/wpy"; +import importDialog from "@/views/components/importDialog/index.vue" export default { name: "Wpy", //注释字典 dicts: ["tc_area", "tc_start", "tc_wpylx"], + components: { importDialog }, data() { return { tableHeigth: 0, @@ -406,7 +439,39 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + areaId:[ + { required: true, message: '请选择区域', trigger: 'blur' }, + ], + name:[ + { required: true, message: '请输入姓名', trigger: 'blur' }, + ], + sex:[ + { required: true, message: '请输入性别', trigger: 'blur' }, + ], + age:[ + { required: true, message: '请输入年龄', trigger: 'blur' }, + ], + nationality:[ + { required: true, message: '请输入民族', trigger: 'blur' }, + ], + type:[ + { required: true, message: '请选择网评员类型', trigger: 'blur' }, + ], + zzmm:[ + { required: true, message: '请输入政治面貌', trigger: 'blur' }, + ], + unit:[ + { required: true, message: '请输入单位', trigger: 'blur' }, + ], + phoneNumber:[ + { required: true, message: '请输入移动电话', trigger: 'blur' }, + ], + vxNumber:[ + { required: true, message: '请输入微信号', trigger: 'blur' }, + ], + }, + fileList:[], }; }, created() { @@ -451,7 +516,7 @@ export default { areaId: null, - isStatus: null, + isStatus: 1, name: null, @@ -501,6 +566,30 @@ export default { this.single = selection.length !== 1; this.multiple = !selection.length; }, + //批量启用 + enable(row) { + this.isStatusFuc(row, 1); + }, + //批量禁用 + banned(row) { + this.isStatusFuc(row, 2); + }, + isStatusFuc(row, e) { + const ids = row.id || this.ids.join(","); + const src = e == 1 ? "启动" : "禁用"; + this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(function () { + return updateIsStatus({ ids: ids, isStatus: e }); + }) + .then(() => { + this.getList(e); + }) + .catch(() => {}); + }, /**查看按钮操作 */ handleInfo(row) { this.reset(); @@ -584,6 +673,28 @@ export default { }) .catch(() => {}); }, + /** 导入按钮操作 */ + exportFile(e) { + this.$refs.importdialog.open() + // let downloadLoadingInstance = Loading.service({ + // text: "正在导入数据,请稍候", + // spinner: "el-icon-loading", + // background: "rgba(0, 0, 0, 0.7)", + // }); + // let a = new FormData(); + // a.append("file", e.file); + // importExcel(a) + // .then((res) => { + // downloadLoadingInstance.close(); + // this.$model.msgSuccess("导入成功"); + // this.getList(); + // this.$refs.upload.clearFiles(); + // }) + // .catch(() => { + // downloadLoadingInstance.close(); + // this.$model.msgError("导入失败"); + // }); + }, }, }; diff --git a/src/views/tcZz/networkEcology/wpyrwwcl/index.vue b/src/views/tcZz/networkEcology/wpyrwwcl/index.vue index 79acb2e..b139be7 100644 --- a/src/views/tcZz/networkEcology/wpyrwwcl/index.vue +++ b/src/views/tcZz/networkEcology/wpyrwwcl/index.vue @@ -151,10 +151,11 @@ - + - + +