From 158dba5e1befa29ff2537bd729045f14690e5327 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, 24 Feb 2025 13:04:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E8=B5=84=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auditPages/assetsManagement/program.vue | 158 ++++++++++-- .../assetsManagement/programDialog.js | 200 +++++++++++++++ .../assetsManagement/programDialog.vue | 230 ++++++++++++++++++ 3 files changed, 574 insertions(+), 14 deletions(-) create mode 100644 src/views/auditPages/components/assetsManagement/programDialog.js create mode 100644 src/views/auditPages/components/assetsManagement/programDialog.vue diff --git a/src/views/auditPages/assetsManagement/program.vue b/src/views/auditPages/assetsManagement/program.vue index f93a2c2..3ee46ac 100644 --- a/src/views/auditPages/assetsManagement/program.vue +++ b/src/views/auditPages/assetsManagement/program.vue @@ -14,15 +14,30 @@ /> - 导入 - 导出 - 新增资产 @@ -33,6 +48,7 @@ size="small" :inline="true" label-width="100px" + class="search-form" > - 查看 修改 - 删除 @@ -128,6 +155,50 @@ :limit.sync="formInline.size" @pagination="getList" /> + + + + + + + + + 将文件拖到此处,或点击上传 + + + 仅允许导入xls、xlsx格式文件。 + 下载模板 + + + + @@ -139,8 +210,11 @@ import { deleteMiniPrograms, schema, } from "@/api/auditPagesApi/index"; + +import programDialog from "@/views/auditPages/components/assetsManagement/programDialog.vue"; export default { dicts: ["gzh_state"], + components: { programDialog }, data() { return { // 部门树选项 @@ -162,6 +236,7 @@ export default { tableData: [], loading: false, tabHeader: 585, + // 用户导入参数 upload: { // 是否显示弹出层(用户导入) @@ -185,6 +260,35 @@ export default { this.getDeptTree(); }, methods: { + // 导出 + handleExport() { + this.download( + "/tc/miniPrograms/export", + { + ...this.formInline, + }, + `小程序资产${new Date().getTime()}.xlsx` + ); + }, + //删除 + handleDel(id) { + this.$modal + .confirm('是否确认删除用户编号为"' + id + '"的数据项?') + .then(function () { + return deleteMiniPrograms(id); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + + // 弹窗操作 + handleDialog(id, disabled) { + this.$refs.myDialog.openDialog(id, disabled); + }, + // 修改table背景色 tableRowClassName({ row, rowIndex }) { if (rowIndex % 2 !== 0) { @@ -246,16 +350,42 @@ export default { this.tableData = res.data.records; }); }, + // 导入 + handleImport() { + this.upload.open = true; + }, + /** 下载模板操作 */ + importTemplate() { + this.download( + "/tc/miniPrograms/importTemplate", + {}, + `小程序资产导入模板${new Date().getTime()}.xlsx` + ); + }, + // 文件上传中处理 + handleFileUploadProgress(event, file, fileList) { + this.upload.isUploading = true; + }, + // 文件上传成功处理 + handleFileSuccess(response, file, fileList) { + this.upload.open = false; + this.upload.isUploading = false; + this.$refs.upload.clearFiles(); + this.$alert( + "" + + response.msg + + "", + "导入结果", + { dangerouslyUseHTMLString: true } + ); + this.getList(); + }, + // 提交上传文件 + submitFileForm() { + this.$refs.upload.submit(); + }, }, }; - + diff --git a/src/views/auditPages/components/assetsManagement/programDialog.js b/src/views/auditPages/components/assetsManagement/programDialog.js new file mode 100644 index 0000000..dba0da1 --- /dev/null +++ b/src/views/auditPages/components/assetsManagement/programDialog.js @@ -0,0 +1,200 @@ +import { unitAllList } from "@/api/auditPagesApi/index"; + +const formData = [ + { + key: "ssdw", + label: "所属单位", + type: "autocomplete", + prop: "ssdw", + }, + { + key: "xcxmc", + label: "小程序名称", + type: "input", + prop: "xcxmc", + }, + { + key: "appId", + label: "APPID", + type: "input", + prop: "appId", + }, + + { + key: "rzzt", + label: "认证主体", + type: "input", + prop: "rzzt", + }, + { + key: "tyshxydm", + label: "统一社会信用代码", + type: "input", + prop: "tyshxydm", + }, + { + key: "state", + label: "小程序状态", + type: "select", + prop: "state", + dict: "gzh_state", + }, + { + key: "ysId", + label: "账号原始ID", + type: "input", + prop: "ysId", + }, + { + key: "packState", + label: "小程序包状态", + type: "select", + prop: "packState", + dict: "email_state", + }, + { + key: "rzState", + label: "认证状态", + type: "select", + prop: "rzState", + dict: "gzh_rzzt", + }, + { + key: "rzsj", + label: "认证时间", + type: "date", + prop: "rzsj", + }, + { + key: "rzlx", + label: "认证类型", + type: "select", + prop: "rzlx", + dict: "gzh_rzlx", + }, + + { + key: "icpState", + label: "icp备案状态", + type: "input", + prop: "icpState", + }, + { + key: "ymbmd", + label: "域名白名单", + type: "input", + prop: "ymbmd", + }, + { + key: "fwlm", + label: "服务类目", + type: "input", + prop: "fwlm", + }, + { + key: "hydzyx", + label: "行业电子邮箱", + type: "input", + prop: "hydzyx", + }, + { + key: "sshy", + label: "所属行业", + type: "select", + prop: "sshy", + dict: "app_sshy", + }, + { + key: "zdhy", + label: "重点行业", + type: "select", + prop: "zdhy", + dict: "app_zdhy", + }, + { + key: "xzqh", + label: "行政区划", + type: "select", + prop: "xzqh", + dict: "app_xzqh", + }, + { + key: "xtzrr", + label: "系统责任人", + type: "input", + prop: "xtzrr", + }, + { + key: "xtzrrdh", + label: "系统责任人电话", + type: "input", + prop: "xtzrrdh", + }, + { + key: "xtzrryx", + label: "系统责任人邮箱", + type: "input", + prop: "xtzrryx", + }, + { + key: "xtzrrdz", + label: "系统责任人地址", + type: "input", + prop: "xtzrrdz", + }, + { + key: "yycjAppid", + label: "引入插件(APPID)", + type: "input", + prop: "yycjAppid", + }, + { + key: "yycjKfz", + label: "引用插件(开发者)", + type: "input", + prop: "yycjKfz", + }, + { + key: "xtjj", + label: "系统简介", + type: "textarea", + prop: "xtjj", + }, +]; + +const formRules = { + ssdw: [{ required: true, message: "请填写", trigger: "blur" }], + xcxmc: [{ required: true, message: "请填写", trigger: "blur" }], + appId: [{ required: true, message: "请填写" }], + rzzt: [{ required: true, message: "请填写", trigger: "blur" }], + tyshxydm: [{ required: true, message: "请填写", trigger: "blur" }], + state: [{ required: true, message: "请填写", trigger: "change" }], + + ysId: [{ required: true, message: "请填写", trigger: "blur" }], + + packState: [{ required: true, message: "请填写", trigger: "change" }], + + rzState: [{ required: true, message: "请填写", trigger: "change" }], + + rzsj: [{ required: true, message: "请填写", trigger: "change" }], + + rzlx: [{ required: true, message: "请填写", trigger: "change" }], + icpState: [{ required: true, message: "请填写", trigger: "blur" }], + ymbmd: [{ required: true, message: "请填写", trigger: "blur" }], + fwlm: [{ required: true, message: "请填写", trigger: "blur" }], + hydzyx: [{ required: true, message: "请填写", trigger: "blur" }], + sshy: [{ required: true, message: "请填写", trigger: "change" }], + + zdhy: [{ required: true, message: "请填写", trigger: "change" }], + xzqh: [{ required: true, message: "请填写", trigger: "change" }], + xtzrr: [{ required: true, message: "请填写", trigger: "blur" }], + xtzrrdh: [{ required: true, message: "请填写", trigger: "blur" }], + xtzrryx: [{ required: true, message: "请填写", trigger: "blur" }], + + xtzrrdz: [{ required: true, message: "请填写", trigger: "blur" }], + yycjAppid: [{ required: true, message: "请填写", trigger: "blur" }], + yycjKfz: [{ required: true, message: "请填写", trigger: "blur" }], + xtjj: [{ required: true, message: "请填写", trigger: "blur" }], +}; + +export { formData, formRules }; diff --git a/src/views/auditPages/components/assetsManagement/programDialog.vue b/src/views/auditPages/components/assetsManagement/programDialog.vue new file mode 100644 index 0000000..13a22bb --- /dev/null +++ b/src/views/auditPages/components/assetsManagement/programDialog.vue @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 返 回 + 确 定 + + + + + + +