Pārlūkot izejas kodu

新增活动和积分Ui

skym1024 2 gadi atpakaļ
vecāks
revīzija
378b8e12b6

+ 44 - 0
src/api/community/activity.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询活动管理列表
+export function listActivity(query) {
+  return request({
+    url: '/community/activity/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询活动管理详细
+export function getActivity(activityId) {
+  return request({
+    url: '/community/activity/' + activityId,
+    method: 'get'
+  })
+}
+
+// 新增活动管理
+export function addActivity(data) {
+  return request({
+    url: '/community/activity',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改活动管理
+export function updateActivity(data) {
+  return request({
+    url: '/community/activity',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除活动管理
+export function delActivity(activityId) {
+  return request({
+    url: '/community/activity/' + activityId,
+    method: 'delete'
+  })
+}

+ 44 - 0
src/api/community/activitylog.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询活动记录列表
+export function listActivitylog(query) {
+  return request({
+    url: '/community/activitylog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询活动记录详细
+export function getActivitylog(activityLogId) {
+  return request({
+    url: '/community/activitylog/' + activityLogId,
+    method: 'get'
+  })
+}
+
+// 新增活动记录
+export function addActivitylog(data) {
+  return request({
+    url: '/community/activitylog',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改活动记录
+export function updateActivitylog(data) {
+  return request({
+    url: '/community/activitylog',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除活动记录
+export function delActivitylog(activityLogId) {
+  return request({
+    url: '/community/activitylog/' + activityLogId,
+    method: 'delete'
+  })
+}

+ 44 - 0
src/api/community/photo.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询活动照片列表
+export function listPhoto(query) {
+  return request({
+    url: '/community/photo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询活动照片详细
+export function getPhoto(activityPhotoId) {
+  return request({
+    url: '/community/photo/' + activityPhotoId,
+    method: 'get'
+  })
+}
+
+// 新增活动照片
+export function addPhoto(data) {
+  return request({
+    url: '/community/photo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改活动照片
+export function updatePhoto(data) {
+  return request({
+    url: '/community/photo',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除活动照片
+export function delPhoto(activityPhotoId) {
+  return request({
+    url: '/community/photo/' + activityPhotoId,
+    method: 'delete'
+  })
+}

+ 44 - 0
src/api/community/points.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询积分列表
+export function listPoints(query) {
+  return request({
+    url: '/community/points/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询积分详细
+export function getPoints(userId) {
+  return request({
+    url: '/community/points/' + userId,
+    method: 'get'
+  })
+}
+
+// 新增积分
+export function addPoints(data) {
+  return request({
+    url: '/community/points',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改积分
+export function updatePoints(data) {
+  return request({
+    url: '/community/points',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除积分
+export function delPoints(userId) {
+  return request({
+    url: '/community/points/' + userId,
+    method: 'delete'
+  })
+}

+ 44 - 0
src/api/community/pointslog.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询积分表更记录列表
+export function listPointslog(query) {
+  return request({
+    url: '/community/pointslog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询积分表更记录详细
+export function getPointslog(pointsLogId) {
+  return request({
+    url: '/community/pointslog/' + pointsLogId,
+    method: 'get'
+  })
+}
+
+// 新增积分表更记录
+export function addPointslog(data) {
+  return request({
+    url: '/community/pointslog',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改积分表更记录
+export function updatePointslog(data) {
+  return request({
+    url: '/community/pointslog',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除积分表更记录
+export function delPointslog(pointsLogId) {
+  return request({
+    url: '/community/pointslog/' + pointsLogId,
+    method: 'delete'
+  })
+}

+ 375 - 0
src/views/community/activity/index.vue

@@ -0,0 +1,375 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="主题" prop="topic">
+        <el-input
+          v-model="queryParams.topic"
+          placeholder="请输入主题"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="活动开始时间" prop="startTime">
+        <el-date-picker clearable
+          v-model="queryParams.startTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择活动开始时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="活动结束时间" prop="endTime">
+        <el-date-picker clearable
+          v-model="queryParams.endTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择活动结束时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="发起者" prop="sponsorName">
+        <el-input
+          v-model="queryParams.sponsorName"
+          placeholder="请输入发起者"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="联系电话" prop="sponsorPhone">
+        <el-input
+          v-model="queryParams.sponsorPhone"
+          placeholder="请输入联系电话"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['community:activity:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['community:activity:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['community:activity:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['community:activity:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="activityList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="活动Id" align="center" prop="activityId" />
+      <el-table-column label="主题" align="center" prop="topic" />
+      <el-table-column label="类型" align="center" prop="type" />
+      <el-table-column label="活动开始时间" align="center" prop="startTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="活动结束时间" align="center" prop="endTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="发起者" align="center" prop="sponsorName" />
+      <el-table-column label="联系电话" align="center" prop="sponsorPhone" />
+      <el-table-column label="活动状态" align="center" prop="status" />
+      <el-table-column label="奖励积分" align="center" prop="point" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['community:activity:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['community:activity:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改活动管理对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="主题" prop="topic">
+          <el-input v-model="form.topic" placeholder="请输入主题" />
+        </el-form-item>
+        <el-form-item label="宣传图片路径">
+          <image-upload v-model="form.image"/>
+        </el-form-item>
+        <el-form-item label="活动开始时间" prop="startTime">
+          <el-date-picker clearable
+            v-model="form.startTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择活动开始时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="活动结束时间" prop="endTime">
+          <el-date-picker clearable
+            v-model="form.endTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择活动结束时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="报名开始时间" prop="regStartTime">
+          <el-date-picker clearable
+            v-model="form.regStartTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择报名开始时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="报名截止时间" prop="regEndTime">
+          <el-date-picker clearable
+            v-model="form.regEndTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择报名截止时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="报名人数限制" prop="regMaxCount">
+          <el-input v-model="form.regMaxCount" placeholder="请输入报名人数限制" />
+        </el-form-item>
+        <el-form-item label="社区发起人Id" prop="sponsorSysId">
+          <el-input v-model="form.sponsorSysId" placeholder="请输入社区发起人Id" />
+        </el-form-item>
+        <el-form-item label="用户发起人Id" prop="sponsorUserId">
+          <el-input v-model="form.sponsorUserId" placeholder="请输入用户发起人Id" />
+        </el-form-item>
+        <el-form-item label="发起者" prop="sponsorName">
+          <el-input v-model="form.sponsorName" placeholder="请输入发起者" />
+        </el-form-item>
+        <el-form-item label="联系电话" prop="sponsorPhone">
+          <el-input v-model="form.sponsorPhone" placeholder="请输入联系电话" />
+        </el-form-item>
+        <el-form-item label="活动简介" prop="description">
+          <el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="奖励积分" prop="point">
+          <el-input v-model="form.point" placeholder="请输入奖励积分" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listActivity, getActivity, delActivity, addActivity, updateActivity } from "@/api/community/activity";
+
+export default {
+  name: "Activity",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 活动管理表格数据
+      activityList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        topic: null,
+        type: null,
+        startTime: null,
+        endTime: null,
+        sponsorName: null,
+        sponsorPhone: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询活动管理列表 */
+    getList() {
+      this.loading = true;
+      listActivity(this.queryParams).then(response => {
+        this.activityList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        activityId: null,
+        topic: null,
+        type: null,
+        image: null,
+        startTime: null,
+        endTime: null,
+        regStartTime: null,
+        regEndTime: null,
+        regMaxCount: null,
+        sponsorType: null,
+        sponsorSysId: null,
+        sponsorUserId: null,
+        sponsorName: null,
+        sponsorPhone: null,
+        description: null,
+        status: "0",
+        point: null,
+        createTime: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.activityId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加活动管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const activityId = row.activityId || this.ids
+      getActivity(activityId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改活动管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.activityId != null) {
+            updateActivity(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addActivity(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const activityIds = row.activityId || this.ids;
+      this.$modal.confirm('是否确认删除活动管理编号为"' + activityIds + '"的数据项?').then(function() {
+        return delActivity(activityIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('community/activity/export', {
+        ...this.queryParams
+      }, `activity_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 273 - 0
src/views/community/activitylog/index.vue

@@ -0,0 +1,273 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="活动Id" prop="activityId">
+        <el-input
+          v-model="queryParams.activityId"
+          placeholder="请输入活动Id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="用户Id" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入用户Id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['community:activitylog:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['community:activitylog:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['community:activitylog:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['community:activitylog:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="activitylogList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="活动记录Id" align="center" prop="activityLogId" />
+      <el-table-column label="活动Id" align="center" prop="activityId" />
+      <el-table-column label="用户Id" align="center" prop="userId" />
+      <el-table-column label="签到状态" align="center" prop="checkinStatus" />
+      <el-table-column label="积分发放状态" align="center" prop="pointStatus" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['community:activitylog:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['community:activitylog:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改活动记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="活动Id" prop="activityId">
+          <el-input v-model="form.activityId" placeholder="请输入活动Id" />
+        </el-form-item>
+        <el-form-item label="用户Id" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入用户Id" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listActivitylog, getActivitylog, delActivitylog, addActivitylog, updateActivitylog } from "@/api/community/activitylog";
+
+export default {
+  name: "Activitylog",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 活动记录表格数据
+      activitylogList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        activityId: null,
+        userId: null,
+        checkinStatus: null,
+        pointStatus: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        activityId: [
+          { required: true, message: "活动Id不能为空", trigger: "blur" }
+        ],
+        userId: [
+          { required: true, message: "用户Id不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询活动记录列表 */
+    getList() {
+      this.loading = true;
+      listActivitylog(this.queryParams).then(response => {
+        this.activitylogList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        activityLogId: null,
+        activityId: null,
+        userId: null,
+        checkinStatus: "0",
+        pointStatus: "0",
+        createTime: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.activityLogId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加活动记录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const activityLogId = row.activityLogId || this.ids
+      getActivitylog(activityLogId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改活动记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.activityLogId != null) {
+            updateActivitylog(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addActivitylog(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const activityLogIds = row.activityLogId || this.ids;
+      this.$modal.confirm('是否确认删除活动记录编号为"' + activityLogIds + '"的数据项?').then(function() {
+        return delActivitylog(activityLogIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('community/activitylog/export', {
+        ...this.queryParams
+      }, `activitylog_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 256 - 0
src/views/community/photo/index.vue

@@ -0,0 +1,256 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="活动记录Id" prop="activityLogId">
+        <el-input
+          v-model="queryParams.activityLogId"
+          placeholder="请输入活动记录Id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['community:photo:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['community:photo:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['community:photo:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['community:photo:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="photoList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="活动图片Id" align="center" prop="activityPhotoId" />
+      <el-table-column label="活动记录Id" align="center" prop="activityLogId" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['community:photo:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['community:photo:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改活动照片对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="活动记录Id" prop="activityLogId">
+          <el-input v-model="form.activityLogId" placeholder="请输入活动记录Id" />
+        </el-form-item>
+        <el-form-item label="图片路径" prop="photo">
+          <el-input v-model="form.photo" placeholder="请输入图片路径" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPhoto, getPhoto, delPhoto, addPhoto, updatePhoto } from "@/api/community/photo";
+
+export default {
+  name: "Photo",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 活动照片表格数据
+      photoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        activityLogId: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        activityLogId: [
+          { required: true, message: "活动记录Id不能为空", trigger: "blur" }
+        ],
+        photo: [
+          { required: true, message: "图片路径不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询活动照片列表 */
+    getList() {
+      this.loading = true;
+      listPhoto(this.queryParams).then(response => {
+        this.photoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        activityPhotoId: null,
+        activityLogId: null,
+        photo: null,
+        createTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.activityPhotoId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加活动照片";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const activityPhotoId = row.activityPhotoId || this.ids
+      getPhoto(activityPhotoId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改活动照片";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.activityPhotoId != null) {
+            updatePhoto(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPhoto(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const activityPhotoIds = row.activityPhotoId || this.ids;
+      this.$modal.confirm('是否确认删除活动照片编号为"' + activityPhotoIds + '"的数据项?').then(function() {
+        return delPhoto(activityPhotoIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('community/photo/export', {
+        ...this.queryParams
+      }, `photo_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 250 - 0
src/views/community/points/index.vue

@@ -0,0 +1,250 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="用户Id" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入用户Id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['community:points:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['community:points:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['community:points:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['community:points:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="pointsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="用户Id" align="center" prop="userId" />
+      <el-table-column label="荣誉积分" align="center" prop="honorPoints" />
+      <el-table-column label="消费积分" align="center" prop="spendPoints" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['community:points:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['community:points:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改积分对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="荣誉积分" prop="honorPoints">
+          <el-input v-model="form.honorPoints" placeholder="请输入荣誉积分" />
+        </el-form-item>
+        <el-form-item label="消费积分" prop="spendPoints">
+          <el-input v-model="form.spendPoints" placeholder="请输入消费积分" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPoints, getPoints, delPoints, addPoints, updatePoints } from "@/api/community/points";
+
+export default {
+  name: "Points",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 积分表格数据
+      pointsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询积分列表 */
+    getList() {
+      this.loading = true;
+      listPoints(this.queryParams).then(response => {
+        this.pointsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        userId: null,
+        honorPoints: null,
+        spendPoints: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.userId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加积分";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const userId = row.userId || this.ids
+      getPoints(userId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改积分";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.userId != null) {
+            updatePoints(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPoints(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const userIds = row.userId || this.ids;
+      this.$modal.confirm('是否确认删除积分编号为"' + userIds + '"的数据项?').then(function() {
+        return delPoints(userIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('community/points/export', {
+        ...this.queryParams
+      }, `points_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 272 - 0
src/views/community/pointslog/index.vue

@@ -0,0 +1,272 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="用户Id" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入用户Id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['community:pointslog:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['community:pointslog:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['community:pointslog:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['community:pointslog:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="pointslogList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="自增ID" align="center" prop="pointsLogId" />
+      <el-table-column label="用户Id" align="center" prop="userId" />
+      <el-table-column label="变更类型" align="center" prop="changeType" />
+      <el-table-column label="变更数值" align="center" prop="changePoints" />
+      <el-table-column label="变更原因" align="center" prop="changeReason" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['community:pointslog:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['community:pointslog:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改积分表更记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="用户Id" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入用户Id" />
+        </el-form-item>
+        <el-form-item label="变更数值" prop="changePoints">
+          <el-input v-model="form.changePoints" placeholder="请输入变更数值" />
+        </el-form-item>
+        <el-form-item label="变更原因" prop="changeReason">
+          <el-input v-model="form.changeReason" placeholder="请输入变更原因" />
+        </el-form-item>
+        <el-form-item label="变更事件关联Id" prop="relationId">
+          <el-input v-model="form.relationId" placeholder="请输入变更事件关联Id" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPointslog, getPointslog, delPointslog, addPointslog, updatePointslog } from "@/api/community/pointslog";
+
+export default {
+  name: "Pointslog",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 积分表更记录表格数据
+      pointslogList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: null,
+        changeType: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        userId: [
+          { required: true, message: "用户Id不能为空", trigger: "blur" }
+        ],
+        changeType: [
+          { required: true, message: "变更类型不能为空", trigger: "change" }
+        ],
+        relationId: [
+          { required: true, message: "变更事件关联Id不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询积分表更记录列表 */
+    getList() {
+      this.loading = true;
+      listPointslog(this.queryParams).then(response => {
+        this.pointslogList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        pointsLogId: null,
+        userId: null,
+        changeType: null,
+        changePoints: null,
+        changeReason: null,
+        createTime: null,
+        relationId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.pointsLogId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加积分表更记录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const pointsLogId = row.pointsLogId || this.ids
+      getPointslog(pointsLogId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改积分表更记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.pointsLogId != null) {
+            updatePointslog(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPointslog(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const pointsLogIds = row.pointsLogId || this.ids;
+      this.$modal.confirm('是否确认删除积分表更记录编号为"' + pointsLogIds + '"的数据项?').then(function() {
+        return delPointslog(pointsLogIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('community/pointslog/export', {
+        ...this.queryParams
+      }, `pointslog_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>