xiexiang há 10 meses atrás
pai
commit
85c02ca5d0

+ 10 - 0
src/api/file.js

@@ -0,0 +1,10 @@
+import axios from "@/utils/axios";
+// 新系统文件新接口
+export default {
+  uploadFile(data){
+    return axios.post('/fileManager/uploadNormalFile', data)
+  },
+  downLoadFile(params, prop = {}) {
+    return axios.get('/fileManager/downloadFile', {params},prop)
+  }
+};

+ 5 - 1
src/api/index.js

@@ -3,10 +3,14 @@
 import permission from "./permission";
 import registerAndLogin from './registerAndLogin'
 import application from "./application";
+import version from "./version";
+import vip from "./vip";
 
 export default {
 
   ...permission,
   ...registerAndLogin,
-  ...application
+  ...application,
+  ...version,
+  ...vip
 }

+ 32 - 0
src/api/version.js

@@ -0,0 +1,32 @@
+import axios from '@/utils/axios'
+
+export default {
+    /**
+     * 获取应用版本列表
+     * @param {*} data 
+     * @returns 
+     */
+    getVersionList(data){
+        return axios.post('/permission/api/version/query',data)
+    },
+
+    /**
+     * 根据id获取应用版本信息
+     * @param {*} data 
+     * @returns 
+     */
+    getVersionById(params){
+        return axios.get('/permission/api/version/queryById',{params})
+    },
+
+    //添加应用版本
+    addVersion(data){
+        return axios.post('/permission/api/version/add', data)
+    },
+
+    //编辑应用版本
+    updateVersion(data){
+        return axios.post('/permission/api/version/update', data)
+    },
+
+}

+ 36 - 0
src/api/vip.js

@@ -0,0 +1,36 @@
+import axios from '@/utils/axios'
+
+export default {
+    /**
+     * 获取应用会员列表
+     * @param {*} data 
+     * @returns 
+     */
+    getVipList(data){
+        return axios.post('/permission/api/appVipType/query',data)
+    },
+
+    /**
+     * 根据id获取应用会员信息
+     * @param {*} data 
+     * @returns 
+     */
+    getVipById(params){
+        return axios.get('/permission/api/appVipType/queryById',{params})
+    },
+
+    //添加应用会员
+    addVip(data){
+        return axios.post('/permission/api/appVipType/add', data)
+    },
+
+    //编辑应用会员
+    updateVip(data){
+        return axios.post('/permission/api/appVipType/update', data)
+    },
+
+    deleteVip(data){
+        return axios.post('/permission/api/appVipType/delete', data)
+    }
+
+}

+ 35 - 1
src/router/index.js

@@ -68,7 +68,7 @@ export const backStageManageRouterItem = [
         path: 'addApply',
         name: 'Administrator_addApply',
         component: () => import('@/views/backStageManage/application/apply/components/addApply.vue'),
-        meta: {title: '添加应用功能', icon: 'apply',keepAlive:true},
+        meta: {title: '添加应用功能', icon: 'apply', keepAlive:true},
         hidden:true
       },
       {
@@ -83,6 +83,40 @@ export const backStageManageRouterItem = [
         component: () => import('@/views/backStageManage/application/vision/index.vue'),
         meta: {title: '应用版本清单', icon: 'vision'}
       },
+      {
+        path: 'addVersion',
+        name: 'Administrator_addVersion',
+        component: () => import('@/views/backStageManage/application/vision/addVersion.vue'),
+        meta: {title: '添加应用版本', icon: 'addVision'},
+        hidden:true
+      },
+      {
+        path: 'editVersion',
+        name: 'Administrator_editVersion',
+        component: () => import('@/views/backStageManage/application/vision/editVersion.vue'),
+        meta: {title: '编辑应用版本', icon: 'editVision'},
+        hidden:true
+      },
+      {
+        path: 'vip',
+        name: 'Administrator_vip',
+        component: () => import('@/views/backStageManage/application/vip/index.vue'),
+        meta: {title: '应用会员清单', icon: 'vip'}
+      },
+      {
+        path: 'addVip',
+        name: 'Administrator_addVip',
+        component: () => import('@/views/backStageManage/application/vip/components/addVipForm.vue'),
+        meta: {title: '添加应用会员', icon: 'addVip'},
+        hidden:true
+      },
+      {
+        path: 'editVip',
+        name: 'Administrator_editVip',
+        component: () => import('@/views/backStageManage/application/vip/components/editVipForm.vue'),
+        meta: {title: '编辑应用会员', icon: 'editVip'},
+        hidden:true
+      },
     ]
   },
 ]

