Browse Source

活动列表

dev-用户反馈
jiangyy 3 years ago
parent
commit
ee90b13a47
  1. 24
      src/views/modules/communityParty/orgActivity/activivityList/activivityList.vue
  2. 62
      src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue
  3. 428
      src/views/modules/communityParty/orgActivity/activivityList/addRule.vue
  4. 95
      src/views/modules/communityParty/orgActivity/activivityList/scheduleForm.vue
  5. 154
      src/views/modules/communityParty/orgActivity/activivityList/yearplanList.vue

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

@ -440,8 +440,8 @@ export default {
},
//
async getCategrayList () {
// const url = "/resi/partymember/icPartyAct/acttypelist"
const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/acttypelist"
const url = "/resi/partymember/icPartyAct/acttypelist"
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/acttypelist"
let params = {}
@ -486,8 +486,8 @@ export default {
async publishActivity () {
// const url = `/resi/partymember/icPartyAct/publish/${this.icPartyActId}`;
const url = `http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/publish/${this.icPartyActId}`;
const url = `/resi/partymember/icPartyAct/publish/${this.icPartyActId}`;
// const url = `http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/publish/${this.icPartyActId}`;
const { data, code, msg } = await requestPost(url, {});
@ -550,8 +550,8 @@ export default {
async cancelActivity () {
// const url = "/resi/partymember/icPartyAct/del";
const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/del";
const url = "/resi/partymember/icPartyAct/del";
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/del";
let params = []
params.push(this.icPartyActId)
@ -606,8 +606,8 @@ export default {
params.push(element.icPartyActId)
});
// const url = "/resi/partymember/icPartyAct/del";
const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/del";
const url = "/resi/partymember/icPartyAct/del";
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/del";
const { data, code, msg } = await requestPost(url, params)
@ -621,8 +621,8 @@ export default {
async getTableData () {
this.tableLoading = true
// const url = "/resi/partymember/icPartyAct/page-list";
const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/page-list";
const url = "/resi/partymember/icPartyAct/page-list";
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/page-list";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
@ -658,8 +658,8 @@ export default {
},
async handleExport () {
// const url = "/resi/partymember/icPartyAct/export-act";
const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/export-act";
const url = "/resi/partymember/icPartyAct/export-act";
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/export-act";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,

62
src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue

@ -15,7 +15,7 @@
placeholder="请选择"
clearable
class="item_width_1">
<el-option v-for="(item,index) in categrayArray"
<el-option v-for="(item) in categrayArray"
:key="item.value"
:label="item.label"
:value="item.value">
@ -237,11 +237,11 @@ export default {
joinArray: [//
{
valule: '0',
value: '0',
label: '全体党员'
},
{
valule: '1',
value: '1',
label: '支部委员'
},
],
@ -286,7 +286,7 @@ export default {
if (obj) {
this.formData.publishPartyOrgId = obj.id//id
this.formData.publishPartyOrgName = obj.partyOrgName//
this.formData.publishOrgPid = obj.orgPids//ID
this.formData.publishOrgPid = obj.pid//ID
this.formData.publishOrgType = obj.partyOrgType// 0,1,2,3,4,56
this.formData.publishOrgPath = value.join(',')//PUBLISH_PARTY_ORG_ID便
} else {
@ -300,7 +300,8 @@ export default {
handleChangeJoinOrg (value) {
console.log('value', value)
this.formData.serviceScope = []
console.log('joinIdArray', this.joinIdArray)
this.formData.joinOrgList = []
let selArray = this.$refs["myCascader_join"].getCheckedNodes()
console.log('selArray', selArray)
@ -308,12 +309,12 @@ export default {
selArray.forEach((element, index) => {
let obj = {
joinOrgId: element.id,
orgType: element.partyOrgType,
pid: element.pid,
joinOrgPath: value[index].join(','),
joinOrgId: element.data.id,
orgType: element.data.partyOrgType,
pid: element.data.pid,
joinOrgPath: element.path.join(','),
}
this.formData.serviceScope.push(obj)
this.formData.joinOrgList.push(obj)
});
},
@ -326,14 +327,11 @@ export default {
}, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
// app.util.validateRule(messageObj)
this.btnDisable = false
} else {
this.addActivity()
}
})
@ -353,8 +351,8 @@ export default {
this.formData.icPartyActId = ''
}
console.log(this.formData)
// const url = '/resi/partymember/icPartyAct/addOrUpdate'
const url = 'http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/addOrUpdate'
const url = '/resi/partymember/icPartyAct/addOrUpdate'
// const url = 'http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/addOrUpdate'
let params = {
...this.formData
@ -363,17 +361,17 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success('操作成功')
this.resetData()
this.$emit('handleOk')
// this.$message.success('')
// this.resetData()
// this.$emit('handleOk')
} else {
this.$message.error(msg)
}
},
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}`;
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 = {}
@ -391,8 +389,8 @@ export default {
//
async getCategrayList () {
// const url = "/resi/partymember/icPartyAct/acttypelist"
const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/acttypelist"
const url = "/resi/partymember/icPartyAct/acttypelist"
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/acttypelist"
let params = {}
@ -507,21 +505,23 @@ export default {
const mp3Array = ['mp3']
if (picArray.indexOf(fileType) > -1) {
file.attachmentFormat = 'image'
file.format = 'image'
} else if (videoarray.indexOf(fileType) > -1) {
file.attachmentFormat = 'video'
file.format = 'video'
} else if (docArray.indexOf(fileType) > -1) {
file.attachmentFormat = 'doc'
file.format = 'doc'
} else if (mp3Array.indexOf(fileType) > -1) {
file.attachmentFormat = 'voice'
file.format = 'voice'
}
file.url = res.data.url
file.type = fileType
file.attachmentName = file.name
file.attachmentType = file.type
file.attachmentUrl = file.url
// file.attachmentName = file.name
// file.attachmentType = file.type
// file.attachmentUrl = file.url
file.format = file.attachmentFormat
this.fileList.push(file)
console.log(this.fileList)
@ -617,7 +617,6 @@ export default {
},
props: {
formType: { // addeditdetail
type: String,
required: ''
@ -627,7 +626,6 @@ export default {
required: ''
},
}
}
</script>

428
src/views/modules/communityParty/orgActivity/activivityList/addRule.vue

@ -27,7 +27,7 @@
</div>
<div class="div_search">
<span>活动举办频次</span>
<span style="margin-left:30px">每季度一次</span>
<span style="margin-left:30px">{{selActType.frequencyDesc?selActType.frequencyDesc:'--'}}</span>
</div>
</div>
@ -47,14 +47,14 @@
width="50">
</el-table-column>
<el-table-column prop="reviewTime"
<el-table-column prop="holdTime"
header-align="center"
align="center"
label="举办活动时间"
width="200">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.reviewTime"
<el-date-picker v-model="scope.row.holdTime"
style="width: 175px"
size="small"
format="yyyy-MM-dd hh:mm"
@ -83,14 +83,14 @@
</template>
</el-table-column>
<el-table-column prop="theme"
<el-table-column prop="topic"
header-align="center"
align="center"
label="活动主题"
width="220">
<template slot-scope="scope">
<el-input v-model="scope.row.theme"
<el-input v-model="scope.row.topic"
style="width: 195px"
size="small"
placeholder="输入主题">
@ -103,25 +103,43 @@
<el-table-column prop="scopeId"
header-align="center"
align="center"
label="参加活动党组织"
label="发布活动党组织"
width="220">
<template slot-scope="scope">
<el-cascader style="width: 195px"
<el-cascader class="item_width_1"
ref="myCascader"
v-model="scope.row.scopeIdArray"
size="small"
v-model="scope.row.publichIdArray"
:key="iscascaderShow"
:options="orgOptions"
:props="optionProps"
:options="publishOptions"
:props="publichOptionProps"
:show-all-levels="false"
@change="handleChangeScope"></el-cascader>
@change="handleChangeScope(scope.$index)"></el-cascader>
</template>
</el-table-column>
<el-table-column prop="scopeId"
header-align="center"
align="center"
label="参加活动党组织"
width="220">
<template slot-scope="scope">
<el-cascader class="item_width_1"
ref="myCascader_join"
v-model="scope.row.joinIdArray"
:key="joinIscascaderShow"
:options="joinOptions"
:props="joinOptionProps"
:show-all-levels="false"
@change="handleChangeJoinOrg(scope.$index)"></el-cascader>
<el-table-column prop="joinPerson"
</template>
</el-table-column>
<el-table-column prop="joinUserType"
header-align="center"
align="center"
label="参加人员"
@ -131,7 +149,7 @@
<el-select style="width: 115px"
size="small"
v-model="scope.row.joinPerson"
v-model="scope.row.joinUserType"
placeholder="请选择"
clearable>
<el-option v-for="item in joinArray"
@ -143,7 +161,7 @@
</template>
</el-table-column>
<el-table-column prop="autoTime"
<el-table-column prop="autoPublicType"
header-align="center"
align="center"
label="自动发布时间"
@ -152,7 +170,7 @@
<template slot-scope="scope">
<el-select style="width: 135px"
v-model="scope.row.autoTime"
v-model="scope.row.autoPublicType"
size="small"
placeholder="请选择"
filterable
@ -167,7 +185,7 @@
</template>
</el-table-column>
<el-table-column prop="autoNotice"
<el-table-column prop="isAutoInformShow"
header-align="center"
align="center"
label="自动通知"
@ -177,7 +195,7 @@
<el-checkbox :label="'是'"
size="small"
v-model="scope.row.autoNotice"></el-checkbox>
v-model="scope.row.isAutoInformShow"></el-checkbox>
</template>
</el-table-column>
@ -202,7 +220,7 @@
</div>
<div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button @click="handleCancle">确定</el-button>
<el-button @click="handleComfirm">确定</el-button>
</div>
</div>
@ -212,7 +230,7 @@
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { requestPost, requestGet } from '@/js/dai/request'
let loading //
export default {
@ -221,155 +239,151 @@ export default {
tableLoading: false,
tableData: [],
actTypeArray: [
{
value: '1',
label: '支部党员大会',
fre: 4
},
{
value: '2',
label: '支部委员会',
fre: 12
}
],
actTypeArray: [],
selActType: {},
actType: "",
joinArray: [//
{
valule: 'all',
valule: '0',
label: '全体党员'
},
{
valule: 'branch',
label: '支部委员'
},
],
autoTimeArray: [
{
valule: '3',
label: '活动开始前3天'
},
{
valule: '5',
label: '活动开始前5天'
},
{
valule: '7',
label: '活动开始前7天'
},
{
valule: '1',
label: '活动开始前1天'
label: '支部委员'
},
],
orgOptions: [],
autoTimeArray: [],
publishOptions: [],
publichIdArray: [],
iscascaderShow: 0,
publichOptionProps: {
multiple: false,
value: 'id',
label: 'partyOrgName',
children: 'children',
checkStrictly: true
},
optionProps: {
joinOptions: [],
joinIdArray: [],
joinIscascaderShow: 0,
joinOptionProps: {
multiple: true,
value: 'id',
label: 'partyOrgName',
children: 'children',
checkStrictly: true
checkStrictly: false
},
defaultPublishParty: {}
}
},
components: {},
mounted () {
async mounted () {
await this.getOrgTreeList()
await this.getJoinOrgTreeList()
await this.getCategrayList()
await this.getAutoTimeArray()
await this.getDefaultPublishParty()
},
methods: {
handleClickActType (index) {
handleChangeScope (index) {
let onePublish = this.publishOptions[index]
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
onePublish.publishPartyOrgId = obj.id//id
onePublish.publishPartyOrgName = obj.partyOrgName//
onePublish.publishOrgPid = obj.pid//ID
onePublish.publishOrgType = obj.partyOrgType// 0,1,2,3,4,56
onePublish.publishOrgPath = onePublish.publichIdArray.join(',')//PUBLISH_PARTY_ORG_ID便
} else {
onePublish.publishPartyOrgId = ''
onePublish.publishPartyOrgName = ''
onePublish.publishOrgPid = ''
onePublish.publishOrgType = ''
onePublish.publishOrgPath = ''
}
},
async initTable () {
await this.getOrgTreeList()
handleChangeJoinOrg (index) {
let oneJoin = this.joinOptions[index]
console.log('value', value)
console.log('joinIdArray', this.joinIdArray)
oneJoin.joinOrgList = []
let selArray = this.$refs["myCascader_join"].getCheckedNodes()
// await this.loadTable()
console.log('selArray', selArray)
},
selArray.forEach((element, index) => {
handleAdd () {
let obj = {
isNew: true,//
reviewTime: '',
address: '',
theme: '',
scopeIdArray: [],
joinPerson: '',
autoTime: '',
autoNotice: true,
let obj = {
joinOrgId: element.data.id,
orgType: element.data.partyOrgType,
pid: element.data.pid,
joinOrgPath: element.path.join(','),
}
oneJoin.joinOrgList.push(obj)
});
}
this.tableData.push(obj)
},
async getOrgTreeList () {
const url = '/resi/partymember/icPartyOrg/getSearchTreelist'
let params = {
customerId: localStorage.getItem('customerId'),
agencyId: localStorage.getItem('agencyId')
};
const { data, code, msg } = await requestGet(url, params);
console.log('data-orgparty----o', data)
if (code === 0) {
this.orgOptions = data
async handleClickActType (index) {
this.selActType = { ...this.actTypeArray[index] }
} else {
//
await this.getTableData()
//
if (this.tableData.length === 0) {
for (let i = 0; i < this.selActType.yearCount; i++) {
this.handleAdd()
}
}
},
//form
async loadTable () {
},
async getTableData () {
this.tableLoading = true
const url = '/gov/org/placepatrolreviewrecord/getlist'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolreviewrecord/getlist'
// const url = "/icPartyAct/yearSearch";
const url = "http://yapi.elinkservice.cn/mock/245/icPartyAct/yearSearch";
let params = {
placePatrolRecordId: this.placePatrolRecordId
yearId: this.yearId
}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
this.tableLoading = false
if (code === 0) {
let tempArray = []
if (data.list && data.list.length > 0) {
data.list.forEach(item => {
item.isEdit = false
item.isNew = false
let arrayInspectors = item.inspectors.split(',')
item.inspectorArray = [...arrayInspectors]
data.forEach(item => {
if (item.type === actType) {
tempArray = []
let arrayReviewTime = item.reviewTime.split(' ')
item.reviewTime = arrayReviewTime[0]
});
item.activityList.forEach(actItem => {
actItem.joinOrgsShow = actItem.joinOrgs.join(',')
tempArray.push(actItem)
});
}
});
this.tableData = tempArray
this.tableData = [...data.list]
} else {
this.tableData = []
}
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
async handleComfirm (row, tableIndex) {
let valiMsg = this.validata(row)
async handleComfirm () {
let valiMsg = this.validata()
if (valiMsg) {
this.$message({
type: 'warning',
@ -377,16 +391,15 @@ export default {
})
return false
}
this.addReview(row, tableIndex)
console.log(this.tableData)
// this.addReview(row, tableIndex)
},
async addReview (row, tableIndex) {
let url = "/gov/org/placepatrolreviewrecord/add"
if (row.placePatrolReviewRecordId) {
url = "/gov/org/placepatrolreviewrecord/edit"
}
let params = JSON.parse(JSON.stringify(row))
params.inspectors = params.inspectorArray.join(',')
@ -409,20 +422,27 @@ export default {
},
validata (row) {
validata () {
let message = ''
if (row.reviewTime === '') {
message = message + '复查时间不能为空;'
}
if (row.placePatrolTeamId === '') {
message = message + '分队名称不能为空;'
}
if (row.inspectorArray.length === 0) {
message = message + '检查人员不能为空;'
}
if (row.reviewResult === '') {
message = message + '复查结论不能为空;'
console.log(this.tableData)
for (let i = 0; i < this.tableData.length; i++) {
let oneData = this.tableData[i]
if (oneData.holdTime) {
let array = oneData.holdTime.split('-')
oneData.holdYearId = array[0]
oneData.holdMonthId = array[0] + array[1]
}
oneData.isAutoInform = oneData.isAutoInformShow ? '1' : '0'
if (oneData.actType === '' || oneData.holdTime || oneData.topic || oneData.address || oneData.publishPartyOrgId
|| oneData.joinUserType || oneData.joinIdArray.length === 0) {
message = '第' + (i + 1) + "行填写不完整,请先填写完整!"
break;
}
}
return message
},
@ -447,34 +467,148 @@ export default {
});
},
async deleteRecord (row, tableIndex) {
handleCancle () {
this.$emit('dialogCancle')
},
handleAdd () {
let obj = {
icPartyActId: '',//
actType: '',// value
holdYearId: '',//yyyy
holdMonthId: '',//yyyyMM
holdTime: '',//yyyy-MM-dd HH:mm:ss
topic: '',//
address: '',//
latitude: '',//
longitude: '',//
autoPublicType: '',//key;
publishPartyOrgId: this.defaultPublishParty.defaultPartyOrgId,// id
publishPartyOrgName: this.defaultPublishParty.defaultPartyOrgName,//
publishOrgPid: this.defaultPublishParty.defaultPartyOrgPid,// ID
publishOrgType: this.defaultPublishParty.orgType,// 0,1,2,3,4,56
publishOrgPath: this.defaultPublishParty.defaultPartyOrgPath,//PUBLISH_PARTY_ORG_ID便
joinUserType: '',//01
isAutoInform: '',// 01
introduce: '',//
joinOrgList: [],
publichIdArray: this.defaultPublishParty.defaultPartyOrgPath.split(','),
joinIdArray: [],
isAutoInformShow: true
}
this.tableData.push(obj)
},
async getOrgTreeList () {
const url = '/resi/partymember/icPartyOrg/getSearchTreelist'
let params = {
customerId: localStorage.getItem('customerId'),
agencyId: localStorage.getItem('agencyId')
};
const { data, code, msg } = await requestGet(url, params);
console.log('data-orgparty----o', data)
if (code === 0) {
this.publishOptions = data
this.joinOptions = data
this.changeKey(this.joinOptions)
} else {
}
},
const url = "/gov/org/placepatrolreviewrecord/del"
changeKey (arr) {
for (var i = 0; i < arr.length; i++) {
arr[i].value = arr[i].userId
arr[i].label = arr[i].userName
if (arr[i].children.length) {
this.changeKey(arr[i].children)
} else {
delete arr[i].children
}
}
},
//
async getJoinOrgTreeList () {
const url = '/resi/partymember/icPartyOrg/getOrgTreeHaveGroup'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceOrg/selectlist'
let params = {
placePatrolReviewRecordId: row.placePatrolReviewRecordId
agencyId: localStorage.getItem('agencyId')
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.$message({
// type: "success",
// message: ""
// });
// this.joinOptions = data
} else {
this.$message.error(msg)
}
},
this.tableData.splice(tableIndex, 1);
//
async getCategrayList () {
// const url = "/resi/partymember/icPartyAct/acttypelist"
const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/acttypelist"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.actTypeArray = data
} else {
this.$message.error(msg)
}
},
handleCancle () {
this.$emit('dialogCancle')
//
async getAutoTimeArray () {
const url = "/sys/dict/data/dictlist"
let params = {
dictType: 'icpartyact_auto_publish_time'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.autoTimeArray = data
} else {
this.$message.error(msg)
}
},
//
async getDefaultPublishParty () {
const url = "/resi/partymember/icPartyOrg/defaultpartyorg"
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyOrg/defaultpartyorg"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.defaultPublishParty = data
this.defaultPublishParty.defaultPartyOrgPath.replaceAll(':', ',')
} else {
this.$message.error(msg)
}
},
//
startLoading () {
loading = Loading.service({
@ -503,11 +637,11 @@ export default {
},
props: {
yearId: {
type: String,
required: true
},
resultList: {
type: Array,
default: []
}
}
}
</script>

95
src/views/modules/communityParty/orgActivity/activivityList/scheduleForm.vue

@ -9,20 +9,21 @@
class="div_form">
<el-form-item label="活动标题"
prop="principalName"
prop="title"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入活动标题"
v-model="formData.principalName">
v-model="formData.title">
</el-input>
</el-form-item>
<el-form-item label="提醒时间"
style="display: block"
prop="activityTime"
prop="remindTime"
label-width="150px">
<el-date-picker v-model="formData.activityTime"
<el-date-picker v-model="formData.remindTime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择时间">
</el-date-picker>
@ -30,8 +31,8 @@
<el-form-item label="是否公开"
label-width="150px"
prop="serviceCategoryKey">
<el-select v-model="formData.serviceCategoryKey"
prop="isPublic">
<el-select v-model="formData.isPublic"
placeholder="请选择"
clearable
class="item_width_1">
@ -87,27 +88,22 @@ export default {
formData: {
serviceCategoryKey: '',//id
serviceProjectId: '',//id
serviceOrgId: '',//id
serviceScope: [],//
principalName: '',//()
principalContact: '',//
serviceTimeStart: '',//yyyy-MM-dd
serviceTimeEnd: '',//yyyy-MM-dd
title: '',//
remindTime: '',//
isPublic: '',//
remark: '',//
scheduleId: '',
},
gongkaiArray: [
{
valule: '1',
valule: '0',
label: '仅自己可见'
},
{
valule: '2',
valule: '1',
label: '组织内其他人可见'
},
@ -141,7 +137,7 @@ export default {
}, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
this.btnDisable = false
} else {
@ -158,10 +154,8 @@ export default {
console.log(this.formData)
const url = '/heart/icServiceProject/service/initiate'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate'
const url = '/icSchedule/addOrEdit'
// const url = 'http://yapi.elinkservice.cn/mock/245/icSchedule/addOrEdit'
let params = {
...this.formData
@ -190,15 +184,11 @@ export default {
resetData () {
this.formData = {
serviceCategoryKey: '',//id
serviceProjectId: '',//id
serviceOrgId: '',//id
serviceScope: [],//
principalName: '',//()
principalContact: '',//
serviceTimeStart: '',//yyyy-MM-dd
serviceTimeEnd: '',//yyyy-MM-dd
title: '',//
remindTime: '',//
isPublic: '',//
remark: '',//
scheduleId: '',
}
@ -224,50 +214,13 @@ export default {
dataRule () {
return {
serviceCategoryKey: [
{ required: true, message: '服务类别不能为空', trigger: 'blur' },
title: [
{ required: true, message: '日程标题不能为空', trigger: 'blur' },
],
serviceProjectId: [
{ required: true, message: '服务项目不能为空', trigger: 'blur' }
remindTime: [
{ required: true, message: '提醒时间不能为空', trigger: 'blur' }
],
serviceOrgId: [
{ required: true, message: '服务组织不能为空', trigger: 'blur' }
],
serviceTimeStart: [
{ required: true, message: '服务时间不能为空', trigger: 'blur' }
],
serviceScope: [
{ required: true, message: '服务范围不能为空', trigger: 'blur' }
],
}
},
feedbackDataRule () {
return {
serviceProjectName: [
{ required: true, message: '服务项目不能为空', trigger: 'blur' },
],
serviceGoal: [
{ required: true, message: '服务目标不能为空', trigger: 'blur' }
],
serviceEffect: [
{ required: true, message: '服务效果不能为空', trigger: 'blur' }
],
servicePeopleNumber: [
{ required: true, message: '服务人数不能为空', trigger: 'blur' }
],
serviceStatus: [
{ required: true, message: '服务状态不能为空', trigger: 'blur' }
],
satisfaction: [
{ required: true, message: '满意度不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '地址不能为空', trigger: 'blur' }
]
}
},

154
src/views/modules/communityParty/orgActivity/activivityList/yearplanList.vue

@ -10,7 +10,7 @@
<el-form-item label="活动类型"
prop="serviceCategoryKey">
<el-select v-model="formData.year"
<el-select v-model="formData.yearId"
placeholder="请选择"
size="small"
clearable
@ -47,65 +47,67 @@
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:span-method="objectSpanMethod"
:height="maxTableHeight">
<el-table-column label="序号"
<!-- <el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
width="50" /> -->
<el-table-column prop="serviceCategoryName"
<el-table-column prop="actType"
align="center"
width="100"
width="120"
label="活动类别"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="serviceProjectName"
<el-table-column prop="frequency"
label="举办频次"
width="120"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="serviceOrgName"
<el-table-column prop="holdTime"
align="center"
width="100"
width="150"
label="活动时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="servicePeopleNumber"
<el-table-column prop="address"
align="center"
width="110"
min-width="200"
label="活动地点"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="servicePeopleNumber"
<el-table-column prop="topic"
align="center"
width="110"
min-width="200"
label="活动主题"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="servicePeopleNumber"
<el-table-column prop="joinOrgsShow"
align="center"
width="80"
min-width="200"
label="参加活动党支部"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="servicePeopleNumber"
<el-table-column prop="joinTypeValue"
align="center"
width="80"
label="参加人员"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="servicePeopleNumber"
<el-table-column prop="autoPublicTime"
align="center"
width="80"
width="120"
label="自动发布时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="servicePeopleNumber"
<el-table-column prop="isAutoInformValue"
align="center"
width="80"
label="自动通知"
@ -151,6 +153,7 @@
class="dialog-h"
@closed="showAdd = false">
<add-rule ref="ref_add_form"
:yearId="formData.yearId"
@handleOk="handleOk"
@handleClose="handleClose"></add-rule>
</el-dialog>
@ -190,13 +193,14 @@ export default {
agencyId: '',
tableData: [],
categrayArray: [],
originalData: [],
rowArray: [],//
yearArray: [],
formData: {
year: '',
yearId: '',
},
serviceRecordId: '',
serviceProjectName: '',
activityId: '',
showAdd: false,
@ -220,14 +224,14 @@ export default {
},
mounted () {
console.log(this.$store.state)
this.user = this.$store.state.user
this.agencyId = this.user.agencyId
this.yearArray = []
let now = new Date()
let year = now.getFullYear()
this.formData.year = year
this.formData.yearId = year + ''
for (let i = 0; i < 5; i++) {
let obj = {
value: (year - i) + '',
@ -241,6 +245,48 @@ export default {
this.getTableData();
},
methods: {
flitterData (arr) {
let spanOneArr = []
let concatOne = 0
arr.forEach((item, index) => {
if (index === 0) {
spanOneArr.push(1)
} else {
if (item.actType === arr[index - 1].actType) { //
spanOneArr[concatOne] += 1
spanOneArr.push(0)
} else {
spanOneArr.push(1)
concatOne = index
};
}
});
return {
one: spanOneArr,
}
},
objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) { //
const _row = (this.flitterData(this.tableData).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
};
}
if (columnIndex === 1) { //
const _row = (this.flitterData(this.tableData).one)[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
};
}
},
handleCancle () {
this.$emit('handleClose')
},
@ -253,27 +299,21 @@ export default {
this.getTableData();
},
async handleAdd () {
this.formType = 'add'
this.showAdd = true;
},
},
async handleEdit (row) {
this.formType = 'edit'
this.showEdit = true
},
handleClose () {
this.serviceRecordId = ""
this.formType = ''
this.showAdd = false
@ -291,9 +331,9 @@ export default {
async handleDel (row) {
this.serviceRecordId = row.serviceRecordId
this.activityId = row.activityId
this.$confirm("确认取消活动?", "提示", {
this.$confirm("确认删除活动?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
@ -315,13 +355,14 @@ export default {
async cancelActivity () {
const url = `/heart/icServiceProject/service/cancel/${this.serviceRecordId}`;
// const url = '/resi/partymember/icPartyAct/del';
const url = 'http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/del';
let params = [this.activityId]
const { data, code, msg } = await requestPost(url, {});
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("取消成功!");
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
@ -330,33 +371,34 @@ export default {
async getTableData () {
this.tableLoading = true
const url = "/heart/icServiceProject/service/recordList";
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/recordList";
// const url = "/icPartyAct/yearSearch";
const url = "http://yapi.elinkservice.cn/mock/245/icPartyAct/yearSearch";
const { data, code, msg } = await requestPost(url, this.formData);
this.tableLoading = false
if (code === 0) {
let tempArray = []
this.rowArray = []
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
this.originalData = data.concat();
this.tableData.forEach(item => {
if (item.operationType === '2') {
item.operationTypeShow = '已转需求'
}
if (item.operationType === '1') {
item.operationTypeShow = '已立项'
}
if (item.operationType === '0') {
item.operationTypeShow = '已回复'
}
data.forEach(item => {
item.activityList.forEach(actItem => {
actItem.actType = item.type
actItem.frequency = item.frequency
actItem.joinOrgsShow = actItem.joinOrgs.join(',')
tempArray.push(actItem)
});
this.rowArray.push(item.activityList.length)
});
this.tableData = tempArray
} else {
this.$message.error(msg);
}

Loading…
Cancel
Save