Browse Source

志愿者等等接口

feature
是小王呀\24601 1 year ago
parent
commit
2fd4ee3343
  1. 2
      src/views/modules/commonDemand/commonDemand.vue
  2. 53
      src/views/modules/home/index.vue
  3. 96
      src/views/modules/informationArchive/elderlyArchives/cpts/add-old.vue
  4. 691
      src/views/modules/informationArchive/elderlyArchives/cpts/info-old.vue
  5. 127
      src/views/modules/informationArchive/elderlyArchives/cpts/pairup-volunteers.vue
  6. 218
      src/views/modules/informationArchive/elderlyArchives/index.vue
  7. 108
      src/views/modules/informationArchive/serviceTeamManagement/cpts/service-info.vue
  8. 122
      src/views/modules/informationArchive/serviceTeamManagement/cpts/service-team.vue
  9. 163
      src/views/modules/informationArchive/serviceTeamManagement/cpts/volunteers-list.vue
  10. 978
      src/views/modules/informationArchive/serviceTeamManagement/index.vue
  11. 108
      src/views/modules/informationArchive/volunteerProfile/cpts/service-info.vue
  12. 122
      src/views/modules/informationArchive/volunteerProfile/cpts/service-team.vue
  13. 163
      src/views/modules/informationArchive/volunteerProfile/cpts/volunteers-list.vue
  14. 981
      src/views/modules/informationArchive/volunteerProfile/index.vue
  15. 177
      src/views/modules/servicePointsManagement/cpts/service-add.vue
  16. 312
      src/views/modules/servicePointsManagement/index.vue

2
src/views/modules/commonDemand/commonDemand.vue

@ -13,7 +13,7 @@
</div>
</div>
<div class="m-table-item">
<el-table ref="ref_table"
:data="tableData"

53
src/views/modules/home/index.vue

