Ver Fonte

fix(user): adding columns + modify readme.md

furffico há 1 ano atrás
pai
commit
1b6ce9d218

+ 13 - 74
README.md

@@ -1,89 +1,28 @@
-一个基于vue、element ui 的轻量级、前后端分离、拥有完整sku和下单流程的完全开源商城后台所属前端界面
+# LiveManageV
 
+- 安装pnpm:https://pnpm.io/zh/installation
+- 使用淘宝源
 
+```bash
+$ pnpm config set registry https://registry.npm.taobao.org
+```
 
+- 安装依赖
 
-## 前言
-
-`mall4j商城`项目致力于为中小企业打造一个完整、易于维护的开源的电商系统,采用现阶段流行技术实现。后台管理系统包含商品管理、订单管理、运费模板、规格管理、会员管理、运营管理、内容管理、统计报表、权限管理、设置等模块。
-
-
-## 授权
-
-Mall4j官网 https://www.mall4j.com
-
-Mall4j 使用 AGPLv3 开源,请遵守 AGPLv3 的相关条款,或者联系作者获取商业授权(https://www.mall4j.com)
-
-## 项目链接
-
-java后台:https://gitee.com/gz-yami/mall4j
-
-vue中后台:https://gitee.com/gz-yami/mall4v
-
-小程序:https://gitee.com/gz-yami/mall4m
-
-
-
-## 演示地址
-
- **由于我们并不希望小程序的数据被弄混乱,我们弄了两个数据库。因此,您修改了后台的商品信息,小程序并不能看到!** 
-
-后台:<http://mall4j-admin.mall4j.com>  账号:admin/123456
-
-小程序:1. 扫描二维码
-
-![小程序](https://gitee.com/gz-yami/mall4j/raw/master/screenshot/miniQrcode.jpg)
-
-​		2. 搜索小程序 **mall4j商城** 
-
-
-
-## 部署教程
-
-### 1.启动
-
-- 安装node模块 (推荐使用淘宝镜像,`cnpm install`)
-
-```
-npm install
+```bash
+$ pnpm install
 ```
 
 - 运行
 
-```
-npm run dev
+```bash
+$ pnpm dev
 ```
 
 - 部署
 
+```bash
+$ pnpm build
 ```
-npm run build
-```
-
-
-
-## 相关截图
-
-![登陆](https://gitee.com/gz-yami/mall4j/raw/master/screenshot/login.png)
-
-![订单](https://gitee.com/gz-yami/mall4j/raw/master/screenshot/order.png)
-
-![商品列表](https://gitee.com/gz-yami/mall4j/raw/master/screenshot/prodList.png)
-
-![sku](https://gitee.com/gz-yami/mall4j/raw/master/screenshot/sku.png)
-
-![运费模板](https://gitee.com/gz-yami/mall4j/raw/master/screenshot/transport.png)
-
-
-
-## 提交反馈
-
-提问之前,请先阅读[提问的智慧](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md):
-
-- QQ群:722835385
-
-  ![QQ群](https://gitee.com/gz-yami/mall4j/raw/master/screenshot/qqGroup.png)
 
-- 论坛:<http://bbs.mall4j.com>
 
-- 商务邮箱:yamitech@163.com

+ 49 - 34
src/crud/user/user.js

@@ -3,13 +3,13 @@ export const tableOption = {
   columnBtn: false,
   border: true,
   // selection: true,
-  index: false,
-  indexLabel: '序号',
+  index: true,
+  indexLabel: '#',
   stripe: true,
   menuAlign: 'center',
   menuWidth: 350,
   align: 'center',
-  refreshBtn: true,
+  refreshBtn: false,
   searchSize: 'mini',
   addBtn: false,
   editBtn: false,
@@ -19,35 +19,50 @@ export const tableOption = {
     label: 'label',
     value: 'value'
   },
-  column: [{
-    label: '用户昵称',
-    prop: 'nickName',
-    search: true
-  }, {
-    label: '用户头像',
-    prop: 'pic',
-    type: 'upload',
-    imgWidth: 150,
-    listType: 'picture-img',
-    slot: true
-  }, {
-    label: '状态',
-    prop: 'status',
-    search: true,
-    type: 'select',
-    slot: true,
-    dicData: [
-      {
-        label: '禁用',
-        value: 0
-      }, {
-        label: '正常',
-        value: 1
-      }
-    ]
-  }, {
-    label: '注册时间',
-    prop: 'userRegtime',
-    imgWidth: 150
-  }]
+  column: [
+    {
+      label: '用户编号',
+      prop: 'userId',
+      search: false,
+    },
+    {
+      label: '用户昵称',
+      prop: 'nickName',
+      search: true
+    }, 
+    {
+      label: '手机号码',
+      prop: 'userMobile',
+      search: true
+    },
+    // {
+    //   label: '用户头像',
+    //   prop: 'pic',
+    //   type: 'upload',
+    //   imgWidth: 150,
+    //   listType: 'picture-img',
+    //   slot: true
+    // }, 
+    {
+      label: '状态',
+      prop: 'status',
+      search: true,
+      type: 'select',
+      slot: true,
+      dicData: [
+        {
+          label: '禁用',
+          value: 0
+        }, {
+          label: '正常',
+          value: 1
+        }
+      ]
+    }, 
+    {
+      label: '注册时间',
+      prop: 'userRegtime',
+      imgWidth: 150
+    }
+  ]
 }

+ 2 - 2
src/views/modules/user/user-add-or-update.vue

@@ -7,11 +7,11 @@
              ref="dataForm"
              @keyup.enter.native="dataFormSubmit()"
              label-width="80px">
-      <el-form-item label="用户头像"
+      <!--el-form-item label="用户头像"
                     prop="pic">
         <img :src="dataForm.pic"
              class="image">
-      </el-form-item>
+      </el-form-item-->
       <el-form-item label="用户昵称"
                     prop="nickName">
         <el-input v-model="dataForm.nickName"

+ 32 - 48
src/views/modules/user/user.vue

@@ -1,57 +1,41 @@
 <template>
   <div class="mod-user">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-<!--      <template slot="menuLeft">-->
-<!--        <el-button type="danger"-->
-<!--                   @click="deleteHandle()"-->
-<!--                   v-if="isAuth('admin:user:delete')"-->
-<!--                   size="small"-->
-<!--                   :disabled="dataListSelections.length <= 0">批量删除</el-button>-->
-<!--      </template>-->
+    <avue-crud ref="crud" :page="page" :data="dataList" :option="tableOption" @search-change="searchChange"
+      @selection-change="selectionChange" @on-load="getDataList">
+      <!--      <template slot="menuLeft">-->
+      <!--        <el-button type="danger"-->
+      <!--                   @click="deleteHandle()"-->
+      <!--                   v-if="isAuth('admin:user:delete')"-->
+      <!--                   size="small"-->
+      <!--                   :disabled="dataListSelections.length <= 0">批量删除</el-button>-->
+      <!--      </template>-->
 
-    <template slot-scope="scope"
-              slot="pic">
-              <span class="avue-crud__img" v-if="scope.row.pic">
-                <i :src="scope.row.pic" class="el-icon-document"></i>
-              </span>
-              <span v-else>-</span>
+      <template slot-scope="scope" slot="pic">
+        <span class="avue-crud__img" v-if="scope.row.pic">
+          <i :src="scope.row.pic" class="el-icon-document"></i>
+        </span>
+        <span v-else>-</span>
       </template>
 
-      <template slot-scope="scope"
-                slot="status">
-        <el-tag v-if="scope.row.status === 0"
-                size="small"
-                type="danger">禁用</el-tag>
-        <el-tag v-else
-                size="small">正常</el-tag>
+      <template slot-scope="scope" slot="status">
+        <el-tag v-if="scope.row.status === 0" size="small" type="danger">禁用</el-tag>
+        <el-tag v-else size="small">正常</el-tag>
       </template>
 
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('admin:user:update')"
-                   @click.stop="addOrUpdateHandle(scope.row.userId)">编辑</el-button>
+      <template slot-scope="scope" slot="menu">
+        <el-button type="primary" icon="el-icon-edit" size="small" v-if="isAuth('admin:user:update')"
+          @click.stop="addOrUpdateHandle(scope.row.userId)">编辑</el-button>
 
-<!--        <el-button type="danger"-->
-<!--                   icon="el-icon-delete"-->
-<!--                   size="small"-->
-<!--                   v-if="isAuth('admin:user:delete')"-->
-<!--                   @click.stop="deleteHandle(scope.row.userId)">删除</el-button>-->
+        <!--        <el-button type="danger"-->
+        <!--                   icon="el-icon-delete"-->
+        <!--                   size="small"-->
+        <!--                   v-if="isAuth('admin:user:delete')"-->
+        <!--                   @click.stop="deleteHandle(scope.row.userId)">删除</el-button>-->
       </template>
     </avue-crud>
 
     <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
   </div>
 </template>
 
@@ -59,7 +43,7 @@
 import { tableOption } from '@/crud/user/user'
 import AddOrUpdate from './user-add-or-update'
 export default {
-  data () {
+  data() {
     return {
       dataList: [],
       dataListLoading: false,
@@ -78,7 +62,7 @@ export default {
   },
   methods: {
     // 获取数据列表
-    getDataList (page, params, done) {
+    getDataList(page, params, done) {
       this.dataListLoading = true
       this.$http({
         url: this.$http.adornUrl('/admin/user/page'),
@@ -102,14 +86,14 @@ export default {
       })
     },
     // 新增 / 修改
-    addOrUpdateHandle (id) {
+    addOrUpdateHandle(id) {
       this.addOrUpdateVisible = true
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(id)
       })
     },
     // 删除
-    deleteHandle (id) {
+    deleteHandle(id) {
       var ids = id ? [id] : this.dataListSelections.map(item => {
         return item.userId
       })
@@ -137,11 +121,11 @@ export default {
         .catch(() => { })
     },
     // 条件查询
-    searchChange (params, done) {
+    searchChange(params, done) {
       this.getDataList(this.page, params, done)
     },
     // 多选变化
-    selectionChange (val) {
+    selectionChange(val) {
       this.dataListSelections = val
     }
   }