Browse Source

Merge branch 'dev' of http://1.116.113.26:8088/zhuliu/qiaobi into dev

xiexiang 10 months ago
parent
commit
a38f9339be

+ 3 - 1
src/api/application.js

@@ -9,5 +9,7 @@ export default {
     getVision(data){
     getVision(data){
         return axios.post('/vision/list',data)
         return axios.post('/vision/list',data)
     },
     },
-
+    queryApplication(data){
+        return axios.post('/permission/api/qiaoBiApplication/queryApplication',data)
+    },
 }
 }

+ 7 - 0
src/api/registerAndLogin.js

@@ -55,4 +55,11 @@ export default {
     login(data) {
     login(data) {
         return axios.post('/permission/api/admin/login', data)
         return axios.post('/permission/api/admin/login', data)
     },
     },
+    backAccountLogin(data){
+        return axios.post('/permission/api/qiaoBiPerson/backAccountLogin',data)
+    },
+    backPhoneLogin(data){
+        return axios.post('/permission/api/qiaoBiPerson/backPhoneLogin',data)
+    },
+    
 }
 }

+ 3 - 1
src/main.js

@@ -31,10 +31,12 @@ Vue.prototype.$permission = hasPermission
 import model from './utils/model'
 import model from './utils/model'
 Vue.use(model)
 Vue.use(model)
 
 
-//全局js
+//全局js1
 import commonJS from '@/utils/common.js'
 import commonJS from '@/utils/common.js'
 Vue.prototype.$commonJS = commonJS
 Vue.prototype.$commonJS = commonJS
 
 
+import Cookies from "js-cookie";
+Vue.prototype.$cookie = Cookies
 
 
 Vue.config.productionTip = false
 Vue.config.productionTip = false
 Vue.prototype.$constants = constants
 Vue.prototype.$constants = constants

+ 55 - 32
src/router/index.js

@@ -1,6 +1,7 @@
 import Vue from 'vue'
 import Vue from 'vue'
 import VueRouter from 'vue-router'
 import VueRouter from 'vue-router'
 import Store from '../store'
 import Store from '../store'
+import Cookies from 'js-cookie'
 Vue.use(VueRouter)
 Vue.use(VueRouter)
 
 
 const originalPush = VueRouter.prototype.push
 const originalPush = VueRouter.prototype.push
@@ -14,8 +15,8 @@ const routes = [
   },
   },
 
 
   {
   {
-    path:'/register',
-    name:'Register',
+    path: '/register',
+    name: 'Register',
     meta: {
     meta: {
       title: '注册'
       title: '注册'
     },
     },
@@ -37,7 +38,7 @@ const routes = [
       },
       },
     ]
     ]
   }
   }
- 
+
 ]
 ]
 /* 后台管理系统Layout */
 /* 后台管理系统Layout */
 import administrator_layout from '@/views/backStageManage/layout/Layout.vue'
 import administrator_layout from '@/views/backStageManage/layout/Layout.vue'
