From e4d859d81a2485cf54c0bc8d689974bbb6adf446 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 8 Feb 2023 10:20:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/organization.vue | 139 ++---------------- 1 file changed, 10 insertions(+), 129 deletions(-) diff --git a/src/views/modules/communityParty/organization/organization.vue b/src/views/modules/communityParty/organization/organization.vue index 2646e2eae..315cbfd1f 100644 --- a/src/views/modules/communityParty/organization/organization.vue +++ b/src/views/modules/communityParty/organization/organization.vue @@ -29,10 +29,11 @@ + prop="categoryIds"> - - - + - - + --> - - - - @@ -275,7 +253,6 @@ import orgForm from './orgForm' import orgDetail from './orgDetail' import finishList from './finishList' - import scoreRecord from '../../../components/scoreRecord.vue' import { requestPost } from "@/js/dai/request"; import { mapGetters } from 'vuex' @@ -292,7 +269,6 @@ tableLoading: false, agencyId: '', - unitList: [],//单位list serviceList: [],//服务list typeList: [{label:'实有单位',value:'1'},{label:'社会服务组织',value:'2'},{label:'志愿单位',value:'3'}],//分类list agencyIdArray: [], @@ -308,7 +284,7 @@ formData: { agencyId: '', name: '', - serviceMatter: '', + categoryIds: [], type: '', contact: '', contactMobile: '' @@ -324,18 +300,10 @@ //完成情况 finishDiaTitle: '区域化党建单位完成情况', finishDiaShow: false, - //积分记录 - scoreDiaTitle: '积分记录', - scoreDiaShow: false, - - files: "", - fileName: "", - uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import' - } }, components: { - orgForm, orgDetail, finishList, scoreRecord + orgForm, orgDetail, finishList }, async created () { @@ -445,11 +413,7 @@ this.$refs.ref_form.resetData() this.formShow = false }, - diaClose () { - this.detailShow = false - this.finishDiaShow = false - this.scoreDiaShow = false - }, + diaDetailClose () { console.log(this.$refs.ref_detail) this.$refs.ref_detail.diaDestroy() @@ -472,13 +436,6 @@ this.$refs.ref_finish.initTable(row) }) }, - //积分记录 - handleScore (row) { - this.scoreDiaShow = true - this.$nextTick(() => { - this.$refs.ref_score.initForm(row.id) - }) - }, handleAdd () { this.formTitle = '新增' @@ -644,7 +601,7 @@ this.formData = { agencyId: '', name: '', - serviceMatter: '', + categoryIds: [], type: '', contact: '', contactMobile: '' @@ -678,82 +635,6 @@ }, - // 下载文件 - download (data, fileName) { - if (!data) { - return - } - - var csvData = new Blob([data]) - - if (window.navigator && window.navigator.msSaveOrOpenBlob) { - window.navigator.msSaveOrOpenBlob(csvData, fileName); - } - // for Non-IE (chrome, firefox etc.) - else { - var a = document.createElement('a'); - document.body.appendChild(a); - a.style = 'display: none'; - var url = window.URL.createObjectURL(csvData); - a.href = url; - a.download = fileName; - a.click(); - a.remove(); - window.URL.revokeObjectURL(url); - } - - }, - - // 上传文件之前的钩子 - beforeUpload (file) { - this.files = file; - - const isText = file.type === 'application/vnd.ms-excel' - const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' - - if (!isText && !isTextComputer) { - this.$message.error('请选择正确格式的文件') - return false - } else { - this.fileName = file.name; - return true - } - - }, - // 上传文件个数超过定义的数量 - handleExceed (files, fileList) { - this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) - }, - - async uploadFile () { - this.loading = true - - if (this.fileName == "") { - this.$message.warning('请选择要上传的文件!') - return false - } - - //清空上传列表 - this.$refs['upload'].clearFiles() - - var url = '/heart/icpartyunit/import' - let fileFormData = new FormData(); - fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - - const { data, code, msg } = await requestPost(url, fileFormData) - if (code === 0) { - this.$message({ - type: "success", - message: "导入成功" - }); - - this.loadTable() - } else { - this.$message.error(msg) - } - - - }, handleSizeChange (val) { this.pageSize = val