+ 1 - 0
src/utils/axios.js

@@ -36,6 +36,7 @@ _axios.interceptors.request.use(
       // config.headers[constants.tokenHeader] = token
     }
     config.headers['x-project-id'] = Store.getters.projectId || ''
+    // config.headers['x-project-id'] = Store.getters.projectId || ''
     if (config.loading) {
       loadingInstance = Loading.service({})
     }

+ 89 - 0
src/views/backStageManage/application/vip/components/addVipForm.vue

@@ -0,0 +1,89 @@
+<template>
+    <div>
+        <el-form ref="form" :model="form" :rules="rules" label-width="auto">
+            
+            <el-form-item label="会员类型名称" prop="vipName">
+                <el-input v-model="form.tenantVipName" placeholder="请输入会员类型名称" maxlength="20" />
+            </el-form-item>
+                
+            <el-form-item label="备注" prop="remark">
+                <el-input v-model="form.remark" placeholder="请输入备注" maxlength="50" />
+            </el-form-item>
+    
+            <el-form-item label="持续时长/月" prop="lastTime">
+                <el-input v-model="form.lastTime" placeholder="请输入持续时长" maxlength="50" />
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <div class="button-container">
+                <el-button type="primary" @click="submitForm">提 交</el-button>
+                <el-button @click="cancel">重 置</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+components: {},
+props: {},
+data() {
+    return {
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+            tenantVipName: [
+                { required: true, message: "会员类型名称不能为空", trigger: "blur" }
+            ],
+            lastTime: [
+                { required: true, message: "持续时长不能为空", trigger: "blur" }
+            ]
+        }
+    };
+},
+watch: {},
+computed: {},
+created() {},
+mounted() {},
+methods: {
+     /** 提交按钮 */
+     submitForm: function() {
+        this.$refs.form.validate((valid) => {
+            if (valid) {
+                this.$api.addVip(this.form)
+                    .then(response => {
+                        if (response.code === 200) {
+                            this.$message.success('提交成功');
+                            this.resetForm();
+                        } else {
+                            this.$message.error('提交失败');
+                        }
+                    })
+                    .catch(error => {
+                        this.$message.error('提交失败');
+                        console.error(error);
+                    });
+            }
+        });
+    },
+    
+},
+};
+</script>
+<style lang="scss" scoped>
+.el-form {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+}
+.dialog-footer {
+    display: flex;
+    justify-content: center;
+}
+
+.button-container {
+    display: flex;
+    justify-content: center;
+}
+</style>

+ 102 - 0
src/views/backStageManage/application/vip/components/editVipForm.vue

