Browse Source

党建活动详情

dev-map-local
jiangyy 3 years ago
parent
commit
044776f6f8
  1. BIN
      src/assets/img/excel.png
  2. BIN
      src/assets/img/image.png
  3. BIN
      src/assets/img/pdf.png
  4. BIN
      src/assets/img/ppt.png
  5. BIN
      src/assets/img/video.png
  6. BIN
      src/assets/img/word.png
  7. 31
      src/views/modules/communityParty/orgActivity/activivityList/activivityList.vue
  8. 386
      src/views/modules/communityParty/orgActivity/activivityList/detailActivity.vue
  9. 131
      src/views/modules/communityParty/orgActivity/activivityList/fileList.vue

BIN
src/assets/img/excel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/img/image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/assets/img/pdf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/img/ppt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/img/video.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/img/word.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

31
src/views/modules/communityParty/orgActivity/activivityList/activivityList.vue

@ -253,6 +253,20 @@
@handleOk="handleOk"
@handleClose="handleClose"></add-activity>
</el-dialog>
<el-dialog v-if="detailShow"
:visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'活动详情'"
width="850px"
top="5vh"
class="dialog-h"
@closed="detailShow = false">
<detail-activity ref="ref_add_form"
:formType="formType"
:icPartyActId="icPartyActId"></detail-activity>
</el-dialog>
<el-dialog v-if="showSchedule"
:visible.sync="showSchedule"
:close-on-click-modal="false"
@ -284,12 +298,13 @@ import { mapGetters } from "vuex";
// import eventInfo from "./cpts/event-info";
import axios from "axios";
import addActivity from "./addActivity";
import detailActivity from "./detailActivity";
import scheduleForm from "./scheduleForm";
import yearplanList from "./yearplanList";
export default {
components: { addActivity, scheduleForm, yearplanList },
components: { addActivity, detailActivity, scheduleForm, yearplanList },
data () {
let endDisabledDate = (time) => {//datareturn
@ -360,6 +375,7 @@ export default {
addDiaTitle: '添加活动计划',
showSchedule: false,
showType: 'list',
detailShow: false,
icPartyActId: '',
selection: []
@ -504,9 +520,16 @@ export default {
async handleDetail (row) {
this.icPartyActId = row.icPartyActId
this.addDiaTitle = '查看活动计划'
this.formType = 'detail'
this.showAdd = true
// this.addDiaTitle = ''
// this.formType = 'detail'
// this.showAdd = true
this.detailShow = true
// this.$nextTick(() => {
// this.$refs.ref_form_detail.initForm(this.tableData[rowIndex])
// })
},
async handleEdit (row) {

386
src/views/modules/communityParty/orgActivity/activivityList/detailActivity.vue

@ -0,0 +1,386 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-3">活动类型</span>
<span>{{ formData.actTypeName }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">举办活动时间</span>
<span>{{ formData.holdTime ?formData.holdTime :'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">活动主题</span>
<span>{{ formData.topic}}</span>
</div>
<div class="info-prop">
<span class="info-title-3">活动地点</span>
<span>{{ formData.address?formData.address:'--'}}</span>
</div>
<div class="info-prop">
<span class="info-title-3">自动发布时间</span>
<span>{{ formData.autoPublicTypeDesc?formData.autoPublicTypeDesc:'--'}}</span>
</div>
<div class="info-prop">
<span class="info-title-3">发布活动党组织</span>
<span>{{formData.publishPartyOrgName?formData.publishPartyOrgName:'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">参加活动党组织</span>
<span>{{ formData.joinNames?formData.joinNames:'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">参加人员</span>
<span>{{ formData.joinUserTypeName?formData.joinUserTypeName:'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">自动通知参加人员</span>
<span>{{ formData.isAutoInform==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">活动介绍</span>
<span>{{ formData.introduce?formData.introduce:'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-3">附件</span>
<file-list v-if="formData.attachmentList.length>0"
:fileList="formData.attachmentList"></file-list>
<span v-else>--</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from '@/js/dai/request'
import fileList from './fileList'
let loading //
export default {
data () {
return {
btnDisable: false,
formData: {},
fileList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
}
},
watch: {
"formData.holdTime": function (val) {
let array = val.split('-')
this.formData.holdYearId = array[0]
this.formData.holdMonthId = array[0] + array[1]
}
},
components: { fileList },
async mounted () {
this.startLoading()
await this.loadInfo()
this.endLoading()
},
methods: {
async loadInfo () {
const url = `/resi/partymember/icPartyAct/act-detail/${this.icPartyActId}`;
// const url = `http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/act-detail/${this.icPartyActId}`;
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = { ...data }
this.formData.publichIdArray = []
if (data.publishOrgPathShow) {
this.formData.publichIdArray = data.publishOrgPathShow.split(':')
} else {
let array = data.publishOrgPath.split(':')
array.forEach(element => {
if (this.isInTree(element)) {
this.formData.publichIdArray.push(element)
}
});
}
this.formData.joinIdArray = []
this.formData.joinNames = ''
data.joinOrgList.forEach(element => {
if (element.joinOrgPathShow) {
this.formData.joinIdArray.push(element.joinOrgPathShow.split(':'))
} else {
let array = element.joinOrgPath.split(':')
let joinIdTemp = []
array.forEach(element => {
if (this.isInTree(element)) {
joinIdTemp.push(element)
}
});
this.formData.joinIdArray.push(joinIdTemp)
}
this.formData.joinNames = this.formData.joinNames + element.joinOrgName + ','
});
console.log('info-joinIdArray', this.formData.joinIdArray)
if (this.formData.joinNames) {
this.formData.joinNames = this.formData.joinNames.substring(0, this.formData.joinNames.length - 1)
}
this.fileList = [... this.formData.attachmentList]
} else {
this.$message.error(msg)
}
},
//id
isInTree (id) {
let inTree = false
const fn = (obj) => {
if (Array.isArray(obj)) {
obj.forEach((item) => {
//
if (item.id === id) {
inTree = true
} else {
}
fn(item.children);
});
}
};
fn(this.publishOptions);
return inTree
},
handlePreview (src) {
console.log(src)
if (src) {
window.open(src);
}
},
beforeUpload (file) {
const array = file.name.split('.')
const extension = array[array.length - 1]
const formatarray = ['jpg', 'png', 'jpeg', 'bmp', 'mp4', 'wma', 'm4a', 'mp3', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
if (formatarray.indexOf(extension) === -1) {
this.$message.error('只支持图片、word、pdf')
return false
}
},
handleFileRemove (file) {
if (file && file.status === "success") {
this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1)
}
},
handleFileSuccess (res, file) {
if (res.code === 0 && res.msg === 'success') {
const array = file.name.split('.')
const fileType = array[array.length - 1]
const picArray = ['jpg', 'png', 'jpeg', 'bmp']
const videoarray = ['mp4', 'wma', 'm4a']
const docArray = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
const mp3Array = ['mp3']
if (picArray.indexOf(fileType) > -1) {
file.format = 'image'
} else if (videoarray.indexOf(fileType) > -1) {
file.format = 'video'
} else if (docArray.indexOf(fileType) > -1) {
file.format = 'doc'
} else if (mp3Array.indexOf(fileType) > -1) {
file.format = 'voice'
}
file.url = res.data.url
file.type = fileType
// file.attachmentName = file.name
// file.attachmentType = file.type
// file.attachmentUrl = file.url
file.format = file.attachmentFormat
this.fileList.push(file)
console.log(this.fileList)
} else this.$message.error(res.msg)
},
//
handleFileDownload (file) {
var a = document.createElement('a');
var event = new MouseEvent('click');
a.download = file.name;
console.log(a)
a.href = file.url;
a.dispatchEvent(event);
},
handleCancle () {
this.resetData()
this.$emit('handleClose')
},
resetData () {
this.formData = {
icPartyActId: '',//
actType: '',// value
holdYearId: '',//yyyy
holdMonthId: '',//yyyyMM
holdTime: '',//yyyy-MM-dd HH:mm:ss
topic: '',//
address: '',//
latitude: '',//
longitude: '',//
autoPublicType: '',//key;
publishPartyOrgId: '',// id
publishPartyOrgName: '',//
publishOrgPid: '',// ID
publishOrgType: '',// 0,1,2,3,4,56
publishOrgPathShow: '',//PUBLISH_PARTY_ORG_ID便
joinUserType: '',//01
isAutoInform: '',// 01
introduce: '',//
joinOrgList: [],
attachmentList: [],
joinIdArray: [],
publichIdArray: []
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
actType: [
{ required: true, message: '活动类型不能为空', trigger: 'change' },
],
holdTime: [
{ required: true, message: '活动举办时间不能为空', trigger: 'change' }
],
topic: [
{ required: true, message: '活动主题不能为空', trigger: 'change' }
],
address: [
{ required: true, message: '活动地点不能为空', trigger: 'change' }
],
autoPublicType: [
{ required: true, message: '自动发布时间不能为空', trigger: 'change' }
],
joinUserType: [
{ required: true, message: '参加人员不能为空', trigger: 'change' }
],
joinIdArray: [
{ required: true, message: '参加活动党组织不能为空', trigger: 'change' }
],
publichIdArray: [
{ required: true, message: '发布活动党组织不能为空', trigger: 'change' }
],
}
},
},
props: {
formType: { // addeditdetail
type: String,
required: ''
},
icPartyActId: {
type: String,
required: ''
},
defaultTime: {
type: String,
required: ''
},
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

131
src/views/modules/communityParty/orgActivity/activivityList/fileList.vue

@ -0,0 +1,131 @@
<template>
<div>
<div class="div-file"
v-for="(item,index) in fileList"
:key="index">
<img v-if="item.type==='xls'||item.type==='xlsx'"
src="@/assets/img/excel.png"
class="image">
<img v-else-if="item.type==='pdf'"
src="@/assets/img/pdf.png"
class="image">
<img v-else-if="item.type==='doc'||item.type==='docx'"
src="@/assets/img/word.png"
class="image">
<img v-else-if="item.type==='mp4'||item.type==='wma'||item.type==='m4a'||item.type==='mp3'"
src="@/assets/img/video.png"
class="image">
<img v-else
src="@/assets/img/image.png"
class="image">
<div @click="watchFile(item.url)"
class="name">{{item.name}}</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from '@/js/dai/request'
let loading //
export default {
data () {
return {
// const formatarray = ['jpg', 'png', 'jpeg', 'bmp', 'mp4', 'wma', 'm4a', 'mp3', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
btnDisable: false,
formData: {},
fileList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
}
},
watch: {
},
components: {},
async mounted () {
this.startLoading()
this.endLoading()
},
methods: {
watchFile (src) {
if (src) {
window.open(src);
}
},
handleCancle () {
this.resetData()
this.$emit('handleClose')
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
props: {
fileList: {
type: String,
default: () => []
},
}
}
</script>
<style lang="scss" scoped >
.div-file {
display: flex;
align-items: center;
padding-bottom: 10px;
.image {
width: 25px;
height: 25px;
}
.name {
margin-left: 10px;
color: rgb(0, 149, 255);
border-bottom: 1px solid rgb(0, 149, 255);
cursor: pointer;
font-size: 14px;
}
}
</style>
Loading…
Cancel
Save