Bladeren bron

迁移页面

yfh 4 dagen geleden
bovenliggende
commit
b672f2c44c

+ 53 - 0
src/api/his/articleViews.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询文章阅读列表
+export function listArticleViews(query) {
+  return request({
+    url: '/his/articleViews/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询文章阅读详细
+export function getArticleViews(viewId) {
+  return request({
+    url: '/his/articleViews/' + viewId,
+    method: 'get'
+  })
+}
+
+// 新增文章阅读
+export function addArticleViews(data) {
+  return request({
+    url: '/his/articleViews',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改文章阅读
+export function updateArticleViews(data) {
+  return request({
+    url: '/his/articleViews',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除文章阅读
+export function delArticleViews(viewId) {
+  return request({
+    url: '/his/articleViews/' + viewId,
+    method: 'delete'
+  })
+}
+
+// 导出文章阅读
+export function exportArticleViews(query) {
+  return request({
+    url: '/his/articleViews/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/his/homeArticle.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询期刊列表
+export function listHomeArticle(query) {
+  return request({
+    url: '/his/homeArticle/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询期刊详细
+export function getHomeArticle(articleId) {
+  return request({
+    url: '/his/homeArticle/' + articleId,
+    method: 'get'
+  })
+}
+
+// 新增期刊
+export function addHomeArticle(data) {
+  return request({
+    url: '/his/homeArticle',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改期刊
+export function updateHomeArticle(data) {
+  return request({
+    url: '/his/homeArticle',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除期刊
+export function delHomeArticle(articleId) {
+  return request({
+    url: '/his/homeArticle/' + articleId,
+    method: 'delete'
+  })
+}
+
+// 导出期刊
+export function exportHomeArticle(query) {
+  return request({
+    url: '/his/homeArticle/export',
+    method: 'get',
+    params: query
+  })
+}

+ 62 - 0
src/api/his/homeCategory.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询期刊分类列表
+export function listHomeCategory(query) {
+  return request({
+    url: '/his/homeCategory/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询期刊分类详细
+export function getHomeCategory(categoryId) {
+  return request({
+    url: '/his/homeCategory/' + categoryId,
+    method: 'get'
+  })
+}
+
+// 新增期刊分类
+export function addHomeCategory(data) {
+  return request({
+    url: '/his/homeCategory',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改期刊分类
+export function updateHomeCategory(data) {
+  return request({
+    url: '/his/homeCategory',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除期刊分类
+export function delHomeCategory(categoryId) {
+  return request({
+    url: '/his/homeCategory/' + categoryId,
+    method: 'delete'
+  })
+}
+
+// 导出期刊分类
+export function exportHomeCategory(query) {
+  return request({
+    url: '/his/homeCategory/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询期刊分类列表(所有)
+export function allListHomeCategory(query) {
+  return request({
+    url: '/his/homeCategory/allList',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/his/homeView.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询期刊阅读列表
+export function listHomeView(query) {
+  return request({
+    url: '/his/homeView/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询期刊阅读详细
+export function getHomeView(viewId) {
+  return request({
+    url: '/his/homeView/' + viewId,
+    method: 'get'
+  })
+}
+
+// 新增期刊阅读
+export function addHomeView(data) {
+  return request({
+    url: '/his/homeView',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改期刊阅读
+export function updateHomeView(data) {
+  return request({
+    url: '/his/homeView',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除期刊阅读
+export function delHomeView(viewId) {
+  return request({
+    url: '/his/homeView/' + viewId,
+    method: 'delete'
+  })
+}
+
+// 导出期刊阅读
+export function exportHomeView(query) {
+  return request({
+    url: '/his/homeView/export',
+    method: 'get',
+    params: query
+  })
+}

+ 7 - 7
src/api/hisStore/integralGoods.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询积分商品列表
 export function listIntegralGoods(query) {
   return request({
-    url: '/store/his/integralGoods/list',
+    url: '/his/integralGoods/list',
     method: 'get',
     params: query
   })
@@ -12,20 +12,20 @@ export function listIntegralGoods(query) {
 // 查询积分商品详细
 export function getIntegralGoods(goodsId) {
   return request({
-    url: '/store/his/integralGoods/' + goodsId,
+    url: '/his/integralGoods/' + goodsId,
     method: 'get'
   })
 }
 export function importTemplate() {
   return request({
-    url: '/store/his/integralGoods/importTemplate',
+    url: '/his/integralGoods/importTemplate',
     method: 'get'
   })
 }
 // 新增积分商品
 export function addIntegralGoods(data) {
   return request({
-    url: '/store/his/integralGoods',
+    url: '/his/integralGoods',
     method: 'post',
     data: data
   })
@@ -34,7 +34,7 @@ export function addIntegralGoods(data) {
 // 修改积分商品
 export function updateIntegralGoods(data) {
   return request({
-    url: '/store/his/integralGoods',
+    url: '/his/integralGoods',
     method: 'put',
     data: data
   })
@@ -43,7 +43,7 @@ export function updateIntegralGoods(data) {
 // 删除积分商品
 export function delIntegralGoods(goodsId) {
   return request({
-    url: '/store/his/integralGoods/' + goodsId,
+    url: '/his/integralGoods/' + goodsId,
     method: 'delete'
   })
 }
@@ -51,7 +51,7 @@ export function delIntegralGoods(goodsId) {
 // 导出积分商品
 export function exportIntegralGoods(query) {
   return request({
-    url: '/store/his/integralGoods/export',
+    url: '/his/integralGoods/export',
     method: 'get',
     params: query
   })

+ 62 - 0
src/api/hisStore/userExtract.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询用户提现列表
+export function listUserExtract(query) {
+  return request({
+    url: '/his/userExtract/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询用户提现详细
+export function getUserExtract(id) {
+  return request({
+    url: '/his/userExtract/' + id,
+    method: 'get'
+  })
+}
+
+// 新增用户提现
+export function addUserExtract(data) {
+  return request({
+    url: '/his/userExtract',
+    method: 'post',
+    data: data
+  })
+}
+export function audit(data) {
+  return request({
+    url: '/his/userExtract/audit',
+    method: 'post',
+    data: data
+  })
+}
+
+
+
+// 修改用户提现
+export function updateUserExtract(data) {
+  return request({
+    url: '/his/userExtract',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除用户提现
+export function delUserExtract(id) {
+  return request({
+    url: '/his/userExtract/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出用户提现
+export function exportUserExtract(query) {
+  return request({
+    url: '/his/userExtract/export',
+    method: 'get',
+    params: query
+  })
+}

+ 200 - 0
src/views/his/articleViews/index.vue

@@ -0,0 +1,200 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="文章标题" prop="articleTitle">
+        <el-input
+          v-model="queryParams.articleTitle"
+          placeholder="请输入文章标题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" 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-table  height="500" border v-loading="loading" :data="articleViewsList" >
+      <el-table-column label="ID" align="center" prop="viewId" />
+      <el-table-column label="文章" align="center" prop="articleTitle" />
+      <el-table-column label="会员昵称" align="center" prop="nickname" />
+      <el-table-column label="会员头像" align="center" width="80">
+        <template slot-scope="scope">
+          <el-popover
+            placement="right"
+            title=""
+            trigger="hover"
+          >
+            <img slot="reference" :src="scope.row.avatar" width="50" >
+            <img :src="scope.row.avatar" style="max-width: 120px;">
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column label="浏览时间" align="center" prop="createTime" />
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+
+  </div>
+</template>
+
+<script>
+import { listArticleViews, getArticleViews, delArticleViews, addArticleViews, updateArticleViews, exportArticleViews } from "@/api/his/articleViews";
+
+export default {
+  name: "ArticleViews",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 文章阅读表格数据
+      articleViewsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        articleId: null,
+        userId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询文章阅读列表 */
+    getList() {
+      this.loading = true;
+      listArticleViews(this.queryParams).then(response => {
+        this.articleViewsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        viewId: null,
+        articleId: null,
+        userId: 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.viewId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加文章阅读";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const viewId = row.viewId || this.ids
+      getArticleViews(viewId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改文章阅读";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.viewId != null) {
+            updateArticleViews(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addArticleViews(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const viewIds = row.viewId || this.ids;
+      this.$confirm('是否确认删除文章阅读编号为"' + viewIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delArticleViews(viewIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有文章阅读数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportArticleViews(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        }).catch(function() {});
+    }
+  }
+};
+</script>

+ 490 - 0
src/views/his/homeArticle/index.vue

@@ -0,0 +1,490 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="分类" prop="categoryId">
+        <el-select v-model="queryParams.categoryId" placeholder="请选择分类" clearable size="small">
+          <el-option
+            v-for="dict in categoryOptions"
+            :key="dict.categoryId"
+            :label="dict.categoryName"
+            :value="dict.categoryId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="标题" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="发布状态" prop="publicStatus">
+        <el-select v-model="queryParams.publicStatus" placeholder="请选择发布状态" clearable size="small">
+          <el-option label="已发布" value="1" />
+          <el-option label="草稿" value="2" />
+        </el-select>
+      </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"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['store:homeArticle:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['store:homeArticle:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['store:homeArticle:remove']"
+        >删除</el-button>
+      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExport"-->
+<!--          v-hasPermi="['store:homeArticle:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="homeArticleList" @selection-change="handleSelectionChange" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="分类" align="center" prop="categoryName" />
+      <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="封面图片" align="center" prop="imageUrl">
+        <template slot-scope="scope">
+          <el-image
+            style="width: 80px; height: 50px"
+            :src="scope.row.imageUrl"
+            :preview-src-list="[scope.row.imageUrl]"
+            fit="cover">
+          </el-image>
+        </template>
+      </el-table-column>
+      <el-table-column label="浏览数" align="center" prop="views" width="80" />
+      <el-table-column label="发布时间" align="center" prop="publishTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.publishTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="160"/>
+      <el-table-column label="发布状态" align="center" prop="publicStatus" width="100">
+        <template slot-scope="scope">
+          <el-tag type="success" v-if="scope.row.publicStatus == 1">已发布</el-tag>
+          <el-tag type="info" v-else-if="scope.row.publicStatus == 2">草稿</el-tag>
+        </template>
+      </el-table-column>
+      <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="['store:homeArticle:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['store:homeArticle: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="900px" append-to-body :close-on-click-modal="false">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="分类" prop="categoryId">
+          <el-select v-model="form.categoryId" placeholder="请选择分类" filterable>
+            <el-option
+              v-for="dict in categoryOptions"
+              :key="dict.categoryId"
+              :label="dict.categoryName"
+              :value="dict.categoryId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="标题" prop="title">
+          <el-input v-model="form.title" placeholder="请输入标题" maxlength="100"/>
+        </el-form-item>
+        <el-form-item label="描述" prop="description">
+          <el-input v-model="form.description" placeholder="请输入描述内容" maxlength="200"/>
+        </el-form-item>
+        <el-form-item label="封面图片" prop="imageUrl">
+          <el-upload
+            class="avatar-uploader"
+            :action="uploadUrl"
+            :show-file-list="false"
+            :on-success="handleImageUrlSuccess"
+            :before-upload="beforeImageUrlUpload">
+            <img v-if="form.imageUrl" :src="form.imageUrl" class="avatar" width="200px">
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="是否推荐" prop="isTui">
+          <el-radio-group v-model="form.isTui">
+            <el-radio :label="1">是</el-radio>
+            <el-radio :label="0">否</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="视频地址" prop="videoUrl">
+          <div>
+            <el-upload
+              ref="upload"
+              class="upload-demo"
+              :action="uploadUrl"
+              :on-success="handleVideoSuccess"
+              :before-upload="beforeVideoUpload"
+              :limit="1"
+              :accept="videoAccept"
+            >
+              <el-button size="small" type="primary">点击上传视频</el-button>
+            </el-upload>
+            <video v-if="form.videoUrl" :src="form.videoUrl" controls style="max-width: 400px; max-height: 200px;"></video>
+          </div>
+        </el-form-item>
+        <el-form-item label="内容" prop="content">
+          <Editor ref="myeditor" @on-text-change="updateText"/>
+        </el-form-item>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="浏览数" prop="views">
+              <el-input-number v-model="form.views" :min="0" placeholder="请输入浏览数" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="排序" prop="sort">
+              <el-input-number v-model="form.sort" :min="0" placeholder="请输入排序" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item label="发布状态" prop="publicStatus">
+          <el-select v-model="form.publicStatus" placeholder="请选择发布状态">
+            <el-option label="已发布" value="1" />
+            <el-option label="草稿" value="2" />
+          </el-select>
+        </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 { listHomeArticle, getHomeArticle, delHomeArticle, addHomeArticle, updateHomeArticle, exportHomeArticle } from "@/api/his/homeArticle";
+import { listHomeCategory, allListHomeCategory } from "@/api/his/homeCategory";
+import Editor from '@/components/Editor/wang';
+
+export default {
+  name: "HomeArticle",
+  components: { Editor },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 文章表格数据
+      homeArticleList: [],
+      // 分类选项
+      categoryOptions: [],
+      // 上传URL
+      uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadOSS",
+      // 视频接受类型
+      videoAccept: "video/*",
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        categoryId: null,
+        title: null,
+        publicStatus: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        categoryId: [
+          { required: true, message: "分类不能为空", trigger: "change" }
+        ],
+        title: [
+          { required: true, message: "标题不能为空", trigger: "blur" }
+        ],
+        description: [
+          { required: true, message: "发布状态不能为空", trigger: "change" }
+        ],
+        imageUrl: [
+          { required: true, message: "封面图片不能为空", trigger: "change" }
+        ],
+        publicStatus: [
+          { required: true, message: "发布状态不能为空", trigger: "change" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getCategoryOptions();
+  },
+  methods: {
+    /** 获取分类选项 */
+    getCategoryOptions() {
+      allListHomeCategory().then(response => {
+        this.categoryOptions = response.rows;
+      });
+    },
+    /** 查询文章列表 */
+    getList() {
+      this.loading = true;
+      listHomeArticle(this.queryParams).then(response => {
+        this.homeArticleList = response.rows.list;
+        this.total = response.rows.total;
+        this.loading = false;
+      });
+    },
+    // 视频上传成功处理
+    handleVideoSuccess(response, file) {
+      if (response.code == 200) {
+        this.form.videoUrl = response.url;
+        this.$refs.upload.clearFiles();
+      } else {
+        this.msgError(response.msg);
+      }
+    },
+    // 视频上传前的验证
+    beforeVideoUpload(file) {
+      const isLt200M = file.size / 1024 / 1024 < 200;
+      if (!isLt200M) {
+        this.$message.error('上传视频文件大小不能超过200MB!');
+        return false;
+      }
+      return isLt200M;
+    },
+    // 更新富文本内容
+    updateText(text) {
+      this.form.content = text;
+    },
+    // 图片上传成功处理
+    handleImageUrlSuccess(res, file) {
+      if (res.code == 200) {
+        this.form.imageUrl = res.url;
+        this.$forceUpdate();
+      } else {
+        this.msgError(res.msg);
+      }
+    },
+    // 图片上传前的验证
+    beforeImageUrlUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过1MB!');
+      }
+      return isLt1M;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        articleId: null,
+        categoryId: null,
+        title: null,
+        description: null,
+        imageUrl: null,
+        isTui: 0,
+        videoUrl: null,
+        content: null,
+        views: 0,
+        sort: 0,
+        publishTime: null,
+        publicStatus: "1"
+      };
+      this.resetForm("form");
+      if (this.$refs.myeditor) {
+        this.$refs.myeditor.setText("");
+      }
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.articleId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加文章";
+      setTimeout(() => {
+        if (this.$refs.myeditor) {
+          this.$refs.myeditor.setText("");
+        }
+      }, 100);
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const articleId = row.articleId || this.ids
+      getHomeArticle(articleId).then(response => {
+        this.form = response.data;
+        // 确保状态是字符串类型
+        this.form.publicStatus = this.form.publicStatus ? this.form.publicStatus.toString() : "1";
+        this.open = true;
+        this.title = "修改文章";
+        setTimeout(() => {
+          if (this.$refs.myeditor) {
+            if (this.form.content == null) {
+              this.$refs.myeditor.setText("");
+            } else {
+              this.$refs.myeditor.setText(this.form.content);
+            }
+          }
+        }, 100);
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.articleId != null) {
+            updateHomeArticle(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addHomeArticle(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const articleIds = row.articleId || this.ids;
+      this.$confirm('是否确认删除该文章?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delHomeArticle(articleIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    },
+    // /** 导出按钮操作 */
+    // handleExport() {
+    //   const queryParams = this.queryParams;
+    //   this.$confirm('是否确认导出所有文章数据项?', "警告", {
+    //       confirmButtonText: "确定",
+    //       cancelButtonText: "取消",
+    //       type: "warning"
+    //     }).then(function() {
+    //       return exportHomeArticle(queryParams);
+    //     }).then(response => {
+    //       this.download(response.msg);
+    //     }).catch(function() {});
+    // }
+  }
+};
+</script>
+
+<style>
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409EFF;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 150px;
+  height: 150px;
+  line-height: 150px;
+  text-align: center;
+}
+.avatar {
+  width: 150px;
+  height: 150px;
+  display: block;
+}
+</style>

+ 365 - 0
src/views/his/homeCategory/index.vue

@@ -0,0 +1,365 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="分类名称" prop="categoryName">
+        <el-input
+          v-model="queryParams.categoryName"
+          placeholder="请输入分类名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option label="正常" value="1" />
+          <el-option label="禁用" value="0" />
+        </el-select>
+      </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"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['store:homeCategory:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['store:homeCategory:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['store:homeCategory:remove']"
+        >删除</el-button>
+      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExport"-->
+<!--          v-hasPermi="['store:homeCategory:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="homeCategoryList" @selection-change="handleSelectionChange" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="分类名称" align="center" prop="categoryName" />
+      <el-table-column label="封面图片" align="center" prop="imageUrl">
+        <template slot-scope="scope">
+          <el-image
+            style="width: 80px; height: 50px"
+            :src="scope.row.imageUrl"
+            :preview-src-list="[scope.row.imageUrl]"
+            fit="cover">
+          </el-image>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <el-tag type="success" v-if="scope.row.status == 1">正常</el-tag>
+          <el-tag type="danger" v-else>禁用</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="排序" align="center" prop="sort" />
+      <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="['store:homeCategory:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['store:homeCategory: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 :close-on-click-modal="false">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="分类名称" prop="categoryName">
+          <el-input v-model="form.categoryName" placeholder="请输入分类名称" />
+        </el-form-item>
+        <el-form-item label="封面图片" prop="imageUrl">
+          <el-upload
+            class="avatar-uploader"
+            :action="uploadUrl"
+            :show-file-list="false"
+            :on-success="handleImageUrlSuccess"
+            :before-upload="beforeImageUrlUpload">
+            <img v-if="form.imageUrl" :src="form.imageUrl" class="avatar" width="200px">
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort" placeholder="请输入排序" :min="0" controls-position="right" />
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="form.status">
+            <el-radio :label="1">正常</el-radio>
+            <el-radio :label="0">禁用</el-radio>
+          </el-radio-group>
+        </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 { listHomeCategory, getHomeCategory, delHomeCategory, addHomeCategory, updateHomeCategory, exportHomeCategory } from "@/api/his/homeCategory";
+
+export default {
+  name: "HomeCategory",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 文章分类表格数据
+      homeCategoryList: [],
+      // 上传URL
+      uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadOSS",
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        categoryName: null,
+        status: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        categoryName: [
+          { required: true, message: "分类名称不能为空", trigger: "blur" }
+        ],
+        imageUrl: [
+          { required: true, message: "封面图片不能为空", trigger: "change" }
+        ],
+        status: [
+          { required: true, message: "状态不能为空", trigger: "change" }
+        ],
+        sort: [
+          { required: true, message: "排序不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询文章分类列表 */
+    getList() {
+      this.loading = true;
+      listHomeCategory(this.queryParams).then(response => {
+        this.homeCategoryList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        categoryId: null,
+        categoryName: null,
+        imageUrl: null,
+        status: 1,
+        sort: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.categoryId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加文章分类";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const categoryId = row.categoryId || this.ids
+      getHomeCategory(categoryId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改文章分类";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.categoryId != null) {
+            updateHomeCategory(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addHomeCategory(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const categoryIds = row.categoryId || this.ids;
+      if (row.status === 1) {
+        this.$message.warning('非禁用的分类不能删除');
+      } else {
+        this.$confirm('是否确认删除该文章分类?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delHomeCategory(categoryIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {
+        });
+      }
+    },
+    // /** 导出按钮操作 */
+    // handleExport() {
+    //   const queryParams = this.queryParams;
+    //   this.$confirm('是否确认导出所有文章分类数据项?', "警告", {
+    //       confirmButtonText: "确定",
+    //       cancelButtonText: "取消",
+    //       type: "warning"
+    //     }).then(function() {
+    //       return exportHomeCategory(queryParams);
+    //     }).then(response => {
+    //       this.download(response.msg);
+    //     }).catch(function() {});
+    // },
+    // 图片上传成功处理
+    handleImageUrlSuccess(res, file) {
+      if (res.code == 200) {
+        this.form.imageUrl = res.url;
+        this.$forceUpdate();
+      } else {
+        this.msgError(res.msg);
+      }
+    },
+    // 图片上传前的验证
+    beforeImageUrlUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过1MB!');
+      }
+      return isLt1M;
+    }
+  }
+};
+</script>
+
+<style>
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409EFF;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 150px;
+  height: 150px;
+  line-height: 150px;
+  text-align: center;
+}
+.avatar {
+  width: 150px;
+  height: 150px;
+  display: block;
+}
+</style>

+ 289 - 0
src/views/his/homeView/index.vue

@@ -0,0 +1,289 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="文章标题" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入文章标题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="用户电话" prop="phone">
+        <el-input
+          v-model="queryParams.phone"
+          placeholder="请输入用户电话"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" 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"-->
+<!--          icon="el-icon-plus"-->
+<!--          size="mini"-->
+<!--          @click="handleAdd"-->
+<!--          v-hasPermi="['store:homeView:add']"-->
+<!--        >新增</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="success"-->
+<!--          icon="el-icon-edit"-->
+<!--          size="mini"-->
+<!--          :disabled="single"-->
+<!--          @click="handleUpdate"-->
+<!--          v-hasPermi="['store:homeView:edit']"-->
+<!--        >修改</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="danger"-->
+<!--          icon="el-icon-delete"-->
+<!--          size="mini"-->
+<!--          :disabled="multiple"-->
+<!--          @click="handleDelete"-->
+<!--          v-hasPermi="['store:homeView:remove']"-->
+<!--        >删除</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExport"-->
+<!--          v-hasPermi="['store:homeView:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
+<!--	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
+<!--    </el-row>-->
+
+    <el-table v-loading="loading" :data="homeViewList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="文章标题" align="center" prop="title" :show-overflow-tooltip="true" />
+      <el-table-column label="用户昵称" align="center" prop="nickname" />
+      <el-table-column label="用户电话" align="center" prop="phone" />
+<!--      <el-table-column label="用户头像" align="center" prop="avatar">-->
+<!--        <template slot-scope="scope">-->
+<!--          <el-image-->
+<!--            style="width: 50px; height: 50px"-->
+<!--            :src="scope.row.avatar"-->
+<!--            fit="cover"-->
+<!--            :preview-src-list="[scope.row.avatar]">-->
+<!--          </el-image>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
+<!--      <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="['store:homeView:edit']"-->
+<!--          >修改</el-button>-->
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-delete"-->
+<!--            @click="handleDelete(scope.row)"-->
+<!--            v-hasPermi="['store:homeView: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="title">
+          <el-input v-model="form.title" placeholder="请输入文章标题" />
+        </el-form-item>
+        <el-form-item label="用户昵称" prop="nickname">
+          <el-input v-model="form.nickname" placeholder="请输入用户昵称" />
+        </el-form-item>
+        <el-form-item label="用户头像" prop="avatar">
+          <el-input v-model="form.avatar" placeholder="请输入用户头像URL" />
+        </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 { listHomeView, getHomeView, delHomeView, addHomeView, updateHomeView, exportHomeView } from "@/api/his/homeView";
+
+export default {
+  name: "HomeView",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 倍力之家_文章阅读表格数据
+      homeViewList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        title: null,
+        nickname: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询倍力之家_文章阅读列表 */
+    getList() {
+      this.loading = true;
+      listHomeView(this.queryParams).then(response => {
+        console.log(response)
+        this.homeViewList = response.rows.list;
+        this.total = response.rows.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        viewId: null,
+        title: null,
+        nickname: null,
+        avatar: 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.viewId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加倍力之家_文章阅读";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const viewId = row.viewId || this.ids
+      getHomeView(viewId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改倍力之家_文章阅读";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.viewId != null) {
+            updateHomeView(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addHomeView(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const viewIds = row.viewId || this.ids;
+      this.$confirm('是否确认删除倍力之家_文章阅读编号为"' + viewIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delHomeView(viewIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有倍力之家_文章阅读数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportHomeView(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        }).catch(function() {});
+    }
+  }
+};
+</script>

+ 316 - 0
src/views/hisStore/userExtract/index.vue

@@ -0,0 +1,316 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+      <el-form-item label="会员昵称" prop="nickname">
+        <el-input
+
+          v-model="queryParams.nickname"
+          placeholder="请输入会员昵称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="手机号码" prop="phone">
+        <el-input
+
+          v-model="queryParams.phone"
+          placeholder="请输入手机号码"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="提交时间" prop="createTime">
+        <el-date-picker clearable size="small" style="width: 205.4px"
+          v-model="queryParams.createTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择提交时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select style="width: 200px" v-model="queryParams.status" placeholder="请选择状态" clearable size="small" >
+         <el-option
+                v-for="item in statusOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" 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="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['store:userExtract:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row> -->
+
+    <el-table  height="500" border v-loading="loading" :data="userExtractList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="ID" align="center" prop="id" />
+      <el-table-column label="会员昵称" align="center" prop="nickname" />
+      <el-table-column label="会员手机号" align="center" prop="phone" />
+      <el-table-column label="提现类型" align="center" prop="extractType" />
+      <!-- <el-table-column label="银行卡" align="center" prop="bankCode" />
+      <el-table-column label="开户地址" align="center" prop="bankAddress" />
+      <el-table-column label="支付宝账号" align="center" prop="alipayCode" /> -->
+      <el-table-column label="提现金额" align="center" prop="extractPrice" />
+      <el-table-column label="余额" align="center" prop="balance" />
+      <el-table-column label="审核原因" align="center" prop="failMsg" />
+      <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+              <el-tag prop="status" v-for="(item, index) in statusOptions"    v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
+          </template>
+      </el-table-column>
+      <el-table-column label="提交时间" align="center" prop="createTime" />
+      <el-table-column label="审核时间" align="center" prop="updateTime" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.status==0"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleAudit(scope.row)"
+            v-hasPermi="['store:userExtract:audit']"
+          >审核</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="100px">
+
+        <el-form-item label="会员昵称" prop="nickname">
+          <el-input v-model="form.nickname" disabled   />
+        </el-form-item>
+        <el-form-item label="会员手机号" prop="phone">
+          <el-input v-model="form.phone" disabled />
+        </el-form-item>
+
+        <el-form-item label="提现金额" prop="extractPrice">
+          <el-input v-model="form.extractPrice" disabled placeholder="请输入提现金额" />
+        </el-form-item>
+
+        <el-form-item label="余额" prop="balance">
+          <el-input v-model="form.balance" disabled placeholder="请输入提现金额" />
+        </el-form-item>
+        <el-form-item label="审核状态">
+          <el-radio-group v-model="form.status">
+            <el-radio label="1">通过</el-radio>
+            <el-radio label="-1">驳回</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="审核原因" v-if="form.status==-1" prop="failMsg">
+          <el-input type="textarea" :row="5" v-model="form.failMsg" 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 { listUserExtract, getUserExtract, audit,delUserExtract, addUserExtract, updateUserExtract, exportUserExtract } from "@/api/hisStore/userExtract";
+
+export default {
+  name: "UserExtract",
+  data() {
+    return {
+      statusOptions:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户提现表格数据
+      userExtractList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: null,
+        realName: null,
+        extractType: null,
+        bankCode: null,
+        bankAddress: null,
+        alipayCode: null,
+        extractPrice: null,
+        mark: null,
+        balance: null,
+        failMsg: null,
+        failTime: null,
+        status: null,
+        wechat: null,
+        isDel: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        status: [
+          { required: true, message: "状态不能为空", trigger: "blur" }
+        ],
+        failMsg: [
+          { required: true, message: "原因不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getDicts("user_extract_status").then((response) => {
+      this.statusOptions = response.data;
+    });
+    this.getList();
+  },
+  methods: {
+    /** 查询用户提现列表 */
+    getList() {
+      this.loading = true;
+      listUserExtract(this.queryParams).then(response => {
+        this.userExtractList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        userId: null,
+        realName: null,
+        extractType: null,
+        bankCode: null,
+        bankAddress: null,
+        alipayCode: null,
+        extractPrice: null,
+        mark: null,
+        balance: null,
+        failMsg: null,
+        failTime: null,
+        createTime: null,
+        updateTime: null,
+        status: 0,
+        wechat: null,
+        isDel: 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.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 修改按钮操作 */
+    handleAudit(row) {
+      this.reset();
+      const id = row.id;
+      console.log(id)
+      getUserExtract(id).then(response => {
+        this.form = response.data;
+        this.form.nickname=row.nickname
+        this.form.phone=row.phone
+        this.form.status="1"
+        this.open = true;
+        this.title = "审核提现";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          audit(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("操作成功");
+                this.open = false;
+                this.getList();
+              }
+          });
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除用户提现编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delUserExtract(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有用户提现数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportUserExtract(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        }).catch(function() {});
+    }
+  }
+};
+</script>