@@ -0,0 +1,102 @@
+<template>
+    <div>
+        <el-form ref="form" :model="form" :rules="rules" label-width="auto">
+            <el-form-item label="会员类型名称" prop="tenantVipName">
+                <el-input v-model="form.tenantVipName" placeholder="请输入会员类型名称" maxlength="20" />
+            </el-form-item>       
+            <el-form-item label="持续时长" prop="lastTime">
+                <el-input v-model="form.lastTime" placeholder="请输入持续时长" maxlength="11" />
+            </el-form-item>
+            <el-form-item label="备注" prop="remark">
+                <el-input v-model="form.remark" placeholder="请输入备注" maxlength="50" />
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <div class="button-container">
+                <el-button type="primary" @click="submitForm">提 交</el-button>
+                <el-button @click="cancel">重 置</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    components: {},
+    props: {},
+    data() {
+        return {
+            // 表单参数
+            form: {},
+            // 表单校验
+            rules: {
+                tenantVipName: [
+                    { required: true, message: "会员类型名称不能为空", trigger: "blur" }
+                ],
+                lastTime: [
+                    { required: true, message: "持续时长不能为空", trigger: "blur" }
+                ]
+            }
+        };
+    },
+    watch: {},
+    computed: {
+        vipId() {
+            return this.$route.query.id;
+        },
+    },
+    created() {},
+    mounted() {
+        this.getById()
+    },
+    methods: {
+        getById() {
+            var params = {
+                id: this.vipId,
+            };
+            this.$api.getVipById(params).then(response=>{
+                if(response.code == 200){
+                    this.form = response.data.records
+                }
+            }).catch(error=>{
+                this.form = []
+            })
+        },
+        /** 提交按钮 */
+        submitForm: function() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.$api.updateVip(this.form)
+                        .then(response => {
+                            if (response.code === 200) {
+                                this.$message.success('提交成功');
+                                this.resetForm();
+                            } else {
+                                this.$message.error('提交失败');
+                            }
+                        })
+                        .catch(error => {
+                            this.$message.error('提交失败');
+                            console.error(error);
+                        });
+                }
+            });
+        },
+    },
+};
+</script>
+<style lang="scss" scoped>
+.el-form {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+}
+.dialog-footer {
+    display: flex;
+    justify-content: center;
+}
+.button-container {
+    display: flex;
+    justify-content: center;
+}
+</style>

+ 226 - 0
src/views/backStageManage/application/vip/index.vue

