Browse Source

Merge branch 'dev-用户反馈' into dev

dev-用户反馈
mk 3 years ago
parent
commit
19136ac5c8
  1. 139
      src/views/modules/communityParty/organization/organization.vue

139
src/views/modules/communityParty/organization/organization.vue

@ -29,10 +29,11 @@
</el-form-item>
<el-form-item label="服务事项"
prop="serviceMatter">
prop="categoryIds">
<el-select class="item_width_2"
v-model="formData.serviceMatter"
v-model="formData.categoryIds"
placeholder="请选择"
multiple
size="small"
clearable>
<el-option v-for="item in serviceList"
@ -158,19 +159,7 @@
label="联系电话"
width="120">
</el-table-column>
<!-- <el-table-column prop="satisfaction"
header-align="center"
align="center"
label="群众满意度"
width="100">
</el-table-column> -->
<!-- <el-table-column prop="score"
header-align="center"
align="center"
label="积分"
width="80">
</el-table-column> -->
<el-table-column prop="remark"
header-align="center"
align="center"
@ -244,7 +233,7 @@
</el-dialog>
<!-- 完成情况 -->
<el-dialog :visible.sync="finishDiaShow"
<!-- <el-dialog :visible.sync="finishDiaShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="finishDiaTitle"
@ -253,19 +242,8 @@
class="dialog-h"
@closed="diaClose">
<finish-list ref="ref_finish"></finish-list>
</el-dialog>
</el-dialog> -->
<!-- 积分记录 -->
<el-dialog :visible.sync="scoreDiaShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="scoreDiaTitle"
width="1050px"
top="5vh"
@closed="diaClose">
<score-record ref="ref_score"
:serviceType="'party_unit'"></score-record>
</el-dialog>
</div>
</template>
@ -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);//filenamefiletest.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

Loading…
Cancel
Save