From 994aa9f59619bd2f38f8049a3d0eb12476f0e63b Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 9 Jun 2022 15:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/communityService/sqzzz/index.vue | 381 ++++++++---------- 1 file changed, 174 insertions(+), 207 deletions(-) diff --git a/src/views/modules/communityService/sqzzz/index.vue b/src/views/modules/communityService/sqzzz/index.vue index aeeb69a5..93edef7a 100644 --- a/src/views/modules/communityService/sqzzz/index.vue +++ b/src/views/modules/communityService/sqzzz/index.vue @@ -1,149 +1,135 @@ @@ -244,7 +209,7 @@ import scoreRecord from "../../../components/scoreRecord.vue"; export default { components: { editForm, scoreRecord }, - data() { + data () { return { openSearch: false, @@ -274,7 +239,7 @@ export default { }; }, computed: { - maxTableHeight() { + maxTableHeight () { return this.$store.state.inIframe ? this.clientHeight - 360 + this.iframeHeigh : this.clientHeight - 360; @@ -292,11 +257,11 @@ export default { } }, }, - mounted() { + mounted () { this.getTableData(); }, methods: { - async handleExportModule() { + async handleExportModule () { let url = "/heart/iccommunityselforganization/import-template-download"; let params = {}; @@ -333,18 +298,18 @@ export default { }); }, // 上传大图标成功 - handleExcelSuccess(res, file) { + handleExcelSuccess (res, file) { if (res.code === 0 && res.msg === "success") { console.log("resss---ppp", res); } else { this.$message.error(res.msg); } }, - handleProgress(event, file, fileList) { + handleProgress (event, file, fileList) { console.log("percentage", file.percentage); }, - beforeExcelUpload(file) { + beforeExcelUpload (file) { console.log("file", file); const isType = file.type === "application/vnd.ms-excel"; const isTypeComputer = @@ -361,7 +326,7 @@ export default { } return fileType && isLt1M; }, - async uploadHttpRequest(file) { + async uploadHttpRequest (file) { this.importLoading = true; this.importBtnTitle = "正在上传中..."; this.$message({ @@ -416,38 +381,38 @@ export default { this.$refs.upload.clearFiles(); }, - handleSizeChange(val) { + handleSizeChange (val) { console.log(`每页 ${val} 条`); this.pageSize = val; window.localStorage.setItem("pageSize", val); this.getTableData(); }, - handleCurrentChange(val) { + handleCurrentChange (val) { console.log(`当前页: ${val}`); this.pageNo = val; this.getTableData(); }, - handleClose() { + handleClose () { this.formShow = false; }, - handleSearch(val) { + handleSearch (val) { console.log(this.fmData); this.pageNo = 1; this.getTableData(); }, - resetForm(formName) { + resetForm (formName) { this.$refs[formName].resetFields(); this.handleSearch(); }, - async handleAdd() { + async handleAdd () { this.formShow = true; await nextTick(); console.log(this.$refs); this.$refs.eleEditForm.initForm("add"); }, - async handleChu() { + async handleChu () { const url = "/heart/iccommunityselforganization/exportcommunityselforganization"; const { pageSize, pageNo, fmData } = this; @@ -483,23 +448,23 @@ export default { }); }, - async handleWatch(rowIndex) { + async handleWatch (rowIndex) { this.formShow = true; await nextTick(); this.$refs.eleEditForm.initForm("detail", this.tableData[rowIndex]); }, - async handleEdit(rowIndex) { + async handleEdit (rowIndex) { this.formShow = true; await nextTick(); this.$refs.eleEditForm.initForm("edit", this.tableData[rowIndex]); }, - handleEditSuccess() { + handleEditSuccess () { this.handleClose(); this.getTableData(); }, - async handleDel(rowData, rowIndex) { + async handleDel (rowData, rowIndex) { console.log(rowData, rowIndex); const url = "/heart/iccommunityselforganization/delcommunityselforganization"; @@ -513,11 +478,12 @@ export default { this.$message.success("删除成功!"); this.getTableData(); } else { - this.$message.success("操作失败!"); + this.$message.error(msg) + // this.$message.success("操作失败!"); } }, - async getTableData() { + async getTableData () { const url = "/heart/iccommunityselforganization/communityselforganizationlist"; const { pageSize, pageNo, fmData } = this; @@ -531,22 +497,23 @@ export default { this.total = data.total || 0; this.tableData = data.list ? data.list.map((item) => { - return item; - }) + return item; + }) : []; } else { + this.$message.error(msg) } }, //积分记录 - handleScore(row) { + handleScore (row) { this.scoreDiaShow = true; this.$nextTick(() => { this.$refs.ref_score.initForm(row.orgId); }); }, - diaClose() { + diaClose () { this.scoreDiaShow = false; }, },