@@ -0,0 +1,226 @@
+<template>
+  <div class="container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="会员类型名称" prop="tenantVipName">
+        <el-input
+          v-model="queryParams.tenantVipName"
+          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" icon="el-icon-plus" size="small" @click="handleAdd">新增</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table 
+        :data="tableData"
+        row-key="id"
+        style="width: 100%"
+        :maxHeight="tableHeight - 40"
+        v-loading="loading"
+        @selection-change="handleSelectionChange"
+        @sort-change="sortChange"
+    >
+        <el-table-column type="selection" width="55" :reserve-selection="true" v-if="!choose"></el-table-column>
+
+        <el-table-column  v-if="choose" align="center">
+          <template slot-scope="scope">
+              <div>
+                  <el-checkbox-group v-model="checkList1">
+                      <el-checkbox :label="scope.row.id">{{(scope.$index + 1) + ((queryParams.current - 1) * queryParams.size)}}</el-checkbox>
+                  </el-checkbox-group>
+              </div>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="tenantVipName" label="会员类型名称"></el-table-column>
+        <el-table-column prop="lastTime" label="持续时长"></el-table-column>
+        <el-table-column prop="createPersonName" label="创建人"></el-table-column>
+        <el-table-column prop="createTime" label="创建时间"></el-table-column>
+        <el-table-column prop="remark" label="备注"></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="handleEdit(scope.row)"
+            >修改</el-button>
+            <el-button
+              v-if="scope.row.id != 0"
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+    </el-table>
+    <div>
+      <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+        :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
+        @current-change="handleCurrentChange" @size-change="changeSize" :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+
+  components: {},
+  props: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: false,
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 显示搜索条件
+      showSearch: true,
+      // 表单参数
+      form: {},
+      tableData: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        tenantVipName: undefined
+      },
+      rules: {
+        tenantVipName: [
+          { required: true, message: "会员类型名称不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    /** 查询vip列表 */
+    getList() {
+      this.loading = true;
+      this.$api.getVipList(this.queryParams).then(response=>{
+        if(response.code == 200){
+            this.tableData = response.data.records
+            this.total = response.data.total
+            this.loading = false
+        }
+      }).catch(error=>{
+          this.tableData = []
+          this.total = 0
+          this.loading = false
+      })
+    },
+    /** 新增按钮操作 */
+    handleAdd(row) {
+      this.$router.push('/administrator/addVip');
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.open = false;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.$router.push({ 
+        path: '/administrator/editVip', 
+        query: {
+            id: row.id
+        }
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.handleQuery();
+    },
+    handleDelete(row) {
+      this.removeVip([row.id]);
+    },
+    removeVip(ids,type){
+          this.$confirm('确认删除本条数据吗?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+          }).then(() => {
+            var params = {
+                ids:ids,
+            }
+              this.$api.deleteVip(params).then(response=>{
+                  if(response.code == 200){
+                      this.$message.success('删除成功')
+                      this.getList()
+                      if(type){
+                          this.multipleSelection = []
+                          this.$refs.table.clearSelection();
+                      }else{
+                          var id = response.data.data[0]
+                          var index = this.multipleSelection.findIndex(item=>{
+                              return item.id == id
+                          })
+                          if(index!=-1){
+                              this.multipleSelection.splice(index,1)
+                          }
+                      }
+                      
+                  }
+              }).catch(error=>{
+                  this.$message.error('删除失败')
+              })
+          })
+      },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.container{
+  width: 100%;
+}
+.padding_20{
+  padding: 20px
+}
+::v-deep .el-table,
+.el-table__expanded-cell {
+  background-color: transparent;
+}
+
+::v-deep .el-table tr {
+  background-color: transparent !important;
+}
+::v-deep .el-table__body td,::v-deep .el-table__header th,
+.el-table .cell {
+  background-color: transparent;
+}
+::v-deep .el-table::before {
+  //去除底部白线
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 0px;
+}
+
+</style>

+ 72 - 0
src/views/backStageManage/application/vision/addVersion.vue

@@ -0,0 +1,72 @@
+<template>
+    <div>
+        <version-form></version-form>
+    </div>
+</template>
+
+<script>
+import VersionForm from './components/versionForm.vue';
+export default {
+components: {
+    'version-form': VersionForm
+},
+props: {},
+data() {
+    return {
+        fileList: [],
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+            versionName: [
+                { required: true, message: "版本名称不能为空", trigger: "blur" }
+            ],
+            versionNum: [
+                { required: true, message: "版本号不能为空", trigger: "blur" }
+            ]
+        }
+    };
+},
+watch: {},
+computed: {},
+created() {},
+mounted() {},
+methods: {
+    /** 提交按钮 */
+    submitForm: function() {
+        this.$refs.form.validate((valid) => {
+            if (valid) {
+                this.$api.addVersion(this.form)
+                    .then(response => {
+                        if (response.code === 200) {
+                            this.$message.success('提交成功');
+                            this.resetForm();
+                        } else {
+                            this.$message.error('提交失败');
+                        }
+                    })
+                    .catch(error => {
+                        this.$message.error('提交失败');
+                        console.error(error);
+                    });
+            }
+        });
+    },
+},
+};
+</script>
+<style lang="scss" scoped>
+.el-form {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+}
+.dialog-footer {
+    display: flex;
+    justify-content: center;
+}
+.button-container {
+    display: flex;
+    justify-content: center;
+}
+</style>

+ 132 - 0
src/views/backStageManage/application/vision/components/versionForm.vue

@@ -0,0 +1,132 @@
+<template>
+    <div>
+        <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="80px">
+            <el-form-item label="版本名称" prop="versionName">
+                <el-input v-model="form.versionName" placeholder="请输入版本名称" maxlength="20" />
+            </el-form-item>
+
+            <el-form-item label="版本号" prop="versionNum">
+                <el-input v-model="form.versionNum" placeholder="请输入版本号" maxlength="11" />
+            </el-form-item>
+        
+            <el-form-item label="备注" prop="remark">
+                <el-input v-model="form.remark" placeholder="请输入备注" maxlength="50" />
+            </el-form-item>
+
+            <el-form-item label="是否授权" prop="authType">
+                <el-tooltip :content="'Switch value: ' + value" placement="top">
+                    <el-switch
+                        v-model="form.authType"
+                        active-color="#13ce66"
+                        inactive-color="#ff4949"
+                        active-value="1"
+                        inactive-value="2">
+                    </el-switch>
+                </el-tooltip>
+            </el-form-item>
+
+            <el-form-item label="版本文件" prop="versionFile">
+                <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
+                    <i class="el-icon-upload"></i>
+                    <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+                </el-upload>
+            </el-form-item>
+
+
+        </el-form>
+        <div class="button-container">
+            <el-button type="primary" :loading="btnLoading" @click="submitForm">提 交</el-button>
+            <el-button @click="resetForm">重 置</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+const currentForm = {
+    id:null,
+    versionName:null,
+    versionNum:null,
+    remark:null,
+    versionFile:null,
+}
+export default {
+    components: {
+        switchValue() {
+            return this.form.authType === 1 ? '授权' : '未授权';
+        }
+    },
+    props: {
+        versionData: {
+            type:Object,
+            default:()=>{
+                return {}
+            }
+        },
+    },
+    data() {
+        return {
+            btnLoading: false,
+            fileList: [],
+            // 表单参数
+            form: this.versionData,
+            // 表单校验
+            rules: {
+                versionName: [
+                    { required: true, message: "版本名称不能为空", trigger: "blur" }
+                ]
+            }
+        };
+    },
+    watch: {
+        versionData(val){
+            this.form = val
+        }
+    },
+    computed: {},
+    created() {},
+    mounted() {},
+    methods: {
+        //重置表单
+        resetForm(){
+            this.form = Object.assign({},currentForm)
+            this.$refs['form'].resetFields();
+        },
+        /** 提交按钮 */
+        submitForm: function() {
+            this.$refs['form'].validate((valid) => {
+                if (valid) {
+                    this.btnLoading = true
+                    var a = '添加'
+                    var api = 'addVersion'
+                    if(this.form.id){
+                        a = '编辑'
+                        api = 'updateVersion'
+                    }
+                    this.$api[api](this.form).then(response => {
+                        if (response.code === 200) {
+                            this.btnLoading = false
+                            this.$message.success( a + '成功');
+                            this.resetForm();
+                        }
+                    })
+                    .catch(error => {
+                        this.$message.error(a + '失败')
+                        this.btnLoading = false
+                    });
+                }
+            });
+        },
+    },
+};
+</script>
+<style lang="scss">
+.el-form {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+}
+.button-container {
+    display: flex;
+    justify-content: center;
+}
+</style>

+ 55 - 0
src/views/backStageManage/application/vision/editVersion.vue

@@ -0,0 +1,55 @@
+<template>
+    <div>
+        <version-form :versionData="versionForm"></version-form>
+    </div>
+</template>
+
+<script>
+import VersionForm from './components/versionForm.vue';
+export default {
+    components: {
+        'version-form': VersionForm
+    },
+    props: {},
+    data() {
+        return {
+            fileList: [],
+            // 表单参数
+            versionForm: {},
+            // 表单校验
+            rules: {
+                versionName: [
+                    { required: true, message: "版本名称不能为空", trigger: "blur" }
+                ]
+            },
+        };
+    },
+    watch: {},
+    computed: {
+        versionId() {
+            return this.$route.query.id;
+        },
+    },
+    created() {},
+    mounted() {
+        this.getById()
+    },
+    methods: {
+        getById() {
+            var params = {
+                id: this.versionId,
+            };
+            this.$api.getVersionById(params).then(response=>{
+                if(response.code == 200){
+                    this.versionForm = response.data.records
+                }
+            }).catch(error=>{
+                this.versionForm = []
+            })
+        },
+    },
+};
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 201 - 12
src/views/backStageManage/application/vision/index.vue

@@ -1,33 +1,222 @@
 <template>
-  <div></div>
+  <div class="container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="版本名" prop="versionName">
+        <el-input v-model="queryParams.versionName" placeholder="请输入版本名称"/>
+      </el-form-item>
+      <el-form-item label="版本号" prop="versionNum">
+        <el-input v-model="queryParams.versionNum" placeholder="请输入版本号"/>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="search">搜索</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="small" @click="handleAdd">新增</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table
+            ref="table"
+            :data="tableData"
+            row-key="id"
+            style="width: 100%"
+            :maxHeight="tableHeight - 40"
+            v-loading="loading"
+            @selection-change="handleSelectionChange"
+            @sort-change="sortChange"
+        >
+        <el-table-column type="selection" width="55" :reserve-selection="true" v-if="!choose">
+
+        </el-table-column>
+        <el-table-column  v-if="choose" align="center">
+            <template slot-scope="scope">
+                <div>
+                    <el-checkbox-group v-model="checkList1">
+                        <el-checkbox :label="scope.row.id">{{(scope.$index + 1) + ((queryParams.current - 1) * queryParams.size)}}</el-checkbox>
+                    </el-checkbox-group>
+                </div>
+            </template>
+            
+        </el-table-column>
+
+        <el-table-column prop="versionName" label="版本名称"></el-table-column>
+        <el-table-column prop="versionNum" label="版本号"></el-table-column>
+        <el-table-column prop="versionFile" label="版本文件"></el-table-column>
+        <el-table-column prop="remark" label="备注"></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="handleEdit(scope.row)">修改</el-button>
+            <el-button v-if="scope.row.id != 0" size="mini" type="text" icon="el-icon-delete"@click="handleDelete(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+    </el-table>
+    <div>
+      <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+        :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
+        @current-change="handleCurrentChange" @size-change="changeSize" :total="total">
+      </el-pagination>
+    </div>
+  </div>
 </template>
 
 <script>
+
 export default {
+
   components: {},
-  props: {},
+  props: {
+    choose:{
+      type:Boolean,
+      default:false
+    },
+    checkList:{
+      type:Array,
+      default:()=>{
+          return []
+      }
+    }
+  },
   data() {
     return {
+      checkList1:this.checkList,
+      multipleSelection:[],
+      // 遮罩层
+      loading: false,
+      // 显示搜索条件
+      showSearch: true,
+      // 表单参数
+      form: {},
+      // 版本表格数据
+      versionList: [],
+      // 总条数
+      total: 0,
+      tableData: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        versionNum: '',
+        versionName: ''
+      },
+      rules: {
+        versionNum: [
+          { required: true, message: "版本号不能为空", trigger: "blur" }
+        ],
+        versionName: [
+          { required: true, message: "版本名称不能为空", trigger: "blur" }
+        ]
+      }
     };
   },
   watch: {},
   computed: {},
   created() {},
   mounted() {
-    console.log(1)
-    this.getVisionList()
+    this.getList()
   },
   methods: {
-    getVisionList(){
-        this.$api.getVision().then(res => {
-            console.log(res);
-            this.value = res.data
-        }).catch(err => {
-            console.log(err);
-        })
-    }
+    //检索
+    search(){
+      this.queryParams.current = 1
+      this.getList()
+    },
+    /** 查询版本列表 */
+    getList() {
+      this.loading = true;
+      this.$api.getVersionList(this.queryParams).then(response=>{
+        if(response.code == 200){
+            this.tableData = response.data.records
+            this.total = response.data.total
+            this.loading = false
+        }
+      }).catch(error=>{
+          this.tableData = []
+          this.total = 0
+          this.loading = false
+      })
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!=1
+      this.multiple = !selection.length
+    },
+    //切换分页
+    handleCurrentChange(val){
+        this.queryParams.current = val
+        this.getList()
+    },
+
+    //切换也大小
+    handleSizeChange(val){
+        this.queryParams.current = 1
+        this.queryParams.size = 10
+        this.getList()
+    },
+    //排序
+    sortChange({ column, prop, order }){},
+    /** 新增按钮操作 */
+    handleAdd(row) {
+      this.$router.push('/administrator/addVersion');
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.open = false;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.$router.push({ 
+        path: '/administrator/editVersion', 
+        query: {
+            id: row.id
+        }
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.handleQuery();
+    },
   },
 };
 </script>
 <style lang="scss" scoped>
+.container{
+  width: 100%;
+}
+.padding_20{
+  padding: 20px
+}
+::v-deep .el-table,
+.el-table__expanded-cell {
+  background-color: transparent;
+}
+
+::v-deep .el-table tr {
+  background-color: transparent !important;
+}
+::v-deep .el-table__body td,::v-deep .el-table__header th,
+.el-table .cell {
+  background-color: transparent;
+}
+::v-deep .el-table::before {
+  //去除底部白线
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 0px;
+}
+
 </style>