@@ -46,23 +47,23 @@ export const backStageManageRouterItem = [
     path: '/administrator',
     path: '/administrator',
     component: administrator_layout,
     component: administrator_layout,
     redirect: '/administrator/home',
     redirect: '/administrator/home',
-    meta: {title: '首页', icon: 'home'},
+    meta: { title: '首页', icon: 'home' },
     children: [
     children: [
       {
       {
         path: 'home',
         path: 'home',
         name: 'Administrator_home',
         name: 'Administrator_home',
         component: () => import('@/views/backStageManage/home/index.vue'),
         component: () => import('@/views/backStageManage/home/index.vue'),
-        meta: {title: '首页', icon: 'home'}
+        meta: { title: '首页', icon: 'home' }
       },
       },
     ]
     ]
   },
   },
 
 
   {
   {
     path: '/administrator',
     path: '/administrator',
-    name:'Administrator_application',
+    name: 'Administrator_application',
     component: administrator_layout,
     component: administrator_layout,
     redirect: '/administrator/apply',
     redirect: '/administrator/apply',
-    meta: {title: '应用管理', icon: 'application'},
+    meta: { title: '应用管理', icon: 'application' },
     children: [
     children: [
       {
       {
         path: 'addApply',
         path: 'addApply',
@@ -75,13 +76,13 @@ export const backStageManageRouterItem = [
         path: 'apply',
         path: 'apply',
         name: 'Administrator_apply',
         name: 'Administrator_apply',
         component: () => import('@/views/backStageManage/application/apply/index.vue'),
         component: () => import('@/views/backStageManage/application/apply/index.vue'),
-        meta: {title: '应用功能清单', icon: 'apply'}
+        meta: { title: '应用功能清单', icon: 'apply' }
       },
       },
       {
       {
         path: 'vision',
         path: 'vision',
         name: 'Administrator_vision',
         name: 'Administrator_vision',
         component: () => import('@/views/backStageManage/application/vision/index.vue'),
         component: () => import('@/views/backStageManage/application/vision/index.vue'),
-        meta: {title: '应用版本清单', icon: 'vision'}
+        meta: { title: '应用版本清单', icon: 'vision' }
       },
       },
       {
       {
         path: 'addVersion',
         path: 'addVersion',
@@ -129,7 +130,7 @@ export const backStageManage = [
     children: [
     children: [
       {
       {
         path: '/',
         path: '/',
-        name:'Administrator_Index',
+        name: 'Administrator_Index',
         meta: {
         meta: {
           title: '后台管理',
           title: '后台管理',
         },
         },
@@ -137,7 +138,7 @@ export const backStageManage = [
       },
       },
       {
       {
         path: 'login',
         path: 'login',
-        name:'Administrator_login',
+        name: 'Administrator_login',
         meta: {
         meta: {
           title: '后台管理-登录',
           title: '后台管理-登录',
         },
         },
@@ -151,31 +152,53 @@ export const backStageManage = [
 const router = new VueRouter({
 const router = new VueRouter({
   mode: 'history',
   mode: 'history',
   base: '/',
   base: '/',
-  routes:process.env.NODE_ENV !== 'production'?[...routes,...backStageManage]:routes
+  routes: process.env.NODE_ENV !== 'production' ? [...routes, ...backStageManage] : routes
 })
 })
 
 
 router.beforeEach((to, from, next) => {
 router.beforeEach((to, from, next) => {
   if (to.meta.title) {
   if (to.meta.title) {
     document.title = to.meta.title;
     document.title = to.meta.title;
   }
   }
-  next();
+  if (to.path == '/administrator/login'|| routeExists(routes,to.path) || to.meta.notLogin) {
+    Cookies.remove("token")
+    localStorage.removeItem('vuex')
+    next()
+  }
+  else {
+    const tokenStr = Cookies.get('token')
+    switch (tokenStr) {
+      case undefined:
+        if (to.meta.title) {
+          document.title = to.meta.title;
+        }
+        next({ name: 'Administrator_login' })
+        break;
+      default:
+        if (to.meta.title) {
+          document.title = to.meta.title;
+        }
+        next()
+        break;
+
+    }
+  }
 })
 })
 
 
-function routeExists(array,path,parentPath){
-  for(var i = 0;i<array.length;i++){
+function routeExists(array, path, parentPath) {
+  for (var i = 0; i < array.length; i++) {
     var item = array[i]
     var item = array[i]
     var nowPath = item.path
     var nowPath = item.path
-    if(item.path.indexOf('/') != 0){
+    if (item.path.indexOf('/') != 0) {
       nowPath = parentPath + '/' + nowPath
       nowPath = parentPath + '/' + nowPath
     }
     }
-    if(!item.children || item.children.length == 0){
-      if(path == nowPath){
+    if (!item.children || item.children.length == 0) {
+      if (path == nowPath) {
         return true
         return true
       }
       }
-    }else{
+    } else {
       var data = item.children
       var data = item.children
-      var sign = routeExists(data,path,nowPath)
-      if(sign){
+      var sign = routeExists(data, path, nowPath)
+      if (sign) {
         return true
         return true
       }
       }
     }
     }
@@ -184,22 +207,22 @@ function routeExists(array,path,parentPath){
 }
 }
 // 在你的路由配置文件中
 // 在你的路由配置文件中
 router.afterEach((to, from) => {
 router.afterEach((to, from) => {
-  var sign = routeExists(backStageManageRouterItem,to.path)
-  if(!sign){
+  var sign = routeExists(backStageManageRouterItem, to.path)
+  if (!sign) {
     return
     return
   }
   }
   var obj = {
   var obj = {
-    name:to.meta.title,
-    path:to.path,
-    route:{
-      name:to.name,
-      path:to.path,
-      query:to.query,
-      params:to.params
+    name: to.meta.title,
+    path: to.path,
+    route: {
+      name: to.name,
+      path: to.path,
+      query: to.query,
+      params: to.params
     }
     }
   }
   }
-  Store.commit('addHistory',obj);
-  Store.commit('addHistoryPath',to.path);
+  Store.commit('addHistory', obj);
+  Store.commit('addHistoryPath', to.path);
 });
 });
 
 
 export default router
 export default router

+ 273 - 13
src/views/backStageManage/application/apply/index.vue

@@ -1,26 +1,286 @@
 <template>
 <template>
-  <div></div>
+  <div class="admin-apply">
+    <el-form :inline="true">
+      <el-form-item>
+        <el-input v-model="queryParams.name" size="small" placeholder="请输入"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="" size="small" @click="getList">查询</el-button>
+        <el-button type="primary" size="small" @click="handleAdd(0)">新增</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+        :row-key="getRowKeys" 
+        v-loading="loading"
+        :data="tableData"
+        header-row-class-name="custom-table-header"
+
+        :expand-row-keys="expands"
+        @expand-change="expandChange"
+        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+    >
+     <el-table-column type="expand">
+      <template slot-scope="scope" style="width:80%">
+        <function-list :applyId="scope.row.id"></function-list>
+      </template>
+    </el-table-column>
+      <el-table-column label="应用名称" align="" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span class="details">{{scope.row.name}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="describe" label="应用描述" align="center" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="createUserName" label="创建人" align="center" show-overflow-tooltip></el-table-column>
+      <el-table-column label="操作" align="center" width="150">
+        <template slot-scope="scope">
+          <el-dropdown split-button type="primary" size="small" @click="handleEdit(scope.row)">
+            编辑
+            <el-dropdown-menu slot="dropdown" class="text-align_center">
+             
+              <el-dropdown-item @click.native="handleDetails(scope.row)">详情</el-dropdown-item>
+              <el-dropdown-item class="color-red" @click.native="handleDelete(scope.row)" divided>删除</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="pagination">
+      <el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
+    </div>
+    <el-dialog :title="title" :visible.sync="visible" width="500px" :before-close="close">
+      <el-form v-if="visible" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" label-position="left">
+      
+        <el-form-item label="应用名称" prop="name">
+          <el-input v-model="ruleForm.name" placeholder="请输入应用名称"></el-input>
+        </el-form-item>
+        
+        <el-form-item label="应用描述" prop="describe">
+          <el-input v-model="ruleForm.describe" placeholder="请输入" type="textarea" maxlength="100" show-word-limit></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" @click="submit" :loading="btnLoading">确 定</el-button>
+      </div>
+    </el-dialog>
+       <el-dialog :title="title" :visible.sync="showvisible" width="700px" class="my-dialog-name" contentStyle="width:400px;" :before-close="close" v-if="ruleForm.apply!=null">
+        <el-form label-position="left"  class="demo-table-expand" label-width="80px">
+          <el-form-item label="应用名称 :">
+            <span>{{ruleForm.apply.name}}</span>
+          </el-form-item>
+          <el-form-item label="应用描述 :">
+            <span>{{ruleForm.apply.describe}}</span>
+          </el-form-item>
+           <el-form-item label="创建人 :">
+            <span>{{ruleForm.apply.createUserName}}</span>
+          </el-form-item>
+          <el-form-item label="租户列表" class="list">
+         
+          </el-form-item>
+         
+        </el-form>
+          <el-table :data="ruleForm.tenantVOList" header-row-class-name="custom-table-header"  max-height="250" border>
+            <!-- <el-table-column type="index" label="#" width="55" align="center"></el-table-column> -->
+            <el-table-column prop="name" label="租户名称" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="contacts" label="联系人" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="address" label="联系人地址" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="type" label="类型" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column label="是否启用" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+              <span v-if="scope.row.state==0">否</span>
+              <span v-if="scope.row.state==1">是</span>
+            </template>
+            </el-table-column>
+          </el-table>
+
+    </el-dialog>
+  </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import FunctionList from '../function/index.vue'
 export default {
 export default {
-  components: {},
-  props: {},
+  components: {
+    Treeselect,
+    FunctionList
+  },
   data() {
   data() {
     return {
     return {
-    };
+     getRowKeys(row){
+				return row.id
+			},
+      visible: false,
+      showvisible:false,
+      loading: false,
+      btnLoading: false,
+      total: 0,
+      tableData: [],
+      title: '',
+      expands:[],
+      queryParams: {
+        size: 10,
+        current: 1,
+        name: ''
+      },
+      ruleForm: {},
+      rules: {
+        name: [{ required: true, message: '请输入应用名称', trigger: 'blur' },],
+        describe: [{ required: true, message: '请输入描述', trigger: 'blur' },],
+      },
+    }
   },
   },
-  watch: {},
-  computed: {},
-  created() {},
-  mounted() {
-    console.log(2)
+    computed: {
+    userinfo() {
+      return this.$store.state.admin.userinfo
+    }
   },
   },
-  activated(){
-    console.log(3)
+  mounted() {
+    this.getList()
+
   },
   },
-  methods: {},
-};
+  methods: {
+    expandChange(row,expandedRows) {
+			let that=this
+			console.log(expandedRows);
+			if (expandedRows.length) {
+              that.expands = []
+              if (row) {
+                that.expands.push(row.id)
+              }
+            } else {
+              that.expands = []
+            }
+    },
+   
+    normalizer(node) {
+      return {
+        id: node.id,
+        label: node.name,
+      }
+    },
+    handleAdd(parentId) {
+      this.title = '新增应用'
+      this.visible = true
+      this.ruleForm = {
+        // sort: 0,
+        // parentId: parentId
+      }
+    },
+    handleEdit(row) {
+      this.title = '编辑应用'
+      this.visible = true
+      this.ruleForm = { ...row }
+    },
+    handleDetails(row){
+      this.title = '应用详情'
+      this.showvisible = true
+      this.$api.getAllTenantByApplicationId({id:row.id}).then(response=>{
+         console.log(response)
+         
+         this.ruleForm = response.data
+         this.ruleForm.apply={...row}
+      })
+     
+    },
+     handleCurrentChange(val) {
+      this.queryParams.current = val;
+      this.getList();
+    },
+    close() {
+      this.visible = false
+      this.showvisible = false
+    },
+    getList() {
+      this.loading = true
+      this.$api.queryApplication(this.queryParams).then(response => {
+       
+        this.tableData = response.data
+        this.total = response.pageColumn.total
+        this.loading = false
+      }).catch(error => {
+        this.loading = false
+      })
+    },
+    submit() {
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          this.btnLoading = true
+          if (this.ruleForm.id) {
+            this.$api.editApply(this.ruleForm).then(response => {
+              this.$message.success('编辑成功')
+              this.btnLoading = false
+              this.getList()
+              this.close()
+            }).catch(error => {
+              this.btnLoading = false
+            })
+          } else {
+            this.ruleForm.tenant=this.userinfo.tenantId
+            this.$api.addApply(this.ruleForm).then(response => {
+              console.log(2,response)
+              this.$message.success('新增成功')
+              this.btnLoading = false
+              this.getList()
+              this.close()
+            }).catch(error => {
+              this.btnLoading = false
+            })
+          }
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    handleDelete(row) {
+      this.$confirm('确认删除本条数据吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.$api.deleteApply({ id: row.id }).then(response => {
+          this.$message.success('删除成功')
+          this.loading = false
+          this.getList()
+        }).catch(error => {
+          this.loading = false
+        })
+      })
+    }
+  }
+}
 </script>
 </script>
+<style lang="scss">
+.my-dialog-name{
+  .el-dialog__body{
+  padding-top:0
+}
+}
+.list .el-form-item__label{
+    font-weight: 900;
+}
+</style>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.admin-apply {
+
+}
+.details:hover{
+  border-bottom: 1px solid black;
+  cursor: pointer;
+}
+ .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
 </style>
 </style>

+ 286 - 0
src/views/backStageManage/application/function/index.vue

@@ -0,0 +1,286 @@
+<template>
+  <div class="admin-apply">
+    <el-form :inline="true">
+      <el-form-item>
+        <el-input v-model="queryParams.name" size="small" placeholder="请输入"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="" size="small" @click="getList">查询</el-button>
+        <el-button type="primary" size="small" @click="handleAdd(0)">新增</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+        :row-key="getRowKeys" 
+        v-loading="loading"
+        :data="tableData"
+        header-row-class-name="custom-table-header"
+
+        :expand-row-keys="expands"
+        @expand-change="expandChange"
+        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+    >
+     <el-table-column type="expand">
+      <template slot-scope="scope" style="width:80%">
+        <function-list :applyId="scope.row.id"></function-list>
+      </template>
+    </el-table-column>
+      <el-table-column label="应用名称" align="" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span class="details">{{scope.row.name}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="describe" label="应用描述" align="center" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="createUserName" label="创建人" align="center" show-overflow-tooltip></el-table-column>
+      <el-table-column label="操作" align="center" width="150">
+        <template slot-scope="scope">
+          <el-dropdown split-button type="primary" size="small" @click="handleEdit(scope.row)">
+            编辑
+            <el-dropdown-menu slot="dropdown" class="text-align_center">
+             
+              <el-dropdown-item @click.native="handleDetails(scope.row)">详情</el-dropdown-item>
+              <el-dropdown-item class="color-red" @click.native="handleDelete(scope.row)" divided>删除</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="pagination">
+      <el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
+    </div>
+    <el-dialog :title="title" :visible.sync="visible" width="500px" :before-close="close">
+      <el-form v-if="visible" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" label-position="left">
+      
+        <el-form-item label="应用名称" prop="name">
+          <el-input v-model="ruleForm.name" placeholder="请输入应用名称"></el-input>
+        </el-form-item>
+        
+        <el-form-item label="应用描述" prop="describe">
+          <el-input v-model="ruleForm.describe" placeholder="请输入" type="textarea" maxlength="100" show-word-limit></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" @click="submit" :loading="btnLoading">确 定</el-button>
+      </div>
+    </el-dialog>
+       <el-dialog :title="title" :visible.sync="showvisible" width="700px" class="my-dialog-name" contentStyle="width:400px;" :before-close="close" v-if="ruleForm.apply!=null">
+        <el-form label-position="left"  class="demo-table-expand" label-width="80px">
+          <el-form-item label="应用名称 :">
+            <span>{{ruleForm.apply.name}}</span>
+          </el-form-item>
+          <el-form-item label="应用描述 :">
+            <span>{{ruleForm.apply.describe}}</span>
+          </el-form-item>
+           <el-form-item label="创建人 :">
+            <span>{{ruleForm.apply.createUserName}}</span>
+          </el-form-item>
+          <el-form-item label="租户列表" class="list">
+         
+          </el-form-item>
+         
+        </el-form>
+          <el-table :data="ruleForm.tenantVOList" header-row-class-name="custom-table-header"  max-height="250" border>
+            <!-- <el-table-column type="index" label="#" width="55" align="center"></el-table-column> -->
+            <el-table-column prop="name" label="租户名称" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="contacts" label="联系人" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="address" label="联系人地址" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="type" label="类型" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column label="是否启用" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+              <span v-if="scope.row.state==0">否</span>
+              <span v-if="scope.row.state==1">是</span>
+            </template>
+            </el-table-column>
+          </el-table>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import FunctionList from '../function/index.vue'
+export default {
+  components: {
+    Treeselect,
+    FunctionList
+  },
+  data() {
+    return {
+     getRowKeys(row){
+				return row.id
+			},
+      visible: false,
+      showvisible:false,
+      loading: false,
+      btnLoading: false,
+      total: 0,
+      tableData: [],
+      title: '',
+      expands:[],
+      queryParams: {
+        size: 10,
+        current: 1,
+        name: ''
+      },
+      ruleForm: {},
+      rules: {
+        name: [{ required: true, message: '请输入应用名称', trigger: 'blur' },],
+        describe: [{ required: true, message: '请输入描述', trigger: 'blur' },],
+      },
+    }
+  },
+    computed: {
+    userinfo() {
+      return this.$store.state.admin.userinfo
+    }
+  },
+  mounted() {
+    this.getList()
+
+  },
+  methods: {
+    expandChange(row,expandedRows) {
+			let that=this
+			console.log(expandedRows);
+			if (expandedRows.length) {
+              that.expands = []
+              if (row) {
+                that.expands.push(row.id)
+              }
+            } else {
+              that.expands = []
+            }
+    },
+   
+    normalizer(node) {
+      return {
+        id: node.id,
+        label: node.name,
+      }
+    },
+    handleAdd(parentId) {
+      this.title = '新增应用'
+      this.visible = true
+      this.ruleForm = {
+        // sort: 0,
+        // parentId: parentId
+      }
+    },
+    handleEdit(row) {
+      this.title = '编辑应用'
+      this.visible = true
+      this.ruleForm = { ...row }
+    },
+    handleDetails(row){
+      this.title = '应用详情'
+      this.showvisible = true
+      this.$api.getAllTenantByApplicationId({id:row.id}).then(response=>{
+         console.log(response)
+         
+         this.ruleForm = response.data
+         this.ruleForm.apply={...row}
+      })
+     
+    },
+     handleCurrentChange(val) {
+      this.queryParams.current = val;
+      this.getList();
+    },
+    close() {
+      this.visible = false
+      this.showvisible = false
+    },
+    getList() {
+      this.loading = true
+      this.$api.getApplyList(this.queryParams).then(response => {
+       
+        this.tableData = response.data
+        this.total = response.pageColumn.total
+        this.loading = false
+      }).catch(error => {
+        this.loading = false
+      })
+    },
+    submit() {
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          this.btnLoading = true
+          if (this.ruleForm.id) {
+            this.$api.editApply(this.ruleForm).then(response => {
+              this.$message.success('编辑成功')
+              this.btnLoading = false
+              this.getList()
+              this.close()
+            }).catch(error => {
+              this.btnLoading = false
+            })
+          } else {
+            this.ruleForm.tenant=this.userinfo.tenantId
+            this.$api.addApply(this.ruleForm).then(response => {
+              console.log(2,response)
+              this.$message.success('新增成功')
+              this.btnLoading = false
+              this.getList()
+              this.close()
+            }).catch(error => {
+              this.btnLoading = false
+            })
+          }
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    handleDelete(row) {
+      this.$confirm('确认删除本条数据吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.$api.deleteApply({ id: row.id }).then(response => {
+          this.$message.success('删除成功')
+          this.loading = false
+          this.getList()
+        }).catch(error => {
+          this.loading = false
+        })
+      })
+    }
+  }
+}
+</script>
+<style lang="scss">
+.my-dialog-name{
+  .el-dialog__body{
+  padding-top:0
+}
+}
+.list .el-form-item__label{
+    font-weight: 900;
+}
+</style>
+<style lang="scss" scoped>
+.admin-apply {
+
+}
+.details:hover{
+  border-bottom: 1px solid black;
+  cursor: pointer;
+}
+ .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 0 - 1
src/views/backStageManage/layout/components/Sidebar/index.vue

@@ -41,7 +41,6 @@ export default {
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
   .logo{
   .logo{
-    
     width: 100%;
     width: 100%;
     min-width: 76px;
     min-width: 76px;
     max-width: 140px;
     max-width: 140px;

+ 39 - 16
src/views/backStageManage/login/index.vue

@@ -58,6 +58,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import Storage from '@/utils/storage';
 export default {
 export default {
   components: {},
   components: {},
   props: {},
   props: {},
@@ -93,7 +94,12 @@ export default {
   created() {},
   created() {},
   mounted() {},
   mounted() {},
   methods: {
   methods: {
-    forget(){},
+    forget(){
+        this.btnLoading = true;
+       this.$api.adminLogin(this.ruleForm).then(async response => {
+ 
+ })
+    },
     //切换登录方式
     //切换登录方式
     changeLoginType(){
     changeLoginType(){
       this.loginType=(this.loginType==1?2:1)
       this.loginType=(this.loginType==1?2:1)
@@ -135,32 +141,49 @@ export default {
 
 
       })
       })
     },
     },
-    //提交信息
-    submit(){
-      this.$refs.ruleForm.validate((valid) => {
-        if (valid) {
-          this.$router.push(
-            {
-              path:'/administrator/home',
+    backAccountLogin(){
+    this.$api.backAccountLogin(this.form).then(response=>{
+            if(response.code == 200){
+              this.$cookie.set('token',response.data.token)
+              Storage.setStr('username', this.form.username)
+              Storage.setStr('password', this.form.password)
+              this.$message.success('登录成功')
+              this.$router.replace(
+                {
+                  path:'/administrator/home',
+                }
+              )
+            }else{
+              this.$message.error(response.message)
             }
             }
-          )
-          return
-          if(this.invitationCode){
-            this.form.inviteCode = this.invitationCode
-          }
-          this.$api.personnelSignUp(this.form).then(response=>{
+          })
+    },
+     backPhoneLogin(){
+    this.$api.backPhoneLogin(this.form).then(response=>{
             if(response.code == 200){
             if(response.code == 200){
+              this.$cookie.set('token',response.data.token)
+              Storage.setStr('phoneNum', this.form.phoneNum)
+              Storage.setStr('phoneCode', this.form.phoneCode)
               this.$message.success('登录成功')
               this.$message.success('登录成功')
               this.$router.replace(
               this.$router.replace(
                 {
                 {
-                  path:'/home',
+                  path:'/administrator/home',
                 }
                 }
               )
               )
             }else{
             }else{
               this.$message.error(response.message)
               this.$message.error(response.message)
             }
             }
           })
           })
-          
+    },
+    //提交信息
+    submit(){
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+      if(this.loginType==2)
+      {
+        this.backAccountLogin();
+      }
+      else{this.backPhoneLogin();}
         }else {
         }else {
           return false;
           return false;
         }
         }

+ 5 - 2
src/views/login/index.vue

@@ -17,7 +17,7 @@
           </div>
           </div>
           <div class="password">
           <div class="password">
             <myInput>
             <myInput>
-              <span slot="placeholder" style="line-height:50px" ><span class="iconfont icon-mima"></span> 密码</span>
+              <span slot="placeholder" style="line-height:50px" ><span class="iconfont icon-mima" ></span> 密码</span>
             </myInput>
             </myInput>
           </div>
           </div>
         </div>
         </div>
@@ -25,7 +25,7 @@
           <span class="forget_btn" @click="forget">忘记密码了?</span>
           <span class="forget_btn" @click="forget">忘记密码了?</span>
         </div>
         </div>
         <div class="btn">
         <div class="btn">
-          <el-button round style="width:100%;background:var(--color);color:white;height:50px;" @click="submit">登录</el-button>
+          <el-button round style="width:100%;background:var(--color);color:white;height:50px;" @click="submit" :loading="btnLoading">登录</el-button>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -41,6 +41,7 @@ export default {
   props: {},
   props: {},
   data() {
   data() {
     return {
     return {
+ 
     };
     };
   },
   },
   watch: {},
   watch: {},
@@ -50,6 +51,8 @@ export default {
   methods: {
   methods: {
     forget(){},
     forget(){},
     submit(){
     submit(){
+
+
       this.$router.push(
       this.$router.push(
         {
         {
           path:'/home',
           path:'/home',