@ -5,8 +5,8 @@
<div class="m-box m-search">
<div class="wrap">
<div class="tabs">
<div :class="{ 'z-on': searchData.type == 'jumin' }" @click="searchDataTab('jumin')">搜老人</div>
<div :class="{ 'z-on': searchData.type == 'fangwu' }" @click="searchDataTab('fangwu')">搜志愿者</div>
<div :class="{ 'z-on': searchData.type == 'oldPeople' }" @click="searchDataTab('oldPeople')">搜老人</div>
<div :class="{ 'z-on': searchData.type == 'volunteer' }" @click="searchDataTab('volunteer')">搜志愿者</div>
</div>
<div class="search">
@ -265,14 +265,14 @@ export default {
orgOptions: [],
searchStatus: "ini", //ing over
searchData: {
type: "jumin",
type: "oldPeople",
searchKey: "",
},
showAll: false,
typePlaceholder: {
jumin: "输入志愿者真实姓名、身份证号、手机号查询志愿者信息",
fangwu: "输入老人真实姓名、身份证号、手机号查询志愿者信息",
volunteer: "输入志愿者真实姓名、身份证号、手机号查询志愿者信息",
oldPeople: "输入老人真实姓名、身份证号、手机号查询志愿者信息",
},
resiCategory: {
@ -355,17 +355,17 @@ export default {
//
async getlistServiceGroups() {
const url = "/actual/base/resiCategory/intelligentPredictioncategoryCountList";
let params = {
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
if (data) {
this.teams = data;
// let params = {
// };
// const { data, code, msg } = await requestGet(url, params);
// if (code === 0) {
// if (data) {
// this.teams = data;
}
} else {
this.$message.error(msg);
}
// }
// } else {
// this.$message.error(msg);
// }
},
handleChangeAgency(val) {
@ -496,6 +496,8 @@ export default {
}
},
searchDataTab(str) {
console.log(str,"撒旦反抗势力扩大");
this.searchData.type = str;
},
handleClickCategory(item) {
@ -590,22 +592,19 @@ export default {
});
},
//
jumpToHouse(e) {
this.$router.push({
path: "/main/base-community-community",
query: {
param1: e,
}
});
},
toSearchPage(type, searchKey) {
this.$router.push({
path: "/main/shequ-chaxun",
});
localStorage.setItem("homeSearchType", type);
localStorage.setItem("homeSearchKey", searchKey);
console.log(type, searchKey,"所有");
if (type==='volunteer ') {
}else{
this.$router.push({
path: "/main/informationArchive-elderlyArchives-index",
});
}
},
handleClickSearchBtn(str) {

96
src/views/modules/informationArchive/elderlyArchives/cpts/add-old.vue

@ -51,7 +51,7 @@
<el-col :span="12">
<el-form-item label="出生日期" prop="birthday" label-width="100px">
<el-date-picker class="u-item-width-normal" v-model="formData.birthday" type="date"
value-format="yyyy-MM-dd" value="yyyy-MM-dd" placeholder="选择日期">
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
@ -233,8 +233,8 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="所需志愿者" prop="albumName" label-width="100px" class="label-wrap">
<el-input-number v-model="formData.num" @change="handleChange" :min="0" :max="10"
<el-form-item label="所需志愿者" prop="volunteers" label-width="100px" class="label-wrap">
<el-input-number v-model="formData.volunteers" @change="handleChange" :min="0" :max="10"
label="描述文字"></el-input-number>
</el-form-item>
</el-col>
@ -262,13 +262,14 @@
</el-col>
<el-col :span="8">
<el-form-item label="填报人电话" prop="informantPhone" label-width="100px">
<el-input v-model.trim="formData.albumName" size="small" clearable placeholder="请输入"
<el-input v-model.trim="formData.informantPhone" size="small" clearable placeholder="请输入"
class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="填报时间" prop="reportTime" label-width="100px">
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="date"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
@ -373,8 +374,8 @@
formType:"add",
agencyIdArray: [],
formData: {
num:1,
volunteerOrgId: '',
volunteers:1,
volunteerOrgId: '12234',
orgIdPath: '',
headImg: '',
name: '',
@ -534,88 +535,20 @@
this.$message.error(res.msg);
}
},
beforeExcelUpload(file) {
console.log("file", file);
// const isType = file.type === "application/vnd.ms-excel";
// const isTypeComputer =
// file.type ===
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
// const fileType = isType || isTypeComputer;
// const isLt1M = file.size / 1024 / 1024 < 10;
// if (!fileType) {
// this.$message.error("xls/xlsx");
// }
// if (!isLt1M) {
// this.$message.error(" 10MB!");
// }
// return fileType && isLt1M;
},
handleChangeAgency(val){
this.formData.sharedScope=""
if (val.length > 0) {
this.formData.sharedScope = val.toString();
} else {
this.formData.sharedScope = ""; //
}
},
async findNodeByValue(option, value) {
obj.subOrgList.forEach(value => {
console.log(value, "dsfjkhfsdl");
this.agencyIdArray.push(value.orgId)
console.log(this.agencyIdArray, "Sdjksdflkj");
// const node = this.findNodeByValue(this.orgOptions, value);
// if (node && node.children) {
// findChildren([node]);
// }
});
},
filter(node, keyword) {
return node.data.agencyName.includes(keyword)
},
removedImg() {
this.formData.coverPicture = ''
},
onChangeFileList(e) {
this.startLoading()
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
fileType: '0',
fileUrl: item.response.data.url
})) : []; // efileList
if (e.length > 0) {
this.formData.coverPicture = e[0].response.data.url;
} else {
this.formData.coverPicture = '';
}
this.endLoading()
},
async initForm(type, activityId) {
async initForm(row, type) {
this.startLoading()
this.formType = type
if (type === 'edit') {
this.formData = activityId
this.agencyIdArray=activityId.sharedScope.split(",")
if (activityId.coverPicture) {
let ob = {
fileType: '0',
fileUrl: activityId.coverPicture
};
this.fileList = [ob];
this.formData.coverPicture = ob.fileUrl;
}
this.formData = row
} else {
this.formData = {
coverPicture: "",
albumName: "",
sharedScope: ""
}
}
this.endLoading()
},
async handleComfirm() {
this.formData.volunteerOrgId="14324"
if(!this.formData.volunteerOrgId){
return this.$message.error("请选择所属服务团")
}
@ -640,9 +573,10 @@
if(!this.formData.familyPrimaryContactPhone){
return this.$message.error("请输入家庭主要联系人电话")
}
if(!this.formData.num){
if(!this.formData.volunteers){
return this.$message.error("请输入所需志愿者")
}
console.log(this.formData,"klsdflkjs");
this.addActivity()
},
async addActivity() {
@ -659,7 +593,7 @@
}
this.$emit('closeAdd')
}else{
let url = '/actual/base/albums/update'
let url = '/voluntary/elderlyInfo/update'
const { data, code, internalMsg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
@ -677,8 +611,6 @@
this.$emit('closeAdd')
},
//
startLoading() {
loading = Loading.service({
@ -722,7 +654,7 @@
familyPrimaryContactPhone: [
{ required: true, message: '请输入家庭主要联系人电话', trigger: 'blur' }
],
num: [
volunteers: [
{ required: true, message: '请输入所需志愿者数量', trigger: 'blur' }
],

691
src/views/modules/informationArchive/elderlyArchives/cpts/info-old.vue

@ -0,0 +1,691 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form" :inline="true" :model="formData" :rules="dataRule" class="form">
<div class="newqsa"><span class="newqsa_text">基本信息</span></div>
<div>
<el-row>
<el-col :span="16">
<el-col :span="12">
<el-form-item label="所属服务团" prop="volunteerOrgId" label-width="100px">
<div>{{this.formData.volunteerOrgName }}</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="老人姓名" prop="name" label-width="100px">
<div>{{this.formData.name }}</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="身份证号" prop="idNum" label-width="100px">
<div>{{this.formData.idNum }}</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="民族" prop="nation" label-width="100px">
<div>{{this.formData.nation }}</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别" prop="gender" label-width="100px">
<div>{{this.formData.gender?'男':'女' }}</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="出生日期" prop="birthday" label-width="100px">
<div>{{this.formData.birthday }}</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="地址" prop="address" label-width="100px">
<div>{{this.formData.address }}</div>
</el-form-item>
</el-col>
</el-col>
<el-col :span="8" style="text-align: center;">
<el-form-item label="" prop="headImg" label-width="100px">
<img style="width: 180px;height: 180px;" v-if="formData.headImg"
:src="formData.headImg">
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="健康状况" prop="healthStatus" label-width="100px">
<div>{{this.formData.healthStatus }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="主要疾病" prop="majorDisease" label-width="100px">
<div>{{this.formData.majorDisease }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="家庭主要联系人姓名" prop="familyPrimaryContactName" label-width="100px" class="label-wrap">
<div>{{this.formData.familyPrimaryContactName }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="家庭主要联系人电话" prop="familyPrimaryContactPhone" label-width="100px" class="label-wrap">
<div>{{this.formData.familyPrimaryContactPhone }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="村/社区书记或主任姓名" prop="communitySecretaryName" label-width="100px" class="label-wrap">
<div>{{this.formData.communitySecretaryName }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="村书记或主任电话" prop="communitySecretaryPhone" label-width="100px" class="label-wrap">
<div>{{this.formData.communitySecretaryPhone }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第一监护人姓名" prop="primaryGuardianName" label-width="100px" class="label-wrap">
<div>{{this.formData.primaryGuardianName }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第一监护人与老人关系" prop="primaryGuardianRelation" label-width="100px" class="label-wrap">
<div>{{this.formData.primaryGuardianRelation }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第一监护人电话" prop="primaryGuardianPhone" label-width="100px" class="label-wrap">
<div>{{this.formData.primaryGuardianPhone }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第二监护人姓名" prop="secondGuardianName" label-width="100px" class="label-wrap">
<div>{{this.formData.secondGuardianName }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第二监护人与老人关系" prop="secondGuardianRelation" label-width="100px" class="label-wrap">
<div>{{this.formData.secondGuardianRelation }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第二监护人电话" prop="secondGuardianPhone" label-width="100px" class="label-wrap">
<div>{{this.formData.secondGuardianPhone }}</div>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="newqsa"><span class="newqsa_text">现状评估</span></div>
<el-row>
<el-col :span="8">
<el-form-item label="现状类别" prop="statusCategory" label-width="100px">
<div>{{this.formData.statusCategory }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="家庭是否有低保" prop="subAllowance" label-width="100px" class="label-wrap">
<div>{{this.formData.subAllowance?'是':"否" }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="家庭是否精准扶贫户" prop="hlepThePoor" label-width="100px" class="label-wrap">
<div>{{this.formData.hlepThePoor?'是':"否" }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="判断是否需要帮扶" prop="needHelp" label-width="100px" class="label-wrap">
<div>{{this.formData.needHelp?'是':"否" }}</div>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="服务需求" prop="albumName" label-width="100px" class="label-wrap">
<div>{{this.formData.albumName }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="村/社区意见" prop="communityOpinion" label-width="105px" class="label-wrap">
<div>{{this.formData.communityOpinion }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="服务团意见" prop="serviceGroupOpinion" label-width="100px" class="label-wrap">
<div>{{this.formData.serviceGroupOpinion }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="县/区慈善总会意见" prop="charitableOpinion" label-width="100px" class="label-wrap">
<div>{{this.formData.charitableOpinion }}</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="所需志愿者" prop="albumName" label-width="100px" class="label-wrap">
<div>{{this.formData.albumName }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="是否离世" prop="deathFlag" label-width="100px">
<div>{{this.formData.deathFlag?'是':"否" }}</div>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="详细说明" prop="deathRemark" label-width="100px">
<div>{{this.formData.deathRemark }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="填报人" prop="informant" label-width="100px">
<div>{{this.formData.informant }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="填报人电话" prop="informantPhone" label-width="100px">
<div>{{this.formData.informantPhone }}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="填报时间" prop="reportTime" label-width="100px">
<div>{{this.formData.reportTime }}</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div style="text-align: right ; margin-right: 20px;">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" type="primary" @click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import Tinymce from '@c/tinymce2/index.vue'
import daiMap from "@/utils/dai-map";
import util from '@js/util.js';
// import UploadImage from './upload-image.vue'
import UploadImage from '@/views/modules/plugins/rent/upload-image.vue'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data() {
return {
genderList:[
{
value:1,
label:"男"
},
{
value:2,
label:"女"
},
{
value:0,
label:"未知"
}
],
imageUrl:"",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
orgOptionProps: {
emitPath: false,
multiple: true,
value: 'orgId',
label: 'orgName',
children: 'subOrgList',
checkStrictly: true,
expandTrigger: 'click'
},
orgOptions: [],
fileList:[],
sharingScopeList: [
{
value: "4",
label: "仅本组织内共享"
},
{
value: "0",
label: "仅本部门内共享"
},
{
value: "1",
label: "本级和直接下级组织共享"
},
{
value: "2",
label: "本级和直接上级组织共享"
},
{
value: "3",
label: "本级和直接上下级组织共享"
},
],
ethnicList:[],
formType:"add",
agencyIdArray: [],
formData: {
num:1,
volunteerOrgId: '',
orgIdPath: '',
headImg: '',
name: '',
gender: '',
idNum: '',
birthday: '',
nation: '',
address: '',
healthStatus: '',
majorDisease: '',
familyPrimaryContactName: '',
familyPrimaryContactPhone: '',
communitySecretaryName: '',
communitySecretaryPhone: '',
primaryGuardianName: '',
primaryGuardianPhone: '',
primaryGuardianRelation: '',
secondGuardianName: '',
secondGuardianPhone: '',
secondGuardianRelation: '',
statusCategory: '',
subAllowance: '',
hlepThePoor: '',
needHelp: '',
serviceDemand: '',
communityOpinion: '',
serviceGroupOpinion: '',
charitableOpinion: '',
informant: '',
informantPhone: '',
reportTime: '',
deathFlag: '',
deathRemark: ''
},
elderlyList:[],
healthStatusList:[],
corganizerList: [],
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
customerId: localStorage.getItem('customerId'),
hasHePassedAway: [
{
value: 0,
label: "正常"
},
{
value: 1,
label: "死亡"
},
],
/**
* 判断是否需要帮扶0 1
*/
needHelpList: [
{
value: 0,
label: "否"
},
{
value: 1,
label: "是"
},
],
/**
* 家庭是否有低保0 1
*/
subAllowanceList: [
{
value: 0,
label: "否"
},
{
value: 1,
label: "是"
},
],
/**
* 家庭是否精准扶贫户0 1
*/
hlepThePoorList: [
{
value: 0,
label: "否"
},
{
value: 1,
label: "是"
},
],
ServiceGroupList:[]
}
},
components: {Tinymce, UploadImage },
mounted() {
this.getelderlyStatus()
this.gethealthStatus()
this.loadNations()
this.getServiceGroup()
},
methods: {
//
async getServiceGroup() {
const {code, data,msg } = await this.$http.post('sys/dict/data/dictTree/elder_service_group');
console.log(data,"dkjsdkl");
this.ServiceGroupList = data || [];
// if (code === 0) {
// } else {
// this.$message.error(msg);
// }
},
async loadNations() {
let url = '/sys/dict/data/nation'
await requestPost(url, {}).then(res=>{
this.ethnicList=res.data
})
},
//
async getelderlyStatus() {
const url = "/sys/dict/data/dictlist";
const params = {
dictType: "elderly_status",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.elderlyList = data || [];
} else {
this.$message.error(msg);
}
},
//
async gethealthStatus() {
const url = "/sys/dict/data/dictlist";
const params = {
dictType: "health_status",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.healthStatusList = data || [];
} else {
this.$message.error(msg);
}
},
handleExcelSuccess(res, file) {
console.log(res,file,"vsdkljjlskvdvlisd");
if (res.code === 0 && res.msg === "success") {
this.formData.headImg=res.data.url
} else {
this.$message.error(res.msg);
}
},
beforeExcelUpload(file) {
console.log("file", file);
// const isType = file.type === "application/vnd.ms-excel";
// const isTypeComputer =
// file.type ===
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
// const fileType = isType || isTypeComputer;
// const isLt1M = file.size / 1024 / 1024 < 10;
// if (!fileType) {
// this.$message.error("xls/xlsx");
// }
// if (!isLt1M) {
// this.$message.error(" 10MB!");
// }
// return fileType && isLt1M;
},
handleChangeAgency(val){
this.formData.sharedScope=""
if (val.length > 0) {
this.formData.sharedScope = val.toString();
} else {
this.formData.sharedScope = ""; //
}
},
async findNodeByValue(option, value) {
obj.subOrgList.forEach(value => {
console.log(value, "dsfjkhfsdl");
this.agencyIdArray.push(value.orgId)
console.log(this.agencyIdArray, "Sdjksdflkj");
// const node = this.findNodeByValue(this.orgOptions, value);
// if (node && node.children) {
// findChildren([node]);
// }
});
},
filter(node, keyword) {
return node.data.agencyName.includes(keyword)
},
removedImg() {
this.formData.coverPicture = ''
},
onChangeFileList(e) {
this.startLoading()
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
fileType: '0',
fileUrl: item.response.data.url
})) : []; // efileList
if (e.length > 0) {
this.formData.coverPicture = e[0].response.data.url;
} else {
this.formData.coverPicture = '';
}
this.endLoading()
},
async initForm(row) {
this.startLoading()
console.log(row,"dsclkjdslk");
this.formData=row
this.endLoading()
},
async handleComfirm() {
if(!this.formData.volunteerOrgId){
return this.$message.error("请选择所属服务团")
}
if(!this.formData.name){
return this.$message.error("请输入姓名")
}
if(!this.formData.idNum){
return this.$message.error("请输入身份证号")
}
if(!this.formData.gender){
return this.$message.error("请选择性别")
}
if(!this.formData.address){
return this.$message.error("请选择住址")
}
if(!this.formData.birthday){
return this.$message.error("请选择出生日期")
}
if(!this.formData.familyPrimaryContactName){
return this.$message.error("请输入家庭主要联系人姓名")
}
if(!this.formData.familyPrimaryContactPhone){
return this.$message.error("请输入家庭主要联系人电话")
}
if(!this.formData.num){
return this.$message.error("请输入所需志愿者")
}
this.addActivity()
},
async addActivity() {
if(this.formType=="add"){
let url = '/voluntary/elderlyInfo/save'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
} else {
this.$message.error(msg)
}
this.$emit('closeAdd')
}else{
let url = '/actual/base/albums/update'
const { data, code, internalMsg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
} else {
this.$message.error(internalMsg)
}
this.$emit('closeAdd')
}
},
handleCancle() {
this.$emit('closeAdd')
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule() {
return {
volunteerOrgId: [
{ required: true, message: '请选择所属服务团', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入姓名', trigger: 'blur' }
],
idNum: [
{ required: true, message: '请输入身份证号', trigger: 'blur' }
],
gender: [
{ required: true, message: '请选择性别', trigger: 'blur' }
],
address: [
{ required: true, message: '请选择住址', trigger: 'blur' }
],
birthday: [
{ required: true, message: '请选择出生日期', trigger: 'blur' }
],
familyPrimaryContactName: [
{ required: true, message: '请输入家庭主要联系人姓名', trigger: 'blur' }
],
familyPrimaryContactPhone: [
{ required: true, message: '请输入家庭主要联系人电话', trigger: 'blur' }
],
num: [
{ required: true, message: '请输入所需志愿者数量', trigger: 'blur' }
],
}
},
},
props: {
},
destroyed () {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
<style lang="scss" scoped>
.item_width_1 {
width: 634px;
/deep/.tox .tox-dialog {
z-index: 20000;
}
}
.u-item-width-normal{
width: 222px;
}
.tinymce_view {
::v-deep .tox .tox-dialog {
z-index: 2000000000;
}
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.tinymce_view {
height: 400px;
overflow: auto;
}
.text_p {
margin: 0;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 5px;
>p {
margin: 0;
}
}
.label-wrap ::v-deep(.el-form-item__label) {
white-space: normal;
line-height: 1.2;
text-align: right
}
.newqsa {
border-left: 4px solid #2683DB;
height: 100%;
// width: 4px;
padding-left: 8px;
margin-bottom: 10px;
}
.newqsa_text{
font-size: 15px;
font-weight: 600;
}
</style>

127
src/views/modules/informationArchive/elderlyArchives/cpts/pairup-volunteers.vue

@ -0,0 +1,127 @@
<template>
<div class="" style="height: 650px;">
<el-table :data="tableData" border class="m-table-item" height="600px">
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" />
<el-table-column prop="taskTitle" label="老人姓名" min-width="140" align="center" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="userName" label="志愿者所属服务团" align="center" :show-overflow-tooltip="true" width="100">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者姓名" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者昵称" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者电话" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="操作" fixed="right" width="230" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="pageNo" :page-sizes="[20, 50, 100, 200]" :page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
export default {
data() {
return {
formData:{},
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
tableData:[],
total: 1,
taskId:"",
};
},
created() {},
mounted() {
// this.getTableData()
},
methods: {
async initForm(row) {
console.log(row,"dsclkjdslk");
this.formData=row
this.getTableData()
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
async getTableData() {
const url = "/actual/base/communityOneTableDownloadRecord/page";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestGet(url, {
pageSize,
pageNo,
taskId:this.taskId,
});
if (code === 0) {``
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
components:{
},
computed:{
tableHeight() {
return (this.clientHeight - 140) + 'px'
},
...mapGetters(['clientHeight', 'resolution']),
},
props: {
taskId: {
type: String,
default: ""
},
taskName:{
type: String,
default: ""
}
},
watch: {},
}
</script>
<style lang='scss' scoped>
@import "@/assets/scss/pages/resiInfo.scss";
@import "@/assets/scss/modules/management/list-main.scss";
</style>

218
src/views/modules/informationArchive/elderlyArchives/index.vue

@ -10,9 +10,9 @@
</el-select>
</el-form-item>
<el-form-item label="老人类别" prop="unitId">
<el-select class="item_width_1" v-model.trim="formData.status" size="small" placeholder="请选择" clearable>
<el-option v-for="item in statuslist" :key="item.value" :label="item.label" :value="item.value">
<el-form-item label="老人类别" prop="statusCategory">
<el-select class="item_width_1" v-model.trim="formData.statusCategory" size="small" placeholder="请选择" clearable>
<el-option v-for="item in elderlyList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
@ -32,21 +32,21 @@
placeholder="请输入关键字">
</el-input>
</el-form-item>
<el-form-item label="是否精准扶贫户" prop="unitId">
<el-select class="item_width_1" v-model.trim="formData.status" size="small" placeholder="请选择" clearable>
<el-option v-for="item in statuslist" :key="item.value" :label="item.label" :value="item.value">
<el-form-item label="是否精准扶贫户" prop="hlepThePoor">
<el-select class="item_width_1" v-model.trim="formData.hlepThePoor" size="small" placeholder="请选择" clearable>
<el-option v-for="item in hlepThePoorList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否有低保" prop="unitId">
<el-select class="item_width_1" v-model.trim="formData.status" size="small" placeholder="请选择" clearable>
<el-option v-for="item in statuslist" :key="item.value" :label="item.label" :value="item.value">
<el-form-item label="是否有低保" prop="subAllowance">
<el-select class="item_width_1" v-model.trim="formData.subAllowance" size="small" placeholder="请选择" clearable>
<el-option v-for="item in subAllowanceList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否完成结对" prop="unitId">
<el-select class="item_width_1" v-model.trim="formData.status" size="small" placeholder="请选择" clearable>
<el-option v-for="item in statuslist" :key="item.value" :label="item.label" :value="item.value">
<el-form-item label="是否完成结对" prop="twinning">
<el-select class="item_width_1" v-model.trim="formData.twinning" size="small" placeholder="请选择" clearable>
<el-option v-for="item in subAllowanceList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
@ -65,21 +65,9 @@
<div class="div_btn">
<div style="display: flex; flex-direction: row;">
<el-button style=" margin-right: 20px;" class="diy-button--add" size="small" @click="handleInitAdd('','add')">新建档案</el-button>
<el-upload :headers="$getElUploadHeaders()"
ref="upload"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-button size="small"
class="diy-button--blue"
:loading="importLoading">批量导入</el-button>
</el-upload>
</div>
<el-button style="" class="diy-button--add" size="small">导出</el-button>
@ -93,31 +81,35 @@
align="center"
width="50"
></el-table-column>
<el-table-column prop="typeName" header-align="center" align="center" label="所属服务团" >
<el-table-column prop="volunteerOrgName" header-align="center" align="center" label="所属服务团" >
</el-table-column>
<el-table-column prop="activityName" header-align="center" align="center" label="姓名" >
<el-table-column prop="name" header-align="center" align="center" label="姓名" >
</el-table-column>
<el-table-column prop="startTime" header-align="center" align="center" label="性别" >
<el-table-column prop="gender" header-align="center" align="center" label="性别" >
<template slot-scope="scope">
<span v-if="scope.row.gender === 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="address" header-align="center" align="center" label="出生日期" >
<el-table-column prop="birthday" header-align="center" align="center" label="出生日期" >
</el-table-column>
<el-table-column prop="assistingParty" header-align="center" align="center" label="住址" >
<el-table-column prop="address" header-align="center" align="center" label="住址" >
</el-table-column>
<el-table-column prop="participants" header-align="center" align="center" label="主要联系人" >
<el-table-column prop="familyPrimaryContactName" header-align="center" align="center" label="主要联系人" >
</el-table-column>
<el-table-column prop="status" header-align="center" align="center" label="主要联系人电话" >
<el-table-column prop="familyPrimaryContactPhone" header-align="center" align="center" label="主要联系人电话" >
</el-table-column>
<el-table-column prop="online" header-align="center" align="center" label="是否有低保" >
<el-table-column prop="subAllowance" header-align="center" align="center" label="是否有低保" >
<template slot-scope="scope">
<span v-if="scope.row.online === 1"></span>
<span v-if="scope.row.subAllowance === 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="online" header-align="center" align="center" label="是否精准扶贫户" >
<el-table-column prop="hlepThePoor" header-align="center" align="center" label="是否精准扶贫户" >
<template slot-scope="scope">
<span v-if="scope.row.online === 1"></span>
<span v-if="scope.row.hlepThePoor === 1"></span>
<span v-else></span>
</template>
</el-table-column>
@ -127,32 +119,22 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="online" header-align="center" align="center" label="结对志愿者" >
<el-table-column prop="twinning" header-align="center" align="center" label="结对志愿者" >
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleVoleer(scope.row)">1</el-button>
</template>
</el-table-column>
<el-table-column prop="online" header-align="center" align="center" label="服务记录" >
<el-table-column prop="statusCategory" header-align="center" align="center" label="服务记录" >
<template slot-scope="scope">
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="230" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" v-if="scope.row.status == 0||scope.row.status == 1" style="color:#1C6AFD;"
size="small" @click="handleEdit(scope.row)">编辑</el-button>
<!-- <el-button type="text" v-if="scope.row.status == 2 && scope.row.activityImgs === '' && scope.row.sumUp === ''" style="color:#1C6AFD;"
size="small" @click="handleSumm(scope.row)">活动总结</el-button> -->
<el-button type="text" v-if="scope.row.status == 2 && !scope.row.activityImgs" style="color:#1C6AFD;"
size="small" @click="handleSumm(scope.row)">活动总结</el-button>
<el-button type="text" style="color:#1C6AFD;"
size="small" @click="handleInitAdd(scope.row,'edit')">编辑</el-button>
<el-button type="text" style="color:rgb(28, 106, 253);" size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="scope.row.status == 0" type="text" style="color:#D51010;" size="small"
@click="handleCancel(scope.row)">取消</el-button>
</template>
</el-table-column>
</el-table>
@ -169,13 +151,25 @@
<add-old v-if="initShow" ref="ref_form" :unitList="corganizerList" :gridList="gridList" @closeAdd="closeAdd"
@dialogCancle="addFormCancleInit" @dialogOk="addFormOkInit"></add-old>
</el-dialog>
<el-dialog :visible.sync="detailShow" v-if="detailShow" :close-on-click-modal="false" :close-on-press-escape="false"
title="详情" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<info-old v-if="detailShow" ref="ref_detail" :unitList="corganizerList" :gridList="gridList" @closeAdd="closeAdd"
@dialogCancle="addFormCancleInit" @dialogOk="addFormOkInit"></info-old>
</el-dialog>
<el-dialog :visible.sync="showList" v-if="showList" :close-on-click-modal="false" :close-on-press-escape="false"
title="结对志愿者" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<pairup-volunteers v-if="showList" ref="ref_vol" :unitList="corganizerList" :gridList="gridList" @closeAdd="closeAdd"
@dialogCancle="addFormCancleInit" @dialogOk="addFormOkInit"></pairup-volunteers>
</el-dialog>
</div>
</template>
<script>
// import eventDetails from './eventDetails'
// import initiateActivity from './initiateActivity'
import addOld from './cpts/add-old.vue'
import infoOld from './cpts/info-old.vue'
import pairupVolunteers from './cpts/pairup-volunteers.vue'
import util from '@js/util.js';
import { requestPost,requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
@ -185,24 +179,50 @@
export default {
data () {
return {
showList:false,
typeList:[],
needHelpList: [
{
value: 0,
label: "否"
},
{
value: 1,
label: "是"
},
],
subAllowanceList: [
{
value: 0,
label: "否"
},
{
value: 1,
label: "是"
},
],
hlepThePoorList: [
{
value: 0,
label: "否"
},
{
value: 1,
label: "是"
},
],
elderlyList:[],
selection: [],
loading: false,
total: 0,
pageSize: 10,
pageNo: 0,
pageNo: 1,
tableLoading: false,
agencyId: '',
gridList: [],//
unitList: [],
formData: {
name:"",
idNum:"",
mobile:"",
hlepThePoor:"",
subAllowance:"",
twinning:"",
statusCategory:"",
},
tableData: [],
summShow:false,
@ -217,11 +237,15 @@
fileName: "",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import',
// searchdemandOptions:[],
detail:{}
detail:{},
searchData: {
type: "",
searchKey: "",
},
}
},
components: {
addOld
addOld,infoOld,pairupVolunteers
},
async created () {
@ -230,10 +254,33 @@
//
const { user } = this.$store.state
this.agencyId = user.agencyId
this.searchData.searchKey = localStorage.getItem("homeSearchKey") || "";
this.searchData.type = localStorage.getItem("homeSearchType") || "";
this.getElderlyInfo()
this.getelderlyStatus()
},
methods: {
handleVoleer(row) {
this.showList = true
this.$nextTick(() => {
this.$refs.ref_vol.initForm( row)
})
},
//
async getelderlyStatus() {
const url = "/sys/dict/data/dictlist";
const params = {
dictType: "elderly_status",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.elderlyList = data || [];
} else {
this.$message.error(msg);
}
},
closeAdd(){
this.initShow=false
this.getElderlyInfo()
@ -280,21 +327,22 @@
this.getElderlyInfo()
},
async getElderlyInfo () {
const url = "/voluntary/elderlyInfo/page"
let params = {
name:"",
idNum:"",
mobile:"",
hlepThePoor:"",
subAllowance:"",
twinning:"",
statusCategory:"",
pageSize: 10,
pageNo: 1,
const url =this.searchData.type?"/voluntary/elderlyInfo/homePage/selectPage":"/voluntary/elderlyInfo/page"
let params = !this.searchData.type?{
...this.formData,
}:{
searchContent:this.searchData.searchKey,
pageNo:this.pageNo,
pageSize:this.pageSize
}
const { data, code, msg } = await requestGet(url, params)
if(this.searchData.type){
localStorage.removeItem("homeSearchKey");
localStorage.removeItem("homeSearchType");
}
if (code === 0) {
this.typeList = data.list
this.tableData = data.list
} else {
this.$message.error(msg)
}
@ -318,14 +366,10 @@
},
handleDetail (row) {
this.detailShow = true
this.formTitle = '详情'
console.log('rowmememmeme',row)
if(this.typeList){
row.typeName = this.typeList.filter(item=>item.id === row.typeId)[0].typeName || '--'
}
this.$nextTick(() => {
console.log(row,"sdlj");
this.$refs.ref_detail.initForm(row)
// this.$refs.ref_form.initForm('detail', row.id)
})
},
@ -360,6 +404,8 @@
console.log(row,type,"添加");
if (type==='add') {
this.formTitle = '新建老人档案'
}else{
this.formTitle = '修改老人档案'
}
this.initShow = true
this.$nextTick(() => {
@ -387,7 +433,6 @@
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -421,20 +466,15 @@
});
},
async deleteActivity (row) {
const url = "/actual/base/communityActivity/delete"
const url = "/voluntary/elderlyInfo/delete"
let id = [row.id]
const { data, code, msg } = await requestPost(url, id)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
// this.loadTable()
this.communityActivityList()
this.getElderlyInfo()
} else {
this.$message.error(msg)
}

108
src/views/modules/informationArchive/serviceTeamManagement/cpts/service-info.vue

@ -0,0 +1,108 @@
<template>
<div class="" style=" padding: 20px;">
<el-form :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="所属组织" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="服务团名称" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="团长姓名" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="团长联系电话" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="服务时长" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="服务积分" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="审核" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="注册时间" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
</div>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data() {
return {
toExamine:0,
id:"",
formData:{}
}
},
components: { },
mounted() {
},
methods: {
async initForm(row) {
this.startLoading()
this.formData=row
this.endLoading()
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule() {
return {
}
},
},
props: {
},
destroyed () {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/pages/resiInfo.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.item_width_1{
width: 100px;
}
</style>

122
src/views/modules/informationArchive/serviceTeamManagement/cpts/service-team.vue

@ -0,0 +1,122 @@
<template>
<div class="" style=" padding: 20px;">
<el-form :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="审核结果" prop="name">
<el-radio v-model="toExamine" label="0">备选项</el-radio>
<el-radio v-model="toExamine" label="1">备选项</el-radio>
</el-form-item>
<el-form-item label="不通过原因" prop="mobile">
<el-input v-model.trim="formData.mobile" size="small" class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
</div>
<div>
<div style="text-align: right ; margin-right: 20px;">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" type="primary" @click="handleComfirm"> </el-button>
</div>
</div>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data() {
return {
toExamine:0,
id:"",
formData:{}
}
},
components: { },
mounted() {
},
methods: {
async initForm(id) {
this.startLoading()
this.id=id
this.endLoading()
},
async handleComfirm() {
this.HandleExamine()
},
async HandleExamine() {
let url = '/actual/base/albums/update'
const { data, code, internalMsg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.$emit('closeExamine')
} else {
this.$message.error(internalMsg)
}
},
handleCancle() {
this.$emit('closeExamine')
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule() {
return {
}
},
},
props: {
},
destroyed () {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/pages/resiInfo.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.item_width_1{
width: 100px;
}
</style>

163
src/views/modules/informationArchive/serviceTeamManagement/cpts/volunteers-list.vue

@ -0,0 +1,163 @@
<template>
<div class="" style=" padding: 20px;">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'80px'">
<div>
<el-form-item label="姓名" prop="name">
<el-input v-model.trim="formData.name" size="small" style="width: 100px;"class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model.trim="formData.mobile" size="small" style="width: 100px;" class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="注册时间" prop="reportTime" label-width="100px">
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime" style="width: 190px;"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
<span style="margin: 0 10px;"></span>
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime" style="width: 190px;"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-button style="margin-left:10px" class="diy-button--blue" size="small"
@click="handleSearch">查询</el-button>
</div>
<div>
<div style="display: flex; justify-content: flex-end;">
</div>
</div>
</el-form>
<el-table :data="tableData" border class="m-table-item" height="600px">
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" />
<el-table-column prop="userName" label="志愿者所属服务团" align="center" :show-overflow-tooltip="true" width="100">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者姓名" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者昵称" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者电话" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="服务时长(小时)" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="积分" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="操作" fixed="right" width="230" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="pageNo" :page-sizes="[20, 50, 100, 200]" :page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
export default {
data() {
return {
formData:{},
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
tableData:[],
total: 1,
taskId:"",
};
},
created() {},
mounted() {
// this.getTableData()
},
methods: {
handleSearch() {
this.getTableData()
},
async initForm(row) {
console.log(row,"dsclkjdslk");
// this.formData=row
this.getTableData()
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
async getTableData() {
const url = "/actual/base/communityOneTableDownloadRecord/page";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestGet(url, {
pageSize,
pageNo,
taskId:this.taskId,
});
if (code === 0) {``
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
components:{
},
computed:{
tableHeight() {
return (this.clientHeight - 140) + 'px'
},
...mapGetters(['clientHeight', 'resolution']),
},
props: {
taskId: {
type: String,
default: ""
},
taskName:{
type: String,
default: ""
}
},
watch: {},
}
</script>
<style lang='scss' scoped>
@import "@/assets/scss/pages/resiInfo.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.item_width_1{
width: 100px;
}
</style>

978
src/views/modules/informationArchive/serviceTeamManagement/index.vue

@ -1,374 +1,636 @@
<template>
<div class="g-main">
<div class="m-search">
<el-form :inline="true" ref="ref_searchform" :label-width="'100px'">
<div>
<el-form-item label="姓名">
<el-input v-model.trim="formData.name" size="small" class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="手机号">
<el-input v-model.trim="formData.mobile" size="small" class="item_width_1" clearable
placeholder="请输入"></el-input>
</el-form-item>
</div>
<div class="block">
<div style="display: flex; justify-content: flex-end;">
<el-button style="margin-left:10px" class="diy-button--blue" size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="resetSearch">重置</el-button>
</div>
</div>
</el-form>
</div>
<div class="m-table">
<!-- <el-button style="" class="diy-button--add" size="small" @click="handleExportModule()">下载模板</el-button>
<el-button class="diy-button--white" size="small">
<el-upload :headers="$getElUploadHeaders()" ref="upload" class="upload-btn" action="uploadUlr" :limit="1"
:accept="'.xls,.xlsx'" :with-credentials="true" :show-file-list="false" :auto-upload="true"
:on-progress="handleProgress" :on-success="handleExcelSuccess" :before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
导入
</el-upload>
</el-button> -->
<el-table class="table" :data="tableData" border v-loading="tableLoading" style="width: 100%">
<el-table-column label="序号" header-align="center" align="center" type="index" width="80"></el-table-column>
<el-table-column prop="agencyName" header-align="center" align="center" label="所属社区":show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="nickName" header-align="center" align="center" label="昵称" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span>{{ scope.row.enabled === 1 ? '关闭' : '显示' }}</span>
</template> -->
</el-table-column>
<el-table-column prop="name" header-align="center" align="center" label="姓名" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="identityTypeNames" header-align="center" align="center" label="兴趣特长" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile" header-align="center" align="center" label="手机号" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="idCard" header-align="center" align="center" label="身份证号" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" header-align="center" align="center" label="注册时间" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="points" header-align="center" align="center" label="积分":show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="actNum" header-align="center" align="center" label="活动次数":show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="操作" fixed="right" width="250" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleEdit(scope.row)">活动记录</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleintegral(scope.row)">积分调整</el-button>
</template>
</el-table-column>
</el-table>
<div class="g-main">
<div class="m-search">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="所属组织" prop="orgName">
<el-cascader ref="org" v-model.trim="orgIds" :options="organizationList"
:props="{ checkStrictly: true, multiple: false, emitPath: true }" style="width: 200px" clearable
@change="orgChangeHandle">
</el-cascader>
</el-form-item>
<el-form-item label="服务团名称" prop="name">
<el-input v-model.trim="formData.name" size="small" class="item_width_1" clearable placeholder="请输入关键字">
</el-input>
</el-form-item>
<el-form-item label="团长姓名" prop="idNum">
<el-input v-model.trim="formData.idNum" size="small" class="item_width_1" clearable placeholder="请输入关键字">
</el-input>
</el-form-item>
<el-form-item label="团长手机号" prop="mobile">
<el-input v-model.trim="formData.mobile" size="small" class="item_width_1" clearable placeholder="请输入关键字">
</el-input>
</el-form-item>
<el-form-item label="审核状态" prop="hlepThePoor">
<el-select class="item_width_1" v-model.trim="formData.hlepThePoor" size="small" placeholder="请选择"
clearable>
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="注册时间" prop="reportTime" label-width="100px">
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
<span style="margin: 0 10px;"></span>
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</div>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
<div style="display: flex; justify-content: flex-end;">
<el-button style="margin-left:10px" class="diy-button--blue" size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="resetSearch">重置</el-button>
</div>
</div>
<el-dialog :visible.sync="Record" :close-on-click-modal="false" :close-on-press-escape="false" title="活动记录"
width="1000px" top="10vh" class="dialog-h" @closed="summDetailClose">
<Record v-if="Record" :list="fmData" @summDetailClose="summDetailClose" />
</el-dialog>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" title="查看"
width="1000px" top="10vh" class="dialog-h">
<see v-if="formShow" :list="fmData" />
</el-dialog>
<el-dialog :visible.sync="integral" :close-on-click-modal="false" :close-on-press-escape="false" title="积分记录"
width="1000px" top="10vh" class="dialog-h" @closed="summDetailClose">
<integral v-if="integral" :list="fmData" @summDetailClose="summDetailClose" />
</el-dialog>
</el-form>
</div>
<div class="m-table">
<el-table class="table" :data="tableData" border :height="tableHeight" v-loading="tableLoading"
style="width: 100%;margin-top:16px" @select-all="selectAll" @selection-change="handelSelection">
<el-table-column type="selection" fixed="left" align="center" width="50"></el-table-column>
<el-table-column prop="volunteerOrgName" header-align="center" align="center" label="所属组织">
</el-table-column>
<el-table-column prop="name" header-align="center" align="center" label="服务团名称">
</el-table-column>
<el-table-column prop="gender" header-align="center" align="center" label="团长姓名">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="团长联系电话">
</el-table-column>
<el-table-column prop="address" header-align="center" align="center" label="志愿者成员">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleVoleer(scope.row)">1</el-button>
</template>
</el-table-column>
<el-table-column prop="familyPrimaryContactName" header-align="center" align="center" label="服务时长">
</el-table-column>
<el-table-column prop="familyPrimaryContactPhone" header-align="center" align="center" label="服务积分">
</el-table-column>
<el-table-column prop="subAllowance" header-align="center" align="center" label="审核">
<template slot-scope="scope">
</template>
</el-table-column>
<el-table-column prop="hlepThePoor" header-align="center" align="center" label="注册时间">
<template slot-scope="scope">
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="230" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleToExamine(scope.row)">审核</el-button>
<el-button type="text" style="color:rgb(28, 106, 253);" size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="flex flex-x flex-end flex-center1 flex-center2">
<el-button type="primary" size="small" @click="onDeleteBatch" style="margin-top: 10px;">批量删除</el-button>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
import { requestPost,requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
// // import projectInfo from "./cpts/project-info";
import axios from "axios";
volunteerProfile
export default {
components: { },
data() {
return {
formData:{
name:"",
mobile:""
<el-dialog :visible.sync="initShow" v-if="initShow" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<add-old v-if="initShow" ref="ref_form" :unitList="corganizerList" :gridList="gridList" @closeAdd="closeAdd"
@dialogCancle="addFormCancleInit" @dialogOk="addFormOkInit"></add-old>
</el-dialog>
<el-dialog :visible.sync="detailShow" v-if="detailShow" :close-on-click-modal="false" :close-on-press-escape="false"
title="详情" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<service-info v-if="detailShow" ref="ref_detail" :unitList="corganizerList" :gridList="gridList" @closeAdd="closeAdd"
@dialogCancle="addFormCancleInit" @dialogOk="addFormOkInit"></service-info>
</el-dialog>
<el-dialog :visible.sync="showList" v-if="showList" :close-on-click-modal="false" :close-on-press-escape="false"
title="志愿者成员" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<volunteers-list v-if="showList" ref="ref_vol" @closeAdd="closeAdd" ></volunteers-list>
</el-dialog>
<el-dialog :visible.sync="toExamineShow" v-if="toExamineShow" :close-on-click-modal="false" :close-on-press-escape="false"
title="审核" width="750px" top="5vh" class="dialog-h" @closed="diaInitClose">
<service-team v-if="toExamineShow" ref="ref_examine" @closeExamine="closeExamine"
></service-team>
</el-dialog>
</div>
</template>
<script>
import serviceInfo from './cpts/service-info.vue'
import serviceTeam from './cpts/service-team.vue'
import volunteersList from './cpts/volunteers-list'
import util from '@js/util.js';
import { requestPost,requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
toExamineShow:false,
organizationList: [],
showList:false,
typeList:[],
needHelpList: [
{
value: 0,
label: "否"
},
integral:false,
tableLoading: false,
formShow:false,
// pageType: "list", // list dispose info issue-info
pageNo: 1,
pageSize:20,
total: 1,
tableData: [],
Record:false,
fmData:[],
};
},
computed: {
maxTableHeight() {
return this.$store.state.inIframe
? this.clientHeight - 400 + this.iframeHeigh
: this.clientHeight - 400;
{
value: 1,
label: "是"
},
],
statusList: [
{
value: 0,
label: "不通过"
},
{
value: 1,
label: "通过"
},
],
elderlyList:[],
selection: [],
loading: false,
total: 0,
pageSize: 10,
pageNo: 0,
tableLoading: false,
agencyId: '',
gridList: [],//
unitList: [],
formData: {
},
...mapGetters(["clientHeight", "iframeHeight"]),
tableData: [],
summShow:false,
//form
formShow: false,
initShow:false,
formTitle: '新增活动',
detailShow: false,
}
},
components: {
serviceInfo,serviceTeam,volunteersList
},
async created () {
},
async mounted () {
//
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getFormInfo()
this.getElderlyInfo()
},
methods: {
closeExamine(){
this.toExamineShow=false
},
watch: {
//
getFormInfo() {
this.$http
.post(`/gov/org/agency/getOrgTreeListByCustomerId`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.organizationList = res.data;
this.deleteChildren(this.organizationList);
})
.catch(() => { });
},
orgChangeHandle () {
this.dataForm.orgId = this.orgIds[this.orgIds.length - 1];
console.log(this.dataForm);
},
handleVoleer(row) {
this.showList = true
this.$nextTick(() => {
this.$refs.ref_vol.initForm( row)
})
},
closeAdd(){
this.initShow=false
this.getElderlyInfo()
},
mounted() {
handelSelection(row) {
this.selection = row;
},
selectAll(selection) {
this.selection = selection;
if (selection.length > 0) {
this.selAllFlag = true;
} else {
this.selAllFlag = false;
}
},
async delPolicyBatch(policyIds) {
const url = `/governance/policy/deletePolicyBatch`;
const { data, code, msg } = await requestPost(url, policyIds);
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
onDeleteBatch() {
if (this.selection.length > 0) {
this.$confirm("删除的数据无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.delPolicyBatch(this.selection.map((i) => i.id));
})
.catch((err) => {
console.error(err);
});
} else {
this.$message.warning("请先选择要删除的政策");
}
},
handleSearch () {
this.getElderlyInfo()
},
async getElderlyInfo () {
const url = "/actual/base/communityOneTablePeriodPublish/sharePage"
let params = {
...this.formData,
}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
methods: {
//
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/volunteerInfo/page";
let params={
pageSize:this.pageSize,
pageNo:this.pageNo,
mobile:this.formData.mobile,
name:this.formData.name
}
const { data, code, msg } = await requestPost(url,params);
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
} else {
}
},
//
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this;
document.getElementById('clickA').addEventListener('click', function () {
than.$router.replace('/main/importRecord-index');
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append('file', file.file); //
formData.append('code', ''); //
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
beforeExcelUpload(file) {
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!');
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!');
}
return fileType && isLt1M;
},
handleintegral(row){
this.fmData=row
this.integral=true
console.log(row,"row");
},
diaClose(){
this.formShow=false
},
resetSearch(){
this.formData=[]
this.getTableData()
},
handleDetail(row){
console.log(row,"row");
this.formShow=true
this.fmData=row
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
diaInitClose() {
this.$refs.ref_form.resetData()
this.initShow = false
},
},
summDetailClose(){
this.Record=false
this.integral=false
this.getTableData()
},
async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
await this.$http({
method: "POST",
url,
responseType: "blob",
data: params,
})
.then((res) => {
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
handleProgress(event, file, fileList) {
console.log("percentage", file.percentage);
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
//
handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
async handleEdit(row) {
// let item = this.tableData[rowIndex];
// this.currentProject = {
// projectId: item.projectId,
// };
// this.pageType = "edit";
console.log(row,"row");
detailClosed () {
this.$refs.ref_detail.diaDestroy()
this.detailShow = false
},
summDetailClose () {
this.summShow = false
},
handleDetail (row) {
this.detailShow = true
this.$nextTick(() => {
console.log(row,"sdlj");
this.fmData=row
this.Record=true
},
handleClose() {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
.g-main {
width: 100%;
}
.m-search {
background: #ffffff;
border-radius: 4px;
padding: 30px 20px 5px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
}
.item_width_1 {
width: 260px;
}
.item_width_2 {
width: 495px;
}
.m-table {
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
margin-top: 15px;
padding: 23px 30px 10px;
.table {
margin-top: 20px;
this.$refs.ref_detail.initForm(row)
})
},
handleEdit (row) {
this.formTitle = '修改'
this.initShow = true
this.$nextTick(() => {
// this.$refs.ref_form.initForm('edit', row.id)
this.$refs.ref_form.initForm('edit', row)
})
},
handleSumm(row){
console.log(row.activityImgs);
this.initShow = true
this.formTitle = '总结'
this.$nextTick(() => {
this.$refs.ref_form.initForm('summary', row)
})
this.communityActivityList()
},
handleAdd () {
this.formTitle = '活动记录'
this.initShow = true
// this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('records', null)
})
},
handleToExamine (row,type) {
this.toExamineShow = true
this.$nextTick(() => {
this.$refs.ref_examine.initForm(row.id, type)
})
},
addFormCancle () {
this.formShow = false
},
addFormCancleInit () {
this.initShow = false
},
addFormOk () {
this.formShow = false
// this.loadTable()
this.communityActivityList()
},
addFormOkInit () {
this.initShow = false
// this.loadTable()
this.communityActivityList()
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteActivity(row)
})
.catch(err => {
if (err == "cancel") {
}
});
},
async handleCancel(row) {
this.$confirm("确认取消?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.update(row)
})
.catch(err => {
// console.log("hehheheheh",row)
if (err == "cancel") {
}
});
},
async deleteActivity (row) {
const url = "/voluntary/elderlyInfo/delete"
let id = [row.id]
const { data, code, msg } = await requestPost(url, id)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.getElderlyInfo()
} else {
this.$message.error(msg)
}
},
//
resetSearch () {
this.timeRange = []
this.formData = {
activityName: "",
status: "",
typeId: "",
startTime: "",
endTime: "",
address: "",
assistingParty: ""
}
this.pageSize = 10
this.pageNo = 1
// this.loadTable()
this.communityActivityList()
},
//
async handleExport () {
let title = '联建活动列表'
const url = "/heart/icpartyactivity/export"
let params = {
agencyId: this.agencyId,
...this.formData
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
.div_btn {
display: flex;
justify-content: space-between;
}
.el-row {
/* margin-bottom: 20px; */
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-right: 50px;
}
</style>
);
},
//
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/icpartyactivity/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()
this.communityActivityList()
} else {
this.$message.error(msg)
}
},
handleTimeChange (time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-')
const endTimeArray = util.dateFormatter(time[1], 'date').split('-')
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00'
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
} else {
this.formData.startTime = ''
this.formData.endTime = ''
}
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
// this.loadTable()
this.communityActivityList()
},
handleCurrentChange (val) {
this.pageNo = val
// this.loadTable()
this.communityActivityList()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 430 + this.iframeHeight : this.clientHeight - 450
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
.g-main {
width: 100%;
}
.m-search {
background: #ffffff;
border-radius: 4px;
padding: 24px 10px 10px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
margin: 20px 7px 7px;
}
// .item_width_1 {
// width: 260px;
// }
// .item_width_2 {
// width: 495px;
// }
.m-table {
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
margin-top: 15px;
padding: 24px 16px 10px;
margin: 16px 7px 7px;
// .table {
// margin-top: 20px;
// }
}
.div_btn {
display: flex;
justify-content: space-between;
}
.el-row {
/* margin-bottom: 20px; */
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-right: 50px;
}
</style>

108
src/views/modules/informationArchive/volunteerProfile/cpts/service-info.vue

@ -0,0 +1,108 @@
<template>
<div class="" style=" padding: 20px;">
<el-form :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="所属组织" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="服务团名称" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="团长姓名" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="团长联系电话" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="服务时长" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="服务积分" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="审核" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
<el-form-item label="注册时间" prop="name">
<div>{{formData.name}}</div>
</el-form-item>
</div>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data() {
return {
toExamine:0,
id:"",
formData:{}
}
},
components: { },
mounted() {
},
methods: {
async initForm(row) {
this.startLoading()
this.formData=row
this.endLoading()
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule() {
return {
}
},
},
props: {
},
destroyed () {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/pages/resiInfo.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.item_width_1{
width: 100px;
}
</style>

122
src/views/modules/informationArchive/volunteerProfile/cpts/service-team.vue

@ -0,0 +1,122 @@
<template>
<div class="" style=" padding: 20px;">
<el-form :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="审核结果" prop="name">
<el-radio v-model="toExamine" label="0">备选项</el-radio>
<el-radio v-model="toExamine" label="1">备选项</el-radio>
</el-form-item>
<el-form-item label="不通过原因" prop="mobile">
<el-input v-model.trim="formData.mobile" size="small" class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
</div>
<div>
<div style="text-align: right ; margin-right: 20px;">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" type="primary" @click="handleComfirm"> </el-button>
</div>
</div>
</el-form>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data() {
return {
toExamine:0,
id:"",
formData:{}
}
},
components: { },
mounted() {
},
methods: {
async initForm(id) {
this.startLoading()
this.id=id
this.endLoading()
},
async handleComfirm() {
this.HandleExamine()
},
async HandleExamine() {
let url = '/actual/base/albums/update'
const { data, code, internalMsg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.$emit('closeExamine')
} else {
this.$message.error(internalMsg)
}
},
handleCancle() {
this.$emit('closeExamine')
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule() {
return {
}
},
},
props: {
},
destroyed () {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/pages/resiInfo.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.item_width_1{
width: 100px;
}
</style>

163
src/views/modules/informationArchive/volunteerProfile/cpts/volunteers-list.vue

@ -0,0 +1,163 @@
<template>
<div class="" style=" padding: 20px;">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'80px'">
<div>
<el-form-item label="姓名" prop="name">
<el-input v-model.trim="formData.name" size="small" style="width: 100px;"class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model.trim="formData.mobile" size="small" style="width: 100px;" class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="注册时间" prop="reportTime" label-width="100px">
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime" style="width: 190px;"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
<span style="margin: 0 10px;"></span>
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime" style="width: 190px;"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-button style="margin-left:10px" class="diy-button--blue" size="small"
@click="handleSearch">查询</el-button>
</div>
<div>
<div style="display: flex; justify-content: flex-end;">
</div>
</div>
</el-form>
<el-table :data="tableData" border class="m-table-item" height="600px">
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" />
<el-table-column prop="userName" label="志愿者所属服务团" align="center" :show-overflow-tooltip="true" width="100">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者姓名" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者昵称" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="志愿者电话" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="服务时长(小时)" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" label="积分" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="操作" fixed="right" width="230" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="pageNo" :page-sizes="[20, 50, 100, 200]" :page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
export default {
data() {
return {
formData:{},
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
tableData:[],
total: 1,
taskId:"",
};
},
created() {},
mounted() {
// this.getTableData()
},
methods: {
handleSearch() {
this.getTableData()
},
async initForm(row) {
console.log(row,"dsclkjdslk");
// this.formData=row
this.getTableData()
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
async getTableData() {
const url = "/actual/base/communityOneTableDownloadRecord/page";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestGet(url, {
pageSize,
pageNo,
taskId:this.taskId,
});
if (code === 0) {``
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
components:{
},
computed:{
tableHeight() {
return (this.clientHeight - 140) + 'px'
},
...mapGetters(['clientHeight', 'resolution']),
},
props: {
taskId: {
type: String,
default: ""
},
taskName:{
type: String,
default: ""
}
},
watch: {},
}
</script>
<style lang='scss' scoped>
@import "@/assets/scss/pages/resiInfo.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.item_width_1{
width: 100px;
}
</style>

981
src/views/modules/informationArchive/volunteerProfile/index.vue

@ -1,374 +1,639 @@
<template>
<div class="g-main">
<div class="m-search">
<el-form :inline="true" ref="ref_searchform" :label-width="'100px'">
<div>
<el-form-item label="姓名">
<el-input v-model.trim="formData.name" size="small" class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="手机号">
<el-input v-model.trim="formData.mobile" size="small" class="item_width_1" clearable
placeholder="请输入"></el-input>
</el-form-item>
</div>
<div class="block">
<div style="display: flex; justify-content: flex-end;">
<el-button style="margin-left:10px" class="diy-button--blue" size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="resetSearch">重置</el-button>
</div>
</div>
</el-form>
</div>
<div class="m-table">
<!-- <el-button style="" class="diy-button--add" size="small" @click="handleExportModule()">下载模板</el-button>
<el-button class="diy-button--white" size="small">
<el-upload :headers="$getElUploadHeaders()" ref="upload" class="upload-btn" action="uploadUlr" :limit="1"
:accept="'.xls,.xlsx'" :with-credentials="true" :show-file-list="false" :auto-upload="true"
:on-progress="handleProgress" :on-success="handleExcelSuccess" :before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
导入
</el-upload>
</el-button> -->
<el-table class="table" :data="tableData" border v-loading="tableLoading" style="width: 100%">
<el-table-column label="序号" header-align="center" align="center" type="index" width="80"></el-table-column>
<el-table-column prop="agencyName" header-align="center" align="center" label="所属社区":show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="nickName" header-align="center" align="center" label="昵称" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span>{{ scope.row.enabled === 1 ? '关闭' : '显示' }}</span>
</template> -->
</el-table-column>
<el-table-column prop="name" header-align="center" align="center" label="姓名" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="identityTypeNames" header-align="center" align="center" label="兴趣特长" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile" header-align="center" align="center" label="手机号" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="idCard" header-align="center" align="center" label="身份证号" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" header-align="center" align="center" label="注册时间" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="points" header-align="center" align="center" label="积分":show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="actNum" header-align="center" align="center" label="活动次数":show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="操作" fixed="right" width="250" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleEdit(scope.row)">活动记录</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleintegral(scope.row)">积分调整</el-button>
</template>
</el-table-column>
</el-table>
<div class="g-main">
<div class="m-search">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'120px'">
<div>
<el-form-item label="所属组织" prop="orgName">
<el-cascader ref="org" v-model.trim="orgIds" :options="organizationList" class="item_width_1"
:props="{ checkStrictly: true, multiple: false, emitPath: true }" clearable
@change="orgChangeHandle">
</el-cascader>
</el-form-item>
<el-form-item label="所属服务团" prop="volunteerOrgId">
<el-select class="item_width_1" v-model.trim="formData.volunteerOrgId" size="small" placeholder="请选择" clearable>
<el-option v-for="item in typeList" :key="item.typeName" :label="item.typeName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="真实名称" prop="name">
<el-input v-model.trim="formData.name" size="small" class="item_width_1" clearable placeholder="请输入关键字">
</el-input>
</el-form-item>
<el-form-item label="身份证号" prop="idNum">
<el-input v-model.trim="formData.idNum" size="small" class="item_width_1" clearable placeholder="请输入关键字">
</el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model.trim="formData.mobile" size="small" class="item_width_1" clearable placeholder="请输入关键字">
</el-input>
</el-form-item>
<el-form-item label="审核状态" prop="hlepThePoor">
<el-select class="item_width_1" v-model.trim="formData.hlepThePoor" size="small" placeholder="请选择"
clearable>
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="注册时间" prop="reportTime" label-width="100px">
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
<span style="margin: 0 10px;"></span>
<el-date-picker class="u-item-width-normal" v-model="formData.reportTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value="yyyy-MM-dd HH:mm:ss" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</div>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
<div style="display: flex; justify-content: flex-end;">
<el-button style="margin-left:10px" class="diy-button--blue" size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="resetSearch">重置</el-button>
</div>
</div>
<el-dialog :visible.sync="Record" :close-on-click-modal="false" :close-on-press-escape="false" title="活动记录"
width="1000px" top="10vh" class="dialog-h" @closed="summDetailClose">
<Record v-if="Record" :list="fmData" @summDetailClose="summDetailClose" />
</el-dialog>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" title="查看"
width="1000px" top="10vh" class="dialog-h">
<see v-if="formShow" :list="fmData" />
</el-dialog>
<el-dialog :visible.sync="integral" :close-on-click-modal="false" :close-on-press-escape="false" title="积分记录"
width="1000px" top="10vh" class="dialog-h" @closed="summDetailClose">
<integral v-if="integral" :list="fmData" @summDetailClose="summDetailClose" />
</el-dialog>
</el-form>
</div>
<div class="m-table">
<el-table class="table" :data="tableData" border :height="tableHeight" v-loading="tableLoading"
style="width: 100%;margin-top:16px" @select-all="selectAll" @selection-change="handelSelection">
<el-table-column type="selection" fixed="left" align="center" width="50"></el-table-column>
<el-table-column prop="volunteerOrgName" header-align="center" align="center" label="所属组织">
</el-table-column>
<el-table-column prop="name" header-align="center" align="center" label="所属服务团">
</el-table-column>
<el-table-column prop="gender" header-align="center" align="center" label="微信昵称">
</el-table-column>
<el-table-column prop="gender" header-align="center" align="center" label="真实姓名">
</el-table-column>
<el-table-column prop="gender" header-align="center" align="center" label="兴趣特长">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="手机号">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="身份证号">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="服务记录">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="服务时长">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="积分">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="审核">
</el-table-column>
<el-table-column prop="birthday" header-align="center" align="center" label="注册时间">
</el-table-column>
<el-table-column label="操作" fixed="right" width="230" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleToExamine(scope.row)">审核</el-button>
<el-button type="text" style="color:rgb(28, 106, 253);" size="small"
@click="handleDelete(scope.row)">积分调整</el-button>
</template>
</el-table-column>
</el-table>
<div class="flex flex-x flex-end flex-center1 flex-center2">
<el-button type="primary" size="small" @click="onDeleteBatch" style="margin-top: 10px;">批量删除</el-button>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
import { requestPost,requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
// // import projectInfo from "./cpts/project-info";
import axios from "axios";
volunteerProfile
export default {
components: { },
data() {
return {
formData:{
name:"",
mobile:""
<el-dialog :visible.sync="initShow" v-if="initShow" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<add-old v-if="initShow" ref="ref_form" :unitList="corganizerList" :gridList="gridList" @closeAdd="closeAdd"
@dialogCancle="addFormCancleInit" @dialogOk="addFormOkInit"></add-old>
</el-dialog>
<el-dialog :visible.sync="detailShow" v-if="detailShow" :close-on-click-modal="false" :close-on-press-escape="false"
title="详情" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<service-info v-if="detailShow" ref="ref_detail" :unitList="corganizerList" :gridList="gridList" @closeAdd="closeAdd"
@dialogCancle="addFormCancleInit" @dialogOk="addFormOkInit"></service-info>
</el-dialog>
<el-dialog :visible.sync="showList" v-if="showList" :close-on-click-modal="false" :close-on-press-escape="false"
title="志愿者成员" width="1050px" top="5vh" class="dialog-h" @closed="diaInitClose">
<volunteers-list v-if="showList" ref="ref_vol" @closeAdd="closeAdd" ></volunteers-list>
</el-dialog>
<el-dialog :visible.sync="toExamineShow" v-if="toExamineShow" :close-on-click-modal="false" :close-on-press-escape="false"
title="审核" width="750px" top="5vh" class="dialog-h" @closed="diaInitClose">
<service-team v-if="toExamineShow" ref="ref_examine" @closeExamine="closeExamine"
></service-team>
</el-dialog>
</div>
</template>
<script>
import serviceInfo from './cpts/service-info.vue'
import serviceTeam from './cpts/service-team.vue'
import volunteersList from './cpts/volunteers-list'
import util from '@js/util.js';
import { requestPost,requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
toExamineShow:false,
organizationList: [],
showList:false,
typeList:[],
needHelpList: [
{
value: 0,
label: "否"
},
integral:false,
tableLoading: false,
formShow:false,
// pageType: "list", // list dispose info issue-info
pageNo: 1,
pageSize:20,
total: 1,
tableData: [],
Record:false,
fmData:[],
};
},
computed: {
maxTableHeight() {
return this.$store.state.inIframe
? this.clientHeight - 400 + this.iframeHeigh
: this.clientHeight - 400;
{
value: 1,
label: "是"
},
],
statusList: [
{
value: 0,
label: "不通过"
},
{
value: 1,
label: "通过"
},
],
elderlyList:[],
selection: [],
loading: false,
total: 0,
pageSize: 10,
pageNo: 0,
tableLoading: false,
agencyId: '',
gridList: [],//
unitList: [],
formData: {
},
...mapGetters(["clientHeight", "iframeHeight"]),
tableData: [],
summShow:false,
//form
formShow: false,
initShow:false,
formTitle: '新增活动',
detailShow: false,
}
},
components: {
serviceInfo,serviceTeam,volunteersList
},
async created () {
},
async mounted () {
//
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getFormInfo()
this.getElderlyInfo()
},
methods: {
closeExamine(){
this.toExamineShow=false
},
watch: {
//
getFormInfo() {
this.$http
.post(`/gov/org/agency/getOrgTreeListByCustomerId`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.organizationList = res.data;
this.deleteChildren(this.organizationList);
})
.catch(() => { });
},
orgChangeHandle () {
this.dataForm.orgId = this.orgIds[this.orgIds.length - 1];
console.log(this.dataForm);
},
handleVoleer(row) {
this.showList = true
this.$nextTick(() => {
this.$refs.ref_vol.initForm( row)
})
},
closeAdd(){
this.initShow=false
this.getElderlyInfo()
},
mounted() {
handelSelection(row) {
this.selection = row;
},
selectAll(selection) {
this.selection = selection;
if (selection.length > 0) {
this.selAllFlag = true;
} else {
this.selAllFlag = false;
}
},
async delPolicyBatch(policyIds) {
const url = `/governance/policy/deletePolicyBatch`;
const { data, code, msg } = await requestPost(url, policyIds);
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
onDeleteBatch() {
if (this.selection.length > 0) {
this.$confirm("删除的数据无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.delPolicyBatch(this.selection.map((i) => i.id));
})
.catch((err) => {
console.error(err);
});
} else {
this.$message.warning("请先选择要删除的政策");
}
},
handleSearch () {
this.getElderlyInfo()
},
async getElderlyInfo () {
const url = "/actual/base/communityOneTablePeriodPublish/sharePage"
let params = {
...this.formData,
}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
methods: {
//
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/volunteerInfo/page";
let params={
pageSize:this.pageSize,
pageNo:this.pageNo,
mobile:this.formData.mobile,
name:this.formData.name
}
const { data, code, msg } = await requestPost(url,params);
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
} else {
}
},
//
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this;
document.getElementById('clickA').addEventListener('click', function () {
than.$router.replace('/main/importRecord-index');
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append('file', file.file); //
formData.append('code', ''); //
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
beforeExcelUpload(file) {
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!');
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!');
}
return fileType && isLt1M;
},
handleintegral(row){
this.fmData=row
this.integral=true
console.log(row,"row");
},
diaClose(){
this.formShow=false
},
resetSearch(){
this.formData=[]
this.getTableData()
},
handleDetail(row){
console.log(row,"row");
this.formShow=true
this.fmData=row
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
diaInitClose() {
this.$refs.ref_form.resetData()
this.initShow = false
},
},
summDetailClose(){
this.Record=false
this.integral=false
this.getTableData()
},
async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
await this.$http({
method: "POST",
url,
responseType: "blob",
data: params,
})
.then((res) => {
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
handleProgress(event, file, fileList) {
console.log("percentage", file.percentage);
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
//
handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
async handleEdit(row) {
// let item = this.tableData[rowIndex];
// this.currentProject = {
// projectId: item.projectId,
// };
// this.pageType = "edit";
console.log(row,"row");
detailClosed () {
this.$refs.ref_detail.diaDestroy()
this.detailShow = false
},
summDetailClose () {
this.summShow = false
},
handleDetail (row) {
this.detailShow = true
this.$nextTick(() => {
console.log(row,"sdlj");
this.fmData=row
this.Record=true
},
handleClose() {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
.g-main {
width: 100%;
}
.m-search {
background: #ffffff;
border-radius: 4px;
padding: 30px 20px 5px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
}
.item_width_1 {
width: 260px;
}
.item_width_2 {
width: 495px;
}
.m-table {
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
margin-top: 15px;
padding: 23px 30px 10px;
.table {
margin-top: 20px;
this.$refs.ref_detail.initForm(row)
})
},
handleEdit (row) {
this.formTitle = '修改'
this.initShow = true
this.$nextTick(() => {
// this.$refs.ref_form.initForm('edit', row.id)
this.$refs.ref_form.initForm('edit', row)
})
},
handleSumm(row){
console.log(row.activityImgs);
this.initShow = true
this.formTitle = '总结'
this.$nextTick(() => {
this.$refs.ref_form.initForm('summary', row)
})
this.communityActivityList()
},
handleAdd () {
this.formTitle = '活动记录'
this.initShow = true
// this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('records', null)
})
},
handleToExamine (row,type) {
this.toExamineShow = true
this.$nextTick(() => {
this.$refs.ref_examine.initForm(row.id, type)
})
},
addFormCancle () {
this.formShow = false
},
addFormCancleInit () {
this.initShow = false
},
addFormOk () {
this.formShow = false
// this.loadTable()
this.communityActivityList()
},
addFormOkInit () {
this.initShow = false
// this.loadTable()
this.communityActivityList()
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteActivity(row)
})
.catch(err => {
if (err == "cancel") {
}
});
},
async handleCancel(row) {
this.$confirm("确认取消?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.update(row)
})
.catch(err => {
// console.log("hehheheheh",row)
if (err == "cancel") {
}
});
},
async deleteActivity (row) {
const url = "/voluntary/elderlyInfo/delete"
let id = [row.id]
const { data, code, msg } = await requestPost(url, id)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.getElderlyInfo()
} else {
this.$message.error(msg)
}
},
//
resetSearch () {
this.timeRange = []
this.formData = {
activityName: "",
status: "",
typeId: "",
startTime: "",
endTime: "",
address: "",
assistingParty: ""
}
this.pageSize = 10
this.pageNo = 1
// this.loadTable()
this.communityActivityList()
},
//
async handleExport () {
let title = '联建活动列表'
const url = "/heart/icpartyactivity/export"
let params = {
agencyId: this.agencyId,
...this.formData
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
.div_btn {
display: flex;
justify-content: space-between;
}
.el-row {
/* margin-bottom: 20px; */
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-right: 50px;
}
</style>
);
},
//
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/icpartyactivity/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()
this.communityActivityList()
} else {
this.$message.error(msg)
}
},
handleTimeChange (time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-')
const endTimeArray = util.dateFormatter(time[1], 'date').split('-')
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00'
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
} else {
this.formData.startTime = ''
this.formData.endTime = ''
}
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
// this.loadTable()
this.communityActivityList()
},
handleCurrentChange (val) {
this.pageNo = val
// this.loadTable()
this.communityActivityList()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 430 + this.iframeHeight : this.clientHeight - 450
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
.g-main {
width: 100%;
}
.m-search {
background: #ffffff;
border-radius: 4px;
padding: 24px 10px 10px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
margin: 20px 7px 7px;
}
// .item_width_1 {
// width: 260px;
// }
// .item_width_2 {
// width: 495px;
// }
.m-table {
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
margin-top: 15px;
padding: 24px 16px 10px;
margin: 16px 7px 7px;
// .table {
// margin-top: 20px;
// }
}
.div_btn {
display: flex;
justify-content: space-between;
}
.el-row {
/* margin-bottom: 20px; */
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-right: 50px;
}
</style>

177
src/views/modules/servicePointsManagement/cpts/service-add.vue

@ -0,0 +1,177 @@
<template>
<div style="width:750px;margin:20px">
<div >
<el-form
:model="formData"
ref="dataForm"
:rules="dataRule"
:label-width="'120px'"
>
<el-form-item label="一级分类" prop="name">
<el-input
v-model.trim="formData.name"
style="width:200px"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="对应积分值" prop="name">
<el-input
v-model.trim="formData.pointNum"
style="width:200px"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="服务标准" prop="name">
<el-input
v-model.trim="formData.serviceStandard"
style="width:200px"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入"
></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" style="text-align:right">
<el-button @click="handleCancle"> </el-button>
<el-button type="primary" @click="handleComfirm"> </el-button>
</span>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { number } from 'echarts'
let loading //
export default {
data () {
return {
formData:{
name:"",
categoryName:"",
serviceStandard:"",
pid:""
},
}
},
components: {},
mounted () {
},
methods: {
async initForm (type, row) {
this.$refs.ref_form.resetFields();
this.type = type
this.formType = type
if(type == "add0"){
this.dataForm.pid =row.id
this.isParentLevel = false
}else if(type =='add'){
this.isParentLevel = true
this.dataForm.pid = 0
}else if(type =='edit'){
this.dataForm = JSON.parse(JSON.stringify(row))
if (row.pid == '0') {
//
this.isParentLevel = true
} else {
this.isParentLevel = false
}
}
},
handleAddProperty () {
this.propertyForm.name = ''
this.propertyFormShow = true
},
async handleComfirm () {
this.addComClass()
},
async addComClass(){
const url = "/voluntary/serviceCategory/save"
let params = {
pid :this.formData.pid,
categoryName:this.formData.categoryName,
serviceStandard:this.formData.serviceStandard,
pointNum:this.formData.pointNum
}
let {data,code,msg} = await requestPost(url,params)
if(code == 0){
this.$emit('dialogOk')
this.$message({
type: "success",
message: '操作成功',
duration: 1
})
}else{
this.$message({
type: "error",
message:msg,
duration: 0
})
}
},
handleCancle () {
this.$emit('dialogCancle')
},
resetData () {
this.propertyFormShow = false
},
handleChangeSortNum(value) {
this.dataForm.sort = value
},
handleChangeAwardPoint(value) {
this.dataForm.awardPoint = value
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
name: [
{ required: true, message: '分类名称不能为空', trigger: 'blur' },
{
min: 1,
max: 50,
message: '分类名称长度在 1 到 50个字符',
trigger: 'blur'
}
],
sort: [
{ required: true, message: '分类顺序不能为空', trigger: 'blur' },
],
awardPoint: [
{ required: true, message: '建立积分不能为空', trigger: 'blur' },
],
}
},
},
props: {}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/form-main.scss";
@import "@/assets/scss/modules/management/form.scss";
@import "@/assets/scss/modules/visual/a_customize.scss";
</style>

312
src/views/modules/servicePointsManagement/index.vue

@ -0,0 +1,312 @@
<template >
<div class="g-main">
<div class="m-table">
<div class="u-table-btn2">
<div class="u-table-btn2-left">
<el-button style=""
size="small"
class="diy-button--blue"
@click="handleAdd({},'add')">新增</el-button>
</div>
</div>
<div class="m-table-item">
<el-table ref="ref_table"
:data="tableData"
border
row-key="id"
:height="tableHeight"
style="width: 100%"
:load="loadChildren"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column
prop="categoryName"
label="分类名称"
>
</el-table-column>
<el-table-column
prop="pointNum"
label="对应积分"
>
</el-table-column>
<el-table-column
prop="serviceStandard"
label="服务标准"
>
</el-table-column>
<el-table-column label="操作"
fixed="right"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button
v-if="scope.row.pid==0"
type="text"
class="div-table-button--blue"
size="small"
@click="handleAdd(scope.row,'add0')">添加二级分类</el-button>
<el-button
type="text"
class="div-table-button--blue"
size="small"
@click="handleAdd(scope.row,'edit')">修改</el-button>
<el-button
type="text"
class="div-table-button--blue"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="750px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<service-add ref="ref_form" v-if="formShow"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></service-add>
</el-dialog>
</div>
</template>
<script>
import serviceAdd from './cpts/service-add'
import { requestPost,requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import axios from 'axios'
let loading //
export default {
data () {
return {
pid:0,
searchHeight: 0,//,
pageNo:0,
pageSize:20,
total:0,
formTitle:"",
formShow:false,
tableData: [],
}
},
components: {
serviceAdd
},
activated () {
},
async mounted () {
this.loadTable()
},
methods: {
loadChildren(tree, treeNode, resolve) {
console.log(tree,treeNode,resolve,"wds,lsklf");
// // tree
// //
// this.$axios.get('/api/getChildren', { params: { pid: tree.id } }).then(res => {
// resolve(res.data); // idcategoryNamepointNumserviceStandard
// }).catch(() => {
// resolve([]); // resolve
// });
},
async loadTable () {
const url = "/voluntary/serviceCategory/page"
const params={
pid:this.pid
}
let {data,msg,code } = await requestGet(url,params)
if(code == 0){
this.tableData = data.list.map(item=>({
children:[{
}],
hasChildren:true,
...item,
}))
console.log(this.tableData,"ds;fl;sd");
}else{
this.$message.error(msg)
}
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
},
addFormCancle () {
this.formShow = false
},
async handleDetail (row) {
this.detailShow = true
const _data = await this.detail(row)
this.$nextTick(() => {
this.$refs.ref_form_detail.initForm(_data)
})
},
handleAdd (row,type) {
if(type=="add"){
console.log(row.id);
this.formTitle = '新增分类'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type, row)
})
} else if(type=="add0"){
this.formTitle = '新增分类'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type, row)
})
} else if (type == 'edit') {
this.formTitle = '修改分类'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm(type, row)
})
}
},
selectAll (selection) {
this.selection = selection
},
selectionChange (selection) {
this.selection = selection
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteDemand(row)
})
.catch(err => {
if (err == "cancel") {
this.$message({
type: "info",
message: "已取消删除"
});
}
});
},
async deleteDemand (row) {
const url = `/governance/commonServiceType/delete/${row.id}`
const { data, code, msg } = await requestPost(url)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.loadTable()
} else if (code > 8000) {
this.$message({
message: msg,
duration: 0
})
this.loadTable()
} else {
this.$message.error(msg)
}
},
handleDiyClose () {
this.diyDialog = false;
},
handleClose (done) {
this.diyDialog = false
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
console.log(this.searchHeight)
let height = this.searchHeight + 270
return this.$store.state.inIframe ? this.clientHeight - height + this.iframeHeight : this.clientHeight - height
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/list-main.scss";
</style>
<style >
.el-message.is-closable .el-message__content {
line-height: 20px;
}
</style>
Loading…
Cancel
Save