From 926ea0e06d536998682803c35c3ca75539b31a2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?=
<819653817@qq.com>
Date: Thu, 22 Aug 2024 18:05:18 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/base/community/buildTable.vue | 1 -
.../volunteer/VolManage/activeRecord.vue | 76 ++-
.../modules/volunteer/VolManage/index.vue | 388 ++----------
.../modules/volunteer/VolManage/integral.vue | 155 +++--
src/views/modules/volunteer/VolManage/see.vue | 59 +-
.../modules/volunteer/activityArchive/add.vue | 578 ++++++------------
.../volunteer/activityArchive/index.scss | 0
.../volunteer/activityArchive/index.vue | 478 +++------------
.../volunteer/pointsRedemption/Select.vue | 34 +-
.../volunteer/pointsRedemption/add.vue | 12 +-
.../volunteer/pointsRedemption/index.vue | 381 ++++--------
.../volunteer/pointsRedemption/record.vue | 36 +-
12 files changed, 662 insertions(+), 1536 deletions(-)
delete mode 100644 src/views/modules/volunteer/activityArchive/index.scss
diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue
index 479d84487..ecca3bf56 100644
--- a/src/views/modules/base/community/buildTable.vue
+++ b/src/views/modules/base/community/buildTable.vue
@@ -615,7 +615,6 @@ export default {
this.selection.forEach((element) => {
ids.push(element.buildingId);
});
-
//第一次删除,非强制删除
this.deleteBuild(ids, false)
})
diff --git a/src/views/modules/volunteer/VolManage/activeRecord.vue b/src/views/modules/volunteer/VolManage/activeRecord.vue
index 0b6d722cf..455de2716 100644
--- a/src/views/modules/volunteer/VolManage/activeRecord.vue
+++ b/src/views/modules/volunteer/VolManage/activeRecord.vue
@@ -8,8 +8,8 @@
@@ -18,17 +18,20 @@
-
+
-
+
+
+
-
+
+
-
+
- .
+ .
-
+
-
-
- {{ scope.row.status === 0 ? '已下线' : '已发布' }}
-
+
-
-
- {{ scope.row.status === 0 ? '已下线' : '已发布' }}
-
+
-
+
-
+
-
+
-
+
-
+
查看
+ 活动记录
活动记录
- 积分调整
@@ -77,17 +70,17 @@
-
-
-
-
-
-
-
-
+ width="750px" top="10vh" class="dialog-h" @closed="summDetailClose">
+
+
+
+
+
+
+
+
@@ -109,7 +102,7 @@
return {
formData:{
name:"",
- phone:""
+ mobile:""
},
integral:false,
tableLoading: false,
@@ -118,77 +111,9 @@
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
- tableData: [
- {
- Community: "Stellar Community",
- Nickname: "Dawn",
- Name: "Li Xiaoming",
- Identity: "Regular Member",
- PhoneNumber: "13800138000",
- IDNumber: "420123198901011234",
- RegistrationTime: "2024-01-15T08:30:00Z",
- Points: 1250,
- ActivityCount: 15
- },
- {
- Community: "Stellar Community",
- Nickname: "Dawn",
- Name: "Li Xiaoming",
- Identity: "Regular Member",
- PhoneNumber: "13800138000",
- IDNumber: "420123198901011234",
- RegistrationTime: "2024-01-15T08:30:00Z",
- Points: 1250,
- ActivityCount: 15
- },
- {
- Community: "Stellar Community",
- Nickname: "Dawn",
- Name: "Li Xiaoming",
- Identity: "Regular Member",
- PhoneNumber: "13800138000",
- IDNumber: "420123198901011234",
- RegistrationTime: "2024-01-15T08:30:00Z",
- Points: 1250,
- ActivityCount: 15
- },
- {
- Community: "Stellar Community",
- Nickname: "Dawn",
- Name: "Li Xiaoming",
- Identity: "Regular Member",
- PhoneNumber: "13800138000",
- IDNumber: "420123198901011234",
- RegistrationTime: "2024-01-15T08:30:00Z",
- Points: 1250,
- ActivityCount: 15
- },
- {
- Community: "Stellar Community",
- Nickname: "Dawn",
- Name: "Li Xiaoming",
- Identity: "Regular Member",
- PhoneNumber: "13800138000",
- IDNumber: "420123198901011234",
- RegistrationTime: "2024-01-15T08:30:00Z",
- Points: 1250,
- ActivityCount: 15
- },
- {
- Community: "Stellar Community",
- Nickname: "Dawn",
- Name: "Li Xiaoming",
- Identity: "Regular Member",
- PhoneNumber: "13800138000",
- IDNumber: "420123198901011234",
- RegistrationTime: "2024-01-15T08:30:00Z",
- Points: 1250,
- ActivityCount: 15
- },
-],
+ tableData: [],
Record:false,
fmData:[],
-
};
},
computed: {
@@ -200,21 +125,32 @@
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
- "fmData.endDate": function (val) {
- if (val && val != "") {
- console.log(val);
- let arrayTemp = val.split(" ");
- this.fmData.endDate = arrayTemp[0] + " 23:59:59";
- }
- },
+
},
mounted() {
- // this.getTableData();
+ this.getTableData();
},
methods: {
- summDetailClose(){
- this.integral=false
+ //查询列表
+ 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 = '正在上传中...';
@@ -294,6 +230,7 @@
return fileType && isLt1M;
},
handleintegral(row){
+ this.fmData=row
this.integral=true
console.log(row,"row");
},
@@ -309,6 +246,11 @@
this.fmData=row
},
+ summDetailClose(){
+ this.Record=false
+ this.integral=false
+ this.getTableData()
+ },
async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
@@ -343,94 +285,10 @@
return this.$message.error("网络错误");
});
},
- // 上传大图标成功
- handleExcelSuccess(res, file) {
- if (res.code === 0 && res.msg === "success") {
- console.log("resss---ppp", res);
- } else {
- this.$message.error(res.msg);
- }
- },
+
handleProgress(event, file, fileList) {
console.log("percentage", file.percentage);
},
-
- 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;
- },
- async uploadHttpRequest(file) {
- this.importLoading = true;
- this.importBtnTitle = "正在上传中...";
- this.$message({
- showClose: true,
- dangerouslyUseHTMLString: true,
- message: "导入中,请到系统管理-导入记录中查看进度",
- duration: 3000
- });
- let than = this
- document.getElementById('clickA').addEventListener('click',function(){
- than.$router.replace('/main/importRecord-index');
- })
- const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加
- formData.append("file", file.file); //添加文件对象
- await this.$http
- .post(
- "/heart/iccommunityselforganization/importcommunityselforganization",
- formData
- )
- .then((res) => {
- console.log("res-up", res);
- if (res.data.code == 0 && res.data.msg == "success") {
- // this.$message.success('导入成功')
- this.getTableData();
- } else this.$message.error(res.data.msg);
- })
- .catch((err) => {
- console.log("失败", err);
- file.onError(); //上传失败的文件会从文件列表中删除
- // this.$message.error('导入失败')
- });
- // axios({
- // url:
- // window.SITE_CONFIG["apiURL"] +
- // "/heart/iccommunityselforganization/importcommunityselforganization",
- // method: "post",
- // data: formData,
- // // responseType: "blob",
- // })
- // .then((res) => {
- // this.importLoading = false;
- // this.importBtnTitle = "导入";
- // console.log("resresresresresresres", res);
-
- // this.getTableData();
- // if (res.data.code == 0) {
- // return this.$message.success(res.data.data || "导入成功");
- // } else {
- // return this.$message.error(res.data.msg);
- // }
- // })
- // .catch((err) => {
- // console.log("失败", err);
- // });
- this.importLoading = false;
- this.importBtnTitle = "导入";
- this.$refs.upload.clearFiles();
- },
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pageSize = val;
@@ -448,73 +306,7 @@
this.pageNo = 1;
this.getTableData();
},
- resetForm(formName) {
- (this.fmData = {
- title: "",
- status: "",
- startDate: "",
- endDate: "",
- date: ["", ""],
- }),
- this.handleSearch();
- },
- async handleChu() {
- const url = "/governance/project/project-list-export";
- const { pageSize, pageNo, fmData } = this;
- axios({
- url: window.SITE_CONFIG["apiURL"] + url,
- method: "post",
- data: {
- pageSize,
- pageNo,
- ...fmData,
- },
- responseType: "blob",
- })
- .then((res) => {
- console.log(res);
- // 明明响应标头中有content-disposition但是打印的res中没有这个字段,暂时写死一个吧
- // let fileName = window.decodeURI(
- // res.headers["content-disposition"].split(";")[1].split("=")[1]
- // );
- let yy = new Date().getFullYear();
- var mm =
- new Date().getMonth() > 9
- ? new Date().getMonth() + 1
- : new Date().getMonth() == 9
- ? new Date().getMonth() + 1
- : "0" + (new Date().getMonth() + 1);
- var dd =
- new Date().getDate() < 10
- ? "0" + new Date().getDate()
- : new Date().getDate();
- let time = `${yy}-${mm}-${dd} `;
- let fileName = `项目管理${time}`;
- 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对象
- })
- .catch((err) => {
- console.log("获取导出情失败", err);
- return this.$message.error("网络错误");
- });
- },
- async handleAdd() {},
- async handleWatch(rowIndex) {
- let item = this.tableData[rowIndex];
- this.currentProject = {
- projectId: item.projectId,
- };
- this.pageType = "info";
- },
+
async handleEdit(row) {
// let item = this.tableData[rowIndex];
// this.currentProject = {
@@ -536,59 +328,7 @@
this.handleClose();
this.getTableData();
},
- async handleDel(rowData, rowIndex) {
- console.log(rowData, rowIndex);
- const url =
- "/heart/iccommunityselforganization/delcommunityselforganization";
- const { tableData } = this;
-
- const { data, code, msg } = await requestPost(url, {
- orgId: tableData[rowIndex].orgId,
- });
-
- if (code === 0) {
- this.$message.success("删除成功!");
- this.getTableData();
- } else {
- this.$message.success("操作失败!");
- }
- },
- async getTableData() {
- // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
- const url = "/governance/project/project-list";
- const { pageSize, pageNo, fmData } = this;
- const { data, code, msg } = await requestPost(url, {
- pageSize,
- pageNo,
- ...fmData,
- });
- if (code === 0) {
- console.log("列表请求成功!!!!!!!!!!!!!!");
- this.total = data.total || 0;
- this.tableData = data.list
- ? data.list.map((item) => {
- return item;
- })
- : [];
-
- this.tableData.forEach((item) => {
- if (item.origin === "issue") {
- item.originName = "议题 ";
- } else if (item.origin === "agency") {
- item.originName = "项目立项";
- } else if (item.origin === "resi_event") {
- item.originName = "旧版事件上报";
- } else if (item.origin === "work_event") {
- item.originName = "巡查上报";
- } else if (item.origin === "ic_event") {
- item.originName = "事件";
- } else {
- item.sourceTypeName = "--";
- }
- });
- } else {
- }
- },
+
},
};
diff --git a/src/views/modules/volunteer/VolManage/integral.vue b/src/views/modules/volunteer/VolManage/integral.vue
index ab5cb0935..bc5a4fed4 100644
--- a/src/views/modules/volunteer/VolManage/integral.vue
+++ b/src/views/modules/volunteer/VolManage/integral.vue
@@ -4,41 +4,42 @@
{{ tableData.name }}
-
- {{ tableData.nickname }}
+
+ {{ tableData.points }}
-
+
-
+
-
-
+
+
-
-
- 加积分
+
+
+ 加积分
+
减积分
-
+
取消
- 确定
+ 确定
\ No newline at end of file
diff --git a/src/views/modules/volunteer/activityArchive/index.scss b/src/views/modules/volunteer/activityArchive/index.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/src/views/modules/volunteer/activityArchive/index.vue b/src/views/modules/volunteer/activityArchive/index.vue
index b890da7a9..24b39f666 100644
--- a/src/views/modules/volunteer/activityArchive/index.vue
+++ b/src/views/modules/volunteer/activityArchive/index.vue
@@ -4,16 +4,18 @@
-
+
-
+
+ 至
-
+
@@ -34,45 +36,45 @@
新增
-
+
-
-
-
-
-
- {{ scope.row.status === 0 ? '已下线' : '已发布' }}
-
+
+
+
+ {{ scope.row.strTime }}至{{ scope.row.endTime }}
+
+
-
-
- {{ scope.row.status === 0 ? '已下线' : '已发布' }}
-
+
+
-
+
-
+
-
+
+
+ 管理端
-
-
+
查看
下线
- handelRegister(command, scope.row)" >
+ handelRegister(command, scope.row)">
更多
-
- 报名管理
- 打卡积分
+
+ 报名管理
+ 打卡积分
删除活动
@@ -88,12 +90,12 @@
width="1000px" top="10vh" class="dialog-h" @closed="diaClose">
-
+
-
+
@@ -104,7 +106,7 @@
diff --git a/src/views/modules/volunteer/pointsRedemption/Select.vue b/src/views/modules/volunteer/pointsRedemption/Select.vue
index a93a897c1..98e4c9750 100644
--- a/src/views/modules/volunteer/pointsRedemption/Select.vue
+++ b/src/views/modules/volunteer/pointsRedemption/Select.vue
@@ -1,8 +1,8 @@
-
- {{ tableData.className }}
+
+ {{ tableData.className }}
{{ tableData.awardName }}
@@ -14,13 +14,13 @@
{{ tableData.points}}
- {{ tableData.Nickname}}
+ {{ tableData.expireTime}}
- {{ tableData.Nicknae}}
+ {{ tableData.redeemerOrgName}}
- {{ tableData.Nickname}}
+ {{ tableData.sponsorName}}
@@ -55,16 +55,26 @@ export default {
let params = {
id:this.awardId
}
- const { data, code, msg } = requestGet(url, params)
- if (code === 0) {
+ requestGet(url, params).then((res) =>{
+ console.log(res,"res");
+ if(res.code===0){
console.log("列表请求成功!!!!!!!!!!!!!!");
- this.total = data.total || 0;
- this.tableData = data
- console.log(this.tableData,"this.tableData");
+ console.log(res.data, "data");
+ this.tableData = res.data
+ console.log(this.tableData, "this.tableData");
+ }
+ })
+ // const { data, code, msg } = requestGet(url, params)
+ // console.log(data,"data");
+ // if (code === 0) {
+ // console.log("列表请求成功!!!!!!!!!!!!!!");
+ // console.log(data,"data");
+ // this.tableData = data
+ // console.log(this.tableData,"this.tableData");
- } else {
- }
+ // } else {
+ // }
},
},
diff --git a/src/views/modules/volunteer/pointsRedemption/add.vue b/src/views/modules/volunteer/pointsRedemption/add.vue
index 010f02e92..6f9492d50 100644
--- a/src/views/modules/volunteer/pointsRedemption/add.vue
+++ b/src/views/modules/volunteer/pointsRedemption/add.vue
@@ -34,12 +34,12 @@
-
-
@@ -60,7 +60,7 @@
-
+
-
-
+
+
-
-
-
+
+
+ 至
+
@@ -66,9 +74,10 @@
-->
- 修改
- 下架
- 上架
+ 修改
+ 上架
+ 下架
+ 删除
兑换记录
@@ -87,7 +96,7 @@
+ width="750px" top="10vh" class="dialog-h" @closed="diaClose">
@@ -123,16 +132,12 @@
add:false,
orgTypeFilter:[],
formData:{
- name:"",
- StatusName:"",
- activeTime:"",
- optionsStatus: [{
- value: '选项1',
- label: '已发布'
- }, {
- value: '选项2',
- label: '未发布'
- },],
+ shelveOnTimeTo:"",
+ classKey:"",
+ redeemOrgId:"",
+ optionsStatus: [],
+ shelveOnTimeFrom:"",
+
},
integral:false,
tableLoading: false,
@@ -168,8 +173,80 @@
mounted() {
this.getTableData();
this.getOrgTreeList()
+ this.getclasses()
},
methods: {
+ //获取物品分类信息
+ async getclasses() {
+ const url = "/voluntary/pointsAward/classes/list";
+ let params = {
+ }
+ const { data, code, msg } = await requestGet(url, params)
+ if (code === 0) {
+ console.log("列表请求成功!!!!!!!!!!!!!!");
+ this.TypeList=data
+
+ this.formData.optionsStatus = data
+ console.log(this.formData.optionsStatus,"this.tableData");
+
+
+ } else {
+ this.$message.error(msg || "列表请求失败");
+ }
+ },
+ //删除
+ handleDel(row){
+ this.$confirm("删除之后无法回复,确认删除?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ console.log(row.id,"online");
+ let url="/voluntary/pointsAward/admin/delete"
+ let params={
+ id:row.id
+ }
+ requestPost(url,params).then((res)=>{
+ console.log(res,"res");
+ this.getTableData()
+
+ })
+ })
+ .catch(err => {
+ if (err == "cancel") {
+
+ }
+
+ });
+
+ },
+ //上线
+ handleonline(row){
+ console.log(row.id,"online");
+ let url="/voluntary/pointsAward/admin/shelveOn"
+ let params={
+ id:row.id
+ }
+ requestPost(url,params).then((res)=>{
+ console.log(res,"res");
+ this.getTableData()
+
+ })
+ },
+ //下架
+ handleuponline(row){
+ console.log(row.id,"online");
+ let url="/voluntary/pointsAward/admin/shelveOff"
+ let params={
+ id:row.id
+ }
+ requestPost(url,params).then((res)=>{
+ console.log(res,"res");
+ this.getTableData()
+
+ })
+ },
//获取当前组织
getOrgTreeList() {
this.$http
@@ -202,40 +279,6 @@
this.fmData=row
console.log("row",row);
},
- handelRegister(command, row) {
- if (command == "signup") {
- this.HandleRegistration(row);
- } else if (command == "clockin") {
- this.HandlePoints(row);
- } else if (command == "qcdj") {
- this.handleChangeTransfer(row);
- }
- },
- HandleRegistration(row){
- console.log(row,"报名管理");
- this.ActivityCountshow=true
- },
- HandlePoints(row){
- console.log(row,"报名管理");
- this.HandlePointsshow=true
- },
- 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 = ''
- }
- },
-
- handleintegral(row){
- this.integral=true
- console.log(row,"row");
- },
diaClose(){
this.formShow=false
},
@@ -246,131 +289,6 @@
console.log(row,"row");
this.add=true
this.fmData=row
-
- },
- async handleExportModule() {
- let url = "/heart/iccommunityselforganization/import-template-download";
-
- let params = {};
- await this.$http({
- method: "POST",
- url,
- responseType: "blob",
- data: params,
- })
- .then((res) => {
- // this.download(res.data, title + '.xls')
- 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("网络错误");
- });
- },
- // 上传大图标成功
- handleExcelSuccess(res, file) {
- if (res.code === 0 && res.msg === "success") {
- console.log("resss---ppp", res);
- } else {
- this.$message.error(res.msg);
- }
- },
- handleProgress(event, file, fileList) {
- console.log("percentage", file.percentage);
- },
-
- 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;
- },
- async uploadHttpRequest(file) {
- this.importLoading = true;
- this.importBtnTitle = "正在上传中...";
- this.$message({
- showClose: true,
- dangerouslyUseHTMLString: true,
- message: "导入中,请到系统管理-导入记录中查看进度",
- duration: 3000
- });
- let than = this
- document.getElementById('clickA').addEventListener('click',function(){
- than.$router.replace('/main/importRecord-index');
- })
- const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加
- formData.append("file", file.file); //添加文件对象
- await this.$http
- .post(
- "/heart/iccommunityselforganization/importcommunityselforganization",
- formData
- )
- .then((res) => {
- console.log("res-up", res);
- if (res.data.code == 0 && res.data.msg == "success") {
- // this.$message.success('导入成功')
- this.getTableData();
- } else this.$message.error(res.data.msg);
- })
- .catch((err) => {
- console.log("失败", err);
- file.onError(); //上传失败的文件会从文件列表中删除
- // this.$message.error('导入失败')
- });
- // axios({
- // url:
- // window.SITE_CONFIG["apiURL"] +
- // "/heart/iccommunityselforganization/importcommunityselforganization",
- // method: "post",
- // data: formData,
- // // responseType: "blob",
- // })
- // .then((res) => {
- // this.importLoading = false;
- // this.importBtnTitle = "导入";
- // console.log("resresresresresresres", res);
-
- // this.getTableData();
- // if (res.data.code == 0) {
- // return this.$message.success(res.data.data || "导入成功");
- // } else {
- // return this.$message.error(res.data.msg);
- // }
- // })
- // .catch((err) => {
- // console.log("失败", err);
- // });
- this.importLoading = false;
- this.importBtnTitle = "导入";
- this.$refs.upload.clearFiles();
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
@@ -385,119 +303,26 @@
},
//查询
handleSearch(val) {
- console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
- resetForm(formName) {
- (this.fmData = {
- title: "",
- status: "",
- startDate: "",
- endDate: "",
- date: ["", ""],
- }),
- this.handleSearch();
- },
- async handleChu() {
- const url = "/governance/project/project-list-export";
- const { pageSize, pageNo, fmData } = this;
- axios({
- url: window.SITE_CONFIG["apiURL"] + url,
- method: "post",
- data: {
- pageSize,
- pageNo,
- ...fmData,
- },
- responseType: "blob",
- })
- .then((res) => {
- console.log(res);
- // 明明响应标头中有content-disposition但是打印的res中没有这个字段,暂时写死一个吧
- // let fileName = window.decodeURI(
- // res.headers["content-disposition"].split(";")[1].split("=")[1]
- // );
- let yy = new Date().getFullYear();
- var mm =
- new Date().getMonth() > 9
- ? new Date().getMonth() + 1
- : new Date().getMonth() == 9
- ? new Date().getMonth() + 1
- : "0" + (new Date().getMonth() + 1);
- var dd =
- new Date().getDate() < 10
- ? "0" + new Date().getDate()
- : new Date().getDate();
- let time = `${yy}-${mm}-${dd} `;
- let fileName = `项目管理${time}`;
- 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对象
- })
- .catch((err) => {
- console.log("获取导出情失败", err);
- return this.$message.error("网络错误");
- });
- },
async handleAdd() {
this.add=true
},
- async handleWatch(rowIndex) {
- let item = this.tableData[rowIndex];
- this.currentProject = {
- projectId: item.projectId,
- };
- this.pageType = "info";
- },
async handleEdit(row) {
this.fmData=row
this.recordshow=true
},
- handleClose() {
- this.pageType = "list";
- this.currentProject = {
- projectId: "",
- };
- },
- handleEditSuccess() {
- this.handleClose();
- this.getTableData();
- },
- async handleDel(rowData, rowIndex) {
- console.log(rowData, rowIndex);
- const url =
- "/heart/iccommunityselforganization/delcommunityselforganization";
- const { tableData } = this;
-
- const { data, code, msg } = await requestPost(url, {
- orgId: tableData[rowIndex].orgId,
- });
-
- if (code === 0) {
- this.$message.success("删除成功!");
- this.getTableData();
- } else {
- this.$message.success("操作失败!");
- }
- },
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/pointsAward/admin/list";
let params = {
pageNo: this.pageNo,
- shelveOnTimeFrom:"",
- redeemOrgId:"",
+ shelveOnTimeFrom:this.formData.shelveOnTimeFrom,
+ redeemOrgId:this.formData.redeemOrgId,
pageTo:this.pageSize,
- classKey:""
+ classKey:this.formData.classKey,
+ shelveOnTimeTo:this.formData.shelveOnTimeTo
}
const { data, code, msg } = await requestGet(url, params)
diff --git a/src/views/modules/volunteer/pointsRedemption/record.vue b/src/views/modules/volunteer/pointsRedemption/record.vue
index 56772ef63..ef87ec1f9 100644
--- a/src/views/modules/volunteer/pointsRedemption/record.vue
+++ b/src/views/modules/volunteer/pointsRedemption/record.vue
@@ -3,15 +3,15 @@
-
@@ -42,10 +42,10 @@
-
+